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

3

u/ryanleesipes Jan 13 '15

I agree with this, for what he described Python sounds like a good fit what he wants to do. However, Ruby would be fine as well. I find both are good starting languages to get into. Also, both are up on http://codecademy.com if that fits his learning style.

3

u/[deleted] Jan 13 '15

i think he should learn prolog, lisp or haskell #yolo

2

u/jasondfw Jan 13 '15 edited Jan 13 '15

I agree. I learned java in school, then worked a little ruby. Ruby was okay, but some of it just didn't click, so I lost interest. I've been using python for months now and it's been really fun. Not everything makes sense, but I enjoy it more than any other language I've used, so it removes a mental barrier to building things.

EDIT: Haha, I'm listening to the episode now and I find it funny how Chris started the conversation saying that people talking him into Python gives him anxiety! I'll expand on my post a little bit:

From the beginning, I narrowed it down to Ruby and Python because they looked simple and fitting for what I wanted to do. I spent WAY too long researching and trying to figure out which one I should learn. I still investigate now to see if maybe I'm missing something I would enjoy in Ruby. That being said, I know I tried out Ruby and thought it was okay, but then I tried out Python and I found it more fun right off the bat.

I think this comes down to philosophies. Python's "one right way to do something" (I know this is a lie :) ) appealed to me because I'm a min-max'er and stress over tradeoffs when given too many choices. Ruby stresses code elegance and creativity, which I fear would give me paralysis by analysis when deciding how to write my code.

Moral of the story: You've made your choice, go with it. You can always try out something else if you don't find yourself having fun with Ruby.

2

u/[deleted] Jan 13 '15

I'd have to agree, I have loved Python since I first programmed a Tetris clone in it 8 years ago. It has matured a lot and the language is the most elegant of any I have used. Our company switched from PHP/Drupal to Python/Django and it has been a huge success and I would definitely recommend everyone give Python a chance.

2

u/notseekingkarma Jan 13 '15

My day job involves Python precisely because I sought a position where I could use it. I recommend Python to anyone who asks me for an opinion.

That being said, anyone who chooses not to use Python is not making a fatal mistake. Ruby is a very capable language as well.

As long as Chris picks one language and uses it for an extended period of time he'll be OK. Problems come when we try to jump to the next big thing without investing in the current thing. I say let Chris start with whatever intrigues him and he can then judge whether it's a good fit for him.

2

u/eadrom381 Jan 13 '15

Also going to second starting off with Python. I'm in a very similar boat as Chris and I settled on learning Python first. I have a couple other languages I'd like to eventually try out, but I'm using Python for a couple projects first to get my feet wet and learn.

2

u/IndyTechTrekkie Jan 14 '15

I was going to suggest Python as well, but as soon as I write in mentioning Python/Django, its like the Rubyist Elite ahem MD ahem (this is a joke) shoots it down. Probably because Apple didn't pick Django to ship pre-installed on all Macs. Google is big on Python/Django.

I always felt Ruby was too much like Perl (which I love) BUT the number one thing I run into with Perl is not being able to decipher the cryptic code a month later lol.

I never even considered using Python until my employer purchased a product that used Jython (Python that runs on the JVM). I quickly found the clear, concise syntax highly desirable. Django, Python's Rails-esque framework, also makes writing web apps a joy. I have also found that other employers value Python skills.

Also, not too promote Python too much, but ULA (United Launch Alliance as well as Lucasarts) used Python. I hear the Russians use Ruby for their spacecraft and well...... it doesn't "just work" lol

