Live data from Hacker News

Ask HN: How did you learn to code?

news.ycombinator.com

41–50 of 89 posts

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

#42
Applescript; first trying to automate mundane work tasks, then later to build simple GUI apps. That led into more robust Applescript Studio work, which led into learning Objective-C through Big Nerd Ranch and the book/class by Aaron Hillegass. That was all pre-iPhone. When the iPhone released, suddenly my Objective-C hobby skills were in hot demand. And that's how I became the mediocre developer iOS engineer I am today.

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

#43
Brother's minor included making webpages. Pure html. That led to listings in a computer magazine for making a guestbook in php more comprehensible. That was in 2001. That was enough to get me hooked. Continued with the java bible and by then there was no doubt, going to do CS in uni. I hated it with a passion. And only 10+ years after graduating I understand the value of it

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

#44
BASIC on an Apple II back in elementary school. That was at least my first exposure.

A few years later, it wasn't exactly programming but I was able to learn a bit about assembly on Macs in the 90s with ResEdit.

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

#45
Copying listings from computer magazines into a ZX81 ... could never get the damn tape drive to save anything that would then reload (either a cheap tape deck, or cheap tapes)... so had no choice but to hand-code.

Also, didn't have the cash to go buy games from the local computer store so this was the next best thing...

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

#46
Playing in Excel one day, I added a button, then double clicked the button, and the world of Visual Basic appeared. It was like peeking behind the curtain. "Is this how they do it!?"

I wrote some surprisingly complex interfaces for online services in Excel, without having much of a clue what I was doing. I didn't understand variables so memory was handled by reading and writing to the spreadsheet - arbitrary cells would hold values, rows were my arrays. In hindsight this very visual way of representing memory was probably helpful to my learning.

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

#47
In fifth grade, my father got me a C64. It came with a basic programming book, in English. I read the pages using the dictionary to translate the instructions into my mother tongue.

I made an 8-bit balloon that floated on the screen. It was magical. It is still after decades.

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

#48
Over a (rotary) phone with a classmate of mine, who had gotten really-really into programming, explaining how to do things in Turbo-C. Turbo-C had a great help system, so I mostly followed that and my classmate's instructions to make a tiny drawing program and a small RPG that rendered characters straight from FILE* to screen a pixel at a time.

I didn't know how arrays or linking/including worked (or that they existed), so it was one long file with each creature having its own function to determine their behaviour and their own health_creature_1, health_creature_2 and so on. I really started wondering if there was a better way after a while.

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

#49
I played computer games as a kid and got interested in computers. I looked at books from the library on how to make games. This was in the 90s and many of the library books were from the 70s or early 80s. Many of them focused on computers like the TRS-80 that I had never heard of. Eventually at the library I found the David Ahl books ("BASIC Computer Games" and "More BASIC Computer Games"), and discovered that I had QBasic available in DOS. I started typing in the listings and playing the games. Pursuing this interest led me to get a fat book called "Using BASIC" that focused on QBasic.

I started learning to modify the games I was inputting, and then to write my own simple games. Somewhere in there I also was learning to write DOS batch files to do simple tasks. I wrote a DOS menu system that let you choose which program you wanted to run, to make it easy for me or my siblings to run any of various games, plus "serious" programs like WordPerfect. My dad got me a subscription to Dr. Dobb's Journal and a magazine called DOS World. They had program listings in assembly that I also typed in and tried to modify, just doing super simple stuff like playing the Twilight Zone theme song on the PC Speaker. A bit later I got into text adventures and wrote a few of those using special-purpose languages. I also wrote some games in ZZT. (And oh yeah, another comment on here reminded me I wrote some silly "games" in the variant of basic on my TI calculator, stuff like a Mad Libs generator.)

At some point in high school I started using Python. I think it was Python 2.1. By that point the internet had gotten to the point where I could learn a lot by searching for stuff, and so then I kind of shifted into using web tutorials and newsgroups and forums and stuff, which continued until today. Along the way I played around with a few other languages, like Haskell, and got reasonably conversant with JavaScript, but Python remains "the" language for me.

So I was self-taught, at first relying on books and later on whatever I could scrounge from the internet. I've never taken an actual class in programming or computer science.

Games were a major factor in my early programming development, the other main line being small DOS utilities. The David Ahl books were foundational for me, and I really hope people starting out today can find something like that, something that makes them go "Wow, look at all the things that I can actually do just by taking this code that I don't understand and learning how to mess with it." The "Using BASIC" book was similarly key in that it got me to understand how a programming language had a syntax, data types, and so on. Even when I moved away from BASIC, I pretty easily understood how when I was reading a tutorial on Haskell or Python, it was in some sense telling me the same stuff that that book was telling me, although the languages were quite different.

Since then I've taught programming a few times and I'm very informed by that early experience, basically the idea that learning to program involves just jumping in and wrestling with stuff, exploring and experimenting.

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

#50

I think the very first code I wrote was in QBasic, but the first _real_ code I wrote was in Visual Basic 6. I drew a row of dice and then a bunch of buttons and wrote a Yahtzee game (single player). It took me weeks and it was mostly a giant nested if statement. Good times.

Same order for me. Also DOS batch files if they count.

Me too. QBasic and DOS batch files were the gateway drug.
Post reply on HN