プログラマーの罪悪感と、SQLite データベースを FST で置き換える話
本文の状態
日本語全文を表示中
詳細モードで約1分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Simon Willison Blog
アンドリュー・クイン氏は、自分が構築しているツールが過去の優れた実装に置き換えられているのではないかという罪悪感を抱きつつも、3GB の SQLite データベースを 7MB の有限状態トランジューサ(FST)バイナリで置き換える技術的解決策を示した。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
私の人生の最初の四半世紀において、プログラミングには常に魅了されていましたが、今私が構築しているツールが、誰かが 30 年や 40 年前にすでに作成したはるかに優れた実装によって既に置き換えられているのではないかという罪悪感を克服することはできませんでした。例えば、TSV を認識する検索と置換を書くこともできますし、awk というツールを知ってその種のすべての問題を一度に解決することもできるでしょう。
私の中心的な考え方は、「これは罠である」ということです。私たちが車輪の作り方について知っていることの限界に到達するためには、車輪を千個も作る必要はありませんし、ゼロを作るわけにもいきません。数個(おそらく 4 つか 5 つ)を再発明すれば、ほとんどの分野では十分です。数学やコンピュータサイエンスのように認識論的に厳密で発展した分野でも、せいぜい 20 個から 30 個程度でしょう。
あなたが再発明する車輪一つひとつと、その過程で投げかける具体的な質問一つひとつが、同じ時間を怠惰な学習に費やすことよりも、あるいはその 5 倍の時間を費やすことよりも、真の最前線へとあなたをより速く運んでくれます。
— Andrew Quinn、Revisiting a 3 GB SQLite database with a 10 MB FST (finite state transducer) binary に関する脚注
原文を表示
One could say in the first quarter-century of my life, that while I was always fascinated by programming, I could never overcome the guilt of not really knowing whether the tool I am building right now isn’t already superceded by some much better implementation someone else has already written 30 or 40 years ago; I could write a TSV-aware search and replace, or I could find out about awk and solve that entire class of problems in one fell swoop, for example. My central conceit is that this is a trap. You need to reinvent a couple of wheels to get to the edge of what we know about wheel-making, not a thousand wheels, and not zero; probably four or five is sufficient in most domains, maybe closer to twenty or thirty in the most epistemically rigorous and developed fields like mathematics or computer science. Each wheel you reinvent, and every directed question you ask along the way, will propel you faster to the true frontier than that same amount of time spend in idle study, or even five times that amount.
— Andrew Quinn, footnote on Replacing a 3 GB SQLite database with a 10 MB FST (finite state transducer) binary
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み