HTML5 and jQuery

The last time I was unemployed, I put together Fav.Premo.biz.  Unemployed again, I’ve dipped into code all over the various projects I’ve got up and running.

With the exception of the main site (i.e., the page you’re reading), I’ve decided to change all of my sites from HTML4 or XHTML to HTML5.  In addition, I’ve decided that now is a good time to stop using Prototype and script.aculo.us and start using jQuery.

I’ve decided to move to HTML5 for two main reasons.  First, HTML5 is more elegant than HTML 4.x or XHTML 1.x.  I love elegance when it comes to programming.  I find that the criteria which determines what is and is not valid HTML5 code is less draconian than for HTML4.x and XHTML1.x.  Also, HTML5 introduces new features that allow developers to add greater functionality with hand-written markup.  Greater flexibility and greater functionality sound pretty elegant to me.  Second, due to these new features, HTML5 provides for greater use of open source technologies.  The long and short of my feelings in this area is that HTML5 gets us one step close to a world without Adobe Flash.  The <audio> and <video> tags allow developers to add rich content to sites without relying on a closed source, proprietary plugin that is a resource hog and a security risk.  Who couldn’t love code that’s more elegant combined with a better user experience?

I’ve decided to move to jQuery because jQuery is updated far more frequently than the JavaScript frameworks I’ve been using up until now — Prototype and script.aculo.us.  For example, jQuery 1.4 was released in January 2010 and jQuery 1.3 was released in January 2009.  When it comes to Prototype’s progression over that time, I can only estimate that it’s seen two bug releases (0.0.0.x) and one maintenance release (0.0.x).  Although putting out regular updates to a code base may be virtuous, it’s not the whole story.  Every time jQuery is updated, its release notes contain graphs showing speed improvements for all major browsers.  Speed improvements on an annual basis.  This just isn’t happening in Prototype or script.aculo.us.

I have a few public-facing sites that use JavaScript here and there, but only one makes heavy use of it: Fav.Premo.biz.  Since modifying code to use both HTML5 and jQuery would be painful at best, I’m going to rewrite Fav.Premo.biz using these new technologies.  It’ll be an undertaking, and it might not be finished soon, but it should be interesting.

HTML5 and jQuery

Windows Money Savers

Today I checked out Ars Technica’s latest Week in Microsoft, and came across two articles that might save Windows users some money.

The first is about Microsoft’s freshly-out-of-beta antivirus suite.  First look: Microsoft Security Essentials impresses.  In 2006, Microsoft released a retail antivirus program called Windows Live OneCare.  By the end of 2008, Microsoft had announced that it would discontinue this product in favor of a free replacement called Microsoft Security Essentials.

For years I’ve been using AVG Free, but today I uninstalled it (you don’t want two antivirus programs running at the same time) and installed MSE.  It looks like it’s a bit easier to use than AVG and I must say, it’s got some beautiful system tray icons.  I might write a post in the future with some expanded impressions of the product, especially with Windows 7 coming out this month.

Microsoft Security Essentials can be downloaded here.

The second article is about something I’ve known about for years but to which I’ve never committed.  Newegg reveals Windows 7 OEM prices.  I’ve known about OEM versions of Microsoft Windows since before Windows Vista was released.  From what I understand, an OEM copy of Windows is only supposed to be used on a newly built machine.  However, I believe that is more of a suggestion in line with the “Student and Teacher” edition of Microsoft Office (which has since been renamed to the “Home and Student” Edition.)  On Newegg’s listing page, the text appears to be cut off, but here’s the part that caught my eye:

software requires the assembler to provide end user support

That made me think:  Hell, I’m capable of that.  I’d prefer it that way, in fact.  If I were married with kids, I’d probably put an OEM copy of Windows on each of their machines, too.  I wouldn’t suggest it for my parents or my sisters, or even my best (nontechnical) friends, though.  But for me, why not?  Oh, and why is this a money saver?  Depending on the edition of Windows purchased, the OEM version is about 50% cheaper.  The greatest savings percentage-wise appears to be on the Professional Edition, which is the one I’ve got my eye on.

Newegg lists every version of Windows 7 it’s selling here.

So if you’re a technical person, take a look at both of these articles.  If you’re not, consider using Microsoft Security Essentials.  Because it’s free antivirus software.

Windows Money Savers

Mac OS X 10.6 Snow Leopard

I picked up Mac OS X 10.6 Snow Leopard on Friday, as I’m sure many people did.

