Boost Your Productivity with AL/BC – Todo Tree and TODO Highlight
This is the second post of the blog post series “Boost Your Productivity with AL and Business Central”. If you want to know more about what this series is about and why I created it, you can checkout this post. Today’s post will be a very short one. I will show you how you can use Todo Tree by Gruntfuggly and TODO Highlight by Wayou Liu to track the Todos in your VS Code Project.
Sometimes you are in a situation where you know you will later have to implement something, but you do not want to or can not do it now. People like to mark these things as “todo”. Unfortunately, in C/AL there was no way to easily keep track of these todos. At least I do not know of any easy way.
With AL, we have the possibility to keep track of all our // TODO comments. Using these // TODO comments, we can ensure that all our TODOs are finished before we ship our extensions or finish our project.
Example
Images sometimes speak more than thousand words, so let’s have a look at an example. You are a developer and writing a function “TestForBlogPost”. While doing that, you already know that you will need a second function that does the calculations, in this case “CalcMyQuantity”.
Of course you could simply write the Code for “CalcMyQuantity” and then go back to your first function ” TestForBlogPost”. Maybe you do not know the code for “CalcMyQuantity” now, but still want to write the code for your first function “TestForBlogPost”.
This is a situation where it can be useful to use a // TODO Comment like shown below. You might have noticed, that the keyword “TODO” is highlighted thanks to the TODO Highlight extension.
If you have installed the extension Todo Tree I mentioned at the beginning of the blogpost, this comment will automatically be shown in a new little window called “TODOS”.
Besides, you have a new little icon on your left navigation pane for you Todo Tree:
Incredibly handy!
That’s it for today. Have a nice week. 🙂
One thought on “Boost Your Productivity with AL/BC – Todo Tree and TODO Highlight”
When I started out programming with AL in Visual Studio Code, everything seemed to take really long. Over the years I have become quite familiar with C/SIDE and C/AL, but developing in AL was a whole new thing.
I did many things in a stupid and slow way, because I simply did not know a better way. This is how life works I guess. First you do it in a stupid way. Then you hopefully learn from your mistakes. Finally you will find the ways and tricks to perform your tasks in a reasonably smart way.
After I’ve run myself deeply into this matter, I can now claim that I can program faster with AL than with C/AL. There are so many things you can use to make your life easier than it was with good old C/SIDE and C/AL.
What This Post Is About: Boost Productivity
Now you may ask yourself what this post is even about other than me randomly talking about two languages. Well, I thought it might be a good idea to share with you the findings I collected on my journey. During the next weeks and months, I will create a series of blog posts about tricks and tips to boost your productivity when programming with AL and Visual Studio Code. The series will also explain how to use a few especially useful extensions like the CRS Language Extension or AL Variable Helper.
When I started out, I would have loved to have a collection of useful tips and tricks – even of the seemingly “easy” and “obvious” things. Unfortunately, this did not exist. There are a lot of information out there, but in this rapidly growing field they are spread on various blogs and oftentimes out of date.
I will give my best to help you avoid taking the same stupid steps I did. My target audience will be the people who are just starting out with AL or do not have a lot of time to experiment with trial and error. Maybe even some experienced developers might find this interesting.
We will see 🙂
This is a list of the published posts so far:
AL Variable Helper
Todo Tree And TODO Highlight
CRS Language Extension
Breadcrumbs
ID Assigning