I've never learned to program, and now...
October 4, 2007 11:54 AM   Subscribe

I've been reading a book of late that has brought an old regret to the surface. Born in 1970, I had my first computer in 1979 and have had one ever since. But unlike a lot of kids who picked up the book on BASIC and went on to actually learn how to program, I didn't. At the time, I could not articulate 'why,' but today I'd have to say that I've always had trouble extrapolating how complex systems are built by looking at simple examples.

For instance, every BASIC book showed you how to program the computer to print something to the screen until you tapped the BREAK key. At first, I'd feel some excitement from that, but as I went on, I continued to have trouble understanding how the basics learned could become a program that processed words or held spreadsheets in memory or wrote stuff to a disk. So, as the examples became more complex, I still lacked the ability to see the practicality. This harmed my ability, I believe, in any sort of mathematics courses as well. Today, I am clearly better at this but still see little examples of the same issue. Example: I'll read a book on Excel and it will create an example of, say, a ledger. I don't create ledgers, so I have trouble seeing how this is going to pertain to me and I don't try very hard to retain the material. Nevertheless, I really would like to learn how to program. I don't have a career objective in mind ... at least I don't believe so. I current work in support and have run my own businesses. Today my role is a bit more strategic and supervisory than it is technical. I miss the technical, but then I see how much support professionals and junior level programmers are paid and think, "Er, I'd really have to want to be a programmer for that money." As I read a book about a couple that bought a TRS-80 in 1977 and learned to create LazyWriter, that old regret about learning how to program came to the fore. And all the frustrations of teaching myself topics such as this are very fresh. I'm looking for any advice about this. Cheers!
posted by tcv to Technology (13 answers total) 14 users marked this as a favorite
 
Best answer: Learning programming with those BASIC books only taught me dumb habits I then spent years unlearning. Try learning computer programming from a more theory-based, structured setting perhaps? SICP, MIT's intro computer science textbook, is available for free online, as is How To Design Programs, a probably-easier-to-grasp, certainly more practical introductory text (full disclosure: the latter was co-authored by my professor.) These textbooks both use the Scheme programming language as the language of instruction, which will probably not remind you of BASIC a whole lot.
posted by goingonit at 12:03 PM on October 4, 2007


But you know ... I used to pick up all of those magazines directed at the Commodore 64 audience. Ahoy. Run. Each and every one had these multi-page programs in the back, all meant to be typed-in by hand by the reader. I might've done one or two, but nothing that took more than a page to describe.

Had I stuck it out, had I bothered to do all of the programming those magazines requested, would I be a programmer today? I really doubt it. What mattered more to me was the curiosity, more than the doing. All of that typing was well and good for some, but it wasn't meant to teach as much as it was a way of getting an application from producer to user in the most mundane, labor-intensive way possible.

There was probably more value in the immediate gratification of a two-line "Hello World" program than in all of those back-page apps combined. "Hello World" was programming learned and applied. The back-pagers were just typing exercises.

If you've the curiosity, then pursue what's out there now and don't worry about the programming you missed.
posted by grabbingsand at 12:11 PM on October 4, 2007


I'm not sure if this will help you exactly, but one of the tricks with learning a programming language is seeing how you can reuse or rework what they teach in an example to solve the problem you really have (or what the underlying skill they're trying to teach is).

For example, a PHP book may teach you how to upload a file to a folder and enter data into a database to make a recipe program. It's easy to use those techniques (and much of the code) to create a webcomic site.

Personally, after learning the basics of the language, I find a problem from my own life that I want to solve and then by working on the problem identify and fill in my gaps in knowledge about the language.
posted by drezdn at 12:16 PM on October 4, 2007


Best answer: Another approach I like to think of as the "Dancing on Dad's Shoes" approach. Instead of just typing in a program from a book, find code that already exists and works. Then try to add things to it, extend it, or change how it functions. You'll have to be able to look at the code and figure out how it works in order to change it.
posted by drezdn at 12:18 PM on October 4, 2007 [1 favorite]


Best answer: Nevertheless, I really would like to learn how to program.

Its all about motivation. If this is curiousity for curiousity sakes then you just wont go far. I'm the same way. All my scripting skills and not so mature programmng skills exist soley because I need them for my job. There's nothing fun about writing yet another lbs to kilos program or how to save to disk unless you are motivated to do it for a real reason that keeps you up at night thinking about it. Find this passionate project and the rest will come naturally. Coming at it like a scholar who wants to study it in the abstract and program in the abstract for no real reason is doomed from the start.

Its like learning the guitar. The kid who wants to write his own music or play in a band is going to outpace and accel past the guy who thinkgs he should learn because everyone else who likes music seems to have have learned.

I suggest learnign a simple scripting language first. Do you do repetitive tasks? Try writing an autoIT or vbs script that can automate it. Start small and practical and work your way up.
posted by damn dirty ape at 12:22 PM on October 4, 2007


Response by poster: Part of the challenge for me about learning how to program is not understanding, in general or otherwise, what one can do.

For instance, dda, you mention I should find a task and that, perhaps, a good start would be a repetitive task.

Well, every day I use three different applications from three different websites. I use our call center application at one site, a ticketing system at another site, and a third site that houses our knowledge base.

One item we've wondered about: Can we somehow use information that displays in the call center application to:

1. Open up a new ticket in the ticket system that already has the client setup.

2. Open up the relevant KB article automatically.

We have to do all this manually now. Approaching this in a very ignorant manner, I think this can't be done because all these systems are closed and don't talk to one another. A couple of programmers, however, have quoted us prices on doing it, indicating that somehow it can be done.

It's that intellectual leap I can't make and I've always believed it was because I don't know "how to program."

