

Ask HN: If you were to learn a programming language for your first time - jordanbrown

which would you learn?
======
jaddison
Seriously, pick one with great online resources. That gives you a lot of
options at first glance, it would seem... Of course, online resources vary
greatly in terms of quality. Personally, I wish I'd started (years ago...)
with something like Python. Great resources, great community.

Great tutorials: <http://diveintopython.org/> (for the recent Python 3:
<http://diveintopython3.org/>)

What it all boils down to is finding a language that teaches you the
fundamentals well. Once you have those basic precepts and fundamentals, you
can transfer them quite easily to take on other languages.

And Python is also quite easy on beginners.

~~~
hga
Good point ... but what language with any degree of mind share _doesn't_ have
great on-line resources today? All the ones that I've used after the late '70s
are well covered as far as I can tell.

ADDED: about the only thing I've found that's subpar is x86-64 assembly, and I
assume that's because x86 is well covered, x86-64 is quite new and isn't a big
jump from it, and not all that many people are interested in it.

~~~
jordanbrown
I was thinkin that same thing, Im sure you can find good online resources for
any language.

------
holograham
There is a difference between learning a programming language in order to get
something done and learning about programming where you learn the basic
building blocks of programming.

Python, C#, and Java are easy programming languages to learn and build stuff
quickly in. Master C and you can pretty much breeze through the advanced
languages while having a good base in the inner workings of modern programming
languages.

------
jpd
Personally, I'd start with assembly (not necessarily x86 though, probably MIPS
or similar. The reasoning here should be obvious as it's almost as low-level
as you can get, everything else in computer science is based on the axioms
found at this level. For similar reasons, I think Number Systems would be an
excellent place to start learning mathematics (and possibly predicate calculus
in parallel).

~~~
kls
I would second you on this, but I would throw in ARM as a possible processor
to target there are a lot of devices to tinker with that have ARM processors.

My second recommendation would be LISP, it is pure and helps you understanding
structure very well.

If you are just diving in start with a procedural or functional language doing
so will make you a better OO programmer when you make that leap, but I always
think it is better to learn pure functional and then learn what OO brings to
the table.

Doing so will help you understand when to use which one for a particular task,
something that 90% (i made that percentage up) of programmers do not know how
to do. Example being we use OO languages for system, data and batch processing
and we use functional for UI an AI development. This is backwards and accounts
for a good portion of why development, these days, is so convoluted.

Finally, if you are just wanting to sling some code to make money then just
learn Java, no offense to the Java community intended, but if one does not
have the passion they should just learn the most popular language and start
building junk.

------
JFitzDela
I reckon I'll be different, here.

I'd say PHP (particularly if the new coder has interest in web programming).

It's syntactically easy-ish, freely available, very well documented and
supported, and sets the newbie up for easy freelance or professional work.

\- John

------
knipknap
Python thirded. Then, perhaps C# ("C++ without the headaches") - it has most
of the concepts and none of the really hard parts.

------
kanak
Scheme via How To Design Programs (www.htdp.org)

------
iterationx
C# or Java because they are easy on beginners.

~~~
nostrademons
C# and Java are easy on beginners?

I'd start with Python, Scheme or JavaScript. Python's syntax is closest to
English, the language is nice and consistent, there's an interactive
interpreter, and there're a lot of libraries for things you might want to do
out of the box. Scheme's syntax is weird but simple, there're very few core
concepts you have to learn, and it'll teach you core computer science better
than many of the other alternatives. JavaScript lets you do cool things right
away, the language is small, and there's an interpreter built into every web
browser. If you use FireBug you've even got a semi-decent debugger at your
fingertips.

~~~
hga
Agree with nostrademons: you want a reasonably simple and minimally regular
multi-paradigm language with an interpreter that is a good fit for a problem
domain you're interested in.

Based on the domain, you're unlikely to go wrong with any of the three
languages and ecosystems he's suggested (granted, to a great extent JavaScript
is a Scheme with an Algol family face).

C# and Java are not interpreted and have complicated syntax, pretty much see
things in an OO way---all in all their friction is high and there's a lot you
have to learn before you can really start doing things.

