Re:Do you use blank lines in your code?
by bigfudge on Saturday November 06, 2010 @04:14PM
(#1877664)
At the risk of sounding humourless, this a joke right?
[ Parent
| on HN ]
Lol, yeah only kidding - I don't write minified code. No, I just skip that layer entirely and type pure gzipped data.
edit: but seriously, yeah I use tonnes of whitespace and bucketloads of comments. No point making things harder than they need to be. Also commenting helps you solidify your understanding of the code.
I tend to write like this:
while(foo) {
code;
}
rather than while(foo)
{
code;
}
I use newlines to separate tasks in the code. Example: // do the foo check
if(foo){
removeFoo();
}
// now perform the bar operation
if(shouldDoBar) {
performBar();
}
// now return
return fooBar;
Re:Do you use blank lines in your code?
by KevBurnsJr on Saturday November 06, 2010 @11:53PM
(#1878607)
Remove every comment in your last example and see if you can still read it.
I believe you will find it easier to read.
just an example, but thanks for your valuable opinion.
Re:Do you use blank lines in your code?
by lucisferre on Sunday November 07, 2010 @03:23AM
(#1879011)
I really hope you don't comment code like that and this is just a result of the example.