74 Matching Annotations
  1. Last 7 days
    1. pre-commit hooks are fundamentally broken
      • Article argues pre-commit hooks are fundamentally broken due to running on working tree, not index, failing to catch unstaged changes.
      • Hooks interfere with rebases, interactive commits, and external branches without hooks, requiring frequent --no-verify usage.
      • Demonstrates issues via Rust fizzbuzz example: formatting fixes don't stage, existing unformatted code blocks commits, rebases fail unexpectedly.
      • Recommends pre-push hooks instead: run on index, keep fast/reliable (no network/credentials), quiet, manual setup via docs.
      • Additional pitfalls: slow/unreliable implementations, modifying commits, not running on stashes; prefers commits over stashes for branching.

      Hacker News Discussion

      • Users debate pre-commit vs. pre-push/CI: enforce in CI for reliability, use hooks to reduce churn but not guarantee (e.g., secrets in pre-push).
      • Workflows vary: WIP commits common, rebase/squash before push; hooks break rebases needing full checkouts (e.g., cargo clippy).
      • Editor integration preferred for formatting/linting; force consistency in teams but allow bypass for power users.
      • Alternatives: git filters for formatting, jj run for future; personal setups run heavy local checks but optional for contributors.
      • Defenses of pre-commit frameworks (speed, environments) countered by author; prefer CI for shared enforcement over local hooks.
  2. Apr 2025
  3. Sep 2024
    1. technologies are “part of larger sociotechnical entanglements and thus give rise to knowledge and practices that are partial, situated, embedded and embodied, as well as implicated in a broader nexus of power relations”

      in Art on My Mind, bell hooks contends that discussing power and access related to race, gender, and class within the artworld is crucial in a time where nationalism, fascism, fundamentalism are on the rise;

      this is as poignant as it was in 1995, nearly 30 years ago, as it is today; one might even argue even more critical to apply to the design/HCI world with the advent of internet and social media;

    2. nstead of seeing an artwork as the work of an isolated genius, he sees it as the result of interactions between the artist and the world. Not only does every piece of art rely on “extensive division of labor”, it has a “social origin”, and all these forces play a critical role in shaping the final work.

      in Art on my Mind bell hooks challenges the assumption that Black artistic genius stems from the single person overcoming odds; here, the authors similarly recognize that in actuality, there are many societal, cultural, collaborative influence that shape creation.

  4. Aug 2024
  5. Nov 2023
  6. Aug 2023
  7. Feb 2023
  8. Nov 2022
    1. It is handy to manually generate the diagram from times to times using the previously created command: npm run db:diagram:generate. Though, getting the diagram to update itself on its own automatically without a developer interaction would ensure that it the diagram is never obsolete. There are several ways of doing this.You could use a pre-commit git hook or even better simply configure your CI/CD pipeline(s) to run the npm script whenever something gets merged into the main branch 🙂
  9. Aug 2022
  10. Jul 2022
  11. May 2022

    Tags

    Annotators

  12. Mar 2022
  13. Jun 2021
  14. Nov 2020
  15. Oct 2020
  16. Sep 2020
    1. I’ve seen some version of this conversation happen more times than I can remember. And someone will always say ‘it’s because you’re too used to thinking in the old way, you just need to start thinking in hooks’.

      But after seeing a lot of really bad hooks code, I’m starting to think it’s not that simple — that there’s something deeper going on.

  17. Aug 2020
  18. Jul 2020
  19. Jun 2020
  20. May 2020
  21. Apr 2020
  22. Dec 2019
    1. Mutations, subscriptions, timers, logging, and other side effects are not allowed inside the main body of a function component (referred to as React’s render phase). Doing so will lead to confusing bugs and inconsistencies in the UI.

      key point!

    2. In React class components, the render method itself shouldn’t cause side effects. It would be too early — we typically want to perform our effects after React has updated the DOM.

      key point!

    3. Custom Hooks are more of a convention than a feature. If a function’s name starts with ”use” and it calls other Hooks, we say it is a custom Hook. The useSomething naming convention is how our linter plugin is able to find bugs in the code using Hooks.

      as can be seen above, indeed nothing explicetly tells that the function is a special kind of hook. its just a function...

    1. Data fetching, setting up a subscription, and manually changing the DOM in React components are all examples of side effects

      key point. this means that all those small messing of variables in code that gets rendered into the template of the component? this is all 'side effects', and of course we do this all the time...

  23. Nov 2019
  24. Oct 2019
  25. Sep 2019
  26. Aug 2019
  27. May 2015