Live data from Hacker News

Ask HN: If I learn one programming language, what should it be?

news.ycombinator.com

1–10 of 48 posts

Ask HN: If I learn one programming language, what should it be?

#1
I want to dedicate a few months to learning a programming language (part time) in order to achieve the following two goals:

1) Be better prepared, as a founder, to understand engineers. 2) Add a "hard" skill I can use to earn money on the side (e.g., while bootstrapping).

To clarify, I'm not a founder yet, but that may change soon. I have very basic knowledge of programming: a semester of C++ (15 years ago) and some dabbling in AppleScript, shell scripts, and html/php/css.

Of course, I realize that I won't master anything with only a few months of study. Nevertheless, I'd like to do what I can to improve my chops in the time I have.

If you were in my shoes, what language would you invest in? Can you recommend any resources to help me learn it (e.g., books, online resources)?

I'd really appreciate advice from the HN community.

Re: Ask HN: If I learn one programming language, what should it be?

#4
First pick a platform, are you more interested in native mobile or something web based. I primarily work with PHP but I've also tried Ruby and Python. Either one could be my next. Truth be told, just make sure you keep asking "why" and understand the basics. After that, switching to a different language will be pretty easy and you'll mostly have to worry about learning the popular frameworks and libraries.

Re: Ask HN: If I learn one programming language, what should it be?

#10
Python 3.

It is fairly simple to learn. It is cross-platform. It is suitable for server-side programming. It has an extensive standard library and an active ecosystem for additional libraries. It has IPython. It uses, and therefore helps you learn, but does not force object-oriented programming. It has enough functional programming to let you explore that concept. It is widespread and easy to find support for. It has numerous tutorials taking a wide variety of approaches, you can easily find something that works for you. It has more active projects on GitHub than any language but JavaScript or Java (http://githut.info/).

Why not Python 2? Python 3 is better out of the box (comes with pip, has better standard libraries) and more consistent. As a new programmer, you won't need anything that's limited to Python 2.

Why not JavaScript? It's too strange. Most of what you learn in Python is fairly applicable across languages. JavaScript has a strange object model, doesn't distinguish int/float, has odd rules for scoping (var/no var, hoisting), has too many ways to do the same things (function / var f = function, new Object() / {} / Object.create), has a confusing concept of 'this'. Learning JavaScript will not help other mainstream languages click the way Python will.

Why not Ruby? Ruby and Python are, from a new programmers' perspective, completely equivalent, but Python seems to be winning the popularity contest, so you'll likely find more libraries, more tutorials, more help, etc. Ruby also tends to be more web-focused and thus less general-purpose (by the numbers, not by any technical limitation).

Why not C/C++? They are simply too low level for someone who isn't interested in programming full-time.

Why not Java? Java is improving but is historically bloated and incredibly verbose. You have deal with compilation and probably need an IDE. You absolutely must use object-oriented programming. Support for functional programming is either effectively non-existent or simply not as smooth depending on which version of Java you're using. Too much overhead (in terms of what you have to understand and deal with) for small, simple programs.

Why not Go or Rust? Too new to have thorough support. Uncertain future.

Why not Haskell / Clojure / Erlang / Factor / etc / etc / etc? Too esoteric for a new programmer.

Why not Objective-C or Swift? Too limited in scope.

Why not C#? Actually, if you're on Windows, this is a pretty good choice, but it's not fully cross-platform (yet) and doesn't have the variety of choices for server-side programming that Python does. It also doesn't have as extensive a set of open source libraries.

Post reply on HN