Ask HN: How did you learn coding
HN seems to have a pretty interesting community of professionals and self-taught coders, so how did you learn?
Suggested topics: - Medium of learning: classroom, textbook, etc. - Age you started - Whether you taught yourself - What kept you coding
62 comments
[ 0.29 ms ] story [ 133 ms ] threadAfter that, I kept coding because I really liked solving puzzles and building things. To me, libraries and APIs were like pieces of LEGO that you could use to create your own contraption. Probably the most exciting coding moment was when I figured out how to use interrupt 33h to add mouse functionality to my games!
I taught full time at a community college for half a decade in a vocational programming degree. I tried to slip as much useful theory into the courses as I could, but ultimately they were terminal voc-tech degrees like welding and auto mechanic that enabled the graduates to go to work at entry level developers at local employers (primarily state government).
I often wondered "what is it that we do here?" since everything I would teach was available online, and more, and better, and free! But many students just need someone to be there and guide them through things (this is why the online courses our department tried to do were a disaster). For a self motivated independent learner, they would no doubt go crazy in the on-the-rails structured courses.
For computer science, the science part, where you primarily investigate computational-related mathematics, I think a formal education from a university is invaluable. But only a small fraction of software development jobs (if that's what you want to do) need that level of rigor.
What really got me "over the hump" was deciding one weekend that I needed to focus if I was going to be able to bring my ideas to life (www.sampl.us). I got Javascript, The Good Parts on Amazon and just hammered on the basics of the language over the course of a few weekends. I kept at it over the next few weeks, and I've come back to it in bursts ever since. Never fails to be one of the most rewarding and frustrating parts of my week.
Five years later, I'm still a pretty mediocre programmer. But now when I can have an idea, I get to watch it become real. It's a good feeling :)
Later my friends and I would use the link cable to share programs between our calculators, and I would pour over the source code and try to understand everything. There was an ASCII fighting game I loved and I added new moves and characters.
Once I learned how to "view source" a website I started doing that everywhere and figuring out how the Web worked. That, plus a Linux install disk and an old, case-less desktop got me on the road to where I am today (supporting a SaaS company as an Infrastructure Engineer).
Took AP CS in high school on a whim just for the credit and haven't looked back since, been at it for 18 years now. Thinking about a sabbatical though as of late.
People started writing programs for graphing calculators because the needed these devices for school, so somebody should introduce kids to Raspberry Pis and Python.
It's a shame that in the US there is a lack of proper CS education in most schools. Not only is programming well-paying (most of the time) but it also helps students break down difficult tasks into simpler ones.
I bought a copy of Turbo Pascal when it first came out and that was really my first foray into the world of 'real' programming. I think I made my first $$ from a software sale from a Turbo Pascal simple point of sale system I wrote for a pharmacy.
Since then, I've pretty much taught myself several other languages over the years. I find books and video courses to be of low value (NOTE: To ME, others may find opposite results). Latest work is in Ruby and Javascript etc. using SQL backends.
I've found the best way for me to really get to grips with any language is to start building small 'real world' projects with it and experience all the triumphs and pitfalls along the way.
Having said that, I do struggle with some new concepts these days. NoSQL still baffles me, and I never got the hang of Ruby on Rails (my latest web app is 25,000+ lines of Ruby but in a Sinatra based framework).
So, no formal software development training, but I have the love for creating stuff out of code that keeps me motivated to constantly learn.
Now I'm okay-ish with c++, python, and a little bit of matlab. I need to do some serious work with learning design patterns and study more algorithms before I'd really consider myself a good programmer.
We didn't have a computer but I read that and loved it. A friend had an Apple II and I got to try out some of the stuff round at his house. Later on when I was in year 9 (1985) I got my first computer ,an Apple //c and I did more BASIC and some assembler. Then uni in 1989 where we learnt Miranda, Modula-2, etc etc. Made the transition to Java in 1997.
It's always been about creating something.
As for why...what on earth is more fun than coding?!
(edit: I see there's an HP laptop called the HP 2000. I mean this one: http://www.hpmuseum.net/display_item.php?hw=411)
It was clear that I enjoyed that, and I enjoyed the old DOS games at the time, and my dad had a bit of an IS background at the time, so he encouraged me and together we did some BASIC programming together. I also eventually got one of those Lego Mindstorms kits as one of the other commenters mentioned when they came out, which probably would've been around age 7 or 8.
I just took off by myself after that. Playing around more with basic, eventually learning some basic frontend stuff so I could show off webpages to my friends, and then moving on to some Java after that.
It's been a passion ever since.
Initially I used it in math to avoid having to do the rote computations, but eventually I started building other stuff. I built a simple game that had you navigating an ASCII character to collect the pi while another ASCII character chased you. Frames would advance on input, sort of like a rogue-like.
Eventually I made a text-based RPG combat game, where you would select enemies to battle, and gain XP to increase your stats which would allow you to fight higher level enemies, etc. The final boss's selection code was '666' and he was orders of magnitude more difficult than the next-hardest enemy.
I also had a book about learning to program in C++, it was p bare bones and I didn't learn very much from it.
In high school I was extremely lucky to have an amazing teacher that taught us C++ by throwing away the standard state-provided manual (this was Romania) and using her own methods, problems and curricula.
Next, coding interactive visualisations kept me going (there were cool enough to attract attention of well, umm... girls. I was a teenager, mind you). My high school graduation project was a 3d engine coded up from scratch in actionscript.
I took a break for two years while studying architecture, but then discovered all the amazing things you can do with space, geometry, networks and code. I am still discovering new avenues. I'm am a fully licensed architect (read buildings, not software) yet I now find myself coding all the time.
I read the elusive documentation (to a 12 year old me, very elusive) word for word and just went with it.
At the time, I didnt't know what a compiler or an interpreter was so I just wrote it all down on paper and did the calculations/instructions in my head and wrote down the results. (I couldn't tell if I had an error or not)
After about 2-3 weeks, I quit. I couldn't understand anything really. I had no idea what a class was or what a method did. About a year later, I heard of minecraft and started playing that. I heard it was made with java so I went on youtube (which I recently found existed) and watched java game development tutorials.
Needless to say, it was hard and I didn't udnerstand anything. I didn't know java or anything.
After about 2 months or so of frustration, I found the official tutorial on oracle and started learning from that. It was hard and I did not learn anything.
in 9th grade - 3 years ago - I took computer science as a math elective class. I learn java a bit slowly but I understand almost everything due to my past failed attemps giving me some foundation.
During the summer after 9th grade, I started learning python again. I got all the way up to classes and such and stopped because I couldn't understand OOP in python because noone could even begin to teach OOP with python. I felt inadequate so I temporary stopped (quit).
During 10th grade, I started to really learn java. I bought tons of books and used the official tutorial with various other websites, and after all of my hard work. I understand the basics of java.
Skip to now - 12th grade - I'm learning extensive OOP programming concepts with java and learn how to create GUI applications with awt and swing (holding off javafx for now).
I'm mostly self-taught despite going to classes for 2 years of computer science in highschool.
I just really want to say, through all of my 4-5 years of experience on and off of learning programming: If you don't understand something, come back to it later.
Everything I actually know about coding came about during my undergraduate engineering education, where a minimal amount of Matlab was needed for labs. I got super into it, then I installed linux, then I started writing my problem sets in LaTeX ...
Several years later, my second job made me into an actual developer for scientific computation, and that learning curve consisted of three years of pair-programming with a guy who has 30 years in the game. You learn quickly that way, and I had enough a foundation under me of my own making so that I didn't drown -- but not too much that all my bad habits were too hard to undo.
Phase 2: took a class in high school on Visual Basic and learned more on the side so that I could make games with it. Made a couple games with it.
Phase 3: took essentially Java Programming 101 at a local community college concurrently with high school, and started to get serious about making games.
Phase 4: made about 30 projects in Java—just whatever I felt like working on at the time—games, game engines, an emulator, 3D model loading/animating/rendering library, tools for making content for games. Almost none of these were completely finished but I learned a ton with each, and sort of climbed a ladder with it, trying progressively more difficult things all the time. This lasted ~3 years.
Phase 5: got a repetitive strain injury from typing/mousing too much and stopped coding (not completely, but nearly) for several years. Studied mathematics and language more deeply than what school prompted me to previously, somewhat hoping this knowledge would come in handy if I could return to coding some day.
Phase 6: decided to work on a major project that I believed would allow me to efficiently write code with motion sensors (thereby avoiding the injury). This ended up being a pretty deep, difficult project that was actually doing something sort of novel in software for the first time, and I learned tons working on it over the next year and a half, primarily about programming languages and architecture (http://westoncb.com/projects/tiledtext).
Phase 7: I've been writing software professionally off and on for a few years now, still occasionally returning to side projects. I still retain an awareness for areas I can improve, but it's more about using than developing skills now. I've returned to html/javascript after all these years. It's interesting.
First I was curious as to how computers could possibly work, then I wanted to build things for computers, and then people wanted to pay me to build things for computers. It's worked out pretty well for me so far.
Still have yet to publish it elsewhere as I had planned to edit it extensively. I welcome feedback on this draft from HN readers, though!
http://simp.ly/publish/gsqMKl
At 17 a friend of mine asked me some help to port an old (and probably still working) COBOL app. Project wasn't really financed and absolutely not intended to be a production ready solution.
At 20 I was still working on that project. At that time in production and at least with the budget for us.
Year after year I can tell that my knowledge was totally community driven. Than.. I understood Unix (yes Microsoft was everything for 10 years). And I definitely understood how to code looking at other's code.
Btw. Thanks everyone for the open source.