TLDR: Understand complements my primary editor, VS Code, rather than replacing it. It’s an essential part of my workflow for personal projects, especially when it comes to easily visualizing the underlying types of variables and functions. It’s the best of both worlds!
Even though I work on Understand, right now, my favorite program for editing source code is the popular editor Visual Studio Code. It provides a lot of useful editing capabilities and extensibility – I know it well enough that I have created five VS Code extensions. However, for easily learning about my code, Understand is my preferred platform, even with my personal projects.
I love and hate the C language. I love it enough to make personal projects with it—I’m currently making a cross-platform graphics library. Right now, my library makes it easy to import any modern OpenGL functions, create a window of any color and style, and, finally, call the OpenGL functions to draw on the window. I plan on supporting Windows and Linux, but I’m working on Windows first. (I would also like to support Mac if I could ever legally run it on my PC.)
The most frequent kind of mystery I am running into with this codebase is figuring out what the types are. Why am I having problems with the types? The win32 API documentation is great for describing functions such as
DefWindowProcA but not as good at showing the underlying type of its parameters or return values. This particular function returns an
LRESULT, but what exactly is that type? Look up “win32 LRESULT” to find that an
LRESULT is a
LONG_PTR. Okay, but what is a
LONG_PTR? That same page says that it is a 64-bit integer (
__int64), which is a just a
long long on my platform.
That was a lot of detective work. In less time and effort, I can create an Understand project, open
DefWindowProcA in the API Info interactive report, and look at the
UnderlyingType, which says
This can be made even easier by adding a new interactive report that shows the type and underlying type. This simplifies the view and reduces the amount of clicks.
This easily accessed information is super useful to me, and I rely on it even though Understand is not my primary code editor.
In conclusion, while I predominantly use Visual Studio Code for its editing prowess, Understand distinctly shines in demystifying the complexities of my C projects. Its ability to swiftly reveal the underlying types in code saves me significant time and effort. The prospect of further streamlining this process with a new interactive report feature only heightens its utility. This powerful synergy between Understand and my primary editor, VS Code, underscores the strength of using the right tools for the right tasks, making my work in the office and at home more efficient and enjoyable.