[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
You faggots will argue about anything. Incoming shit storm, brace
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 23
Thread images: 1
File: g will argue aboot anything.jpg (37 KB, 376x273) Image search: [Google]
g will argue aboot anything.jpg
37 KB, 376x273
You faggots will argue about anything. Incoming shit storm, brace for impact.
>>
traps > women

this is indisputable
>>
Top one.
>>
Watch out boys, we have a purist over hurr.
>>
>>53568231
if (herp)
derp;

There's just one statement, no need for curly braces.
>>
>>53568370
Stop putting spaces after keywords you nigger
>>
if(
herp;
){
derp;}
>>
if(foo)                            {
bar() ;
}
>>
>>53568436
This is clearly The Right Way to do it
>>
if(herp){derp;}


>not minimising your filesize by removing unnecessary whitepace
orphans in china could have eaten those bytes
>>
if (herp) { derp; }
>>
>imperative programming
Fucking peasants, stop living in the past
>>
>>53568231
What about
if (herp)
{derp;}
>>
i dont mind either but i kinda dislike how else statements look with the second one
>>
if(herp) derp;
>>
>>53568478
OP here, I like!
>>
>>53568475
what did this come out when you gave your PostFactory a null reference or something?
>>
>>53568478
if
(
test
)
{
true;
}
else
{
false;
}
>>
This is a no-brainer. The real faggotry test is how you handle `else`:

if(herp) {
derp;
} else {
hurr;
}


or

if(herp) {
derp;
}
else {
hurr;
}


ib4
herp ? derp : hurr;
>>
>>53568549
derp if herp or hurr
>>
I use both, but most of the time the second, because it just makes it easy to identify code blocks when scanning a file that contains tens or hundreds of thousands of lines of code

If everything was like the first, I'd have to pause every time I find a closing brace, to look for the opening brace, so my brain can figure out where this block starts.

People who think 1000 lines is a "lot of code" will never understand what I'm talking about.

It all comes down to wanting to write clean code imo, when declaring variables I first group them (User variable, temp variables, etc...) then separate them with spaces so when you're reading the code, you don't have a huge collection of variables, but rather groups of them, each group having whitespace before and after the other group, with perhaps a little comment explaining what they are.

just my 2 cents
>>
>>53568231
if (
foo
&& bar
|| baz
&& qux
) {
asdf();

} else if ( quux ) {
qwerty();

} else {
xyz();
}
>>
>>53568243
Traps do not exist in the 3D world
There are only men and women (with or without mental issues)
Thread replies: 23
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.