Contents
BuildConsole (BC) is the program I created and developed at work*, using C# (syntax here), in WinForms.
Specifically to visualize output from build process. It surely is my biggest and most useful C# project so far.
Unfortunately I can not open source it’s code because of that*. But I can share my experience from this process.
Screenshots here. Starting with latest version from 2021 and its features, then with older until first from 2017.
At its core, BuildConsole replaces the Windows cmd.exe command prompt (terminal) and will run any command too.
It does so, by creating a process and redirecting its output, error and input streams.
For the core part, it was quite useful to browse ConsoleControl code and many stackoverflow answers as usual.
The main needed part of creating process is located here with redirecting (all 3 RedirectStandard*).
It is also using BackgroundWorker classes (e.g. outputWorker) that run on own threads and read those redirected streams, to show output immediately when it comes.
I used the richTextbox control (included in WinForms) since the beginning. It turned out to be garbage for this purpose.
It makes few easy operations really too difficult:
So I recently found and adapted BC to use the FastColoredTextBox control instead. Which is on the other side of spectrum. It is so feature packed (almost like a real IDE) that I probably only use 10% of it.
Still, it is way faster at drawing text, has all needed features and even some extras already (like bookmarks). It needs using only fixed width fonts though (I used variable before). But it is understandable that e.g. selecting text (block mode too) was much easier to implement because of that.
Well everybody in company was using just cmd.exe to build (nearly all) projects, with a custom .bat file. I can’t post how it looked like exactly, but I can surely tell that at some point, it looked like a black and white TV noise. It happened when building with VxWorks started, using GCC (which is awesome). But here, it was outputting full build command, for each file, with all include paths too (like 8 lines of junk). In other words, it seemed like somebody was shoving a black and white sand at my face. Well I couldn’t even ?.
About 6 months after I started working there, I was building a project very often, to test an upmerge of some stupidly outdated branch. This required to look for build errors in that white text sandbox. It is when I realized I seriously can’t look at this trash and I simply can make a program, that filters out and colors this junk (firstly errors).
So after asking and getting approval, I started implementing it. Then after about 2 weeks I had a first working release. It was pretty basic, but already way more useful. It still had a couple of bugs, which I fixed later.
Now I can’t provide a real work example (also because of that*), so I’m including an artificial example on the screenshot (above). Output is similar to real and more general.
The good part is that it has like 1 to 3 lines of each common message. Normally there are many similar lines on one screen, but only few unique. This way screenshot shows the whole process on one screen with already most of line types included.
Here is a list of all program features from current version. Starting from basic, first implemented and ending with additional extras, added much later (not essential, but useful). I am describing them in place.
So first, just as a warning, this is my point of view.
There is a number of things I realized here, some I still don’t get and can only suspect.
It is certain that I made an extremely useful tool. What bothers me here, is that nobody did it, in like 10 years. Well, I guess I’m the one guy who could create it so far and that is rare.
Next, which is even more odd, some people still don’t use it. I can only suspect a few factors here, they:
Whatever the case, it doesn’t matter that much.
A software engineer has to deal with users. Sometimes even those who “didn’t even try turning it off and on again”.
Also, developers need to balance listening to already users (wanting something) versus shouting at not yet users (to gain new ones).
Lastly, I’m glad I could develop this tool, because otherwise I would hate building even more (now it is nice to look at, just old and inefficient). Also I’m glad if anyone found it useful (beside me).