Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Uploading local code repos to overseas cloud without consent(reuters.com)
    1comments
  2. Strands harness: frontier performance with 28% lower token cost(strandsagents.com)
    discuss
  3. Can the US Build a DJI? A Teardown of Two DJI Drones(arenaphysica.com)
    discuss
  4. NASA-Funded Research Finds Complex Life Defying Record Heat(nasa.gov)
    1comments
  5. I'm sick of Claudisms, & what will happen next in AI-boosted software dev(polso.info)
    1comments
  6. AQAB: Anti-fascist blocklist QAnon, conspiracy, fake news, far-right, hate sites(codeberg.org/notainutilis)
    discuss
  7. Trump administration attacks Australia optout algorithm law in rare intervention(abc.net.au)
    discuss
  8. Fun: First-Class Functions, Currying, and a Surprise(tinyinterpreters.dev)
    discuss
  9. Meta admits Muse's likeness to OpenClaw isn't a coincidence(techcrunch.com)
    discuss
  10. Cities across US oppose Trump FCC plan to preempt local broadband rules(arstechnica.com)
    discuss
  11. Web-based IBM 1620 emulator and IPL-V from 1963(github.com/pkimpel)
    1comments
  12. Ask HN: What do people do with Android phones once security updates end?
    1comments
  13. Show HN: Birthed, a daily board of what mattered that locks at midnight(github.com/jasonepage)
    1comments
  14. Reflections on object oriented design patterns (2026)
    1comments
  15. The new CC, an AI agent built for families(blog.google)
    discuss
  16. What anaesthetics are revealing about consciousness(bbc.com)
    1comments
  17. NIST Crypto Reading Club(nist.gov)
    discuss
  18. A 1996 dial-up chat room simulator (lolchat.rip)(lolchat.rip)
    1comments
  19. The ruble markup on AI tokens(infertrail.com)
    discuss
  20. Temporal Straightening for Latent Planning(arxiv.org)
    discuss
  21. Sovereign Substrate Appliance: Layer-1 Edge Node on ARM64(richardkugel.substack.com)
    discuss
  22. Anyone using a Wispr Flow alternative that is non-cloud?
    2comments
  23. MacPad: Touch Mac in iPad(github.com/dcmmc)
    1comments
  24. Ant Group releases finance-focused Ling-3.0-flash-Fin(artificialanalysis.ai)
    discuss
  25. New method to minimize immunosuppression after organ transplantation(nature.com)
    2comments
  26. The 'AI Safety' Movement Is Making AI Less Safe(reason.com)
    discuss
  27. Show HN: Livenerf – a benchmark for whether Opus 5.5 gets nerfed(github.com/ninjahawk)
    discuss
  28. Adding side drawer with workspace concepts to rio (rust terminal) like cmux has(github.com/raphamorim)
    discuss
  29. The Jagged Frontier of Jev 1.13(typesafe.ai)
    discuss
  30. Mercury Is Shrinking, and Faster Than We Thought(nytimes.com)
    3comments

Reflections on object oriented design patterns (2026)

1 pointsby 49m ago
1 comments
We've been working on a embedded IoT many to many data pipeline and my past week's time has chasing down a gut feeling of "code smells" at the architectural level.

I've been wanting to extend the system, but have been running into way to many over-abstractions that did not sit well with me. With other team members also, there's a feeling of "how can this be better". FUD.

Sure, I could throw an LLM at it and it would create the right abstractions/de-abstrations and things would work. But that feels like putting band-aids on top of band-aids.

What were these code smells? It was a proliferation of these Rust micro traits which adjust a struct's interface to work with a variety of data channels.

Okay, but that's an observation and not yet a diagnosis.

I decided to pull out my hardcopy of Design Patterns which my mentor had me learn back in the day. (Do we still have mentors in a world of LLMs?)

Flipping through I found the diagnosis: Traits and over generalization had resulted in over "decoratorized" development.

The issues were concisely outlined in The Book:

" 1. A decorator and its component aren’t identical. A decorator acts as a transparent enclosure. But from an object identity point of view, a decorated component is not identical to the component itself. Hence you shouldn’t rely on object identity when you use decorators.

2. Lots of little objects. A design that uses Decorator often results in systems composed of lots of little objects that all look alike. The objects differ only in the way they are interconnected, not in their class or in the value of their variables. Although these systems are easy to customize by those who understand them, they can be hard to learn and debug."

Wow. These are the two smells I've been seeing:

1. A struct gets decorated via a trait impl in order to conform to an interface, but then the original struct information is lost.

2. So many structs, so many traits, so many generics.

So I have my diagnosis. Now the remediation. We need a central place to define data transformation and packet protocol between many heterogenous modules. Luckily I find the Mediator pattern later on in The Book.

"You can avoid these problems by encapsulating collective behavior in a separate mediator object. A mediator is responsible for controlling and coordinating the interactions of a group of objects. The mediator serves as an intermediary that keeps objects in the group from referring to each other explicitly. The objects only know the mediator, thereby reducing the number of interconnections."

So, today I've been drawing out the object diagram. Now I have clarity of the project in my head. Presented to the team. This cleared out the FUD for other as well...which is important to do as a team lead.

Some might say " Well, duh, just don't code bad in the first place. Design patterns are lame are over prescriptive."

Well, in the real world, especially with agile development, progress is made with architecture being a side thought or even an emergent property.

Sometimes that emergence is smelly.

11m agoHN ↗

Sure, I could throw an LLM at it and it would create the right abstractions/de-abstrations and things would work. But that feels like putting band-aids on top of band-aids.

A lot of assumptions and if you believe them to be true, why dont you follow thru ?