Skip to content

Comment on Things you shouldn't do: Two pointers in one field.parent

Comments

Use half the memory -> buy a smaller memory chip per unit -> spend less per unit -> profit more per unit.

Or: use twice the memory -> buy a bigger memory chip per unit, adding one dollar to the cost -> charge $1 extra for your $300 unit -> spend less money defusing "your product sucks because it crashes all the time" support calls -> profit more per unit.

But maybe you should stick to hand-rolled assembly. I hear there's geek cred in that.

(But actually, there is a middle ground -- something like Atom: http://hackage.haskell.org/package/atom. You get type safety guarantees at compile time, and you get a minimal runtime, lowering hardware requirements.)

You seems to think most computers are complicated, with huge amount of memory needing dedicated and scalable components.

This is not the case. Most computers are tiny; the kind of "you've only got 1kB built-in and non-expandable memory" tiny (yet only if you're lucky). And most of those computers are indeed programmed correctly, despite using a number of classical trick like xor linked-lists (the program is small, so really checking it, even if it contains tricks, is doable).

> buy a bigger memory chip per unit, adding one dollar to the cost -> charge $1 extra for your $300 unit

Devices containing little enough memory where techniques like this are useful rarely cost $300 per unit.

There's no reason code using this technique needs to be buggy. You've got a list of things to test for right there.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.