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. Uh...check what?

Uh...check what?

Scheduled Pinned Locked Moved The Weird and The Wonderful
comsysadminquestion
17 Posts 12 Posters 1 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.
  • T TheyCallMeMrJames

    Freekin' maintenance coding...

    foreach (string item in items)
    {
    // IMPORTANT!! check first!
    server.Remove(item);
    }

    :wtf:

    They Call me Mister James

    B Offline
    B Offline
    Bigdeak
    wrote on last edited by
    #5

    Eh... i'm feeling with you, 50% of the project i'm working on was like this.

    1 Reply Last reply
    0
    • T TheyCallMeMrJames

      Freekin' maintenance coding...

      foreach (string item in items)
      {
      // IMPORTANT!! check first!
      server.Remove(item);
      }

      :wtf:

      They Call me Mister James

      D Offline
      D Offline
      David Skelly
      wrote on last edited by
      #6

      I'm glad he put the exclamation marks in there. That made me realise this wasn't just another comment, it was something important that I can't ignore. Maybe IDEs should include a feature that allows you to scan for comments that include exclamation marks, because that means they must be important! And comments in upper case with two exclamation marks must be really IMPORTANT!! In fact, this comment must be incredibly important because it has an uppercase IMPORTANT!! and three exclamation marks in total! Too bad it wasn't important enough to fix.

      R 1 Reply Last reply
      0
      • G GibbleCH

        Probably meant to go back and check for it's existence in the server collection prior to attempting to remove it... This is why you use //TODO: instead of just generic comments so you can find them all before release!

        A Offline
        A Offline
        Andre xxxxxxx
        wrote on last edited by
        #7

        I use an "int __todo_description;" instead. Gives me a compiler warning. Now I only need to get rid of these 205 warnings :^)

        S 1 Reply Last reply
        0
        • D David Skelly

          I'm glad he put the exclamation marks in there. That made me realise this wasn't just another comment, it was something important that I can't ignore. Maybe IDEs should include a feature that allows you to scan for comments that include exclamation marks, because that means they must be important! And comments in upper case with two exclamation marks must be really IMPORTANT!! In fact, this comment must be incredibly important because it has an uppercase IMPORTANT!! and three exclamation marks in total! Too bad it wasn't important enough to fix.

          R Offline
          R Offline
          Richard A Dalton
          wrote on last edited by
          #8

          > Maybe IDEs should include a feature that allows you to > scan for comments that include exclamation marks, because > that means they must be important! IDE's do have that feature, although Visual Studio went with the needlessly verbose 'TODO' rather than the more pithy ! I wonder what percentage of Visual Studio programmers know that it has a Task List feature? Might make a good interview question actually.

          G T D 3 Replies Last reply
          0
          • R Richard A Dalton

            > Maybe IDEs should include a feature that allows you to > scan for comments that include exclamation marks, because > that means they must be important! IDE's do have that feature, although Visual Studio went with the needlessly verbose 'TODO' rather than the more pithy ! I wonder what percentage of Visual Studio programmers know that it has a Task List feature? Might make a good interview question actually.

            G Offline
            G Offline
            GibbleCH
            wrote on last edited by
            #9

            Unfortunately, in VS, the Task List for TODOs is glitchy and doesn't show everything. If you use R#, it has a much better To-Do explorer that includes TODOs, NOTEs, and my favourite NotImplementedExceptions!

            A 1 Reply Last reply
            0
            • R Richard A Dalton

              > Maybe IDEs should include a feature that allows you to > scan for comments that include exclamation marks, because > that means they must be important! IDE's do have that feature, although Visual Studio went with the needlessly verbose 'TODO' rather than the more pithy ! I wonder what percentage of Visual Studio programmers know that it has a Task List feature? Might make a good interview question actually.

              T Offline
              T Offline
              TheyCallMeMrJames
              wrote on last edited by
              #10

              Actually, the task list is token-based, defined from the Tools->Options->Task List->Tokens panel. For interest's sake, I just tried to add !!! as a token name. No love (invalid chars). IMPORTANT, however, just turned up three more instances...

              They Call me Mister James

              1 Reply Last reply
              0
              • R Richard A Dalton

                > Maybe IDEs should include a feature that allows you to > scan for comments that include exclamation marks, because > that means they must be important! IDE's do have that feature, although Visual Studio went with the needlessly verbose 'TODO' rather than the more pithy ! I wonder what percentage of Visual Studio programmers know that it has a Task List feature? Might make a good interview question actually.

                D Offline
                D Offline
                David Skelly
                wrote on last edited by
                #11

                Yes, I'm also familiar with NetBeans and Eclipse in the Java world, both of which allow you to put comments in like TODO or FIXME or indeed anything you want and associate that with a priority in the task list. There is also Checkstyle which is a Java tool for checking source code and one of the things it can scan for is TODO comments, etc. It just happens to be a personal bug-bear for me, the way developers throw exclamation marks all over the place. How often have we seen error messages like:

                File not found!

                What exactly is the developer trying to convey to the user by including that exclamation mark? The file was not found - surprise! Or maybe: The file was not found - Oh My God! Or: The file was not found - HA HA HA!

                R 1 Reply Last reply
                0
                • D David Skelly

                  Yes, I'm also familiar with NetBeans and Eclipse in the Java world, both of which allow you to put comments in like TODO or FIXME or indeed anything you want and associate that with a priority in the task list. There is also Checkstyle which is a Java tool for checking source code and one of the things it can scan for is TODO comments, etc. It just happens to be a personal bug-bear for me, the way developers throw exclamation marks all over the place. How often have we seen error messages like:

                  File not found!

                  What exactly is the developer trying to convey to the user by including that exclamation mark? The file was not found - surprise! Or maybe: The file was not found - Oh My God! Or: The file was not found - HA HA HA!

                  R Offline
                  R Offline
                  Richard A Dalton
                  wrote on last edited by
                  #12

                  David, I don't know about anyone else, but you've convinced me. A bit of work to do over the weekend, but by Monday my coding standards will have a new section called Smilies! ' File Not Found :^) ' File Not Found :~ ' File Not Found :-\ ' File Not Found :doh: ' File Not Found :confused: I'm amazed this isn't standard practice already. -Richard

                  O B 2 Replies Last reply
                  0
                  • G GibbleCH

                    Unfortunately, in VS, the Task List for TODOs is glitchy and doesn't show everything. If you use R#, it has a much better To-Do explorer that includes TODOs, NOTEs, and my favourite NotImplementedExceptions!

                    A Offline
                    A Offline
                    AspDotNetDev
                    wrote on last edited by
                    #13

                    GibbleCH wrote:

                    the Task List for TODOs is glitchy and doesn't show everything

                    I'm pretty sure you have to have the file open to see the TODO comments in the task list.

                    [Forum Guidelines]

                    1 Reply Last reply
                    0
                    • R Richard A Dalton

                      David, I don't know about anyone else, but you've convinced me. A bit of work to do over the weekend, but by Monday my coding standards will have a new section called Smilies! ' File Not Found :^) ' File Not Found :~ ' File Not Found :-\ ' File Not Found :doh: ' File Not Found :confused: I'm amazed this isn't standard practice already. -Richard

                      O Offline
                      O Offline
                      oggenok64
                      wrote on last edited by
                      #14

                      I love it! Being on holliday, i can't wait to get back to implement this wonderful scheme. - turin

                      1 Reply Last reply
                      0
                      • A Andre xxxxxxx

                        I use an "int __todo_description;" instead. Gives me a compiler warning. Now I only need to get rid of these 205 warnings :^)

                        S Offline
                        S Offline
                        Super Lloyd
                        wrote on last edited by
                        #15

                        easier: #warning super cali fragilistic expi ali docious

                        A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                        A 1 Reply Last reply
                        0
                        • S Super Lloyd

                          easier: #warning super cali fragilistic expi ali docious

                          A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                          A Offline
                          A Offline
                          Andre xxxxxxx
                          wrote on last edited by
                          #16

                          Super Lloyd wrote:

                          #warning super cali fragilistic expi ali docious

                          If my code would be in C#, I would use the #warning pragma :) int __todo; is the only way I've found that works between different C++ compilers.

                          1 Reply Last reply
                          0
                          • R Richard A Dalton

                            David, I don't know about anyone else, but you've convinced me. A bit of work to do over the weekend, but by Monday my coding standards will have a new section called Smilies! ' File Not Found :^) ' File Not Found :~ ' File Not Found :-\ ' File Not Found :doh: ' File Not Found :confused: I'm amazed this isn't standard practice already. -Richard

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

                            Great idea! I will have to suggest that my company implement that new standard for error messages :laugh:

                            Just because the code works, it doesn't mean that it is good code.

                            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