[Tutor] Linear programming - is it bad?
Eric Belanger
bilange at gamebox.net
Tue Aug 10 01:30:34 CEST 2004
Hi!
This is my first post here (ive been reading this list for a few weeks,
interesting content!).
So my question: is it bad to write a python program/script in a linear
way? By linear, I mean: the code is executed line by line, without any
(programmer defined) classes or functions, a bit like [Q]BASIC without
GOTO's, or , while we're at it, HTML. I could also compare it to Doom 3:
going from A to B, then C, without any choices or options, until Z.
I assume that by writing huge projects/programs, im assured programmers
*needs* to use functions and classes. But since Im beginning, I dont see
the point.
For example, I made a small program that modify a few registry strings
to be able to login automaticly in Windows NT/2000/XP (Registry trick
explained at: http://www.winguides.com/registry/display.php/13/ ),
asking the user his login name and password. In this case, I didnt
stored a part of my own code into functions/classes. (For the console
version of it, that is. Using wxPython, guess I didnt have the choice ;)
I dont know what to add, except asking whats your opinion about this topic.
Last thing - I would add my source code of that program i was talking
about, but I dont know if you guys do like to have attachments in
messages from mailing list. If you'd like to see the source code, heres
a link to it. (Hope my old pentium who hosts the file will survive the
slashdot effect ;)
http://home.bilange.ca/files/index.php?dir=&file=AutoLogC.py
Thanks!
Eric Belanger - bilange A gamebox _ net
More information about the Tutor
mailing list