Curried Lambda http://wozniak.ca Musings on just about anything posterous.com Sun, 08 Jan 2012 15:01:00 -0800 New books on debugging http://wozniak.ca/new-books-on-debugging http://wozniak.ca/new-books-on-debugging

I went looking for some books on debugging after browsing lispmeister's box of books unpacking. I picked up The Science of Debugging and, since the price was too good to pass up, Secrets of Software Debugging (awesome cover — with lots of code listings in Basic, Pascal and assembler!). Should be fun to read the secrets, such as they were written in 1984.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sun, 30 Oct 2011 06:56:05 -0700 DSLs using Unix shells http://wozniak.ca/dsls-using-unix-shells http://wozniak.ca/dsls-using-unix-shells

Back when I was in graduate school writing lots of Lisp code (and I do miss writing Lisp code) I frequently made use of macros to create small domain specific languages (DSLs). Now that I am working on a team writing C/C++ and shell scripts, breaking out the macro-esque code is a little more difficult.

That said, it’s not impossible. I haven’t written enough C/C++ to do much with preprocessor pseudo-macros, but I have written a lot of shell scripts. And I’ve found you can get a good taste of Lisp-style macros in some circumstances.

One situation that I like to employ them is with configuration files. More specifically, these are configuration files that will be sourced by a running shell (using the source or . command). While writing shell-based infrastructures, I’ve often found that you end up putting lots of things in configuration files. You might end up with something like this:

FOO_args=aaa
BAR_args=bbb
BAR_elements=ccc

This can get out of hand quickly; parameter names on the order of 25 to 40 characters is not unheard of. I find this hard to read and error prone when editing it on a live system (especially embedded ones where you have a limited set of tools).

If find the following a little easier to work with:

foo
{
    define args=aaa
}

bar
{
    define args=bbb elements=ccc
}

Sure, it’s more lines, but it immediately tells you quite a bit about what the configuration settings are meant to do. In short, it says it better.

The question is, how can this be turned into something the shell can evaluate that will result in the definitions being accessible to the rest of the code?

Consider the following:

#!/bin/bash

SCOPE=

function configure
{
    unset SCOPE
    SCOPE=$(echo ${1} | tr '[[:lower:]]' '[[:upper:]]')
}

function define
{
    for def in ${@}; do eval "${SCOPE}_${def}"; done
}

With a slight modification to the idealized configuration code above, the objective of defining the same parameters with a different syntax is achieved.

#!/bin/bash

. ./function-defs.sh

configure foo
{
    define args=aaa
}

configure bar
{
    define args=bbb elements=ccc
}

echo "FOO_args is ${FOO_args}"
echo "BAR_args is ${BAR_args}"
echo "BAR_elements is ${BAR_elements}"

Of course, this example is for demonstration purposes and things can get more complicated; consider the case of configure only working in certain circumstances and thus, making define a no-op.

All in all, this technique has made some things a lot simpler for me in some cases.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sun, 28 Aug 2011 09:38:00 -0700 System Analysis and Programming, by Christopher Strachey (1966) http://wozniak.ca/system-analysis-and-programming-by-christophe http://wozniak.ca/system-analysis-and-programming-by-christophe

Published in Scientific American, September, 1966.

It starts with a wonderful quote from Alfred North Whitehead:

It is a profoundly erroneous truism, repeated by all copy-books and by eminent people when they are making speeches, that we should cultivate the habit of thinking of what we are doing. The precise opposite is the case. Civilization advances by extending the number of important operations which we can perform without thinking about them. Operations of thought are like cavalry charges in a battle-they are strictly limited in number, they require fresh horses, and must only be made at decisive moments.

In the first paragraph, Strachey already nails it:

The process of writing a program is primarily intuitive rather than formal.

Peter Norvig has written a great review of the paper.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sat, 19 Mar 2011 20:24:00 -0700 Reflecting on professional software development http://wozniak.ca/reflecting-on-professional-software-developme http://wozniak.ca/reflecting-on-professional-software-developme

