Embedded todo / tasks list

PhreaKPhreaK Senior MemberPosts: 966
Up until now my todo list management when working on a NetLinx system had pretty much run like so:
  1. note an issue whilst working on another part of the system
  2. take note of the issue in a comment prefixed with TODO / FIXME (habit from working in eclipse)
  3. return to what I was working on
  4. completely forget about it (as I'm not in eclipse and don't have a task list that updates)

I made a slight improvement on this process by running 'grep -nri TODO <whatever my source dir is>' when I remembered then going and following up on them. This sort of functions as a workflow however is not ideal as I'd tend to run that after compiling and uploading as I was waiting for the master to reboot, then see the issue, fix it, upload and reboot again.

Before jumping in and writing a little live TODO tracker to accompany studio I thought I'd just double check and make sure there wasn't already something that could do the trick. The good news is there is: 'Tools -> Find in files'. You can use it to search for whatever TODO / FIXME / WHYTHEHELLISTHISNOTWORKINGAAAAARRRRRGGGGHHHHH etc keywords you like to use and filter based on what you're interested in rather than using a whole bunch of '#warning' directives. It will show a list of matches as well as allow you to click on each and take your straight to the file / line where it is. I've now got it attached to a hotkey and trigger it as compulsively as I save.

Just though I'd share as I know it's something that's going to save me a butload of time / frustration. Hope it may help out someone else.

Comments

  • Dries KaspersDries Kaspers Junior Member Posts: 142
    My habit is to put the issue after a #WARN statement so that every compile is basically a reminder.
  • champchamp Junior Member Posts: 261
    I am hoping someone will write an app that detects all TODO and writes the final code for me.
    I have written a code stub waiting for this application.
    DEFINE_PROGRAM 'Uber Program'
    // TODO - write the ultimate uber program
    
  • PhreaKPhreaK Senior Member Posts: 966
    I'll contribute to that a bit further. It must only include one function, the body is:
    return 42
    
    Now if someone wants to jump in and fill out the function name and parameter list we're all done.
  • Dries KaspersDries Kaspers Junior Member Posts: 142
    PhreaK wrote: »
    I'll contribute to that a bit further. It must only include one function, the body is:
    return 42
    
    Now if someone wants to jump in and fill out the function name and parameter list we're all done.

    Something like;

    DEFINE_FUNCTION INTEGER fnAnswer_to_the_Ultimate_Question_of_Life_The_Universe_and_Everything ()

    ?
  • ColzieColzie Senior Member Posts: 470
    My habit is to put the issue after a #WARN statement so that every compile is basically a reminder.

    I'll second this one. Simple and effective.
  • jjamesjjames AMX Sustaining Engineer Posts: 2,898
    I like the idea of having a centrally located list of TODOs; I'd much rather see it in the form of an online database. Perhaps hosting your own GIT or SVN serve with a custom grep search and put them into a database to be shown in a report would be fun to do? Maybe using Sparkleshare, OwnCloud or something similar as the backbone would be a good start.

    For now, however, I'm sticking with the #WARN function. :)
  • nicholasjamesnicholasjames Junior Member Posts: 154
    NetLinx Macros + Find In Files selection

    I like using the macros from time to time for adding quick debugging/comments like that.

    NetLinx macros will do cut/copy/paste. If I want to wrap a bit of code in a compiler directive, I just highlight the code, choose my "#IF" macro and run it. It cuts the block of code to the clipboard, types out the the "#IF_DEFINED" and "#END_IF" on seperate lines, then pastes the code back between them. In the hotkey editor there's a command under the Edit category called "Run 'macro-name'" that will run the currently selected macro on the Macros toolbar, so I've assigned a hotkey to that. Of course I have to go back to add the compiler directive after the #IF_DEFINED, but it definitely helps save a little time.

    [size=+1]A Word Of Caution To This Tale![/size] [size=-2](Tale... Tale...)[/size] When you double click on a Find In Files result, NetLinx selects all the text on that line. This can be great if you're using a macro like I've described above. Double-click the Find result, run macro, Double-click next result, run macro... HOWEVER [size=-2](here's the caution part)[/size] NetLinx also selects the Carriage Return but NOT the Linefeed! To see what I mean, turn on Show End of Line. If you copy the text that NetLinx generously highlighted for you, then paste it elsewhere, you'll end up with a line terminated in only a CR and this error message at compile time:
    NetLinx Pre-Processor Error: Unrecognized char [ = ASCII(D)] in input
    
    NetLinx will fix a lone CR or LF if you close the file then reopen it. To avoid this problem entirely, hold SHIFT and hit the END key. The END key pops the carat to before the CR, effectively removing it from the selection.

    I've attached the couple macros I've used from time to time if you want to see an example. The "!BLANK" macro does nothing. It only exists to be used as the "default" current macro in case I accidentally hit the hotkey...
Sign In or Register to comment.