
What's the difference between singleton, scoped, and transient?
It’s trivial to register a dependency in a .NET API, but it’s important to clarify a few terms that drastically change a dependency’s lifetime.
It’s trivial to register a dependency in a .NET API, but it’s important to clarify a few terms that drastically change a dependency’s lifetime.
Points aren’t hours, but they sorta represent hours. Or do they? 🤔 If you’re as perplexed as I used to be, here’s a few thoughts about points.
When you’re writing tests, you generally don’t want to write to the database, email customers, and hit third-party API’s. That’s why we need to know how to mock dependencies!
Does the idea of submitting to a code review make you sweat bullets? Or do you brush it off as a necessary evil? It should be a (hopefully positive) conversation, wherein the team agrees to the code they’re all going to have to help maintain, and maybe learns something new too.
At work, we’re running through The Pragmatic Programmer - the original, not the 2nd edition published last year. If anyone is reading that, I’d love to know if it really updates things for modern programming and whether it seems necessary. The original seems pretty timeless. Yesterday was my turn to present, listing out highlights from chapter 5, sharing some thoughts, and hopefully spurring some conversation. The authors start by talking about the Law of Demeter, but they don’t explain it very well, nor do they call it by its much more self-explanatory name, the Principle of Least Knowledge. ...
Mozilla announced they’ll no longer accept extensions with obfuscated code. It’s good news for users, maybe not so much for developers. Obfuscated code is (intentionally) nearly impossible to understand, and could easily be malicious. Let’s unpack and break down a few concepts.
When you find an API to use in your app, you’ll need to access it in a specific language - not always an easy or straightforward task. As long as you’re doing all that work, why keep it to yourself? Let’s look at creating an API wrapper that you can share with others!
An API is an Application Programming Interface, but what’s that really mean? In a more practical sense, it’s one programmer hiding the (possibly messy) details of their own code behind a nice veneer, in order to make it easier for another programmer to consume it in their own program.