Somehow, the improvements I notice the most are visual.  Apple has adjusted the default gamma from 1.8 to 2.2.  I don’t know what that means.  However, I can tell very easily that all the colors I’m seeing are more saturated.  It was slightly off-putting at first but I’ve quickly come to appreciate it.  The second thing I’ve noticed — and I might just be imagining this — is that the glass dock’s magnify effect seems to be smoother than it was on 10.5 Leopard.  This doesn’t make sense to me, because I’m under the impression that such things should only be improved on machines with discrete video cards.  My late 2006 MacBook has an integrated Intel video card.

Someone at Apple decided to put the Applications folder in the dock by default.  This is appreciated, since it’s one of the first things I would do after installing Leopard.  There are other changes to the dock.  Menus are charcoal and transparent.  Exposé is available on a per-application basis by clicking and holding on each application’s dock icon.  Also, Exposé is available as an icon, which can be dragged to the dock.  I recommend doing this.

I have no complaints about the software.  It was inexpensive at $29.  The previous update — 10.5 Leopard — cost more than $100 if I remember correctly.  Installation was very similar to that of Leopard.  I performed a clean install.  When I purchased the software at the Apple store, the clerk asked if I had an Intel Mac with Leopard.  I did, and Snow Leopard requires an Intel Mac.  And I read on the Internet some questions about whether a clean install was even possible with Snow Leopard.  Like I said, I was able to do it.  But I do wonder if the process will be any different when performing a clean install of Snow Leopard on top of an existing install of Snow Leopard.  Will the installer ask me to insert my Leopard install disc?  We’ll see.

Overall, Snow Leopard is an inexpensive update which provides some worthwhile new features and clears up some disc space.

Mac OS X 10.6 Snow Leopard

Firefox 3.5

Just downloaded Firefox 3.5 from Mozilla’s FTP site (yeah, you’re not really supposed to do that). It’s clear that JavaScript runs faster (which is a big deal to me), but I’ll give the latest browser a thumbs up just because of the New Tab button. For years the first thing I do when I install Firefox on a machine is add the New Tab button to the toolbar. Now it’s there in almost the exact same spot.

Firefox 3.5

Safari 4 Beta

Wow, Safari 4 includes built-in functionality extremely similar to a Firefox extension I use almost daily — Firebug.  It’s accessible through Safari’s Developer menu, which is hidden by default.  I wonder if technology like this being built into browsers will become the norm.  I seem to recall that Mozilla had decided to strip the console or DOM inspector out of future versions of Firefox, but a couple minutes on Google and Wikipedia leave me with no evidence of this.

The conclusion here is that competition is good for the consumer, and developers aren’t often thought of as consumers.  It’s also interesting that Safari, which lacks Firefox’s robust extension architecture, now has built-in functionality similar to my favorite Firefox extension.  This reminds me of the progression of Mac OS (and perhaps Windows) — imitate popular third party applications, and include them with the OS.  Think of iTunes: MP3 player, CD ripper, podcast manager.  Many popular (free) third party applications have faded into obscurity because people don’t need them anymore.

Safari 4 Beta

AnswerTips: No Longer Just for NYT.com

Over a year ago, I wrote about a feature on the New York Times website.  The feature works as follows: the reader double-clicks on a word, and a new window opens with a dictionary lookup of that word.  I called it a killer feature.

Today I find that the same feature, powered by the same company (Answers.com) is present on CBSNews.com.  Not bad.

AnswerTips: No Longer Just for NYT.com

There’s No Flagship iPod

Two days ago, Steve Jobs unveiled updates to the entire iPod line, including the brand-new iPod Touch. Other changes include iPod Shuffle with different color choices, iPod Nano with a more squat form factor and video capabilities, and the iPod Classic, formerly called just iPod, with a new metal face and larger capacities.

iPod Classic? Do I smell New Coke? Why not just leave it with its old name of ‘iPod’? Oh, that’s right — the new device is the iPod now. Isn’t it? No, the new device is ‘iPod Touch.’

Why is it that no device gets the one-word name? It’s because no device can stand alone as the elite option. The iPod Touch is close. But 16GB of storage just isn’t enough. Doubling its capacity to 32GB would do the trick. After all, it was only three days ago that the more popular capacity choice of the flagship model was 30GB. 32GB would be enough for most consumers. (It’d be enough for my 25GB music collection.)

Apple knows that 16GB is not enough storage for a flagship device. That’s why the fifth generation iPod lives on today as the iPod Classic. More than keeping it alive, Apple has updated the capacity of the Classic. The base model has gone from 30GB to 80GB, and the upper model has jumped from 80GB to a massive 160GB.

