

Young web dev asking what language to learn? - joshuahornby

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?
======
facorreia
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
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.

~~~
facorreia
For an absolute beginner, I think a more integrated solution might provide a
less frustrating learning curve. Selecting, learning and integrating a full
web stack is no trivial task.

~~~
allardschip
The larger frameworks might have a better out of the box experience because of
the 101 videos and tutorials. Smaller frameworks do have some getting started
material as well. I find you are also learning a lot about how to do it the
framework's way (HTML helpers, ORMs) while not really learning the underlying
technology (HTML, SQL). That's going to hinder you.

------
smoyer
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
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]

~~~
smoyer
Whoa! ... The Applet is definitely dead, but I included that in my list of
languages for the back-end server (and in Fortune 500 environments). It may
not be considered cool, but there are still a lot of companies using it.

~~~
facorreia
You're right, and "a lot" is an understatement... there is a whole lot more
than a lot.

------
j21
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
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.

~~~
computerslol
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.

~~~
computerslol
The best advice I can give you is this: if you can't build it, you can't
understand it. If you can't understand it, you can't rely on it. If you can't
rely on it, it has no place in your application.

In my experience, this is the most common separating factor between code
monkeys and great engineers.

Learn to make your own everything. Even if you USE the third party one, know
how it works through experience. Anything less, and you are a technician.

------
anthonycerra
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
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
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?

~~~
facorreia
The obligatory first project is the To Do app. :)

And I second this advice, you are starting, so try and learn a single language
that can enable you to develop a working application; that will lead you to
the other parts of the stack (wich would include, among others, HTML, CSS,
JavaScript, JSON objects, a server-side language, SQL and a lot of such crap
that only nerds like us can really love).

~~~
joshuahornby
Please forgive me here, but how would I start an app. A website I can do but
starting a app and I'm lost!!

~~~
bartonfink
So, a standard functionality for web applications is commonly referred to as
CRUD. Many applications exist solely to let users Create records, Retrieve and
Update existing records or Delete records. It's a very common pattern that,
while it isn't very interesting in and of itself, will give you exposure to
all the parts of a web application without bogging you down in questions of
functionality (what does it mean for all the associated foo's if a bar record
has its created date deleted?).

To do this, you'll need some mechanism to store records (usually a database of
some sort, but flat files can work), some sort of server process to handle
user requests (this is where a framework like Rails and possibly a server to
contain this process come into the picture) and a web interface where users
can actually input data into your system. If you hear the term "full stack"
before, it roughly means this picture (and note that this doesn't really
correspond to MVC if you've heard of that).

The canonical example in academia is to do a course scheduling app: students
enroll in college and register for classes. Other typical options are the
aforementioned to-do application or inventory for a store. Really, this is
just window-dressing though - if I were you, I'd think it's a fine goal to
have a good understanding of everything that happens from the moment a user
first sees the interface to your app until the moment the database is done
storing their changes.

And, if you really want a language recommendation, I'd go with either Ruby
using Rails or Java using Play.

------
debacle
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.

