Sunday, May 27, 2007

Comparable PC laptops now about $1000 cheaper than MacBook

I just went to the Lenovo website to try configuring a T61, which is their new Santa Rosa-based laptop.

I was shocked at how cheap it is: $1700 for 2.2ghz T7500, 800mhz FSB, 4MB L2 cache, Vista Ultimate, 14.1" WXGA+ w/camera, NVidia Quadro 140M, 2GB RAM, 160GB 5400RPM drive, 8x DVD+-R, dual layer. And oh yeah, it has a trackpoint instead of just a trackpad.

Given the last year of being told by Mac fanboys that I should buy a Mac, of course the first thing that pops into my head is, how much is the comparable MacBook? Well, the comparable MacBook Pro is $2600... with no trackpoint at any price.

Herein lies exactly what I predicted when all of the Apple fans started trying to convince me to buy a Mac to run Windows: Apple cannot compete with commodity hardware makers. Six months or nine months ago, whatever it was... they were able to release machines that were competitively priced with the top of the line PC laptops. That's a fleeting moment of competitiveness. Unlike PC makers, Apple leaves the same configuration at that price for much longer. I'm guessing they need this longer tail of a jacked up price to make up for the lack of quantity they ship.

Although Apple caters to the high end, PC makers are usually way ahead of the curve for new hardware. Apple were behind the curve in refreshing their hardware with Core 2 Duo -- I don't think MacBook Pro got Merom until about January, or about 6 months after it debuted in PC laptops.

So it will be interesting to see what Apple does with their Santa Rosa refresh. Will they sit on it longer, hoping to ship more of the older technology at higher margins, or will they come out with a new machine at a competitive price? Based on what Lenovo is shipping their machine at, that might be tough!

Tuesday, May 22, 2007

Democratic Futilism

I thought of a new phrase today: "Democratic Futilism"

You know how guys on the internet write 1,000 word essays in response to some bozo/troll on a mailing list who posts there is no global warming, or that Linux sucks, or whatever? Those people have been captured by Democratic Futilism.

Democratic Futilism arrives after one has realized that his voice means almost nothing in a Democracy -- hence the name -- but he believes his opinion is True and Correct. The ignorant masses (at least, he believes they are ignorant) will always outweigh his vote. And if he ever tried to mail your congressman, he'd surely get back a form letter and the message would be safely ignored (see: point one, ignorant masses/vote).

In being overwhelmed by the majority, a Democratic Futilist must try his hardest to convince everyone he are right, in whatever forum is available, even in conversations where someone is obviously trolling. The internet... blogs, forums and mailing lists, are the perfect place to do this. Because if ever placed in this debate face to face, the Futilist's adversary would likely cry uncle "I was just kidding" or "Forget about it, you were right" after the first paragraph of Googled facts the Futilist had dug up. But on the Internet, they can just go on and on and on, debating a point to futility.

Futilists are almost always men.

And if society ever changed, the Futilist would believe that the seed they planted was part of it. That's what keeps them typing, typing.... typing.... like I am right now.

Saturday, May 19, 2007

Wednesday, May 16, 2007

Powershell is the ultimate one-liner scripting language


Behold! XML parsing from the last post is now doing sub-expressions, type conversions and formatting all in one line.


$nav.Select("/Season/Games/Game") | select-object -first 5 | Format-Table -property @{Label="Date";Expression={[DateTime]::Parse($_.SelectSingleNode("Date").Value).ToShortDateString()};Width=10},@{Label="AwayTeam";Expression={$_.SelectSingleNode("AwayTeam/Name").Value};Width=15},@{Label="AwayScore";Expression={$_.SelectSingleNode("AwayScore").Value};Width=10},@{Label="HomeTeam";Expression={$_.SelectSingleNode("HomeTeam/Name").Value};Width=15},@{Label="HomeScore";Expression={$_.SelectSingleNode("HomeScore").Value};Width=10},@{Label="Winner";Expression={if([Int32]::Parse($_.SelectSingleNode("AwayScore").Value) -gt [Int32]::Parse($_.SelectSingleNode("HomeScore").Value)) { $_.SelectSingleNode("AwayTeam/Name").Value } else { $_.SelectSingleNode("HomeTeam/Name").Value }};Width=15}




Date AwayTeam AwayScore HomeTeam HomeScore Winner
---- -------- --------- -------- --------- ------
11/7/2006 Vermont 82 New Orleans 65 Vermont
11/7/2006 Hampton 75 Maryland 102 Maryland
11/8/2006 Hampton 74 New Orleans 73 Hampton
11/8/2006 Youngstown St. 74 Central Mich... 50 Youngstown St.
11/8/2006 Brown 34 Michigan St. 45 Michigan St.










Obviously, this script could really use some carriage returns.

What I like about this example is that it proves how much I can prototype using a command shell. This is something I've always loved about Python. Prototype a script in the interactive Python shell and once you've worked out exactly how you want to do something, copy your work into the full-fledged script. And as you write the script, all along you can test its inputs with the interactive shell.

