Ask HN: How did you get started in hacking/programming?

45 points by ashley ↗ HN
A second question is: What are some things you wished you knew before you started getting into programming?

I'm just starting, but I guess as a girl who majored in the social sciences, I don't have as many friends interested in computers. A very nice person from the Boston Lisp meet-up tipped me off to Felleisen et al. "How to Design Programs", as well as their paper comparing their text to the standard "Structure and Interpretation of Computer Programs."

90 comments

[ 2.8 ms ] story [ 184 ms ] thread
Well, in fact I wish I've known earlier about the books you were recommended: "How to Design Programs" and "Structure and Interpretation of Computer Programs." I found them just a year ago.

However, I was very young when I started programming, so I probably wouldn't have understood those books - partly for intellectual reasons, and mostly because I'm not a native english speaker.

There was another thing that helped me a lot when I was a beginner: I attended a few "advanced computer courses" in some kind of "youth center", where I had the luck to be taught by really engaged computer freaks. They not only taught me knowledge, they also showed to me how much fun that is - even when digging on assembler level.

I got started when I was in my early teens, most of it in a local computer store (where the salespeople would let me play with stuff I couldn't afford as long as I would explain to the customers what it could do).

As for your second question, I wished I had learned about 'structured programming' earlier, that would have saved me a couple of years. But then again, learning it only after a few years of 'spaghetti basic' definitely made me appreciate it more :)

Best of luck, it's going to take you some time but you'll be glad you did it, the ability to program computers isn't going to make you smarter per-se but it will give you an amazing new tool to help with all kinds of other things. The net result is very close to actually being smarter. It's like being able to use a powertool.

Jacques

I was growing up in a not-too-well-off school in Chicago, and found a book entitled Make Your Own Videogames in the library. Sadly, neither my family nor the school had a computer. Happily, I found that you can emulate BASIC code with graph paper, fourth grade arithmetic, and a lot of patience.
I got started when I was 8 (in 1998). My friend bought polish magazine called something like "Programming tutorial with Borland Delphi 2" and he pulled me in this fun. And so began my bloody thirst for knowledge.
Yes! I read How to Design Programs when I was 13, and it turned my world around. I then read Structure and Interpretation of Computer Programs, John McCarthy's paper on Lisp, and the rest is history.
I got started with BASIC on a Bulgarian clone of the Apple IIe called Pravetz 8A which the Soviet Union imported in humongous quantities in the late 80s. http://www.pravetz.info/en/pravetz-8a.html

Needless to say, that's the wrong way to start now.

Was that the computer with the 'metric' pitch pins on the chips ?
To be frank, I am not even sure what your question means, so the proper answer is "I don't know".
The soviet 'clones' of the 6800 and 6502 were rumoured (in the West) to fit a metric grid rather than the 1/10th of an inch pitch used in the semiconductor industry elsewhere.

Other countries used 2.54 mm pitch heart-to-heart for pins on chips whereas eastblock variations on this were supposedly 2.5 mm.

The difference is small, and for packages up to 16 pins you could probably get away with it bending a bit but for a 40 pin package like a 6502 that would not work (or at least, not easily).

If you have access to a machine like that it would be interesting to know for sure!

No, I no longer have access to that machine anymore.

Interestingly enough, http://en.wikipedia.org/wiki/History_of_computer_hardware_in...

mentions the same rumor, with a reference to a old unavailable edition of Byte magazine.

The difference is small enough that if you wouldn't know about it you probably wouldn't even notice.

It would probably take placing another cpu piggy-back on top of the one on the circuit board to clearly see it.

Now I'm really curious :)

When I was 19 I decided to start a t-shirt printing business and print tees/hoodies for high school clubs. I got this big idea that I needed a cool website. With more time than money, I sought out google to teach me "how to make a website". HTML and CSS days later, I got introduced to PHP. I then spent the next 4 years learning to spaghettify "scripts" into Frankeinstein web concoctions.

The problem, at least as I see it, was that I always just trying to "get my next idea implemented". Granted that's how I learned quite a bit, I think the thing that finally helped me the most was when I decided I wanted to fully commit to programming - and so I sought to learn for the sake of learning. TO consume myself. It was then when I met kohana, and jquery, and frameworks, and ruby, and Hacker News, and MVC, and OOP, and yeah the rest is history - true love.

So my advice. Take it seriously. That doesn't mean it has to be work; consume yourself! You'll be good!

