The Artima Developer Community
Sponsored Link

Weblogs Forum
Ode to the Python Quick Reference (Ruby Needs One!)

16 replies on 2 pages. Most recent reply: Feb 15, 2008 8:57 PM by Elizabeth Wiethoff

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 16 replies on 2 pages [ 1 2 | » ]
Bruce Eckel

Posts: 868
Nickname: beckel
Registered: Jun, 2003

Ode to the Python Quick Reference (Ruby Needs One!) (View in Weblogs)
Posted: Oct 23, 2007 8:14 PM
Reply to this message Reply
Summary
Not only is this the first place that I look, it's a wonderful way to browse the language features and see what's new. It's also an excellent history of the language's development.
Advertisement

The Python Quick Reference has been the most excellent resource for many years, because it gives you an overview of the entire language and usually allows you to quickly find the solution you're looking for. If it doesn't, it has links directly into the Python documentation.

Just so Richard Gruet and the others who work on the PQR know, you have lots of fans out there. Thanks for all your work.

This is one of the many reasons that I am still drawn to Python rather than Ruby when I'm solving problems. Summed up in one word, it's "maturity." Not only am I far more likely to find a prepackaged solution in the standard libraries, but there are resources like the Python Quick Reference which make my life much easier.

That's not to say that there haven't been attempts to emulate the PQR in Ruby. For example, the Ruby QuickRef and the PDF-only Ruby Language QuickRef, but I observe that (1) none of them have the polish of the PQR and (2) there hasn't been unification yet as there has been for many years with the PQR being the one quick reference.

Before you fire up your comments, I continue to root for Ruby. I think it's great that Sun is directly supporting it as the scripting language for the JVM (as far as I know none of the other languages are actually getting financial support). I am also attracted to the more dynamic features of the language like open classes and the like. As far as dynamic languages on the JVM, both Ruby and the upcoming new version of Jython seem to me to be the most attractive of the offerings.

But to make Ruby easier, I suggest that Rubyists study from and plagiarize the PQR, and also learn from the "batteries included" approach in the Python standard libraries. Both of these are things that keep me going back to Python.


ahmed seleem

Posts: 9
Nickname: ahmedrs
Registered: Aug, 2007

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 24, 2007 8:41 PM
Reply to this message Reply
hi bruce ,

I am still on the beginning of web development learning , and love your books and articles so much .

we need you to tell us ,

what do you think of Groovy and will it become the new java specially on the web ? ,

the new "netbeans 6.0 beta" ?

and if JRuby better or to use the original as JVM will supporte lots of other

languages ....??

another last Q : i've read what you wrote about Flex , i really convinced with it

but , I think in one issue => it's the speed of the loading of the page because it will take a long for lots of people (whom don't have a fast internet connection ) to load the site .......... there lots of people in Egypt my home have 256 kbs at there homes .....

thanks,

Alex Blewitt

Posts: 44
Nickname: alblue
Registered: Apr, 2003

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 25, 2007 7:27 AM
Reply to this message Reply
I suspect a Scala one would come in handy, too.

Berco Beute

Posts: 72
Nickname: berco
Registered: Jan, 2002

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 25, 2007 7:46 AM
Reply to this message Reply
Nice! Whenever people asks me where to start learning Python I always point them to the Python Quick Reference, but I never see others recommending it. Uptill now :)

I started out with Ruby but got drawn to Python after a while. That was due to:

- The Python Quick Reference. Python starters can just read the whole reference from top to bottom and learn most aspects of the language. If they need more information they can always visit the official Python docs. Together with iPython it is something I always have close at hand. What I like is that it is compact, NOT PDF (!!!) and very well written (or 'mature' as you like).
- A friend of mine who always showed me the equivalent of some Ruby code that did exactly the same but was a lot easier to read.
- The fact that all the Python samples somehow fitted my brain.
- Jython: The most compelling experience any Java programmer can have when tiptoeing in the lukewarm waters of Python is having them translate some Java code to Python. The power of Python becomes really clear really fast.

It is both the language and the surrounding goodies (PQR, the standard libs, the community) that make me feel right at home with Python.

Daniel Berger

Posts: 1373
Nickname: djberg96
Registered: Sep, 2004

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 25, 2007 7:49 AM
Reply to this message Reply
A 46 page quick ref, eh? You and I have a different definition of "quick reference" Bruce. No, thanks.

What is the "batteries included" approach to the Python standard libraries?

Matthew Trumbell

Posts: 7
Nickname: taft
Registered: Mar, 2006

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 25, 2007 2:40 PM
Reply to this message Reply
Depends what you want a reference to. The PQR isn't just a language reference, it also covers...well you know cause you looked at it.

What's with the giant chip on your shoulder? Python envy?



> A 46 page quick ref, eh? You and I have a different
> definition of "quick reference" Bruce. No, thanks.
>
> What is the "batteries included" approach to the Python
> standard libraries?

Bruce Eckel

Posts: 868
Nickname: beckel
Registered: Jun, 2003

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 25, 2007 5:05 PM
Reply to this message Reply
> and if JRuby better or to use the original as JVM will
> supporte lots of other

My own gut feeling is that the future of the JVM is with Scala, Jython and JRuby, which all appeal to me as more mature and well thought-out than the other things I've seen (yes, including Java itself). But that's just the way it strikes me.

> another last Q : i've read what you wrote about Flex , i
> really convinced with it

Many people confuse Flex apps with Flash animations. You can of course include Flash animations within Flex apps, but a basic Flex app can be very small. I'm working on an article showing how to combine Flex UIs withing HTML pages and I'll make a point of giving the size of the Flex portions so that you can see how small they can be.

Bruce Eckel

