Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Coded insults

Coded insults

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasexml
27 Posts 17 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Mike Winiberg

    And the problem with that is what, exactly? :)

    M Offline
    M Offline
    Marco Bertschi
    wrote on last edited by
    #3

    I think it isn't too polite when you show a message box to your user which is telling him that he is too stupid :doh: . Just a gues ;P

    M L 2 Replies Last reply
    0
    • M Marco Bertschi

      I think it isn't too polite when you show a message box to your user which is telling him that he is too stupid :doh: . Just a gues ;P

      M Offline
      M Offline
      Mike Winiberg
      wrote on last edited by
      #4

      Ah, I see - empathy etc. I've heard of that! ;P

      1 Reply Last reply
      0
      • D dojohansen

        From the main form of a simple XSD validator app..

            void executeButton\_click(object sender, EventArgs e)
            {
                if (userTooStupid(schema == null, "You gotta load an XSD first, genius.") || 
                    userTooStupid(fileBrowser1.SelectedFiles.Length == 0, "You've selected zero files. And they're all valid!!"))
                    return;
        
            bool userTooStupid(bool condition, string insult)
            {
                if (condition)
                    MessageBox.Show(insult, "User Too Stupid");
                return condition;
            }
        
        J Offline
        J Offline
        JohnLBevan
        wrote on last edited by
        #5

        I put in stupid programmer exceptions to catch conditions where a programmer's ignored instructions around the architecture / has made changes to code without looking for side effects. Since I tend to be the only coder on a lot of my projects, this also forces me to be more careful / to avoid embarrassing myself in front of the users. e.g. http://stackoverflow.com/questions/10704863/c-sharp-ensure-valid-enum-values-futureproof-method[^]

        T V 2 Replies Last reply
        0
        • M Mike Winiberg

          And the problem with that is what, exactly? :)

          K Offline
          K Offline
          krubach2
          wrote on last edited by
          #6

          The user would probably complain that "Too" and "Stupid" should be lowercase only, and that pressing "Tab" button should close the message box.

          B 1 Reply Last reply
          0
          • J JohnLBevan

            I put in stupid programmer exceptions to catch conditions where a programmer's ignored instructions around the architecture / has made changes to code without looking for side effects. Since I tend to be the only coder on a lot of my projects, this also forces me to be more careful / to avoid embarrassing myself in front of the users. e.g. http://stackoverflow.com/questions/10704863/c-sharp-ensure-valid-enum-values-futureproof-method[^]

            T Offline
            T Offline
            Timothy J Sygitowicz
            wrote on last edited by
            #7

            I once wrote some code that checked for a condition that was impossible (just to be funny) and added an error message that went something like this: "It seems that an impossible condition has been perceived to have occurred while processing your data. If you are receiving this error, then please do nothing, as you you obviously do not exist. Authorities have been notified of your non-conformity." So far, I'm not aware that anyone else has seen it...

            1 Reply Last reply
            0
            • D dojohansen

              From the main form of a simple XSD validator app..

                  void executeButton\_click(object sender, EventArgs e)
                  {
                      if (userTooStupid(schema == null, "You gotta load an XSD first, genius.") || 
                          userTooStupid(fileBrowser1.SelectedFiles.Length == 0, "You've selected zero files. And they're all valid!!"))
                          return;
              
                  bool userTooStupid(bool condition, string insult)
                  {
                      if (condition)
                          MessageBox.Show(insult, "User Too Stupid");
                      return condition;
                  }
              
              P Offline
              P Offline
              patbob
              wrote on last edited by
              #8

              Programmer sure seems to heve a high opinion of themselves. After all, it's not like they disabled that execute button until the user had loaded an XSD and selected at least one file. And to top it off, they tried to cover up their shortcomings by insulting the user. Stupid programmer. Programmer: -1 User: 0

              We can program with only 1's, but if all you've got are zeros, you've got nothing.

              B L R 3 Replies Last reply
              0
              • J JohnLBevan

                I put in stupid programmer exceptions to catch conditions where a programmer's ignored instructions around the architecture / has made changes to code without looking for side effects. Since I tend to be the only coder on a lot of my projects, this also forces me to be more careful / to avoid embarrassing myself in front of the users. e.g. http://stackoverflow.com/questions/10704863/c-sharp-ensure-valid-enum-values-futureproof-method[^]

                V Offline
                V Offline
                VallarasuS
                wrote on last edited by
                #9

                few functional language compiler (i know) have this ability to track the side effects and wont compile unless there is a fall back handler.

                Regards Vallarasu S | BreakingDotNet.blogspot.com

                1 Reply Last reply
                0
                • D dojohansen

                  From the main form of a simple XSD validator app..

                      void executeButton\_click(object sender, EventArgs e)
                      {
                          if (userTooStupid(schema == null, "You gotta load an XSD first, genius.") || 
                              userTooStupid(fileBrowser1.SelectedFiles.Length == 0, "You've selected zero files. And they're all valid!!"))
                              return;
                  
                      bool userTooStupid(bool condition, string insult)
                      {
                          if (condition)
                              MessageBox.Show(insult, "User Too Stupid");
                          return condition;
                      }
                  
                  T Offline
                  T Offline
                  Thomas Daniels
                  wrote on last edited by
                  #10

                  What's the name of the validator app?

                  D 1 Reply Last reply
                  0
                  • P patbob

                    Programmer sure seems to heve a high opinion of themselves. After all, it's not like they disabled that execute button until the user had loaded an XSD and selected at least one file. And to top it off, they tried to cover up their shortcomings by insulting the user. Stupid programmer. Programmer: -1 User: 0

                    We can program with only 1's, but if all you've got are zeros, you've got nothing.

                    B Offline
                    B Offline
                    BobJanova
                    wrote on last edited by
                    #11

                    A good point. Such easily pre-checkable conditions can be coded around, in a UI at least, so that the user can't make that stupid mistake.

                    E S 2 Replies Last reply
                    0
                    • P patbob

                      Programmer sure seems to heve a high opinion of themselves. After all, it's not like they disabled that execute button until the user had loaded an XSD and selected at least one file. And to top it off, they tried to cover up their shortcomings by insulting the user. Stupid programmer. Programmer: -1 User: 0

                      We can program with only 1's, but if all you've got are zeros, you've got nothing.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #12

                      I just use a message box that says "Too late for sorry, earthling!" It should NEVER be seen by anyone but me, and so far I have yet to hear about it

                      P S 2 Replies Last reply
                      0
                      • B BobJanova

                        A good point. Such easily pre-checkable conditions can be coded around, in a UI at least, so that the user can't make that stupid mistake.

                        E Offline
                        E Offline
                        erzengel des lichtes
                        wrote on last edited by
                        #13

                        Be careful with assumptions about what the user can and cannot do through the UI, especially if you work on the web. The QA team at my company has specific instructions to enable all disabled buttons and controls using various means (on the web, it's pretty easy: Inspect Element. For Windows applications, a special app is needed). The main reason is to secure the app against users being malicious rather than stupid, though.

                        B 1 Reply Last reply
                        0
                        • L Lost User

                          I just use a message box that says "Too late for sorry, earthling!" It should NEVER be seen by anyone but me, and so far I have yet to hear about it

                          P Offline
                          P Offline
                          patbob
                          wrote on last edited by
                          #14

                          emajyn wrote:

                          I have yet to hear about it

                          Perhaps because such a message screams to the user that you don't want to hear about it if it ever does happen. At least add a unique guru meditation number or something to the message. That'll turn it into a whimisical way to deliver an obscure error. Might someday keep your management from loosing face to some customer with clout who happens to get that message.

                          We can program with only 1's, but if all you've got are zeros, you've got nothing.

                          1 Reply Last reply
                          0
                          • D dojohansen

                            From the main form of a simple XSD validator app..

                                void executeButton\_click(object sender, EventArgs e)
                                {
                                    if (userTooStupid(schema == null, "You gotta load an XSD first, genius.") || 
                                        userTooStupid(fileBrowser1.SelectedFiles.Length == 0, "You've selected zero files. And they're all valid!!"))
                                        return;
                            
                                bool userTooStupid(bool condition, string insult)
                                {
                                    if (condition)
                                        MessageBox.Show(insult, "User Too Stupid");
                                    return condition;
                                }
                            
                            B Offline
                            B Offline
                            Brisingr Aerowing
                            wrote on last edited by
                            #15

                            :sigh:

                            public void WriteCode(ICodeContext ctx, ICodeFile file)
                            {
                            Programmer.BeMeanToUsersAsTheyAreStoopid(ctx, file, MeanLevel.Medium); //<-- I have seen many worse things :-(
                            }

                            I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. Stephen Hawking

                            1 Reply Last reply
                            0
                            • D dojohansen

                              From the main form of a simple XSD validator app..

                                  void executeButton\_click(object sender, EventArgs e)
                                  {
                                      if (userTooStupid(schema == null, "You gotta load an XSD first, genius.") || 
                                          userTooStupid(fileBrowser1.SelectedFiles.Length == 0, "You've selected zero files. And they're all valid!!"))
                                          return;
                              
                                  bool userTooStupid(bool condition, string insult)
                                  {
                                      if (condition)
                                          MessageBox.Show(insult, "User Too Stupid");
                                      return condition;
                                  }
                              
                              J Offline
                              J Offline
                              JammoD87
                              wrote on last edited by
                              #16

                              Ha Ha, Our in-house system was developed using Access 97 (Archaic) Every now and again it decides to tell me "Me.Dirty" in a debug message! (Maybe someone is trying to tell me something)

                              1 Reply Last reply
                              0
                              • E erzengel des lichtes

                                Be careful with assumptions about what the user can and cannot do through the UI, especially if you work on the web. The QA team at my company has specific instructions to enable all disabled buttons and controls using various means (on the web, it's pretty easy: Inspect Element. For Windows applications, a special app is needed). The main reason is to secure the app against users being malicious rather than stupid, though.

                                B Offline
                                B Offline
                                BobJanova
                                wrote on last edited by
                                #17

                                If the user bypasses having things disabled or manually submits invalid data, then a terse error message is fair enough. That's not normal usage, that's abuse, and the code should protect itself against such things. The example in the OP appears to be for something that can happen in normal usage when it shouldn't be able to, though.

                                1 Reply Last reply
                                0
                                • T Thomas Daniels

                                  What's the name of the validator app?

                                  D Offline
                                  D Offline
                                  dojohansen
                                  wrote on last edited by
                                  #18

                                  I called it "Rude XSD validator". It was something I threw together in a hurry. The software we develop is serviced/administered by another company. We had a situation in which we needed to know if XML files provided by a third party were in accordance to a given XSD. The administrators were unable to figure it out and asked me to provide them with a tool... So I quickly threw together a WinForms GUI in which one can load one XSD, easily choose one or more files, and validate them all. In other words, a few people I knew a little and collaborated with would be my users. We have an informal tone, and nobody complained of anything.

                                  1 Reply Last reply
                                  0
                                  • B BobJanova

                                    A good point. Such easily pre-checkable conditions can be coded around, in a UI at least, so that the user can't make that stupid mistake.

                                    S Offline
                                    S Offline
                                    Stefan_Lang
                                    wrote on last edited by
                                    #19

                                    Yes you can do that, but it will result in the 'stupid user' complaining about the execute button not being active. At least the way it's handled here offers the opportunity to explain why this won't work, and what is expected. Granted, it could be expressed ... differently :rose:

                                    1 Reply Last reply
                                    0
                                    • L Lost User

                                      I just use a message box that says "Too late for sorry, earthling!" It should NEVER be seen by anyone but me, and so far I have yet to hear about it

                                      S Offline
                                      S Offline
                                      Stefan_Lang
                                      wrote on last edited by
                                      #20

                                      Yes, I too once coded an error message under a condition that at that point I assumed was a foregone conclusion. It said sth along the lines of. "you should never see this error message. If you do, please contact <my name>" Of course, that impossible condition did hit eventually, and I got a call from our customer.. Thankfully the software was still under testing at that point so it wasn't some clueless user, but a rather exhilarated tester... :-O

                                      L 1 Reply Last reply
                                      0
                                      • S Stefan_Lang

                                        Yes, I too once coded an error message under a condition that at that point I assumed was a foregone conclusion. It said sth along the lines of. "you should never see this error message. If you do, please contact <my name>" Of course, that impossible condition did hit eventually, and I got a call from our customer.. Thankfully the software was still under testing at that point so it wasn't some clueless user, but a rather exhilarated tester... :-O

                                        L Offline
                                        L Offline
                                        Lost User
                                        wrote on last edited by
                                        #21

                                        precisely - but people who use software that6 still contains that as an error message know me well enough that calling me is the first thing they would do anyway

                                        1 Reply Last reply
                                        0
                                        • P patbob

                                          Programmer sure seems to heve a high opinion of themselves. After all, it's not like they disabled that execute button until the user had loaded an XSD and selected at least one file. And to top it off, they tried to cover up their shortcomings by insulting the user. Stupid programmer. Programmer: -1 User: 0

                                          We can program with only 1's, but if all you've got are zeros, you've got nothing.

                                          R Offline
                                          R Offline
                                          Ravi Bhavnani
                                          wrote on last edited by
                                          #22

                                          Agreed.  Keep thinking your user is "stupid" and pretty soon you won't have any. /ravi

                                          My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups