Camen Design Forum

Delete

(Leave this as-is, it’s a trap!)

To delete this post you must be either the original author or a designated moderator.
The content of the post will be removed but the name and date will remain.

  • The post will be removed completely from the thread, rather than blanked
  • Only posts on the last page of the thread can be removed completely (so as to not break permalinks)

RE: "Web Languages" Pet Peeves

Johann

"I also hate anybody who puts the opening brace on the next line :P [..] What is the point of that!"

Actually that was the one "peeve" I was going to post... I *need* to have opening and closing curly braces to match up! Mostly so I don't get lost in the rather, uhh, unelegant code I write hehe.

For example:

if (some_condition || some_other_condition || yet_another_condition || i_hope_you_get_the_idea_by_now)
{
do stuff;
if (some_condition || some_other_condition || yet_another_condition || i_hope_you_get_the_idea_by_now)
{
do stuff;
}
}

is *much* easier on the brain, at least on mine, because wether you have wordwrap on or off, at least the curly braces will always match up, and that makes navigating code much easier for me. With complicated MYSQL queries I will do something similar (at least until I figured them out, then I might compact them again).

WHERE
column1 = blah
AND
column2 = bleh
AND
(
column3 = bluh
OR
column4 = bluh
)

Sure, that's not exactly a complicated query, but you get the idea? Generally I tend to "waste text editor screen estate" instead of commenting a lot.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn