Musings of Matt Williams

Monthly Archive: August 2008

Just for grins and giggles, I went to see how much I’ve earned from scribefire thus far — $0.23 cents — they’ve determined that 218 impressions have been viewed. That said, I’m currently at about 1520 views for the last three weeks. I did the scribefire on the 25th, I’ve had ~400 views (according to …

For a project I’m currently working on I wanted to make some “bubble” tooltips. In order to cut down on the size/number of images, I’m using css sprites. A quick google reveals that nobody else has (at least on the first page) put together tooltips using sprites. The technique will work with any sort of …

Earlier I was going through rss feeds when I noticed that a blog had been updated. I thought to myself “Oh, cool! they’ve updated.” It struck me that there are certain individual (as in written by an individual) blogs which I follow and am excited when I see posts. Here’s a partial list — bear …

I found out something interesting today. Per the W3C, the total “width” that a block element uses is: If ‘left’ or ‘right’ are given as ‘auto’, their computed value is 0. The following constraints must hold between the other properties: ‘margin-left’ + ‘border-left-width’ + ‘padding-left’ + ‘width’ + ‘padding-right’ + ‘border-right-width’ + ‘margin-right’ = width …

Today’s thought for the day from A Word A Day is: Not being able to govern events, I govern myself. -Michel de Montaigne, essayist (1533-1592) This struck me as being very much the idea behind defensive programming. Because we don’t know what sort of events life will throw at a programme, we need for it …

One of the manifestos from ChangeThis this month is about Mini Sagas. The author, Rajesh Setty presents the idea that writing mini sagas, which contain exactly 50 words, expands your creativity — following on the idea that Creativity Loves Constraints. Typically the mini saga expresses some sort of message or value — I think in …

In the quest for simplicity and maintainability, sometimes we need to add components. It seems counter intuitive, perhaps, but sometimes it’s true. As an example, I once came across a project which had multiple queries, each of which contained over 40 lines of SQL code. I don’t know about you, but 40 lines of code …

Yesterday, I posted an article entitled Break my code, please, wherein I posted a very fragile piece of code, with the challenge to find ways in which to break it. What follows is a discussion of the code and why it is bad/fragile/easily broken…..

I got tired of typing the same commands all the time and/or looking up urls for plugins. Hence this script…. Yes, I know it’s been done before, but this does what I want (for now; I’m sure I’ll edit it). It does the following: Creates rails instance (optionally setting the database, etc.) Installs rspec & …