Live data from Hacker News

Ask HN: How did you learn to code?

news.ycombinator.com

31–40 of 89 posts

Re: Ask HN: How did you learn to code?

#31
One BASIC class on a mainframe at the local community college in 7th grade. Then 5 years of teaching myself BASIC and 6502 assembly and Logo and Forth on the Apple //e that I begged my parents for. And one year of Pascal in high school.

Re: Ask HN: How did you learn to code?

#32
By 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 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?

#33
i started with x86 intel asm. i just derped around with ollydbg a lot while i referenced the intel instruction set pdf that i had.

after 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?

#34
My first coding experience was through the StarCraft 1 map editor. It offered a text-snippet-based scripting system to build rudimentary logic. It was relatively easy to pick up thanks to its documentation and localization.

After 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?

#35

I 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.

yep! reversing Ultima Online clients started it all for me

Re: Ask HN: How did you learn to code?

#36
Took a few computational science courses at university and left with basic knowledge of Python and C, and an inkling that I loved coding.

I 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?

#37
post #30

There 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.

I started my web development with PHP back when there was a free 110MB hosting planner. Running websites there was a lot of fun. These days I still host websites using PHP, but the APIs are usually handled by Rust Node.js in the background. Of course, this depends on the user base. Smaller projects still use pure PHP PostgreSQL.

Re: Ask HN: How did you learn to code?

#38
Fifth grade, early 90s, informatics class with Russian-built 8-bit computers (Corvettes). The "programming language" only had drawing commands (LINE, CIRCLE, etc) and the first program was the homework to draw a house. We were to write the program on a piece of paper and then type it up in class the next day. Everybody came in with your basic six-line box + roof. I had two pages of code with a 3D house, door, windows, chimney, shining sun, etc. I was hooked.

After 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?

#39
When I was a kid, I was really into fantasy books and online text-based RPGs. I met some friends through one of those games, and they needed some changes made to their website and forum. Somehow, I ended up working on it. Then I asked my parents to get me a PHP5 book for Christmas. I think I was around 13-14 then. This was one of few programming books I've read thoroughly, although I don't remember anything from it now.

After 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?

#40

By 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…

You would have made a bit of money from that bot if you had known! Haha
Post reply on HN