How does one start when they see a goal but not its beginnings? I have guessed it's through sitting down with a book and learning a language in and out, but I've always had trouble with that. Hence the question.

Thanks!
posted by tcv at 12:41 PM on October 4, 2007


Best answer: I think there is no particular "intellectual leap" involved. It's just that the systems that you think are closed, are apparently not completely. You're lacking knowledge about how your computer talks to these different applications, so of course you don't know how to make the computer do that.

Learning a computer language won't help you at all, if you don't know exactly (in excruciating detail) what you want the computer to do. Learning a language is fairly easy, it's understanding and breaking down the problem that's the hard part -- and often it has nothing at all to do with any particular programming language.
posted by xil at 12:57 PM on October 4, 2007 [1 favorite]


Best answer: Depending on how in-depth you want to get, I've had great success with getting fellow programmers over the "2+2=4" hump by having them sit down and go through Paradigms of Artificial Intelligence: Case Studies in Common Lisp.

It's great because it shows you actual systems from case studies, and then shows you how to build them. From experience, you'll find an "a-ha" moment where you'll be able to grok it, from the high level "this is what we want" to the low level "this bit means this and does that".

It's the best programming book I've ever read.

Disclaimer: I'm tangentially in the AI field, but think even novices could get interested in and through this book. Go thumb through it at your local B&A/Borders.
posted by zap rowsdower at 1:12 PM on October 4, 2007 [2 favorites]


Best answer: Agree with xii

Often when I'm stumped by a programming problem, after thinking about it more, I realize that I don't actually know what I want the program to do. There's some part of the algorithm that I haven't totally thought through, or I want the computer to be psychic or something. Obviously, If I can't articulate exactly step by step the thing I want to implement, then I'm not going to be able to write a program to do it.
posted by jpdoane at 1:14 PM on October 4, 2007


Best answer: tcv, very little of programming is actually learning languages. A very small subset of basic logic and flow is enough to get you working in almost any language you choose.

Programming is divided into two schools of thought, roughly engineers and mathematicians. Engineers work with machines, so their languages tend to represent the lowest-level, hardcore mechanical details of the computer and how it actually works. C is the archetype of this. C is very hard to get to work right, because you have to do everything, and if you do it wrong things will break in strange and non-obvious ways.

The second school, mathematicians, works from the top down. They have grand, abstract views on lambda calculus and code as data, and they use (varieties of) LISP. LISP is hard to learn because there are 9,387,377.9 dialects of it, the syntax is confusing, it doesn't look like anything else out there, and you'll wear out your ) key.

Fortunately, now we have modern interpreted scripting languages that make fiddling around much easier without learning pointer math or lambda calculus.

I'd recommend ruby. Specifically HacketyHack.

The Pragmatic Programmer's Guide to Ruby is a bit old, but it covers the basics of the language and is very easy to follow.
posted by Skorgu at 1:14 PM on October 4, 2007 [1 favorite]


Best answer: Sorry, I got my links messed up. HacketyHack is indeed quite cool, but what I meant was try ruby which is a live ruby interpreter on the web.
posted by Skorgu at 1:25 PM on October 4, 2007


Best answer: Well, every day I use three different applications from three different websites.

Okay the problem here isnt the language its first trying to figure out how this can be done. How can you interface with a web site? Or the client? A hackey way I know of is called screen scraping. I know this because I've learned over the years how applications work and ways to make them work for me. Understanding architecture and how programs work helps too. I think the only way to get to know this stuff is to keep working at smaller problems and moving towards big ones. I'd say your current problem is difficult and a poor one to start out with. Try programming scripts to automate installs, do backups, write small useful programs, etc. This may or may not involve taking a class. Ideally you should take a class so you can talk to a real life teacher. He or she could point you to the resources and concepts you need but dont know to ask for, like how screen scraping works. Or what an API is and how to use one. Or what secure code means or sanity checks, etc. etc.

The programmers who quoted you on that fix probably wont even use screen scraping. They'll probably use some API or parsing (perhaps through rss) from your web based app. Or they'll write a plug-in for your browser. They're professionals and theyll write something secure and stable, thus the price. A hobby programmer/scripter could do the same but it wont be nearly as nice, stable, fast, or secure.

So, if youre getting into this and dotn know anything about APIs, how programs talk to one another, etc its going to be a pretty rough start. Aim lower and keep at it and you'll slowly begin to pick up the tricks of the trade.
posted by damn dirty ape at 1:25 PM on October 4, 2007


Best answer: I've always had that same sort of problem with math, but I'm making my living as a programmer even now.

One thing I do a lot is to think about how a programming problem could be solved. Do enough of that, and soon your solutions will start looking like actual solutions.

If you have trouble going from "Hello World" to a spreadsheet, break it down into smaller steps. Hello world just shows you how to display text in a terminal/command line sort of situation where everything's scrolling along, and each line of text shows up at the bottom of every other line.

What would happen then, if there was a command to clear the screen? you could clear the screen, the hello world would always show up on top.

Then what if you had a command to insert a bunch of line breaks? you could make it appear on any line.

Then insert a bunch of spaces before hello world, and it appears anywhere on-screen.

What if you want something else to appear in a location in addition to hello world? Maybe you have something that keeps track of every possible character space, and what's using it. Plus maybe every time you want to make a change, it automatically clears everything, then re-prints it. Now you can display a primitive sort of spreadsheet by placing bits of text on various parts of the screen.
posted by fnerg at 2:38 PM on October 4, 2007


« Older How do I weigh personal and professional...   |   WinXP Install CD Won't Boot! What gives? Newer »
This thread is closed to new comments.