frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

The Six Patterns That Cover Everything

https://github.com/siy/coding-technology/blob/main/articles/six-patterns-that-cover-everything.md
2•siy•3w ago

Comments

siy•3w ago

  Every data transformation you'll ever write falls into one of six patterns:

  - Leaf - One thing. No substeps. Atomic.
  - Sequencer - This, then that. Output becomes input.
  - Fork-Join - These together, then combine. Independent operations merging.
  - Condition - Which path? Route based on value.
  - Iteration - Same thing, many times. Transform a collection.
  - Aspects - Wrap it. Add retry, timeout, logging around an operation.

  That's it. Not "covers most cases." Everything.

  Why Only Six?

  These aren't design patterns someone invented. They're the fundamental ways data can flow:

  1. Transform a value (Leaf)
  2. Chain dependent transforms (Sequencer)
  3. Combine independent transforms (Fork-Join)
  4. Choose between transforms (Condition)
  5. Apply transform to many values (Iteration)
  6. Enhance a transform (Aspects)

  There's no seventh option. Data either transforms, chains, combines, branches, iterates, or gets wrapped.

  The Strange Coincidence

  These same six patterns describe every business process:

  - Leaf: "Validate the email format"
  - Sequencer: "First verify identity, then check permissions, then grant access"
  - Fork-Join: "Get profile, balance, and transactions, then build dashboard"
  - Condition: "If premium user, apply discount"
  - Iteration: "For each cart item, calculate tax"
  - Aspects: "Log every payment attempt"

  This isn't coincidence. Business logic IS data transformation - we just use different words.

  The Translation

  - "First... then..." -> Sequencer -> .flatMap() chain
  - "Get X and Y and Z, then..." -> Fork-Join -> Promise.all()
  - "If... otherwise..." -> Condition -> Ternary/switch
  - "For each..." -> Iteration -> .map()
  - "Always log/retry..." -> Aspects -> Wrapper

  No impedance mismatch. Same six concepts, different vocabulary.

  Gap Detection

  When you model business processes using these patterns, gaps become visible.

  Missing validation: Building a Sequencer but nothing validates input before step one? Gap found.

  Unclear dependencies: Business describes five things. Sequencer or Fork-Join? If they can't tell you which outputs feed which inputs, the process isn't defined.

  Inefficient flows: Business describes sequential A, B, C, then combine. But if A, B, C don't depend on each other, this should be Fork-Join. Pattern reveals inefficiency.

  The Result

  Six patterns. Complete coverage. Shared language between developers and business.

  The irony? You'll spend an hour asking the right questions. The coding takes 30 seconds.

  From Java Backend Coding Technology: https://github.com/siy/coding-technology

SectorC: A C Compiler in 512 bytes

https://xorvoid.com/sectorc.html
1•valyala•1m ago•0 comments

The API Is a Dead End; Machines Need a Labor Economy

1•bot_uid_life•2m ago•0 comments

Digital Iris [video]

https://www.youtube.com/watch?v=Kg_2MAgS_pE
1•Jyaif•3m ago•0 comments

New wave of GLP-1 drugs is coming–and they're stronger than Wegovy and Zepbound

https://www.scientificamerican.com/article/new-glp-1-weight-loss-drugs-are-coming-and-theyre-stro...
3•randycupertino•4m ago•0 comments

Convert tempo (BPM) to millisecond durations for musical note subdivisions

https://brylie.music/apps/bpm-calculator/
1•brylie•6m ago•0 comments

Show HN: Tasty A.F.

https://tastyaf.recipes/about
1•adammfrank•7m ago•0 comments

The Contagious Taste of Cancer

https://www.historytoday.com/archive/history-matters/contagious-taste-cancer
1•Thevet•9m ago•0 comments

U.S. Jobs Disappear at Fastest January Pace Since Great Recession

https://www.forbes.com/sites/mikestunson/2026/02/05/us-jobs-disappear-at-fastest-january-pace-sin...
1•alephnerd•9m ago•0 comments

