Thinking like a Programmer

I just worked through the Python code for a Tic-Tac-Toe game. I think I actually understand it. – If you’re a veteran programmer, you might not think much of that. For me, it was like jamming my round non-programmer head through a square hole. The crazy thing being that once my head was mashed into square shape, it didn’t hurt and all made sense. I am finding that the logic of thinking like a programmer is very clear and actually a lot of fun.I have often wondered whether there is a single living human being who still understands every part of hardware in a computer or every bit of code in a large piece of software.

The answer must be yes and no. Just looking at this short piece of code, I realize what modular means. Most of the program is about defining functions in one place that you call up later. You only need to think through the function once and make sure it works. You give it a descriptive name such as solve_my_problem() and forget how it works, just living with the confidence that it’s doing the job you want it to.

I imagine that as things get more complicated in hardware and software that is the only way to “understand” things – handling a bunch of black boxes that – once understood, slio back into oblivion, take a certain input and deliver a certain output. Your job is to put all the little boxes into order, building a larger black box…

Depending on your background, this may sound trite or confusing. To me, it’s sortof a major revelation because my programming life is only 4 weeks old. But, like I said, it’s a lot of fun.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: