Not really configurable



  • I was asked this morning to "just add a comment field" to a small ASP application.  The previous programmer got part way through this, so the field exists on the front-end page.  Did I mention the databse login it uses is strictly read-only?  So it's not a 1-hour job but still a lot simpler than "Just make it do everything amazon.com does."

    OK, time to dive into the code.  There's a couple of include files and near the top of the main file is a reference to a function called GetConfigSetting.  Great.  Where does it store this configuration?  The database or an ini file somewhere?  Searching the included files turns up nothing.  Reviewing the code file shows me where the function is used in the code and keeps bringing me back to the first place I saw it at the top of the file.  OK, I need to read more than one line to understand what's going on here:

    function GetConfigSetting(setting)
       GetConfigSetting = "4"
    end function

    Well that was a complete waste of a function call.  Instead of burying a magic number in the code in the one place that it is used, we have a magic function.  It takes an input string for the item being requested and then returns the magic number.



  •  There wasn't, by any chance, any comment mentioning a dice nearby?





  • @Indrora said:

    Its an RFC, no less.

    Do it again and I cut your face.



  • @morbiuswilters said:

    Do it again and I cut your face.


    An invitation like that is too good to pass up..






















  •  @Indrora said:

    Its an RFC, no less.

    I was wondering who was going to be the first to post that.



  • @amischiefr said:

     @Indrora said:

    Its an RFC, no less.

    I was wondering who was going to be the first to post that.

    I was about to do it.




  • @Dr Frankenstein said:

    @amischiefr said:

     @Indrora said:

    Its an RFC, no less.

    I was wondering who was going to be the first to post that.

    I was about to do it.

    So basically you all have the same exact (worthless) thoughts and killing all but one of you would have any appreciable impact on the world.



  • @morbiuswilters said:

    @Dr Frankenstein said:

    @amischiefr said:

     @Indrora said:

    Its an RFC, no less.

    I was wondering who was going to be the first to post that.

    I was about to do it.

    So basically you all have the same exact (worthless) thoughts and killing all but one of you would have any appreciable impact on the world.

    No, we all just understand that sometimes life imitates XKCD. Such as the person who sent RMS a katana. TRWTF is that the compiler doesnt catch an unused parameter.



  • @Indrora said:

    TRWTF is that the compiler doesnt catch an unused parameter.

     

    a) Is ASP compiled?

    b) Why should it (if -Wall isn't turned on)?



  • @Indrora said:

    No, we all just understand that sometimes life imitates XKCD. Such as the person who sent RMS a katana.

    No, that was a demonstration of the fact that there are a lot of unfunny people in the world who make references to things and think that somehow qualifies as wit.


  • @bstorer said:

    @Indrora said:

    No, we all just understand that sometimes life imitates XKCD. Such as the person who sent RMS a katana.

    No, that was a demonstration of the fact that there are a lot of unfunny people in the world who make references to things and think that somehow qualifies as wit.

    Who said I was passing off the XKCD as wit? The addendum was the wit. :)



  • @bstorer said:

    @Indrora said:

    No, we all just understand that sometimes life imitates XKCD. Such as the person who sent RMS a katana.

    No, that was a demonstration of the fact that there are a lot of unfunny people in the world who make references to things and think that somehow qualifies as wit.

    QFT.



  • PSWorx was somewhat witty. Everyone else was [url=http://tvtropes.org/pmwiki/pmwiki.php/Main/DontExplainTheJoke]explaining the joke[/url].



  • @Random832 said:

    PSWorx was somewhat witty. Everyone else was explaining the joke.

    That's like saying "the murderer who puts a bullet in your head before he rapes, tortures and kills your tied-up family is somewhat moral, as compared to the one that pries your eyelids open and makes you watch the whole thing before finishing you off".  Sure, it's true, but it doesn't make your family any less raped or dead.



  • @morbiuswilters said:

    That's like saying "the murderer who puts a bullet in your head before he rapes, tortures and kills your tied-up family is somewhat moral, as compared to the one that pries your eyelids open and makes you watch the whole thing before finishing you off".  Sure, it's true, but it doesn't make your family any less raped or dead.

    Well, serves you right for tying up your family when there are rapists about. Given that scenario, the rapist is just a visctim of circumstances.

Log in to reply