[Tutor] taking Python to next level
Brian van den Broek
bvande at po-box.mcgill.ca
Sun Jul 18 04:43:16 CEST 2004
Magnus Lyckå said unto the world upon 17/07/2004 21:00:
> At 12:10 2004-07-17 -0700, Danny Yoo wrote:
>> On Fri, 16 Jul 2004, orbitz wrote:
>> > Dive into python is good. Python is also distinct from other languages
>> > in that reading other peoples code is actually helpful, usually.
>> I have to argue with the second sentence, though. (Just slightly.
>> *grin*) I feel that reading other people's code, in any programming
>> language, is a good thing. There's a book called 'Code Reading':
>> that talks about the advantages of reading and understanding code; I'd
>> wouldn't exclude it just because they don't use Python. Good code can be
>> written in any language.
>> (And it's not necessarily a bad thing to read "bad" code, either: we
>> more quickly from mistakes than from successes.)
> I'm not so sure about that.
> First of all, for a beginner who reads someone elses
> code, it's not so easy to know whether something is
> bad or good. Secondly, there are an infinite number of
> ways to write a program. Learning one way *not* to write
> doesn't seem very helpful.
> It's probably easy to spot problems in code if you know
> how to do things right, and it might be a pedagogical
> thing to do to demonstrate problems and failures, but I
> don't think it should be more than some "seasoning" on
> the meal of good idioms and techniques...
> Magnus Lycka (It's really Lyckå), magnus at thinkware.se
> Thinkware AB, Sweden, www.thinkware.se
> I code Python ~ The Agile Programming Language
first off, thanks to Danny for the book reference. I skimmed through some
of it on Safari this afternoon and it looks worth close study.
Magnus's point about beginners not being well-placed to distinguish the
good from the bad has been a bit of a worry for me. I've been reading
things in the Cookbook (dead-tree and on-line) but think the time has come
where sitting down for serious study of a medium-sized chunk of code
would do me some real good.
Any recommendations for projects which provide good models? (I get that it
would be best to read code in an application area that interests me, but I
also think my request to be harder to accommodate if I pile on conditions ;-)
Thanks, Brian vdB
More information about the Tutor