A simple WTF metric



  • The following shell command gives you a quick idea of exactly how big of a WTF you are dealing with.

    egrep -iR '\b(object|obj|string|str|integer|int|boolean|bool)[0-9]+\b' . | wc -l
    

    What does it do? I hope, for your sake, that it prints a number that is less than 2403.



  • Well, you could legitimately have typedefed something to be int64, which wouldn't really be a wtf. If its variable names though....



  • @Talchas said:

    Well, you could legitimately have typedefed something to be int64, which wouldn't really be a wtf. If its variable names though....

    With this being a neutered version of Java that doesn't let you declare variables of primitive types, it's definitely the latter.

    There's actually a reason that string1, string2, string3, etc., are used so frequently, and that reason by itself is a WTF. Since this is a web template language that doesn't allow you to declare functions, we've resorted to using templates sort of like functions, and the global [i]typeN[/i] variables are used as "arguments" to these "functions."

    It is the responsibility of the programmer to read the comments in each "function" template to figure out which "arguments" to use and what they are for. When writing a new "function" you're also responsible for cleaning up the "arguments."

    This is very, very, [i]very[/i] expensive enterprise software.



  • @Talchas said:

    Well, you could legitimately have typedefed something to be int64
    Interestingly enough that regexp doesn't trigger for int64 (afaik) although it will trigger for int8 (which SDL uses).



  • @Lingerance said:

    @Talchas said:
    Well, you could legitimately have typedefed something to be int64
    Interestingly enough that regexp doesn't trigger for int64 (afaik) although it will trigger for int8 (which SDL uses).

    It should - it matches int and then [0-9]+, which should do it. 



  • @Talchas said:


    It should - it matches int and then [0-9]+, which should do it. 
    Confused + and ?, my bad.



  • Why is this project trying to write busyness logic using a template system anyway? That sounds suspiciously like cramming the controller into the view layer to me.



  • @PSWorx said:

    Why is this project trying to write busyness logic using a template system anyway? That sounds suspiciously like cramming the controller into the view layer to me.

     

    Everyone knows that these additional so-called 'layers' merely slow down Enterprise applications!



  • @PSWorx said:

    Why is this project trying to write busyness logic using a template system anyway? That sounds suspiciously like cramming the controller into the view layer to me.

    Because it's a giant mishmash of proprietary APIs, where different things are possible in the templates (lots of business-logic stuff, of course), the single Java class they allow you to modify, and the Python scripts. You can't extend the Java class enough to be useful (you can't define any extra classes), you can't access the template stuff from Python, and vice versa.

    What would be amazing would be if they used a Python template system, or just used "good ol" JSP.



  • OK, here's a peek into the madness.



  • @djork said:

    OK, here's a peek into the madness.
    Wow.  Just wow.   



  •  Okay, no further questions.

    I think I just heard a thousand Java developers just cry out in pain... 



  • @djork said:

    OK, here's a peek into the madness.

     

    I'm going to dishonour it with a junk crap link.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.