
How I learned to program - ingve
http://danluu.com/learning-to-program/
======
gravypod
> The other thing I encountered for the first time at IBM was version control
> (CVS, unfortunately). Looking back, I find it a bit surprising that not only
> did I never use version control in any of my classes, but I’d never met any
> other students who were using version control. My IBM internship was between
> undergrad and grad school, so I managed to get a B.S. degree without ever
> using or seeing anyone use version control.

I love this bit. This is extremely true even today. Most students at my
university, and all of my university's classes, do not use or understand the
benefits of a VCS systems. This is crazy on a different level. I hate to say
this but it is in fact 2016 and it should not be a question that git or
something should be used on every project no matter how small.

~~~
ng12
I disagree, except maybe in a class specifically focused on real-world
software engineering. Teaching somebody to use git takes an afternoon,
teaching somebody to understand programming and computation takes years.

~~~
gravypod
Git is not a skill, it is a habit. Anyone in computer science should have
developed this habit.

This is for many reasons. Version control is not only about controlling
versions.

    
    
      - It's not about saving files, it's about understanding group work flows. Every text project should be in a git repo. If it's code or not it doesn't matter. You can see what things were written for, who wrote them, and even more.
      - It's a method to catch cheating. If someone submits one commit called "Working" or something and has no history of the code/project it's likely they are cheating.
      - It's decentralized backups and and offline workflow (for git)
      - It's a method to collect and aggregate work. Setup a gitlabs/gitbucket for the class and make every student keep their projects up there. The teacher has a centralized and nice looking place to find the code and it doesn't make the students zip up or require them to do anything. Their work is shared by nature.
      - It exposes you to what you are going to be using every day for the rest of your life as a CS major.

~~~
ng12
It's not a question of how useful VCS is. It's a question about what the role
of universities is.

In the US/Canada college degrees are generally not directly training you for a
career -- that's what internships are for. My position is that this is the
right approach. I will have a lifetime to perfect my git skills, but I only
had four years to learn about programming language semantics from a recognized
expert in the field.

~~~
wolf550e
Hopefully your CS degree made you write code and submit code for evaluation.
Asking you to write code and not teaching you how to use version control is
wasting your time fixing problems with your code that are easily solved when
you have version control. Being taught how to use version control leaves you
more time to learn about programming language semantics.

Also, a university that gives CS degrees to people who cannot actually work as
programmers is doing a disservice to their graduates, even if the university
intends for everyone to continue with post graduate studies and go into
academia. At the very least, your doctoral advisor will need you to write some
code for them, and you better be able to do it.

------
collyw
"I was hesitant about taking the job because the interview was the easiest
interview I had at any company, which made me wonder if they had a low hiring
bar, and therefore relatively weak engineers. It turns out that, on average,
that’s the best group of people I’ve ever worked with."

Maybe / quite probably they weren't filtering out ton of false negatives.

~~~
3pt14159
The best people I've ever hired all looked the same:

1\. Had a Github with actual code in it.

2\. The code was clean, lightly commented, and brief without being terse;
regardless of the paradigm.

3\. They breezed through the interview because the questions tested their
ability to actually build the thing they said they could build. No silly
games. A light question that touches on data structures and O time, but
nothing you'd need to crack open your old college books over.

I feel bad for people starting out, but senior / intermediate devs are just
such a better deal. You pay double and you get about four or five times the
work.

~~~
brogrammernot
In my experience, this holds true as well. I would say though, that you have
to keep an open mind when interviewing people just starting out or at that
junior level cause there are some really talented, yet raw, developers that
you can miss out on otherwise. This is of course assuming you have the
bandwidth to help mentor these developers and/or you are okay with less output
for the first 6-9 months while they begin to grok what is needed for the job.

Overall, I've been bummed lately because I've interviewed CS majors and they
have no/poor personal website, basic CS code in Github, and overall don't seem
to have that passion that other non CS majors do have. I don't know if it's
college that isn't preparing them well enough, but having a personal project
or two in Github alongside a decent personal website goes a long way to at
least indicate you actually enjoy programming.

~~~
ionised
Or perhaps it's because not everyone wants to be a web dev.