edit: I wish I knew about frameworks and the power of just shutting up and learning from and trusting in people better than me. I love jquery. If people 1000000000 times better than me are working on jquery, it's more than I'll ever be able to do. Have to appreciate that.

What made you think that you need to learn something about them? No method is goal-independent.
I got started when I learned you could program a TI 83
I learnt the basics in high school, deepened my knowledge in college, did a bunch of Microsoft Certification Courses to give myself professional experience, and I attend 3-5 seminars a years to improve my knowledge and keep me up to date.

Just kidding.

LOGO on an Apple 2 in Kindergarten
I came from a liberal arts background (philosophy and writing), and got into programming when a friend was describing his work. He pointed me in the direction of Perl, and I went from there. I was fortunate to find a job at a startup doing a mix of front-end stuff and some Perl hacking, working under one of the founders who was also a self-taught hacker. It was very useful to work under a mentor.
When I was 5 or 6, my parents got me a Commodore 64. It had some games, including some written in BASIC. I was always curious how things worked, and I wanted to make games, too. The library had a couple books about BASIC, and I learned enough to write text-adventure-ish games. Understanding the concept of variables at an early age gave me a big head start on algebra, too.

In my early teens (early 90s), I saved and got a C++ compiler, Borland Turbo C++. Digging into real memory with a debugger was so cool. I wish I'd had a Forth to play with, at that age! Later, I dug into Linux, and all the stuff that came with them. For free! (I'd suggest Python as a first language, nowadays.)

A couple things I wish I'd learned earlier:

1) Learning how to work on codebases with other people takes different skills than solitary stuff. Since I started by working alone as a little kid, I didn't really learn consistent variable naming conventions, how to define interfaces between components, etc. until I was in my late teens and digging into open-source stuff. You may not ever learn these things doing projects that are only a couple pages long. (_The Practice of Programming_ by Kernighan and Pike is a short, lucid book that covers this well, IMHO.)

2) Complexity kills projects. Most things don't need to be large systems, and if you structure a system as a group of communicating components, you can get a prototype (rough draft) of the whole system, see design mistakes early, and then cleanly replace the parts that need it. (I don't think conventional OO works that well for this - as Joe Armstrong observed, everything carries along too much context.) Start simple and don't worry about efficiency until you have to. Brainstorm on paper, if that helps.

3) Write programs for something you're interested in, not just another blog engine or what-have-you. The added motivation in making something to make music, cool 3D animations, etc. will keep you going through the hard parts. Your social science background will give you an angle for interesting projects beyond the ken of most CS students.

I was gaming a LOT since I was ~5. Then I started playing with HTML when I was ~11 and naturally got into PHP and Javascript in a few years.

During that time, I ruun few warez sites and a free hosting company (which was profitable!)

I think you are very lucky to have heard about Lisp while you are just starting to get into programming. If I could send my younger self some advice, it would be the books you just mentioned. Also Felleisen's other books such as Little Schemer (shorter and more introductory than How to Design Programs) and How to Design Worlds. I think I would have been ready for them around 8th or 9th grade, but I didn't discover Lisp until grad school.

How difficult is it to find Lisp programming jobs in Boston (interested in other cities as well)? Here in Florida, I've been stuck with a choice of Java, C#, or Fortran.

http://common-lisp.net/project/boston-lisp/

I think these guys would be better suited to answer your question. Neil Van Dyke runs the listserv. I read that a company, ITA, sponsors the monthly Boston Lisp meet-up, and browsing their website, they have projects for Lisp. ITA does travel applications, such as the algorithm for Orbitz's (or was it Travelocity?) low-fare search. As Lisp was developed at MIT, I bet there are more companies familiar with it.

I got started in grade school. We had a bunch of Apple IIc's and IIe's. We learned basic. I believe my first "real" program was a graphic of Spuds McKenzie, the Budweiser dog.

I didn't do much serious programming until I was about 24, the place I worked, a convenience store, just got cash registers with scanners. So we had all this scanning data but no easy way to collate it over time. I wrote a perl script that would parse our scanning data and tell me how much of x we sold for a period of time y. That was when I truly got bit by the programming bug.

My advice would be to have a problem you really need to solve, a goal. The rest is just trying to figure out how to make your language of choice reach that goal for you. It is so much easier to learn how to program when you have a real, tangible, and personal goal, and not some arbitrary exercise put forth by a language tutorial.

Something I wish I knew before getting into programming? Language choice is personal. Find a language whose syntax you enjoy and you can wrap your head around. Don't get caught up in language wars/debates. It's basically meaningless (although fun to argue about). Whatever language you enjoy the most is the one you should be using.