Also, avoid LISP (including Haskell, Clojure(I actually like clojure), I would say Scala as well unless you're experienced in Object Oriented programming and want to branch into functional and Lambda Calculus.

1

u/F41LUR3 Jan 13 '15

I'd vote for Go. It's basically "if C and Python had a baby", no dependency management, garbage collected, no overbearing Object-Oriented design crud to have to learn/deal with. Also, not very many indentation-scoped languages out there, so if he ever decided to go with a bracketed language it'd be a pretty grating experience after having first learned Python. Though python IS an easy language to learn and use, I still think that learning Python first will create bad habits.

Learning C should always be something to strive for, as C is very representative of how the machine actually operates. Go is a nice step from that, as it stays fairly within the same sort of mindset as C, but you gain a lot of the advantage of more modern "safe" languages. On top of that, very easy to work with in terms of the dependency hell, and very terse feature-set to have to learn.

1

u/lykwydchykyn Jan 13 '15

The best language to learn is one you can apply as quickly as possible.

I think Chris could probably find applications for Ruby, especially since he's a sysadmin guy (thinking Chef, e.g.).

I think Python would be a great choice too, because it's broadly applicable.

I think he'd struggle to find practical application for Go or Rust without a lot of additional learning.

I do Python coding primarily now, and have done PHP in the past; but the first language that really got me turned on to programming was called TADS. It's a language designed solely for writing text adventures (like Zork). It's useless apart from that; BUT, I was able to create something with it that motivated me to learn and improve. I learned the basics of desigining a program and working with an OOP language. It made moving on to more general purpose languages much easier.

Point being, you don't have to choose the end-all-be-all programming language as your first language; it's more important to choose one you can use for something quickly to keep you motivated.

1

u/funny_games Jan 13 '15

Just learn one that makes you excited to learn and do things with. I don't see any issues with Go out rust. Go is a little more mature at this stage I believe.

1

u/KODeKarnage Jan 14 '15

I am only part way through the episode, but I fully expected Python to be the default choice. I suspect social pressures played a part in the decision.

I am not a developer professionally, but I do write in python for data analysis and my hobby. When I talk to devs about it in casual conversation, well... the response is usually smug disdain. They get that look on their face. You know, that look that it used to be socially acceptable to wipe off with your knuckles. #nostalgia

From what I have seen, professionals tend to discount or dismiss people who program in Python. It's pathetic really. By the way, if you are a Developer and within 5 minutes of meeting a fellow coder they know the most obscure language you have ever written in... kill yourself.

I don't think they appreciate that I have nothing to prove to them. I avoid discussing the topic in the same way I avoid discussing music with a hipster and my workout with someone who lifts.

2

u/dominucco Jan 14 '15

Really? I've been finding just the opposite. A lot of the IT orgs I work are moving away form like old Java / Oracle or MS implementations and their developers are really pushing Python. I'm surprised you are seeing criticism for that choice. At FTT, we came a curly hair's length away from being a Python shop, rather than a Ruby shop due to customer requests.

1

u/KODeKarnage Jan 14 '15

I'm surprised you are seeing criticism for that choice.

That's the thing, it isn't criticism. It is an attitude.

Similar to how a hipster doesn't so much criticise your favourite movie being My Big Fat Greek Wedding, as spend the rest of the conversation talking to you as if you are hard of hearing or a 90yo woman or a 5yo child.

"No, Python is a fine scripting language, i mean, for something that needs an interpreter, you know, good for you for having a go."

1

u/[deleted] Jan 14 '15

[removed] — view removed comment

1

u/pinkpooj Jan 14 '15

[Mike] don't know shit about Python (i.e. shuns anything without C-style syntax)

Even though the comment right above you is him stating that he runs a Ruby shop.

1

u/KODeKarnage Jan 14 '15

What could that possibly mean?

Perhaps read beyond the first paragraph.

1

u/[deleted] Jan 16 '15

[removed] — view removed comment

1

u/KODeKarnage Jan 16 '15

Perhaps I did

Because literally everything else in the post was explaining what it meant.

1

u/[deleted] Jan 17 '15 edited Jan 17 '15

[removed] — view removed comment

1

u/KODeKarnage Jan 17 '15

Chris's life experience include time outside of the JB community, and I still think that the perception of python could be influenced by that. Python is often dismissed as a scripting language and perhaps he was a bit shy to use it based on previous dismissal of bash by dev's he has encountered before.

1

u/[deleted] Jan 14 '15

Real men chisel 1's and 0's into clay tablets.

It took me 15 years to write "hello world" this way, and thats the way it should be.

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++.

1

u/awzurn Jun 23 '15

Chris, any update as to how this is going? I'm sure we'd all love to hear if/when you started your journey!