Current musing:

Using contenteditable to test css page layouts

This should be obvious, but I just realized that one could use the the HTML5 contenteditable feature to test page layouts. “Contenteditable” is a fancy little tag attribute that allows the user to edit the content contained in the element from the browser.

For example, Read more…

downloads

These guides are free, but if you have found them useful then please consider donating $2. Hey, that's less then the cup of coffee your drinking right?

subscriptions

« Blog home
Code is NOT Poetry

Matt Ward has written a very nice article over at Smashing Magazine examining some of the similarities between code and poetry. It is an excellent article, but I must respectfully disagree. There are similarities between code and poetry, as Matt and others have seen, but these do not make code poetry (as claimed by WordPress’ famous tagline). Here are two reasons why:

A Categorical Difference

Following the ancients, we must distinguish between Craft and Art. Both are skillful endeavors that require mastery to do well, but they differ in purpose. Arts are pursued for their own sake, while crafts are pursued for the sake of utility.

Craft is done for the sake of some other goal. An excellent shoemaker, for example, is a craftsman because he creates shoes to be worn, and we judge a shoe’s excellence based on how well it serves its function. We never purchase a shoe just to hang on our wall. No, a great shoe is one that is comfortable, wears well, and looks great. A craft’s value and excellence lies in its utility.

Art, on the other hand, is done for its own sake. An excellent painter creates his paintings to be enjoyed in-and-of-themselves. There is no other purpose for his art. We judge a paintings excellence not on how well it sells beer (that would be commercial art, a craft), rather we judge its excellence based on how much we enjoy looking at it. In other words, an excellent painting is an enjoyable painting.

Code is craft. No one writes code so that the code itself can be enjoyed. It is written to perform some job. That is not to say that code cannot be beautiful. There is a distinct difference between beautiful and ugly code, but at the end of the day code is judged based on how well it performs its job. In fact, beautifully structured code that doesn’t work is worse than ugly, difficult to maintain, code that does. We can even say that beautifully structured code that doesn’t work isn’t actually “beautiful” at all, for the simple reason that it is flawed and doesn’t do what it’s suppose to do. The very question of what it means for code to be beautiful is bound up in the question of whether or not it fulfills it’s purpose.

Poetry is art, at least good poetry is. It is written to be enjoyed in its own right. Its beauty does not rest in utility but in itself.

The question of meaning

Code and poetry differ in many other more specific ways as well. But I want to deal with only one that Matt perceived to be a similarity: meaning. Matt argued that just as poetry has multiple levels of meaning, so code can impart varying meaning to content. He attempted to compare a poem’s literal and figurative meaning to some code’s semantic value.

He gave these two examples of HTML code to illustrate code’s ability to imbue content with different meanings:

<p>The Wasteland</p>
<h1>The Wasteland</h1>

I agree with Matt’s basic contention about this code: the displayed text is the same on both lines but the “meaning” is different. Obviously the first is paragraph text, and the second is a top-level heading. But these two lines are distinctly different lines. The one does not imply the other. One does not “figure” the other. Strictly speaking, considered as code, the content of each line is not the same. Each line can mean one and only one thing and it is different for each.

If this were not the case then code would be useless. Ambiguity in code is deadly. Just imagine the nightmare of trying to debug code in which a single line could be interpreted in 2 (or heaven forbid more) ways at the same time in the same context! But ambiguity is a strength in poetry. Ambiguity is poetry. The poet’s ability to give the same words multiple meanings at the same time is what makes a good poem good! Ambiguous figurative language is poetic language.

just look again at the example of poetry Matt provided. He quoted the following lines from Robert frost:

The woods are lovely, dark, and deep,
But I have promises to keep.
And miles to go before I sleep,
And miles to go before I sleep.

We could unpack the meaning of these lines for hours. What do the woods signify? Why are they lovely, but also dark and deep? Does sleep refer to death, or to the comforts of home, or both? We cannot derive the same joy from the lines of HTML code quoted above, nor would it be good if we could.

