July 2004 Archives

July 25, 2004

redesign

After 6 months of procrastination, jenseng.com has a new look. And it really didn't take that long—just a good chunk of the weekend. Not too bad considering I basically had two completely different sites with different markup styles. jenseng.com is generated via MovableType, whereas code.jenseng.com is hand-coded.

There may be some changes over the coming weeks as bugs surface, but so far it looks good in IE 5+, Mozilla and Opera.

Posted by jon at 5:14 AM | Comments (1)

objectivity part II

So I was wrong in stating that the <object> would supersede the <img> in XHTML 2.0. From the XHTML FAQ:

<img> is being replaced in XHTML2, but by something else (although you could use <object> if you wanted).

...

XHTML2 [says] that all images are equivalent to some piece of content; it does this by allowing you to put a src attribute on any element at all. What this says is: if the image is available, and the browser can process it, use it, otherwise use the content of the element.

Because browsers have mishandled the <object> so spectacularly, this is a much more elegant and practical alternative that looks to be 100% backwards compatible. Further investigation shows that other types of content (audio, video, animations) can be embedded as well. Let's see a couple practical examples:

Image replacement:

<h1 src="title.png" type="image/png">Document Title</h1>

This is undoubtedly the Holy Grail of image replacement techniques. It solves and/or avoids all of the problems of existing methods.

Embedding audio:

<p src="hokeypokey.wav" type="audio/x-wav">
You put your right foot in,
You put your right foot out...
</p>

While it is nothing revolutionary, it is certainly much cleaner and more reliable than existing methods of doing this.

The great thing is, both of these examples will work "correctly" in every browser at this very moment. That is to say, user agents that acknowledge the src attribute on elements and support the mime type of the object being embedded will (dis)play it. Those that do not will simply show the contents of the tag instead. Thus it is backwards compatible.

But don't expect to be able to use this in production any time soon. XHTML 2.0 is still a working draft, which means it could still change considerably over the coming months. Once it becomes a recommendation, it will be a good while before it is adopted by browser manufacturers and even longer before those browsers constitute the majority. But it goes to show that the W3C has come up with an elegant solution to the object problem and is working hard to keep things going in the right direction.

For those who can't wait and want to start playing with this right away, I've come up with an easy way for current browsers to fully emulate this behavior.

Posted by jon at 4:45 AM | Comments (0)

July 22, 2004

experimentos

I really don't have time for this. Being engaged and working 60-70 hours/week doesn't leave much free time, but sometimes you just need to do something different to ease the stress.

Which is why over the next few months I'll be translating some of the Experiments in Web Design into other languages (French, Spanish and Portuguese). I'm sick of programming, and I'm sick of English. I don't have many opportunities nowadays to speak those languages I studied for all those years, so I figure this will be a fun exercise. As it stands, 6-7% of the visitors to my site speak one of those languages, even though the site is entirely in English.

Be ye warned; although I speak them all, I don't speak them as well as I once did, so don't be surprised if the translation isn't perfect. Perhaps someone will be so kind as to proofread them when I am done.

Posted by jon at 7:27 PM | Comments (0)

July 19, 2004

the proposal

After dating over a year and a half, Michelle and I have decided to make it official. Here's how it went down:

We'd gone and looked at rings a couple times, and in the process were able to narrow it down to three. So a couple Saturdays ago, I went back to the store and voted two of the three off the island. I found the perfect one for Michelle. Between credit mixups, faxes to Mom and Dad, and the goldsmith coming down with the flu, it wasn't until Thursday that I finally got the precious.

Not knowing exactly how I was going to present it, I grabbed the ring and headed over to Michelle's Saturday afternoon. I'd originally thought about going on a hike so that I could propose on top of a mountain, but she wasn't feeling up for a climb, so that was out.

We ended up going to South Fork Park and having a picnic of pizza and Martinelli's. It was great, except for the fact that everybody else in Utah was having a family reunion at that same park that afternoon. Scratch the park idea.

Driving back towards Provo, my third idea came to me. So I took a left on Squaw Peak Road. Rather than go up to the overlook, we went left toward Rock Canyon. I'd done a bit of hiking there, so I knew the area pretty well, and I remembered one really cool view of the canyon.

Things were going great as we drove along the the dusty dirt road, until something happened that I hadn't planned for. Michelle asked if I had any Tylenol, and proceeded to open the center console, which is where I had stashed the ring. It was in its box, but I figured that she would recognize it for what it was and the jig would be up. But amazingly she didn't and was completely unfazed.

We finally reached the overlook, and although I was a bit jumpy from the close call, I pulled myself together and was able to grab the ring without her noticing. We got out of the car, and the view was spectacular. It was a little before sunset, and the sky had a slight orange glow to the west. There was a thunderstorm to the north and rain to the south, but the sun shone down on us and the canyon below.

I didn't have any pockets, so it was a bit tricky keeping it out of sight as we walked along. I then suggested we go south a little ways off the road where the view was even better. Which it was.

We stood there taking in the view, and Michelle remarked about how beatiful it was. I replied that while it was in fact breathtaking, that wasn't why I had brought her there. She asked what I meant by that, at which point I pulled out the ring and asked her to marry me. She said of course she would. And the rest is history.

Posted by jon at 10:39 PM | Comments (0)

sqlite

Well I finally got around to fixing my SQLite helper class. It's a simple PHP class for working with SQLite databases and has full support for ALTER TABLE statements, as well as impoved error handling. While I love SQLite, a major annoyance of mine has been that it doesn't support ALTER TABLE. Which was my motivation for writing this class.

I wrote it almost a year ago, but never provided any decent documentation, so it wasn't really easy to use. Plus there was a bug wherein queries would fail if you were dropping multiple columns in one statement. Mark Meves was kind enough to point this out a few months ago.

But that's all been fixed. The documentation, while still quite simple, now explains the ALTER TABLE syntax and has a few sample queries. And that nagging bug has been fixed. So if you're working with PHP and SQLite on a project, it's worth a look, as it could easily speed up the development process.

Posted by jon at 5:30 PM | Comments (0)

July 13, 2004

synflood

Well crap. My hosting provider got synflooded earlier today. I guess that's kind of like getting slashdotted or farked, except that it's by zombie PC's instead of by 30-year-old virgins still living in their parents' basements.

Although I suspect slashdot may have had something to do with it... Posted something earlier today on a thread about four new IE bugs and it ended up getting modded up as informative. Which brought me some extra traffic. Which in itself isn't unusual or alarming, as my hosting provider could handle it just fine.

But it brought attention to a post on my blog about a scammer who has been exploiting the relatively unknown (until today) vulnerability. It even has a link to his fake eBay site. About two hours after the slashdot crowd came in, the synflood began and the server went down. I'd never seen a DDOS with this hosting provider until today, so I suspect that there's a connection. Somebody just didn't like the extra attention I'd brought and took it out on my server.

Of course, it could all be a coincidence. But life is so much more interesting when you are paranoid. :P

Posted by jon at 6:01 PM | Comments (0)

July 12, 2004

objectivity

The good folks over at the W3C are writing a two-part article for the Web Standards Project about the object element and how to use it. In a nutshell, the object element was intended as a multi-purpose tag for embedding multimedia content. This includes, but is not limited to, images, sounds, movies, applets, external files, etc. Unfortunately, poor browser support has long been the bane of developers everywhere.

My latest experiment in web design shows you how to tame the object in Internet Explorer without resorting to kludgy hacks and junk markup. With just one stylesheet rule and an HTC file, you can say goodbye to <img> tags for good.

Posted by jon at 7:10 AM | Comments (2)
November 2010
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
Search
Archives