RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic Goto page Previous  1, 2, 3  Next 
View previous topic - View next topic  
Author Message
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1624
Location: Decatur, IL, USA

PostPosted: Sun Jan 14, 2007 7:10 pm    Post subject: [quote]

RedSlash wrote:

However, I too can point out the example of inconsistant naming conventions.


You are right. I overlooked a few, and I will fix them when I upload the next site-update. Thanks.

game_state was from the old article, however, the function naming convention is not inconsistent.

I use lowercaseCapsCapsCaps () instead of CapsCapsCaps for functions.

the Allegro functions are then easily seperated from mine because Allegro uses lower_lower () format.

I didn't want to use CapsCaps () for functions and variables, because it can be confusing for a newbie.

I am going to write up a naming convention document so that readers can quickly understand why I do things the way I do them.

No one is perfect. I'm not claiming that my way is perfect, its just I have my style. No one is forcing anyone to use it. Just accept that it is MY style.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Mon Jan 15, 2007 10:57 am    Post subject: [quote]

Everyone seems to complain about style these days. Let me take a look at the coding style of these whiners...I will poke many holes in their coding style, citing reference after reference to why their style is inferior to the professionals. Before one whines about style, maybe they should take a look at their own and make some "corrections"...or maybe they should just leave a person's individual coding style the hell alone and whine about something else worth whining about (or perhaps stop whining altogether, since whining accomplishes NOTHING!).
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1624
Location: Decatur, IL, USA

PostPosted: Tue Jan 16, 2007 4:02 am    Post subject: [quote]

nodtveidt wrote:
Everyone seems to complain about style these days. Let me take a look at the coding style of these whiners...I will poke many holes in their coding style, citing reference after reference to why their style is inferior to the professionals. Before one whines about style, maybe they should take a look at their own and make some "corrections"...or maybe they should just leave a person's individual coding style the hell alone and whine about something else worth whining about (or perhaps stop whining altogether, since whining accomplishes NOTHING!).

Hehe, thanks Nod. You've always been a good friend to me.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
tunginobi
Wandering Minstrel


Joined: 13 Dec 2005
Posts: 91

PostPosted: Tue Jan 16, 2007 9:13 am    Post subject: [quote]

Good style: anything that can be read and understood by other people.

I can look at anybody's code and easily mimic their style. Capital letters, underscores, camel case, tabs versus spaces... in many places, none of that really matters, so long as it's consistent.

Obviously a team needs to agree to a naming convention when implementing an API to whatever library they're working on. But really, I'm happy if I can read it.
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Tue Jan 16, 2007 12:32 pm    Post subject: [quote]

Those "other people" are going to vary though. No one's code can be read and understood by everyone. For example: People have been parroting for ages about how great the NeHe tutorials are, but I can't make heads or tails of that crap, and I don't exactly think I'm an idiot or inconsequential. Great style? Completely open to interpretation. Furthermore, when working on a team, obviously you have to have some accepted standards, but when working on your own stuff, the only person who needs to understand it is you yourself. There are a few norms that everyone should probably follow to make their own code more readable to even themselves that in no way hinders the effectiveness of the compiler (using things such as int iVariableName is VERY effective), but beyond that, coding style is fair game.
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
white_wolf
Pretty, Pretty Fairy Princess


Joined: 13 Nov 2006
Posts: 10

PostPosted: Tue Jan 16, 2007 4:08 pm    Post subject: [quote]

nodtveidt wrote:
Those "other people" are going to vary though. No one's code can be read and understood by everyone. For example: People have been parroting for ages about how great the NeHe tutorials are, but I can't make heads or tails of that crap, and I don't exactly think I'm an idiot or inconsequential. Great style? Completely open to interpretation. Furthermore, when working on a team, obviously you have to have some accepted standards, but when working on your own stuff, the only person who needs to understand it is you yourself. There are a few norms that everyone should probably follow to make their own code more readable to even themselves that in no way hinders the effectiveness of the compiler (using things such as int iVariableName is VERY effective), but beyond that, coding style is fair game.


qft. I don't understand why DeveloperX is receiving so much criticism about this. The articles are for total noobs and as long as they understand it, who cares. And, if you're so great at coding, then write one up yourself.

good job for getting 'em out there, Dev.X.
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Tue Jan 16, 2007 4:22 pm    Post subject: [quote]

white_wolf, are you completely airheaded? I was DEFENDING DevX, not criticizing him. Get a clue!
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Tue Jan 16, 2007 6:34 pm    Post subject: [quote]

Eww, Hungarian Notation! I personally find that to be the single most ugly thing ever. Modern editors usually have discovery techniques which make it quite old. Good languages, conversely, would hardly be agile if it were used.

