Code-tips

  • Published on
    View count
    3 views
    Choose a capitalization style for variables, functions, and other identifiers, and adhere to it throughout your codebase. Consistency improves code readability.
  • Published on
    View count
    8 views
    Prefer duplication over the wrong abstraction. Avoid rushing into creating abstractions without a clear understanding of the problem domain.
  • Published on
    View count
    6 views
    Code duplication is often frowned upon. However, it can be more beneficial to have duplicated code rather than introducing premature abstraction.
  • Published on
    View count
    4 views
    Avoid duplicating the same information in multiple places. The DRY principle encourages developers to eliminate code duplication by abstracting functionality.
  • Published on
    View count
    4 views
    Improve code reliability by avoiding side effects. Minimize hidden consequences, enhance predictability, and simplify testing.
  • Published on
    View count
    3 views
    Thrown errors are a good thing and you can do something about them. The rule is “Don't ignore caught errors”
  • Published on
    View count
    3 views
    Thrown errors are a good thing and you can do something about them. The rule is “Don't ignore caught errors”
  • Published on
    View count
    5 views
    The rule is really simple. The only thing you have to do is to choose a single concept to test in every unit test you write.
  • Published on
    View count
    8 views
    Learn about the KISS principle and its impact on software development. Prioritize simplicity, improve maintainability, and enhance code readability.
  • Published on
    View count
    7 views
    Learn how to write clear and concise code by avoiding unnecessary repetition of context in variable names. Enhance code readability and maintainability.
  • Published on
    View count
    8 views
    Discover how to encapsulate conditionals for clearer code. Extract expressions into functions with meaningful names to improve readability and simplify logic.
  • Published on
    View count
    5 views
    Discover the benefits of removing dead code - improved maintainability, reduced risk of bugs, enhanced readability, and better performance.
  • Published on
    View count
    23 views
    Negatives are harder to understand. Conditional functions should be expressed as positives every time.
  • Published on
    View count
    21 views
    Discover the Liskov Substitution Principle (LSP) and its role in building reliable software. Guarantee seamless substitution of parent and child classes.
  • Published on
    View count
    14 views
    Learn about the Open-Closed Principle (OCP) and its benefits. Extend functionality without modifying code, ensuring maintainability and reusability.
  • Published on
    View count
    18 views
    Each class should have a single responsibility. That means that there should be only one reason to change it. This is one of the SOLID principles.
  • Published on
    View count
    14 views
    Discover how the Dependency Inversion Principle improves code maintainability and modularity by relying on abstractions and inverting control of dependencies.
  • Published on
    View count
    3 views
    Trying to optimize your code is a waste of time in some cases. Modern browsers do a lot of optimizations at runtime.
  • Published on
    View count
    10 views
    Using getters and setters is better than accessing the object property directly. Accessing properties directly breaks encapsulation.
  • Published on
    View count
    7 views
    Simplify your code and improve testability by minimizing function arguments. Discover how fewer arguments enhance readability and maintainability.
  • Published on
    View count
    9 views
    Follow best practices and adhere to the single responsibility principle by not using flags as function parameters. Improve code comprehension and modularity.
  • Published on
    View count
    8 views
    Choosing good names takes time but it saves even more time. Names should give you useful information.
  • Published on
    View count
    4 views
    Learn the importance of using pronounceable names in your code. Discover how it improves communication and enhances code readability and maintainability.
  • Published on
    View count
    10 views
    Improve code clarity and searchability by replacing magic numbers with constants. Make your code more expressive and self-explanatory.
  • Published on
    View count
    5 views
    Master the technique of avoiding mental mapping in your code. Enhance readability and eliminate confusion with explicit variable naming.
  • Published on
    View count
    6 views
    Break the calculations up into intermediate values that are held in variables with meaningful names. The names give meaning and clarity to the code.
  • Published on
    View count
    11 views
    Discover the principle of writing functions that do one thing. Improve code modularity, reusability, and organization for a cleaner codebase.
  • Published on
    View count
    8 views
    Do you want to make your code super flexible and easy to change? Composition might be the way to go! In this post, we'll learn about the difference between composition and inheritance and figure out which one is best for different situations.