• Prime Mover (unregistered)

    Every project in every company in the world has some broken stuff lying around somewhere unused.

    A bit like how every society, despite how efficient and dynamic it claims to be, always has people in it who etc. etc.

  • Brian Boorman (google)
    var g = {};
    
        g.comment = comments.comment;
    
        g.c = g.comment;
        }
    g.c ("frist");
    
  • dpm (unregistered)

    I am trying to imagine the excuse this "developer" would have to come up with to prevent me from firing him for creating member names "i" and "l" and "ll", and none come to mind. WhyTF do I need someone polluting my codebase with counter-productive names?

  • RLB (unregistered) in reply to dpm

    "Efficiency".

  • some guy (unregistered) in reply to dpm

    lazyness in typing

  • Anonymous') OR 1=1; DROP TABLE wtf; -- (unregistered)

    I'd guess that g probably stands for 'globals'.

  • (nodebb)

    When I talk to people who dislike TypeScript, stating that they don't like all the boiler plate code, ceremony and needing to use a compiler, I imagine it's because they write code like this in which things like "strong typing" and compilers just "get in the way" of them delivering code.

  • JB (unregistered)

    TRWTF is not using Typescript or something to make this cause an immediate build failure.

  • static (unregistered)

    this one actually makes sense to me (with the exception of the errors, obvs). It's just a utility script meant to be used in the console, not part of the software, hence the focus on terseness. You might as well complain about unix.

  • my name (unregistered) in reply to dpm

    Increasing cost of keyboards?

  • Could be Better (unregistered) in reply to static

    Nice point about the terseness of linux commands. However, at least there are man pages for those. This one should at least have the word "log" in it.

  • L (unregistered)
    Object.prototype.util = {}
    

    ...fixed (lol)

  • Yazeran (unregistered) in reply to Could be Better
    <quote> Nice point about the terseness of linux commands. However, at least there are man pages for those. This one should at least have the word "log" in it. </quote>

    Ouch, brings me back to my biggest fumble to date. I had build a data logging framework and obviously needed some sort of error handling (if hardware devices such as furnace controllers etc did not operate properly), and I didn't want to type errorlog() each time when I could just as well short it to a 3 letter function name..

    Guess what, I chose the name log for my errorlog function, completely forgetting that there already existed a perfectly fine function with that name, and being Perl it of cause allowed me to fire at my own foot by allowing me to overload the core log function with my own. And as my errorlog returned 1 on success (meaning that it could write to the log file), a few years later when i needed to do some math as well I had to take the logarithm of some number close to 2.6 (but not exactly e). For weeks couldn't understand why

    1. an lot of numbers showed up in the error log and
    2. the calculations was slightly off (by a few percent)..

    You can bet I felt stupid when I finally discovered what I had done......

  • xtal256 (unregistered) in reply to static

    "You might as well complain about unix."

    I could complain about Unix all day. All those stupid 2-3 letter abbreviations for commands. You know it's dumb when they shorten a 4 letter word down to a 3 letter word!

  • Jaloopa (partially registered) (unregistered) in reply to static

    You might as well complain about unix

    I do, regularly

  • (nodebb) in reply to Prime Mover

    always has people in it who etc. etc. ?

    who? what? Vote wrong? Live on the streets? become bankers? hate other people? do free love? give hugs?

    please do not keep us waiting....

  • (nodebb)

    If it is 3rd party, wrap-it. If is is first party, and may go away [aka Silverlighted] wrap-it. This technique has oft allowed me to adapt to vendors going out of business and all related, in a matter of days or weeks, while others straight for months or years or simply give up.

  • Randal L. Schwartz (google)

    "I tried strong typing once.... nearly ruined my keyboard!"

Leave a comment on “Golfing Over a Log”

Log In or post as a guest

Replying to comment #:

« Return to Article