Perhaps all of their code at previous gigs has been proprietary and they don't
relish the prospect of doing a full days work and then coming home to spend
their evenings maintaining a GitHub profile in case a future employer has it
as an unspoken requirement for the position.

~~~
pjc50
Indeed. We can't have portfolios of our actual work, because it's proprietary.
So we end up with a pseudo-requirement for sample projects to be done on our
own time. Which have to be kept (reasonably) continuously updated. Fortunately
this has only cost me one interview so far and not made it genuinely hard to
find a job while having a job.

I suppose I could try citing my 22k karma on electronics.stackexchange, but
I'm not sure that has the same level of name recognition.

~~~
brogrammernot
I would mention it. If anything it at least shows a sense of community and as
an interviewer I would make the assumption that you enjoy answering questions
so would likely make a helpful, pleasant teammate. I'd even ask a few
questions around your approach to answering questions etc.

~~~
vonmoltke
How do you mention it to your interviewer if you get rejected pre-interview
for not having a portfolio?

~~~
Jtsummers
You can include your membership in various technical communities in your
CV/resume. People list ACM/IEEE memberships, participation in mentorship
programs, etc. No reason not to include online communities (short a desire for
privacy, once you give out your handle it's one google search away to
_everything_ else you have online).

------
esfandia
Amazing little essay. I love his intellectual honesty, and his lucid view of
his career path. While he claims to have no takeway, I think one obvious one
is that, barring disaster, you'll eventually end up where you belong no matter
what path you take. You'll leave the bad jobs (maybe later than you should)
and you'll get positive reinforcement for things you do well. Every time I've
had "career envy", I've tried the alternate path only to discover why I'm
really where I currently belong. But I'm glad for those alternate paths, as
they gave me that reinforcement I needed.

Crazy also how similar our path to learning programming was. Looking back, all
those hours of fiddling with BASIC in high school, or with Pascal at school
really didn't teach us all that much. Like him, my internships mostly taught
me meta-lessons rather than actually valuable skills. Like him, in my
education I followed the path of least resistance, or rather the path of "most
options left to explore since I have no clue what I want to do", and I feel
I'm lucky I ended up where I did. Like him, I fell in love with math way late
when I finally saw it wasn't about rote application of arbitrary techniques
(abstract algebra is what opened my eyes) like we're taught in school.

This sentence, buried deep in the essay, is brilliant: "a common failure mode
is that you’re given work that’s a bad fit, and then maybe you don’t do a
great job because the work is a bad fit. If you ask for something that’s a
better fit, that’s refused (why should you be rewarded with doing something
you want when you’re not doing good work, instead you should be punished by
having to do more of this thing you don’t like), which causes a spiral that
ends in the person leaving or getting fired."

------
sitkack
This is a wonderful essay that 1) shows its messy work, 2) outlines the deep
reward of metacognition.

I have a very smart friend who is actually a great writer. But if she doesn't
nail the first draft, she gives up saying, "I suck at writing". Writing is
rewriting. And similarly, good learning is having grasp at the engine at your
disposal through metacognition.

------
noelwelsh
This was a lot more random than I expected. Very surprised to learn that Dan
Luu nearly failed high school, for instance.

~~~
Qworg
Lots of very smart folks do - especially if they can't get courses that match
their ability. You end up spending lots of time chasing other things.

------
itsmemattchung
> In retrospect, I should have taken the intro classes, but I didn’t, which
> left me with huge holes in my knowledge that I didn’t really fill in for
> nearly a decade

After joining industry immediately after high school, I dismissed the value of
formal education and selected a major with little consideration (I was unaware
that CS even existed). I've recently joined a team where all my colleagues,
many who received their degrees from prestigious institutions, majored in C.S.
and imposter syndrome haunts me. Many though, are surprised,

Although I have my B.S. in information systems, I'm debating whether to return
to academia -- obtain a second B.S. in CS or a stretch for a masters in CS
(self study the fundamentals, which I'm currently doing, prior to starting the
program) -- or continue the self study route to fill the missing gaps in my
knowledge.

~~~
retro64
_and imposter syndrome haunts me_

You’ll get over it. However, you will forever be cursed with having to keep
your wiz-kid credentials up to date as you will never have that degree to help
wedge the door open for your next opportunity. Ultimately, if programming is
what you do (yes, I know CS is not just about coding) it doesn’t really
matter, because the rubber meets the road at some point, and either you can
code, or you can’t.

~~~
itsmemattchung
Keeping up with credentials, regardless of having a CS degree, is a life long
commitment for everyone in the field - right?

~~~
retro64
Absolutely, but when you enter that room for an interview, there may be a bias
already built up against you. Somehow you made it through the door, but now
you have to overcome the skeptics, maybe a team member who refuses to believe
anyone without a formal degree could possibly have the proper foundation for
“real work”. You can’t be just good, you have to be outstanding. Even if you
shine in the interview, you may still have to make it through an upper manager
who did not bother to interview you. Twice I’ve been rejected because the
upper management didn’t want anything to do with me, even though the technical
team was excited. I was never told exactly why, but I suspected the lack of
formal education (what else?). In one case I was offered the position about a
month later but already had another job.

------
Cyph0n
I'm also an EE starting my PhD doing research in hardware/software co-design
and circuit design. I'm also heavily interested in CS in general, so I'm
planning to take as many CS courses as possible.

One thing I'm trying to do is keep myself current when it comes to software
development. I think it's good to have a backup skill that I can fall back on
in case my PhD doesn't work out.

It's good to know that someone like Dan Luu went through ups and downs before
getting to where he is now.

------
reachtarunhere
Very interesting read. Especially for someone like me who is on the verge of
completing his undergraduate education. I have always feared that life might
be too boring in the industry. This provides some fresh perspective. Also
thank you for pointing out the downside of reading 50 Manning books. I wish
wherever I end up working I manage to carve out time to continue reading and
educating myself like you did.

------
CodeMage
I was reading the "bad stuff" section and I stumbled upon what he said about
the Joel Test:

 _The Joel Test is now considered to be obsolete because it awards points for
things like "Do you have testers?" and "Do you fix bugs before writing new
code?", which aren’t considered best practices by most devs today._

Can anyone explain why having testers isn't considered a best practice by most
devs today?

