Tag: best-practice
All the articles with the tag "best-practice".
My posts
Why aiming for 100% coverage can be a mistake
Published: at 01:34 PMDiscover why aiming for 100% test coverage in software development can be counterproductive. Learn practical strategies to focus on core functionality, avoid unnecessary tests, and improve code quality without wasting resources.
Tech Watch Posts
The Nine Node Pillars
Published: at 01:13 PMThe article explains the fundamental principles of Node.js, focusing on its event-driven, non-blocking nature that makes it efficient for handling asynchronous operations. It emphasizes the single-threaded model of Node.js and how it utilizes event loops to manage concurrent tasks, which is crucial for building scalable network applications. Additionally, the article highlights the modularity of Node.js, making it easier for developers to manage code and leverage reusable components.
Interface Segregation Principle in React
Published: at 04:31 PMThe article discusses the Interface Segregation Principle (ISP) in React, emphasizing the importance of creating small, specific interfaces or prop definitions that only include necessary data. The principle suggests avoiding components that depend on more data than they use, which simplifies testing and maintenance. The article also addresses issues like prop drilling and offers solutions such as using React context or component composition to avoid passing unnecessary data through components.
How to compose JavaScript functions that take multiple parameters (the epic guide)
Published: at 09:11 AMThe article provides an in-depth guide on how to effectively compose functions in JavaScript that accept multiple parameters. It explores techniques such as function wrapping, partial application, and currying, which can simplify the handling of functions with multiple parameters. The guide begins by discussing the challenges of composing functions that require multiple arguments and offers solutions like wrapping functions to accept arrays of arguments. It then delves into partial application, where you pre-apply some arguments to a function, creating a new function with fewer parameters. This approach is particularly useful for customizing functions and creating more reusable code. Currying is another technique covered, allowing you to transform functions into a series of unary (single-argument) functions, further simplifying their composition.
Good Refactoring vs Bad Refactoring
Published: at 03:11 PMThis is an article about good versus bad refactoring. It discusses what refactoring is and the importance of doing it well. The article also details several common pitfalls to avoid, such as changing coding styles too much or adding unnecessary abstractions. Finally, it offers tips for successful refactoring, including being incremental, understanding the code deeply, and using testing tools.