Thread: [Sunuml-developers] Local source directories and the CamelCase topic
Status: Planning
Brought to you by:
lazaruslong
From: Doreen S. <nee...@gm...> - 2008-11-10 17:39:21
|
Hi, short question: Should we create the source code in a directory named "/sunuml/src" (it's the way I know)? Someone - I don't know anymore who - started to store python source code in "/sunuml/core". What's the right way now? BTW: To contribute to the current discussion: I prefer the coding style like (I'm a mainly Java coder ...): _anyPrivateField anyPublicField OwnConstructor() functionOrMethod() Many opinions ... ! Steve, I'm afraid that you have to decide again ;) Reeny -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail |
From: Javier C. <ja...@ya...> - 2008-11-10 22:00:51
|
Yes a src directory is better. I agree with you about naming attributes and methods. But Aidar is right in a way, we will be using wsPython alot. I think that maybe a point in the middle will be better. - Use CamelCase methods when the class we make extends directly from a wxPython class, because if you override methods from the upperclass you are forced to use that standard, and I think all methods should have the same standard inside a class. This should be used for example on a subclass of wx.Frame. - Use mixedCase standard when making our own classes and model classes. I would prefer to use this standard everywhere but on the other classes it would be prone to error mixing the standards. Regards Javier Doreen Strowinski escribió: > Hi, > > short question: Should we create the source code in a directory named "/sunuml/src" (it's the way I know)? > Someone - I don't know anymore who - started to store python source code in "/sunuml/core". > > What's the right way now? > > > BTW: > To contribute to the current discussion: I prefer the coding style like (I'm a mainly Java coder ...): > > _anyPrivateField > > anyPublicField > > OwnConstructor() > > functionOrMethod() > > > Many opinions ... ! Steve, I'm afraid that you have to decide again ;) > > > Reeny > |
From: Steven G. <laz...@gm...> - 2008-11-11 00:42:42
|
short question: Should we create the source code in a directory named > "/sunuml/src" (it's the way I know)? > Someone - I don't know anymore who - started to store python source code in > "/sunuml/core". > If we want to put all source in a folder then sunuml/src is cleaner. However it depends if we want to divide our code in sub parts: such as *compiled modules* .pyc as you would do for C++ dlls. In this case the following is very nice (for c++ projects) because it permits to use simple relative paths for includes : /sunuml/core/*src/core/* /sunuml/core/build/ /sunuml/utilities/*src/utilities/* /sunuml/utilities/build/ You then include with include "core/xxx.py" or "utilities/yyy.py". Using such a structure would permit us to create stable compiled modules.... and avoid that we *rebuild all* at each small modifications. See one of my projects http://www.opengameengine.org/wiki/index.php?title=Project_Structure#Oge_folders_structure Shall we structure our project around modules from the start? Note: the .pyc being copied in a common *sunuml/lib* (folder which must not be committed). I think that maybe a point in the middle will be better. > > - Use CamelCase methods when the class we make extends directly from a > wxPython class, because if you override methods from the upperclass you > are forced to use that standard, and I think all methods should have the > same standard inside a class. This should be used for example on a > subclass of wx.Frame. > > - Use mixedCase standard when making our own classes and model classes. > I would prefer to use this standard everywhere but on the other classes > it would be prone to error mixing the standards. OK - I will wiki this. |
From: Ricardo C. <ric...@ho...> - 2008-11-11 05:30:42
|
I agree. Regards, Ricardo _____ From: Steven Gay [mailto:laz...@gm...] Sent: Lunes, 10 de Noviembre del 2008 18:43 To: sun...@li... Subject: Re: [Sunuml-developers] Local source directories and the CamelCasetopic short question: Should we create the source code in a directory named "/sunuml/src" (it's the way I know)? Someone - I don't know anymore who - started to store python source code in "/sunuml/core". If we want to put all source in a folder then sunuml/src is cleaner. However it depends if we want to divide our code in sub parts: such as compiled modules .pyc as you would do for C++ dlls. In this case the following is very nice (for c++ projects) because it permits to use simple relative paths for includes : /sunuml/core/src/core/ /sunuml/core/build/ /sunuml/utilities/src/utilities/ /sunuml/utilities/build/ You then include with include "core/xxx.py" or "utilities/yyy.py". Using such a structure would permit us to create stable compiled modules.... and avoid that we rebuild all at each small modifications. See one of my projects http://www.opengameengine.org/wiki/index.php?title=Project_Structure#Oge_fol ders_structure Shall we structure our project around modules from the start? Note: the .pyc being copied in a common sunuml/lib (folder which must not be committed). I think that maybe a point in the middle will be better. - Use CamelCase methods when the class we make extends directly from a wxPython class, because if you override methods from the upperclass you are forced to use that standard, and I think all methods should have the same standard inside a class. This should be used for example on a subclass of wx.Frame. - Use mixedCase standard when making our own classes and model classes. I would prefer to use this standard everywhere but on the other classes it would be prone to error mixing the standards. OK - I will wiki this. |
From: Steven G. <laz...@gm...> - 2008-11-11 00:58:58
|
> > I think that maybe a point in the middle will be better. >> >> - Use CamelCase methods when the class we make extends directly from a >> wxPython class, because if you override methods from the upperclass you >> are forced to use that standard, and I think all methods should have the >> same standard inside a class. This should be used for example on a >> subclass of wx.Frame. >> >> - Use mixedCase standard when making our own classes and model classes. >> I would prefer to use this standard everywhere but on the other classes >> it would be prone to error mixing the standards. > > > OK - I will wiki this. > Mhhh... I read too fast. You really want to use mixedCase for classes? I will let you decide tell me when you all agree :) Just a comment. The fact that you are forced to use the CamelCase when overridding mix well with the mixedCase standard as it identifies clearly the methods that are overiding a base library versus our own methods. I still don't see the advantage of the CamelCase approach but as I said: tell me when you agree for a style. PS: I always wonder why defining the coding style & project folder layout takes so much time... and if the leader should impose it :/ Regards, Steven |
From: Ricardo C. <ric...@ho...> - 2008-11-11 05:26:26
|
Hey all, Frankly, I don't care which standard is used, as long as we all use (not necessarily agree upon) the same. Personally, I prefer the Java convention: CamelCase for all classes and mixedCase for almost everything else (ie member variables and methods). But I don't want to add yet another option. Steve, I'm afraid you've got to decide on this one and go ahead. I don't see it as imposition but leadership. Regards, Ricardo |
From: Doreen S. <nee...@gm...> - 2008-11-11 17:01:40
|
Hi, > > Mhhh... I read too fast. You really want to use mixedCase for classes? > I don't think that the mixedCase was meant to used for classes. Like I understand the last comments, all developers agree with the fact to use CamelCase for classes, right? I also agree with the compromise to "inherit" the standard of extended classes and use our own standard for clean new classes. > > PS: I always wonder why defining the coding style & project folder layout > takes so much time... and if the leader should impose it :/ > Steven, you have to decide such things because someone HAS TO decide. There are a lot of opinions and practises. But I think we all are willing to use any standard whatever would be established :) Define some standard and we will follow ... probably ... ;) Reeny -------- Original-Nachricht -------- > Datum: Tue, 11 Nov 2008 11:58:53 +1100 > Von: "Steven Gay" <laz...@gm...> > An: sun...@li... > Betreff: Re: [Sunuml-developers] Local source directories and the CamelCase topic > > > > I think that maybe a point in the middle will be better. > >> > >> - Use CamelCase methods when the class we make extends directly from a > >> wxPython class, because if you override methods from the upperclass you > >> are forced to use that standard, and I think all methods should have > the > >> same standard inside a class. This should be used for example on a > >> subclass of wx.Frame. > >> > >> - Use mixedCase standard when making our own classes and model classes. > >> I would prefer to use this standard everywhere but on the other classes > >> it would be prone to error mixing the standards. > > > > > > OK - I will wiki this. > > > > Mhhh... I read too fast. You really want to use mixedCase for classes? > > I will let you decide tell me when you all agree :) > > Just a comment. The fact that you are forced to use the CamelCase when > overridding mix well with the mixedCase standard as it identifies clearly > the methods that are overiding a base library versus our own methods. I > still don't see the advantage of the CamelCase approach but as I said: > tell > me when you agree for a style. > > PS: I always wonder why defining the coding style & project folder layout > takes so much time... and if the leader should impose it :/ > > Regards, > Steven -- GMX Download-Spiele: Preizsturz! Alle Puzzle-Spiele Deluxe über 60% billiger. http://games.entertainment.gmx.net/de/entertainment/games/download/puzzle/index.html |
From: Steven G. <laz...@gm...> - 2008-11-11 23:10:11
|
Hello All, As we all agree we are talking to much about coding style. So we shall use the following style: - CamelCase for class names. - mixedCase for methods and variables *except* when required such as overloading wx methods. Regards, Steven |
From: J. C. S. <joh...@gm...> - 2008-11-12 15:24:13
|
On Tue, Nov 11, 2008 at 5:04 PM, Steven Gay <laz...@gm...> wrote: > Hello All, > > As we all agree we are talking to much about coding style. > So we shall use the following style: > > > - CamelCase for class names. > - mixedCase for methods and variables *except* when required such as > overloading wx methods. > > > Regards, > Steven I think this should be in the wiki :D |
From: Steven G. <laz...@gm...> - 2008-11-12 23:59:40
|
> > I think this should be in the wiki :D > Done. It was a bit late yesterday :) |