The Vista Verdict: Don’t Bother

With all of the hubbub surrounding Google Office today I decided to write this blog post using Google Writely, which is an in-browser word processor that is part of the Google Docs & Spreadsheets service. It’s pretty nice so far, and I like that it has an autosave feature, because I’ve made use of it with this post. I started it, got distracted, and didn’t find my way back until now… 6 hours later.

But that’s not why I started this post.

I’ve been keeping up with Windows Vista. I’ve installed it. I’ve poked and prodded it. I’ve used the browser, created accounts, set up printing, mounted a networked file system, checked out the firewall settings, and, of course, mucked about with the pretty graphical enhancements they’ve made to Vista. Then, I spoke to other people. Two of the people I spoke two were Windows administrators, and generally “Windows guys”. I spoke to Windows end users who have recently purchased machines with Vista pre-installed. I’ve been in online forums and chat rooms, and scanned a few mailing lists as well, all to try to figure out what the big deal is in this most recent release of Windows.

Here’s the thing: it’s not a big deal.

If you use XP, Vista really only changes things that are going to annoy you. They’ve completely overhauled the Start menu, they’ve moved a bunch of stuff around, they made the navigation *look* slicker while at the same time actually being no more useful than it ever was, and meanwhile, when you actually find what you were looking for, it looks pretty much exactly like it did in XP. In short, they’ve made the same exact tools harder to find, but made the menus look slicker.

I forgot what Windows calls the desktop “widgets” it allows you to place on your desktop. I guess that’s because Apple actually calls them “widgets” in their “Dashboard” implementation, which is done so much better that to see the Windows version made me chuckle. It’s a joke, really. Windows typically doesn’t do new features very well – at least not at first. Also, don’t make the mistake of thinking that anything in Vista passes for “innovation”. For example, IE7 has tabs. Big whoop. Open source browsers you’ve never heard of made better use of tabs 6 or 7 years ago than IE7 does today. Believe it. Sad but true.

The security? Well, don’t buy the marketing. For every security feature Microsoft has added to Windows, there’s already an exploit, and the OS has only been out for about a month.

In short, if you need to purchase a desktop system, and you’re a non-technical end user type user, I hate to say it, but… buy a Mac. After using Linux for almost 10 years, I’m still not ready to give it the green light on the desktop. Macs are expensive, but I believe they’re worth it. On my desk sits the sickest workstation you could ever want to own: dual core amd processor, dual 20″ LCD monitors, 2GB RAM, 250GB hard drive, GigE networking, UPS, insane graphics card… the works. In spite of that, I’ve found that, after about a two month adjustment period, I now do 99.99% of my work, and 100% of my play, on my 15.4″ MacBook Pro laptop. The .01% of the work I do on my Linux machine is not because the Mac isn’t capable – it’s that the Mac isn’t on the secure network where certain administrative functions have to take place.

The Mac can run Microsoft Office. It can run Quicken. It can run Photoshop (in fact, it’s recommended by Adobe). It has wonderful applications, either built in or readily available to handle mail, calendaring and browsing and other day-to-day activities. It can do whatever the heck you want. If you’re a desktop user, Apple wants your business, and they’re working damn hard to prove that on an ongoing continuous basis. Linux, as a community, is mostly solving their own issues, scratching their own collective itch, and fighting with eachother. I sincerely hope Linux comes around, because with three major desktop competitors, the end users win, and I have sentimental and work-related ties to Linux.

Remember this, if nothing else: Windows users pick on Linux for a host of reasons, some are even valid gripes. Windows users pick on the Mac for one reason and one reason only: jealousy.

Technorati Tags: , , , , , ,

Um… Nevermind

Ok, so I’m publicly uncommitting myself from the project I committed myself to yesterday. Turns out, Mark Burgess has already done this with a tool called DeliciousSQL Importer.

Sure, the data model doesn’t stand up to my rigorous normalization standards, but with this, I can get at my data, and do whatever I want with it. I’m not sure what it’s written in or if I can get at the source code or what – I just downloaded it minutes ago and made sure it launched on my macbook pro. It does. The rest I have lots of time to figure out, since I now don’t have to spend that time figuring out which way is the right way to transform XML to SQL. :-)

Technorati Tags: , , , ,

XSLT, SQL, and Delicious Library

