Ask HN: At what age did you become interested in coding?

At what age did you write your first lines of code, and how?

15 points | by Genius_um 13 days ago

25 comments

  • JohnFen 13 days ago
    I became interested in computers around age 9 (I'm old -- this was before microcomputers) when I was first introduced to a computer. I can still clearly remember the awe and wonder that I experienced when I first laid my hands on the terminal, as if it were yesterday. At that time, all I was doing was making little banners punched out onto paper tape.

    I wrote my first lines of code about 3 years after that, in Pascal on a PDP/11. It was through a school program meant to help smart kids who didn't do well in school.

    Interestingly, my interest was in electronics, not programming. However, I was from a very poor family and couldn't afford to buy parts -- but I could use a computer for free -- all I had to do was be willing to take a 90 minute round-trip bus ride -- so I shifted to programming.

    I guess you could say I'm a dev because of economics, just not in the way that implies.

  • gordonzhu 11 days ago
    21

    I was interning at a small startup and made some financial models in Excel (using functions like index and match together).

    At the time, I told a programmer at the company that I wanted to learn programming. He looked at my work and told me that I was already doing it. I didn't believe him because I didn't think it was "real coding". I thought he was just being nice.

    My first "real coding" was a year later. I modified a few of the example apps from "Head First PHP & MySQL" (https://www.oreilly.com/library/view/head-first-php/97805961...).

    • authorfly 11 days ago
      Yes - This book alongside one on AJAX (oh the days of ready state). I still had databases named mismatch_<x> up until about 2014 IIRC!

      The book was a perfect example of frictionless starting to code, jumping over hurdles, skipping wholistic education (e.g. all column types/more than select, update, insert in MySQL) for getting something that worked simply and linearly.

      And funny examples that stuck in memory (decades later as it turns out..)... like a dating app that matches by opposites between "opposites attract".

      Still got anything running based on it?

  • thiago_fm 11 days ago
    10, got my first computer (in '98) and instantly was interested in the prospects of making websites and having people visting them.

    From then I made many websites, made money with adsense when it was initially available, paid my college and made a career that moved me to Germany.

    Can't complain about this, it made me stay easily at 99.99% or 100% in the bell curve of income from people where I was born/lived. It has changed my life completely, it bumped me up in high-middle class in the first world. I'm endlessly grateful on the future that it brought me and I still enjoy it a lot!

    I've never been outstanding, just "great". Some people had much better backgrounds than me and this helps loads, only on my mid 30s (now) I felt like I catched up on other aspects in life.

  • bruce511 12 days ago
    I was 12. I had access to an Apple 2 at home, and it came with a booklet on Apple Basic.

    But let me say this as well - you'll get a lot of people here quoting young ages. That doesn't mean you -have- to start young.

    I often hear the same question with music. Lots of people started young. But equally lots of people start old, it's just not a story. I started playing drums at 20. People I went to college either had never seen a computer before 20.

    Age is just a number. There's no virtue in starting young. Ultimately it doesn't really impact every you can end up. It's just a signal that you have an interest, and got an opportunity to indulge that interest young.

    Side annecdote - I remember one moment really well. I'd read a bit of the Basic manual and then had to go off to school. On the way home I deduced that the language must have an IF statement. In hindsight it's obvious, but what I remember most was the deduction itself. Being correct (which I verified a few minutes later) seemed like a very powerful thing. I feel like maybe it was the first thing I consciously figured out that wasnt taught to me by an adult or book.

  • __lbracket__ 12 days ago
    At 16. I'd just learnt the Newton-Raphson method and wrote a cubic equation solver. It only gave one real root closest to the initial guess.
  • matthewtse 12 days ago
    Interestingly, I was a computer nerd since age 7. I found it fascinating to explore every possible setting in windows 95, and I got involved in hosting my own servers for gaming.

    So I dove deep into configuration, but whenever I saw any code, I would immediately close the window.

    It wasn't until my freshman year in college (age 18), when I took my first CS course and pierced the veil underneath. Wish I had done so earlier.

  • ChrisPzilla 12 days ago
    Actively programming? At age 12. We didn't have a computer at home so I had to use the one at school and wrote my programs on paper by hand them typed them into the computer at lunch time as fast as I could to see if it would work! I was so happy to finally get a computer but it was kind of fun to look forward to lunch time.
  • mftrhu 12 days ago
    About five-six - I got into my mother's old Pascal books, messed around with TurboPascal on her old DOS machine, and then found and installed DevPascal on the family computer.

    She was an IT teacher, so she kept on getting new textbooks for her classes, and I kept on reading through them - I learned and forgot batch programming, poked instructions in debug.com without really understanding them, thumbed my nose at Java, painstakingly wrote out PHP code on paper, and kept on playing with Pascal until I found Python, maybe by twelve-thirteen?

    I wasn't a great coder: I was completely self-taught, in a really haphazard way, but it gave me some decent foundations - I probably butted heads with every possible error, which can come in handy surprisingly often.

  • borge 12 days ago
    Not sure if counting HTML, but it was my gateway to programming at the age of ~10-12. I found out I could make web pages in Word, then switched to FrontPage and learned HTML by watching and tweaking the code generated by the WYSIWYG editor. Good times!
  • whatamidoingyo 10 days ago
    I was 9 or 10. My best friend at the time loved the Matrix, Ghost in the Shell, etc. and introduced me to them. He also started learning HTML in computer class (he was 2 grades ahead of me). He started teaching me, but also showed me Hack This Site (a very old website to learn web application security).

    Of course I wasn't consisted all that time. I ventured into Just BASIC (first lang), Python, C, and eventually stuck with web development (JavaScript) in ~2012, and have been going at it since then.

  • mstaoru 12 days ago
    I went to my older sister's informatics class when I was 6, at 7 my parents got me a half-broken (no persistent memory) BK-0011M (a Soviet PDP-11-compatible BASIC computer), and at that point I knew what I was going to do.
  • interbased 12 days ago
    I learned HTML in junior high school, but I really started enjoying coding when I started editing my MySpace custom profile with divs/CSS. I learned Java next and that made me realize I enjoy coding a lot.
  • giantg2 13 days ago
    I guess properly around 16 with some C++ cmd programs and some WordPress PHP mods. Before that I had some minor interest in HTML and GUI tools around 13 or so.
  • zer00eyz 13 days ago
    Apple IIe

    A basic program for the dollar word contest.

    A = .01, B = .02 ... the words had to add up to 1.00

    I had a massive list. It was huge.

    I lost.

    I lost to the kid with 4 older brothers, who had that family multi sibling history to rest on.

  • gcheong 13 days ago
    About age 10 when a teacher brought a Commodore PET into class running an ascii version of lunar lander. I got an Apple II+ a couple years later.
  • mepian 13 days ago
    My father showed me a simple program in Sinclair BASIC (on a Russian Speccy clone) that draws a snowman when I was 5 years old, but he couldn't teach me anything more about programming sadly. Then when I was ~12 years old, I joined my middle school's programming club to learn Turbo Pascal 7.0, ahead of my classmates who waited until high school.
  • kirubakaran 13 days ago
    9. Parents got me an Apple //c for practicing chess (Sargon III), as my coach quit. The guy who sold the computer liked the questions I was asking him and threw in some programming books and magazines for free. I enjoyed programming a lot more than playing chess competitively, and I've been programming ever since.
  • iamflimflam1 13 days ago
    We got a ZX Spectrum when I was 12 and used the built in basic.

    I wrote up some of my early memories here: https://www.atomic14.com/2022/08/19/a-life-in-tech-part1.htm...

    • stevekemp 12 days ago
      Similar story here, my parents bought a Spectrum for the family and in my case I had to start reading the manuals as the casette-player we had didn't allow loading any games, and of course in the UK shops were closed over Christmas.

      I too wrote up some early memories:

      https://blog.steve.fi/how_i_started_programming

      • iamflimflam1 11 days ago
        Ha - I remember Chequered Flag - very much a non-racing racing game...
    • iamflimflam1 11 days ago
      I would suggest to put it at the top of the instructions.

      What would be really useful - as someone else suggested would be to link directly to relevant parts of the video.

      • iamflimflam1 11 days ago
        Not sure how this ended up here - was supposed to be a reply elsewhere…
  • potta_coffee 10 days ago
    I started coding around 10 years old in 1994. I'm starting to feel old.
  • type4 13 days ago
    Maybe when I was 15 or 16, PHP stuff in order to maintain a website. I never really became interested in coding itself, I learned it for practical reasons and I studied it informally (forced myself through some boring books) when I was in my early 20s and wanted to get a real job.
  • pants2 13 days ago
    My dad was as programmer and tried hard to get me into coding early, but according to him I resisted and refused every time. Then I took one programming class in college and realized I was really good at it, so something must have stuck from my youth.
  • alecsm 13 days ago
    At 15 I started coding mIRC scripts and stuff like that.

    I didn't know anyone in real life who knew how to code so it was a bit hard. Not hard as in difficult without any kind of guidance I didn't know how to start doing things the right way.

  • RecycledEle 12 days ago
    8 years old.

    I took a class using Commodore 64 machines, and when BASIC made them beep in different tones, I was hooked.

  • h2odragon 13 days ago
    12, on a VIC20. peek, poke, beep, boop.
  • offlinellm 13 days ago
    8