Ask HN: How did you learn coding
Suggested topics: - Medium of learning: classroom, textbook, etc. - Age you started - Whether you taught yourself - What kept you coding
Suggested topics: - Medium of learning: classroom, textbook, etc. - Age you started - Whether you taught yourself - What kept you coding
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.
In what must have been an early example of software piracy, I dumped a hex dump of my University's Intel development system's macro assembler and typed it in by hand. I hand edited the code in hex to use the Sol's cassette tape drive instead of the paper tape, Cool stuff: Load assembler from tape, load assembler sourec from tape, rewind, load again for pass two.
UCSD Pascal came out around that time, but it required more than the Sol's available 48K of memory. I disassembled the Sol's monitor and moved it from 0xc000 up to 0xf800 (I think) and, Hey Presto! I had a Pascal development environment. I think I wrote one or two Pascal programs before I met... C.
I first used Small C on the 8080 and then decided I needed a processor with better addressing modes. I switched to the 6809, wrote the Introl-C compiler, and almost lived happily ever after. :-)
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.
Edit: I probably wouldn't have been exposed to half of the stuff I now know if it weren't for HN, which I consider one of the treasures of the internet.
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.
Then I learned PHP to run a website of our school class, I used PHP to automatically generate a gallery of pictures located in a folder. Saved me tens of hours of time.
Then I started playing with Flash and ActionScript and I was shocked to discover that different shapes - triangles, circles and rectangels are objects that share methods (resize, fill colour etc.) and that was the Object Oriented revelation.
Years passed. I got a job in IT where I had to learn the internal scripting language and do a lot of SQL - so I've learned that. The product did not allow you to do certain things and they had to be "hard hacked" in JavaScript, so I had to learn that, and I realised it's no longer difficult. I learned C++ finally when for a short time I enrolled into University (software engineering). Then I got a new job where the product was made in Java and in order to make any extensions they had to be coded in Java, so I learned Java (Head First Java). In the process I realised what are the unit tests and how to first write a test and then your object. Somewhere along the way I learned about Design Patterns, but I cannot say I really can use them effectively. I also learned C.
I no longer work in IT, coding is just a weekend hobby.
Now what I still have to learn is to make bigger things that would make sense for others, both in therms of usability and code readibility (I write heinous-ugly code). I am ignorant of MVC model. I don't know much about linux administration or scalability and functional paradigm. I hate myself for not knowing math beyond highschool level.
Still a long long way to go :)
Now I'm in a secure but not very well-paid job as webdeveloper, where I have to code in classic ASP and mostly just do boring-as-hell copy-paste work.
I spent a year at college learning C++, was supposed to be a 2 year course but they changed the framework and kicked everyone off the last year. Didn't go back to uni until a few years later and studied Web Systems - learning ASP.net, C#, more PHP, working with SQLite, a little bit of Java and Direct X and more general web dev stuff (built a custom PHP framework with a classmate).
Most of the stuff I've done has been self taught - web docs and stack overflow :) Over the past few years I've moved more into PHP again (customising WordPress plugins and themes), tinkering with Ruby a little (building an IRC bot and using it to solve puzzles), working with SharePoint 2013, Workflows and InfoPath forms. Hoping to get back to C# a bit more over the next year.
Like most, this used to be a hobby. Crazy that I've managed to make a career out of it
This limited Visual Basic had most of the features of the professional edition, except you couldn't distribute compiled programs (only run them in the editor), and they took out all the help files for some reason. I got pretty used to having to forage on my own to find decent documentation for anything, relying on computer manuals from local libraries and tutorials from random sites to fill in the blanks. I'm not really sure why I had the patience to put up with that, to be honest. I think I just assumed everyone learned programming like that. I pretty much never met another person who knew anything about computer programming face-to-face until I went to college.
When I got tired of not being able to compile anything, I ended up experimenting with Visual Basic.net in a beta of Visual Studio 2005 a relative gave me, had a bad experience with that, and started looking for alternatives. Eventually, I basically settled on Python.
I still think Visual Basic 6 is one of the best programming environments ever made. It started in seconds, the GUI designer just worked, and the autocomplete was perfect. It even opened up with a blank project you could start screwing around with without even saving anything, encouraging a lot of experimentation with the widgets and language. It was QBasic for a different generation. :(
After 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 picked it up very quickly, and made my mom (a teacher herself) a grading program she could use to manage student's grades, wrote a couple of screensavers, all in turbo pascal.
I then delved into C++, and started learning unix, and learned to write system utilities and scripts as well as basic sysadmin stuff.
I took some time off of school to work as a touring musician, but when I went back to college (as a CS major), I needed a job, so I got a job at Glaxo Wellcome because I was a capable sysadmin who could manage the DEC boxes they used for development, and I could also code. I did a bunch of things for them in C, then perl, then finally java after it was out.
I'm coming up on 20 years of working as a professional programmer, and I still love to code as much as I did back in high school. I've had various executive roles over the past 8 years, but I've never moved away from coding. It's one of the great joys of my life.
I started intentionally learning when I got an office job in college and realized that a lot of the boring stuff I was doing would be trivial to automate. After excel formulae stopped being enough for what I wanted to do I went and learned python. VBA would have been the next logical step but after some investigation I found that was a good way to get shanghaied into terrible work forever.
I learned initially through Udacity's intro to programming Python course (their original search engine one), and then Norvig's follow on course. After that I started getting better at learning from the documentation and looking up the math and data structures I needed.
After I got sick of the office job I was at I did a dev bootcamp to get some kind of credential and to get some webdev experience (all my previous code was data munging, web crawlers, really terrible home grown templating solutions etc).
When all you have is a hammer everything looks like a nail, but code is one hell of a hammer, so I kept coding because there was always more crap I didn't want to do repeatedly.
The thing that struck me though was how no one else in that office (filled with quite intelligent people) seemed to see the opportunity before then. This is one of the reasons I wish everyone at least had exposure to coding. It seems rather unfair that previous experience as an addle-brained 8 year making a Pokemon or snowboarding website should have seeded such a relative advantage.
I started learning programming when I was in college, which wasn't some serious learning but merely required courses of my major. After I got my bachelor in engineering. I continued to study in a research institute and got a master degree in geosciences. Later on, I started to teach English the moment I graduated.
Right in the beginning of this year, I realized that teaching bored me to death. I still wanted to do something technical. So, I began teaching myself coding in Objective-C. Three month later, I became an iOS programmer.
I don't think I am particularly smart or anything. But, when I worked with people who had one or two more years of programming experience than me (I only I had six month or so doing real programming), their code was just fucking too messy: no comments, using pinyin to spell variables, having no idea what MVC is ...
All I thought was guys you should really take this seriously. Or, you'd better consider doing something that's your strong suit.
By reading this book, I've developed my skills in programming with C/C++, assembly language and also learning computer architecture all at the same time. This book contains lots of low level stuffs like designing a cpu core, translate a C++ program to assembly, write an assembler, and many more. The explanation starts with a very simple concepts like translating y = x + 1; to assembly language equivalent until translating an object oriented code to its equivalent assembly language code. It has been a lot of fun learning the relationship of cpu, operating system and the compiler. The exercises are easy enough and had really sharpen my skills. Although the target machine is theoretical, I was able to switch easily into the real machine.
[0] - https://www.amazon.com/Assembly-Language-Computer-Architectu...
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.
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.
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.
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 :)
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.
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.
These days I'm doing Python/Django mostly, but am getting into Elixir/Phoenix. I have yet to take a formal programming course.
Really enjoyed it so I started going to summer camps for coding. Then took classes in highschool, and college. But eventually senior year of college as a C.S. major with high marks on projects and tests I realized I had no idea how to code after a failed internship.
Then sorted stackoverflow by votes and read and tried to understand the first 1000 questions.[0] By the end the change in my coding style was like night or day.
0 - This was before stackoverflow decided to cripple it's usefulness by eliminating open ended questions, so you can't repeat this today.
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)
Totally failed at teaching myself Z80 machine code on the Spectrum though. Part of that failure was probably something to do with manually assembling the code and POKEing it into memory (ie crap tools).
Did more AmigaBASIC on an Amiga 500 in the late 80s. Totally failed at teaching myself C on the Amiga too (crap tools also played a part here - using a really buggy C compiler I found on a Fred Fish disk).
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.
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.
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.
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!
5 or 6 years later we finally get a Packard Bell from Walmart. Discover BBS. Warez a copy of Turbo Pascal 6. Rest is history.
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.
I started at about 34 and I taught myself.
Having an objective kept me coding. I am building something that has a specific business need where I have significant domain experience.
Additionally, I was surprised to find out how much I enjoy programming and learning new languages. That too will keep you going.
It's always been about creating something.
2. Fail horribly, make some crude pong and snake clones
3. Dabble in Python automating little pain points in my life
That's where I'm at right now.
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.