One hundred and sixty gigabytes. That’s a lot. I’d guess that’s more than enough space to hold the entire music collection of all but a fringe group of consumers. So what to do with the remaining space? Use it as an external hard drive? Not likely. The answer? Fill it with video. But the Touch has that big, beautiful screen! In other words, one device has a holds-my-music-collection-twice-plus-several-seasons-of-tv-shows capacity, cursed to be played back on a two-year-old, small-by-Wednesday’s-new-standard screen; and one device has a big, beautiful, reorients-the-content-when-I-rotate-the-device-ninety-degrees screen with a maximum of won’t-hold-my-music-collection, don’t-even-talk-about-multiple-full-length-movies capacity.

There’s no flagship device.

In six months, Apple might release a 32GB flash-based iPod Touch. At the same time, Apple might provide video content on the iTunes WiFi Store.  But who wants to wait at a hot spot while At World’s End downloads?

There’s No Flagship iPod

New York Times.com Killer Feature

So I’m reading an article I find via Digg. The article’s on the New York Times website. While reading, I run across a word I am not familiar with.

Automatically, I want to put this word into Google. Firefox (and I suppose IE) allows users to highlight text, right click, and choose “Search Google for” the selected text. If Wikipedia is the currently selected search engine in the toolbar search box, the right click allows the user to “Search Wikipedia for” and so on.

Of course, the easiest way to highlight a single word is by double-clicking on it. So that’s what I do. I double click on “abstemious.”

Suddenly a new window appears. While it’s loading, I think I must have done something wrong. Then the page loads. It’s a New York Times.com-powered dictionary lookup of “abstemious.” This is like the coolest thing ever. Well, maybe not ever.

Examining the URL of the newly opened window, we see a few things (with some line breaks to reduce ugliness).

http://query.nytimes.com/search/query?
srchst=ref&
query=more%20valuable%20to%20abstemious%20Martins%20than%20to&
fw=3

The query string includes, from the article, three words before the highlighted term and three words after the highlighted term. The field fw (focus word?) at the end of the query string indicates which word to pass to the dictionary, using a zero-based array. (I tried double-clicking other words in the article and changing the value of fw to test this.) I can only imagine that including surrounding words might provide context to generate an even more accurate definition. Why the target word is variable, however, eludes me.

Oh, and srchhst=ref sounds like search history = reference. Whatever that means.

Please, test this feature out for yourself. Head over to the New York Times site, click on any story, then double click on any word. (The feature doesn’t appear to work from the front page.) Awesome!

New York Times.com Killer Feature

A Week With Vista

So I got my copy of Windows Vista the day of release. FYI, I went after work, not midnight the night before. I give it some pluses and some minuses so far.

For starters, you know how every time you buy a new piece of hardware it says “use this CD before installing hardware!”? Don’t you hate those CDs? They usually just install a bunch of crap on your computer that you don’t need. Recently I bought a wireless router which included such a CD. I never used it, and I’m using the router. After I got the wireless router I got a wireless PCI card for my desktop computer. I skipped the CD and just put the card in the box. No big deal. Except no matter what I tried, I couldn’t get Internet access. So finally I broke down and put the CD in. The wizard launches, asks me to type a few things in … and in less than five minutes I’ve got Internet.

So a big question I had was, “Will Vista allow me to skip the CD?” Hey, less extraneous software launching at boot is always a good thing. And I recall from when I got the Dell in college that XP didn’t need user input for DHCP configuration — it just worked. Well sure enough Vista didn’t need any additional drivers to get me wireless Internet access. It asked me to type in some text and I had access pretty quickly. One point for Vista.

Next thing. You can download an upgrade advisor from Microsoft, but when you run the Vista installer it makes kind of a big deal that you can use it to make sure Vista will work on your system. I ran the advisor months ago — it led me to upgrade my video card — but I figured what the hell. The advisor told me that there were no drivers for my sound card, and therefore it would not function correctly. I quickly decided that a nonfunctional sound card would not stop me from upgrading. After I got Vista installed and it booted for the first time, it told me that it had downloaded some updates. I restarted, and on the second boot I had sound. One point for Vista.

Next thing. The sidebar. It’s where Vista keeps its gadgets. By default, there’s an analog clock, an RSS reader, an image viewer, and one other thing I seem to be forgetting. A couple right clicks will bring you to a gallery on Microsoft.com where you can download new gadgets. I got a couple that measured processor usage. After a day or two I noticed that, even while completely idle, my processor was running at about 15% usage. I killed a couple gadgets, and the usage dropped. I killed all but one processor meter, and usage dropped to about 1%. I killed the sidebar entirely, and the machine does boot a little bit quicker — noticeable so. (Killing the sidebar was harder than I thought. Closing it will make it disappear, but it leaves an icon in the system tray. Just today, I right clicked that icon, got a preferences dialog, and deselected the box to start the sidebar when Windows starts.) Yeah, my processor is five-plus years old, but I think that the sidebar was too much of a resource hog to be worth it. I definitely plan on putting Vista on my MacBook in the near future. I’m interested to see the sidebar on it — partly because the MacBook is widescreen — and to see what kind of hit it puts on the Core 2 Duo. I’ll call this one half point against Vista.

