> Computer magazines of the day would print strings of code on their back pages, which could be transcribed by the reader to create a playable game, and this code-by-numbers task gave Persson his first experience of what would later become his profession. “My sister would read the lines out to me and I would tap them into the computer,” he says. “After a while, I figured out that if you didn’t type out exactly what they told you then something different would happen, where you finally ran the game. That sense of power was intoxicating.”
It's kind of weird to think that no-one gets their start like this anymore.
> It's kind of weird to think that no-one gets their start like this anymore.
I've gotten bug reports for Hackety Hack where people say "I can't copy and paste from the lessons. Can you fix that?" I reply (obviously at more length and warmth) "Working as intended."
Reminds me of Zed Shaw's Learn Code The Hard Way approach:
> You must type each of these exercises in, manually. If you copy and paste, you might as well just not even do them. The point of these exercises is to train your hands, your brain, and your mind in how to read, write, and see code. If you copy-paste, you are cheating yourself out of the effectiveness of the lessons.
When I was 14, I started learning C from a book that built around this premise. I think it was called "Type & Learn C." It worked - by the end of the summer I was a somewhat proficient C programmer.
I still think it's kind of amazing how such simple advice can be so effective. I often find that when I'm struggling to grok a new language or framework, that I've forgotten to hand-type at least a few examples.
The part of the body that learns how to program[1] doesn't speak English. You hear it even in the metaphors programmers use: code smell, this "feels" like a recursive problem, "listen to your code," etc.
That means to learn as quickly as you can you want as many parts of your body involved -- the English-speaking part, your muscles, your eyes, your memories of all the times you've made a stupid mistake only to have it cause you hours of frustration down the road, etc.
[1]: Really, the part of the body that learns anything doesn't speak English. English is just the data exchange format. ;)
Alternatively, maybe you should get your English-speaking part out of the way and let your brain "absorb" code patterns as you read or type them, without overthinking it. https://www.youtube.com/watch?v=HzR8x5MgvDw
I don't know about that, but you do need to at least interact with the code on some level, eg. by cut+pasting, then playing around with the code to make it do different things.
Also, I don't know many professional programmers who type everything in by hand. It'll be something copied from a previous project, or cribbed from the documentation / somewhere online, then hacked into shape.
Of course, in order to do any of that you need to understand what's going on, but there might be easier ways to do that than manually typing in code.
Professional programmers do things in certain ways because it's more efficient. It doesn't necessarily follow that you should change that just because someone is just starting out.
Just because they're learning to code, doesn't mean that you should put artificial hurdles in front of them.
I'm teaching my kids to read and write both english and code this way. Something magical happens when you "store and forward" that doesn't happen just with reading and writing drills.
My pet theory is that it has something to do with information compression in the brain, kind of like Huffman coding, except you keep the table for life.
One of the reasons I recommend Zed Shaw's "Learn Python The Hard Way" to people that want to learn is that it tells you to type out the code in the exercises. It's not quite the same as stumbling into it with the lure of having a game to play, but I think it probably has some of the same intoxicating power.
To me the weird part is that nobody gets their start sitting at a computer with somebody else. Or at least, if you do get a group of kids around a single computer, they're sooner going to watch YouTube (or play Minecraft) than learn to program.
nobody gets their start sitting at a computer with somebody else
My experience tells me that when you are just a bit beyond hello-world, it's way better to sit alone and maybe even disconnect from the Internet. I was starting with nothing more than a book on Delphi and the help system of Delphi, which included Win2k SDK, and feel that only by this way you could develop good debugging skills. I know some people who are learning software development, and the single skill they need badly is troubleshooting complex problems on their own and not relying on colleagues.
edit: now I see that my point is about sitting together with someone more skilled, but you're talking about kids leaning together, which is totally different.
I think one of the most underrated way to learn how to code is YouTube videos -- you hear a lot about books or interactive websites, both of which are great -- but I love following along with random heroes who document the start-to-finish process through video. Cherno's Java game lessons have been amazing thus far -- http://www.youtube.com/playlist?list=PLD1A2E956F00ECC48
That is where, i think, the raspberry pi excels. I bought one for my 11 year old niece and we got busy immediate g with minecraft and python with it. Lots of fun and crazy code has been had. Plus she looks forward to weekends when we sit down and code new stuff for it.
I suppose I can't really speak for everybody but as a 20-something the story a lot of my friends and I had in common was programming our TI calculators. The language was simple (some might say...basic ba dum chh), it was easy to share programs with friends as text or via link and you had a built in packed audience of folks in classes that thought the things you figured out how to do were really cool. We started with simple school problem based programs then went on to more complicated things and then some went on to learn some c or assembly etc.
I think perhaps we might not be starting programming with computers directly all the time, but perhaps there will always be some object that younger folks will learn to program. Heck maybe the next kids will decide to program phones or connected home appliances or something.
I can honestly say TI calculator programming was my first foray into programming as well (I'm 25 now). I remember meticulously typing in a BASIC clone of Pac-man and having it not work the first few times I typed it in (I think it would take me nearly an hour each try). I didn't really program much after I stopped using TI calculators a lot until someone showed me tryruby.org and I found it interesting. Now, two years later, I work full-time as a programmer and have decided this will be my career. Funny how those little side diversions when you were but a kid can come back in a big way.
24. Even though we always had a computer at home, I never got into programming and spent most of my time playing games. (The learning curve was too steep, and besides, what could I possibly make that was better than the games I was playing?) Then when I got to college I majored in CS. Now I'm definitely interested in making games. :)
In my opinion, the abundance of dynamic and interpreted languages, powerful tools, programmable hardware, and the internet make getting into programming WAY easier than it was before.
But even you - a smart capable person who likes computers - didn't do so because you already had all the games you needed.
Those home computers? You load a game, or you start programming. Since loading a game often meant fiddling around with a tape cassette and cable, and a few minutes hoping it would load, it's easy to see why people decided to try to code themselves.
I know abstraction is a good thing. I know it's powerful and etc etc.
But there's something nice about being able to squirt data to an address, and know it's coming out the parallel port, and having a hokey resister-ladder DtoA converter hooked up to turn that data into music. Or to have a single instruction to draw a pixel.
As a counterpoint, I'm 20 and I started programming exactly because I was playing around with extending a game (Neverwinter Nights was the game), which involved using the built-in tools to make new levels/worlds but getting elaborate behaviour required scripting in a C-like language.
I remember being utterly confused by what a statement beginning with "while" did, but eventually I was reasonable enough to mostly implement a (very weak) checkers-playing AI.
This then lead to programming Lego robots in C, which was pretty neat. (Actually, thinking about that, the first programming I did was using the graphical LabView thing that Lego provides for Mindstorms robots.)
23. I started when I got bored of the games on the computer my parents had at the time, and I started opening random programs and eventually ended up in the QB3.0 editor. After early attempts at using it as a word processor failed (it kept complaining about syntax errors when I moved the cursor off the line) I asked my dad, and he showed me how to do
PRINT "Hello from the Computer"
And I worked my way up from there with the help system, and a lot of trial and error.
It helped that our parents limited us to 30min/day of playing games, but were okay with me spending more computer time programming (or playing my own games, though I rarely did that. Making them better was way more fun than actually playing them).
I don't remember how old I was at the time, but it was definitely I was using Windows 3.11 (it was installed, but you couldn't run any decent apps when all your RAM was used up by win). By the time we got a Win95 computer (which in fairness was probably in '98 or '99) I was pretty decent at BASIC.
I continued to play around with it 'til I started learning C++ in maybe 2003? Luckily prolonged exposure to BASIC doesn't seem to have done any lasting damage :)
26 here. I didn't get into programming until a couple years ago.
As a kid, I was never really exposed to programming. It wasn't offered in middle school or high school. It just so happened that I was never prompted to try it. I majored in something non-technical, and didn't write my first 'for' loop til I was 24.
Which is a shame, because as a kid I totally would have loved it. If only there was one class, one teacher, one person, somewhere, telling me to try programming -- I would have tried it, most likely, if someone pushed me.
Oh well. As a grown up, I've discovered programming, I have a job doing programming, and I love it.
On my playstation 2 I had a demo disc that had a YaBasic compiler. I wrote game code with my controller. I used other people's source code to make pong and pac-man, and had little understanding of what I was doing - but still managed to change the colours. It also introduced me to manually checking the syntax of the code. http://members.iinet.net.au/~jimshaw/yabasic.me.uk/faq/
30 here. For me it was websites and discovering that you could see the source code. I thought it was amazing and instantly wanted to learn how to make one. I found out my ISP offered free web space, stumbled on to Arachnophilia, discovered Usenet and haven't looked back since (this was all around 1996/97).
I couldnt say for commonality, but for me writing scripts in notepad for a game emulator to make new items, using a series of tutorials and articles that had been turned into a .chm file because their coverage was so good.
23. My foray into coding started by playing with game's level editors (such as Tomb Raider, Elder Scrolls and Warcraft 3). There was a lot of visual abstraction, but you could go deeper down if you wanted to. Then onto Game Maker. It was actually cool to see all my 'code' going from visual blocks in it, to just using the built-in script (over a series of games). Learned a lot from it!
22. I started at 7 or 8 with Stagecraft Creator, which is a visual programming-ish thing. Then I moved onto to BASIC with Learn to Program BASIC. I have a friend who started with LTPB too.
I started at age 6 or 7 by trying to mimic the command lines printed by my parents' first PC XT's AUTOEXEC.BAT (which lacked "echo off", for which I am eternally grateful), then checking out adventure books from my elementary school library where part of the story required typing in and running BASIC code.
I was also given an Atari 130XE by an uncle that booted to BASIC, explored GORILLAS.BAS when DOS 5.0 came along, etc.
24. Dad worked at HP, so that helped: started at around 6-7ish years old with a 286 that had Qbasic. Moved on to QuickBasic 4.5, then some other Basic variants (Rapid-Q and even CorelDRAW's scripting language), C, PHP and JavaScript, then Python, which is what I still mostly do.
mid-30's, I have the same story, started programming when I was 8. Had these nice colourful British introductions to programming with cartoonish robots all over the place and full BASIC programs to type out.
I have a feeling Markus is referring to typing in machine code (in a totally opaque way) using DATA statements combined with a small loader written in Basic.[1] Here's an article discussing this approach.[2] This was very common in the computer magazines during the 80s. You learn a lot about patience and attention to detail, if nothing else. There were attempts to mitigate this..[3]
But there were plenty of magazine and book listings that had very little in the way of machine code and that were mostly regular program code.
Don't forget that DATA statements just contain comma separated constants, and they were useful for a lot of stuff, not just POKEing a byte into memory. Manipulating these constants gave some people their first taste of 'reverse-engineering' level data. :-)
And the fact that people were typing in machine code, to directly manipulate the hardware, is pretty impressive. It's even more impressive if they went on to learn more about assembler in order to modify the code somehow. Instruction manuals for the machines included information about machine language programming.
It's kind of weird to think that no-one gets their start like this anymore.