Having worked professionally as a software developer for a little over 2.5 years after 6 years of graduate school (and getting a PhD in Computer Science) studying programming languages, I have some observations about working in a non-academic environment.

  • Functions as values are misunderstood

    The prevailing attitude among those that I have worked with is that functions are… different and not to be messed with. I respectfully disagree with them on a regular basis but I understand where they are coming from. If your only exposure to functions as values is Java’s anonymous classes or C’s function pointers, well, I pity you, but I can see why you would be jaded.

    One of these days I hope to convince more people that functions are data, just like everything else, and can/should be utilized as the incredibly useful construct that they are. (Just ask my co-workers — I am not shy about this point!)

  • Meta-programming needs to solve the debugging problem

    While meta-programming is extremely powerful (and in my opinion, the best way to solve some difficult problems), debugging it is not simple. It won’t catch on until it’s simpler to work with. (Case in point: dependency generation in Makefiles.)

  • Static is a state to work toward, not to start with

    Insisting on careful design of types too early often causes lots of headaches later. This is especially true when coming up with an API. It is through use that type design gets better.

  • Error should be embraced, not shunned

    To me, this is the biggest problem with software development in general right now: the way we deal with runtime errors is a disaster. At the very least, when an error occurs, as a developer, I should be able to look around in the environment of the computation to observe what is going on instead of hope that the process logged something meaningful somewhere.

    This means having runtimes that support features beyond that of simply running instructions: you need ones that let you easily manipulate programs and computations. Furthermore, you shouldn’t have to bake in the logic for such manipulation manually.

    Common Lisp is one of the sanest systems I’ve had the pleasure to work with in this regard; the C/Unix ecosystem is one of the worst.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sun, 06 Feb 2011 11:25:31 -0800 Amusing pet toy packaging http://wozniak.ca/amusing-pet-toy-packaging http://wozniak.ca/amusing-pet-toy-packaging
Laser-chase

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Tue, 04 Jan 2011 17:33:00 -0800 Computing 10,000x more efficiently http://wozniak.ca/computing-10000x-more-efficiently http://wozniak.ca/computing-10000x-more-efficiently

Slides from Joe Bates outlining how by introducing a little error into the computation you can get good results cheaper. I am totally into this.

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Mon, 03 Jan 2011 16:15:09 -0800 The mystery calculator http://wozniak.ca/the-mystery-calculator http://wozniak.ca/the-mystery-calculator Here's a fun little puzzle I came across in a Christmas cracker.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sat, 01 Jan 2011 22:29:00 -0800 My year in Lisp http://wozniak.ca/my-year-in-lisp http://wozniak.ca/my-year-in-lisp

Xach asked about your year in Lisp on reddit (*). Rather than get a reddit account just to answer the comment, I figured I'd answer here.

Early in the year I got a good chunk of a UNIVAC I emulator working; however, the annoying ambiguities in the representation of numbers caused that to stall. I should finish it and put it on GitHub (assuming there are no licensing problems), so that will be my first 2011 Lisp resolution.

Most of the rest of my time was spent dabbling with adaptive systems writing experiments that generally didn't go anywhere. I tried "growing" a system from some basic elements but couldn't get a good handle on what it is I wanted for some time. I finally decided on making functions the basic element of computation with the following properties:

  • each is a separate entity/object;
  • the initial form of communication is a single, bivalent stream of bits (likely UTF-8 characters);
  • they can change their configuration (for example, add more communication streams);
  • they can clone themselves.

I haven't decided on the atomic operations yet. I'm not even sure arithmetic will qualify.

Obviously this is not meant to be a terribly useful set of definitions at the outset. I'm really looking at ways to build functions/programs that can adjust to their environment without having to maintain them, that is, without having to port them to a different system.

I also couldn't make it to ILC 2010 due to my job, which is too bad since the conference was in North America and not all that difficult for me to get to.