In the late 70's while in my teens, I was interested in making video games. I had a TRS-80 and learned BASIC and then Z-80 assembly-language. I then bought a Commodore 64 and learned more languages while at a tech school. I became a programmer for banking software and never really got a game off the ground.

To answer your second question, I wish that I had some insight into software design as I was learning to program. Too often, I would kludge through something in BASIC ... that was the mental model of the software that I retained. It was hard to translate something like that into assembly-language or anything other than BASIC.

I took a course in Pascal which helped to organize my approach to problem decomposition and program design.

You are lucky - you stumbled on the right thing by accident , HTDP and/or Little Schemer are the right places to start followed by the more advanced SICP.

If you can really grok SICP you probably won't need anyone to tell you what to read next - depending on your interest you will pick up the right book.

What i wish i knew before i got into programming is essentially the above. It took me a solid 10 years of C,C++,Python,Java and reading the right blogs/journals to realise that my knowledge/understanding was ass-backwards.

The demoscene made me do it. I think the thing that got me hooked was seeing Future Crew's "Second Reality" and having the desire to do that kind of stuff.

As far as the second question goes, I think I'd prefer to be blissfully oblivious. :) That said, I've blackboxed pretty much everything I know outside of Lisp, so I think one of those truths that should be shared with others can be summed up by saying, "Exploration is key. Don't be afraid to take a sledgehammer to the code you're working on. Your future self may end up thanking you for it."

Something should probably be added here: don't get discouraged by seeing that a lot of people here answer "grade school" or "middle school", whereas you are (inferring by "majored in social sciences" statement) in your early 20's. For most people on this site, programming permeates our very core, and you can be a very good and prolific programmer without having been hooked on it at the tender age of 8.
I agree. I didn't get into programming till I was in my late 20s. It was something that I got better at during my 30s. I didn't start making my full time living from it till I was about 34 or 35.
I'm particularly encouraged by all the stories of people getting into programming much later in life. I'm a freshly minted graduate, and it's cool to see the career changes.
Google search for CircuitGirl..

You should email her ask for a retelling of her story..

I started programming in high school, with simple programs on the TI 81/82 calculator. I majored in computer science in college, where the focus was C and C++.

I didn't really develop a passion for programming until I was out of college and learned Python (and later Ruby). I really wish I had started with one of those languages.

TI graphing calculators got a bunch of people in my "generation" interested (I'm 25). My first non-trivial program was snake in TI BASIC.

I think this generation's equivalent is probably iPhone.

What's sad about that is that the iPhone is a lot harder to develop for, so it will get a lot less people interested. Rather than just opening up the "iPhone-Basic" app and fiddling around for a bit with an exceedingly simple and easy-to-learn language, you have you get a Mac, get registered, get XCode, and spend quite a while learning Objective-C and Cocoa, and to actually draw anything on the screen, probably OpenGL ES as well.
iPhone is what got me interested. I bought a Mac, one of the best moves I've ever made, and dove in. The learning curve was almost insurmountably steep, and in the two years since I've found web programming to be a much better use of my time. You can build an iPhone app, but what are you going to connect it to? For me a website, but how do you build a website? The meandering process has been a lot of fun, but I don't know how one could start with iPhone programming. By the way, I'm 31.
I think this generation's equivalent is probably iPhone.

At a holiday dinner yesterday, a friend's kid (11) wanted to know how to make games for his iPod Touch. The conversation ended at "well, you need to buy a Mac, first."

The costs are pretty high, even by North American standards. My first computing system cost less than $200, I think. Getting started with iPhone development will set one back $1500.

Sure, but I didn't buy a graphing calculator to start programming, I already had one for school. Many students already have Macs and iPhones.

If I had thought I could make lots of money (by teenagers' standards) selling graphing calc apps then I probably would have become a hermit.

TI graphing calculator in 7th grade, followed by seeing one of my teacher's web pages he made for the course. I decided I could do a better job so I learned the basics of the web and bloomed out from there.
I started coding during my Senior year in college. Roughly 1.5 years ago.

The reason? I outsourced dev for my first startup (which I started my Junior year) and it failed miserably. Small fixes took days. Terrible freaking way to start a startup.

Anyways I started with HTML/CSS then moved up to LAMP (yes I know rails is awesome, but hey, I just started coding =)). Since my Senior year, I've personall started and coded two startups, one of which raised angel money and the other which may not need to.