[#386100] Numeric#coerce docs are disaster — 7stud -- <bbxx789_05ss@...>

num.coerce(numeric) =E2=86=92 array

14 messages 2011/08/02

[#386114] Documentation Improvement Proposal — Chris White <cwprogram@...>

=3D Issues =3D

24 messages 2011/08/02
[#386115] Re: Documentation Improvement Proposal — Steve Klabnik <steve@...> 2011/08/02

I reeeeeealy dislike user comments on documentation. It's one of the

[#386117] Re: Documentation Improvement Proposal — Phillip Gawlowski <cmdjackryan@...> 2011/08/02

On Tue, Aug 2, 2011 at 7:39 PM, Steve Klabnik <steve@steveklabnik.com> wrot=

[#386118] Re: Documentation Improvement Proposal — Steve Klabnik <steve@...> 2011/08/02

> What's wrong with stealing WikiPedia's procedures? The model works

[#386119] Re: Documentation Improvement Proposal — Chris White <cwprogram@...> 2011/08/02

On Aug 2, 2011, at 11:00 AM, Steve Klabnik wrote:

[#386123] Re: Documentation Improvement Proposal — Steve Klabnik <steve@...> 2011/08/02

Apologies, I've just responded to everyone in-line.

[#386231] Brainstorming ideas how to improve Ruby's documentation — Marc Heiler <shevegen@...>

The title is misleading...

42 messages 2011/08/05
[#386233] Re: Brainstorming ideas how to improve Ruby's documentation — "Fred L." <f.linard@...> 2011/08/05

Hello,

[#386235] Re: Brainstorming ideas how to improve Ruby's documentation — Alexander Litvinovsky <alexander.litvinovsky@...> 2011/08/05

What are you talking about? Ruby has a nice docs, railsapi.com for example.

[#386297] Help out with the next version of ruby-lang.org — Magnus Holm <judofyr@...>

https://github.com/rubylang/ruby-lang.org

11 messages 2011/08/07

[#386341] Exceptional Ruby and Metaprogramming Ruby has anyone picked these up? — Kevin <darkintent@...>

I'm thinking of picking up these two books and was wondering if anyone

11 messages 2011/08/09

[#386378] ruby installation — "Momodou J." <modou75alieu@...>

how to implement this in windows :

16 messages 2011/08/09

[#386401] *WHY* does this not work? — serialhex <serialhex@...>

ok, so code:

23 messages 2011/08/09
[#386403] Re: *WHY* does this not work? — "Darryl L. Pierce" <mcpierce@...> 2011/08/09

On Wed, Aug 10, 2011 at 03:52:59AM +0900, serialhex wrote:

[#386404] Re: *WHY* does this not work? — serialhex <serialhex@...> 2011/08/09

On Tue, Aug 9, 2011 at 3:05 PM, Darryl L. Pierce <mcpierce@gmail.com> wrote:

[#386480] Odd regexp behavior — Glen Holcomb <damnbigman@...>

I'm running 1.9.2-p180

16 messages 2011/08/10

[#386506] Distributing Ruby program as a standalone executable (exe) for windows — Michelle Pace <michelle@...>

Hello there,

10 messages 2011/08/11

[#386539] Online tutor for Ruby — T J Pereira <tj5155@...>

I am finding it difficult to apply the RUBY program. Its because i have

18 messages 2011/08/12
[#386541] Re: Online tutor for Ruby — Phillip Gawlowski <cmdjackryan@...> 2011/08/12

On Fri, Aug 12, 2011 at 6:00 AM, T J Pereira <tj5155@tm.net.my> wrote:

[#386637] class inheritance and class constants — Iñaki Baz Castillo <ibc@...>

------------------------

16 messages 2011/08/14

[#386784] Green Shoes v1.0 released — ashbb <ashbbb@...>

Hello, everyone.

15 messages 2011/08/18
[#392062] Re: Green Shoes v1.0 released — Barry Yu <yubarry@...> 2012/01/09

why do I get this error?

[#386796] Searching in a directory — Yu Yu <htwoo@...>

Hello,

21 messages 2011/08/18

[#386893] Gritty Details of super() — luke gruber <luke.gru@...>

Hey guys,

18 messages 2011/08/21

[#386900] Possble bug in Ruby parser (Fixnum#times within "case" statement) — Iñaki Baz Castillo <ibc@...>

Hi, I cannot find an explanation for the following issue so I think it's a =

15 messages 2011/08/21
[#386901] Re: Possble bug in Ruby parser (Fixnum#times within "case" statement) — Ryan Davis <ryand-ruby@...> 2011/08/21

[#386903] Re: Possble bug in Ruby parser (Fixnum#times within "case" statement) — Iñaki Baz Castillo <ibc@...> 2011/08/21

2011/8/22 Ryan Davis <ryand-ruby@zenspider.com>:

[#386920] New to Ruby some problems — jack jones <shehio_22@...>

I am new to Ruby, My mother tongue is C++ .. I have too many problems I

21 messages 2011/08/22

[#386949] Want to get involved with this doc stuff? I'm making it even easier — Steve Klabnik <steve@...>

Hey guys-

9 messages 2011/08/22

[#387058] How the access the values of this result — QAS WM <qaiserwali@...>

I am getting the following as a result of a script I run.

11 messages 2011/08/26

[#387070] overloading methods question please? — jack jones <shehio_22@...>

def do_something(a as Array)

11 messages 2011/08/26

[#387138] String#split resets regex captures variables (Ruby 1.8.7) — Olivier Lance <bestiol@...>

Hi,

10 messages 2011/08/29

[#387196] SAMSUNG to produce "Ruby on Rails in Silicon" System on a Chip — Ilias Lazaridis <ilias@...>

(public draft)

9 messages 2011/08/31

[#387197] Prepend a character to a string in ruby — ruby rails <rubyonrails4me@...>

Hi,

10 messages 2011/08/31

[#387212] GUI programming — Samuel Mensah <sasogeek@...>

Is ruby GUI programming something that will come along as I study ruby

19 messages 2011/08/31
[#387230] Re: GUI programming — Alexey Petrushin <axyd80@...> 2011/08/31

I believe right now it's better to stay with console, there's no Ruby

Re: Documentation Improvement Proposal

From: Kevin <darkintent@...>
Date: 2011-08-05 14:52:12 UTC
List: ruby-talk #386251
On Tue, Aug 2, 2011 at 11:03 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
> On Tue, Aug 2, 2011 at 7:27 PM, Kevin <darkintent@gmail.com> wrote:
>
>> Right now documentation
>> across the board (Not just Ruby's.) in my experience seems to be =C2=A0a
>> list of definitions and not much else. =C2=A0Imagine trying to learn a
>> second language by just reading a dictionary and not being told about
>> how to structure nouns, verbs, etc. =C2=A0Or more accurately imagine
>> learning them separately.
>>
>>
> Maybe I'm missing something, but in my mind, that's what documentation is=
.
> Switch it around, imagine trying to learn a second language, and desperat=
ely
> needing to ask where the bathroom is, but every time you try to find the
> translation for "bathroom" you wind up having to wade through three pages=
 of
> context / examples.
No you don't Hypertext already solves that problem since the grammar
related information is essentially metadata in this case.  Besides
your example only works in concrete cases.  As it stands now
dictionaries are effectively useless without understanding at least a
small fraction of the language grammar if you are trying to find out
how to do something abstract.  This is where your example falls apart.
 A list of words is not going to help someone just learning how to
form meaningful statements to form meaningful statements.


> I think there is merit to what you are suggesting, but I don't think it i=
s
> in the docs. Or, if it is, it needs to work with the current style of doc=
s,
> because much more frequently I just want to figure out "what was that met=
hod
> that returns an element from a hash, without invoking #[]" go to the docs
> "oh yeah, #fetch". That process should be as streamlined as possible. If =
you
> want to add other stuff as well, that's fine, but make sure not to impede
> what I think is the docs' primary function, figuring out what method you
> want, what it expects (signature), and what it does (a sentence or two, a=
n
> example or two).
I maintain an internal application that deals with student records.
Since I'm stuck on .net 2.0 and cannot use Linq I constructed  a
psuedo ORM and my model classes have a fill method to set the
properties of a given instance.  I had prepared the fill method a very
long time ago and had not actually used it. (This code was part of a
secondary code base when I created it and I was not the project lead
at the time so my code did not see immediate use.)  Because of this
lag between creation and usage I did not notice the reason why
Class.fill would refuse to actually set the properties of the class
instance.  I thought I had the logical equivalent of

fill(record_hash)
  self.property1=3Drecord_hash[:foo]
  self.property2=3Drecord_hash[:bar]
end

What I really had was something like:

fill(record_hash)
  a=3DClass.new
  a.property1=3Drecord_hash[:foo]
  a.property2=3Drecord_hash[:bar]
  return a
end

See the problem here?  Assuming that the syntax is correct the two
functions have semantically different meanings.  Given the the second
form of the function if fill is called on an instance of a class only
one of the following statements will actually work:
class_instance1=3DClass.new
class_instance2=3DClass.new
class_instance1.fill(record_hash) #Fails miserably since it returns a
new class instance with set properties rather than setting the
properties of the caller.  A perfectly valid statement though.
class_instance2=3Dclass_instance1.fill(record_hash) #This works since
the second form returns a filled instance and thus requires a second
variable to receive the return value in the calling code.

Only the first form allows for class_instance1.fill(record_hash) to
set the values of the current instance.

A simple logic error that you may or may not pick up just by reading
the function definitions.  I think most would agree that  it is ass
backwards to have these kinds of details stashed away in treatises
like the Pickaxe.  The way people try to solve this problem, by
including this kind of information on the main documentation website
in the form of tutorials isn't enough. The tutorials are still
disconnected from the API docs and vice versa.  My point is that every
language is the union of the given grammar and the definitions of
vocabulary in the context of this discussion this means the method
definitions we are used to.  While it is often very useful for us to
think of definitions and grammar as separate things this kind of
thinking becomes a hindrance when trying to learn how a language works
before one has properly internalized the grammar of the language.
What that means when constructing documentation is that not making it
easy to link API to language spec fosters a haphazard kind of learning
that makes it more difficult than it needs to be to learn how to deal
with abstract problems in the language of choice.


> I'm generally satisfied with Ruby's docs. There really are only two thing=
s I
> take issues with. The first is presentation, I prefer the ruby-doc.org st=
yle
> of presentation. The second is completeness, rdoc.info is much more compl=
ete
> to the point that I'm probably going to switch. It also has docs for gems=
,
> which I think is really cool. And it filters the list as you search, whic=
h
> okay. I just find its format harder to follow (possibly because I'm used =
to
> ruby-doc, but IDK, I like that giant pool of methods at the top of ruby-d=
oc
> much better than the list at the top of rdoc).
>
> Anyway, that's my two cents.
>

In This Thread

Prev Next