Of course, shell scripts should be using sparingly, right? That's generally true, but I'm not sure how people will react to Powershell. The fact that it pipes objects around fixes a lot of the string-munging crap in regular old shell scripts. Remember when we started using Perl because otherwise we'd be writing sh that had a bunch of calls to awk in it? Perl was a response to all the things that people wanted to do with bash or ksh but it would be too ugly to do because of sed and awk.

As a shell language, the "PS1" language is otherwise pretty standard. I think two categories of people will feel right at home: unix shell scripters who now work on Windows and .NET junkies. I happen to come from both lineages.

Sadly, Powershell is not aimed at replacing automation done with VBS -- at least not easily. I have some VBS scripts I'd love to get rid of, but Powershell

  1. Doesn't let you run scripts unless you do a bunch of security settings
  2. Doesn't allow you to double click to run scripts.

Combined, these don't make PS very viable as a replacement for VBScript. Right now it's the kind of thing that you set up and configure only for yourself to use to save time. You can't distribute scripts to users and have a prayer without doing a bunch of additional busywork. One way to get around 1. is to sign scripts, but as one person replied to a blog elsewhere about signing powershell scripts, "How many people are really going to run Powershell in restricted mode for more than five minutes?" It's just not worth it if you have to go through a certificate rigmarole just to run a simple script.

Anyway, this first version is pretty promising. I can see myself using it to save some time here and there.

Tuesday, May 15, 2007

Using XPathDocument in a Windows Powershell script

PS C:\Users\Chris> $xdoc = new-object -typename System.Xml.XPath.XPathDocument -ArgumentList C:\Users\Chris\Documents\basketball.xml

PS C:\Users\Chris> $nav = $xdoc.CreateNavigator()

PS C:\Users\Chris> $nav.Select("/Season/Games/Game/AwayTeam/Name") Format-Table -property Value

Value
-----
Vermont
Hampton
Hampton
Youngstown St.
Brown
Vermont
Brown
Chicago St.
Youngstown St.
Alcorn St.
Alabama A&M
South Dakota St.
Pennsylvania
Loyola Chicago
Army
UAB
Davidson
Loyola MD
Monmouth
Eastern Illinois
Alcorn St.
Montreat
Mount St. Mary's
George Washington
Defiance
New Hampshire
Wofford
American
Stony Brook
Howard
Asbury
Lafayette

Saturday, May 12, 2007

Trimbo's Classic Commercials: Joe Isuzu

There are funnier ones (the "faster than a speeding, well, you know," spot is my favorite)



Friday, May 11, 2007

Sting's Lyrics

How did Sting's lyrics ever get so lame?

Take "Desert Rose", from a few years ago:


I dream of rain
I dream of gardens in the desert sand
I wake in pain
I dream of love as time runs through my hand

I dream of fire
These dreams are tied to a horse that will never tire
And in the flames
Her shadows play in the shape of a man's desire

This desert rose
Each of her veils, a secret promise
This desert flower
No sweet perfume ever tortured me more than this



Compare and contrast to "Synchronicity II"


Another suburban family morning
Grandmother screaming at the wall
We have to shout above the din of our Rice Crispies
We can't hear anything at all
Mother chants her litany of boredom and frustration
But we know all her suicides are fake
Daddy only stares into the distance
There's only so much more that he can take
Many miles away
Something crawls from the slime
At the bottom of a dark Scottish lake

Another industrial ugly morning
The factory belches filth into the sky
He walks unhindered through the picket lines today
He doesn't think to wonder why
The secretaries pout and preen like
cheap tarts in a red light street
But all he ever thinks to do is watch
And every single meeting with his so-called superior
Is a humiliating kick in the crotch
Many miles away
Something crawls to the surface
Of a dark Scottish lake

Another working day has ended
Only the rush hour hell to face
Packed like lemmings into shiny metal boxes
Contestants in a suicidal race
Daddy grips the wheel and stares alone into the distance
He knows that something somewhere has to break
He sees the family home now looming in the headlights
The pain upstairs that makes his eyeballs ache
Many miles away
There's a shadow on the door
Of a cottage on the shore
Of a dark Scottish lake
Many miles away, many miles away



There's some LYRICS for ya. Whatever angst that drove Sting to write lyrics must be long, long gone. It's no wonder the Police are touring again.... those new songs are getting him nowhere fast.

Thursday, May 10, 2007

How come Zune plays M4A files and Windows Media Player does not?

They're practically the same app. It's pretty clear that Zune is just a new skin over Windows Media Player (WMP), right? So why is it that WMP doesn't play M4A files, but the Zune player does? Why would you leave M4A out of Windows Media Player anyway?

Sometimes I just have to wonder who at Microsoft makes decisions like this.

Tuesday, May 08, 2007

JavaFX vs. Flash vs. DHTML vs. Silverlight

It's becoming a bit saturated in the "Web 2.0" space right now, as Sun announced a new UI framework called JavaFX today. The UI language/compiler is new, but it runs on the same old JRE with Java Web Start.