It was a quiet year. Hopefully I'll have more to say in 2011.

(*) Yes, I used to have a reddit account but I got tired of the place a while ago and closed it.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Fri, 31 Dec 2010 13:56:00 -0800 Favourite (and not-so-favourite) films of 2010 http://wozniak.ca/favourite-and-not-so-favourite-films-of-2010 http://wozniak.ca/favourite-and-not-so-favourite-films-of-2010

I didn't see as many movies this year as I would have liked (Black Swan, The King's Speech, True Grit all remain unseen so far) but here are some of my favourites from the past year.

Kick-Ass: Vulgar, violent and funny. I was totally blind-sided by this one and when I got out of the theatre with my friend, neither one of us could believe this movie got made — but we were glad that it did. Chloë Moretz stole the show. (Why haven't I seen Let Me In yet? I don't know…)

How to Train Your Dragon: I wasn't expecting much but was charmed by the character designs, voice acting and a decent story. It's cute but not hokey. Plus, Toothless reminded me of one of my cats.

Inception: How could I not love a movie that employs recursion so ingeniously? Second best movie of the year.

The Social Network: Ignore the whole "Facebook movie" nonsense and watch this film for what it is: a character study with great dialogue. The soundtrack is the best I've heard in a while; it fits perfectly in the film and it great to listen to on its own. Best movie of the year.

3D: After sampling more than a few movies in 3D I've come to the conclusion that I don't care about it and that it's not worth the premium to see it. It doesn't add anything aside from gimmicks to a film. (The sole exception has been Avatar, which struck me as something that actually used 3D from the first frame.) And 3D-TV is silly. When we have actual holograms, then I may be interested.

Winter's Bone: I was underwhelmed by this one. The acting was quite good — and Jennifer Lawrence deserves recognition for her convincing portrayal — but the story just didn't grab me and I wasn't sure where it was trying to go. This was probably more a technical thing since I found a lot of the dialogue muddled.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sat, 11 Dec 2010 09:58:00 -0800 A night of change http://wozniak.ca/a-night-of-change http://wozniak.ca/a-night-of-change

Last night my wife and I went out to dinner at a bistro in Hamilton and saw Jeff Dunham at Copps Coliseum. By the end of the night we came to realize that the place we loved to eat at has lost it's special touch and that we don't actually like Jeff Dunham's comedy.

Before last night, the bistro we went to used to be one of our favourite places to eat. Unfortunately, the last few times we've been there we were treated mostly with indifference. One of the reasons to go to places that charge about $35 a plate for a meal is the service. Yeah, you're paying for well-prepared food, but it's the service that makes it worthwhile; you go to feel like you're having a special night out.

We don't feel we got that on the last three visits. It was kind of sad, then, to have to retire the place from future consideration since we used to love it. So the evening got started on a bit of a downer. (Note that the food at the place is still pretty damn good.)

After that, we saw Jeff Dunham's new Identity Crisis show. It started with a guy playing a song about going to gay bars and being terrified — not in the "fish out of water" way but rather the "gay is wrong" way. We didn't find it very funny.

Then Jeff Dunham started. Even before the show, I knew Dunham's comedy wasn't exactly high-brow, but he's a good performer. The show solidified the latter and demonstrated that the brow is actually a lot lower than the former lets on.

I'll state this flat out: Dunham's comedy didn't make me laugh. It mostly plays on tired stereotypes that have long worn out their welcome. If there is humour to be found in the riffing on marriage with the Walter character, it only shows how much we value the symbolism of marriage over that of an actual relationship.

When the Peanut character came out and started doing a Chinese accent, I felt I was watching Mr. Yunioshi in Breakfast at Tiffany's. It was pretty much cringe-inducing. What didn't accompany the portrayals of racist stereotypes in the show was any acknowledgement, subtle or overt, that they are, in fact, stereotypes.

