• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Any passionate Ruby and/or Python folks here?

Captain Kirk

Limp Gawd
Joined
Dec 22, 2002
Messages
288
Long ago, my first experience with scripting languages was with Perl. Since then, I've fallen in love with Ruby. Awhile back, I had a CS class that was dead set on using Python. The class was mostly theory and not a lot of practical (hands-on) material, so the code "difficulty" was pretty basic. I've recently taken on an existing project that involves a lot of Python. I need to re-familiarize myself with the language - essentially, I need to re-learn a lot of the syntax and the Python "way" of doing things. I have the O'Reilly "Learning Python", Third Edition. (It covers up to Python 2.5.)

I know there's a fourth version of "Learning Python" out there that covers 2.6 and 3.0. The project I'm going to be working has been written with 2.6 in mind and does dabble with some of the 3.0 "future." Does anyone with knowledge of the book think buying the updated edition is worthwhile?

Knowing Ruby, I have a hard time looking at Python code and thinking that it could be written more understandably. Has anyone here started with one language or the other and found themselves switching? If you did, care to share why? I personally think Ruby's strengths lie in its ease of use and readability. The community also seems to be a bit more willing to help out. (I could be biased, though...) Who knows, maybe I'll end up rewriting this code in Ruby. I'd like to try learning Python again, though; it never hurts to have additional skills in one's mental toolbox :).

Any advice/suggestions/rants, etc. welcome.

Thanks!
 
Languages come and go. So you'll be switching many more times, get used to it.

For python books, i prefer Python Essential Reference, 4th edition.


Ive transitioned from C -> Java -> Python. With a few other minor languages sprinkled in for good measure.

One thing i miss about java, now that im working with python, is that since everything is runtime bound / dict lookups the software dev tools i use don't have near the number of transforms that they could do on java.
 
Ruby was my scripting language of choice, and python replaced it. I just think python is far more readable. Ruby's better for making quick-n-dirty, terse scripts. However, it often ends up producing something almost perl-like (*shudder*).

As for switching languages, ambientZ is right. It's worth getting into the habit of just trying new languages every now and then. Helps keep you fresh. If you want to really mix things up, go learn a functional language or two. That'll mess with your head a bit.
 
try writing assembly 8 hours a day 5 days a week
I'd prefer not to gouge my eyes out at the end of each workday ;). Thanks, though.

I fear my post has incorrectly portrayed me as a "novice" programmer. While programming isn't my day job, and I'd hardly call myself a "master programmer;" I'm not inexperienced or just starting out, either. I think what I was mainly trying to get out of this post was whether a) anyone had used the O'Reilly book and whether the fourth edition was worth the upgrade, and b) if anyone had any real compelling Ruby vs. Python arguments. I know choosing a language is often a matter of inertia, personal/company preference, and choosing the right tool for the job. It's often been my experience that you don't even get to pick most of the time.

So, can anyone take on my A & B :)?
 
I think I can help with question B. Just had a course last semester (Systems Programming) which we had to write four papers on four different topics (NTP, DNS, Directory Services, and Filesystems) in ACM format (bleh). With each of the papers we were required to have two scripts written in Python and Ruby doing the same required assignment. When doing the scripts it quickly turned into finding the way to do it in Python and then port that over to Ruby. The official documention for Python is quite easy to understand and extremely readable while the documentation provided for Ruby was lacking (to me anyway) and harder to find what I was looking for.
 
Back
Top