
Ask HN: Okay okay, I'll learn to program...now what? - DarrenMills
Nearly a year of daily hn visits (spent reading the stories I understood) I've come to a realization: Knowing a programming language seriously reduces the barriers to entry for a tech startup.<p>So the big Q: Where do I start? Do you have any resources to break down my options (Languages for Dummies?) and help me decide what, and how, I'll go about this.<p>Background info: I've programmed in C, C++, and VB, but nothing more than what an entry level course would teach. I'm rather adept in CSS, but that doesn't really count.
======
d0m
Seriously, it doesn't really matter where you start. I don't want to be
pessimist, but you've got so many things to learn that the important here is
not where you start but the determination that you will put in to continue
working days after days.

That said, I suggest you start with something fun because it will motivate
you. Example of that might be a simple dynamic website (using php, python,
ruby, or whatever else you might like).. Also fun is creating a small game
(Using some excellent libraries for beginners).

You told us what you knew about programming, but you didn't tell what was your
strength in other fields in life. Again, I suggest you start coding something
related to other fields you're pretty good.

To give you a personal example, I first built a website about dragon ball
because that's what I liked when I was younger ;-) Also, I made some chat
robots because I pretty much liked IRC. That was my really first projects.
(Done with pure html and mIRCscripts! The real important thing is to start
somewhere.. once you create something, it motivates you to learn more and
more. For instance, I switched from mircscripts to C++, then learn a dozen of
languages for fun and now, I live from that :) However, it might never have
happened if it wasn't about those dragon ball web pages that I had so much fun
building.

~~~
wdewind
Ha! I started out building dragon ball websites too. geocities FTW

------
metamemetics
Python. Do not do the official guide. Do not read the documentation. Do
something that forces you to program examples of increasing difficulty.

In short, do this course:
[http://cs.northwestern.edu/~akuzma/classes/EECS110-s10/index...](http://cs.northwestern.edu/~akuzma/classes/EECS110-s10/index.htm)

All the labs and assignments are online. You get to make maze solvers,
generate fractals, implement Conway's Game of Life, lots of genuinely fun
stuff. Just work through it and tell yourself you are doing it for fun not for
work. You'll be done before you know it. Good luck!

~~~
augustflanagan
If you do start with Python I found Zed Shaw's Learn Python The Hard Way to be
incredibly helpful when I first started learning to code some months ago.

<http://learnpythonthehardway.org/>

~~~
metamemetics
I like the link I posted because it's an intro to Computer Science in addition
to Python. So in addition to introducing more and more complex Python, the
problems you have to solve are meant to symbolize actual areas of CS research
instead of text-based adventure game development.

And your code often gets to control graphical libraries to spice things up.

------
dpcan
Pick a project first, something that you would love to FINISH. Then research
the best language to use to reach that goal.

That being said, when I started, I made due with what I had. QBasic. Then a
borland C compiler. Then Java. And then I just started experimenting.

It didn't matter to me, I just loved to create things.

Bottom line... you have to love building a complicated puzzle and you have to
be able to drive yourself to finish a project.

This "okay okay" business basically says to me.... you're in trouble already.

~~~
danilocampos
Yes, yes, yes! This is exactly it. Reading through programming books and
tutorials gets really dull. You need a reason, a cause, a mission. Come up
with a project that excites you and learn around that. This makes the tough
slog worth it and drives you toward interesting challenges you might not
otherwise pick up.

------
mechanical_fish
You need to decide what you want to build, or at least what you want to build
first.

From CSS, an obvious way to go is Javascript or PHP, or better yet both.

If you think that you don't want to build a specific thing, but instead want a
birds-eye armchair view of the essence of what programming is about, don't
waste time; try SICP:

[http://groups.csail.mit.edu/mac/classes/6.001/abelson-
sussma...](http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-
lectures/)

But odds are that you'll quickly find that you don't actually want to be a
computer scientist. ;) You want to build something. So find an example of the
thing you want to build, learn what it was built with, then learn to program
that.

