Sunday, November 22, 2026

Project Structure Documentation Key

 I've added a 'key' to the documentation from comments Python script:

structure

So:

//!_structure=/Project Structure
Generates the project structure from within the src directory.

//!_structure=/Project Structure=../
Generates the project structure relative to the src directory.

This lets you generate a project structure ASCII document that is built off of the files and folders in either your source code directory - or your project directory.

You can specify directories that it will ignore when doing this - it has default values of 'build' and 'build-windows'.

So far my testing of this looks good!

Saturday, November 21, 2026

Back to Basic-er

For a while I was using tmux for my workflow, creating panels for Neovim, Git repo work, file browsing etc. But at that time not being able to really persist sessions bothered me (I know the session will keep running and i can attach to it... until I reboot or similar). I tried to mimic that via shell scripts etc and that worked.... ok.

Then I found Herdr. And immediately fell in love.
I liked the layout, loved the persistent sessions, the key binding cheat sheet was short and sweet. I've been using vanilla Herdr ever since.

But you know.... I kind of like the simplicity and utter minimalism of out of the box tmux. So I think I might switch back for a while. And I think I'm going to kill the server whenever I'm done working, so that every time I use it I have to setup my workspace again. This will allow me to REALLY get the key bindings down - and I'll be VERY fast at them. So that soon, setting up any kind of layout I want would take mere seconds.

And since it's vanilla there's no need to worry about any special configurations or plug-in compatibility etc. And I think I'm going to build it from source.
Hmm I should dig into its source code. If I encounter any issues or similar maybe I could fix them myself.

More to come....

The Worst Code I've Ever Seen

A bit over a year ago I broke the only clipboard manager I liked at the time (mainly because it was a .jar file so I could run it at work). I downloaded its source code and tried to give it a dark mode. But it turns out, to do so, would basically be a complete rewrite.

I even had whatever AI I was using at the time attempt the dark mode update. It failed just like I had.

I just wanted a console looking, keyboard driven clipboard manager so I thought maybe I could get AI to code one in Rust. I actually wasn't really interested in coding such a thing I just wanted the app. It worked, I got most of the features I wanted - at least to start out with. BUT it tanked my CPU hard. Even when it wasn't visible, just monitoring the clipboard. After a week of yelling at AI:

"Bruh it's STILL hosing my CPU. Come on."

I decided maybe it was time to learn C++ in earnest... By having AI code a clipboard manager in the language then taking over it updates and maintenance myself.

Everything seemed great, it didn't make a dent iny CPU even after a week of it running non stop. However AI kept breaking the app just doing simple changes. Once it was ao bad I had to roll back a few commits. I realized I would need to dig into the code and see what was going on.

I was tweaking the behavior of one of the key bindings so I started with the if statements that drove key input processing.

AI had written the WORST code I had ever seen.

Windows/Linux checks were all over the place, making the code very difficult to read. The only way to determine what dialogue etc a key binding belonged to required tracing backward and forward to see what might be visible then what it might actually be doing.

So....

The first thing I did was write a Windows key code wrapper and a Linux one, so that I had ONE common set of key codes to work with, and they were intuitively named. Once that was there my key code ifs immediately got much cleaner.

Next I tracked down what each one belonged to and organized them, adding comments to make it even easier to see what groups went to what. Then I broke the implementation into methods. Now every check was an if and a method call. Very easy to read through all the key bindings.

After I made these changes the app never broke again. Yeah there have been bugs, but no full blown crashes or blank windows.

Well....

Until I tried to get AI to make a Wayland compatible piece.
I REALLY don't want to be forced into Wayland.

Document Generating Comments

Some of my projects start off as "I wish there was a a fully Vim-style XYZ...". So I reach out to my AI buddy and start helping him code such a thing for me. A couple of times the project ended up being REALLY cool. So I need to be able to work with the code. Ideally completely taking it over myself. However these are usually pretty ambitious projects so I need to do some learning - which is great!

To aid in this I thought about utilizing an existing 'code comments to documentation' solutions that are out there... BUT!

I have a stand alone HTML treeview driven notes app I built! And in looking at some of the solutions out there I feel like the comments are a lot. I don't want to spam my code with a crap ton of comments, just to get documentation. I have to be able to read the code.

So I put together a Python script and my own comment syntax for a few things (only tested against C++ so far, it it should be able to do other languages via config files). I've used it on the C++ app version of the stand alone HTML notes app and it worked amazingly well! It makes tracking down specific code etc much easier.

Some of its most exciting features:

Print Actual Code
Using
//>>
...
//<<
You can have the code between those written to the docs. So there's no maintaining those code snippets - they ARE the code.

/*
...
!_method
...
*/
This documents a method's footprint - inputs, output, etc -- AND where that method is called in other areas of the code!

/*
...
!_ctor
...
*/
This is like the method one but for constructors.

You can do custom entries in the help system and more. It does increase the amount of comments of course but - in using indent based folding in Vim - I find them fairly unobtrusive! In the future I'll develop this tool further and provide a link to the repo.

Multiplexer Time

I'm doing it. Gonna try to build a multiplexer. And of course it will be Vim style. At this point I'm not sure if I'll auto persist sessions etc, I'm actually leaning toward something more Tmux like, where it doesn't really do so. I'm still in the minimalist mood.

So far I am using two modes:

PLEX
This is where users manage and navigate panels, windows etc.

NORMAL
Kind of like Vim's INSERT mode, this is where console commands can be entered, apps can be launched in the pane's console, etc.

So far I have some bare bones functionality. The key bindings are driven by a config file and I think I'll do themes via config also. Once that's in place I'll do some code clean up and documentation.

This is being built in C++.

Not Really a Multiplexer

 Ok so my latest project isn't REALLY a multiplexer. It doesn't have sessions you can attach to etc. It's really just the front end we typically get with multiplexers (it's kind of Tmux like). So it allows users to create panes and tabs, rename tabs, resize panes. The power of this project is in the fact that it uses MODES - like Vim does. I outlined its modes in my previous post. After working on this app for a bit I realized...

Why am I using the Ctrl+b hotkey for everything? - If we're in PLEX mode, we can just use single key key-bindings! Now this application absolutely SCREAMS! Here is a workflow example:


\ (split vertially)

l (select the right side pane)

- (split that pane horizontally)

J (move the horizontal split down)

h (select the left pane)

i (enter NORMAL mode)

vim (launch Vim in that pane)

Escape Escape (return to PLEX mode)

l (select the top right pane)

i (enter NORMAL mode)

git status (output the repo's git status in that pane)


It's so fast I'm not sure I'll even bother with the ability to save / restore layouts. They literally take seconds to set up. I'm currently cleaning up the code and adding developer comments - so that they generate the developer.html help system.

Project Structure Documentation Key

 I've added a 'key' to the documentation from comments Python script: structure So: //!_structure=/Project Structure Generates t...