The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Nuns and Regexes Do Not Mix

Last post 03-28-2008 11:12 by alexg. 28 replies.
Page 1 of 1 (29 items)
Sort Posts: Previous Next
  • 03-27-2008 1:44

    Nuns and Regexes Do Not Mix

    We run an old text game built on an ancient and mysterious codebase.  It occasionally does strange things for reasons that've been lost to the mists of time.

    Sometimes it refused to create new characters.  It loathed certain names with a passion, like 'Counterlock', and nothing would explain why.  No error message, nothing at all, just abject silence and a failed system call.  This happened extremely rarely, fortunately, but really bunged the system up good when it did.  We'd have to dig in and delete the offensive objects before the application system could resume normal operation.

    When it broke down on Pandamonium, I got mad.  I dove into the source itself and added trace statements through every step of the process.  Finally I stumbled into a function that appeared to be checking for, hmm.....  jerks?  previously banned players, perhaps?  This is what printf revealed:

     

    The offending function has been replaced with a stub that always returns zero, and we can at long last name characters 'damn', 'fuck', and 'shit' if we well and truly want to.

    Filed under:
  • 03-27-2008 3:17 In reply to

    Re: Nuns and Regexes Do Not Mix

    Is "." what you meant to say?

     

    Anyway, my guess was that your program was the spelling police because "Pandamonium" is not a word.

  • 03-27-2008 5:19 In reply to

    Re: Nuns and Regexes Do Not Mix

    Use a different browser, you can't see the image in IE6

  • 03-27-2008 6:10 In reply to

    • Nelle
    • Top 150 Contributor
    • Joined on 11-08-2007
    • graz.at.earth.milkyway.universe
    • Posts 186

    Re: Nuns and Regexes Do Not Mix

    I think CorUscaNT would fail too ...

     

  • 03-27-2008 6:38 In reply to

    • bobday
    • Top 150 Contributor
    • Joined on 04-04-2005
    • Notbugville
    • Posts 175

    Re: Nuns and Regexes Do Not Mix

     sucks if you want to be an assassin

  • 03-27-2008 7:49 In reply to

    • TDC
    • Top 200 Contributor
    • Joined on 02-10-2006
    • Posts 133

    Re: Nuns and Regexes Do Not Mix

    bobday:

     sucks if you want to be an buttbuttin

     

    Indeed. 

  • 03-27-2008 10:06 In reply to

    Re: Nuns and Regexes Do Not Mix

    Judging by the removal of repeated letters (*b*u*t*h*e*a*d*, *c*u*n*y*) it seems that whoever wrote this was expecting the '*' to only match the same letter repeated (so as to match things like daaaaaaaaaaaaaaaaamn), which isn't too much of a WTF if they wern't used to this regex syntax.

    The fact that they obviously didn't test very well is the real problem (probably only tested to make sure it would match what they wanted, which it does, but forgot to test that it doesn't match what they don't want it to).

  • 03-27-2008 10:13 In reply to

    • rbowes
    • Top 50 Contributor
    • Joined on 02-09-2007
    • Winnipeg, MB
    • Posts 411

    Re: Nuns and Regexes Do Not Mix

    Cuny?

  • 03-27-2008 10:36 In reply to

    Re: Nuns and Regexes Do Not Mix

    rbowes:

    Cuny?

    Guess the programmer had something against the City University of New York 

    This user has retired from TDWTF Forums, citing complete incompetence on the part of the moderators. Please continue to spam the addresses below.

    PLEASE SPAM:
    jtobin@ohioinstituteofhealthcareers.edu
    jtobin@ohiobusinesscollege.edu
  • 03-27-2008 12:05 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    And just think, if you had spelled "pandemonium" correctly you never would have found the bug.

     

    What Would Brian Boitano Do?
  • 03-27-2008 12:38 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    Mithious:

    Use a different browser, you can't see the image in IE6

     

    Not using IE6, but I guess that's yet another wtf in this thread.

  • 03-27-2008 12:58 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    Mithious:

    Use a different browser, you can't see the image in IE6

     

    Well what do you know ...  

    There are three kinds of people: those who make things happen, those who watch things happen and those who wonder what happened.
  • 03-27-2008 1:04 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    Mithious:
    Use a different browser, you can't see the image in IE6
    I was thinking about it, and the only thing I could think of is that it might have something to do with the encoding. For instance, I forgot that IE6 doesn't recognize the alpha channel correctly. I created a theme for my blog and only tested it in Opera (I know, I know). It looked great to me. However, when my wife viewed it in IE6 (I don't know why she won't use something else), the areas that were supposed to be transparent on the little icons showed up as black. Months later, I have yet to swap them out for GIFs.

    Join us at #TDWTF on irc.slashnet.org !

    Filed under:
  • 03-27-2008 1:15 PM In reply to

    • elias
    • Not Ranked
    • Joined on 02-05-2008
    • Posts 3

    Re: Nuns and Regexes Do Not Mix

    Apparently this is it:

  • 03-27-2008 1:22 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    elias:
    <absolutely nothing of consequence>

    umm ... what were you trying to say when you said nothing there? 

    This user has retired from TDWTF Forums, citing complete incompetence on the part of the moderators. Please continue to spam the addresses below.

    PLEASE SPAM:
    jtobin@ohioinstituteofhealthcareers.edu
    jtobin@ohiobusinesscollege.edu
  • 03-27-2008 1:23 PM In reply to

    • elias
    • Not Ranked
    • Joined on 02-05-2008
    • Posts 3

    Re: Nuns and Regexes Do Not Mix

    I think the problem with the original post is this:

    <img src="http://img81.imageshack.us/img81/6797/pandamoniumew6.png" alt="" align="" border="" height="" hspace="" width="" />

    Edit: I was posting the image so that it would display in IE.

    Filed under:
  • 03-27-2008 2:02 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    elias:
    I think the problem with the original post is this
    Oh yeah. That probably did it. Opera, as well as many other browsers, obviously ignore empty attributes, but IE6 interprets that to equal zero. I guess IE7 learned null != 0 != string.Empty

    Join us at #TDWTF on irc.slashnet.org !

  • 03-27-2008 2:08 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    The missing images problem has already been debugged — see http://forums.thedailywtf.com/forums/p/8033/151112.aspx.
    ╩юфют√ь ёЄЁрэшЎрь яюЁр эр яхэёш■.

    Visit #TDWTF @ SlashNET - the semi-official WTF IRC channel.
  • 03-27-2008 2:45 PM In reply to

    • elias
    • Not Ranked
    • Joined on 02-05-2008
    • Posts 3

    Re: Nuns and Regexes Do Not Mix

    AbbydonKrafts:
    Oh yeah. That probably did it. Opera, as well as many other browsers, obviously ignore empty attributes, but IE6 interprets that to equal zero. I guess IE7 learned null != 0 != string.Empty

    I still can't see it on IE7...

    Filed under:
  • 03-27-2008 5:14 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    belgariontheking:

    rbowes:

    Cuny?

    Guess the programmer had something against the City University of New York 

     

    Probably just looking for this: http://www.definition-of.com/cunny.

    Someone probably dodged the C*U*N*T ban with it. 

  • 03-27-2008 6:32 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    Guys, "Pandamonium" is probably a pun on "Panda". This certainly wouldn't be the first time I've seen someone use it for that purpose. Let's not jump to conclusions before accusing people of not knowing how to spell.

  • 03-27-2008 6:38 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    Maciej:
    "Pandamonium" is probably a pun on "Panda"
     

    Thanks Dr. Obvious.

    Yes, I have been banned. Thanks to all for a good time.

    Tired of incompetent moderation?
    Wondering where all the clever discussion went?
    Try irc.slashnet.org #TDWTFMafia.
    We don't ban or kick and everyone is welcome.*

    *Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
    Filed under: , ,
  • 03-27-2008 7:10 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    Maciej:
    Guys, "Pandamonium" is probably a pun on "Panda". This certainly wouldn't be the first time I've seen someone use it for that purpose. Let's not jump to conclusions before accusing people of not knowing how to spell.
     

    That word should be spelled A-L-W-A-Y-S. 

  • 03-27-2008 7:54 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    cconroy:

    And just think, if you had spelled "pandemonium" correctly you never would have found the bug.


    MasterPlanSoftware:

    Maciej:
    "Pandamonium" is probably a pun on "Panda"
     

    Thanks for your contribution, Maciej. But remember to use the quote function next time, so we know what you're talking about.

    Fixed that for you. 


  • 03-27-2008 7:58 PM In reply to

    Re: Nuns and Regexes Do Not Mix

    PSWorx:
    Fixed that for you. 
     

    Actually no. There was no clarification needed. I knew what he was talking about. Pointing out the obvious is not a contribution.

    Yes, I have been banned. Thanks to all for a good time.

    Tired of incompetent moderation?
    Wondering where all the clever discussion went?
    Try irc.slashnet.org #TDWTFMafia.
    We don't ban or kick and everyone is welcome.*

    *Stupid people will be mocked mercilessly and encouraged to commit suicide, however.
    Filed under: , ,
  • 03-28-2008 9:45 In reply to

    Re: Nuns and Regexes Do Not Mix

    bstorer:

    Maciej:
    Guys, "Pandamonium" is probably a pun on "Panda". This certainly wouldn't be the first time I've seen someone use it for that purpose. Let's not jump to conclusions before accusing people of not knowing how to spell.
     

    That word should be spelled A-L-W-A-Y-S. 

     

    As in, people ALWAYS spell words correctly on the internet?

    Seriously, "panda"monium?  Oh, I'm busting a gut over tha