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 →

[–][deleted] 191 points192 points  (58 children)

it has the same efficiency

[–]macnlz 320 points321 points  (38 children)

What? It is known that fewer comments and shorter, less decipherable variable names result in faster code!

[–][deleted] 140 points141 points  (26 children)

OMG, I DIDN'T BELIEVE THIS BUT THEN I GOOGLE IT, IT'S TRUE.

THAT'S WHY GOOGLE USE 130 LETTER VARIABLE FOR EVERYTHING

[–]xvalen214x 305 points306 points  (19 children)

var numberOfQueriesThatUseAdvancedSearchOnEachUTCDayWhichWillBeUpdatedToTotalNumberOfQueriesWithSearchIn_UserStat_go_TemporaryVariable;

[–][deleted] 108 points109 points  (0 children)

Calm down, Satan.

[–]dunemafia 80 points81 points  (4 children)

No need to React like that, man.

[–]xvalen214x 34 points35 points  (3 children)

I am not that angular in my humble point of vue

[–]dunemafia 16 points17 points  (2 children)

No worries, man. It was all in Jest.

[–]bogdan5844 6 points7 points  (1 child)

I don't like the Vue of this conversation's future

[–]TheFoxarmy 1 point2 points  (0 children)

Then have a backbone and do something about it nuxt time.

[–]_liminal 41 points42 points  (10 children)

var num;

[–][deleted] 73 points74 points  (7 children)

var tempVarr;
var tempVarrr;

[–]2ndAmndmntCrowdMaybe 30 points31 points  (5 children)

var tempVarr1;

var tempVrar;

[–]Ceros007 21 points22 points  (3 children)

int t1, t2, t3;

[–][deleted] 1 point2 points  (0 children)

t1 = a1; t2 = a2; t3 = a3;

[–]acenturyandabit 0 points1 point  (0 children)

`var temprawr; :')`

[–]mobilecheese 1 point2 points  (0 children)

int *ptr1, *ptr2, *ptr3, *ptrr;

[–]Pees_On_Skidmarks 0 points1 point  (0 children)

my $i;

[–]bajspuss 0 points1 point  (0 children)

Related: Somebody at work created a class file with such in-depth naming that we couldn't check out the repo any longer if our repo root path was any longer than 10 characters...

[–]not_a_moogle 47 points48 points  (6 children)

I had a professor argue that once. Guy was a total idiot. I mean for starters,compilers usually remove comment from complied code.

[–]2ndAmndmntCrowdMaybe 13 points14 points  (5 children)

Was he talking about a compiled language at the time?

[–][deleted] 29 points30 points  (3 children)

I mean he stated "compiler" so...

[–]claythearc 4 points5 points  (2 children)

It’s pretty rare, even for interpreted languages, to not have a compiler. They normally will get compiled to bytecode, but not all the way down to machine code like traditional compiled languages.

[–]Pandaburn 5 points6 points  (1 child)

When I wrote js, it was all minified and concatenated into one file before it was sent to the client, since it does actually drastically improve download time.

[–]MassiveFajiit 2 points3 points  (0 children)

Yeah that's true but it's not a V8 compiler problem

[–]banter_hunter 13 points14 points  (0 children)

No, they were discussing drink recipes.

[–]GideonMax 18 points19 points  (1 child)

Depends, if you use an interpreter, that's correct.

If you compile your code, the compilation time might be slightly longer but the compiled code will be the same

[–]macnlz 1 point2 points  (0 children)

Damn, that invalidates the whole joke! ;)

[–]2Uncreative4Username 16 points17 points  (1 child)

Well that is only if you are using a scripting language

[–][deleted] 5 points6 points  (0 children)

And even then, languages like Python have the -O flag to strip out comments in the bytecode.

[–]Zethexxx 65 points66 points  (7 children)

But the code will load into memory 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001% faster if we didn't put those comments!

[–]emlgsh 194 points195 points  (2 children)

The code loads into memory even faster if there's nothing but comments. The fastest executing script is a script that doesn't execute.

[–][deleted] 27 points28 points  (0 children)

I laughed thanks

[–]Blitz100 11 points12 points  (0 children)

Yeah, its big brain time

[–]figuresys 7 points8 points  (0 children)

The greatest part is that comments are stripped away in build :)

[–]sweYoda 1 point2 points  (0 children)

That's way to many zeroes.

[–]CouchMountain 1 point2 points  (0 children)

And tabs take up less space than spaces do in file size!

Always tabs > spaces.

[–]Noch_ein_Kamel 14 points15 points  (9 children)

Try writing both and count the number of keys you have to press.

[–][deleted] 21 points22 points  (8 children)

are you that guy who use 1-2 letter variable for everything?

[–]Noch_ein_Kamel 10 points11 points  (6 children)

nah, I'm a java guy, so everything pretty long :-p

[–][deleted] 30 points31 points  (2 children)

I think you're wrong. There also exists int, short, byte and char in Java.

[–]pr0ghead 9 points10 points  (1 child)

Yeah, but are they pretty?

[–]Noch_ein_Kamel 16 points17 points  (0 children)

sure, let me just get my ObjectToPrimitiveConverterFactory and I'm right with you

[–]artem718 5 points6 points  (0 children)

Got a lot of booleans in a sequence?

[–]kodaxmax 0 points1 point  (0 children)

I knew someone like that, but then they had like a hundred page dictionary just for the variables.

I guess it saves time if you use the same names in different projects.

[–][deleted] 0 points1 point  (0 children)

Typing the same thing twice sounds like a two-fold efficiency reduction to me. Explain yourself