

Ask HN: What programming language to use? - JohnReel

Hi.<p>I create various web applications and am an old-school PHP programmer.  Usually I rapid-prototype these myself and then hand them off to other programmers to finish.<p>It's time to get up-to-speed with the way things are now and I'm looking for advice on what programming language to adopt and get skilled in.<p>Most of my future applications will be hosted, so I do not need to worry about end-server environments.<p>They need to be robust languages that they can easily scale as the things I create tend to get a lot of users fast.<p>I'm open to the end product being flash-based or html/js based.  The end answer may remain PHP.  Pros and cons are most welcome.  I suspect flash may be a greater learning curve, but I could be quite wrong.<p>It would be a great bonus if there are decent debuggging tools etc, and code libraries for the selected language.<p>Your suggestions are greatly appreciated, along with the reasoning behind them so that I can make an informed decision.<p>Thank you very much for your help.
John.
======
Hexayurt
Unless proven otherwise for a specific application, the answer is python.

In general, the reason is simple: python programmers tend not to worry too
much about the language, although there's a fair bit of fretfulness about the
folks trying to do functional stuff in Python, or people who want Python to be
LISP. But apart from those groups, pretty much everybody else just sits down
and writes their code, and generally pretty soon forgets they're writing in
any language in particular, they just sort of churn out code that pretty much
works as expected.

And that's really the point of Python. You stop noticing it after a while. It
doesn't reward extremely subtle cleverness (much) and it doesn't severely
punish stupidity, it just sort of does what you expect, and pretty soon
there's your working application, stable, maintainable and clean(ish.)

I can't give a language higher praise than "it doesn't get under foot, and
there are very few nasty surprises."

Python. Unless there's a specific reason to do something else.

PS: web frameworks in Python kind of suck because they're mostly a bit
abstract. You might well wind up bolting together something dirty for your own
needs.

------
MoeDrippins
The biggies have been mentioned. Ruby/Rails has a very fast time-to-market,
but suffers runtime performance issues. However, it might very well be "fast
enough" for what you want to do.

Python has a screaming gajillion well written and supported libraries, and the
language itself is very...orderly. That suits some people very well, and
others is an anathema.

A new one on the block is Scala and /Lift/. Probably not as mature as either
of the above, but runs on the JVM so you can stick it on Tomcat or any other
java web container, and as such you have a lot of hosting opportunities.

------
BlueSkies
I program in PHP and Perl (intermediate skill in both) and had to decide which
one to use recently for a new project I'm starting. I plan on using Amazon Web
Services including SimpleDB and SQS. This made my choice of language a little
easier.

Perl natively supports multiple threads whereas PHP does not. Multiple threads
can assist greatly in speeding overall access to SQS, etc.

I also prefer the structure that Perl provides. Coupled with the Catalyst
framework and lots of module availability on CPAN, I'm happy with my choice
for now.

Does anyone else have any feedback on my choice of Perl for its multi-threaded
capability for use with AWS - I'd appreciate a sanity check :)

~~~
kashif
Threads are evil at the application level - IMHO.

------
rcoder
I'm going to buck the general trend here, and recommend that your next
language _not_ be Perl, Python, or Ruby. If you really want to become a well-
balanced programmer, you should either learn a lower-level, compiled language
like C or Java, or you should stretch a bit and try Lisp/Scheme or Erlang.

Working only within the "scripting language" space of the typical LAMP stack
will limit your thinking in ways that could hurt you later on.

------
abstractbill
_I suspect flash may be a greater learning curve, but I could be quite wrong._

Flash actually doesn't have much of a learning curve - in particular,
actionscript doesn't have many ideas you won't have seen already if you know
javascript.

The trouble with flash development isn't that it's hard to learn, it's that
the environment and tools are incredibly ghetto and hard to integrate into a
sane tool-chain.

------
typedlambda
If you really want scalability take a look at Erlang though ErlyWeb
(erlyweb.org/) is not that mature, Yaws (yaws.hyber.org) really is. Ruby and
Ruby on Rails are really great for development i had never been that
productive. Rails seems to scalo quite ok wenn adding more servers and
rewriting som/lots of code. In an feature product I seed more safety and
scalebelity so I will implpmpnt it in Erlang

------
aitoehigie
I recommend Python, once you try it, you will never look back, and it has
decent web frameworks, libraries etc for whatever you want to do.

~~~
icky
Python will crush your crush your competitors, see them driven before you, and
hear the lamentation of their users!