Overall, the comedy was more about playing on what people like to think is true rather than what is true. To both of us, that's not good comedy.

It was a disappointing night, but at least my wife and I had a good conversation about it.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sun, 14 Nov 2010 07:40:01 -0800 TransGlobe creepiness http://wozniak.ca/transglobe-creepiness http://wozniak.ca/transglobe-creepiness My wife and I went looking for a place to live yesterday. Most of the places we went to happened to be managed by TransGlobe Property Management Services. While we got friendly service, we were creeped out by the company's practices.

The main point of contention was their aloofness when it came to showing us places that were currently occupied by tenants. For the most part, our interaction with the property manager came down to figuring out what units were available and just going to the unit, unannounced. The manager would knock, someone would answer, the manager would ask to see the unit and in we would go.

According to the law, this was all kosher. That didn't make us comfortable. We felt like we were invading these people's lives and violating their privacy. Seriously, everyone we saw were dressed in their housecoats. There was no warning for these tenants who basically had a deer in the headlights look when we walked in.

Regardless of the state of the tenants, the state of the unit was an entirely different matter. Since we arrived unannounced, no one's unit was anything close to clean. In fact, the units we saw were disgusting. We were constantly reminded to "ignore the mess" but when there is food and junk everywhere, it's hard to see past it, let alone the awkwardness involved with blurry-eyed tenants in their sleepwear trying to get out of your way.

I'll be awfully hesitant to consider dealing with TransGlobe in the future.

(More evidence of creepiness: their website is almost entirely feedback from tenants — in some cases with the full name and address of the person providing the feedback.)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sun, 26 Sep 2010 10:15:25 -0700 The HD experience: meh http://wozniak.ca/the-hd-experience-meh http://wozniak.ca/the-hd-experience-meh This weekend I broke down and purchased an HDTV. I am generally happy, but mostly underwhelmed.

I'm not regretting the decision. Movies look good on it and my wife and I are liking it, but the appreciation is due to the sheer size of the screen. Our previous TV was a 27-inch CRT; our new one is a 42-inch plasma. Right now I expect we're in the "wow" factor stage and it will wear off in time.

So far I've watched a couple DVDs and an HD movie from my computer. The HD did look better but I had to stop and look to notice. The transition from DVD to HD is considerably less striking than the transition from VCR to DVD. Would I favour HD content of standard definition content? Yes. Will I pay the premium (cost, bandwidth) to get it if I don't have to? No.

HD is nice but not terribly compelling. We'll see how I feel in a year.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Wed, 07 Jul 2010 19:13:06 -0700 Paywalls lined with barbed wire http://wozniak.ca/paywalls-lined-with-barbed-wire http://wozniak.ca/paywalls-lined-with-barbed-wire Online journals cannot be seriously interested in getting the public to purchase their content. Consider the case of the paper Error and the Will, which is typical (perhaps even on the low end) of what I've seen in terms of cost.

I came across this paper using Google Scholar. I can't find a digital copy anywhere, even using my alma mater's library system. I find myself asking these questions:

  • Without knowing the content, should I spend the $30USD for it? That's a risky endeavour just to read it, not knowing if it contains something useful.
  • I can "request permissions" to get a copy for personal use (although, oddly enough, "read it" is not one of the options when you do that, although "reuse in a thesis/dissertation" is). It takes up to five business days to see if that is acceptable and how much it will cost.
  • If I'm trying to to write a paper and I want references -- say, 10-15 or so -- that will be well upwards of $300 just for the references I actually use, notwithstanding the ones I don't use. That's a huge risk with essentially no chance of a payoff.

Even if you are going to charge me to read something, at least learn a lesson from iTunes and Steam: make it easy and I won't bother with less "respectable" methods.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Mon, 28 Jun 2010 17:56:00 -0700 Blog consolidation http://wozniak.ca/blog-consolidation http://wozniak.ca/blog-consolidation