Next thing. We have to go way back to start this one. Way back … to the Compaq. I got a Compaq Presario in 1998 — my Freshman year of college. It came with Windows 98 Second Edition. It was a piece from the day I got it until … well, until now. I believe it’s in my closet back in Chipmonk. I can’t think of a better place for it. Anyway, when XP came out I bought an XP Upgrade disc. In order to perform a clean install of XP on a machine, it demanded that you insert an Windows 95/98(/2000?) install disc early on in the process. I believe I used one of my Windows 95 CDs from back in the day when my dad got our IBM Aptiva — which came with Windows 3.1, but somehow got us 2 Windows 95 CDs in the mail when it came out. Where the hell was I? Upgrade. Right. The point is, with Windows XP you could do a clean install (meaning you format your c: drive before installing the OS) with a Windows XP Upgrade Disc. With Windows Vista, if you want to do a clean install, you’ll need a Full Edition Disc. For me, that meant about 80 bucks more — $260 instead of $180. Yes, you can say yikes. I recall that XP Upgrade Disc putting me back only about $100. So that’s … a point against Vista.

Here’s the big thing. Before the Xbox 360 came out — we’re talking Summer 2005 here — I knew that when Vista came out, the Xbox 360 would be waiting with features that the new OS could hook into. Specifically, a Media Center PC could do a whole lot of sharing with the Xbox 360. One feature that particularly interested me was TiVo-like functionality, from your couch, using your Xbox 360 — assuming you had Windows Vista (or XP Media Center). At the time I believed that every copy of Vista would include Media Center functionality. Turns out only Windows Vista Home Premium and Windows Vista Ultimate include it. So I went with Home Premium.

It’s funny, but it was about two days before I even tried any Media Center or media sharing stuff in Vista. I suppose I spent those first two days tweaking performance, poring over changes to the Control Panel. You know — looking under the hood. So I got off work early that Friday, read an article on Xbox.com, followed the instructions … and got an error message. “Extender not found.” See, with Windows Media Center you’ve got Media Extenders — set top boxes that give you nearly 100% of Media Center functionality on your TV. (It’s worth noting that of all the Media Extenders that are compatible with Windows XP Media Center, Xbox 360 is the only one that is compatible with Windows Vista Media Center. I’ve heard conflicting reports of updates to enable Vista compatibility.) After about two hours of that, I fell asleep for 13 hours. It was a long week.

Since then, I’ve tried going through the steps in different order, and still get the exact same error message. I’ve contacted Microsoft, and their suggestions have ranged from “update your drivers” to “disconnect your USB devices” to “uninstall your drivers.” I haven’t tried that last one. Frankly I feel like they’ll next tell me to try it while standing on my head. See, when I’m sitting at my PC, running Media Center, trying to add a Media Extender, I’ve got to hit the Next button about five times. Then a list of steps appears on the screen. “Changing settings on your computer,” “Locating Extender on the Network,” then there are something like four more steps. Well, the first checkbox appears, then it gets stuck, then it goes to a new screen that tells me, “Extender not found.”

The thing is, I have a feeling that there are about a million things that need to happen between the first checkmark and the second checkmark. So when I tell Microsoft that the second checkmark doesn’t appear, they can only narrow it down to about a million things. When the truth is, I need a more detailed error message! Tell me what’s not happening. I can stream music from my Vista box to my 360 (just like I did with Windows XP). In Vista, the 360 is visible in Network Neighborhood. The devices can see each other. What do you mean Extender Not Found? You found it! It found you! You found each other!

As you might guess, I’m frustrated. This is a point against Vista, and I believe this takes the score down to … 0.5. I also like the UI changes, so I’ll give it another half point. That brings the score to 1.0. At this point in time I should be raving about how great the Media Extender functionality is. But I’m not. I can’t get it to work. I’ve looked online but haven’t found a magic bullet. Microsoft support hasn’t helped, but I think the error is just too vague. I’m hoping for an update in the next week or so that will allow me to figure out what the hell the problem is, so I can fix it. Until then, I give Vista a very slight, very close, very cautious thumbs up.

A Week With Vista