How Did You Learn How To Program?
theodp writes "'Every programmer likely remembers how they learned to code,' writes GeekWire's Taylor Soper. 'For guys like Bill Gates and Paul Allen, the magic began on the Teletype Model 33 (pic). For others, it may have been a few days at a coding workshop like the one I attended for journalists.' If you're in the mood to share how and in what ways your own developer days began, Soper adds, 'cyborg anthropologist' Amber Case is collecting stories to help people understand what it takes to learn how to code. Any fond computer camp stories, kids?"
When I was 10 I had a Ti-99/4A and subscribed to Compute! magazine. I'd type the BASIC programs in each month, and through the process of typing in thousands of lines of code, and then wanting to make modifications to the games (adding more lives, etc), I simply began to understand how the software controlled the behavior of the computer.
Better known as 318230.
Bought a C64 to find out about this "computer thing". When Basic turned out to be dog-slow, taught myself assembler.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
BBC Basic on a BBC and then asm to make it faster.
Really, BBC BASIC wasn't a bad language. Allowed proper structured programming with functions, procedures, local variables etc.
I still remember that CHR$(141) does double height text in teletext.
This has not been a useful thing to remember.
SJW n. One who posts facts.
I first learned to code by reading the BASIC manual of my Sinclair ZX-81 and laboriously typing out programs one keyword at a time on that little keypad (after assembling it myself). It's amazing what you can do with 1K of RAM.
That was the name of the textbook, and we did it on an HP 3000 timeshare minicomputer in 1976. First high school in the city to get its own educational computer system, I think. The class was "Computer Math", and it changed my direction from architecture to computer science. Spent 4.5 years at the state's science & technology campus helping my engineering major friends with their mandatory FORTRAN class. :-P In Computer Science in those days we did a lot with PL/1. Got a job in a small shop after graduation and was in the right spot at the right time just when Unix got commercialized and I got the task of figuring it out. :-D
On a commodore 64 and later on a pc. After doing a few programs, I started breaking the code down, making changes. I must have been about 7. When I was 9, I took an official BASIC course at the local junior college in their college for kids program. In high school, I took Pascal, then majored in Computer Sciences in college where I learned C, Cobol, Java and Assembly.
TRS-80 Model I with 4K of RAM. I was 6 and the thing came with a wonderfully put together BASIC programming manual. The beauty of the system is that you didn't need a lot of theory (any really) to get started.
10 CLS
20 PRINT "JOE WAS HERE"
30 GOTO 10
This was amazing to me. I ended up writing a few games, some math function and anything else I could do in 4K. Later on I went into programming as a career before turning to the dark side of management.
See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
QBASIC here, at 8. My dad actually made some brilliant MS-DOS batch file scripts so we could store games in ZIPs on our 80MB drive and only extract them when we played them. Later iterations even scanned the game directory for changes after the game exited and zipped up only changed files into a separate archive. So if you wanted to reset a game just remove the second archive.
In high school I took a math course that required graphing calculators. The course tought simple programs to graph curves. Wasn't long before I was doing more complex stuff. Its a shame smart phones don't come with a programming app pre installed.
What little "programming" I've done (bash scripting, HTML, MySQL, a bit of Scheme from SICP for fun) doesn't really count. What I've learned, I've taught myself based on information found online and in books. I know enough to write some useful scripts for my office Linux server, but I leave the real programming to real programmers.
That's how.
I got my 1st computer, an Atari 800XL from my grandmother in Germany as a First Communion present. When I got bored of playing Donkey Kong, I took a look at the manual, wrote the first example, and ran it. I was so amazed, that I started tweaking the numbers in the code and saw which effect they had. That's when I discovered the power XD
I had a commodore 64 and learned from the manual. The earliest thing I remember is copying the balloon sprite code and modifying it to make a simple car game. Then saving it to.... CASSETTE tape!
X's and O's on a blackboard. We had to develop our own playbook, with blocking schemes and pass routes included. It turned out to be really easy, because my team had a fullback who could...wait. Uh, never mind; that was football camp, not computer camp.
Everything is better with chainsaws.
You had so much room! I learned to program on an Ollevetti Programma 101 in 1971. It was essentially a programmable calculator with 120 possible instruction locations. It used RPN sort of.. and as you went beyond 60 or so instructions you started eating up register storage in chunks until you used up have the available registers with program storage!
The language looked something like
AV ( A label)
S (Stop for Input)
M+ (Add the Input register to the Accumulator)
A This was literally a diamond symbol and meant print the Accumulator
V - Branch back to AV..
Does that sound like fun??
Have you compiled your kernel today??
on the definition of "program". To preface, I'm not a programmer, but I can write basic code. I did Apple BASIC in elementary and middle school. Dabbled in Pascal, C, and VBA in college. I would plant my "learned how to program" flag in my last year of college, when my roommates and I downloaded Slackware floppy images over a modem, downloaded Merc 2.2 source code, learned to compile it, then rewrote 80% of the code.
A friend and I wrote a text based Baseball simulator on our own. And we did it without using "GOSUB" because we didn't know it existed.
I had previously dabbled in logo, basic, Applesoft basic, et cetera.
Heard we were being deployed to Wake Island for a downed aircraft recovery (interesting term when the aircraft is in 17,000+ feet of water...)
So, I bought a little book titled "Learn C in 3 days" - http://ecx.images-amazon.com/images/I/61OPqyHTH%2BL.jpg
Then I bought a copy of Turbo C++.
Installed it on the log room computer when the Chiefs weren't looking and coded away the long trip to Wake Island from Hawaii at 8-12 knots (and the way back.)
I'd always been good with computers before, but after this I was totally hooked on coding.
Loading...
My high school was part of a pilot project for rural schools in Minnesota in 196x. We got boxes of pre-punched, numbered (in columns 73-80), FORTRAN statements and would assemble programs from them. The teacher would send the student programs down to the Univ. of Minn. via bus and we'd get the printouts back for the next week's class. It got me hooked for life.
"Almost every wise saying has an opposite one, no less wise, to balance it." - George Santayana
In 3rd or 4th (1990ish) grade we had an amazing computer teacher, started out just drawing cool designs, then learned more, and ended up making a digital clock from scratch, meaning I had to create procedure to draw the numbers and a control program to trigger the process with time delays.
Logo at computer camp when I was 11, followed by basic on a TRS-80 color computer, then eventually basic on a 8088 machine, Pascal, PDP-11 assembly and C in university, and some interesting chances to do some bare-metal programming along the way.
I still don't meet a lot of people who have done interrupt-level programming and accessing hardware directly via registers and writing your own interrupt handlers.
Good times.
Lost at C:>. Found at C.
I remember this lol, I was at home on the computer and opened QBasic.exe. I remember looking at the window and being like WTF? So I went out to the library and got a book on QBasic and that was it! I moved from QBasic to ASM and HTML then to C.
Grade 5, dad gets an Atari 800XL.
I asked for games, he bought in few books that had code for games in BASIC, 1000s of lines had to be punched in and saved on cassette tapes.
Soon enough I learned how to cheat with friends where I would get an unfair advantage during game play, the rest is history.
"The three great virtues of a programmer are laziness, impatience, and hubris." ~ Larry Wall
Why you learned is as important as how.
1987, Apple IIe, 4th grade. My brother comvinced my dad to buy one for the house 2 years before and after one of the first "we've got to computers in the classroom!" pushes there was one in every classroom too...collecting dust because the teachers didn't know how to use it.
My brother had taught me "Hello World" in BASIC, and that combined with the Basic Apple BASIC book let me write terrible programs where the computer would ask you a name, and when you typed it in the computer would say '$name is a nerd!"
I discovered I possessed at least the first of Larry's virtues in order to avoid boring social studies projects. We'd get week-long projects where you had to "make something" about the states, or the presidents or the biosphere, so kids would make flash cards or a mobile or whatever. I wrote a quiz program ("Name That State!") that would ask you, at random, from a set of hard coded questions (ripped from the book) about the states and then tell you if you got the answer right or wrong and tallied your score at the end. This was wizardry to the teachers and I got an A.
Well they didn't really understand code reuse, and so when the next week I'd hand in "Name That President!" which was the exact same program with the questions swapped out, A again. That same code got reused for at least four years in different classes. "Name that type of cloud!" "Name that Biome!" "Name that Export of Honduras!" (Hint, it was probably 'bananas').
You'd think at some point they would have caught on and told me to do something different. Maybe they did but didn't say anything. But I kept getting As so I kept turning in the same stupid project with a 10 minute change. Kind of explains Windows, too I guess.
We don't have a state-run media we have a media-run state.
Luxury...
250 of us living in a shoebox in the middle of the road...
I've taken classes in Basic, C++, Java, other languages. I've read "exceptional" and "effective" and other books to improve my craft over the years.
But building from the ground up in an introduction to digital logic class way back in 1978 still had the most profound impact on my ability to know what's happening in a computer and on my ability to understand what's really going on "under the hood", even 35 years later.
It literally started with diodes and transistors. Building 'and' and 'or' and 'nor' (and...) gates. Hooking them together to make a flip flop. Then taking pre-built gates and making a counter. On to a simple cpu (that only knew a couple of 'instructions', IIRC). When I built an 8080 based computer, I actually knew how it worked. There has always been something comforting knowing that, deep down inside even the most powerful processors, it's still just a bunch (ok, a WHOLE LOT) of gates.
Unless this whole quantum thing gets properly defined and implemented and catches on. Maybe I'll get to start over.
Learning to code may not be an event, but that first moment when you realize what you've just done with a few lines of code (or other data depending on language of course) definitely is.
In SOVIET RUSSIA... erm...NSA AMERICA, the Internet logs onto YOU!
40 years ago when I was 15, I was an Explorer Scout (yeah, I was a bit of a nerd). Bell Labs (now Lucent) opened up their doors every week and taught teenagers how to program computers. I learned Basic, Fortran, some other obscure but similar languages, and even a bit of machine language. As I recall, the computers we used were PDP 11s with Teletype machines for consoles. We saved our work on paper tape. For those of you who have worked with punch cards and keypunch machines, punch cards are a step up from paper tape. I had no idea at the time that it would later become my career.
Apple II Magazines
Nibble Archive
It is by the juice of the coffee bean that thoughts acquire speed, the teeth acquire stains. The stains become a warning
Personally I don't think the language and hardware are that important. They are "implementation details", important, but perhaps more important for more advanced stages of learning to program. :-)
... One of the interesting things here was the different approaches given a RISC vs a CISC CPU. This carried over to C/C++ as well, in general that there is sometimes no universal solution to a problem, that the correct solution depends on one of those "implementation details", the hardware. In short, don't just copy a solution from a book (or in more modern terms don't just cut-and-paste a solution from the web). Take a little time to see what the code you are looking at is doing and think about how appropriate this implementation is.
I think learning to program starts with picking something you are curious about. Ex: How could I do [insert problem here] on a computer? Then figure out how to do it using the hardware and language at hand.
For me one example was a blackjack card game. As I learned more, both in a formal CS program and in my own "independent studies", the details of the implementation changed. The hardware and language also changed as appropriate. From a single player game written in BASIC on an Apple II to a real time multiplayer game written in C on MS-DOS using an novell ipx network.
Another example was more assembly language oriented. Matrix and vector multiplication functions for 3D graphics. 68K, i386, ppc, amd64,
... NOT being distracted by Facebook and Twitter. Good thing those and the whole internet were not around back then.
now we need to go OSS in diesel cars
I hear that.
My parents bought an Amstrad 286 (12MB hard drive space! 512KB RAM! VGA graphics! 3.5" floppy drive! MS-DOS 5.01!) and it came with this enormous GWBASIC manual. I was 8 years old and had been mildly curious about computers for a couple years, but my dad wouldn't let me touch his TRS-80. My grandfather had a Commodore 64 that I knew enough about to load games, but that was it. Once we got that 286 with the huge GWBASIC manual, I realized that I could tell the computer what to do, too. After that, I was programming on Apple IIs, C64s, and TRS-80s--pretty much anything I had access to with some flavor of BASIC.
That got me through until high school, when the Web really started to take off, at which point I learned perl. I've since used more languages than I could probably list.
I'm definitely glad my parents found it worthwhile to get a computer and just let me have at it. They were pretty forgiving when my tinkering screwed up AUTOEXEC.BAT and CONFIG.SYS so badly they had to wipe the hard drive and start over. They didn't really know better at the time, and I didn't know enough to fix it. They sure learned to back up important files to floppies, though.
Check out my world simulator thingy.
Master Programming in 24 Hours for Dummies!
Sleep your way to a whiter smile...date a dentist!
Oh, yes. We always did that, too. I remember when I later got a 386 and was astonished that it auto-parked the heats when you shut it off. SORCERY.
Check out my world simulator thingy.
My dad was a big dreamer, and he saw lots of potential in early arcade games. We had a Pong game in our house in 1979, because my dad thought he could rent it out. Eventually he offered to buy me a game system to get me off the Pong game, and I asked for an Atari 400, mostly because I thought it was better than the 2600, so I could lord it over my friends. My friends weren't impressed because of the smaller game catalog, but I nearly melted that chiclet keyboard as I taught myself to program in BASIC with it. By age 13 I had designed my own version of Breakout (better than Pong, because I could play it by myself) and was working on adventure games.
Buy a kid a computer with any programming language, and they will learn it.
Genocide Man -- Life is funny. Death is funnier. Mass murder can be hilarious.
I started about the same time on a Ollevetti 401 I believe. A glorified numeric key pad for input and a red light, a green light and a cash register style tape for output.
I believe you will never really understand how a computer works until you have done two things:
built a compiler/parser and have done machine language programming (which was what you did with the 401).
Average Intelligence is a Scary Thing
I started when I was around 12 years old, on a Philips VG8010. I believe my friends had 386 PCs at that time. I did not have a lot of games on tape so I started reading the computer user's manual (which teaches programming). The book was a really good introductory material because I managed to learn pretty much everything by myself ... well except sprites, which was only a few years later that I actually managed to understood how they worked :P
Nobody else here starting with a MSX ??
It's really simple: I was curious. The first time I saw a computer I couldn't help myself, I had to find out what you can do with it. And there was no turning back. It also helped that since I was a 6 grader we had after-hours optional computer classes in school, which wasn't usual back then. My first pc was a c64, as fÅ'r many others. I've been using, learning of, or working on computers continuously since then. The point is, you have to make programming interesting for youngsters to care, otherwise they'll just stick to simply using devices. And today this is harder then most would think. We don't have the interesting-factor anymore to make coding fun, since pcs and all kinds of devices are too common now.
I am putting myself to the fullest possible use, which is all I can think that any conscious entity can ever hope to do.
When I was in 7th grade, a friend of mine went to a course. He showed me flow-charts and how to program PL/I. These were the last days of punch-cards where you had all your best to write your code bug free from the start, and flow-charts really helped organize your thought. I was so excited about it that I would draw floating-charts for almost every daily operation, such as using a public phone.
Every day, on my way from school, I would pass near an electronics store with a VIC20, and later a C64, on display and stare at the window. After saving all the money I could, and after two summer-jobs, I managed to buy a C64 with a floppy disk-drive. Quickly I realized that Basic was too slow for almost anything, so I started programming in assembly. Assembly was great, a bit ugly but fast and compact. Once I knew assembly, I was ready for the next step.
Both C64 and the floppy-drive came with a basic schematics, so I learned to program both at a very low level. I liked the ability to control the things in an accuracy of one cycle. I remember that C64 had a single-colored frame at the edges of the screen, and using the cycle-accurate documentation I was able to draw stuff on the edges of the screen by flipping the color in-sync with screen's ray. It was very low-res, yet impressive. When my friend demonstrated my program to our computer class teacher, the teacher would not believe him that I wrote the program.
Nowadays the CPU and the memory units are so complicated that it is impossible to be cycle-accurate like with the 1MHZ C64. Today, with all the abstraction layers and pipelines you never really know what is going on the inside of your hardware. I miss the fun of the old days, but I wish I would had the drive, back then, to meet girls or to hang-out with friends. Instead, I was stuck in front of my computer most of the day trying to write a compiler. I was trying to convert a bit-map to a sequence of assembly instructions that would draw it on the frame, but then era of the IBM-PC clones exploded into existence.
In 1960, as a freshman at Carnegie Institute of Technology, I was given the opportunity to enroll in the first undergraduate programming class offered there. I thought it would be interesting and something that other people were not doing. The class was taught by Alan Perlis, a well-known thinker about programming and languages. (He later was the first winner of the Turing Award.) We learned to program the school's IBM 650 in SOAP (Symbolic Optimizing Assembly Program), which optimized the layout of the program instructions on the magnetic drum memory so that the next operation was ready to pass under the read/write heads just when the previous instruction had finished (a mind-blowing concept that later was useful when programming CDC machines with multiple functional units and independent execution). Later came an early form of FORTRAN. By the time I graduated, the school had changed machines and was mainly using a form of Algol. I only took the one course as a freshman, but I fell in love with computers and software, and found a way to incorporate programming into my chemistry degree, working with the resident theoretical chemist.
My graduate work was in computational quantum chemistry, and I had a part-time job in the university computing center. Gave me the opportunity to dabble in lots of different things. We got one of the earliest CDC 6600 supercomputers and learning how to get the most out of that beast was a challenge.
By the time I was done with my chemistry PhD, it was pretty clear to me that computing was where I should spend my career. The university was starting a Computer Science department in 1968, and I was invited to be one of the first faculty. I taught mainly in programming languages and programming techniques. I was mainly self-taught. I had long-since left academia before I got my first home computer, a C64. In 1984 I had a chance to buy a FatMac at the Apple employee store, and the rest is history.