Programming Leftovers
-
Some Hints For Splitting Commits
Sometimes in a code review, the commentators suggest that commits be broken up into smaller pieces. Here are a few of the collected tricks I have learned over the years. They are presented as 'editing the current tip of the tree' for simplicity. However, you can apply them to rebasing as well using the 'edit' action. The last section offers a strategy when you need to recombine the commits.
-
Clear the barnacles
The hardest part about this is not to wait until it's too much, until the drag is actually there. Keep your mind below carrying capacity, such that there's room for serendipity, at all times.
-
Rust Lifetimes: A Complete Guide to Ownership and Borrowing
Rust is a programming language that uses ownership and borrowing to address memory management issues while prioritizing both performance and memory safety. The approach is based on the concept of lifetimes, where the lifetime system tracks the lifespan of every value, ensuring that references do not outlive their intended lifetime and preventing issues, such as dangling pointers/references and memory leaks.
Unfortunately, Rust’s lifetimes can be difficult to understand, but they’re essential to Rust’s design, and they enable you to write secure and high-performing code while avoiding common memory-related problems found in other languages. In this article, you’ll learn all about lifetimes and the concepts of ownership, borrowing, and resource management in Rust.
-
dodging the go loop trap
One of the traps in go is the reuse of loop variables, confounding novices and even catching the unwary expert. It’s so bad they may even change the language to fix it.
It’s never much bothered me, personally or particularly, but it did recently bite me, and I reflected on why that may be. Because I avoid a particular idiom that’s common to many instances of the bug.
-
A weekend for developers
With Black Valley in Norway, and Akademy in Greece, this weekend's plans are all set or computer enthusiasts! Collabora is proud to sponsor both of these events as a chance for communities to come together and strengthen their bonds.
-
The joy of TXT
Guest Post: How are DNS TXT records really used?