22-06-2025 - In Defence of Jank
I often end up spending countless hours writing technical documents for projects which never see the light of day. Planning everything out to the last detail, not a single decission left up to chance yet when I go to write the code, I realise my mistake.
I recently started work on Viso-Fox, a 64 bit fantasy Instruction Set Architecture (ISA) where every single decision was planned out in depth. Before I wrote a single line of code, I knew exactly what I would have to do. So I started working on the assembler, I realised my specification was incomplete and lacked details of how to handle strings and lacked any semblance of macros. Eventually I realised macros would probably be the easiest way to implement compile time constants so I opted to add those using the syntax @meta replace <macro_name> <substiution>
and changed strings to follow C's norms but I had issues writng a string parser for all the edge cases and edge cases of edge cases. I gave up and decided to use my own system so instead of \n
, I had '@NL' and used an extra @
to escape it but mid-implementation I realised I was wasting time.
Strings resolve to their ASCII codes so "A" -> 65, etc. I had recently implemented a replace directive so without writing a single line of code, I realised I could define a few macros e.g. NL
for newline's ASCII code and use the already established array syntax to define strings. So I want a string with which is null terminated, easy:
@array "Hello, World!", NL
Drastically reduces complexity in handling strings, just search from opening to closing quotes and if newline or end-of-file, report an error.
Another example, I refuse to pay for a server to host this blog so I needed something that was statically generated on my machine but I didn't want to mess around with Jekyll, Hugo or something else I would touch maybe once a blue moon. So implementing my own static blog generator but that's difficult? Nope, parse markdown with a Python library, generate the HTML and throw in a template HTML file with '!blogs' section to insert the generated HTML.Done.
Want to add RSS feed? Simple library and just through it in the same Python script that builds the blog. No fansy pipeline, just in my .gitignore
, exclude _blogs
which contains my tooling and blog markdown files.
Had I tried to plan out what I was going to need, wrote everything in a well structured and modular way, I would have spent an hour trying to implement it before giving up. I much prefer to prototype fast and if it needs to be refactored, I'll do a big rewrite.
Tags: Programming, Prototyping, Jank