• VR (unregistered) in reply to sarge
    sarge:
    Problem is a lot of WTFers out there would consider this as good code - why, it's got logging like a proper enterprise app!

    Anyone else noticed the mysterious methodName variable at the top? Has to be a static member is it's a static method. Hope this isn't multi-threaded code.

    Captcha: consequat - almost inconsequential?

    If you need to log at this level, AOP is a much better option.

  • Quirkafleeg (unregistered) in reply to Pedro
    Pedro:
    This is what happens when you have a CTO that doesn't code anymore. They fall for the fancy words and the cost savings that will occur with outsourcing. As usual they find out you get what you pay for.
    Then they find out that you pay for what you get.
  • ybungalobill (unregistered)

    There is an error in the code (probably): no logger.exiting call when returning false.

  • Defininendum (unregistered)

    I thinbk it only returns false when null is passed, because it catches all exceptions.

  • Ciprian (unregistered) in reply to steenbergh

    When param is NULL will return FALSE.

  • Anonymouse (unregistered) in reply to anonymous

    OT, but jumentum is latin for a mule or other similar creature used for carrying

  • dev0 (unregistered) in reply to frits

    JAspect might help them insert log statements into each method without having to retype them and maintain them.

  • raichoup (unregistered)

    reading at the code I can guesstimate that this Company is wipro. I can also explain why the developer did that: he has a variable portion of income which is based on statistics such as amount of line coded/bug ratio. Hence the need for them to produce megatons of useless code that does not break and can still be "justified" (i.e. a bit clever than just doesnothing() functions.

    Sometime the explanation is not related to IT. It is just that those people do not share the interests of your company, like any other consultant. They don't work for you, they work for that CMMI 5 worldCompany that has stupid metrics, this is it.

  • Gollum (unregistered) in reply to ath

    No, you can't

  • Gollum (unregistered) in reply to ath
    ath:
    I wonder if you could write a "log-file-compiler" taking the log file as input and producing a fully functional program?

    No

  • Gollum (unregistered) in reply to Gollum
    Gollum:
    ath:
    I wonder if you could write a "log-file-compiler" taking the log file as input and producing a fully functional program?

    No

    My bad - Hit submit too soon.

    You'll need log files for every possible input/output combination of the program. Not feasible.

Leave a comment on “isValidNumber()”

Log In or post as a guest

Replying to comment #:

« Return to Article