BookmarkSubscribeRSS Feed
0 Likes

In SAS EG I would like the ability to highlight specific comments. My initial thought is it would be great if I could some how add or identify these specific types of comments by creating a file element in the Enhanced Editor Option/Appearance dialog box and apply formatting to identify these different types. Essentially, creating some user-defined comment types similar to the idea of creating user defined words.

 

For example, I typically have comments that start with the following:

1. Note:

2. To Do:

3. Research:

4. Testing:

5. Q4 2016 (*Basically the quarter and year this change was made. For programs that run monthly I have M1 2017.)

 

I would like to be able to format these different types of comments so that each type can be easily identified. The current project I'm responsible for has been undergoing significant changes and it can be difficult to sift through the sea of green to identify these different types of comments. 

 

To build upon this idea it would be cool to create my own comments types using the Add Abbreviation Macro and Enhanced Editor Keys functionality so that I could insert my comment types (To Do, Research, and Testing in particular) and when inserted they "picked up"/included whatever formatting I had assigned to them. I've created something similar for my program headers but the key would be the formatting - like all Testing comments are Fuchsai versus Research items that are black with a yellow background.

 

Thanks!

6 Comments
Reeza
Super User

Are you using a service to manage your code, ie Git?

rileyd
Quartz | Level 8
No, all the code is managed within Enterprise Guide (version 6.1).


paulkaefer
Lapis Lazuli | Level 10

Interesting idea. There are some syntax highlighters I've used that will highlight instances of TODO within comments. You can use external text editors to edit your SAS code, then open them in EG for running them. Here's an example of one text editor with customizable syntax highlighting for comments.

 

What @Reeza asked about is version control. This is separate from the IDE or integrated development environment you use to develop code (i.e., SAS Enterprise Guide). Really all software developers should be using some form of version control. Version control software tracks changes in your code, and enables you to quickly go back in the history, and do things like branching.

 

If you are using git, for example, you could make a separate code branch for research code. And through commit messages, you can see exactly when your code was modified and how.

 

There's a lot more that can be said about the benefits of version control. I do recommend the sasCommunity.org page and Git and GitHub in Plain English to learn more. And I'm happy to talk more about the benefits of git 🙂

 

As far as notes go, that's the point of comments in general. You can easily search for "todo", "TODO", or "To Do" using CTRL + F. As far as testing, sometimes having separate code for testing is recommended. Your idea of highlighting different types of comments (based on some flag) is interesting. I personally would get confused and like my comments all to be highlighted the same way, but I am very interested to see what others think.

rileyd
Quartz | Level 8
Hey - thanks for your response! I agree with you about version control but currently we don't have a tool for that. I'm looking forward to when we upgrade to EG 7.1 because I'm interested in checking out its new version control capabilities. Currently I manage versions by making a copy of my existing development programs and moving them to a new process flow labeled production.



As far as formatting the comments - I agree with you on Notes that that's essentially what a comment is and using the find function is easy enough when it comes to searching for To Do and Research items. However, we've had times where items like To Dos or Temporary fixes that needed to be addressed (usually backed out) were missed because they were buried in a mass of green (comments & commented out code that was retired/replaced). In general, we're trying to make sure these items make it on to our backlog so they don't get missed but my thought is being able to format them to identify them as more than just a comment would be helpful.



I'll definitely check out the links you provided. Thanks again!


paulkaefer
Lapis Lazuli | Level 10

@rileyd, you mention missing fixes that need to be addressed. One possible change to your workflow is using a Kanban board. You can of course modify it to fit your team/project, and there are software tools available for this. It can be a nice way to easily visualize what still exists - and not have to rely on notes "buried" in code. You can even include a column/area by person.

 

When using a Kanban board, you can maintain a backlog tracking document (for example, a list in a spreadsheet with things like priority) for items not yet on the board/on the backburner.

 

Just a suggestion.

Casey_SAS
SAS Employee
Status changed to: Under Consideration

Thanks for the suggestion - this has been submitted to our Product Management team for possible inclusion into a future release!