In my daily job as a consultant, I come across a lot of little ideas, code snippets, ways to use certain tools, and other “data” that I’d really like to hang on to. I’ve got a pretty good memory which tends to serve me well but also still find myself trying to reconstruct my searches and research to rediscover something I already knew because I didn’t save it or bookmark it.

There’s lot of solutions in this space like local or self-hosted wikis, notetaking tools, or even lightweight CMS solutions. For most folks, these will be suitable but I dislike the cruft and excess that comes with even lightweight open source solutions. I also like to find excuses to write code and to learn new tools. So I’ve started working on a small project called Kaybee (KB, knowledge base) using the Python FastAPI framework. The MVP will be an app for storing “data” in the form of a simple record - title, summary, content, tags, and probably some way to associate items with one another.

Kaybee will be open source from the start and I’ll try to post about any novel or interesting aspects of the development as it progresses.

Improvements to the Three-Word Password Attacks Python code

After I shared the previous blog on Mastodon, I got some good suggestions and guidance from smart folks. The most obvious was about using itertools.permutations instead of itertools.combinations, a rather obvious oversight. This changed the output file size significantly but that’s fine - we want the correct output, regardless of size.

The other suggestion from the same person who advised using permutations was to generate the indexes of the file as permuations instead of storing them to memory. Then to use the iterator to access the source list by index and write out to file. This saved a good chunk of memory and gave about a 10-20% speed up on execution.

Fun stuff. The output file on 5000 words went from about 500GB to over 3.5TB though, so, that’s not quite so fun. The updated code has been committed to the repo.