5 ms·
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
by user24 16y ago
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;
- KevBurnsJr 16y agoRemove every comment in your last example and see if you can still read it. I believe you will find it easier to read.
- deleted 16y ago[deleted]
- user24 16y agojust an example, but thanks for your valuable opinion.
- lucisferre 16y agoI really hope you don't comment code like that and this is just a result of the example.
- user24 16y agoyeah, it was just a toy example. I also don't name variables 'foo' and have functions called 'performBar' :P