I do agree with the consistency thing, too. For any who care, my criticism earlier in this thread had nothing to do with the coding style of DeveloperX's code; I just don't think his abstraction is usable, even for a neophyte. A properly written abstraction should make code easier to read, not obscure it behind a bunch of meaningless, inconsistent cruft.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1624
Location: Decatur, IL, USA

PostPosted: Tue Jan 16, 2007 7:26 pm    Post subject: [quote]

white_wolf wrote:
[
qft. I don't understand why DeveloperX is receiving so much criticism about this. The articles are for total noobs and as long as they understand it, who cares. And, if you're so great at coding, then write one up yourself.

Nod has always been there defending me man, any input he has on anything is always appreciated.I think you may have misread his post, if you felt that he was 'against' me.

And, Nod, please lighten up on the wolf. ;) He's new, and I don't want him to feel the way I used to back when I had started here.

LeoDraco:
I use Hungarian notation when I work on a large project with others, because it makes it easier to quickly glance at, and understand the code. I tend to use my own subsets of it though, and as such I do make sure that I provide a 'legend' for the coding standard that was used. Sure, it IS ugly, but who said code had to be pretty? ;)

Also, I may not have said this before, but if you want to write an article that 'properly' (to you) uses an abstraction then please, by all means go ahead. I'll stick it on my site, with your name on it.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
LeoDraco
Demon Hunter


Joined: 24 Jun 2003
Posts: 584
Location: Riverside, South Cali

PostPosted: Tue Jan 16, 2007 7:45 pm    Post subject: [quote]

DeveloperX wrote:
Sure, it IS ugly, but who said code had to be pretty? ;)

Far be it for a developer who has to look at code all day to desire the code to read well and look pretty.

"Pretty" code writes faster; there are less special cases that need to be remembered and maintained. As a developer, writing code quickly is a good goal to aim toward; anything that hinders that should be deprecated, and anything that promotes that should be lauded.
_________________
"...LeoDraco is a pompus git..." -- Mandrake
Back to top  
RedSlash
Mage


Joined: 12 May 2005
Posts: 331

PostPosted: Wed Jan 17, 2007 1:10 am    Post subject: [quote]

Quote:
however, the function naming convention is not inconsistent.

I use lowercaseCapsCapsCaps () instead of CapsCapsCaps for functions.

Acutally, I was trying pointing out that DebugBox() and initializeGameEngine() were inconsistant because DebugBox() uses the CapCapCap() style whereas initializeGameEngine() uses lowerCapCap() style. Since you have established to use lowerCapCap() style, then it would make more sense to lowercase the "d" in DebugBox() as in debugBox().

Quote:

I didn't want to use CapsCaps () for functions and variables, because it can be confusing for a newbie.

definitely not! Usually most people define a different style for functions, variables and constants. This is definitely a good way to go!
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1624
Location: Decatur, IL, USA

PostPosted: Wed Jan 17, 2007 4:22 am    Post subject: [quote]

RedSlash wrote:
Acutally, I was trying pointing out that DebugBox() and initializeGameEngine() were inconsistant because DebugBox() uses the CapCapCap() style whereas initializeGameEngine() uses lowerCapCap() style. Since you have established to use lowerCapCap() style, then it would make more sense to lowercase the "d" in DebugBox() as in debugBox().


Overlooked. Sorry, I'll fix that next update.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
Nodtveidt
Demon Hunter


Joined: 11 Nov 2002
Posts: 786
Location: Camuy, PR

PostPosted: Wed Jan 17, 2007 10:38 am    Post subject: [quote]

DeveloperX wrote:
And, Nod, please lighten up on the wolf. ;) He's new, and I don't want him to feel the way I used to back when I had started here.

No problem, I'll be nice to the wolfie. :D
_________________
If you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows. - wallace
Back to top  
DeveloperX
202192397


Joined: 04 May 2003
Posts: 1624
Location: Decatur, IL, USA

PostPosted: Wed Jan 17, 2007 5:27 pm    Post subject: [quote]

nodtveidt wrote:
No problem, I'll be nice to the wolfie. :D

Hehehe, thanks man.
_________________
Principal Software Architect
Rambling Indie Games, LLC

See my professional portfolio
Back to top  
tcaudilllg
Dragonmaster


Joined: 20 Jun 2002
Posts: 1728
Location: Cedar Bluff, VA

PostPosted: Sat Jan 20, 2007 8:04 pm    Post subject: [quote]

Have you made this into a comprehensive engine, like the kind that you can make a complete game relatively quick with?
Back to top  
Post new topic Reply to topic Page 2 of 3 All times are GMT
Goto page Previous  1, 2, 3  Next 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum