Recently, I was reading the great book Effective Java, 3rd Edition by Joshua Bloch. An awesome book that I highly recommend to every Java developer. One of the items that caught my attention was Item 9: Prefer try-with-resources to try-finally. Bloch states: “It may be hard to believe, but even good programmers got this wrong most of the time.” What does that mean, and why is it important? Let’s dive into the details. ...
Keeping JUnit Tests Clean
Writing unit tests is easy. Writing good unit tests is difficult. But what actually makes a good unit test? You may ask yourself this question when you start writing tests for your code. Or maybe you already have a bunch of tests, but they’re not as clean and maintainable as you’d like them to be. You surely found yourself in a situation where you had to change your code, but your tests were so messy that you had to rewrite them from scratch. ...
Ignore Packages When Upgrading Arch Linux
When upgrading Arch Linux, the typical command used is: 1pacman -Syu If you’re using AUR packages (for example, with yay), especially *-git versions that track bleeding-edge development, you may have noticed how long upgrades can take. These packages are often rebuilt from source every time you update, which can seriously slow down the process. Recently, I ran into this issue with the vlc-git package, which I installed to try out the upcoming VLC 4.0 release. The compile time was significant, and it made my usual system upgrades feel painfully slow. As the typical *-git packages also track development progress, these updates might even be frequent and can break the package. ...