Bithumb mistakenly hands out $195M in Bitcoin to users in 'Random Box' giveaway

https://koreajoongangdaily.joins.com/news/2026-02-07/business/finance/Crypto-exchange-Bithumb-mis...
1•giuliomagnifico•9m ago•0 comments

Beyond Agentic Coding

https://haskellforall.com/2026/02/beyond-agentic-coding
3•todsacerdoti•10m ago•0 comments

OpenClaw ClawHub Broken Windows Theory – If basic sorting isn't working what is?

https://www.loom.com/embed/e26a750c0c754312b032e2290630853d
1•kaicianflone•12m ago•0 comments

OpenBSD Copyright Policy

https://www.openbsd.org/policy.html
1•Panino•13m ago•0 comments

OpenClaw Creator: Why 80% of Apps Will Disappear

https://www.youtube.com/watch?v=4uzGDAoNOZc
2•schwentkerr•17m ago•0 comments

What Happens When Technical Debt Vanishes?

https://ieeexplore.ieee.org/document/11316905
2•blenderob•18m ago•0 comments

AI Is Finally Eating Software's Total Market: Here's What's Next

https://vinvashishta.substack.com/p/ai-is-finally-eating-softwares-total
3•gmays•19m ago•0 comments

Computer Science from the Bottom Up

https://www.bottomupcs.com/
2•gurjeet•19m ago•0 comments

Show HN: A toy compiler I built in high school (runs in browser)

https://vire-lang.web.app
1•xeouz•21m ago•1 comments

You don't need Mac mini to run OpenClaw

https://runclaw.sh
1•rutagandasalim•21m ago•0 comments

Learning to Reason in 13 Parameters

https://arxiv.org/abs/2602.04118
2•nicholascarolan•23m ago•0 comments

Convergent Discovery of Critical Phenomena Mathematics Across Disciplines

https://arxiv.org/abs/2601.22389
1•energyscholar•24m ago•1 comments

Ask HN: Will GPU and RAM prices ever go down?

1•alentred•24m ago•1 comments

From hunger to luxury: The story behind the most expensive rice (2025)

https://www.cnn.com/travel/japan-expensive-rice-kinmemai-premium-intl-hnk-dst
2•mooreds•25m ago•0 comments

Substack makes money from hosting Nazi newsletters

https://www.theguardian.com/media/2026/feb/07/revealed-how-substack-makes-money-from-hosting-nazi...
5•mindracer•26m ago•0 comments

A New Crypto Winter Is Here and Even the Biggest Bulls Aren't Certain Why

https://www.wsj.com/finance/currencies/a-new-crypto-winter-is-here-and-even-the-biggest-bulls-are...
1•thm•26m ago•0 comments

Moltbook was peak AI theater

https://www.technologyreview.com/2026/02/06/1132448/moltbook-was-peak-ai-theater/
2•Brajeshwar•27m ago•0 comments

Why Claude Cowork is a math problem Indian IT can't solve

https://restofworld.org/2026/indian-it-ai-stock-crash-claude-cowork/
3•Brajeshwar•27m ago•0 comments

Show HN: Built an space travel calculator with vanilla JavaScript v2

https://www.cosmicodometer.space/
2•captainnemo729•27m ago•0 comments

Why a 175-Year-Old Glassmaker Is Suddenly an AI Superstar

https://www.wsj.com/tech/corning-fiber-optics-ai-e045ba3b
1•Brajeshwar•27m ago•0 comments

Micro-Front Ends in 2026: Architecture Win or Enterprise Tax?

https://iocombats.com/blogs/micro-frontends-in-2026
2•ghazikhan205•29m ago•1 comments

These White-Collar Workers Actually Made the Switch to a Trade

https://www.wsj.com/lifestyle/careers/white-collar-mid-career-trades-caca4b5f
1•impish9208•30m ago•1 comments