[Tutor] Zipfile and File manipulation questions.

Luke Paireepinart rabidpoobear at gmail.com
Tue Oct 17 04:12:05 CEST 2006

Chris Hengge wrote:
> I didn't come up with those variable names willy nilly...
I know :)
I just wanted to make it clear that your statement 'that's what comments 
are for' wasn't really a good way to look at it.
If you have to write a comment because your usage of variables, or 
something else you're doing,
contradicts what someone would logically think you're trying to 
accomplish, then it's bad.
If you're writing a comment to explain an algorithm or something you're 
doing, it's good.
> I chose them because they reflect their functionality.. Which to me, 
> is much more important then anything else... if I go back and look at 
> code months later.. I have an easier time remember names based on 
> functionality, and less of an easy time naming "because that word best 
> describes it"
That's perfectly fine... but also, if you're using a single variable for 
multiple things, you might get confused about what it is at a certain 
and if you have to trace back up through your code and figure out where 
you modified the variable, it's less convenient.
You know what I mean?

I actually read kent's comment

Yes, that is what I meant. One minor quibble, I think I would keep aFile 
  as the name in the zip, since that is what it starts as, and use a new 
name for the external file name. Maybe you could use better names, for 
example zipPath and fileName. I think that would make the code a little 
clearer but it is a very minor point."

and I didn't read your code, and I think I misunderstood what Kent meant.
So you probably have no idea what I'm talking about.
Oh well, sorry!
> real world example...
> I drive to work, I own a car... While car is the actual object 
> description, when I go to tell someone what I'm attempting to do with 
> the car, 'drive' is much more clear then car.
Yeah, that makes sense, but I'm not really sure how it applies in this case.


More information about the Tutor mailing list