How to Proceed at Generic Programming
I am currently reading From Mathematics to Generic Programming by Stepanov and Rose. It is a very good book that has me thinking hard about how to render my agent system more generic.
In mathematics, there was a process of generalization that moved through things such as:
Similarly in programming, it seems to me that it is rarely a successful strategy to try to start by defining some grand abstraction, and then building one's system around it. Rather, successful generic programming comes from building concrete applications, and then painstakingly seeking out commonalities found in different applications and abstracting them.
In mathematics, there was a process of generalization that moved through things such as:
- Common measures
- Natural numbers
- Integers
- Rational numbers
- Polynomials
- Real numbers
- Complex numbers
- Groups
- Rings
- Fields
Similarly in programming, it seems to me that it is rarely a successful strategy to try to start by defining some grand abstraction, and then building one's system around it. Rather, successful generic programming comes from building concrete applications, and then painstakingly seeking out commonalities found in different applications and abstracting them.
A book that interests me. I used the STL extensively when I did C++. I'm curious to see how you find it.
ReplyDeleteGood, but like a mathematician's book: post to come.
DeleteGene, do you study abstract mathematics? Specifically, abstract algebra? I don't really have any reason for asking other than pure curiosity. Some programmers, at least here at Texas Tech, absolutely hate pure mathematics.
ReplyDeleteYes, I'm doing so at present.
DeleteA thin book you want, trust me on this, is The Skeleton Key to Mathematics. It's in a Dover edition. It provides some of the intuitive motivation for why algebra is the way it is you won't get from a standard text.
ReplyDeleteOrdered!
Delete