frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

A stray commit buried multiple levels deep cost me months

https://www.droppedasbaby.com/posts/db-commits/
24•offbyone42•1h ago

Comments

Retr0id•41m ago
> DO NOT blame the framework

Why not? Why should I be allowed to db.commit() midway through a transaction?

Stitch4223•31m ago
With great power comes great responsibility.
Retr0id•29m ago
Well, I don't want either. Give me a safe API!
UqWBcuFx6NV4r•28m ago
This is like people saying that C is infallible and it’s those stupid lesser-developers that unlike me simply cannot wield its immense power. No. Usability matters. After all these years software development still has an ‘unfounded male confidence / posturing’ problem and it’s just cringeworthy
hackthemack•20m ago
I agree. No matter how complicated, or unnecessary, or unintuitive a piece of software or technology is... There is always this contingent of people who pop in and say "It is not that hard!" and furthermore tend to express a view of "I am superior because I figured out this obtuse thing, and you must be inferior because you have not figured it out".

I do not know why that mentality exists in the industry, but I see it all the time... for the past 35 years.

saghm•20m ago
Yes, and the people who designed that API clearly were not worthy of of the responsibility of providing it
offbyone42•27m ago
Giving "I cut my finger with a knife, why is the knife so sharp?" energy. JKJK.

I think the option should be there, but it needs to be used responsibly.

Retr0id•23m ago
What's the use case? I've never found myself wishing my transaction wasn't actually atomic.
p-e-w•3m ago
The option to make a transaction not be a transaction? What is it then?
jiggawatts•18m ago
Database engines I've worked with generally support nested transactions, so you can open a transaction, open another transaction, commit it, then roll back the outer transaction... and it's like nothing ever happened.

This ability to compose transactions is their main benefit over other kinds of concurrency control!

quamserena•23m ago
This is trivially preventable via affine types
eqvinox•21m ago
> # calls helpers that eventually call commit()

Show, don't tell. The article should've included an example of these helpers.

All in all, this feels poorly written, but also poorly thought out. The DB layer can and should throw an exception if you manually begin/commit inside a context manager. Please do blame it if it doesn't.

hparadiz•17m ago
Feel like I've solved this non problem like 20 times.

If your framework is holding your records in a collection and you keep track of phantoms that have been edited but not saved as they are edited then all this becomes a non issue. That way you do Collection->SaveTransaction or Collection->Save() and the collection does all the db commit, roll back nonsense.

Anyway the examples I don't even know if I could call that an ORM. Use a better one.

khaledh•15m ago
If someone can trivially introduce bad state (or worse, data loss), then the API is clearly broken.
magicalhippo•12m ago
I found the article very hard to follow. Then I read the domain name and it all made sense...

Guess our pattern is different, not really felt the pain point the author is talking about. Or it's the language/framework, not sure whatever the example code is written in, but setting properties on entity records would never update the database in the ones I've used.

When we did things more manually we'd make sure that methods like `create_main_records` would start a transaction if not in one, and only commit if it started the transaction. This way we could nest without worry. Our database supported nested transactions but using this pattern we didn't feel the need.

Jaron Lanier and DeGrasse Tyson on "There Is No AI"

https://www.youtube.com/watch?v=a_ZKYH8v_do
1•lifeisstillgood•1m ago•0 comments

The brief life and sudden death of Zyzz

https://www.theguardian.com/film/2026/aug/02/the-brief-life-and-sudden-death-of-zyzz-why-did-the-...
1•mellosouls•5m ago•0 comments

Walsh: Multi-agent research pipeline with risk manager that can veto trades

https://github.com/ats4321/walsh
1•atshu21•6m ago•0 comments

Dreamup+|+Dang.ai

https://dang.ai/tool/ai-art-generation-dreamup
1•thestbyguy•9m ago•0 comments

Ask HN: I still don't understand why AI agents need "skills"

1•skeptic_ai•11m ago•1 comments

Ablative Software

https://conikeec.substack.com/p/ablative-software
1•conikeec•12m ago•0 comments

