Live data from Hacker News

A stray commit buried multiple levels deep cost me months

droppedasbaby.com

1–10 of 38 posts

Re: A stray commit buried multiple levels deep cost me months

#5
post #2

> DO NOT blame the framework Why not? Why should I be allowed to db.commit() midway through a transaction?

With great power comes great responsibility.

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

Re: A stray commit buried multiple levels deep cost me months

#6
post #2

> DO NOT blame the framework Why not? Why should I be allowed to db.commit() midway through a transaction?

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.

Re: A stray commit buried multiple levels deep cost me months

#8
post #2

> DO NOT blame the framework Why not? Why should I be allowed to db.commit() midway through a transaction?

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.

What's the use case? I've never found myself wishing my transaction wasn't actually atomic.

Re: A stray commit buried multiple levels deep cost me months

#10
> # 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.

Post reply on HN