Ok, I’m publicly committing myself to this pet project. I’m going to make it possible to take the data in Delicious Library’s xml backend and store it in a properly normalized database, so that other useful things can be done with the data.

Here’s the quandry I find myself in: I have a good number of technical books. I’d like to catalog them, but I see little use in cataloging them for my own use. I want to catalog them, then review them, then post the reviews on my technical web site. I also want the book cover art images to link off to Amazon, and if someone buys something I’ve reviewed via a link I’ve provided, I’d like to be paid by Amazon for the referral, so I can recover some of the cost of running the site without having ads all over the place.

Delicious Library doesn’t help me here. Where it *does* help me is with compiling the initial data set. It has a really really really slick barcode reader: I can just hold the book in front of the camera built into my macbook pro, and it automagically finds the book and adds it to my library.

So, I’m writing an XSLT stylesheet: xml2sql.xsl. When used with Delicious Library’s xml file, it will output sql suitable for use with (right now) MySQL. I will, in fact, attempt to make the SQL as generic as humanly possible, but I’m currently testing with MySQL. I worked on this for about 30 minutes last night and came up with this:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text"/>
        <xsl:template match="/library">
            <xsl:for-each select="items">
                <xsl:for-each select="book">
                    <xsl:variable name="author" match="@author" />
                    <xsl:variable name="fullTitle" match="@fullTitle" />
                    <xsl:variable name="publisher" match="@publisher" />
                    TITLE:
                    <xsl:value-of select="@fullTitle"/>
                    AUTHOR(S):
                    <xsl:value-of select="@author"/>
                    PUBLISHER:
                    <xsl:value-of select="@publisher"/>

                </xsl:for-each>
            </xsl:for-each>
      </xsl:template>
</xsl:stylesheet>

If you save this to a file, then reference it from *A COPY OF* your Delicious Library file (which is, by default, ~/Library/Application\ Support/Delicious\ Library/Library Media Data.xml) by adding this line as the second linee in the file:

<?xml-stylesheet type=”text/xsl” href=”xml2sql.xsl”?>

then that xsl stylesheet will be used to parse that copy of your Library. I’m testing on a Mac using the following command:

xsltproc -v Library\ Media\ Data.xml

If you don’t want to alter the Library file, then you don’t *have* to add that line to your Library file. In that case you’d test using this command (assuming you named the stylesheet xml2sql.xsl):

xsltproc -v xml2sql.xsl Library Media Data.xml

That spits out some really ugly output, but the point right now is just to see that we’re getting data out of it at all. Keep in mind that this is like the second XSLT stylesheet I’ve ever composed, so have some patience.

If there’s interest in this, or ideas about how it might be done, let me know.

Technorati Tags: , , , , , ,

I hate school buses

I know I’m probably a horrible person for hating school buses, but I do. I can’t help it. I hated them when I had to ride them to school, and now that I drive to work, I really can’t stand them. I realize there’s probably not another solution to the transportation issue. I’m just sayin’.

They cause a *lot* of traffic. Seriously. Yesterday, I left my house at 7:15 and got in at 7:45 because I got caught behind 4 buses. Today I left at 7:10 and got in at 7:28 because I got caught behind *no* buses. 18 minutes vs. 30 minutes is a significant difference. For reference, when I come in at 4am for downtime at work, it takes me something like 13 minutes.

What really bothers me is that bus drivers mostly have chips on their shoulders and use the flashing lights to exert their power over 9-to-5ers. They make arbitrarily long stops, they wag their fingers at drivers, they stop to talk to crossing guards while we wait, blah blah blah. They did this when I rode the bus too. Bus drivers mostly seem to hate the world… the kids included.

Well, at least I can long for summertime, along with the kids on the bus. If nothing else, we can bond on that, even across generational lines. Summertime is wonderful. No buses at all, no matter what time I leave for work.

:-)

Safari isn’t that popular, and a neat Google search

Some number of *months* ago now, someone tried to justify my supporting Safari in a web application by saying “Safari is the most popular browser on the Mac”. That person further asserted that as Macs become more popular, Safari is also sure to become more popular. Now, I use a Mac, and I know lots of other Mac users, and I don’t know anyone *except* for this person who uses Safari.