Code is not poetry. It can be excellent, beautiful even, but its beauty must be judged by a different standard than the beauty of poetry. Code is craft, poetry is art. Excellent code is certainly worthy of pursuit, laudable to master, but it will never be art. Speaking as one who loves to code, but hates to debug it, I’m thankful that is so.


Google, numerology, and what’s on our (collective) minds.

After reading this post about Google’s “suggest” feature, I was inspired to do a little experimentation of my own. What I found was very intriguing.

You are probably already familiar with Google’s suggest feature. As you type anything into Google’s search box, it automatically suggests completions based on the most popularly searched phrases. For example, type in “how to”, and Google will helpfully suggest “how to tie a tie“, and “how to kiss“. Clearly there are a lot of men who need to know how to impress their date!

Instead of questions, however, I wondered what would happen if I started typing in numbers? So I started with “1″ and just kept going. Try it yourself, but be aware that there is often a big difference between just the number (i.e. “1″) and the number with a space after it (i.e. “1 “). Be sure to do them both as you go along.

What I found interesting is that somewhere between the number “4″ and the number “11″, the phrase “X weeks pregnant” begins to show up every time. By number “13″ or “14″ that phrase is near the top and stays there until you hit “41″, especially when you insert a space after the number. Around the number “26″ you start seeing other issues concerning pregnancy, such as “weight gain”, and “what to expect”, or “fetal pictures”. This is a fascinating insight into what concerns women when they are pregnant. The closer you get to “40″ you can almost sense the desperation set in, it’s surreal.

I haven’t systematically worked through the 3 digit numbers, but I didn’t immediately discern any trends between 42 and 100. Most of the 3 and 4 digit numbers appeared to be address searches, and of course, 5 digit numbers tended to be zip code inquires.

The address results are interesting. Why are some addresses searched enough to make it on this list? Try “3837″ for example. For me it returned addresses from California, Texas, and Illinois. What is so interesting about “3837 bayview circle concord ca”? Google maps doesn’t list any businesses near that address. In fact, it’s a relatively normal looking house; you can see it on street view. Who lives here, and why is he so interesting?

Have you found any strange numerological insights or quandaries in Google’s “suggest” feature? Let me know in the comments


Freedom, religion, and the internet.

First, I must ask for your forgiveness as this post probably should not be here. When I started this blog I committed myself to write nothing personal or outside of the “technical” realm. This post is both of those things, and yet, I hope, it is also very much on topic as well.

I often marvel at the miracle of the internet, but I cannot help wondering, is it a blessing or a curse? We can communicate instantly with each other, share ideas and information with unprecedented freedom and ease–the world has become as small as my 15 inch lcd–and yet we are more isolated then ever before. We can publish our ideas to the world without censorship on blogs or twitter feeds, and find immense communities of like-minded friends on facebook. We are experiencing unprecedented freedom of thought and self expression, and yet, I believe, we are not better or happier because of it. Why?

I found this unforgivably long quote from Dostoevsky’s The Brothers Karamazov to be helpful:

The world has proclaimed freedom, especially of late, but what do we see in this freedom of theirs: only slavery and suicide! For the world says: “You have needs, therefore satisfy them, for you have the same rights as the noblest and richest men. Do not be afraid to satisfy them, but even increase them” –this is the current teaching of the world. And in this they see freedom. But what comes of this right to increase one’s needs? for the rich, isolation and spiritual suicide; for the poor, envy and murder, for they have been given rights, but have not yet been shown any way of satisfying their needs. We are assured that the world is becoming more and more united, is being formed into brotherly communion, by the shortening of distances, by the transmitting of thoughts through the air. Alas do not believe in such a union of people. Taking freedom to mean the increase and prompt satisfaction of needs, they distort their own nature, for they generate many meaningless and foolish desires, habits, and the most absurd fancies in themselves. They live only for mutual envy, for pleasure-seeking and self-display. To have dinners, horses carriages, rank and slaves to serve them is now considered such a necessity that for the sake of it, to satisfy it, they will sacrifice life, honor, the love of mankind, and will even kill themselves if they are unable to satisfy it. We see the same thing in those who are not rich, while the poor, so far, simply drown their unsatisfied needs and envy in drink. But soon they will get drunk on blood instead of wine, they are being lead to that. …instead of serving brotherly love and human unity, they have fallen, on the contrary, into disunity and isolation…. They have succeeded in amassing more and more things, but they have less and less joy.

