I have a pretty diverse group of friends, some of whom are developers and some of whom aren’t. A subset of the non-developer folks have, at times, mentioned to me that they really want to learn how to program but:
- They don’t have a computer background.
- They fear it takes a long time to learn how to do anything good.
- They don’t have time to go to school.
- They don’t want to read thousands of pages worth of books before writing code.
- They’re intimidated by the seeming complexity of programming.
There are plenty of people out there who are self-taught programmers. For non-developers who want to learn, don’t be discouraged. Here are my recommendations for people in this situation:
- Start small. Don’t try to build a 3D rendering engine as your first program. Don’t try to build an RSS reader as your first program. Don’t try to build a screen saver as your first program. Instead, pick a small task that you do all the time and automate that. Maybe once a week you copy last week’s status report and rename it to something new so you can start this week’s status report. Maybe you manually read through a text file and summarize a report out of it every day. Pick something small and repetitive to automate as your first task.
- Avoid GUI programming. There are lots of great WYSIWYG tools out there for dragging buttons onto forms and having cool things happen, but these tools mask a lot of the goings-on from the developer and that’s not always a good thing. If things work perfectly, no problem. If they don’t… well, it can be a frustrating experience for the newbie. Write something that runs at a command line so you won’t have to deal with the windowing environment.
- Keep focused on your task. Your first program that prints something to the screen is referred to as a “Hello World” program (because, classically, the first line it prints is “Hello World”). Do your “Hello World” and then get back to the task you chose to do. Why? Having a task to accomplish is a milestone. If you’re just tinkering around in “Hello World” land, it’s hard to really see any results or feel fulfilled that you’re learning anything. That’s discouraging and I’ve seen several folks just give up because they didn’t feel like they were getting anywhere.
- Use a scripting language. You probably shouldn’t try your first program in C++ when there are so many far easier languages to use to accomplish simple tasks. I’d look at VBScript, batch scripting, AppleScript, or some other simple, high-level scripting language of your choice. (HTML is nota programming language, so don’t pick that.)
- Take online tutorials and do the exercises. There are several free online resources to learn how to do simple scripting. Take advantage of them. When you see code examples or exercises in these tutorials, do them. There’s nothing quite like actually doing it to help you understand.
- Get a tutorial book and a reference book. Once you’ve picked a language (most likely after you’ve done one or two of the online tutorials) go to your local bookstore and pick up a tutorial book and a reference book on your chosen language. The tutorial book will teach you how to do simple things in your language and will have a title like “Learn BlahBlah In A Week.” Tutorial books are good to augment the online tutorials you find out there. The reference book will help you as you’re working so if you need to look up what all of the options are for a certain thing, it’s right there. When you’re starting out, a book might easier to deal with than trying to coordinate online help and your script across multiple windows/monitors.
- Don’t get overwhelmed and don’t give up. Programming isn’t slam-dunk easy. If it was, there’d be a lot of programmers out of jobs. Don’t let yourself get overwhelmed by your efforts. If you find that it’s becoming so overwhelming that it’s not fun anymore and you don’t feel like you’re making any progress, maybe you picked a task that was too difficult. Instead of giving up, pick a smaller task or maybe break the task you’re trying to automate down into smaller sub-tasks and solve each one independently. For example, if you’re copying and renaming a file and that’s too hard, maybe just do the copy part first and handle the renaming after you get the first part down.
For the developers out there, what do you tell people who ask you how to start learning to program?