Of course, that’s unfair. Most people I know running Macs are geeks. Geeks can’t stand Safari. In spite of claims that Safari is “the most compliant browser”, the fact is that Safari is as compliant as Konqueror, and most people do *not* use Konqueror. The reason is because no matter how much geeks like standards and compliance and all that, they’re not going to *not* use Web 2.0 applications that the rest of the digital Earth is using because this *one* browser doesn’t handle JavaScript in a way that every other browser does. Indeed, there are standards, and then there are, you know… “standards”.

Anyway, I’m supporting Safari. Whatever. It’s not that hard for what I’m doing I guess (yet). But it still bothers me that someone is so willing to latch on to the glossy marketing and assume that it’s gospel with absolutely nothing in terms of numbers to back that up. So I held an informal poll. I asked a whole bunch of friends in sysadmin IRC channels if they could provide me with the percentage of their Mac users using Safari vs. those not using Safari. I specified that I did not want statistics from geeky/technical sites, because I’m happy to assume that those samples would be skewed.

I got quite a few responses from people happy to tell me their numbers. A few even linked me directly to the statistics for their site. That led me to a cool thought: there’s already mountains of free web user agent statistics out there on the web – you just have to *find* it, which brings us, of course, to google. Want to see the webalizer page for a whole bunch of web sites? Type this in as your search term:

“Usage statistics for” allinurl: webalizer

You’ll get back a list of links to webalizer pages for those sites that choose not to protect access to them. However, most sites use webalizer only to record the top 15 browsers/platform combinations, and Safari many times doesn’t make it on the list. In its defense, this is due to the crawler agents and the thousand versions of Windows out there that make for lots of different browser/platform combos. So I added “safari” to my search and got back a lot more useful information.

In short, I looked at webalizer statistics for about 12 sites that are not technology-heavy content producers. I also got numbers directly from admins of about 5 sites that are also non-technical. That’s where the science ends. I did not tabulate numbers and do all kinds of work to figure this out – I’ll leave that for someone with time. What I was able to discern from looking at the data, though, is that, while the race is somewhat close, Safari is *not* “the most popular browser on the Mac”. Firefox is.

I’d *LOVE* to see a more useful statistical analysis than this to get s’more hard numbers. Does anyone know of a site that compiles/aggregates/analyzes this kind of data?

Technorati Tags: , , , , , , ,

ALSO – if you’re an admin who has access to the logs of a non-technical site, POST YOUR STATS regarding Safari vs. $not_safari usage on Macs. Thanks!

Social Bookmarks:

How to replace a view, a cursor loop, and a few other queries with one SQL statement

I had a stored procedure that defined a cursor using a crazy query, and then a LOOP that did a FETCH and went row-by-row and performed updates and inserts to 3 or 4 different tables. I was having some trouble completing the very last thing the procedure needed to do. So I figured I’d take a little ‘learning break’ and do s’more research on what I was trying to accomplish.

I came across Roland Bouman’s blog, and read quite a few of the articles there. He’s a good presenter of his knowledge, and would appear to be incredibly knowledgeable about all things SQL-related, and something in those articles got me thinking that what I was trying to do may not be the greatest use of the DB server’s resources.

I had a cursor that fetched something like 350 rows for my loop to process. On average, probably fewer than 5 of those 350 rows would point to changes the procedure would need to make (either inserts or updates). Further, the cursor query depended on three views I had created, in part to work around shortcomings in an application’s database design, and in part to map external data to id’s defined in the application. This was quickly turning into a steaming heap of rotten garbage that I was going to have to provide for the care and feeding of. I had entered the No Bueno Zoneâ„¢

I got s’more ideas from Roland’s blog, thought on this for the weekend, futzed around with some stuff, fell down a few times, and then, first thing this morning, I came in, sat down, stroked my chin for about 5 minutes, did some typing, and then sat back. I inspected the code. I looked at the output of a few other small queries. I tested the code, and immediately put my arms in the air signaling the touchdown that had just been achieved.

Here’s the final task I needed to accomplish in the stored procedure. Thanks again to Roland for sharing his knowledge on his blog. It was very useful.

