As part of a project I’m currently working on, I need to generate multiple types of hashes of a set of very large files. The not-so-quick and dirty method for doing this might need to pass over each file a single time for each hash.
Donning my ill-used C hat, I spent a little time today looking at some libraries I could use to do this. This was quite trivial and within minutes I was ready to cut some code.
… but I don’t often write C code. I’ve written a fairly large amount of it in my time, but I’ve always found that because I’m not always using it - I get tripped up over tiny things to do with pointer indirection, memory allocation and it’s related woes, and so on.
Today was not the case, I sat down and for the first time in a long time - sat down and wrote it in one sitting. The code compiled and ran flawlessly on the first run, amazing. Okay, so it’s not hard to do some basic C - but I was doing a lot of the things I’d normally trip over myself for the first hour or so without thinking about it.
… and I’ve been going for hours at it. Loving it :)