Coding rabbit hole
This afternoon, I hopped in to work on my User Login Library, which I started building years ago.
I wanted to write documentation on how to replace the built-in styles. One of many to-dos on my list.
Well it's built on top of Liaison, a PHP framework I developed a few years ago for building websites and backend webapps. So I check Liaison's documentation to see how to replace a css file from a view.
It wasn't documented. So I find the test function that has sample code, add some special comments to export a code block, which I will then @import()
into my Liaison documentation, using a library called Code Scrawl ... another piece of software I started a few years ago.
So that's going fine. I'm writing updated docs for Liaison, for the css file stuff, and I want to link to one of the source files, using @see_file(src/addon/Resources.php, Resources Addon)
, a feature in Scrawl. Butttt I can't quite remember the syntax, so I hop over to Code Scrawl's documentation.
(I could just write the markdown link, but the @see_file()
will notify me of an error in case the target file isn't found. So if my codebase ever changes, I will know that my docs got messed up and fix them. That's the whole point of Code Scrawl - that your docs won't get out of date because of features like this and code export/import from tests.)
And it lists @see_file(rel_path)
as the usage ... but I just know that's not right. So now I'm looking into the Code Scrawl implementation (which is also written in PHP), to make sure @see_file()
accepts a second paramater and add docblocks to it. It does.
I add the documentation to Code Scrawl. Close that project.
I add the documentation to Liaison. Close that project.
I'm back in the User Lib, wait what am I doing? Oh yeah, documenting how to replace the built-in styles.
Add that documentation, and oh boy I just spent an hour going down this rabbit hole tweaking libraries in my stack.
It's a good improvement overall. I'm happy with my work today. I was freaking exhausted after. I always am after ... basically doing anything. But it was nice.
And this is often what coding is like for me. I'm in one library, which depends on another, which depends on another, so I end up 2 or 3 libraries deep just to complete one feature in the thing I actually want to work on.
This is a side-effect of building all my own stack. (I built my own testing framework too.) Also a side-effect of doing so when I was ... much less skilled at programming, and at writing docs. So a lot of it was a HUGE mess for a long time, and now I just slowly-but-surely am cleaning it up and improving it.
(It wasn't just lower skill-level. I was also constantly anxious, feeling rushed, not feeling I had enough time for anything ever. This was also a product of mental illness, though it took a different shape then than it does now.)
The main thing holding me back is disability. I have these little stints where I'm able to code for a few days. But I can still only go for an hour or two at a time. And then the energy + craving combination wear off, and I just can't do it anymore, so it sits for another month or two with no progress.
The disability-side of it has helped me get MUCH better at taking good notes. I always note where i left off and what needs done next, and I can confidently trust those notes 9 out of 10 times. I used to try to keep alla that in my head and it was a nightmare.
Btw, for that, I just have a Status.md
at the root of every project, where I take extensive notes every time I code, and I date them.
I dream of healing from my mental illness and finishing these dang projects. They have so much potential. Much about them is really great. But much about them needs work too. They're not polished like they need to be.
Some of them are basically ready to put out there - like Code Scrawl. I mean, it's not perfect ... but all it really needs is a little bit of improvement in the documentation and ... well ... marketing.
Oh, did I mention Code Scrawl depends on a Lexer I made? From scratch? And for which I made it's very own programming language? Yeah. What the fuck. (Also built in PHP with the dream of one day converting code between languages)