How did you learn to code?

I didn't fill in your survey because I'm blind and the questions where I am supposed to answer whether I agree or disagree aren't read by my screen-reader.

I started to play with electronics when I was around 8 and that taught me the basics of binary logic. At 12 I got my first computer, a 486-DX2 at 66mHz and 5MB of RAM, and immediately I learned how to write batch files from MS-DOS' online help.

When I was 15 I was introduced to Pascal in high school but never became fluent in the language. In parallel I learned mIRC scripting on my own and wrote a small IRC server in it, but it left me wanting a real compiled and native programming language like Pascal. The following year I was introduced to C also in high school but, again, didn't become fluent in it. My problem was that I didn't consider those languages powerful enough because all I did with them were basic exercises, thus lacking the motivation to learn them.

It took me 2 years to realize the potential of C, and I only realized it because someone on IRC gave me a single source example of an IRC bot for me to study and learn from. There was a caveat though: the source was for a POSIX system, so I had to install Linux or another Unix-like system to run it. C's potential was too great to be left untapped, so I immediately jumped to Linux and forced myself to learn the console as early as possible because it reminded me of MS-DOS, and the potentially to administrate a system entirely from the command prompt excited me. Once I felt comfortable with Linux I didn't wait any time to implement my own IRC bot, and later, an IRC server.

At 20 I learned x86 assembly and had my first kernel experience: I changed the Linux kernel to kill any process that was found executing code in the stack at context switching time (this protected against exploits calling system calls directly) and changed mmap() to return random addresses (this protected against exploits calling system calls through libraries) thus providing some mitigation in a time when there were no no-execution memory protections in x86.

At 22 I learned ARM assembly and ported the vanilla 2.4.28 Linux kernel to a the Yopy 3700 PDA, which already ran Linux but had serious performance issues.

At 23 I learned Perl and C++ for work, and those languages opened my mind to other paradigms and made it much easier to learn new programming languages. This marked the time when I started to consider myself a real programmer.

At 31 I went blind thus putting and end to my career as a programmer.

I write these things hoping that my experience as a self-taught programmer can inspire those who are stuck. Programming used to give me so much pleasure that I think it's a sin to deny the same privilege to others.

/r/learnprogramming Thread