UPDATE groups_members AS grpmem,
    (
        SELECT
            u.id AS uid,
            g.id AS newgid,
            m.groupid AS oldgid
        FROM
            bb_data_map AS b
            JOIN user AS u ON u.username = b.netid
            JOIN course AS c ON c.idnumber = b.coursename
            JOIN groups AS g ON g.name = b.precept AND g.courseid = c.id
            LEFT JOIN
                (
                    SELECT
                        gm.userid AS userid,
                        gm.groupid AS groupid,
                        g.name AS grpname,
                        c.idnumber AS coursename
                    FROM
                        groups_members AS gm,
                        groups AS g,
                        course AS c
                    WHERE g.id = gm.groupid
                        AND c.id = g.courseid
                 ) AS m ON m.userid = u.id AND m.coursename = b.coursename
        WHERE b.precept IS NOT NULL
        AND c.id IS NOT NULL
        AND m.groupid != g.id
    ) AS newgrp
    SET grpmem.groupid = newgrp.newgid
    WHERE (grpmem.userid = newgrp.uid AND grpmem.groupid = newgrp.oldgid)

Technorati Tags: , , , , , ,

Social Bookmarks:

Shell Quoting Conundrum

Somebody on a mailing list asked a question about shell quoting. The quoting issue would not have been so difficult had it not been for the fact that it was a command that was to be run on the other end of an SSH connection. Here’s the command he was trying to run:

ssh -t hostname ‘sudo sh -c “echo \’test\’ ; echo \’test\’” ‘

My understanding is that the person running this wants to see output from this command that looks like this:


'test'
'test'

Here’s how I believe the command would need to look to get that output:

ssh -t hostname “sudo sh -c \”echo \’test\’; echo \’test\’\”"

The key is starting with double quotes instead of single quotes, because single quotes fed to a bash shell is a toggle switch that turns shell expansion on and off. Until about 5 minutes ago, I had always had the rule “Don’t put single quotes inside single quotes” in my brain as a rule of thumb to avoid confusion. After doing some checking (in the bash man page), turns out it’s a bona fide RULE in bash. From the man page:

A single quote may not occur between single quotes, even when preceded by a backslash.

Whaddya know? I must’ve picked that up along the way and forgot about it.

If you think about the single quote as a toggle between ‘expansion on’ and ‘expansion off’, and NOT as a literal single quote, and then parse that first command again, you’ll see that this is probably not going to work.

Technorati Tags: , , , , , ,

Social Bookmarks:

How to buy used voting machines on the internet

There’s a really interesting writeup by a Princeton University professor about how he was able to purchase a lot of voting machines on a government surplus site. Interesting highlights: the machine doesn’t match the marketing glossies with regard to “security” (surprise, surprise), and there’s no qualification process to go through to buy from the government surplus auction site. More here.

Technorati Tags: , , ,

Things to give your Sysadmin for Valentine’s Day

Ok, well, they don’t actually *make* any of these things, to my knowledge, but I was thinking about it today, and thought of this list of stuff that might be cool little thoughtful Valentine’s Day gifts for the geek in your life:

  1. A heart-shaped USB key that says “All my love are belong to you” on it.
  2. Super-caffeinated chocolate in a tin that can be recycled into, er, something like this.
  3. An unbreakable coffee mug that will tell you the current time and date, as well as the 5-day weather outlook, and contains a Vim command reference, and an IP subnetting reference (they could sell these with the v4 reference now and implement planned obsolescence).
  4. A *real* Blackberry SSH client.
  5. A t-shirt with the blu-ray *or* HDDVD decoding algorithm on it.

These were just the ones I came up with on short notice. What ideas do you have?

Technorati Tags: , , ,

Entering SQL Mode

My primary job focus is the design, deployment, maintenance, and support of infrastructure services like web, mail, dns, ntp, nfs, nis, ldap, print, and database servers (this is not to mention the routers and access points, sun rays, lab machines, beowulf clusters, etc that my group also maintains). However, recently I’ve been doing, well, some different stuff.

It’s a nice change of pace to have the opportunity to revisit the database *development* side of things. I know a lot of people feel like it’s the most mundane thing you could ever want to do, but you know what? Some people like sudoku. What is more mundane that sudoku? I submit that there is *nothing* more mundane than that, so I’m not really out of my mind to thoroughly enjoy the challenge of getting a small, neat, precise answer delivered to you from a veritable sea of bits after performing the proper keyboard incantation. Of course, that incantation can be difficult to come upon, and so it’s kind of like a weird form of ‘Dance Dance Revolution’ for only the most lazy of lazy people, which is why it’s perfect for sysadmins.

It’s also an opportunity for me to document some things for my website, and probably blog/rant about the decrepid state of database implementation by open source projects (probably at the O’Reilly SysAdmin blog).

Technorati Tags: , , ,