– Fyodor Dostoevsky, The Brothers Karamazov, Trans. by Richard Pevear and Larissa Volokhonsky. (New York: Farrar, Straus and Giroux) pg 313-314.

Freedom can be a curse as easily as it can be a blessing. Give me unrestrained freedom of self-expression and the world for an audience, and suddenly I become the only player in the play that matters (at least IMHO). I become all important, and even if I appear to care for others, it is merely an act as they are merely foils for my own magnanimity.

All is not lost, but the answer is perhaps not what we want to hear. Again from The Brothers K:

Obedience, fasting, and prayer are laughed at, yet they alone constitute the way to real and true freedom: I cut away my superfluous and unnecessary needs, through obedience I humble and chasten my vain and proud will, and thereby, with God’s help, attain freedom of spirit, and with that, spiritual rejoicing! Which of the two is more capable of upholding and serving a great idea–the isolated rich man or one who is liberated from the tyranny of things and habits?

– Ibid, pg 313.

And so, as I have long suspected (and as I have long rebelled against), freedom is found in submission, and happiness is found in self-denial. “A loving humility is the most powerful of all, nothing compares with it” (pg 319). And “Equality is only in man’s spiritual dignity, and only among us [monks] will that be understood. Where there are brothers, there will be brotherhood; but before brotherhood they will never share among themselves. Let us preserve the image of Christ, that it may shine forth like a precious diamond to the whole world. . . So be it, so be it” (pg 316).



The web office Achilles’ heel (?)

For me, an office in the clouds sounds like a dream come true. I put my documents into Google Docs and presto, they are instantly available on any computer. No need to worry about unreadable formats, and no worries about losing data when my hard drive crashes. But a few days ago I discovered a near fatal flaw in my heavenly vision.

No, it’s not the lack of features presently available in Google Docs. Although that is a major drawback, one that has kept me from completely packing up my digital bags and building an office in the sky. Instead it was the sudden total failure of my Google spreadsheet grade book.

I’m a teacher by day, and back in October I spent hours building my dream grade book. It’s nearly perfect because it’s available everywhere and always backed. But then Google went and fixed some bugs. Suddenly, precisely on the day I needed to report mid-quarter progress reports–POOF!–my beautiful arrayformula() formulas ceased to function! None of my actual data was harmed, but it didn’t matter, all of the grade calculations turned up errors.

Why? Well after a few minutes of fiddling I finally figured out that the formula could no longer handle the error text one of my nested if() statements returned on false. 2 hours later, after I had fixed every failing formula in my colleague’s grade book (who absolutely needed her’s fixed ASAP), I fixed my own.

See the problem? Even if the new (and theoretically improved) OpenOffice 3 is as buggy as a pile of dung, at least I know what it can and can’t do. Besides, if it suddenly fricassees one of my documents created in version 2.4, I can easily downgrade and get on with my life.

Now, think about running a business using these apps. Would you risk putting your mission-critical data in apps which could suddenly break because of an unannounced and un-asked for update? Sorry, I think keeping your head out of the clouds is the best bet.


Web guilt

I’d like to coin a new term: “Web guilt”

It can be defined as: Feeling like you should be using a new technology that you are not using, or feeling like you have not used current technologies in “the right way.”

I’ve done a brief search on this and haven’t found anyone else talking about this, but I suspect a large number of the internet generation suffer from it.

Here is a personal example: RSS is an amazingly versatile technology. I could use it to look for jobs, push the latest pictures of my kids to the Luddites in my family, or any number of other innovative things. But for me RSS is a convenient way to read Digg and that is about it.

