Skip to main content

What I'm Learning About - Feb. 2023

·609 words·3 mins
Adam Sweeney
Author
Adam Sweeney
Code is fun. Sharing is caring.

Things I’m (Slowly) Working On
#

Effectively utilizing free time becomes more important as you find yourself with less of it. I’m not a paragon, but I strive to find the balance between self-improvement, hobbies, and zoning out. This post focuses more on self-improvement; specifically concerning programming and software deployment and management.

No matter what I’m learning, I do best by reading first, writing the examples manually, and then stretching my understanding by modifying the examples. This tends to result in broken code, which gets me back to reading, and the cycle continues.

C++
#

I currently earn a living writing C++; I want to be good at it. Learning new features like concepts is great, but my company is not utilizing the latest C++ standard. So I’m focusing my learning on multi-threaded programming and the curiously recurring template pattern, also known as CRTP.

I don’t know enough about either to write amazing in-depth blog posts, but what I can do is briefly discuss the amazing in-depth blog posts and other resources I’m using.

When it comes to multi-threading, the book C++ Concurrency in Action is widely considered the gospel on the matter. I have had a great time with the book so far. The examples and language are clear and concise, the layout is logical, and it covers every topic in great detail.

The CRTP is a topic I have been shy about approaching in the past. I can write simple templated code, but templates in C++ are incredibly powerful if you are willing to dive in. The issue I’ve had is that the code you have to write to tap into that power is extremely… weird looking. On the surface, the CRTP appears circular. And circular things are usually bad in C++. Class Foo inherits from a template class Bar where the template type is Foo. That seems circular, right? And it kind of is, it’s just that the compiler doesn’t see it that way. My gentle introduction to the topic has been the three-part series over at Fluent {C++}.

Rust
#

C++ has been around since 1985. What started as “C with a little extra” has changed so much that it’s almost unrecognizable. And just in the last few years, there has been some drama surrounding the future of the language. But for all its foibles, C++ has been the go-to language if performance is required. You just have to hope that your developers and third-party tools are up to the task of ensuring safe code because the language will not help you. Enter Rust. It’s a language that’s just as fast as C++, but is memory safe, meaning the code you write is safe from bugs like out-of-bounds access and dangling references. The compiler also strictly enforces lifetimes and data ownership. My experience learning Rust so far has been both enlightening and frustrating. Conversely, being forced to constantly consider these principles in Rust has bled into my C++, and I am a better developer for it.

As a 2nd or 3rd language, I believe that Rust will make any developer better.

Hugo
#

Yes, the very framework I am using to create this site! I have only scratched the surface of Hugo’s capabilities. Don’t be surprised if this site makes a few drastic changes as I learn more about Hugo. I’ve already made one (not so drastic) change. I originally posted my tooling as a standard blog post, but at someone’s suggestion, I moved it to a unique section.

A side project I hope to start before the end of the year is to convert my course lectures from PowerPoint to reveal.js wrapped with Hugo.