On 30/04/15 20:22, Roel Schroeven wrote:
Alan Gauld schreef op 2015-04-30 00:51:
Summarizing a bit, I think you make two main points (please correct me if I'm wrong):
Your quite correct. I'm probably a bit paranoid but as I said I spent a significant bit of my production-programming career (about 40%) on maintenance projects and I've seen the horrors that come from uninitialised variables, misused names etc etc. And any kind of meaningless symbiol (even if the meaning is not needed at the time). And in a maintenance team where you are targetted to fix, say, 4 bugs per day, a "horror" is anything that adds more than say 15-20 minutes to the process!
[1] Visually scanning for _ or __ is hard, and _ are __ hard to distinguish from each other. Personally, I find it easy to scan for them, but I think I can see whee you're coming from. Python tends to prefer words and tends to dislike symbols
Yes but worse in this cae is tat Python uses __ for special purposes so if there is a __ near to a variable name the reader is likely to assume its just a pre-pended dunder marker rather than a separate name. It also makes searching for dunders harder since there are likely to be quite a few in the code already. (yes you can create a regex search but making it reliable is quite tricky.)
[2] Inevitably, sooner or later someone somewhere will start using _ or __ despite the fact that by convention they should not be used. I have to admit that I have no experience programming in larger teams, and was blissfully unaware of the problems you describe.
Again my experience is not typical of the tutor forum, but some tutor readers may go on to bigger things and bad habits once learned become permanent... My smallest project team was 7 programmers producing 80,000 lines of code. Next smallest 18, producing 250,000. Most of my projects have had over 100 programmers and several million LOC (usually C++ or COBOL) One project had over 1000 programmers and produced 60 million LOC using 7(?) different programming languages. (I ran one of the maintenance teams of ~10 coders all fresh from uni') Like I say I get paranoid about some things :-) -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor