On Sep 29, 2008, at 8:24 PM, Peter da Silva wrote:
"WTF?" says I. "The SQL statments are pretty much SELECT * FROM
frob"
type queries. No joins. No multiple table selects, just pretty
straightforward SQL.
There's a reason I have lately come to write code like:
$emails search -compare [list [list = listid $listid]] \
-sort -sent -array_get row -code {
...
}
And hide the whole "is it real or is it memorex" behind speedtables.
SQL is like Pascal or Modula 2, there's so much missing from the
defined
language that everyone's implementation is so full of juicy exceptions
they make the differences between HP-UX and Gentoo look lik
trivialities.
The only sane thing to do is hide ALL the actual SQL behind a less
hateful
API.
The Chernobyl Design Pattern
http://www.robweir.com/blog/2006/10/chernobyl-design-pattern.html
There is something I call the “Chernobyl Design Pattern”, where you
take your worst bug, the ugliest part of your code, the part that
is so bad, so radioactive that no one can touch it without getting
killed, and you make it private and inaccessible, and put a new
interface around it, essentially entomb it in concrete so that no
one can get close to it. In other words, if you can't fix it, at
least contain the damage.
Why do you suppose I'm implementing POSIX over classic Mac OS?
Wait, never mind. Don't answer that. :-)
Josh