Then there is del.icio.us. I use it to keep track of my own bookmarks and nothing else (and my personal tagging scheme is a mess and all but unusable). I should be subscribing (using RSS of course) to tags of interest and be putting the social web to work for me, but I don’t. I’ve never really even thought of doing that until today. I’m such an idiot.

The worst thing about web guilt is that it is cumulative. I actually find myself resenting new web services because I still haven’t used what I already have properly. A new one is just one more to feel guilty about. Of course, that resentment becomes a new source of guilt. Shouldn’t I welcome new time-saving technologies?

It seems like web guilt is inevitable considering the glut of innovation on the web. We are surrounded by new productivity tools, but we rarely if ever actually use them to their fullest; and new ones appear every day. My feeling of guilt reaches a frenzy when I realize that I waste so much time swimming in a sea of time-saving technologies. Isn’t all this innovation about putting me in charge? Shouldn’t I be satisfied just using the technologies the way I want to use them. Why do I feel like I’m somehow failing when I don’t use them “the right way”?


Web design is a commodity, which is good for the small guys.

According to Cole Camplese of Pennsylvania State U. (heard on iTunes U) web design in today’s world is a commodity not an essential element. In other words, what a website looks like is far less important then the information it contains.

This is obviously true, just ask yourself what websites you visit most often. I’m willing to bet that they are not filled with fancy graphics or animated interfaces. You don’t visit them to see the graphics, you visit them because they have information that you want. Most importantly this information is updated daily, hourly or even by the minute. Moreover, if you are like most web users, the sites you visit
are sites on which you can have a say.

The web today is more about content, especially user generated content, then it ever has been. The actual design of the site, its look and feel, is important, but only in-so-far as it does not get in the way of the content and the ability of the visitor to comment on or create that content. (Prime example: myspace, wow that site is ugly!)

For those of us who design websites for small organizations and business, this provides an interesting insight. Most small organizations want little websites on which can be found a phone number or a ticket price.  These websites are never destinations, they are at simply resources.

These sites are pamphlets in the library’s breezeway. They’re Looked at once, perhaps saved for future reference, but ultimately disposable. Ironically, this means that the look and feel of these websites is far more important then it is for the big boys. These sites are judged by immediate impressions so they have to make everything count.

So while web design may be turning into a mere commodity for the web at large, it is becoming an absolute necessity for smaller niche websites. Just being on the web is no longer enough. Everybody’s on the web. For a websites with sparse information the only thing that makes it stand out over its competitor is its design.


Unease with Open Source

I love Open Source software. In fact, I’m using the latest version of Ubuntu (Gutsy Gibbon) and Firefox to write this post right now. But more and more I’m starting to be convinced that the utopia Open Source software promises is just that … a utopia (a land which is nowhere). In other words, I’m starting to doubt that Open Source will ever be a wide-scale viable alternative to corporate software like Microsoft’s Office.

Why? Well, let’s look at Ubuntu. In my position as a an administrator at a small private I’ve had the opportunity to install it on as many as 15 donated laptops for our teachers. This was my grand experiment to see if Linux was ready for the world. First I spent a few weeks by myself playing with it. Things seemed to go swimmingly, sure there were a few minor annoyances, but most of those had to do with getting acclimated to a new system. I was so excited by it’s potential I not only installed it on all the teacher’s laptops but I also put my wifes old Windows XP machine in the trash and gave her a shiny new Ubuntu laptop.

Nearly a year later and what’s the verdict? Printers don’t work, I can’t tell you how many times I’ve had to show someone convert an open office document to word, and wireless cards?! AGGGH!!!!! Now, I know that many of these problems are not Ubuntu’s fault. If only printer manufacturers, or microsoft, or wirelss card makers would play nice… blah blah blah. The average user, doesn’t care why it doesn’t work, he only cares that it doesn’t! And to be frank I’m starting to agree with that average user.

But to be perfectly honest the main problem with Ubuntu is not wireless cards or printers. No the main problem is not really Ubuntu at all. The main problem is that there is no quality control over the open source software products on the system. Usability stinks. Things aren’t consistent from program to program, and most methods of accomplishing things seems to be modeled after Windows. I mean come on! Since when was Windows a good example to follow!?

