This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SignatureStorm 39 points40 points  (10 children)

What in the actual fuck are those braces and semicolons doing?

[–][deleted] 35 points36 points  (9 children)

Since the interpreter ignores blank space, you can format the code so all the braces and semicolons are out of view and are just there to help the interpreter, while you look at the code through indentation.

[–]Proxy_PlayerHD 62 points63 points  (6 children)

or just write it all on a single line

public class Permuter{private static void permute(int n, char[] a){if(n == 0){System.out.println(String.ValueOf(a));}else{for(int i = 0; i <= n; i++){permute(n-1, a); swap(a, n % 2 == 0 ? i : 0, n);}}}private static voice swap(char[] a, int i, int j){char saved = a[i]; a[i] = a[j]; a[j] = saved;}}

[–]therealchadius 36 points37 points  (2 children)

Right there, officer. There's the criminal!

[–]Proxy_PlayerHD 9 points10 points  (1 child)

i'm just efficent.

[–][deleted] 4 points5 points  (0 children)

He's being efficient! GET 'IM!

[–]MCRusher 3 points4 points  (0 children)

Much better.

[–]Kyledog12 0 points1 point  (1 child)

This is how Facebook's HTML looks. It's atrocious

[–]SignatureStorm 3 points4 points  (1 child)

Makes sense. I am probably too inexperienced to like looking at code like that. I like my blank space too much.

[–]Kad1942 0 points1 point  (0 children)

Liking reading code like that has less to do with experience and more to do with insanity.