[Tutor] [Long]General Questions

Jeff Shannon jeff at ccvcorp.com
Mon Aug 11 18:41:00 EDT 2003


Sukrit K Mehra wrote:

>Background:
>I have a system adminstration background. I want to learn *programming*.
>I just read "How to think like a computer scientist: Python".
>

I'm a self-taught programmer, so of course I applaud your efforts.  So, 
here's some of what seems to have worked for me.

>Computer Science:
>How do I go about learning the following, keeping in mind I have no exams to
>pass, using python.
>a Algorithms
>b Data Structures
>

There's a few books about these, but not many.  Keep in mind that the 
principles of algorithms and data structures will be the same no matter 
*what* language is used.  Of course, following examples can be difficult 
if you don't understand the language, but as of yet there's very little 
written for Python.  If you can find any books on either, read them -- 
chances are that, even if the example language doesn't make sense to 
you, you'll glean enough to make it worth your time.

At some point, you *will* want to read the "Gang of Four" Design 
Patterns book -- http://www.net-language.com/Book.aspx?i=461 .  It uses 
C++ and Smalltalk for its examples, but there's enough discussion of the 
patterns that you should be able to get a fair idea even without being 
able to really follow the examples.  This is not intended as an 
introductory book, though, so be prepared to take it slowly and spend a 
lot of time thinking about it.  You may be better off starting with 
Bruce Eckel's book-in-progress Thinking In Patterns -- 
http://www.mindview.net/Books/TIPatterns/ .  Design patterns aren't 
quite the same thing as algorithms or data structures, but definitely a 
useful concept to have in mind.

Read the comp.lang.python newsgroup, and pay particular attention when 
some of the gurus (Tim Peters, Alex Martelli, etc) discuss the 
principles behind certain technicalities.  Even if you don't understand 
half of what they're saying, you'll slowly start to assemble the parts 
of what you *do* understand.  Just having the general idea of some of 
the options available, and the relative tradeoffs between them, can be a 
great benefit.

>Engineering:
>I want to be productive asap and I believe I need these python skills
>- Threads
>- Unix Sys Calls
>- Reg Ex
>- Network Programming
>- Wxpython/ gtk-python
>- CGI
>- Web Clients 
>- DataBase connectivity
>
>What would a smallish project in which I could use most of these skills
>(I thought of a mail client but it's boring and it's ... boring; I learn
>faster when I am *NOT* writing programs that compute factorials of
>numbers.)
>

You're not likely to find a single project that'll exercise all of those 
skills -- at least, not a smallish project that'll be easy to get 
started in.  You've already found one of the keys of "practice makes 
perfect" -- you need to be *interested* in your practice in order to 
bother.  ;)  So, rather than approaching from the direction of "What can 
I do that'll require such-and-such skill", start from the perspective of 
"What am I interested in?"  One of my first wxPython projects came about 
because of my (then) new digital camera.  I found that I had lots of 
directories full of files with names like "DSCN0023(5).JPG", where "up" 
would vary from picture to picture.  So, I wrote a small app that would 
look through one of these directories, showing a preview of the picture 
and allowing me to rotate it properly, and naming the pictures something 
like "birthday05.JPG" (automatically advancing the numeric sequence 
number, etc).  This taught me quite a bit about wxPython and image 
handling.  It was (relatively) simple to do, and most of all, it was a 
practical benefit to me, so I had motivation to really make it work. 
 So, find something that'll make your life a little simpler, or that 
you're curious about, and go for it.  

You might also find some useful examples/ideas/challenges on Useless 
Python ( http://www.uselesspython.com/ ) -- it's a site that's designed 
with beginning programmers in mind, and is anything but useless.

Jeff Shannon
Technician/Programmer
Credit International






More information about the Tutor mailing list