~~~
lukeasrodgers
Not sure, but I believe that part of XP is having devs do more/all of their
own testing and getting rid of the developer vs. tester roles (note that this
doesn't necessarily mean getting rid of QA), and this aspect of XP is
increasingly common.

I probably would be disinclined to hire a developer who wanted a different
person to write/run their tests, unless it was for a very specialized role and
said developer had exceptional talents.

~~~
NeutronBoy
> to hire a developer who wanted a different person to write/run their tests

That's not the role of the tester. The developer should be writing and running
their own unit tests. The Tester should be running through user scenarios, use
cases, and basically be pretending to be a user of the software to make sure
that everything works and makes sense in a workflow (not just in their unit
components)

------
burdalane
My programming story: I started with BASIC on an old pocket computer. I typed
in games from a manual without really understanding how the code worked. In
eighth grade, I programmed a bit in QBASIC in an informal computer class.
Then, for years, I didn't program much except for a formula on my TI-82. I
never learned the TI-82 programming language well enough to do anything more
complex.

Towards the end of high school, I got Internet access and learned HTML to
build a web page. I took AP Computer Science (in C++) in my senior year and
scored 5 on the exam. I majored in computer science at a top math/science
university that isn't as well-known for CS as some other schools. I turned
down some of the higher ranked CS schools, which was probably a mistake,
especially as I wasn't even that interested in the other sciences. I'm more
into languages, and I was interested in CS because of its creative and
entrepreneurial potential.

Fast forward to now: I started programming early and majored in CS, and I can
write classes, objects, and functions, but I still don't really "get"
programming. My algorithms course in college was all math and proofs that I
didn't really understand. I've since gone through algorithm MOOCs and
implemented some algorithms, but I still can't really apply them. My work
involves some programming, but more of it is Linux administration. (I also
don't really get how to deal with hardware because of my problems with
anything physical.)

------
daveloyall

        > Tavish Armstrong has a great document where he describes
        > how and when he learned the programming skills he has. I
        > like this idea because I've found that the paths that
        > people take to get into programming are much more varied
        > than stereotypes give credit for, and I think it's useful
        > to see that there are many possible paths into programming.
    

Okay. Yes that's useful. Let's see what path you took...

    
    
        > Luckily, the internet was relatively young [...]
    

There ya go. Look no further!

Mine own story is a little different... The author had local peers, I did not.
The author made no mention of an old hand-me-down c64 nor Tandy 1000's in his
kindergarten classroom...

But, getting online in the mid-nineties? Check. That's huge.

TCP/IP was explained to me by some random gamer in a chatroom, long before I
ever thought to "google" it.

(Speaking of paths... Lycos --> Altavista --> Still Altavista for a long time
as I resisted the change to Google --> Google --> DDG)

------
iammyIP
One way to learn to program is the urge to teach the machine some principle
you might find nice to be realised by a machine. Some things are opposed to
entropy, some things are there to create order (always with a net gain in
entropy, but nonetheless). Therefore, the machines and us seem to be on the
same side of nature. Even the whole ecosystem of the planet is a miraculous
emergence of high level structure. So you learn to program, if you want to
program some. Print that on the next calendar.

------
barry-cotter
RC = Recurse Centre

~~~
omni
While we're clarifying, it's Recurse Center (insert American flag emoji)

------
dcmininni
TL;DR Naturally talented, hardworking individual downplays everything he has
ever done and tries to chock it all up to chance. I found this all very
abrasive.

~~~
imgabe
Never underestimate the power of chance. The naturally talented, hardworking
individuals who _don 't_ succeed tend to not write blog posts about it.

~~~
ryandrake
Also, don't forget: The non-talented, non-hardworking individuals who luck
into succeeding tend to never shut up about how it was all about talent and
hard work.

------
clifanatic
> no one’s going to stop you from spending time reading at work or spending
> time learning

What? You've lived a truly blessed life, Dan Luu. I've observed the opposite,
pretty consistently. I've been working as a programmer for 25 years and I've
found, across nine separate employers (and lost-track-of-how-many different
supervisors) that spending any appreciable time reading (even a book about
Angular when you're supposed to be learning Angular) will become a management
issue. Everywhere I've ever worked has expected learning to be on your own
time. Don't believe me? Put "read three chapters of a book" on a status report
and see how many levels of management show up at your desk to micromanage your
time.

~~~
Casseres
> Put "read three chapters of a book" on a status report and see how many
> levels of management show up at your desk to micromanage your time.

Try something like "reviewed industry publications for new paradigms and
optimization techniques."

~~~
clifanatic
Yep, that's pretty much how I spin it. But make no mistake, I have to "spin"
the fact that I'm reading about programming while working as a programmer.

------
Retr0spectrum
To improve readability:

    
    
        document.body.style.maxWidth = "768px";
        document.body.style.margin = "auto";
        document.body.style.fontSize = "20px"

~~~
pvdebbe
Or... you know, maybe don't browse stuff with a full-sized browser window? I
don't get who is forcing people to make their surfing so uncomfortable.

~~~
Retr0spectrum
I'm not prepared to resize my window as I switch between tabs.

I'm not really complaining, I just wanted to point out how little styling was
needed to massively improve readability.

~~~
pvdebbe
Understood, I upvoted your message. The different preferences between sites --
and tabs -- is the biggest nuisance for me too, but not too big a nuisance.

------
guard-of-terra
> We tried BASIC, and could write some simple loops, use conditionals, and
> print to the screen, but never figured out how to do anything fun or useful.

Luckily my BASIC books had most of their examples starting with SCREEN 1.
Drawing images programmatically happened to be fun and useful, I learned the
hard way by retyping examples and then somehow began modifying those.

My own bummer was Windows epoch. I could do VB but never otherwise grasp
Windows programming because any program will have so many IDE-generated
boilerplate that was totally meaningless to me and I could not work with that.

I could only resume when I learned proper WinAPI later as an University
course, but then again I switched to Linux, which is a best IDE there is.

UPD: meaningLESS

