02 August 2011

Welcome

This blog will introduce you to programming. And not just any kind of programming. Smooth programming.

Who’s this blog aimed at?

  • People with no programming background, who want to know what it’s good for.
  • People who want to decide whether to take up programming as a job, hobby, or tool.
  • Beginner or intermediate programmers who want to see how to program smoothly.
  • Experienced programmers who want a reminder of how smooth programming can be.

What’s programming all about?

Programming is not about getting a computer to do things. Yeah, sure, fine, that’s what programming is. But it’s not what programming is about. Why do you need a computer to do anything in the first place? Fundamentally, programming is all about solving your problems. Everybody’s got problems. Problems like:

  • Which elevator should be sent when someone pushes the button?
  • Which web pages contain a certain search term?
  • What’s the fastest way to walk from here to there?

There are programs that aren’t for solving problems, like video games. But even if you want to use programming for something like games, you should start with problem solving. The more problems you can solve, the better games you can write.

What is smooth programming?

It’s something I just made up, okay? Let me tell you a secret. Here goes:

Many hard problems can be solved with very short, simple computer programs.

One day you’ll run into a problem, and it’ll be a hard one. Just thinking about solving the problem will give you a headache. But if you know how to program, you’ll realize that you can use programming to solve it! You’ll sit down, write a 10-line computer program, run it, and get your solution in no time. That’s smooth programming. It’s not just solving hard problems - it’s solving hard problems and making it look easy.

This shouldn’t be a secret. It happens to all experienced programmers. But we never seem to share it with beginners. Most programming tutorials don’t solve hard problems and make it look easy. If anything, they solve easy problems and make it look hard. That’s backward if you ask me.

Simple tools

The issue I have with most programming tutorials is that they tell you about lots of features of the programming language that you don’t need yet. To me, that makes sense if you already know why people write programs, or if you're being forced to learn about programming. It doesn't make sense if you're learning about programming for the first time and you want to know what programming is all about. If someone shows you a bunch of language features to remember, but you don't know how they’re useful, they’re not helping you solve your problems - they’re just giving you more problems. On this blog we're going to stick with very simple programming tools, but we’ll be tackling some hard problems with them.

Don’t worry if you think you’re not good at math. The whole point of programming is that it makes math easier! Soon you’ll be able to solve math problems that your math teachers can’t even solve. Good deal, huh?

Our programming language: bc

We’ll be using a programming language called bc. It’s simple, it’s free, it’s easy to get, it runs the same on Windows, Mac, and Linux, and it does everything we need. It’s good for smooth programming, because bc programs pretty much have to be simple. You could read multiple books about the features in the programming languages C++ or Java, but you can learn everything there is to know about bc in a couple hours. You can be sure I won’t overwhelm you with features because bc just doesn’t have that many.

Almost every major modern operating system comes with bc installed already. The only one I know about that doesn’t is Windows. If you're running Windows, download the "complete package" from the bc download page. Run the setup program after you've downloaded it, and you should have bc installed in no time.

Let's go

You want in on this? Okay, jump right in to Lesson 1.

No comments:

Post a Comment