The Method of Four Questionmarks



  • An ex-colleague of mine was proudly presenting his Method of Four Questionmarks: When ever he'd get stuck in developing some piece of code or there was something wrong or unfininshed in his code, he would enter "????" as comments and continue elsewhere. Then he had written a small script that would send him a reminder e-mail every second Tuesday saying: "Fix ????". According to him, this was the highway to flawless code. I didn't stay long enough to see what happened when release date was on monday...



  •  ???? insert insightful comment here



  • I find a similar system to be rather helpful.Any line of code with 2 or mor '*' in the comment is code I should come back and look at later. The more * the more urgent eg.important functions I need to write to make the thing actually work. It is a crude and fairly handy method of finding what I haven't done yet.

    Of course /*****/ is not the entirety of the comment.

    Perhaps I shouldn't use * as people often seem to like using long lines of * characters as a paginator.



  • That's not terribly unusual. Some editors will even highlight such comments specially I.e. Vims C syntax highlighter will invert "XXX" at the start of a comment to make it easier to find.



  • When debugging/testing CSS, I put an empty comment /**/ after each non-permanent statement, so I can easily clean up later.

    When I need to "come back later", I rely on my external todo list, rather than a silly comment.

    Visual Studio automatically gets //todo: comments, though.



  • Eclipse automatically finds certain strings and adds them to the tasks list. This works great until you import a directory for a third party library where the programmer has documented future features with //to do comments. Having 140 items in your task list not related to your own work is depressing, so I switched to Kate.



  •  I use TODO notes and surely "????" could work as well but I had to change my underwear after reading further about the mailing script. Why every fortnight? Does he stop everything else when the notification comes and start fixing broken stuff?



  • Many IDEs these days will allow you to do something similar. For example, in Eclipse, you can start a comment with TODO: or FIXME: or whatever else you want, and it'll provide you with a listing of all those outstanding things. You can even set priority on them. It's quite snazzy. Sure beats my old "scribble a Post-It note and stick it on the wall" method.



  •  Eclipse not only highlights TODO comments, it gives you a list of all TODOs in your workspace. I do it all the time.

    I DONT abbandon my code with a giant todo "fix me". I put TODOs because I found places I need to make code changes and want to ensure I find them all when I am implementing the solution vs figuring out what to do...

     

    //????

    public void solveMyProblem(String problematicVariable){

    // Fix before release or I get fired

    }




  • I expect I would come to hate my job without Resharper.  And yeah, I use //todo: quite a bit.



  • I just keep a todo list in main.h for things that need implementing, and "todo: " comments for things that need changing or fixing. Before release, read the list and grep for "todo: ". Simple.



  • @lolwtf said:

    I just keep a todo list in main.h for things that need implementing, and "todo: " comments for things that need changing or fixing. Before release, read the list and grep for "todo: ". Simple.
     

    Maybe you should email them to yourself and keep them in inmail.txt, then just fire up SSDS and type: -rrr 77 -ww 34 at promt #6. Then toss in a noodle and Jam It!



  • Pfft. The Best way is to have your program print the TODO statements to stdout. As a pure bonus it automagically puts priority on fixing the code inside your nested loops.



  • @Faxmachinen said:

    Pfft. The Best way is to have your program print the TODO statements to stdout. As a pure bonus it automagically puts priority on fixing the code inside your nested loops.

    Pfft.  n00b.  Your program should fix its own code


  • Step 1: Write program with lots of ????

    Step 2: ????

    Step 3: Profit!

     

    And real programmers don't use VI, EMACS, ECLIPSE, or even keyboards, real programmers create an ecosystem that acts as a computer and spits out punch-cards made of leaves created by toucans containing the output of the program! yall got nothing on real programmers.



  • @dlikhten said:

    ...real programmers create an ecosystem that acts as a computer and spits out punch-cards made of leaves created by toucans containing the output of the program!

    Toucans eat sugary breakfast cereal, not leaves.  n00b. 



  • @Faxmachinen said:

    Pfft. The Best way is to have your program print the TODO statements to stdout. As a pure bonus it automagically puts priority on fixing the code inside your nested loops.

    I've seen this done. Ugh.



  • When writing C, I use /* */ comments (as required by the C89 spec) almost everywhere, but to mark a todo or other statement I need to change later I use // comments (C99-style); normally I'll only have two or three such comments in any one file at a time. That way, I can find them easily by setting my compiler to strict C89 mode and seeing where the syntax errors turn up.



  •  For important TODOs or notes, I use the #warning directive (or a pragma, if #warning is unavailable) to output them as compiler warnings. Quite WTF-y, I know. 



  • @CodeSimian said:

    For important TODOs or notes, I use the #warning directive (or a pragma, if #warning is unavailable) to output them as compiler warnings. Quite WTF-y, I know. 

    I just put a comment with the future date I'm going to implement a feature wherever it's need.  That way, I know not only what needs to be done but when it needs to be done.  Also, I can grab all the comments out of the source file, sort them in my head and have my day planned out for me.



  • @morbiuswilters said:

    @CodeSimian said:
    For important TODOs or notes, I use the #warning directive (or a pragma, if #warning is unavailable) to output them as compiler warnings. Quite WTF-y, I know.
    I just put a comment with the future date I'm going to implement a feature wherever it's need.  That way, I know not only what needs to be done but when it needs to be done.  Also, I can grab all the comments out of the source file, sort them in my head and have my day planned out for me.
    Ha ha. I said it was WTF-y.  Also, I obviously don't lay out my entire project schedule using source code comments/warnings.  I just put important stuff relating to existing source in-progress.  (e.g. Warnings about temporary stubs, workarounds, etc.)  Admittedly, I find myself using that technique less and less lately....



  • @CodeSimian said:

    Ha ha. I said it was WTF-y.  Also, I obviously don't lay out my entire project schedule using source code comments/warnings.  I just put important stuff relating to existing source in-progress.  (e.g. Warnings about temporary stubs, workarounds, etc.)  Admittedly, I find myself using that technique less and less lately....

    I wasn't actually calling your method a WTF, just figured you would appreciate the "future date" method. 



  • @morbiuswilters said:

    I wasn't actually calling your method a WTF, just figured you would appreciate the "future date" method. 
    Oh cool, thanks.  That is actually a good idea.  I thought the whole "sorting the comments in your head" thing was an oblique reference to SpectateSwamp.



  • @PIT said:

     I didn't stay long enough to see what happened when release date was on monday...

     

    ...because it simply isn't possible that he could be fixing these bits of code prior to getting the reminder email...


Log in to reply