banner ad

Why every programmer should learn Python or Ruby

| June 25, 2013 | 0 Comments
0 Flares 0 Flares ×

From http://reliscore.com

If you are a student, you probably know C, C++ and Java. A few know VB, or C# / .NET. At some point you’ve probably built some web pages, so you know HTML, CSS and maybe JavaScript. By and large, it is difficult to find students who have any exposure to languages beyond this. And this is a shame because there are a number of programming languages out there which will make you a better programmer.

In this article, we give some reasons why you must learn Python or Ruby2.

  • Compared to C/C++/Java – Python/Ruby allow you to write the same program with much, much fewer lines of code. It is estimated that a typical Python or Ruby program will require 5 times fewer lines of code than a corresponding Java code. Why spend that much more time on writing programs unless it is absolutely necessary? Also, someone said that a good programmer can reasonably maintain 20000 lines of code. It does not matter whether those are in assembly, C, or Python/Ruby/PHP/Lisp. So, if you write in Python/Ruby, whatever you do alone would probably need a 5-person team in Java/C/C++.
  • Compared to VB/PHP – Python/Ruby are much, much better designed languages than PHP/VB. PHP and VB are very popular for writing websites, and desktop applications respectively. The reason they’re popular is that they are very easy to learn and even non-programmers can pick them up quickly. But write any large program in these languages and you’ll start seeing the huge problems with these languages because they’re so badly designed. Friends don’t let friends program in PHP/VB.
  • Compared to Lisp/Scala/Haskell/Closure/Erlang – Python/Ruby are still quite “mainstream”. Sure these languages have some really cool features, and for advanced programmers, exposure to these languages can really improve the way they think about programming. But there will be time later in your career to decide whether you want to pick up one or more of these. But for now, Python/Ruby do a much better job of balancing the power of the language against commercial applicability.
  • Compared to Perl1 – Both Python & Ruby owe a lot to Perl, and Perl was the biggest and best dynamic language before they started gaining prominence. But now, Perl’s popularity is reducing and more and more people are adopting Ruby/Python. I find Perl’s object-orientedness a bit contrived and ugly. In general, I think Perl is a harder language to learn since it has so many different ways of doing things, and the syntax tends to be cryptic and non-intuitive until you get the hang of it. Overall, I feel that Perl is not the best language for a student to pick up, unless there is a very good reason to do so (i.e. if you have lots of regular expression processing, then Perl shines)
  • Compared to sh/sed/awk/bash – If you have exposure to Linux/Unix, you have probably done some shell programming, and might even have written non-trivial programs. But anything more than a few lines in these languages starts to become a bit painful and it’s much better to do this in Python. Of course, Perl is the best language for this, but Python is a close second. (Ruby is not so great for system shell scripting).

Just do a Google search on ‘Why is X better than Y’ – where you put Python or Ruby for X and put one of the other languages for Y – and you will find a whole bunch of material on why these languages are so good.

If you have the flexibility to choose the programming language for you final year project, then pick Python or Ruby and get done in half the time that it would have required you to do the project (except if it is a mobile app development project, in which case you’ll be forced to use Java or Objective-C).

Download PDF
0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Reddit 0 StumbleUpon 0 0 Flares ×

Category: Python Editor

About the Author ()

My name is John Link.I am 26 years old. My major is Computer science and technology. I am a junior programmer with Python.

Leave a Reply

Your email address will not be published. Required fields are marked *

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Reddit 0 StumbleUpon 0 0 Flares ×