Pages: 1 [2]
  Print  
Author Topic: GL Lighting  (Read 5272 times)
Offline (Male) RetroX
Reply #15 Posted on: July 23, 2010, 09:06:50 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Quote
Ism, I hate your method worse. :/
At least my method has some logic behind it.
All of the methods have logic except for the double indent.  It's just that I find yours annoying because it has no symmetry on the braces.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Female) IsmAvatar
Reply #16 Posted on: July 23, 2010, 10:58:59 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
The braces are aligned.
Logged
Offline (Male) RetroX
Reply #17 Posted on: July 24, 2010, 09:33:59 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
The braces are aligned.
if() {
}

vs.
if()
{
}

Symmetry.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Female) IsmAvatar
Reply #18 Posted on: July 24, 2010, 11:01:38 AM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
I thought you were referring to my other method, which I use for Java.

I use that method for C and GML simply because I'm trying to save vertical space because the IDEs I use don't have good ways of saving vertical space for me, like Eclipse does.
Logged
Offline (Male) RetroX
Reply #19 Posted on: July 24, 2010, 12:04:19 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Well, my screen is 1200 pixels high, and I can scroll six lines at once.  So, it doesn't really matter for me.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Female) IsmAvatar
Reply #20 Posted on: July 24, 2010, 06:01:02 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
Well my hair is a bird, so your argument is invalid.
Logged
Offline (Unknown gender) score_under
Reply #21 Posted on: July 24, 2010, 06:44:01 PM

Member
Joined: Aug 2008
Posts: 308

View Profile
I'm trying to save vertical space because the IDEs I use don't have good ways of saving vertical space for me
This is part of the reason I use Notepad2 for coding. You can also zoom out if things get bad.

And then of course... some monitors can rotate, if the worst comes to the worst ;)
Logged
Offline (Male) RetroX
Reply #22 Posted on: July 24, 2010, 06:48:31 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
And then of course... some monitors can rotate, if the worst comes to the worst ;)
Good luck rotating my bigass CRT and getting anything out of that.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #23 Posted on: July 25, 2010, 12:07:14 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2925

View Profile Email
I myself can't stand when you have snippets like this:

Code: (C) [Select]
if (something)
{
  something_minuscule();
  continue;
}

So, of course, I never put one-liners in braces

Code: (C) [Select]
if (something)
  something_minor();

Most people don't. And I do my very best to cram things into one line, even if they end up getting pretty ugly themselves...

Code: (C) [Select]
something ? something_unremarkable() : void();
Operator, is nice, too...

Code: (C) [Select]
if (something)
  a++, b++, c++, d=e=f;

And then there's those times I just totally ugly it up because continue and operator, don't agree.

Code: (C) [Select]
if (something)
  { something_tedious(); continue; }

And if I've got two things that really need done, I group them like Ism does.

Code: (C) [Select]
if (something) {
  thing1();
  thing2();
}

I'm not afraid to put a continue; or the like after thing2(), either.

But when I'm navigating code flow, Ism's method makes my skin crawl, and I hate the rest of your proposals, too. Of course, that's just my opinion. It's one thing to waste space, it's another to cloud structure.
« Last Edit: July 25, 2010, 12:12:41 AM by Josh @ Dreamland » Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Female) IsmAvatar
Reply #24 Posted on: July 25, 2010, 12:17:37 AM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
You're welcome to submit your own proposals, but your format is inconsistent at best, making it hard to write formatting rules for.

That said, you're obviously allowed to use your coding style and never use the formatter.
Logged
Offline (Male) Josh @ Dreamland
Reply #25 Posted on: July 25, 2010, 12:21:59 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2925

View Profile Email
As usual.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: 1 [2]
  Print