Python 25 times as popular as Ruby !?

M

Martin DeMello

Gavin Sinclair said:
I'll take that as a 'yes', then? Cool, I'll send you the code and
data soon :) I think a manual submission process is suitable, with
the maintainer updating the data files. But that's just in this case.
You can decide that when you recieve it :)

Heh - okay, I'd rather put up than shut up in this case :)

martin
 
C

Charles Comstock

Gavin Sinclair wrote:

[...]

We definitely more complete docs on lots of things though, that is my
main problem with Ruby. There are lots of things I know I can do,
without duplicating work, but since I can't find docs on it, it's
difficult to do. The push for RDoc is great, but I still have the same
complaints about it that I have of Javadoc, it generally doesn't give
some sort of example for each function, class in the library. I learn
far more from an example of code use that encompasses a wide part of the
library then a list of functions I can call in the library. The 2nd is
great, but it only works if you know how to use it already. Fix the
documentation and I think ruby will certainly spring ahead.


I fully agree on all counts. I'll just mention, though, that RDoc
actually encourages introductory/usage/example documentation, *so long as
the developer wants to write it*. For example:

I wasn't really trying to criticise RDoc or even Javadoc as a method of
documentation, I was trying to point out that they are oft misused.
Many times the developer decides against writing examples, and instead
just lightly explains each function.

I think the problem with class/library documentation in RDoc or Javadoc
style, is that it's harder when you first dive in to get a coherent
picture of how the library interacts. And that's the key component to a
library, knowing what it does and how to do it. Functions tell how to
set and check state, and generally how to start things and whatnot but
it doesn't describe the core philosophy of how the library works. It's
often very difficult to determine that from documentation that focuses
on each function/field, and not on the grand scope of the library.
Unless each function/field shows a good example on how to use it in the
total context of the library. It would be nice to have a tutorial in
each library to get your feet wet, and while it's certainly there in
some, it's missing in lots, or difficult to find.

There are certainly excellent examples of documentation in this format
which do a good job of describing exactly what I want above, but there
are many examples where it feels like the documentation is a couple
remarks strewn throughout the source. In that case I prolly will get
more from reading the source then looking at the rdoc.

Sorry, I certainly think it's great that we have what we have, but I
still feel like we can go alot further.
* http://extensions.rubyforge.org/

The *first thing you see* (an important consideration for people looking
at an RDoc screen for the first time) is a description of the project,
installation, usage, technical information, links, etc.

* http://www.ruby-doc.org/stdlib/libdoc/pathname/rdoc/index.html

Here, the first thing you see is a brief description of the 'pathname'
Ruby standard library. It could use a one-paragraph description and usage
example to help the casual browser (person, not software) decide whether
they're interested. However, the most important thing is the prominent
"For documentation, see class Pathname [linked]", which contains intro,
examples, and a method catalogue.

That's the style I like, particularly if the method catalogue shows how
each function is used in an example.
RDoc was certainly not a hinderance to creating decent documentation for
the 'pathname' library!

Sorry didn't mean to say it was a hinderance, just that perhaps not all
were as diligent in writing documentation for there libraries as they
could be.

They say a picture is worth a thousand words, well I say a nicely
commented example that illustrates how the library is supposed to
interact is worth the same as all the single function documentation that
can be thrown at me.

Many thanks to all who have documented, and also to all those who have
written libraries, I guess I just get frustrated when I find a library
that does what I need, but I don't know how to use it.

Charlie
 
R

Robert

Peter said:
Maybe I should go over to comp.lang.python and see if you have written
'Perl is 25 times as popular as Python'. Which of course you should
write as Perl has vastly more libraries of high quality software than
python.

Go Perl! Ooops. Sorry. ;-)
 
J

jeffrey templon

Gee,

THis whole discussion reminds me of ones we used to have on
comp.lang.python about 10 years ago, 'cept then it was
Python vs. Tcl instead of Ruby vs. Python.

Moral of the story -- if it works for you, keep coding in
it. If enough people agree with you (like the lang too)
it will catch on. People thought I was crazy ten
years ago writing stuff in this obscure Python language
nobody ever heard of. Now my colleagues are asking me
for recs on Python books.

Good luck to you guys, Ruby looks pretty cool!

JT
 
A

Aredridel

An idea I was wondering was if it might be possible to link unit tests
and RDoc.

It would work like this:

- The developer creates unit tests for their class, starting with the
simplest usages and then testing each facet of the code with unit
tests.

That's an excellent idea -- it would probably promote init testing as
well as documentation. That's a very good thing.
- RDoc then processes these unit tests, formatting and indexing them,
and includes them with the final documentation.

I think this approach could make it easier for class writers to
produce extensive examples whithout much additional work.

I agree. I just jumped into unit testing, and rdoc is next on my list of
tools to learn. (I'd really love to help with the ruby-doc projects,
because the docs -are- what made me use PHP for so long. It's truly a
language for people with no memory -- the docs are great, and everything
else guessable. Terribly easy to write bad code in, but that just
encourages one-off scripts, but I digress.)

I'm finding that as I work with Ruby, examples are hard to come by. I
pull out the source to many libraries to read how they work. Some are
informative -- net/http is great -- some are hard to understand, like
webrick -- but I'd really like docs so I don't -have- to read the source
and guess how the library is best used.

Ari
 
D

David Garamond

Robert said:
Go Perl! Ooops. Sorry. ;-)

But Perl is dead. Go PHP! :)

Seriously, some software are "destined" (read: designed) to be popular
and some are not. PHP and Python, for example, are designed with the
goal to be easy to learn and comes with as many batteries as it can.
Thus it will be used by as many people as it can.

Ruby is designed with a different goal I think, and I'm glad it is.
Would you be content if every kid in the block used Ruby? Where's your
edge then? :)
 
R

Rove Monteux

Quoting,
Would you be content if >> every kid in the block used Ruby? Where's
your edge then? :)

Im not 100% sure that it really is the point. PHP is more of a
'web-devotee' language by principles, what neither Perl nor Ruby are.
Ruby is object oriented, what Perl isnt. So, they are not oriented for
the same public at all.Thus, again, not sure if the 'popularity goal'
argument is valid, if at all ? :)


Cheers

Rove Monteux
 
H

Harpo

It's a matter of evidence.

Next time, with your kind permission, we'll speak about intercal and its
future.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top