08:38, Friday 20 May., 2005

Programming languages have very few differentiated constructs. They calcify common patterns. The while loop tames the goto, fixing the if-then-goto pattern. While while is the human use of goto, foreach is the human use of variables. Foreach sees the possibility of writing the same code and, by changing the values, applying it to a number of variables. These two take a latent possibility and turns it into a pattern which is comprehendible to reduce the amount of code written. What others are there?

Numbers are quantities. Algebra abstracts away from numbers: variables carry pointers to numbers. Code abstracts once more: variables carry pointers to code, that which can be run to produce more code, or more pointers, or more numbers. What's the next level?

It's no use asking what an object is, you have to ask what it does. The code cannot guarantee the data has total integrity unless the data store and the code comprise a self-contained, unbreakable system (they never do). Asking what the object is an instance of is prone to breakage. Use duck typing. Assume the minimum about the data of the object for any given operation. Try it. If it doesn't work, that's fine. Do more if there's more data present. Operate by binding, not by pointing. Data lookups are different with binding: you need to express not a type, but a possibility, and ask the datastore what could work with that. Limits are set by inflection points of possibilities of binding, not by categorisation by properties. A flirting glance for code; a runtime implicature.

Interconnected

A weblog by Matt Webb, CEO of BERG.

You're probably looking for my email address or the syndication feed.

You can get updates to this blog on Twitter: follow @intrcnnctd.

I'm @genmon on Twitter. Also find me on Flickr and LinkedIn.

Continue reading...

The 8 latest posts are named irrecoverable, books read feb to apr 2011, finding baby sciences and new moons, fukushima and engineering, inbox hero, google and baidu, conviviality, and shape changing robot.
Read them.

Archives

2012 January. 2011 May, March, February, January. 2010 December, January. 2009 February. 2008 December, November, September, August, July, June, May, April, March, February, January. 2007 December, November, October, September, July, June, May, March, February, January. 2006 December, November, October, September, August, July, June, May, April, March, February, January. 2005 December, November, October, September, August, July, June, May, April, March, February, January. 2004 December, November, October, September, August, July, June, May, April. 2003 December, November, October, September, August, July, June, May, April, March, February, January. 2002 December, November, October, September, August, July, June, May, April, March, February, January. 2001 December, November, October, September, August, July, June, May, April, March, February, January. 2000 December, November, October, September, August, July, June, May, April, March, February.

Interconnected is copyright 2000—2011 Matt Webb.