Case in point: Open Office. That beacon of hope in the Open Source World. Did you know that there is no way to easily suppress blank lines in an address when merging addresses to labels? Seriously? And you call this office software? missing that feature alone makes this pointless to try to give to the secretaries that work in my office. Leave alone that working with tables is a pain, and don’t even bother to look at Base.

I don’t want this to be a rant. (though I know its to late for that). But please read this more like a lover scorned. I’m rooting for Open Source. I want it to succeed, I really do. I love it. But I’m a power user, and I know open source will never be much of anything until it starts answering the issues my wife faces. She wants a computer to just work. And what’s her opinion of her shiny open source computer? “Great, as long as I don’t have to actually use it.”


What keeps me from really using Linux

Heaven knows I would love to leave my proprietary world behind. I already use Open Office as my primary office software, and would have little trouble in my day-to-day existence working entirely in the open source world. There are only three small things keeping me tied to my Mac.

  1. Presentations (Keynote): I do a lot of public speaking and Apple’s Keynote is the primary reason I became a Mac user to begin with. Beautiful, integrated, multi-media presentations are effortless to create. Nothing comes even remotely close to what I can do with Keynote. Linux community, please create presentation software that competes, and, or the love of Pete, do not copy power point!
  2. Dreamweaver / Fireworks: I could probably do without Dreamweaver, I already use it mostly as a fancy html/css editor and don’t really use it’s WYSIWIG editor, but you have to admit it is a really good editor and the extra features are awfully handy! Fireworks on the other hand I don’t think I could do without. There just isn’t anything like it. I learned Fireworks before I ever even saw Photoshop, and really Fireworks is much better for web graphics. (at least IMHO). Some combination of The Gimp and Inkscape would have to be the Linux alternative. But I don’t relish the idea of learning 2 new programs to replace one. (Not to mention the big step in complexity it entails for my workflow).
  3. Finally Omni Outliner: Just the best darn program on a Mac. I don’t really use it so much that I couldn’t live without it. But I just can’t quite imagine not having it readily available.

Podcasts – ho hum.

Podcasts are the wave of the future right? Well Smart Mobs has recently highlighted a study which might show otherwise. It indicates that perhaps only 1% of U.S. households listen to podcasts. The report cautions business against inv

Why is this you ask? One commentor on the Smart Mobs post questions the research’s definition of “podcast”, claiming it to be too narrow so as to exclude a large number of people who do listen to them in some form or another. Maybe so, but I just can’t see how podcasts can ever really become a real contender in the arena of content delievery because they are just to demanding.

The problem with podcasts are that I have to listen to them. I can’t scan them like I do a website, or my RSS feeds. They have to be taken on their own terms, not mine. Podcasts take up too much time.

When I first got excited about podcasts I started searching for them on all my favorite topics. Many of the websites I currently track through RSS were starting up podcasts as well, and so I naturally subscribed to them. In a matter of minutes I had ten podcasts ready to be played and each episode was, on average, 20 minutes long.

It took me 5 minutes of searching to suddenly have over 2 hours of listening to do, not counting back episodes. I was immediatly disenchanted. There was no way I was going to listen to that much content, I simply don’t have the time. Besides, most of it was just saying the stuff I could read in my news reader. I can read the same content in a fraction of the time it would take to listen to poorly recorded voice stammer it out.

Over the next week I listened to a few here and a few there (meanwhile most of them released 1 or even 2 new episodes!) and slowly got rid of the worst ones. I listened to them mostly on my commute, which on my bike takes about 30 minutes. Eventually I was down to one. ONE. that’s it. And I’m not very loyal even to that one.
Now I’m not saying that podcasts aren’t worthwhile, but they are only worthwhile for content producers for whom it makes sense to produce audio content: muscicians, news programs, etc. Basically if you produce stuff that people are already listening to in other formats you should probably have a podcast. But if you are just blogging about the web, I don’t need you to read every post to me, thanks!