Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. We Are Speaking 300 Daily Words Fewer Every Year(sagepub.com)
    discuss
  2. Conway's Game of Life Running on a Tang Nano 9k FPGA Board with SPI LCD(github.com/philtomson)
    discuss
  3. Open-source social media scheduler(cogsend.com)
    discuss
  4. EN World Is Being DDoS'd by AI Bots(enworld.org)
    1comments
  5. Operation Migration(wikipedia.org)
    discuss
  6. Tesla Closes Texas Airspace for Roadster Launch Event(notateslaapp.com)
    discuss
  7. I annotated 87 real invoices to find out what they contain(invoicestospreadsheets.com)
    1comments
  8. Nearly Half of Age of Empires Dev Edge Laid Off(vgchartz.com)
    discuss
  9. We're Making Tailscale Faster(tailscale.com)
    discuss
  10. RepoDocs – turn your repo's Markdown/*.md into a Figma-like board you can edit(github.com/alecerca)
    discuss
  11. Show HN:Tornedo- Everything a torrent client does, without leaving your terminal(npmjs.com)
    discuss
  12. Naming AI agents after Seinfeld characters helps bots join the team – report(theregister.com)
    discuss
  13. Open-weight models take 56% of token volume(vercel.com)
    discuss
  14. Tokens Too Cheap to Meter(jyn.dev)
    discuss
  15. Trump says US will henceforth call AI 'super intelligence'(reuters.com)
    1comments
  16. Show HN: I generated 21k astrology pages with Swiss Ephemeris, open sourced(github.com/feifeizhao25-ship-it)
    1comments
  17. Weak models write tool calls as prose. We started executing them(fiit.ai)
    discuss
  18. Formal methods can start small(yovico.ai)
    discuss
  19. Z.ai uploading local code repos to overseas cloud without consent(reuters.com)
    1comments
  20. Strands harness: frontier performance with 28% lower token cost(strandsagents.com)
    discuss
  21. Can the US Build a DJI? A Teardown of Two DJI Drones(arenaphysica.com)
    discuss
  22. NASA-Funded Research Finds Complex Life Defying Record Heat(nasa.gov)
    1comments
  23. I'm sick of Claudisms, & what will happen next in AI-boosted software dev(polso.info)
    1comments
  24. AQAB: Anti-fascist blocklist QAnon, conspiracy, fake news, far-right, hate sites(codeberg.org/notainutilis)
    discuss
  25. Trump administration attacks Australia optout algorithm law in rare intervention(abc.net.au)
    1comments
  26. Fun: First-Class Functions, Currying, and a Surprise(tinyinterpreters.dev)
    discuss
  27. Meta admits Muse's likeness to OpenClaw isn't a coincidence(techcrunch.com)
    1comments
  28. Cities across US oppose Trump FCC plan to preempt local broadband rules(arstechnica.com)
    discuss
  29. Web-based IBM 1620 emulator and IPL-V from 1963(github.com/pkimpel)
    1comments
  30. Ask HN: What do people do with Android phones once security updates end?
    3comments

Reflections on object oriented design patterns (2026)

1 pointsby 1h 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.

1h 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 ?