How much programming knowledge do I need?

Last week I posted some of my experience doing continuing ed in Python programming with the O’reilly School of Technology.  Before entering in on learning programming some people want to know just how far they need to go with it in order for it to be useful.

In many ways, I’m sure the answer is the more the better.  But, you really don’t need to learn that much programming in order for it to save you a considerable amount of time on some tasks.  For example, I use these lines of code just about every day:

import codecs

data = []

f = codecs.open(“C:/xyz.txt”, “r”, “utf-16”)

for line in f.readlines():

line_data = line.split(“/t”)

data.append(line_data)

 

That little bit of code didn’t take me too awful long to learn.  But, it lets me read a tab-delimited text file and put the contents of each tab-delimited line in a list.  From there, if you know if-statements, for-loops, and operators like “and,” “or” and “not,” you can do a whole lot of things with the data that you read from a text file.  I have it on good authority (i.e., Rick Brannan told me) that if you add regular expressions to those statements, loops and operators, you can do almost anything that most non-professional programmers would need to do with Python.

Of course, there are always better and faster ways to do things.  That is one of the reasons I thought it was very helpful to have an instructor with O’reilly school.  Often he was able to tell me: your code works, but here’s a better way you could’ve done that.  Even with that said, code that works is better than beautiful code for most tasks.

I’d say that that it varies how long it would take someone to get to a point of doing useful tasks.  But, if you had a good month or two to dedicate an hour or so a day to learning a language like Python, I think you’d be really surprised by some of the things you might be able to do.

Tags: