Ask HN: How did you learn to code?
31–40 of 89 posts
Re: Ask HN: How did you learn to code?
#32When I was in high school, I needed to automate downloading torrents (I was downloading tons). So I plugged together a bunch of tools including:
1. QBittorrent to run a FileBot script once the file was finished downloading.
2. FileBot script was a Groovy script that renamed and rearranged the contents into proper folders and
3. A small Python script that called the Telegram API to send me a notification that the download was complete.
Then I got into college and learnt they had a web portal which showed metrics like attendance (which turned out to be important) and test scores. So I wrote a Telegram Bot that would scrape these figures and save it into a database and run some calculations such as
1. Tell me how many lectures I needed to sit through to get to a required threshold.
2. If I decided to bunk college on certain days, how much attendance I'd end up losing.
Then I opened up this bot to allow my friends to register. Near the end of the first semester, the test scores were only available on the website but there was no direct link to that page from the public portal. I had found it out playing around on it and noticed they had directory listing enabled on some endpoints which led me to those "unlinked" but functional pages.
I wrote a neat feature which would allow querying this page and send a screenshot of it via my bot. I was running this entire thing on a Raspberry Pi 3B at my home and one morning I woke up to see logs from students I didn't know trying to use the bot (and ended up crashing it haha). Word had gotten around that test scores are accessible only through my bot.
It was one of the best projects I ever worked on. At its peak, I had 300 DAUs and I would hear from my friends in other departments that their entire batch is using Telegram solely for my program. I was also able to monetize it towards the end which felt nice.
These projects served as a learning tool for a lot of stuff for me. I learnt how to manage VMs, containerization, async I/O, DB and ORM integration, how to write good docs.
I still miss it.
Re: Ask HN: How did you learn to code?
#33after i was able to do basic patches i learned C# (then 1.0) so that i could load and patch processes in Windows. my patches were relocatable and assembled in the hackiest way, heh. why didn't i do C or C++ like a sane person? dunno, but that's how i started =)
Re: Ask HN: How did you learn to code?
#34After that, I played around with HTML/CSS which led me to building things in PHP as this was the go to language for implementing logic on the web.
Re: Ask HN: How did you learn to code?
#35I wanted to cheat in video games. To cheat in video games. For the first couple of years I was content using the offsets published by others, but eventually I wanted to reverse the games myself. That's where people told me that the best way go get good at reverse engineering was to get good at programming. That set the train moving.
Re: Ask HN: How did you learn to code?
#36I got good at it by picking GitHub repositories I liked, making sure I understand their architecture top to bottom, as well as why specific technical choices were made. In addition to contributing features, solving issues for users really helped build a strong mental model for the code bases, and that is how I learned. All of this work was done while working towards my PhD, on evenings, weekends and during holidays.
Personally I think this approach has really worked for me! I do think that it does depend on picking great projects to contribute to, in which the quality of the code is extremely high. That is the best way to pick up good habits.
Re: Ask HN: How did you learn to code?
#37There used to be a website called Planet SourceCode where everyone uploaded their own code. I would download the zip files from there and build clone programs by watching how everyone else did it. Mostly programs for Windows XP, Visual Basic and Delphi clones.
Re: Ask HN: How did you learn to code?
#38After that, a Logo-like language called Roo (with a kangaroo instead of a turtle) on school 286 PCs, then BASIC (with help from magazines) on home ZX Spectrum, and finally Turbo Pascal (with help from, well, the IDE help files) in after-school club, all during middle school. Made up my mind to become a programmer very early on.
Re: Ask HN: How did you learn to code?
#39After that I started creating websites, learning HTML and JavaScript. At some point I've found Clojure and functional programming and, immediately, decided it's better than anything else, so I started to learn it. Mostly, I learned by trying to make something, looking through the internet to find help, and joining some online communities. My parents didn't care much if I was focused on school or not, as long as I was doing something, so I had a lot of time to learn by myself.
In high school programming was one of the leading subjects in my class. There I realized I'm already quite proficient at it. I was not the best in math or physics, but was easily the best in programming.
And so it goes on for about 20 years now. I still mostly learn by doing. I read some programming books, but rarely as thoroughly as my first PHP book.
Re: Ask HN: How did you learn to code?
#40By solving problems in my life. When I was in high school, I needed to automate downloading torrents (I was downloading tons). So I plugged together a bunch of tools including: 1. QBittorrent to run a FileBot script once the file was finished downloading. 2. FileBot script was a Groovy script that renamed and rearranged the contents into proper folders and 3. A small Python script that called the Telegram API to send…