I've decided to merge all my blogs into one place to keep things simpler for me. This means that anyone who reads this will get a mix of research/developer-oriented material as well as, well, stuff that isn't that.

I'll use tags to differentiate things, but sometimes I may forget.

Hopefully I haven't broken too many things.

I'm also playing around with different themes. Forgive me if things are in flux for a little while.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Mon, 28 Jun 2010 12:44:45 -0700 I voted for the London Fringe Party http://wozniak.ca/i-voted-for-the-london-fringe-party http://wozniak.ca/i-voted-for-the-london-fringe-party This past weekend was the end of the London Fringe Festival. My wife and I spent the weekend taking in some of the shows. Here's briefly what we thought of them.

Fishbowl: Funny and touching, complete with science humour. The characters portrayed used stereotype to get your attention but are not portrayed with such simplicity. The story ties together nicely. Kudos to Mark Shyzer and crew.

"New Talent": A good story with good acting but there is a part in the middle where it gets a bit dull. We found the "agent" character to be intensely interesting. The set and stage management left a little to be desired, though. The TV was distracting and the sound levels for the music were often too high.

Monster: An incredible one man show that was engrossing, although we both found the story to be confusing, mainly the timeline. With the plethora of characters portrayed (with no costumes and a minimal set) it was hard to keep track of everyone, which may have contributed to the confusion.

Dying Hard: This was the only show we had a split opinion on. The show consists of a single actor performing interviews with miners who worked the fluorspor mines in Newfoundland. Unfortunately, if you have trouble understanding the accent (as my wife did), it's hard to get into the content. To be honest, I couldn't understand the first 5-10 minutes of dialogue but I did find the actor convincing. I liked it, my wife didn't.

Emma: Very light fare that had a few laughs and a some awkward deliveries from some of the supporting cast.

Overall, we enjoyed the shows and will definitely be looking at attending some more theatre.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Mon, 28 Jun 2010 11:11:03 -0700 Presumptuous exceptions http://wozniak.ca/presumptuous-exceptions http://wozniak.ca/presumptuous-exceptions This quote from the paper Why do developers neglect exception handling? (pdf) got my attention:


Our study results revealed that some developers have shifted their perspective on exception handling from the intended proactive approach (i.e., how to handle possible exceptions) to a reactive approach (i.e., using exception handling as debugging aids). In addition, some developers dislike being forced to implement exception-handling constructs and therefore, neglect to implement them thoughtfully. Both results explain the poor quality of error handling.

I think the authors have an overly optimistic view of what exceptions provide to the system. The vast majority of exceptions are little more than glorified logging aids: they give you a message and might contain a stack trace, but that’s about it. What you can't do (without an awful lot of work) is ascertain enough information to go about a reasonable recovery strategy. In particular, it is rare that the immediate caller of an operation that may throw an exception even has enough information to do anything about it. About the only reasonable thing to do is try the operation again.

Furthermore, is there any reason to believe that developers ever viewed exception handling as proactive? Just because it may have been intended as a way to handle possible problems does not mean that it was accepted (or even presented) as such.

Lastly, I posit that the remark to "implement them thoughtfully" is another instance of "boil the ocean".

(Note: This is what prompted my tweet earlier.)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Mon, 17 May 2010 05:36:00 -0700 Diaspora, the (desperately?) wanted Facebook alternative http://wozniak.ca/diaspora-the-desperately-wanted-facebook-alte http://wozniak.ca/diaspora-the-desperately-wanted-facebook-alte

Have you heard of Diaspora yet? It's "the privacy aware, personally controlled, do-it-all distributed open source social network". It's gotten a lot of support from people, pushing $200K as of this writing.

I'm not getting my hopes up too much, though; there is no product yet, only hope of one. And the way its supposed to work is by running a node on your machine to connect with other people -- a decentralized Facebook.

