プログラミングは理論構築であるという考え方
プログラミングは理論構築ピーター・ノーアが提唱する「プログラミングを理論構築と捉える」という視点は、良いソフトウェア作成の本質を問い直す。
この考え方では、コードやドキュメントといった成果物は二次的であり、プログラマーの主要な目標は、プログラムや要件に対する包括的な「メンタルモデル」を構築することにある。
これまで別々の活動とされてきたクリーンコードやテスト、アーキテクチャ設計といった要素は、すべて「プログラムの理論」を伝達するための行為の一部と見なせる。
この理論的アプローチを採用することで、開発者はプログラムを深く理解し、よりハック的ではない構造的な修正や評価を行うことが可能になる。
原文の冒頭を表示(英語・3段落のみ)
When I finished reading Peter Naur’s Programming as Theory Building my first thought was “How come nobody ever told me to read this?” I ended up reading it multiple times, as I attempted to collect my thoughts on why it makes so much sense.
Have you ever had a situation where you’re trying to explain something or say something, and you’re looking for a suitable word or term, but no matter how much you look for it, you can’t find it? I think Naur’s “theory” is that term when it comes to writing good code and creating maintainable software. I’ve had many ideas and thoughts on those topics, but they were all disparate concepts, which even when grouped together didn’t really answer the question “why is writing good software hard?” Viewing programming as “theory building”, as Naur puts it, is the missing piece that pulls all of it together and answers the question.
In summary, Programming as Theory Building suggests that the program code, documentation and other products are secondary to what programming really is about: Building an understanding, or a mental model, of the program, its requirements, and how they relate to everything around it. That is, your primary goal as a programmer is to learn, understand, retain, improve and share this “theory” of the program.
※ 著作権に配慮し、引用は冒頭3段落までです。続きは元記事をご覧ください。