Today I Learned - Rocky Kev

Tagged “patterns”

  1. TIL a bunch of new functional programming words

    It's so funny seeing developers re-invent functional programming paradigms. We really need to teach this stuff better.

  2. TIL Cleaner data structures

    Avoid unnecessary contexts, optional chaining, better error handling, avoid using flags

  3. TIL Cleaner Functions

    tl;dr - Limit the number of arguments, Avoid executing multiple actions in a function, Avoid mutation, Avoiding non-negatives, Return Early

  4. TIL a fancy word for auto-generating objects, A Factory Function

    So a factory function creates objects. That's all.

  5. TIL the Singleton Pattern is hotly debated

    Singleton Pattern is useful when exactly one object is needed to be used as a global instance to coordinate across the system. But it got problems.

  6. TIL Observer Pattern

    The observer pattern defines a subscriber method, which will update every object that is subscribed to itself, making sure every subscriber gets the latest update.

  7. TIL Singleton pattern

    Singleton is a creational design pattern that restricts class to have only one instance, while also creating a global access point to this instance. It is used when control access to a shared resource is needed.

See all tags.