Posts: 868
Nickname: beckel
Registered: Jun, 2003

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 25, 2007 5:09 PM
Reply to this message Reply
I should point out that I think the Ruby QuickRef is definitely a good ways along what I'd like to see (and I think I know the author a little if he's in Seattle). If it can steal as much as possible from the style of the PQR I think it would be a huge improvement, but I also see the PQR as something that's been developed and refined and polished over a long time by multiple people, while the Ruby QuickRef seems to be the work of one person.

Bruce Eckel

Posts: 868
Nickname: beckel
Registered: Jun, 2003

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 25, 2007 5:11 PM
Reply to this message Reply
Also note that my friend Jeremy has had good results from O'Reilly's Ruby Pocket Reference and that seems like a good guide (the Python Pocket Reference never did anything for me), and Jeremy has been using it as a starting guide (although he's an experienced programmer).

Glenn M. Lewis

Posts: 1
Nickname: gmlewis
Registered: Jan, 2004

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 30, 2007 11:59 PM
Reply to this message Reply
Thank you for the link!

Back in 1994, I looked at both Ruby and Python after having used Perl for years, and chose Ruby. Now, in 2007, I have a new job where it benefited the other engineers if I coded in Python, and I figured that it would be another tool in my toolbox, so I did. I must admit that I still prefer Ruby (to Python, Perl, and Tcl), as its OOP implementation is so clean and the language seems to consistently adhere to the Principle of Least Surprise.

In answer to your search for a premier Ruby Quick Reference, I highly recommend the PDF version of "Programming Ruby: The Pragmatic Programmers' Guide, Second Edition". Yes, it is a commercial work, but it is worth every penny, and I believe they have released the first edition for free to give you a feel for their writing style. It is fully indexed, and a quick search jumps you to the information that you need. Not only is it an incredible reference, but the other sections actually teach the language in a clear and well-written style.

Here is a link: http://www.pragprog.com/titles/ruby

Chuck Allison

Posts: 63
Nickname: cda
Registered: Feb, 2003

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 31, 2007 2:44 PM
Reply to this message Reply
Ruby needs more than maturity. It could use some orthogonality and simplicity. I attended a Ruby tutorial at OOPSLA last week and came away disgusted. Why would anyone invent a language that was a combination of Perl and SmallTalk? The presenter showed five substantively different ways of writing a factorial function. So much for readability. Someone please tell me why I would want to use Ruby instead of Python.

Bruce Eckel

Posts: 868
Nickname: beckel
Registered: Jun, 2003

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 31, 2007 2:53 PM
Reply to this message Reply
> In answer to your search for a premier Ruby Quick
> Reference, I highly recommend the PDF version of
> "Programming Ruby: The Pragmatic Programmers' Guide,
> Second Edition". Yes, it is a commercial work, but it is
> worth every penny, and I believe they have released the
> first edition for free to give you a feel for their
> writing style. It is fully indexed, and a quick search
> jumps you to the information that you need. Not only is
> it an incredible reference, but the other sections
> actually teach the language in a clear and well-written
> style.

I and many I have talked to were quite disappointed with the pickaxe book. It doesn't cover a lot in the language, and the coverage of some important features is weak, so I would not consider it a great reference.

I know a lot of people seem to really like the book but I wonder if it just isn't a case of it being out first. I read through it and didn't get the kind of depth that I had hoped for. (Sorry Dave).

ahmed seleem

Posts: 9
Nickname: ahmedrs
Registered: Aug, 2007

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Oct 31, 2007 7:53 PM
Reply to this message Reply
so Bruce,

what do you recommend for us to use even if it's not free....?

is it the " O'Reilly's Ruby Pocket Reference " ?

or it just an intro , so what's after ?

Romain Eude

Posts: 2
Nickname: romain
Registered: Feb, 2007

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Nov 1, 2007 4:55 AM
Reply to this message Reply
how about http://www.gotapi.com/rubyrails ?
This provides a pretty handy Ruby / Ruby on Rails shorthand searchable reference .

Todd P

Posts: 10
Nickname: taude
Registered: Feb, 2007

Re: Ode to the Python Quick Reference (Ruby Needs One!) Posted: Nov 2, 2007 9:28 AM
Reply to this message Reply
I love the Python quick guide. I have one printed of the 2.4 version. What I love best, is that for those of us who don't intimately use Python day to day, but instead for sporadic projects and scripts every few to six months or so, it's really easy to refresh my brain.

For example, I just used Python for a few hours, along with one of it's dozens of templating engines to write a code generator for a Flex Cairngorm application. (Someone from the Ruby world created Rails generators that did the same thing, but you needed to create a Rails application in your Flex project folder.)

I got that warm programmer feeling when I reach for my file folder, holding the beautiful, and tastefully colored print out of the Python library (I used the PDF, modern style)...

Hey Bruce, have you looked at PyDev lately for Eclipse? I just installed the newest version the other day and was pretty blown away by how well it works now (at my last gig I was using Komodo as we had Perl code from hell to support). I can't believe how far Python (and Ruby) dev environments have come. These really are what makes learning a language palatable for people now, and a real joy to use. After all, I believe most programmers prefer learn their language via intellisense!

Also, I worked with a friend for about an hour trying to create an Adobe InDesign template that I could fill out for creating similar cheat sheets for other things, like the Flex API, but never got around to finishing it, as it's so much work. I'd be interested in learning how Richard puts together all that information into those docs without it being a fulltime job.

Flat View: This topic has 16 replies on 2 pages [ 1  2 | » ]
Topic: Ode to the Python Quick Reference (Ruby Needs One!) Previous Topic   Next Topic Topic: Touring the Smallest Symbian App


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us