The Software Purist |

Nov/09

25

“What Language Should I Start With?”

I get this question a lot from people who want to program and are just starting out.  This is a loaded question, and everyone has their own opinion.  Typical advice dictates that you should use whatever language you want, because it doesn’t matter.  I don’t and have never agreed with this advice.  Firstly, if you aren’t familiar with a language, how can you know what language is right for you?  Second, most likely you have some faint idea of what you might want to do.  Maybe, you want to design websites.  If so, choose a language suited for web development.  Maybe, you want to make a video game.  If so, choose a language that is commonly used for this purpose.  I absolutely advise sticking with the most commonly used and applicable languages for what you’re doing.  These are the languages you can put on a resume later and get a job based off of.  Discounting this benefit would be unfortunate.

If you enrolled in a degree program, you will be likely be given a language to start with in your introductory program.  To the best of my knowledge, most colleges will start you with Java or C++.  I think these are really bad choices for starting programming, but the benefit is that they’re extremely applicable.  Java and C++ are consistently two of the top 5 mostly commonly used programming languages.  Despite what you may have heard, this won’t be changing for a long time.

Overall, I suggest starting with a language that it’s easy to make quick progress in, so you learn the basics, but will see quick feedback as to what’s going on.  My favorite language for this is Python.  Python is a simple language, which has an amazing set of libraries for doing a vast amount of things.  The syntax is very minimalist; in fact, it uses indentation level to figure out scope.  For a beginner, this is ideal.  This will prevent you in getting too caught up with unnecessary details that may hinder your learning when you get started

There has been a lot of research to suggest that starting out with something too complex turns off a lot of potential developers.  Carnegie Mellon University started using a 3D programming language, called Alice, which provides the benefit of allowing quick results, and slowly easing you into the code aspects.  This is very useful, particularly, if you’re a visual type of person.  While Python isn’t necessarily graphical, it is very simplistic, which is very important.

If are a very visual type of person, you may have better success with a language such as Actionscript, using Flash.  However, note, the current version of Actionscript is Actionscript 3.  Despite the recent improvements, Actionscript 3 is still has a little way to go from a lot of other programming languages and is still a less than ideal programming environment.  I will try to shy you away from Actionscript, for now, because I think Actionscript can encourage some bad programming practices, if you’re not careful.  Furthermore, at the time of this writing Actionscript is ranked as the #21 on the Tiobe community index, while Python is ranked as #7.  You can take the index with a grain of salt, but nonetheless, this should give you some idea of the job availability that expertise in that particular language can provide.  Still, Actionscript can be fine a choice, just be aware that you should read from a variety of sources, so you understand best programming practices.

· · · · ·

3 comments

  • Randy · November 29, 2009 at 1:24 am

    Not bad recommendations. I think you could possibly add Visual Basic, Lua and Ruby to the list. Although, Lua is pretty minimal, it’s really simple and easy to read, which is helpful.

    Reply

  • GreaseMonkey · May 19, 2011 at 8:29 pm

    Argh, if only I’d spotted this on the net earlier.

    First thing I’d drop a nuke on is Visual Basic. NO. WAY. Steer clear of that.

    Lua is a fairly simple language, and it has absolutely no notion of a Goto, which is a start. It also has a fairly reasonable standard library, and you can actually do a lot with it (you can even learn about closures while you’re at it).

    Just be careful with Lua, because if you’re going to do, say, object oriented programming (OOP), you need to hack your way around the language. With that said, it’s still very powerful, so it’s a good choice for an embedded scripting language, but I advise you start with another language instead.

    Which leaves us with Ruby. Really nice to program with. The syntax is really weird, though… not in the sense of “what does this do”, but “where’s my syntax error” – when I was screwing with Eversion’s Ruby code, it took a while to actually get a syntax error.

    However, it’s still a very powerful language – there’s a LOT of standard library available at your fingertips. It’s just not particularly fast, that’s all (it’s slower than Python from what I gather).

    Not sure what languages I’d add to the table. C isn’t an easy language as a starting language (heck, I learnt x86-16 assembler before I learnt C). People have managed to survive learning Java, though… I don’t really know. Should I recommend assembler?

    Yes, I highly recommend Python, but I forbid that you read the “Learning Python the Hard Way” book, it’s TRULY HORRIBLE… use the official tutorial instead, it at least assumes you know how to add numbers together.

    As for ActionScript, I don’t know.

    There’s my rant.

    Reply

    • softwarepurist

      Author comment by softwarepurist · June 22, 2011 at 5:17 am

      Good points, GreaseMonkey. I generally agree. I think some people just starting out like Visual Basic, because the syntax may be a little closer to English. But, in general, VB had a terrible reputation for a long time and encouraged practices that were sometimes detrimental when you moved to other languages. It’s now, finally a real language rather than an inside joke. It’s basically C# with different syntax rules and slightly different language features. In any case, I absolutely would suggest C# .Net over VB .Net, since VB doesn’t have any real advantages that I can see at this point.

      I think you covered Lua and Ruby well. It’s the general downside of interpreted languages with a dynamic type system: errors that could be caught easily by the compiler may not appear until much later, so you need good tests to exercise all code paths. Code coverage is not as critical in a compiled language, but I think it’s almost essential when using an interpreted language with a dynamic type system.

      C is tricky to make an argument about: C is actually very simple to start out with, but, the devil is in the details. I would say see C looks deceptively simple, but there are a lot of gotchas, but, not nearly as many as there are with C++.

      Good discussion overall. Thanks!

      Reply

Leave a Reply

<<

>>

Theme Design by devolux.nh2.me