Installed base: Sun definitely has the installed base to try this. Java is available on 75% of browsers or something like that (as opposed to Flash, which is around 85%, and Javascript, which is more like 98%). I still can't figure out if JavaFX actually runs in a browser though. All of their examples use Java Web Start. Microsoft has a tougher task. Sure, IE is on everyone's desktop, but how many people have Silverlight or .NET 3.0 installed at this point? Whatever that number is, it's almost exactly the same number of people that are running Vista. Still, it takes only one popular site to use this stuff to get it going for any of these technologies.

Appeal to devs: I think the appeal of Silverlight and Java FX is that they're using the same tech that the server side is using. This is why they're going to get some momentum. Flash and Javascript gurus are in short supply. Being able to code an end-to-end solution in Java or C# is very appealing. Plus, the development tools for AJAX/DHTML are so poor that everyone has started writing server side wrappers around the stuff to make it not suck.

Memory footprint: If you haven't noticed that Java has an absolutely ginormous memory footprint, you've never used it. Running the test app for Java FX, Java FX Pad, takes 65 megs of RAM on my machine -- and that's one canvas and one textbox. Granted, I think most of that is the runtime, but it launches a javaw.exe runtime for every app. So when I launched another demo off of their website, another 65 megs.

More random memory stats (all IE7 tests utilized a relaunch before loading website):
  • IE7 on startup at "iGoogle" home page: 8640k
  • javaw.exe running Tesla website demo: 55800k
  • IE7: Actual Tesla website in IE7 (Flash, DHTML etc): 29156k
  • Silverlight Microsoft.Com demo, after clicking on Products: 30136K
  • The real Microsoft.com (DHTML), after clicking on Products: 27740k
  • IE7: gmail.com inbox (AJAX, DHTML): 36064k
  • IE7: Yahoo Mail Beta inbox (AJAX/DHTML): 40600k
  • IE7: Hotmail light (very little Jscript): 18948k
  • Windows Mail in Vista and a full inbox: 7424k

So there you have it: Win32 wins again. Actually I think a lot of this, except Gmail and Javaw, can be attributed to imagery. That's probably why there was very little difference between Silverlight and the real Microsoft.com.

Dev tools: For Flash, you've got... Flash. For DHTML/AJAX you've basically got notepad or XEmacs, unless you're using something like GWT. For Java FX we've got netbeans with no UI designer, and for Silverlight we've got Visual Studio Orcas with a designer. I think we know who wins this battle.

Brand Name: Flash is very indentifiable at this point. So is Java, but I hate the name Java FX. Some marketing guys with little ponytails, cooped up in Sun Quentin for too long, must have come up with that name. Or they must have thought the "WinFX" code name for WPF was a good idea (not that WPF was a good name... it's too close to "WTF"). Silverlight's a pretty good name, but it reminds me of Clearsilver. Javascript and DHTML have no brand name, people don't know what they are and often confuse them with Java (+1 to Sun on that one).

Early call: First off, I just don't see the bizarro Flash apps taking over... ever. I've seen good Flash UIs very rarely, it's mostly good for crappy video, annoying advertising and for stupid flash movies. Java FX and Silverlight have a chance, but I think it's going to take a killer website to get it rolling. Microsoft is fortunate to have a built-in audience, and Sun is fortunate to have millions of Java developers who adopt every framework ever made for the language.

My take: We're still headed towards JITted Javascript, my friends. It's an ugly, ugly future.

Saturday, May 05, 2007

Vista on a Mac Mini -- a power consumption comparison

Yesterday on Slashdot there was an article about Vista's Aero Glass draining battery on laptops faster (to which I say, that should be on the front page of Slashdot?)

In any case, one commenter brought up the point of wondering whether MacOS X uses less or more power than Vista. Today, using my new Mac Mini (which runs Vista 99.9% of the time) and trusty Kill-A-Watt, I did some very unscientific tests.

Idle w/no apps open

Vista Aero glass: 21w
Vista Basic theme: 17w
MacOS X (Finder): 23w
MacOS X (login screen): 26w

Bottom line, you should not get any better battery life by using MacOS X over Vista. In fact, you can get better battery life with Vista because you can turn off Aero glass, but on MacOS X, you cannot turn off transparency/gpu effects.

Just for kicks, I wanted to find out what the Mac Mini consumes when doing some processing:

Folding @ Home

Vista: 56w
MacOS X: 59w


I turned on my old, very loud machine (2.8ghz Northwood P4), and ran the same tests (using Windows XP)

Idle: 109w
Folding @ Home: 165w

BTW, my 20" Dell LCD monitor? 48 watts. Turn off those monitors when you're not around, folks!

Tuesday, May 01, 2007

How to crash Windows Explorer in Vista in two steps

1) Find two Zip files.
2) Quickly right click on each and do "Extract all..." (uncheck the box that says "Show me the uncompressed files).

I just did it twice in a row on two different zip files. Once this just gave me the "Explorer has stopped working" dialog. The second time, it crashed spectacularly with a "C++: pure virtual function call" dialog and had to be restarted by hand from Task Manager.

Edit: Also, why is it, when I actually get built-in unzip working, it only unzips at something like 16 bytes per second? Has anyone at Microsoft actually verified the usefulness of their built-in zip utility, or are they in cahoots with Winzip/afraid of legal action? What they've got in there now is worse than useless.