Page 2 of 3

Posted: Mon Apr 02, 2007 8:41 am
by Oren
Ok, I think you just need to lock this topic since it's not going in the route I wanted it to go at all - just lock this topic.
onion2k wrote:The biggest problem I can see with this discussion, especially the SitePoint thread, is that a newbie coming to it may think "My script is slow, I'll delete all my comments!".
The T&D forum is not for newbies :D

Posted: Mon Apr 02, 2007 8:53 am
by Buddha443556
8. Learn a good built tool, like Phing.
Number 8 works for me though I use Perl.

Posted: Mon Apr 02, 2007 7:59 pm
by serfczar_
I think everyone should go by coding standards, it saves someone else time if you comment and indent correctly. It's just common courtesy.

Posted: Mon Apr 02, 2007 9:08 pm
by feyd
Unfortunately everyone has their own conventions. Great for some, bane for others.

Posted: Mon Apr 02, 2007 10:10 pm
by serfczar_
feyd wrote:Unfortunately everyone has their own conventions. Great for some, bane for others.
I hear you load and clear on that bane for others aspect.

Posted: Mon Apr 02, 2007 11:48 pm
by Christopher
feyd wrote:Unfortunately everyone has their own conventions. Great for some, bane for others.
I often comment that the variations in conventions are actually very trivial. The truth is that small percentage of programmers are what might be kindly called the biggest control freaks in the universe. I think that percentage is around 90%. ;)

Posted: Mon Apr 02, 2007 11:54 pm
by feyd
I would certainly agree that the conventions chosen by many, through whatever means, are quite similar and as such shouldn't be too difficult to adapt to for anyone. It's the ones that are more unique that are troubling however.

Posted: Tue Apr 03, 2007 7:49 pm
by serfczar_
arborint wrote:
feyd wrote:Unfortunately everyone has their own conventions. Great for some, bane for others.
I often comment that the variations in conventions are actually very trivial. The truth is that small percentage of programmers are what might be kindly called the biggest control freaks in the universe. I think that percentage is around 90%. ;)
90% or more maybe :P. Why do you think anyone ever programs a database driven game? Well, they can of course play god.

Posted: Wed Apr 04, 2007 6:54 am
by fastfingertips
Can you explain me this: "anyone ever programs a database driven game" i didn't understood the idea (perhaps my english knowledge leaks sometimes).

Posted: Wed Apr 04, 2007 7:46 am
by John Cartwright
He was referring to how programmers a are typically control freaks, hence wanting to play god in making a game.

Posted: Wed Apr 04, 2007 1:11 pm
by RobertGonzalez
Comments are a necessary part of the code unless you plan to maintain it daily yourself. Have you ever gone into an app, even your own, and see something in there that had no comments, that, even though the logic screamed out to you, it still did not quite look like it should but you didn't know why?

I thought that thread was about shortening code by not assigning variables?!?!?! :!::?::?

Posted: Wed Apr 04, 2007 1:20 pm
by Oren
It was about the whole thread and the posts in this thread.

P.S In this context, thread = the thread on SitePoint which I linked to.

Posted: Wed Apr 04, 2007 6:35 pm
by alex.barylski
I find it interesting watching the evolution of comments.

When programming assembler it is absolutely nessecary as the machine code mnuemonics are nothing in terms of explaining what is going to be done. Commetning each line, step by step was essential...

Years later, we have almost self documenting code (at the comment level anyways) in that using a strict, logical convention is almost as good as comments. I still use comments, mostly for API documentation (phpDocumentor) and I leave little caveat notes, but I can't stand when people comment for the sake of commenting...

Still in PHP I see

// Initialize variables

Likely guilty of this myself...but honestly thats about the most worthless comment on the planet. I'm trying to get into the habit of making proper comments, but instead of every second line or so, every logical section of code. That helps in keeping code clean from comments...

There is truely an art to commenting I believe, but as an art it's subjective, so I guess were all free to form our own opinions...

PHP is high level enough you could probably get away without commenting much, you almost have to step through the code first anyways...

Posted: Wed Apr 04, 2007 10:43 pm
by feyd
Odd, I rarely commented in my Assembler code.

:twisted:

Posted: Thu Apr 05, 2007 2:54 am
by Oren
feyd wrote:Odd, I rarely commented in my Assembler code.

:twisted:
I didn't even know I could comment my Assembler code :P