Bonus advice: Whenever you don't know what else to do, learn about Unix, find
a new feature of your text editor or version control system, or study regular
expressions.

~~~
jacoblyles
Someone told me to try SICP when I was first trying to learn how to program
and it was an incredibly frustrating and deflating experience.

The process goes something like this: Okay, SICP sounds good. They're using
LISP. How do I make a LISP program? The internet says SLIME is THE way to go
and I'd be an idiot to try any other development environment. Ok, I guess I'll
just install that... (3 weeks later)... okay that didn't work. Screw this, I'm
learning PHP.

~~~
aaronbrethorst
Dr. Scheme might have made things easier. Especially because SICP uses Scheme
and not Lisp.

That said, the first term of my freshman year of college used SICP as the
textbook. I banged my head against a wall for the first six weeks and had an
epiphany in week 7. It's the best feeling in the world when functional
programming finally makes sense.

~~~
jacoblyles
Everything is hard in Scheme/LISP world. As a first programming project for an
isolated person without collaborators or teachers, SICP is death. It will be
months before the autodidact can accomplish something that he can feel proud
of. Nothing will kill interest faster than beating your head against the wall
in isolation for months in your spare time without any tangible progress.

I believe people that say it's awesome and I look forward to tackling it
someday. But it is not a good way for a person to dip his first toe into
programming.

~~~
hga
I think it's worth trying for a couple of weeks. If it doesn't start to click,
then come back after a few years of imperative programming, at which time it
won't be as easy as you'd expect (or so it is reported) since you have to
learn the very different functional paradigm, but you'll appreciate it all the
more having accumulated plenty of scars from side effect caused bugs.

That said, if you have something you want to build starting with a project and
an appropriate language and ecosystem (including instructional material) is
very good. I myself started out in a high school punched card IBN 1130 FORTRAN
"IV" course, but soon started a project that really got me going.

I didn't try SICP until half a decade later; by then I was an experienced
imperative language programmer (mostly C by that point) and fairly experienced
in Maclisp and Lisp Machine Lisp. At which point it really made sense, both in
terms of being able to understand the material and why it was really
important.

------
timf
Pick one language to begin with and spend as much time possible trying out
beginner material, building small things of your own (no one has to use them),
and learning how to find information for yourself online.

I suggest Python, check out these resources:

<http://wiki.python.org/moin/BeginnersGuide/NonProgrammers>

------
dstein
I'll be "that guy" and say start with JavaScript/HTML5 plus a NoSQL database
system like CouchDB.

The reason is, this combination (like it or not) has a very good chance of
completely taking over a wide spectrum of applications within a couple years
(web, mobile, tablet, server, and desktop). Java and especially Ruby might be
trendy now, but I am starting to believe the days of mega-sized application
layers are numbered. JavaScript + HTML5 + touchscreen stuff on the iPad is
already hot, and not to mention really fun to play with and learn.

------
boyter
Python. Its easy to learn, powerful, mature, has lots of people willing to
help you and has bindings to almost anything you can think of.

------
user24
Lots of great advice here. It's refreshing to see that, largely, people aren't
just pushing their own language of choice, but are saying (quite rightly) that
it doesn't matter. Like dpcan, I started on basic, then qbasic and moved up
from there.

You asked about breaking down the options. Something which I've only fairly
recently realised, is that languages differ in more ways than just syntax and
built-in modules.

As I see it, the three main 'types' of language are:

    
    
      Object Oriented ("OO"/"OOP")
    
      Functional
    
      Procedural
    

OO languages are usually built on top of procedural, and procedural languages
are by far the most widespread.

Functional languages are based on a more mathematical model, and if you've
studied maths they'll probably make a lot of sense to you. They're still seen
as largely academic languages, but they are used in some real-world scenarios,
and they have devout followers. It's a powerful paradigm.

Object-Oriented purports to allow you to model the real world more closely,
but the degree of success is debatable. Personally it's my favoured approach;
to me you can lay out your model really simply with an OO approach, which in
turn lends itself well to separation of concerns, reusability and
modularisation (i.e. you don't want to build your login system and have that
also handle thumbnail uploads, they're different concerns, they should be
handled in different parts of your code)

Procedural, to me, is really a necessary evil en route to OO.

So, yeah, I thought a broader view of language types might help, rather than a
specific view of particular languages.

~~~
msg
I think of those as more like programming styles. You can program C in a
functional style (although the language is not your friend). You can write
FORTRAN in any language.

I found personally that event-driven programming (signals, triggers,
listeners) is different enough to be considered another style.
Synchronization, causal sequences of events, and a clock, used for GUIs or
workflows, requires a different sort of thinking than functional, procedural,
or OO.

~~~
user24
I knew I'd miss one ;)

------
photon_off
The amazing and terrible thing about programming is that you can learn enough
about it without physical contact with another human being. I suspect that
content about programming on the web shows a huge bias towards being
technology based -- if you considered all the possible topics and ideas in the
world and their popularity, the ratio of popularity-on-the-internet to
popularity-IRL is probably highest with technology and programming. Well,
you'd have to exclude porn and other taboo topics for which the anonymity
aspect of the internet, rather than information sharing aspect, causes their
ratio to explode.

That was a bit of a tangent. My original thought was that there are several
thousand lifetimes worth of programming knowledge online, and it's getting
more and more organized by the minute. Google and StackOverflow will be your
best friends. It may take you some time to learn how to ask the question, but
beyond that you should be able to find solutions to any problem that you run
up against.

With this in mind, it's important that you actively apply that knowledge.
Learning is one thing, doing is quite another. I've often times postulated to
myself that there's probably some optimal ratio of studying vs. doing, in all
things. Then, I realize there's more to it than that -- there's the context
switching. If you spend 5 years learning, then 5 years doing, you'll never
learn as much as if you spend 1 day learning and 1 day doing for 10 years
straight. Learning and doing feed off of each other.

So, learn and do. Find something you really want to work on, and try to build
it. When you run up against a wall, which you most definitely will, it's time
to learn. Once you're ready to give it a shot, do it. When things start
getting too complicated, you're probably doing it wrong. Start over, make
things "cleaner" (this becomes a 6th sense after awhile), and you'll find
yourself naturally creating patterns that you become comfortable with. Like
any other skill, it's really a pleasure to see your abilities progress.

Have fun.

------
kunley
The best you can do is to Teach Yourself Programming in Ten Years..

<http://norvig.com/21-days.html>

PS. I'm not sarcastic. Actually, the article contains the best advices for a
programmer I ever read. Maybe you just don't have to rush things..

------
lwhalen
www.tryruby.org

    
    
      Also, google "Learning Python the Hard Way" for an equally-excellent Python intro.

------
saundby
Each language tends to have particular problems it's most used to solve. They
may not even be what the language is most suited for. Figure out what sort of
programs you want to write, then search on that to see what others use.
There'll be overlap, so look at the resources, figure out which seem to make
the most sense to you, then pick the language that matches.

At first, your choice of language isn't all that critical so long as you start
out with some resources you've turned up that'll let you get some of those
first projects completed. Then you'll be good enough at formulating ideas then
implementing them to make a more informed choice. Either you'll be comfortable
enough with your chosen language's idiom to solve problems even if they don't
necessarily align with the language's strengths, or you'll have a better basis
to pick a new language that addresses your problems with the first language.
After some initial discomfort, if you've picked well the new language will
start to feel handy and expressive in a short while.

Any of the major languages can be taken on by the new programmer, I usually
recommend one of Ruby, Python, JavaScript, Java, or Groovy. The resources for
beginners are good, the user communities are supportive, and they're all
expressive enough to create powerful programs.

There are lots of other good languages--no knocks on them--these are just my
favorites presently. I teach programming to non-programmers, BTW.

Once you pick a language, come back and ask for resources for that language.
;)

