Trying out a short-form format that will hopefully inspire me to be more off-the-cuff and consistent with my writing.
Here's what I've been working on lately:
Getting a Master's
I started a Master's in Computer Science program, because I've identified a weakness in how I've learned programming over the last 16 years: I never got the theoretical foundations that would make me more effective.
With kids and a full-time job, I can only work on one course at a time and currently it's Dynamic Programming, Algorithms and Data Structures.
Learning Zig
As part of the above Master's, while creating and comparing algorithms, I decided it was a good time to learn something other than Python and Javascript. I decided to learn Zig, which I appreciate for its second-place vibe as compared to Rust, where all the hype is concentrated. Also, I've never heard so many people complain so much about a language that they supposedly love (speaking of Rust). On the other hand, Zig is just as fast, easier to read and has features that would make it adoptable by organizations with big C codebases.
My plan in learning Zig is to compare its speed to the Python scripts I create to see how slow Python truly is. After some trial and lots of error, I was able to do things in Zig, including insertion sort and merge sort, both of which unsurprisingly blew python out of the water. More surprisingly, though, Zig also blew C out of the water when comparing the same algorithm (insertion sort). So that was interesting.
Then I compared Zig's merge sort to Python's built-in sort, which is in C from what I understand, and starting at around n=100_000, the merge sort written in Zig actually goes faster. I tested this up to n=20_000_000, where Zig was finishing on average in half the time (6sec vs 12sec on my machine). None of this is scientific, but that is still cool to see how much potential gain there is in using a lower level language. Of course it took me 10x longer to get my algorithms working in Zig the first time around, but that's how learning works!
What's Next
The performance experimentation with Zig has got me thinking about using it to parse .fit or .tcx files faster than what can be done in Python and replace BeautifulSoup in my antren python script.