[HN Gopher] Squashing my dumb bugs and why I log build IDs
___________________________________________________________________
Squashing my dumb bugs and why I log build IDs
Author : zoidb
Score : 5 points
Date : 2025-08-04 06:03 UTC (3 days ago)
(HTM) web link (rachelbythebay.com)
(TXT) w3m dump (rachelbythebay.com)
| phyzome wrote:
| Of course, if that code _had_ been written in Rust, the compiler
| would have caught the bug... no tests necessary, and no need to
| stick to clever coding patterns and write your own wrappers.
|
| I know she likes her C, but I wonder if she'll eventually come
| around, drawn by the better reliability.
| kevin_thibedeau wrote:
| This isn't C. At least denigrate the correct language.
|
| The problem here is a flawed object design that requires
| external knowledge of when methods can be called. The fix is to
| detect invalid calls to value(), log/print to stderr, and call
| abort(). With a suitable test suite these logic errors will
| reveal themselves before a release build.
___________________________________________________________________
(page generated 2025-08-07 23:00 UTC)