The Occasional Occurence

Code Farming

February 13, 2008 at 02:31 AM | categories: Python, Software, computing, General

I read a good article that gave an Organic Metaphor for software development. Here is a quote:

As I look at what I actually do in my cramped little cubicle, I realize that my work is more akin to farming than construction. I spend my days cultivating information, and growing a program. I can see the evolution of my work as it needs to scale through different platforms.

I really resonate with that description - writing software is very fluid and organic. Code is malleable and frequently changing. During development, there aren't necessarily rigid beams and permanent fasteners like in construction.

Perhaps lending credence to both the architectural and organic software development metaphors, the article closes with this thought:

The term "System Architecture" is a more fitting in the world of packaged software than it is for the IT department or Internet development. With packaged software, a group of programmers create one major release that they will distribute to hundreds of thousands of users. Since there is no method for evolution, this type of software has much more rigid. Of course, with the Internet explosion, packaged software will take a backseat to organic programming.

Yeah. The engineering/architectural and the organic metaphors probably both have their places. Packaged, physically distributed software probably requires more engineering. The organic metaphor better describes the survival of the fittest (or survival of the first-to-market) and rapid evolution that is possible (and required) in the internet ecosystem.

cw

Safari Gotchas

August 16, 2007 at 09:56 PM | categories: work, Software, computing, General

In the spirit of sharing knowledge that will save someone from the sort of tedious pain I went through the past couple days, here are a few Safari (2.0.4) bugs that I had to work around:

1. No Global Javascript eval() That's right. You can't eval() in the global (window) context. Safari doesn't allow it. A lot of places mention the fact that you can do a window.setTimeout, but that runs asynchronously (which I did not want). Thankfully, there is one place on the web that gives the secret sauce on how to implement something that will accomplish basically the same thing as eval() in any other browser. Wrap that up in a nice little function of your own, and you are good to go.

2. CSS: background-position and Container Size If you want to control the position of a background-image in a DIV, make sure that the DIV is at least one pixel larger than the background-image. Otherwise, your attempts to position it might drive you to the brink of insanity. Not that I would know.

3. Calling click() on a Checkbox If you think you can just grab a checkbox type INPUT element from the DOM and call click() on it, you are sorely mistaken! You must explicitly check that bad boy by doing something like checkElem.checked = true.

4. Reinitializing jQuery Interface Plugin Sortables This is probably the most esoteric gotcha of the bunch, as it involves a third-party library (jQuery). All of the other major browsers (Firefox 2, IE6/7, Opera 9) simply let you reinitialize as many Sortables as you want. You just call .Sortable(config) on any element each time you want to make it sortable. This does not work in Safari. Before you reinitialize the Sortable, you need to call .SortableDestroy() on it.

In the application I am working on, this is important because we load each new state via an XMLHTTPRequest. Now, when a Sortable is initialized, a callback is registered to handle the .SortableDestroy() before a new state is initialized.

That's That Hopefully this info will save some of you a little trouble.

cw

Pet Peeve: Link Previews

August 01, 2007 at 08:52 AM | categories: computing, General

So I was just reading this techie blog, and when I was mousing over a link about to click on it, all of a sudden this "mini-preview" of the page I was about to click appeared. It didn't really do anything beneficial - just showed this little thumbnail of the page that I was thinking about clicking, and got in my way.

Is this someone's way of improving hyper links or something? Seems like they have been working pretty well for a few years.

cw

ps - I must be in a crotchety mood.

Errrr...

July 31, 2007 at 09:38 PM | categories: computing

I am doing a little "pleasure reading" on Erlang tonight. I thought this was an interesting thing to say about variables:

Variables can only be bound once! The value of a variable can never be changed once it has been set (bound).

Doesn't that make them constants, and not variables?

cw

Ion

July 21, 2007 at 11:51 PM | categories: work, Software, computing, General

So an article about user interfaces on Coding Horror prompted me to say a short piece about Ion*.

When doing serious work on the computer, I always find myself tiling my windows. Overlapping windows are so annoying. And tiling them in an organized manner is even more annoying.

From the article:

Manipulating windows is pure excise-- extra work that stands between the user and completing their task. The more windows you have to deal with, the less work you get done, and the more time you spend sizing them, moving them, bringing them to the top, and dragging them around so they aren't overlapping.

Enter Ion.

It tiles them for you. And lets you move around from window-to-window using the keyboard.

Sure, it doesn't have wobbly windows or pretty wallpaper. But if you need some more visual or tactile feedback while computing, I suggest getting up and taking a short walk - not shaking a window around on your screen or gazing at your hipster wallpaper.

cw

* Sorry, Linux only. Try Ubuntu.

« Previous Page -- Next Page »