I don't want to get off on a rant here, but....

Avatar

Technology, Programming, Complaints, etc.

Impact of the New York Times

There's been much brew-ha-ha about the NY Times being in financial trouble, the death of newspapers, and print media in general.  For the last couple years, however, the Times has been doing some really great work with flash based visualizations that tie into their print articles, but obviously are available only the web.  So maybe the the death of the print newspaper doesn't mean that the big, well known papers will die. 

What really interests me is the stuff they've had coming out recently showing that they really are embracing the open concepts that are flourishing on the web.  Within a month they've announced Represent and the Congress API, two very cool usages of publicly available data that was previously only available in a mishmash of formats.  They're combining, enhancing, analyzing and promoting data in very new and innovative ways.

The Times moving in this direction seems to coencide with a growing call for "open government" which has seemed to start as a grassroots, web powered, effort and will hopefully take hold in the new administration.  It seems the Times is uniquely positioning itself within this new world order to become the seminal information source for computers and the autonomous world that it already is for humans.  This is a very interesting direction for the Times to take and I'm not sure if it's officially supported from the top.  It seems that it either has to be getting discussed in the top echolons or the IT group has a huge amount of freedom to make very bold moves and think well outside the existing dead tree based box.  Either way it's the kind of agility and/or forward thinking that could make the Times the Queen of the new web news world.

Clogging the Tubes

"Oh shit," he mumbled. "I just broke the Internet."  Wired has an article on the big DNS flaw.  There's been lots of technical re-hashing of this, but I just thought the quote was funny

Internet Explorer is a browser?

Back when Google Gears came out and they added Google Reader support it was great for riding the train, because I could take feed reading offline and spend time on the train catching up on my feeds.  This process went along swimmingly until I installed Firefox 3 beta and the initial public release.  Since the Gears version at the time wasn't Firefox 3 compatible I couldn't continue doing this and it wasn't worth it to me to hack the Gears version support, etc.  Jump forward several months and 2 or 3 trips without offline Reader and the Gears team released a version supporting 3.0 and I went to the web page to download it.  On the page it lists compatible browsers and when I read "Internet Explorer" I started laughing hysterically.  I never even considered the fact that I could use Gears in Internet Explorer to keep using the offline support. 

To me, Internet Explorer does not come up when enumerating web browsers installed on my machine.  Internet Explorer is the front end to the 1997 MS best practices lovefest vendor application I have to support and nothing more.  Even with the vendor product lock in I still go 1-2 weeks without ever having to open IE.  How do people survive on this half baked wanna be browser, and don't tell me they use IE7 or IE8 cause we all know they're just half backed circa 2008 and 2006 rather than 2001.

Before you take any cookies, don't forget to hand .Net the jar

When you are using the System.Web objects to make a HttpWebRequest in .NET to a page which sets a cookie via Set-Cookie header, and you can't access that cookie in the HttpWebResponse object's cookie collection.  This will make you angry, and confused.  
You'll dump the page contents and the headers to make sure you're loading the right page an passing the Set-Cookie header correctly.  Then you'll find this MSDN library post, and realize that if you don't give the Request a jar (CookieCollection) ahead of the firing GetResponse() .NET just throws your cookies on the floor.

So whenever you want the cookies don't forget:
req = HTTPWebRequest.Create(url);
req.CookiesCollection = new CookiesCollection();
req.GetResponse();

Why Microsoft never fails to piss me off

How can my Visual Studio compile fail because a file is locked by Visual Studio?

MS owns the OS
MS owns the IDE
MS owns the language
MS owns the compiler
MS owns the runtime

Is using an all MS stack somehow an unsupported combination?

App Engine adds SSL

Google announced SSL support for AppEngine applications, but currently it's limited to the appspot domain, which is understandable.  It would be very interesting and rather game changing if Google came up with a way to issue free certs to Google App domains, maybe startup or buy a Certificate Authority?

Chrome Dev Builds

When looking for a way to stop Chrome from opening PDFs in Adobe (bad enough) using the in browser plugin (even worse), I stumbled upon this page, which talks about running Dev builds of Chrome.  Using the Channel Chooser from Chromium you can choose to be notified when new Dev builds are available rather than new Beta builds.  Of course all the disclaimers apply, probably even buggier than betas, etc. etc.

My up-to-date Beta had me at: Chrome/0.2.149.30 Safari/525.13
The latest Dev update got me to: Chrome/0.3.154.0 Safari/525.19

Chrome's subtile security warning


Just in case the giant red screen wasn't enough for you when you click through the warning about a site not having a valid certificate you get the constant subtile reminder that something is not quite right.

Avoiding duplicate Event subsubscriptions

I've recently stumbled upon .Net Events, well re-stumbled since I obviously knew about them w.r.t. Web Forms, but they are a painful faded memory at this point, thanks to Monorail.  I really like .Net Events for writing code that can be super decoupled from infrastructure concerns like logging, as well as for objects that might need to relay status or other "events" to their parent without having to pass maintain a reference to the parent. 

The only real downside is if you subscribe multiple times to an event, += in C#, you get called multiple times when the Event fires.  I'm sure there's some upside to this in some convoluted usage scenario, but I sure can't think of it.  So I had written a bunch of helper methods to subscribe a given handler to a given event, but do it in a non-duplicate fashion.  As far as I can tell there's no way to ask the event who's subscribed in any meaningful way, at least w.r.t. dupe avoidance, so I just remove the handler before adding it:

handler -= value;
handler += value;

This was fine, but it required calling subEvent(handler); rather than using the default += method of associating a handler with an Event.  To get around this I found the this very handy post on stackoverflow.  This allowed me to handle the call to the duplicate prevention method from add, thereby keeping the normal sytax for Event handlers. 

The one gotcha here is you need the protected Event as well, because when you define the add, remove for your public Event you lose the ability to reference it like a normal Event. Some people have done more in-depth IL analysis of why, but for my purposes, I just use the protected Event when I want to throw it or otherwise use it so I don't get "The event "blah" can only appear on the left hand side of += or -=" errors

NVelocity object properties gotcha

I always manage to forget that NVelocity won't show regular class variables in views, it has to be a property or method for you to be able to pull it from the view.  Always waste a little time verifying the object is passed from the controller correctly, checking that the object isn't null in the view, etc. and then remember that I has to be a property or method.  It's always the last thing you think of.

Google Analytics is so Sept. 2nd 2008 at 1:59pm EST

Somebody needs to remind the Analytics team that Chrome isn't Safari ;)

Chrome has some super speedy Javascript

As the Dromaeo implementation of the SunSpider tests show, Chrome beats out Firefox 3's Javascript engine by some 247%.  Dromaeo implements a subset of SunSpider, but it's a pretty good indication of the relative abilities of a JS implementation.  It will be interesting to see what kind of performance improvements the JIT pieces implemented in Tracemonkey can provide for Firefox 3.1.

Google Chrome

Overall it's pretty slick, I like that it'll show it's memory usage vs. other browsers you have open, the interface would take some getting used to, and there's a ton of Firefox extensions that I don't know if I could live without.  The document inspector isn't bad but the JS debugging "console" window leaves a lot to be desired.

I'm impressed with the per process model, processes are very svelt and it seems like they were really able to get down to bare bones on the WebKit base.

But most importantly, "Stats for nerds" has to be the best phrasing of "Advanced" I've seen in a long time.
Stats for Nerds

Update: And when you kill a child process you get a pretty funny message and image in the tab:
process killed

New blog

Rather than mixing in technical posts with funny pictures and angry rants against Bush on my normal blog I've decided to start up a separate blog for overtly technical content.

Prev,