Am I TRWTF for this?


  • FoxDev

    a point to be sure, i guess i've been lucky that to date i've always been on small teams that are highly focused and heve bosses that understand development.

    so far i've never not had time to check off 1 through 4 before release date (i have occasionally needed to do 5 after release date)



  • @another_sam said:

    THIS! Readability is number one concern when writing code.

    Yeah but formatting is a tiny bit of readability, and one that can be fixed automatically. (Control-K, D.)

    Much MORE important for understanding code is:

    1. Debug-ability
    2. Using appropriate levels of abstraction

    If your code is formatted correctly, but I can't follow it because the callstack is 57 levels deep, and every goddamned level is labeled "Unnamed Function" in the debugger, I hate you.


  • Discourse touched me in a no-no place

    @blakeyrat said:

    If your code is formatted correctly, but I can't follow it because the callstack is 57 levels deep, and every goddamned level is labeled "Unnamed Function" in the debugger, I hate you.

    I'm totally with blakey in this. Indeed, if the code likes to generate stack traces with 200 frames on them, most of which are noise from the framework ([spoiler]<sigh> Spring, CXF, Tomcat, Derby… </sigh>[/spoiler]) then having the levels labelled doesn't help all that much; you're still wading through irrelevance trying to find the nuggets that will tell you what actually went wrong.

    Also, if your code has nested conditionals and loops 10–12 levels deep then I also hate you (unless I can merge a few nested ifs into a single compound condition with shortcut &&) because every extra layer of nesting is an extra level of nesting of mental context that I have to understand in order to figure out what the code is doing. Hiving things off with an early return, suitable break/continue or a thrown exception, all those make me think in terms of “precondition check” or “postcondition check” and they're much easier to think about. Despite being logically the same operation.


  • BINNED

    +4

    @blakeyrat said:

    every goddamned level is labeled "Unnamed Function" in the debugger, I hate you.



  • I haven't ever seen well-designed code that didn't have consistent and clear formatting, even if that formatting didn't follow my personal preferences. As you say, automatic formatters can fix the formatting, but they can't fix the other problems the code invariably has.


Log in to reply