------
iterationx
You want to do the minimum work to accomplish your goal (life is short), not
learn a programming language for pedantic purposes. I'm using OfBiz, a Java
web framework, right now, and its suitable for my purposes, but I don't know
what your objectives are. You may be interested in Ruby, Django, Tapestry or
ASP.

------
DarrenMills
Thanks for so many replies! I'm going to spend the next few hours dissecting
all of this information and then dive into research.

The take away message I got from seemingly everyone was to first decide WHAT I
want to build, then find the best language. Teach myself using fun,
interesting examples, and keep plugging away no matter the difficulty. Also, I
should take full advantage of the wealth of information that can be found
online. Lastly, since I'm already in the web-design field (for the one person
that asked I own my own small web/graphic design firm), I might wanna stick
with PHP or Java (or Python / Ruby).

Again, thank you.

~~~
msg
If you're used to web stuff, you can go pretty far by really learning
HTML/CSS/Javascript in a deep way, then adding in an extension library like
jQuery.

You can program cool, fun programs in the browser with Processing.js, a
simple, cool graphics drawing language. Check out the exhibitions and learning
stuff.

<http://processingjs.org/>

------
dillydally
If you're doing web work you need to do two things:

1\. Buy a Linux or Mac computer, because all the standard parts work quickly
and simply on those platforms and are difficult to run on Windows. That, or
have a remote computer where you do your dev work.

2\. Learn Ruby or Python. It doesn't matter which. People on HN seem to love
Python, but there's no substantial difference if you're using them to build
web applications.

~~~
dingle_thunk
Why buy a new machine? <http://www.microsoft.com/web/webmatrix/>
<http://virtualbox.org>

------
EliRivers
I can't help but think that if you don't know where to start (different from
having too many places to start), you don't need to. If you need it, there
should be something obvious - some programme that really needs to be written,
and simply must run on such-and-such a system, and that will inform you on
what to learn.

------
techiferous
If you're looking to do a web startup, ditch your Windows computer. Get a Mac
or a Linux machine.

~~~
metamemetics
You should give him reasons why.

Personally I find Win7 has a far superior interface to OSX and out-of-box
linux distros if you like using your keyboard and a minimal\no-shortcut
desktop. The taskbar looks great left-aligned which, ideal for widescreen
monitors. To open any program all you have to do is press the Windows key on
your keyboard and type 2 or 3 letters for an autocomplete to find it, then
press enter. No menus or shortcuts necessary. The only downside is installing
CygWin for BASH, but I'd rather do that than install WINE for Adobe.

~~~
kranner
OS X has the Spotlight which people use in the same way: one hot-key, two
letters to find your app by name, and enter.

------
samratjp
Google's python class actually would be right for you. You can go as slow or
as fast you'd like. <http://code.google.com/edu/languages/google-python-
class/>

------
gord
You know CSS, so it seems logical to learn Javascript.

That opens up both server and front end web programming [jQuery/DOM and
Node.js on the backend]

For books, try Crockfords 'Javascript the Good Parts' and mimic some of the
nicer idioms as you see more jQuery code.

~~~
jessor
I found "JQuery For Absolute Beginners" to be quite helpful for getting
familiar with JQuery: [http://net.tutsplus.com/articles/web-roundups/jquery-
for-abs...](http://net.tutsplus.com/articles/web-roundups/jquery-for-absolute-
beginners-video-series/)

~~~
desigooner
I'll second that. NetTuts has a nice video series on jQuery that is pretty
lucid to understand.

------
fdschoeneman
www.railstutorial.org

------
noverloop
I'd advise java as a first language, this language really forces you to grasp
the concept of object-oriented programming. python and ruby make it to easy to
ignore objects, while objects are a concept that once grasped is going to make
programming in any language a lot easier.

The thing about programming is that it's a creative process where you apply
ideas in order to create a solution, the more clearly you understand these
ideas the better you will be at programming(which is just writing down a
solution so that a compiler can understand it).

