- Welcome to Aaron Riekenberg’s blog
- Thoughts on tech, IT, software
Too Many Words
I like this quote: I would have written a shorter letter, but I did not have the time. I thought this was from Mark Twain, but originally seems to be from Blaise Pascal in Lettres Provinciales. When writing English my first drafts usually have too many words. With effort I can revise and make it concise. A rough metric for me seems to be removing half of my original words (no joke). ...
Programming Languages
A well-known quote from Bjarne Stroustrup the creator of C++: There are only two kinds of languages: the ones people complain about and the ones nobody uses. I can definitely understand the sentiment of this having experience with a number of popular and not-so-popular languages in my career from C and C++ to Python, Java, Kotlin, Go, Rust, and even Ada. To try something positive I am going to write about some points I like from my favorite languages, why I like them, and why I might choose to use one over another. ...
6 Milliseconds From Facebook
I use chrony to keep my home linux server synced with public NTP servers. It鈥檚 fun to watch which servers have the lowest latency and estimated error. For me the lowest latency is Facebook鈥檚 Public NTP. It鈥檚 easy to think time3.facebook.com has the highest estimated error. But no the unit there is us or 渭s meaning microseconds, so this is 6.4 milliseconds. All this on the cheapest cable internet connection available. :) ...
Unsafe Strings
What does the below C++ program do? #include <iostream> #include <string> void someFunction(const std::string& name) { const_cast<std::string&>(name) = "test"; } int main() { const std::string name = "immutable"; std::cout << "before someFunction name = '" << name << "'" << std::endl; someFunction(name); std::cout << "after someFunction name = '" << name << "'" << std::endl; return 0; } name is declared in main as a const variable. We pass name as a constant reference to someFunction assuming it cannot be mutated. But in someFunction we can cast to a mutable reference and write to it. ...