4 ms·
The hardest part for me was to read an ugly formatted code with no highlights.
by kbart 10y ago
The hardest part for me was to read an ugly formatted code with no highlights.
- Superleroy 10y agoAgree, badly formatted and thus hard to read. And when you find the error you don't know where to click as it only highlights a part of the error.
- deleted 10y ago[deleted]
- chatmasta 10y agoThat's a luxury! Try finding a bug in an obfuscated binary, without access to the source code or even header files, that implements anti-debugger techniques to crash or behave differently upon first detection of a debugger.
- lorenzhs 10y agoWhat does that have to do with static analysis of C++ source code? Of course that's difficult, but the quiz is also purposefully made more difficult than it would be in real life.
- caf 10y agoOn the other hand the test is significantly easier than it would be in real life, because you know that there's a bug somewhere in the few lines it's showing you.
- svens_ 10y agoYou're right. The timer on the page put me under more stress than I'd like to admit. Maybe this is quite a good simulation of code review reality though, where you try cover lots of code in a small amount of time.
- dagurp 10y agoAnd what kind of sadist names a variable l1?
- deong 10y agoWell, there's L1 norms, Lagrange point L1, an L1 visa, etc. In any of those contexts, it's an excellent variable name. There's also the case of short little utilities. For something like strncmp (or at least my slightly naive version), I'd rather see code like int strncmp(const char* s1, const char* s2, int n) { for(; n>0; s1++, s2++, n--) { if (*s1 < *s2) { return -1; } else if (*s1 > *s2) { return 1; } } return 0; } than have code where someone attempted to come up with long "meaningful" names for each variable. There isn't really meaning here beyond "pointer_to_string1" and "pointer_to_string2", and longer names here do nothing but add visual clutter.
- scott_s 10y agoI think l1 is considered uniquely onerous because "l" and "1" render similarly in many fonts. That is, the complaint is not about x1, x2, x3, etc., it's about that specific combination.
- SixSigma 10y agoThat's an argument against highlights. The Plan9 community has to defend no highlights to n00bs.