top | item 4097585

Young web dev asking what language to learn?

7 points| joshuahornby | 13 years ago

Over my summer break from uni I want to go away and learn a language which will further my skills as a web dev. What's the best to learn? JavaScript, Ruby, PHP? Any good books or sites which will help me learn one of the above. Is there something else I should be thinking about?

22 comments

order
[+] facorreia|13 years ago|reply
I'll try to help you giving you my point of view. It's a polemic subject I hope it doesn't start a flame war.

JavaScript is a very important language for web development. You can build web apps using it exclusivelly (called single-page applications) or running on a web server (with Node.js). I wouldn't advise any of these approaches to someone just learning web development, though. Single-page applications will required understanding and possibly implementing server APIs, and Node.js is a bit too new for beginners, or at least that's my perception.

Ruby (with Rails) is possibly one of the most popular choices nowadays for web development. I think the Ruby language itself is probably harder to fully grasp than others. But there's a lot of learning resources, just look for Rails books, tutorials and videos.

PHP is a very practical language, to extremes. It's newby-friendly and has been very popular. I have reservations about it because I think beginners are attracted to it and they don't know enough about pitfals (like, for instance, global variables) and end up creating code that can be very hard to understand, debug, maintain, not to speak keep safe against exploits.

Another popular option that's missing from your list is Python. It is a very good language, relatively simple to learn with less mystery than JavaScript or Ruby, for instance, and that promotes better code quality than PHP. Frameworks such as Django, web2py and Turbogears provide good foundations for web development (each in its own style). Django, for instance, has a great tutorial. And there are tons of learning resources about Python, such as http://learnpythonthehardway.org/

So my advice, is, either learn enough Ruby to start playing with Rails, or try Python, possibly with Django.

Myself, I'm currently very happy with C# over the Microsoft ASP.NET MVC stack.

Good luck and feel free to ask any further questions.

[+] allardschip|13 years ago|reply
If you decide to go with Python, consider a micro framework like bottle.py or Flask. There is less to learn to get productive. If you do anything non-trivial you will end up using a database. MySQL, PostgreSQL are most used. You may want to look in to a noSQL database like MongoDB. I find working with MongoDB very productive, especially when you are figuring / learning things on the go.

Recommended by others in this thread as well but try Coffeescript to write your Javascript and use JQuery for code that works in different browsers.

[+] smoyer|13 years ago|reply
Wow ... there are so many possible answers but I would definitely start with Javascript. Don't learn the whole language, just the "Good Parts". And that would be my first book recommendation - "Javascript: The Good Parts".

With that foundation, you could learn Coffeescript, NodeJS, JQuery, etc. Since you're talking about server side software, Javascript combined with NodeJS will give you both client-side (browser) and server-side capabilities.

You should take a look at the industries you want to join when you graduate to decide what back-end language you should learn. If you're working in a Fortune 500 company you're going to see lots of Java/J2EE. RoR is highly touted but not as wide-spread as you might guess. PHP and Perl are still widely used and there are popular Python frameworks as well.

Have a fun summer and good luck!

[+] andrejewski|13 years ago|reply
I agree. As it stands now it would make the most sense to learn JavaScript, then I would learn jQuery if I were you, then move into sockets and node.js. You could then use this one language for the frontend and server-side.

Don't learn Java. The applet is dead. [Java Hate]

[+] j21|13 years ago|reply
Whatever language you choose, I think you need to at least be able to work a little with javascript, since it's ubiquitous on the web.

As for myself, I picked Java and GWT for a first app since I'm familiar with Java. Going this route exposed me to the full stack of web development(front/back, server admin, security, databases, etc.) rather than staying confined to a language specific tutorial. In the process I found I needed to use javascript quite a bit (using Facebook APIs, integrating with Mixpanel for analytics, etc.) Now I'm looking to learn more javascript, as well as a sexier web language like python or ruby haha.

Anyway, the front-end of a web application will be HTML, CSS and javascript; the backend is what will have the other languages like php, ruby, etc.

[+] computerslol|13 years ago|reply
Don't just learn; master.

HTML, Javascript, and CSS are a given. You have to learn them. To be good, you have to know them like the back of your hand. You need to know how far you can take them before they break, which means you need to break them. Over and over again.

Next choose a backend platform. This is where the magic starts happening. You can choose any of the popular platforms; it doesn't matter as much as you might think. You won't be able to make the magic until you MASTER your backend language. Take it over the limit. Break it. Over and over.

There will be a steep learning curve. There will be times where you hate it. You will get confused. You will get in over your head. Don't worry, you have to. All of the people you admire have been in over their heads. Being in over your head is your job.

Expectations grow steadily and the quality of our tools do not. The people that make it in this industry are the ones that can figure out how to create better experiences using our relatively over-complex and wonky tools.

When you run out of ways to break your platform, try getting closer to the metal.

[+] coreygoodie|13 years ago|reply
"Getting in over your head" is brilliant advice. I've spent the past six months working on developing my programming abilities. A few weeks in, I spent a few hours on learning basic recursive functions. It was frustrating to work through, but after a while it just clicked. Yeah, it's a simple concept to me now, but at the time it was really difficult. Keep working at it, and work even harder when you hit something you don't know (you will).
[+] computerslol|13 years ago|reply
I work in C#. Sometimes through asp.net, sometimes through sockets, sometimes through WCF, sometimes in client applications, sometimes in windows services. If you're cool with sticking to windows, c# is great.

I hear Java devs are making the most right now.

[+] anthonycerra|13 years ago|reply
I'm still a student myself and won't pretend to know which is best, but I can share the resources I've been using.

There are two great interactive courses on Udacity.com that will be helpful if you choose Python. The first course teaches you how to build a basic search engine while learning the Python language. Sergey Brin even makes an appearance. The second course is on how to create a web app using Python taught by a co-founder of Reddit (Steve Huffman). Both are totally free and incredibly high quality.

Codecademy.com will teach you Javascript for free. The Javascript tutorial is really great, but the jQuery tutorial has mixed reviews.

Finally, the de facto place to learn Ruby on Rails is railstutorial.org. The content is freely available as HTML, but the PDFs and screencasts are well worth the money.

Good luck!

[+] bartonfink|13 years ago|reply
I think you'd do well to pick just one, learn it and then build an app or two that exposes you to the whole stack - from HTML to SQL. Web development is a big world, and the language used on the server is only a very small part of the whole picture.
[+] joshuahornby|13 years ago|reply
This is what I would love to do, learn a language while making something useful, sounds like a daft question but can anyone suggest a app to build and maybe where to start? Rest I can pick up. Again comes to the question what language do I build my web app in?
[+] debacle|13 years ago|reply
Learn JavaScript. It's the hottest language for the web right now, and you need it to do anything client side.

Learn PHP. It's the most ubiquitous language on the web, and you will never have trouble finding a library or OSS app that does what you need.

I'm not really sure about Ruby. It's a good language but it doesn't have the traction that it used to (outside of HN of course), and it has a weak reputation.

It never hurts to learn more languages. Learning a language will make you a better programmer in every other language you already know.