Anyone else think this is by far the most boring technical debate ever to hit HN?
"In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake."
51–60 of 125 posts
Anyone else think this is by far the most boring technical debate ever to hit HN?
"In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake."
Anyone else think this is by far the most boring technical debate ever to hit HN?
Haven't yet seen anyone point out what unpleasantly quirky code this was in the first place: !isActive && $parent.toggleClass('open') It should have been written like this: if (!isActive) { $parent.toggleClass('open'); } What if somebody needs to add a second bit of code to be executed if isActive is false? In the first case, they'd have to refactor the code into an if statement before adding it. It should have been…
!isActive && ($parent.toggleClass('open') || do_something_else())
but this is write-only code.This actually reminds me of some cool hacks with structure pointers and functions in the Linux kernel.
All the people arguing that the code as was presented should is good and right, I present this: Everyone knows that debugging is twice as hard as writing a program in the first place. So if you are as clever as you can be when you write it, how will you ever debug it? ~Brian Kernighan I couldn't tell that the second line in the code in question was an if statement at first without actually thinking about it. How is t…
Anyone else think this is by far the most boring technical debate ever to hit HN?
It was interesting for me to learn about the possibility of using that kind of '!' notation in JS, even if it's impenetrable to most other developers. Maybe I'll be able to parse some other hipster's code thanks to this.
Earlier quoted context omitted.
Disagree. This is so much worse than that. At least with Hungarian notation (which thankfully died a well-deserved death), its advocates were arguing for a relatively well thought-out system of readability and tying member names to their types for quickly-identifiable scope and type referencing. But, to suggest that simply removing semicolons constitutes some grand gesture towards readability, simplicity, or somethin…
But you're... you're doing it. Look at yourself. You have a strong opinion about using semicolons.
"We have met the enemy, and he is us."
I come from a Python background. However, thanks to work and school, I now program mostly in JavaScript, PHP, and Java (though I still use Python when I get a chance). Now, I could use underscore_names in Java and JavaScript, but I don't. Even though I personally prefer underscore_names to camelCaseNames, I also realize that those languages are designed with camelCaseNames in mind, that the community conventions are…
If you're in a position where you can define that idiom, then by all means do so. But stay consistent so that when others join a project, or you leave a project, the intent of your codebase is well understood without needing to wade through pages of documentation.
So, IMO, while semicolons are important, they're relatively trivial and an easy "bug" to fix. If I'm looking for an authority, I typically check out the Google Style Guides.
A similar, though more pressing issue that I've faced recently is the proper parenthization of conditions for if. It's generally nice when you don't have to spend a minute or two remembering/looking up the nuances of C++ operator precedence. Know all of the intricacies and tricks for a language doesn't mean every member of your team knows them that well either.
I come from a Python background. However, thanks to work and school, I now program mostly in JavaScript, PHP, and Java (though I still use Python when I get a chance). Now, I could use underscore_names in Java and JavaScript, but I don't. Even though I personally prefer underscore_names to camelCaseNames, I also realize that those languages are designed with camelCaseNames in mind, that the community conventions are…
Anyone else think this is by far the most boring technical debate ever to hit HN?
One side chooses a style that they find aesthetically-pleasing even if it causes issues for some small subset of potential users.
The other side is flabbergasted that someone would be so reckless and argues for the sensible, safe option, which requires simply terminating your lines of code with an extra character, making those few issues for a small subset of potential users vanish instantly.