These are my answers to the more interesting (to me) parts of http://twitter.com/caseorganic's survey of programmers' past history with programming: https://docs.google.com/a/ell.io/forms/d/19yROPBmI2HRrTmyiPvjI49_c4_tAABH5YyORXf2n_7A/viewform
What did your parents do? Were they programmers? If you learned while living with your parents, what did they think of you learning to program? Father: doctor (hence family money for expensive things like computers. Yet another privileged-upbringing developers.), mother: sometimes-architect. Neither knew the slightest thing about computers; and since my time spent on computers very slowly morphed from lots of time wasted playing video games, to lots of time spent voraciously learning everything about web-development and software-development, they viewed both similarly: a huge waste of my time, and something to be squashed the moment they walked in on me doing it instead of homework.
Up until I was probably 19, any software development on my part followed the same rules as masturbation: have another window that made it look like I was doing homework that I could quickly move on top, or later, a laptop that I could hurriedly shut and dive into some paper-work when I heard somebody on the stairs.
I have a particularly vivid memory of a knock-down-drag-out fight with my (rather psychotic, honestly) mother after one particularly terrible infraction (up in bed with the laptop until five AM on a school night, got caught), which culminated in her grabbing my PowerBook, walking into another room, and mashing it into a carcass with a ball-peen hammer.
What language did you learn after your first? How did you pick it up? (Book, etc?) What drew you to it? My second language, hm. If you're counting BASIC or HTML, then that was the aforementioned Ruby, from the aforementioned Pickaxe. That, however, wouldn't be my own choice, as I don't consider either of the others as “programming.”
After a long period where I was very exclusive in my relationship with Ruby, I eventually fanned out to some gradually-more-complex, and gradually-more-interesting shell-scripting exercises; simultaneously, I had decided that “real programmers” (with which I had a fascination at the time) could write C-family languages, so I'd begun to teach myself ISO C. I did most of my learning thereof from King's “C Programming: A Modern Approach” and, once I'd acquired it when I was about halfway through that book, the K&R.
About how many years did it take you to feel really comfortable with code? When did you really "get it?" I think I became the kind of programmer I am now (one compfortable with multiple environments, one who's more interested in creating beautiful and readable code, one more interested in open-source and teaching than creating some new hack) after I branched out away from a single language. (For this reason, I always advocate things like 7L7W, or weekend “learn a Scheme” projects.)
Looking back earlier than that, the first time anything abstractive (which is really the core of being a programmer, as opposed to somebody who can write HTML, or toggle variables in drop-in PHP web-apps, or hack on BASIC bots) clicked, was when I began to get curious about Ruby's object-model. Trying to understand singletons and Ruby's method hooks, and especially this one oddly-ill-advised project to automagically “freeze” objects' method_missing method, led me to a break-through in grokking how abstraction and the creation of structure out of chaos is really what programming is all about.
When was the first time you got paid to develop? Did you expect you could get paid to program when you were starting out? Disclaimer: I still rarely do, and turn down most opportunities I'm offered (though as of this writing, I'm actually looking for a steady development job, for the first time …), as I've always been more focused on open-source software, and donating my life to the community as a whole.
That said … the first time, was being commissioned by my father's practice to hack on OsiriX (a DICOM / medical-image / X-ray viewer for OS X.) and their DICOM-distribution network. I put quite a bit of effort in, but knew not nearly enough (jumping from Ruby to Objective-C? And a huge, established project, at that? Meanwhile, jumping from web-development to complex desktop development, including deeply-involved hardware-accelerated OpenGL rendering stuff?) Was entirely too ambitious for me, as it turned out.
Since then, only the odd contracting job, rarely anything complex or remotely related to my particular skills (unless counting the wide skills as a generalist that any sufficiently advanced programmer picks up.) Programming-language designers and theorists aren't exactly a hot commodity. ;)
I never reached a point where I expected I could get paid. I was always desperately aware of the fact that my interests continuously tended in the exact opposite direction of where the money was: branching out from learning HTML, do I learn the (profitable.) JavaScript/jQuery to animate peoples' web-pages, or the (then, not yet popular for web-development, and thus not-expected-to-be-profitable) Ruby server-side scripting stuff? Once I knew Ruby well and Rails was catching wind, do I learn Rails and make lots of money writing peoples' web-apps, or the antiquated and unprofitable* ISO C, so I can understand Ruby's source itself? Knowing C, do I learn Objective-C and make profitable iPhone games, or do I start learning to build compilers?
What is the piece of code or software you're most proud of today? My pet project is a programming-language (or more accurately, high-level VM, or “HLVM” in the spirit of “the opposite of LLVM”). It's like nothing else that exists … to the point that the design of this massively unusual piece of software dragged out to a year and a half of work. It's still in the implementation stage.
I'm often gratified when I manage to explain the concepts behind it to somebody (usually after slogging through the morass of their preconceptions about programming, coming from the currently-popular forest, what we often refer to as “the Rut”), and get to watch that lightbulb click on in their head when they realize this is, as it was once put, “some serious shit.”
I only wish I was better at explaining what I've created.
What advice do you have for people just starting out programming today? Well, that's a spectacularly easy one to answer:
LEARN MORE PROGRAMMING LANGUAGES.
More specifically, if you're willing to run into the more-than-five-words-sentences: “Learn more exotic programming languages that will stretch your preconceptions about programming.” To be a bit judgmental and elitist about it … if you haven't learned at least ~four of the following to some level of competency, then you're not yet a fully-developed programmer yet, and are prone to be a less-than-competent programmer in any language you're writing in:
- A (lisp|scheme), or Racket (which I categorize differently).
- Haskell.
- Forth, Factor, or Joy.
- Prolog or Mercury, perhaps Curry.
- Smalltalk or Io (no, knowing Ruby or JavaScript doesn't count.)
- ISO C (not C++, .Net, or ObjC), and at least one modern assembler flavour (x86 with the SSEs … ARM … something.) Learn the von-neumann architecture of the hardware under your abstractions, and how it constrains your thinking … and how to work around those constraints.
- Rust, Go, D, or any other “modern” low-level language.
(Any list of tools is going to piss someone off by omission of their pet tool. These people, I posit, haven't learned enough tools to have yet reached a genial tool-agnosticism; and should follow the above advice.)
After / beyond that … learn some math. Math is fun. Math isn't scary. Especially the more abstract stuff, which is basically more rigorous programming, and shares many of the fun aspects (abstractive stuff), without many of the less-fun ones (debugging, implementation/environment differences, documentation). It's a great way to let your intellect run rampant in the same direction as programming.
What language would you recommend for a beginner? Why? As a first language when they're being taught to program? My answer is dependent upon the situation. Primarily: Age, investment, and goals.
If they're very young (under twelve, let's say), then Ruby. It's accessible to the beginner, and there's already a huge teaching-youngsters community there to draw on (_why's artwork and adorable writing, etceteras etceteras.)
If not, but they aren't already very-invested (i.e. ‘teaching the girlfriend/parent to program’, or you have a friend you're trying to convince to be interested, or you're teaching a class full of students who've been forced to enroll for credits), then JavaScript. It has the most immediate, “applicable” results for newcomers, in that you get pretty animations and pictures on a webpage, and something you can link your friends to … instead of some “boring” (to the newcomer.) text printed out into some geeky terminal window. Stay away from GUI programming and frameworks, too much barrier-to-entry.
If they're both intellectually mature and excited/invested in programming (i.e. they came to you to learn, or you're teaching an elective class), then there's a multitude of excellent options, but I would probably shy towards a Scheme. Programming is abstraction, and teaching a system which they can then duplicate, themselves, from within the same system (thus demonstrating full, top-to-bottom knowledge to themselves) is a great way to inspire confidence in one's abilities. It's also considered by some hoity-toity types to be the universal language of programming.
My only fear there is generating an unending stream of support for the elitist-lisper class of programmers … so perhaps a thorough grounding in something more real-world-applicable, such as Io or Rust, is preferable in its effect on the programming community as a whole. ;)
Other comments I love that you're doing this. I hope you derive some sort of value from my time responding here. (=