Hacker News new | ask | show | jobs
by G650 4137 days ago
Short and to the point. Good stuff. Hey guys, in your opinion, what language should I learn first? I am new to this and I will be going to codecademy and other sites. What is the most useful language for web apps and such. For example, what if I wanted to build useful things like my own product hunt.
5 comments

My son has been working with Code Academy recently. I've only briefly looked at it so hopefully someone else will correct me if I'm wrong.

A lot of what they have available is web based - e.g. learning javascript, html, php, css, etc.

IMHO you would be better off starting with python (or maybe ruby), which is also available at Code Academy. Learn to make simple programs on the command line before you jump into higher level languages and combining them with mark up. And, really, python is pretty high level as well so the learning curve shouldn't be too steep.

I started with Visual Basic many years ago and in hindsight I didn't really "get" programming by learning VB. I did some great stuff with it but until I learned some C and Perl I really didn't understand much about what goes on at the OS level. Once I learned to do things "the hard way" doing things with VB, javascript and combining Perl and HTML made a lot more sense to me and made it easier to step back and debug when things went wrong.

If your objective is to build web apps, you won't get anywhere without knowing at least some Javascript. If you want to go server-side, I'd suggest Go.

That said: If you want to learn programming, just do it. Doesn't really matter what you choose now, at some point you'll think "Language X would come in handy now, I wish I'd learnt that instead". Resist the temptation to switch to something else, and stick with your choice for long enough that you can look at non-trivial projects and can sketch the implementation in your head and identity trouble spots. If you keep jumping between languages, you'll waste a ton of time learning syntax that could've been spent learning more about programming as a practice. Anyway, as you get more experienced, picking up new languages becomes easy (provided they're moderately similar to _something_ you already know) so there's not much pressure to do it right away.

Pick one of PHP / Python / Ruby for the web.

With ruby, use rails. With python, use django. With PHP, be wary! (but it's incredibly widespread, so it should still be included here).

Learn javascript as well, as you can't avoid it entirely.

Use codecademy for the bare essentials, explanation, and then jump to framework-specific tutorials. Build your knowledge from there by building new sites or new features on your existing site.

If you want me to narrow it down and choose for you, here's basically your whole stack: Python, Django, Heroku deployment, Postgresql, jQuery, (HTML/CSS obv).

A year or two of full-time, focused work at this and you're more qualified than plenty of already-employed developers.

> With ruby, use rails.

I'd suggest Sinatra instead, and find some smaller ORM to go with it. There's _way_ too much magic going on in Rails to make for a good place to start.

When I was looking at the Ruby/RoR path, I started with Rails, took a step back to learn Ruby, then went back to Rails. At that point I decided to play with Sinatra a bit because I was getting overwhelmed with the Rails learning curve.

Sinatra was cool to get something out quickly for sure. I'm definitely glad I ventured out of the Rails sandbox a bit. That said, the quantity and quality of Rails resources on the web far exceeds that of Sinatra. For a beginner that is likely to encounter a ton of errors and bugs, there are simply more answers online for Rails than Sinatra. That can make the difference between giving up and keeping the excitement going which is crucial for a beginner.

If you find, like I did, that certain concepts are interesting, you will start to naturally peel back the layers of Rails magic on your own to learn what is going on under the hood.

Beyond that, Mike Hartl's Rails Tutorial is something I'd recommend to anyone learning to program as it seems to give solid coverage on ideas that are framework agnostic. Things like version control/Git/Github, writing unit tests and TDD, DRY, REST architecture, proper handling of authentication, etc.

There are so many different rabbit holes to go down, but I'm glad I did, because while I'm not deep on any of these areas yet, it has definitely given me a more complete picture of my projects, how to approach them, things to watch out for, etc.

So would you recommend Ruby over Python? That's the feel I am getting from your post. If so, why (besides the obvious resources you mentioned that are available for a noob like me)? Thanks so much by the way! Really excited.
I'm not knowledgeable enough to be able to recommend one language over another for specific reasons. That said, from what I've gathered on reading more informed opinions on the matter, it is largely just that--opinion.

Many people prefer one language over another. Both core languages, Ruby and Python, have excellent documentation and resources online as well as strong communities around them.

My comment was speaking more specifically to the case of Sinatra vs. RoR. I feel like RoR simply has many more high-quality resources available on it than Sinatra does. This is likely due to how much more development occurs in RoR vs. Sinatra (pure speculation there).

Perhaps, but then we delve down the rabbit hole, and at some point you might as well make your own sql queries, right?

I recommend rails mostly because of the incredible number of helpful resources. Also because you can use it as a beginner, ignore the magic while you don't understand it, and later try to understand it.

I committed rails code my first day on a new job with no prior ruby/rails experience, though I had used Django before. Pretty green there, as well.

> I committed rails code my first day on a new job with no prior ruby/rails experience, though I had used Django before. Pretty green there, as well.

But you had _some_ programming experience, is what I'm getting at.

My problem with rails for a complete beginner is that you end up with too many rails-y things to learn, and you can't focus on the basics.

thank you so much for your advice. I am going to start today so I really needed this. Looks like people agree phython and ruby are great places to start. I'm going to go with one of these.
Whatever you pick, pick just one and learn it well for a while before learning another. Don't fall into the trap of continuously changing technologies.
excellent. thank you.
Probably JavaScript at first if you're web app focused. Then either expand to NodeJS or learn another language for the back end like Ruby, Python, Java (which is not JavaScript), C#, PHP etc. One you learn a language or two, picking up more becomes exponentially easier as the majority of the concepts transfer.