r/CoderRadio • • Jan 13 '15

Why Chris should consider learning Python

I listened to CR-136 today and was a little disappointed that Chris decided not to seriously consider Python as the language he will learn during his 'coding journey'. While Ruby, Go, and Rust, are all very capable languages, I think Chris should seriously take a second look at Python.

First, Python has an amazing community. There's virtually never a question you can ask that someone isn't going to give you a good, solid, answer and they will often include code examples to show you how to do it or at least get you started.

Second, the Python community is huge. While this can also be said about the Ruby community, I've never felt that that community was as well-rounded and mature as the Python one. Community goes a long way.

Third, Python has a 'battaries included' approach to life. Whatever you want to do, Python likely has a module that will allow you to do it simply, elegantly, and reliably. Because of this, you end up writing a lot less code than you would in other languages and the code you do write is often higer quality since you're usually just hooking into well defined functions instead of navigating through tons of your own code.

Lastly, I feel that learning Ruby when most of what Chris wants to do is system admin type things (with the occassional web thing) is like deciding to learn PHP for that task. Python just 'feels' like a bit better fit for shell stuff while, IMHO, Ruby has always felt a bit 'cludgy' in that space.

I know Chris mentioned that one of the reasons he discounted Python was that he wasn't passionate about it. I'd say this should be more of a practical matter than a passion one. He's not wanting to become a pro developer or even necessairly release code to others. He just wants to create some tools for his own use and maybe share it with others a bit later. Why not get a solid language under his belt then, once he has the basics of writing good code down, include Ruby or Go or Rust later? Why make it harder to learn to code instead of starting at a dead easy point then building on it?

In the end, I'm glad Chris is learning to code at all. It's a skill everyone can benefit from. I just wanted to be 'that guy' who came to the defense of an awesome language.

19 Upvotes

28 comments sorted by

View all comments

1

u/dangerdad137 Jan 22 '15

I actually think Ruby in many ways is a better language, whereas Python in my experience had more libraries that actually could be applied to problems I was trying to solve. Most of my use for them is writing automation scripts like Chris was describing.

When I first picked up Ruby, my thought was that it was all the beautiful things about Perl (especially regex syntax) without all of the warts, and with reasonable object support.

With Python, my biggest frustration is the whitespace-as-syntax, which makes it VERY hard to refactor code. Moving a small snippet of code becomes such a nightmare when you have to carefully re-indent everything, whereas in C/C++/Java/Ruby/whatever moving a chunk of code, then hitting "format" just works.

For context, I have 20+ years of C++ experience, mostly system programming. Some Java, C#, professionally, but mostly all C++.