Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> we'd even say that the greatest programmers are so because of how they produce redundancy.

Perhaps the greatest of all programmers produce redundancy while depending on very little of it in their own code. For example, Richard Hipp created SQLite, the ubiquitous and amazingly high-quality embedded database, in C. Thinking about that makes me feel like I ought to be using C in my own, much more modest attempt at a reusable infrastructure project [1]. Cue the cliches about younger generations (like mine) being soft compared to our predecessors.

[1] https://github.com/AccessKit/accesskit (it's too late now, I'm committed to doing it in Rust)



> Thinking about that makes me feel like I ought to be using C in my own, much more modest attempt at a reusable infrastructure project [1].

Before you do that, read https://www.sqlite.org/testing.html

SQLite has a crazy amount of verification and testing. There are something like 640x the code for tests as for the actual implementation.

If you are looking to SQLite as an inspiration to write in C, you should also consider the verification and testing that makes it work.


> > Perhaps the greatest of all programmers produce redundancy while depending on very little of it in their own code.

And that’s a self-own.


You're right, I forgot about the extraordinarily thorough test suite.


A thorough test suite or formal verification increases the quality of the resulting code by removing bugs, while DRY violations and redundant checks often reduce it by adding overhead (which can often but not always be safely removed, and the skill of programming lies in knowing how to write minimal software and remove redundant checks in hot paths and areas without constantly changing contracts, and instead proving statically those paths are unreachable).


It might be important to consider that making a high performance, reliable database is something that is far more dependent on the author than the language they choose to use, and that it may not be a good choice to cargo cult their language choices in your own project.


My great-grandfather died of Polio in his twenties. Look at me, a thirty-something, with no Polio, not even any Covid symptoms! Curse my soft-handed generation!!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: