I understand Uri's point, and can almost understand the silliness, but I
think there really is more often a benefit to putting "similarities in
code and differences in data" rather than vice versa.

The following quote makes a similar point, but it is not exactly the
same point.
Eric S. Raymond, The Art of Unix Programming p 47 online at
http://www.faqs.org/docs/artu/ch01s06.html and many other places

Rule of Representation: Fold knowledge into data, so program logic can
be stupid and robust.  Even the simplest procedural logic is hard for
humans to verify, but quite complex data structures are fairly easy to
model and reason about. ...  Data is more tractable than program logic.
It follows that where you see a choice between complexity in data
structures and complexity in code, choose the former. More: in evolving
a design, you should actively seek ways to shift complexity from code to
data.


Another related idea is this: "To reuse code you have to change the
data" (my paraphrase of a quote in
http://groups.google.com/group/comp.object/browse_frm/thread/2ebcb9c6cf8
6bf9f/318ede5cf4a01220?tvc=1&q=%22in+data%22+%22in+code%22+invariant+OR+
invariants+OR+mellor&hl=en#318ede5cf4a01220 

The difference is that I am trying to find a quote that focuses on the
benefits of using data in a special way, as "control data", to determine
the specific execution path taken by the code.


Thanks,
Steve

-----Original Message-----

Tolkin, Steve wrote:
> I am looking for the "best" and/or original wording of this
programming
> maxim: Put similarities in code and differences in data
>
> Google found this in a perl discussion
> "capture similarities in code, differences in data"
> http://blog.gmane.org/gmane.comp.lang.perl.fun/month=20031001
> So I am posting to this list.
>
> Here is a hit on a similar quote "putting invariants in code and
> differences in data."
>
http://groups.google.com/group/comp.object/browse_thread/thread/1dc6f6dd
>
db34dc18/cdfb5eae936861f2?lnk=st&q=%22differences+in+data%22+%22in+code%
> 22&rnum=3&hl=en#cdfb5eae936861f2
> This mentions Mellor is passing -- Is he the original person behind
> this?
>
> Hopefully helpfully yours,
> Steve
>   
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to