I wish them the best of luck and, in their defense, they had no way of thinking they would be getting this much attention. But let's face it: if using this means managing a node, then if managing the node isn't as simple as going to a web site and updating your status, people like my wife (who make up the vast majority of Facebook's users) are simply not going to use it.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sat, 15 May 2010 11:10:00 -0700 Great talk about building a team http://wozniak.ca/great-talk-about-building-a-team http://wozniak.ca/great-talk-about-building-a-team Tom Wujec on building a team:

I've always liked it when measurement and comparison is done as a side effect and is not the end goal for the participants. It's the same reason, I believe, karma systems on social websites rarely work.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sat, 15 May 2010 10:48:00 -0700 Reading and writing: the golden ticket http://wozniak.ca/reading-and-writing-the-golden-ticket http://wozniak.ca/reading-and-writing-the-golden-ticket

The Globe and Mail's editorial today:


Throw out the demonstrably false assumption that all students in Grade 7 can read and write well enough to succeed in school. Assess students one by one; identify those who are grade levels behind their peers; and give them the support they need to catch up. If it means putting some subjects on hold until they do so, so be it.

Literacy is "the golden ticket" to success in school and modern economy.


If you don't have the ticket by now, we will move Heaven and Earth and timetables to help you get one. [emphasis theirs]

I'm in agreement on this: reading and writing trump other skills, even, dare I say, arithmetic. In my experience, those with good reading comprehension and the ability to write clearly are the brightest people, and can often get up to speed on other subjects without much trouble — including math.

What I would hate to see, however, is rabid devotion to teaching literacy at the expense of everything else.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak
Sun, 02 May 2010 16:05:08 -0700 Exploration and specification http://wozniak.ca/exploration-and-specification http://wozniak.ca/exploration-and-specification When it comes to learning things, I'd rather experiment than study.

Bear in mind that experimentation is not at odds with studying. In fact, good experimentation often requires careful study. What I am getting at is that in order to understand how one thing works within the context of another, I get more out of playing with it than reading about it.

I've noticed this pattern in many activities; cooking, for example. My wife and I enjoy writings of Michael Smith and Julia Child and have been working from their recipes lately. That said, we don't learn what works in a dish until we try cooking it, regardless of the authority behind the recipe. Learning to cook from just reading about it is remarkably difficult.

What is enjoyable about cooking, even though the specifications (recipes) are not complete, is that the laboratory used to experiment is enjoyable. Most kitchen equipment is simple, though somewhat tedious. During the experiment is it easy to investigate the state of things and sample it to get an idea of the end result. Improvisation is encouraged, both with respect to ingredients and tools, in order to deal with things that don't go according to plan. And even if they don't go according to plan there's still a good chance you'll get something approaching edible out of it.

In short, cooking is fun because experimentation is, for the most part, simple and even if you screw up you'll still eat.

Another example of this is software development. Here I've noticed a culture that emphasizes specification. My experience has been that experimentation within software development environments is not that enjoyable. It gets considerably worse the more strict the system. This is the case even with decent documentation around what the system can do.

Consider something as simple as using a function. If the system is not very strict the setup involved to use the function is usually straightforward — just type it in at a prompt — but determining what is necessary to make it useful can be tricky; if something doesn't work, investigating the result is tedious and rarely informative. In stricter systems, even with a decent specification readily available, the setup needed to use the function can be a pain: surround it with a main function, allocate objects, make sure everything is the right type, and so forth. Both kinds of systems suffer from a lack of meaningful error objects to be poked and prodded (read: tasted).

Yes, it's a gross generalization but in my experience obtaining useful or satisfying results with the elements of a "programming laboratory" means leaving the laboratory and seeking help elsewhere. My kitchen experiences have not suffered from this problem.

In short, making experimentation easy makes me happy. I'll study when I want to know more.

(Ok, so it's a slightly unfair comparison as presented but I want to avoid excessive technical terminology. So there.)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/343492/Portrait.jpg http://posterous.com/users/3sDxvj4F3TgJ Geoff Wozniak geoffwozniak Geoff Wozniak