What's your preference is spacing

For all its other colossal failings, ClearCase is capable of understanding code structure. It just takes a $200/hr Certified ClearCase Admin to do anything with that functionality. Another IBM tool, the ancestor to Eclipse, Visual Age for Java, had the right idea, which was to store the code in a database, much as Smalltalk stored it in the system image.

Of course, only IBM could name a product “VAJ”

I end up with tons of white space between things like if statements or loops

}else {

VOMIT

everything needs new lines… perhaps this is why my razers scroll wheel has died so young

Be my new best friend.

Compact code is best code. Spare your return keys and scrolling wheels, write proper code!


if(condition) {
    System.out.println("Steve Jobs is dead!");
} else {
    System.out.println("Rick Astley is dead!");
}

my return key is fine. my WASD keys, however have the letters worn off.

Im quite strict about that stuff and hate the java usual way
readability is of the up most importance


public void method()
{
     if (thing == otherthing)
     {
           System.out.println("Yay!");
     }
     else
     {
           System.out.println("No!!");
     }
}

I think I just threw up in my mouth a bit.


public void method() {
    if(thing == otherthing)
        System.out.println("Yay!");
    else
        System.out.println("No!!");
}

Agreeing to disagree is actually a nice thing.

Shall we end this mindless discussion?

Nope.

System.out.println(thing == otherThing ? "Yay!" : "No!!");
find . -name '*.java' | xargs perl -pi -e 's/^\s*/" " x rand(40)/e'

ugh!

	player p=serv.getplayer(clientnum);
	commandmodule e = (commandmodule) serv.getentity(p.myship);
	if(e!=null)
	{
	
		
		
		camx=e.x;camy=e.y;
		
		System.out.println(e.dx+" "+e.dy);
		
	}
	
	camera2d.set(camx, camy, zoom);
	
		
	drawgrid(camx,camy);

Riven could “easily” render the entire discussion totally moot by allowing people to select different formatters for the code tags in SMF. Then you’d all see code formatted in the way you wanted it and the arguments would look rather silly :slight_smile: Which is sort of the point I was making about version control systems. Why the formatting of an ASCII file has any bearing on modern day programming is beyond me. And fuck Python.

Cas :slight_smile:

I always like to use brackets



if (val) {
     System.out.println(val);
}
else {
     System.out.println(val);
}


I actually don’t mind all of the styles presented here, If I were just reading code its fine. What I don’t like is when people FORCE me to use something else. I think I’ve had a comment once that the above example is “unreadable” and should be converted into this.



if (val == true) 
{
     System.out.println(val);
}
else 
{
     System.out.println(val);
}


ugh :-X

Back when dinosaurs roamed the earth and folks (other than me) used CVS, we had per-user/per-file-type formatting on in/out operations. Surely stock new-jack VCS allow for these kinds of hooks.

people just need to learn how to read code in general. I read in some programming tips book that this one guy’s employer made everyone comment every single line. Ridiculous. >:(

Reading code is easy. Even more primitive languages like C++ and assembly code or files with minimal whitespace and no newlines. At worst you can just start in the main source file and mechanically parse the source file top to bottom like a compiler. Though that could take ages. The hard part is doing it efficiently, which is only possible when the code is well written for people and computers. Programmers (should) know that they can’t count on faster hardware to fix slowdowns due to naive algorithms or data structures. A programmer shouldn’t rely on other smarter programmers to fix personal failings.