Ask HN: What web based language should we learn nowadays?

6 points by user48 ↗ HN
Hey, I am currently studying applied computer science (B.Sc.). Before this I've done a school job training which was in a very similiar field, but broader and obviously not as deep. During my job training and also now at university we're getting taught about web programming. Both times with PHP as the server side scripting language. Now, the other day I've got an invite from koding.com (I've signed up for their beta when it was posted on HN a while ago) and in the feed for latest messages I found a commenter saying that PHP is old and should be abandoned.

I will have to get deeper into PHP now anyway, as I obviously want to pass the semester with a good grade, but:

Should PHP actually be replaced entirely? Also, which language would be useful to learn for the future?

15 comments

[ 3.4 ms ] story [ 46.9 ms ] thread
The four big web languages off the top of my head today would be: php, ruby, python, and javascript. You still see java in parts, or other jvm-based languages such as scala.

Personally I wouldn't worry much about which language you should learn. A lot of skill in programming and development is being able to conceptualize abstract problems, and learn new things on the go. I actually promote learning languages like haskell because, although you'll rarely use it professionally, it gets you thinking about things in different ways and, in turn, makes you a better programmer.

Just learn what you want for now (php?), and when you need or want to expand in the future, do so :).

I'd go with you. Just go with PHP for now, and once you feel you've got a good grasp of it, go in for Ruby or Python, as well as Javascript and a functional language like Haskell - Clojure's a great bet too.
Php is still used and developed. Perl is still used and actively developed (both 5, which is the stable version with backports occasionally, and 6 which is a complete rewrite, but still very much in development).

You can get a job as a php coder. Plenty of companies use it.

People like to give their first languages love, and lots of people learned to program in something like ruby or python, so they keep programming in them. But that doesn't mean that older languages or legacy code go away.

That doesn't mean you should stop learning. Learning more than one language or framework can help you become a better programmer. But don't let people tell you php is over.

There are languages that are pretty much gone, except for legacy code. Practically nobody learns pascal anymore, from what I can tell.

Php, however has held up surprisingly well, compared to a lot of languages/frameworks. You might try picking up another language, like java script.

Besides PHP, I would go for Python. Many startups ask for Python coders, so that would be handy. As for PHP: many big websites still use it (FB) and PHP is still being developed. And some say that PHP is made fun again because of the framework Laravel.
I started with PHP and ran with it for several years. It was my entry language for web development. Currently I'm using Ruby almost exclusively. Each has their strengths, but after spending a lot of time in Ruby, it's difficult to enjoy writing code in PHP. Ruby was deigned with developer happiness in mind, after all.

For me, the most interesting thing about programming are language agnostic principles and design. Learning the fundamentals will translate to any language.

Javascript! It's the future. Learn basic client side JS and then move onto node or vice versa.
Seconded. Have you seen the freelance rates?
I think I should add that it's not just about the language, it's also about the architecture. You need to know what's going on and where, and why.
I think Python would be a very good choice. With it you will be able to do a lot more than programming web applications. For example, it has excellent libraries for scientific work. At the same time, it is very good for creating web applications (although probably not so much for real time web-applications, but I doubt Php is very good for that either). It has many very good web frameworks. I have used web2py, which makes it easy to create websites, and equally important, to deploy websites on various PAAS platforms.
There is only one web-based language and that is Javascript. With node.js and Rhino, it can now also be used on the server side.

So if you really want to learn a web-based language Javascript is the one. If you decide to go for Python or Ruby (good choices) or even PHP or PERL (bad choices) you still can't escape from learning and using Javascript.

Personally, I think that you should pick Python or Ruby, whichever seems to suit you, since both are solid languages that are widely used to build web apps and lots of other stuff. PHP and PERL are yesterday's languages and are fading away slowly but surely.

PHP is yesterday's language? hardly
well, I won't get around PHP as I have to use it for university. It seems you're having the same opinion as the person that brought me to ask this question. He said PHP was a dinosaur that we should get rid off.

According to most replies on here it rather seems that it's very useful and recommended to still know that language as it's still widely used.

I will, however, take a look into JavaScript (already started with codecademy) and later on at the other suggested languages.

Rhino is so far the only one I haven't previously heard about.

Thanks for your replies.

Please disregard the comments about Perl made by the person you replied to. He knows very little about it. Perl is still a very strong language that has not been overtaken by Python or Ruby in the job market: http://www.indeed.com/jobtrends?q=perl%2C+python%2C+ruby%2C+...

If you do look into Perl, start on this site: http://perl-tutorial.org It will show you the most up-to-date learning resources for Perl.

About PHP, give this blog post a read: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de... It makes the point that while you can develop and deploy very quickly with PHP, you will make trade-offs and will have to sacrifice consistency and predictability.

Lastly, as a general advice: Look at all the languages, figure out which ones are fun for you and learn those. I say those because you will need to learn more than one. :)

thanks for the links. I will definitely take a look at several languages and learn more of them over time.
You aren't aware of the proper way to write the name Perl, which strongly suggests you know very little about the language.

As such, i would like to ask you to hold off on commenting on it until you've actually acquired a measure of intimacy.

Also, you might want to watch this: http://youtu.be/oZ5xTI1QRTA