ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Additions changes to the taskdefs.
Date Thu, 04 Jan 2001 00:53:15 GMT
At 08:45  2/1/01 +0100, Martin van den Bemt wrote:
>I'm pretty new to this (let's say "funky") open source stuff..

welcome

>I'm now using Ant for whatever I can think of (even copying files ;-))..
>I ran across a couple of problems :

me too ;)

>- You put in chmod , but not chown, chgrp. I added those two and added an
>extra Chrights, with everything in it. Just works for Unix btw...

send em in if you want - Someone will eventually get around to adding them
- I have never had a use for chown or chgrp because usually I don't run any
scripts with said permissions but if you need/want it then .... ;)

>In some (didn't check them all btw). The init of an instance variable is
>done with this.Blabla = "bla";
>Only in the code this.Blabla is never used, only Blabla (it works I know..).
>Is it just my horrible view on programming or it "nicer/neater" to use
>this.Blabla anywhere to reference the instance variable?
>(I'm using a lot of the same variable names (bad in thinking one up, and the
>dummy1, dummy2 isn't very descriptive) and using the this. is pretty nice
>then).
>Let me know what you're opinion about this is..

Well there is 4 different ways to mark variables

1. Scope
2. Name
3. Type 
4. Access modifier

Which ones you choose depends on your particular domain. You will find that
most GUI develoeprs use 2 + 3 so you get variable names like

startAction
startButton
startPanel
etc.

A lot of c developers and other non-OO languages (like basic SQL-DB) use
2+3 with that foul hungarian notation like "szFirstName"

Moderately modern research in developement environments that are relative
prone to iteration (ie virtually every modern oo dev-environment) indicate
that you should ALWAYs mark scope. Reason is that it enables you to quickly
localize variables. How this is done is up to debate thou. Some IBM houses
use variable names like fAnInstanceMemberVariable, gAClassMemberVariable,
MS uses m_anInstanceMemberVariable, c_aClassMemberVariable while Sun uses
this.anInstanceMemberVariable, ClassName.aClassMemberVariable. 

Each is roughly equivelent however Suns approach requires the programmer to
think. They have to know which variables are members and which are locals
etc and worse they can shoose to ignore it and get lazy. I belong to the
"religion" that believes programmers are generally stupid and need to be
protected from themselves and thus prefer explictness of IBMs/MSs approach.
The reason is that even the best programemr can make errors so why not safe
gueard against it ? I have been members of projects that went over
deadlines because of silly mistakes that could have been safeguarded
against so now I tend to run everything on pedantic mode ;)

I generally use MS over IBM as it messes less with cognitive processes -
most programmers "pronounce" variables in their head and the prefix without
the _ messes it up ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message