Do you want to optimize your code and take your development skills to the next level? Look no further! In this article, we'll explore five unpopular React hooks that you may not know about, but can greatly benefit from. Use Imperative Handle The firs...
TL;DR: Avoid side effects. Always. Problems Coupling Testability Reusability Function Composition Solutions Decouple the code and avoid side-effects Inject the output destination Context Outputting to the console within an internal functio...
TL;DR: Avoid old terms like whitelists, blacklists, master, etc. Problems Racial Connotations Exclusionary Language Diverse Perspectives Solutions Use alternative terminology Context Language evolves, and technical terms should follow it. You...
We can achieve SRP by promoting the separation of concerns and ensuring that classes have a single responsibility. Here are some design patterns that can assist in adhering to SRP: Adapter Pattern: The Adapter pattern allows you to create a separate...
What if I told you change is coming? Lots of it. Like the domino effect, a simple code change could trigger a chain reaction that forces you to change many additional bits. A stable codebase is needed to minimise the propagation of this coming change...
TL;DR: Tests must be in full control and you can't manage time. Problems Fragile Tests CI/CD Breaks Solutions Tests should be always in full environmental control. Create a time source Context I read a Tweet about adding a fixed date to chec...
There is this one quote that I hear often repeated. There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton But is it really true? Yes, finding the perfect name for something is difficult. But let u...
During some interesting discussion, one very respectful gentleman said “there are plenty of studies demonstrating the effectiveness of TDD”. But is it so? Test-driven development (TDD) has been a hot topic for a long time. There’re proponents and opp...