Send and Pretend: Exploiting Transcript Consistency Issues in E2EE Group Chats

https://arxiv.org/abs/2607.27510
1•sbulaev•13m ago•0 comments

The Greenhouse and the Lens: Two Modes of Agentic AI Work

https://www.brethorsting.com/blog/2026/08/the-greenhouse-and-the-lens-two-modes-of-agentic-ai-work/
2•aaronbrethorst•14m ago•0 comments

Android SystemUI Crash-loop from a single Google Drive one link (STA whitepaper)

https://lostmon.blogspot.com/2026/07/resilience-gaps-in-android-ipc.html
1•Lostmon•18m ago•0 comments

Kobuk the Destroyer – Tales from the Wild, Unseen World of Test Engineering

https://wwnorton.com/books/9781324051299
2•ripe•18m ago•1 comments

Why Is Europe Burning?

https://www.newyorker.com/news/the-lede/why-is-europe-burning
2•littlexsparkee•19m ago•0 comments

European Search Perspective: Creating a new foundation for digital pluralism

https://www.eu-searchperspective.com/
1•TMWNN•20m ago•1 comments

Genomic findings and their implications for the evolutionary social sciences

https://www.sciencedirect.com/science/article/pii/S1090513824000722?via%3Dihub
2•geneticdrifts•27m ago•0 comments

A Uiua Type System

https://www.uiua.org/blog/a-uiua-type-system
1•xyzsparetimexyz•30m ago•1 comments

The Kurzgesagt Situation is Insane [video]

https://www.youtube.com/watch?v=OX1yHmeLPy8
2•julkali•31m ago•3 comments

RFC 10015: Deprecating Obsolete Key Exchange Methods in TLS 1.2 and DTLS 1.2

https://www.rfc-editor.org/rfc/rfc10015.html
4•Jimmc414•35m ago•0 comments

Ask HN: Anyone still do work on Intel Macs?

3•senor_digimon•36m ago•2 comments

Moore's Law for Everything (2021)

https://moores.samaltman.com/
2•eatitraw•36m ago•0 comments

Nomophobia

https://en.wikipedia.org/wiki/Nomophobia
2•andersonmvd•39m ago•1 comments

Surface – KDL Specification Format – Experimental

https://github.com/etoxin/surface
2•etoxin•41m ago•1 comments

New Rule: Commie by Your Name – Real Time with Bill Maher [video]

https://www.youtube.com/watch?v=dRIjYHVh5kI
3•Bender•47m ago•2 comments

A Taxonomy of R&D Orgs

https://analogue.press/p/a-taxonomy-of-r-and-d-orgs
2•arbesman•52m ago•0 comments

Show HN: I made 70K+ hand-drawn icons using AI

https://koboyo.com/icons
1•kamranahmedse•54m ago•0 comments

Kubeside – a Kubernetes client that shows your app, not your cluster

https://github.com/dynaum/kubeside
1•dynaum•58m ago•0 comments

A stray commit buried multiple levels deep cost me months

https://www.droppedasbaby.com/posts/db-commits/
24•offbyone42•1h ago•15 comments

The Toad Medicine Boom Was Built on a Myth

https://www.bloomberg.com/news/articles/2026-07-31/what-is-5-meo-dmt-the-god-molecule-and-the-per...
1•petethomas•1h ago•0 comments

Trump says Greenland will be under US control by the time he leaves office

https://www.independent.co.uk/news/world/americas/us-politics/trump-greenland-threats-europe-b302...
10•root-parent•1h ago•2 comments

RoR: Arbitrary file read and RCE in Active Storage

https://discuss.rubyonrails.org/t/cve-2026-66066-possible-arbitrary-file-read-and-remote-code-exe...
2•dnw•1h ago•0 comments

Situational Awareness: The Decade Ahead (2024)

https://situational-awareness.ai/
1•root-parent•1h ago•0 comments

Show HN: PhaseProbe – Find simulation transitions and turn them into tests

https://github.com/aliengineering-byte/phaseprobe
1•ali110v•1h ago•0 comments