------
matthewsimon
It's not as "hip" as Python or Ruby, but I remain a big fan of Perl for
server-side self-hosted web/database applications -- depending on what you're
building, you can often find pre-existing modules on CPAN that provide a lot
of the plumbing you'll need.

And of course, Perl's syntax is very similar to PHP, so the transition might
be a bit easier than to a Python, although your milage will vary.

Lastly, it's worth noting that the choice of server-side and client-side
technologies are mostly independent... You can use either HTML/JS or Flash as
the client interface to talk to server-side logic written in any of the
PHP/Perl/Python/etc. languages discussed above.

------
gexla
Forget about the academics (Lisp? SICP?.) You want to make a web app RIGHT NOW
and make some cash. If you are good with PHP then look no further. Start
working on your apps ASAP and update your PHP skills as you go. Take a look at
the Zend Framework and CodeIgniter for some good frameworks.

If you must learn a different language then learn them on the side (hobby)
while you are making your bread with the rest of your time using skills you
already have.

------
iamelgringo
Python and Ruby are pretty much the players when it comes to web apps these
days.

If you want to stick with a Microsoft Stack, you could try ASP.NET (shudder).

~~~
JohnReel
No interest in going with Microsoft. :-)

What are the pros and cons between Python and Ruby and how does Ruby on Rails
fit into it?

Thank you!

~~~
icey
You're kind of asking what's better between vi and emacs.

I would recommend spending some time checking out either Django
(<http://djangoproject.com/>) or Pylons (<http://pylonshq.com/>) on the Python
side and I think Rails is probably going to be the best place to start on the
Ruby side of the equation.

Any of those should be a good place to start, it's really a matter of personal
preference between the three at this point.

------
JohnReel
Thank you for your suggestions everyone.

I was expecting much different answers, so this is interesting. It sounds like
there probably isn't any real reason to not continue with PHP, which will be
quicker to get up to speed with current standards.

I'll do some more research on the options suggested though.

Thank you, John.

------
manny
C, Perl, bash.

Currently on my way to buy SICP so I can learn Scheme LISP.

edit: it may interest you to know that I do absolutely no web development.

~~~
kashif
Its available online - free and legit.

~~~
LogicHoleFlaw
I have the online PDF myself, but I still want a hard-bound copy. Sometimes I
just need to curl up with a book away from a screen.

~~~
rw
Print it out!

------
twism
languages don't scale, your architecture does.

~~~
kashif
I would bet you are primarily a Ruby user ;)

~~~
twism
javascript (Server side).

------
andrewbadera
C#/ASP.NET specialists are pretty well paid. Microsoft has a lot of
architectural pieces you can plug together for extremely scalable solutions.
Remoting servers for your application tier give you a TON of cheap scaling.
Clustered and federated SQL Servers give you a beefy backend when you
eventually need it. Decent amount of freelance/independent work here, if
you're patient and know where to look. Also Windows Mobile still stands a
fighting chance as a leading mobile platform, at least in the enterprise
world.

Java is kind of like .NET, only, at least in markets I'm familiar with, it's
fading. Sure, it can scale to no end, but it has a pretty high TCO. Unless
you're going into financial programming, I'd leave Java aside. Knowing C#
gives you an entree into Java should you ever need it.

Ruby, RoR is up and coming, but not, from what I've seen, highly well paid.

PHP is often underpaid, but has potential. Being pretty mature, there are a
lot of roles out there. It _can_ scale -- Yahoo! proves this -- but not
exactly out-of-the-box. Lots of freelance work available here.

Erlang has a lot of value, and I suspect will continue to grow in this world
of multi cores and multi processors. Concurrency is soon to be king.

Python is a good utility language, but unless you're a Python guru, you
probably aren't getting paid squat to know it.

It's always good to know C/C++. Heck, it's good to know Assembler _insert
platform here_ to boot. Excellent fundamentals, if not a lot of LOB work
around these days. C++ is good for mobile work. I bet Android increases the
amount of mobile work here as well.

Knowing Obj-C/Cocoa is growing in value as well. Even with low market
penetration, your potential audience is pretty upmarket. Room for high margins
here.

Lisp, Perl, eh, not bad to know, especially Lisp for fundamentals. For that
matter, Smalltalk has value as well. Smalltalk even has a web framework these
days ...

If you want to be highly employable, I'd suggest some combination of C#, Ruby,
PHP, Python.

