-

@ Dimi
2025-05-01 04:07:36
My favorite project in college was writing a Levenshtein distance solution for a randomly ordered massive dictionary of words so that each word was paired with every other word one letter shift away, sorted lexicographically.
Dog: bog fog log dot dig etc. dogs/god invalid.
My teacher didn’t give us the term for what we were doing, nor enough info to blindly google, so we couldn’t research prior solutions. No chatgpt, no vibes.
The projects restrictions were so tight that it forced us to learn to wield one to one functions & set theory to pass. Basically anything that compiled/ran over 2 minutes was a fail or terrible grade and only the fastest person would get 100%. I worked on it 2x longer than everyone else, mostly because I was working at the time & not sitting with others to collectively work on it. I spent 90% of that time working on data types because it was so incredibly ambiguous depending on which way you attempted to solve. Some of the variables I used were so complex, they were comprised of 4/5 types.
Because of this, I beat even my teachers code. Fair and square. Their hardware/software environment, multiple runs. Their code was elegant and mathematically superior, partially written in C instead of my pure C++, totally blowing my read in time out of the water. And yet I won. Because I didn’t trust the compiler. Their code used the C shortcut data type ‘auto’, leaving it up to the computer to pick the correct data types, which took it the majority of the time.
I wish I had that day on record, I think about it all the time.