Sunday, March 01, 2009

What is the Coding Thing?

The Coding Thing is an idea I've had for a while, but like many ideas that most people have, I've consistently not done anything with. This isn't to say I haven't considered it, I'd even made a few attempts at it but since I never showed anyone the results, I haven't done anything with it. The Coding Thing is in danger of becoming Brain Crack. So, even if my execution of the idea isn't very good, it's better than an idea I never do anything with. This whole thing is going to be written with minimal edits to keep myself from not doing anything with the idea.

The Coding Thing is an attempt to show someone both how to program, and why I program. I can't really speak to why other people program, since I'm not them. All programming starts with a problem. It doesn't have to be a complicated problem. It doesn't have to be a problem with a useful solution. It doesn't even necessarily have to be a problem with a solution. The Hello World program solves the problem of not having Hello World displayed on your screen. The problem with Hello World is that there's already at least one website dedicated to that problem. There's also one dedicated to talking about how you can eat broken glass, but I've lost track of that one. The problem that the coding thing is supposed to solve is that you don't know how to program a computer to count the number of words in a file. As well as the problem of having a file with uncounted words in it.

I'm going to attempt to solve this problem in several similar but different languages, generally proceeding down the levels of abstraction. Most will be languages I have at some point in the past been paid money to solve other problems in, others will not be. The first five languages will be Perl, Ruby, C++, Java, and C. I've chosen them not only because for the most part I know them, but there are freely available compilers/interpreters for them. There may even be freely available versions available for Windows. Trick with that is that I only intend to make the code samples work on OS X, Gnu/Linux, or possibly BSD. I'm not going to do them on BSD though because I don't feel like going through the hassle of setting up BSD and don't have a spare machine right no. What I do have is a PowerMac G4, a CoreDuo MacBook, and a Compaq Armada M700 running Ubuntu 8.04.

Next Time: a further explanation Word Counting an and implementation in Perl

0 comments: