<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>stephenwoods.net</title>
	<atom:link href="http://stephenwoods.net/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://stephenwoods.net/wordpress</link>
	<description>Wherein I discuss whatever</description>
	<pubDate>Wed, 11 Jun 2008 20:00:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Is Apple the next Microsoft?</title>
		<link>http://stephenwoods.net/wordpress/2008/06/11/is-apple-the-next-microsoft/</link>
		<comments>http://stephenwoods.net/wordpress/2008/06/11/is-apple-the-next-microsoft/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 20:00:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[apple]]></category>

		<category><![CDATA[att]]></category>

		<category><![CDATA[iphone]]></category>

		<category><![CDATA[open]]></category>

		<category><![CDATA[paranoia]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/?p=59</guid>
		<description><![CDATA[To answer my rhetorical question: maybe. The difference (for now) is that I actually like the products apple makes, so I am not too upset by apple&#8217;s somewhat insane approach to locking down the iphone.
This random person is concerned that the reason there is no flash on the iphone is that apple is afraid of losing [...]]]></description>
			<content:encoded><![CDATA[<p>To answer my rhetorical question: maybe. The difference (for now) is that I actually like the products apple makes, so I am not too upset by apple&#8217;s somewhat insane approach to locking down the iphone.</p>
<p>This <a href="http://smoothspan.wordpress.com/2008/06/11/is-the-iphone-application-store-the-problem-for-adobe-flash/">random person</a> is concerned that the reason there is no flash on the iphone is that apple is afraid of losing revenue to AIR apps:</p>
<blockquote><p>What does this have to do with Adobe Flash and the fact I can’t get it on my iPhone?  Somewhere, I read that the SDK prohibits you from placing an interpreter on the iPhone.  That’s when the light bulb went off.  Flash is an interpreter.  Why would Apple care?&#8230;Putting it into Apple’s terms, if they let Flash onto the iPhone, you pay them once for that application, and then you’ll have a backdoor through which any Flash/Flex application can gain entry without having to pass through the Application Store.  It’s a revenue leak of biblical proportions, and one the market would be sure to exploit.</p></blockquote>
<p>Apple may well be pursuing a Gillette approach with the app store, but I find this unlikely. First, this assumes they are going to sell the iPhone 3G at a loss. They aren&#8217;t, the carriers are taking the loss and making the profit on the two year contract (apple gave up the old rev share so the carriers could be sure to make money on that deal).</p>
<p>Second, the Gillette model works like this: sell the razor at a loss, make your profit on blades. In that model if someone else could sell blades that work on your razor it would break your business model. The reason the new activation scheme is much stricter is that unlockers will break the business model of the <em>carriers</em>, not apple. If you walk off with a phone but don&#8217;t sign up for service AT&amp;T is out $200 (or whatever the subsidy is).</p>
<p>Apple cares about unlocking not to protect their business (after all, you bought the phone so they got your money already) but to protect the business of the carriers. If the carriers felt the phone was a loser they would do what they could to stop it from selling hurting apple&#8217;s sales. </p>
<p>I don&#8217;t know if apple really prevents you from writing an interpreter. But if they do its not because they are afraid of losing revenue from app sales, but because they are worried about people writing VOIP apps that run over 3G&#8211;something AT&amp;T is really concerned about (stupidly, in my opinion, but there you are). If you can install a VM on the iphone you can run VOIP past all the safeguards they probably installed. Apple is protecting AT&amp;T and the other carriers. Believe me, they aren&#8217;t afraid of all the awesome AIR apps people are going to write. They are afraid of pissing off the carriers.</p>
<p>The iphone is locked down. It always will be. But I don&#8217;t think the app store is supposed to be a huge revenue generator for apple. Its supposed to be away to encourage people to buy iphones, which is where apple makes their profit. If you don&#8217;t like it, don&#8217;t develop for it and don&#8217;t use it.</p>
<p> </p>
<p>Or, even better, write web apps! Web apps will run on iphone, android, winmo, blackberry et al&#8230;.vendor lock in be damned.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/06/11/is-apple-the-next-microsoft/feed/</wfw:commentRss>
		</item>
		<item>
		<title>EvilScript: Download it now!</title>
		<link>http://stephenwoods.net/wordpress/2008/05/05/evilscript-download-it-now/</link>
		<comments>http://stephenwoods.net/wordpress/2008/05/05/evilscript-download-it-now/#comments</comments>
		<pubDate>Tue, 06 May 2008 06:53:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/?p=57</guid>
		<description><![CDATA[So I have cleaned up EvilScript, now a full featured downloadable thing. Its actually basically one function, about 30 lines. It allows you to write JS in a &#8220;classical&#8221; style, if thats your thing. The name &#8220;EvilScript&#8221; should give you an idea how I feel about the idea, but I spent this evening cleaning this [...]]]></description>
			<content:encoded><![CDATA[<p>So I have cleaned up EvilScript, now a full featured downloadable thing. Its actually basically one function, about 30 lines. It allows you to write JS in a &#8220;classical&#8221; style, if thats your thing. The name &#8220;EvilScript&#8221; should give you an idea how I feel about the idea, but I spent this evening cleaning this up, so enjoy. Download <a title="evil javascript" href="http://stephenwoods.net/evil.js">the minified file here</a>.</p>
<p>Using this is really simple. No support for public/private methods, but this is really just object cloning with inheritance:</p>
<pre>
var vehicle = {

		_init:function(){
			console.log('vi');
		},

		numwheels:0,

		running:false,

		start:function(){
			this.running = true;
		},

		stop:function(){
			this.running = false;
		},

		isRunning:function(){
			return this.running;
		},

		setWheelNum:function(num){
			this.numwheels = num;
		},

		getWheelNum:function(){
			return this.numwheels;
		}
	};

	var car = {
		extend:vehicle,

		_init:function(fueltype){
			this.fueltype = fueltype;
		},

		fueltype:'',

		getFuelType:function(){
			return this.fueltype;
		}

	};

	var myVehicle = evil.alloc(vehicle);

	var myCar = evil.alloc(car, ['unleaded']);

		log(myVehicle.isRunning());

		myVehicle.start();

		log(myVehicle.isRunning());

		log('<strong>Car:</strong>&#8216;);
		log(&#8217;fuel: &#8216;+ myCar.getFuelType());
		log(myCar.isRunning());

		myVehicle.start();

		log(myCar.isRunning());
</pre>
<p><span id="more-57"></span></p>
<pre>
var evil = function(){

	/**
	* clone method copies objects
	* @param object o
	* @method c
	* @return {void}
	*/
	function c(o){
		var F = function(){};
		F.prototype = o;
		return new F();
	}

	return {	

		/**
		* intantiate a new class,
		* @method alloc
		* @param Object o
		* @param Array args
		* @return Object o
		*/
		alloc:function(o, args){
			if(o.extend !== undefined){
				var ex = this.alloc(o.extend);
				var tmp = c(o);
				for(x in tmp){
					ex[x] = tmp[x];
				}
				o = c(ex);
			}else{
				o = c(obj);
			}

			if(args){
				o._init.apply(o, args);
			}

			return o;
		}
	};
}();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/05/05/evilscript-download-it-now/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Twitter flies off the rails</title>
		<link>http://stephenwoods.net/wordpress/2008/05/01/twitter-flies-off-the-rails/</link>
		<comments>http://stephenwoods.net/wordpress/2008/05/01/twitter-flies-off-the-rails/#comments</comments>
		<pubDate>Fri, 02 May 2008 06:23:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[fads]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/?p=56</guid>
		<description><![CDATA[According to noted internet pundit Arrington twitter has made the call to rewrite and move off ruby on rails. Not really a shock, rails is fundamentally not going to scale up past a certain point.
The uncharitable part of me (and the part that is confident nobody reads this blog) thinks that the vast majority of [...]]]></description>
			<content:encoded><![CDATA[<p>According to noted internet <a href="http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/">pundit Arrington</a> twitter has made the call to rewrite and move off ruby on rails. Not really a shock, rails is fundamentally not going to scale up past a certain point.</p>
<p>The uncharitable part of me (and the part that is confident nobody reads this blog) thinks that the vast majority of rails developers have never been around the kind of scale we&#8217;re talking about when we say rails doesn&#8217;t scale. Especially when I see something like this:<br />
<img src="http://www.techcrunch.com/wp-content/railseasy.jpg" alt="Image from a slide show: Scaling rails is easy" /></p>
<p>I love that items 2, 4 and 5 are REALLY REALLY hard.</p>
<p>More likely though those developers haven&#8217;t faced an app that is  particularly hard to scale. I think the issue is less &#8220;does my framework scale&#8221; and more &#8220;is my application going to be hard to scale&#8221;.</p>
<p>Twitter is a great example of the kind of app that is very hard to scale, regardless of the platform. Rails is probably not the culprit here, but I doubt it is helping at all. In fact, at this point I would suspect twitter will do what everyone ends up doing when this happens: php frontend talking to a web service driven by java (or c). Because it turns out when the problems get real hard you don&#8217;t want a scripting language to handle them.</p>
<p>Rails isn&#8217;t bad, but it is isn&#8217;t &#8220;easy&#8221; to scale, except in cases where the application is easy to scale (content). Rails is designed by small, custom app developers for small developers. It provides one major benefit: it makes it faster to develop a certain class of applications. Thats it. So if time is money (you are a small dev shop) rails will make you money. Otherwise rails give you very little. I don&#8217;t think it would be a bad choice for most apps, but I don&#8217;t think its the panacea many rails advocates would claim. </p>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/05/01/twitter-flies-off-the-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Interesting</title>
		<link>http://stephenwoods.net/wordpress/2008/04/30/interesting/</link>
		<comments>http://stephenwoods.net/wordpress/2008/04/30/interesting/#comments</comments>
		<pubDate>Thu, 01 May 2008 05:28:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/?p=55</guid>
		<description><![CDATA[Why aren&#8217;t their any aliens?.
]]></description>
			<content:encoded><![CDATA[<p>Why<a href="http://www.technologyreview.com/Infotech/20569/page1/?a=f"> aren&#8217;t their any aliens?</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/04/30/interesting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Possibly evil classical inheritance in Javascript</title>
		<link>http://stephenwoods.net/wordpress/2008/04/21/possibly-evil-classical-inheritance-in-javascript/</link>
		<comments>http://stephenwoods.net/wordpress/2008/04/21/possibly-evil-classical-inheritance-in-javascript/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 17:52:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/04/21/possibly-evil-classical-inheritance-in-javascript/</guid>
		<description><![CDATA[Instead of doing my work like I should, I have come up with a possibly very evil pattern to implement classical inheritance in Javascript. I&#8217;m sure this has been posted somewhere before, or written in a book or something, but I may as well put it out there myself.
The idea is to use object literals [...]]]></description>
			<content:encoded><![CDATA[<p>Instead of doing my work like I should, I have come up with a possibly very evil pattern to implement classical inheritance in Javascript. I&#8217;m sure this has been posted somewhere before, or written in a book or something, but I may as well put it out there myself.</p>
<p>The idea is to use object literals like you would use classes, using a clone technique to create new instances based on the classes. That way each &#8220;instance&#8221; of the class is a separate javascript object, with no dependence on other objects. Goes faster, uses less memory. I added a tiny amount of sugar to allow for extending superclasses, making &#8220;static&#8221; clones of objects and using a constructor. I don&#8217;t vouch for the performance or the non-harmfulness of this pattern.</p>
<p>With this pattern you can actually make a class like this:</p>
<pre>
	var myClass = {

		memberVar:'',

		_construct:function(args){
			this.memberVar = args.str;
		},

		sayHi:function(str){
			alert(str);
		}

	};
</pre>
<p>Then you can instantiate this using a pretty simple function I wrote (which I will show later):</p>
<pre>
	var args = {str:'mystring'};

	//syntax for makeNew:
	//	makeNew(obj myClass, bool static, obj args)

	var myObj = makeNew(myClass, false, args);

	myObj.sayHi('foo'); //result: "foo"
</pre>
<p>After the jump, extending superclasses:</p>
<p><span id="more-54"></span></p>
<p>To extend objects I set it up so you could have an &#8220;extend&#8221; member in the class, with a pointer to the class (object) you want to extend:</p>
<pre>
	var mySubClass = {

		extend:myClass,

		sayHello:function (){
			this.sayHi(this.memberVar);
		}
	}

	var args = {str:'mystring'};
	var myObj = makeNew(myClass, false, args);
	var myObj1 = makeNew(mySubClass, false, args);

	myObj.sayHi('foo'); //result: "foo"
	myObj1.sayHello(); //result: "mystring"
</pre>
<p>Magic! You can chain objects as long as you want. The parent constructor is called by default, unless you specifically overwrite it in the child classes. The magic all happens in my &#8220;makeNew&#8221; function, which isn&#8217;t really read for more than a proof of concept, so use at your own risk:</p>
<pre>
//instantiate
var makeNew = function(obj, stat, args){
	var s = stat || false;
	var extend = false;
	function F(){};

	if(obj.extend !== undefined){
		//yes, this is recursive, to support multiple inheritence
		extend = makeNew(obj.extend, true);
	    F.prototype = extend;
	}else{
		F.prototype = obj;
	}

	var clone = new F();

	//If we are extending, we clone the base class and add
	//our methods to it.
	if(extend){
		for(item in obj){
			clone[item] = obj[item];
		};
	}

	//If this is static, don't execute the constructor
	if(s !== true){

		try{
			clone._constructor(args);
		}catch(e){
			console.log(e);
		}
	}
	return clone;
};
</pre>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/04/21/possibly-evil-classical-inheritance-in-javascript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Your Favorite Language Sucks</title>
		<link>http://stephenwoods.net/wordpress/2008/04/19/your-favorite-language-sucks/</link>
		<comments>http://stephenwoods.net/wordpress/2008/04/19/your-favorite-language-sucks/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 02:51:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[fads]]></category>

		<category><![CDATA[haxorz]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[politics]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/04/19/your-favorite-language-sucks/</guid>
		<description><![CDATA[I&#8217;ve noticed at the few events I go to that have a lot of consultants running around that the de-facto standard for freelance developers has become Ruby on Rails. I think this is very sensible actually, because Rails was written by and for these kinds of people, where getting something that works well enough running [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed at the few events I go to that have a lot of consultants running around that the de-facto standard for freelance developers has become Ruby on Rails. I think this is very sensible actually, because Rails was written by and for these kinds of people, where getting something that works well enough running in the shortest amount of time possible is the name of the game. Rails (and the subset of ruby rails uses) has also exposed a lot of people to objected oriented concepts that have been around for a while. And the rails implementation is a really good one to wrap your brain around how and why object oriented design is useful.</p>
<p>That said, the one thing that annoys me about this whole thing (and a lot of the webdev blogosphere) is that a vocal subset of rails people are religious about it. They like to come into any situation and immediately begin advocating for why rails is magic and should be adopted for everything. This of course has nothing to do with rails itself, which as far as I can tell never claims to be anything other than what it is: a rapid application development framework. By rights it should be putting the competition (mostly .net) out of business: its probably the best RAD framework out there. But it isn&#8217;t good for everything.</p>
<p>Backend work at yahoo tends to be written in c++ or java. Much more time consuming for development, but necessary to support the kind of scale our applications need. Frontend work is done in php, but not because php is super-awesome. Rather, php is easily extended with compiled extensions, is quite fast and flexible for the front end and is easy enough for experienced developers to get up to speed with.</p>
<p>There have been some attempts to get rails going at yahoo, with mixed results. The fact is that for a company with thousands of developers, a robust platform and massive scale rails doesn&#8217;t have much to offer. That&#8217;s because its the wrong tool for the job. Not because it is the sux0rz, or because php/java is the roxorz. Its because any competent developer should be able to get the job done in any language, provided its the right tool for the situation.</p>
<p>If you need to write a run of the mill database-driven application and get it done yesterday, rails is the tool for you. If you have microsoft servers and need to do the same, asp.net is probably the tool for you. If you have microsoft servers, lot of time and expertise you should probably through out the asp.net framework and write your own thing in c# for the .net run time. If you are yahoo, google, amazon or aspire to be you should decouple your frontend from your backend, write your front end in a nice template-focused language like PHP or python and design a nice REST interface for the backend, implented however (even rails if you like) with the understanding that as you grow you might need to replace the backend.</p>
<p>At least, thats my opinion. Others have succeeded with any old stack. Wikipedia is pure LAMP, amazon is JSP on the frontend and twitter runs on rails. That&#8217;s probably strong evidence that it doesn&#8217;t even matter that much what you use, as long as you design the thing to solve your problem. The rest is just details.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/04/19/your-favorite-language-sucks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The horrors of transit.511.org</title>
		<link>http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/</link>
		<comments>http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 08:36:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/</guid>
		<description><![CDATA[If you live in San Francisco, like I do, you often have to suffer at the whims of the SF Muni. Tragically, the very useful transit.511.org trip planner is almost totally useless on a mobile phone (excepting perhaps the iphone, but it is still very heavy), the place it would be most useful. Quickly looking [...]]]></description>
			<content:encoded><![CDATA[<p>If you live in San Francisco, like I do, you often have to suffer at the whims of the SF Muni. Tragically, the very useful <a href="http://transit.511.org/" title="TakeTransit trip planner">transit.511.org trip planner</a> is almost totally useless on a mobile phone (excepting perhaps the iphone, but it is still very heavy), the place it would be most useful. Quickly looking at 511, it seems like the reason its so frustrating on phones (and the web really) is its very complex markup that breaks on most mobile browsers, and its unnecessarily heavy page design.</p>
<p>In response, I decided to start making a <a href="http://mobile.yahoo.com/developers" title="Yahoo! Mobile Widgets">Yahoo Mobile Widget </a> for the trip planner. Of course the first step was to look up the 511.org api. Well, it turns out they don&#8217;t have an api, which seems insane to me, there app is the simplest front-end on a db, an api would be a no-brainer. So this week in my spare time I worked up a simple api that scrapes the pages at 511.org.</p>
<p>The result of my work is this <a href="http://stephenwoods.net/muni" title="Super Muni!">very simple interface</a> to the 511 site. You can specify JSON or XML as the response format, but please don&#8217;t try and make any apps on this api yet, I plan to do more work on this to great a real transit.511.org web service, which is something that is very needed. I might also make a more useful UI on the web version, because</p>
<p>Feedback and suggestions? Leave them in the comments. I am planning on having the widget in the gallery some time in the next couple weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Version of IE that Doesn&#8217;t Suck?</title>
		<link>http://stephenwoods.net/wordpress/2008/03/06/a-version-of-ie-that-doesnt-suck/</link>
		<comments>http://stephenwoods.net/wordpress/2008/03/06/a-version-of-ie-that-doesnt-suck/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 07:54:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[borg]]></category>

		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/03/06/a-version-of-ie-that-doesnt-suck/</guid>
		<description><![CDATA[I have been playing with IE8 tonight. And I have to say that I am very impressed with what microsoft has done. They seem to be serious about a standards compliant browser this time (bugs not withstanding, but its beta 1, so they get a pass). 
They fixed the 2 domain thing, and added some [...]]]></description>
			<content:encoded><![CDATA[<p>I have been playing with <a href="http://ajaxian.com/archives/ie-8-better-ajax-css-dom-and-new-features" title="Read the ajaxian post" >IE8</a> tonight. And I have to say that I am very impressed with what microsoft has done. They seem to be serious about a standards compliant browser this time (bugs not withstanding, but its beta 1, so they get a pass). </p>
<p>They fixed the 2 domain thing, and added some cool features that I hope other browsers pick up soon (XDR: cross domain request!). Better browser history control, and actually best of all they added two new features that the old microsoft would have crippled: <a href="http://www.microsoft.com/windows/products/winfamily/ie/ie8/webslices.mspx" title="some marketing crap from microsoft">Slices</a> and activities. Slices allows developers to add modules that can be pulled off (a bit like dashboard), except the slices are defined by the developer. The bad old microsoft would have made this some horrid non-standard thing that required active x. The new, kinder MS has decided to go with a MICROFORMAT. A completely standards compliant microformat. The kind of microformat anyone will be able to parse. If I felt like it I could probably whip up support for webslices in firefox tonight, its that simple. And it won&#8217;t break on other browsers because its just done with html classnames.</p>
<p>Well done Microsoft, I hope this is a sign of things to come. (but silverlight? really? come on!)</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/03/06/a-version-of-ie-that-doesnt-suck/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Who should web developers vote for? Pt 1.</title>
		<link>http://stephenwoods.net/wordpress/2008/03/04/who-should-web-developers-vote-for-pt-1/</link>
		<comments>http://stephenwoods.net/wordpress/2008/03/04/who-should-web-developers-vote-for-pt-1/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 08:30:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[css]]></category>

		<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/03/04/who-should-web-developers-vote-for-pt-1/</guid>
		<description><![CDATA[So, there is an election going on. As a public service to my fellow webdevs, I decided to look at the candidates and judge them based on the only metric that matters: the quality of their frontend code.Because tomorrow will (maybe) decide which democrat will be the nominee, I will wait for part 2 and [...]]]></description>
			<content:encoded><![CDATA[<p>So, there is an election going on. As a public service to my fellow webdevs, I decided to look at the candidates and judge them based on the only metric that matters: the quality of their frontend code.Because tomorrow will (maybe) decide which democrat will be the nominee, I will wait for part 2 and make this post the McCain post.</p>
<p>So, if you search for McCain in google and click through you are redirected to a landing page (only in Google, not any other search engine, more on this below). Actually, thats not true. FIRST you actually have to load a bunch of crap on johnmccain.com, because this is not a 301 redirect, its a JAVASCRIPT redirect, called in a script tag some ways down the page:<br />
<span id="more-49"></span></p>
<p><code><br />
if (document.referrer.indexOf('www.google.com') != -1)<br />
	{<br />
	window.location = 'http://www.johnmccain.com/landing/?sid=gorganic'<br />
	}<br />
</code></p>
<p>This wonderful script makes sure google searchers see a landing page instead of the normal home page. I don&#8217;t know why users of other search engines don&#8217;t get a landing page, but oh well.</p>
<p>Anyway, because this script happens in the body, after the header which contains some js and css files, <em>before</em> I get sent to this handy splash page, I have to load:<br />
1 107k html file<br />
One 25k css file<br />
and five javascript files, plus one js file that returned a 404 error.</p>
<p>NONE of which I even see, because the JS redirects the page. People: never do this. Never, ever do this. Making people load a bunch of files for no reason is not a good idea.If you are going to make a landing page and you have to do a redirect do it in the headers, not in javascript. (in fact, why don&#8217;t you not use javascript for redirects at all?) I this case they seem to be using a clever &#8220;plain html&#8221; homepage, presumably as an optimizing strategy to take load of the asp.net app that runs johnmccain.com. Maybe, I don&#8217;t know.</p>
<p>Anyway, here is the landing page (as seen in firefox on mac):</p>
<p><a href="http://www.flickr.com/photos/protohiro/2299873090/" title="mccainsplash.jpg by protohiro, on Flickr"><img src="http://farm4.static.flickr.com/3184/2299873090_79bcdbdea8_o.jpg" width="400" height="263" alt="The simple splash page on johnmccain.com" /></a></p>
<p>Hmmm. Beautiful. I won&#8217;t comment on those oh-so-cool 3d buttons. But I do want to draw you attention to this:</p>
<p><a href="http://www.flickr.com/photos/protohiro/2299077253/" title="mccainzoom.jpg by protohiro, on Flickr"><img src="http://farm4.static.flickr.com/3054/2299077253_40d3ceec78_o.jpg" alt="Image is misaligned" height="112" width="352" /></a></p>
<p>This is why you test in multiple browsers people. Maybe I am being too harsh, but having your page appear this broken in Firefox is unacceptable. Now, to be fair, css is hard to make work across multiple browsers, which must be why for this page they chose to not use css. That&#8217;s right, this page comes to you straight from 1997. Check out this flashback snippet of code:</p>
<p><code><br />
&lt;td&gt;&lt;font size=&quot;2&quot; face=&quot;Arial, Verdana, Geneva&quot; color=&quot;#ffffff&quot;&gt;<br />
&lt;center&gt;Paid for by John McCain 2008&lt;br&gt;&lt;a href=&quot;http://www.johnmccain.com&quot;&gt;www.JohnMcCain.com&lt;/a&gt;<br />
&lt;/center&gt;<br />
&lt;/span&gt;<br />
&lt;/td&gt;<br />
</code></p>
<p>In case you were wondering: no, there was no start tag for the span. Now, this would be a very serious web dev crime: tables, sliced images, font tags and the dreaded &#8220;center&#8221; tag. But this is not the biggest problem with this page. No, the biggest problem with this page is the fact that the very top of the file looks like this:</p>
<p><code><br />
&lt;span id=&quot;FlexSpaceControl1&quot;&gt;&lt;body bgcolor=&quot;#000000&quot;<br />
</code></p>
<p>Hmmm&#8230;I am reasonably sure that you cannot wrap a body tag with a span. Maybe this is some exotic doctype I have not yet encountered. Hard to tell without a DTD. And of course, I am only assuming this page is html. You can tell by the name of the span that this page comes from asp.net/VisualStudio, but I really thought that asp.net wouldn&#8217;t let you make a page this horrid.</p>
<p>Well, I need to wrap this up because its late and I am tired, perhaps I will get more energy to complain about this horror tomorrow.</p>
<p>I leave you with this link, the <a href="http://validator.w3.org/check?verbose=1&amp;uri=http%3A%2F%2Fwww.johnmccain.com%2Flanding%2F%3Fsid%3Dgorganic">w3c validator barfing all over this splash page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/03/04/who-should-web-developers-vote-for-pt-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows 7</title>
		<link>http://stephenwoods.net/wordpress/2008/02/07/windows-7/</link>
		<comments>http://stephenwoods.net/wordpress/2008/02/07/windows-7/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 21:24:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/02/07/windows-7/</guid>
		<description><![CDATA[Of course, I can&#8217;t say anything about the Microsoft deal, which is of course the #1 most popular conversation topic at
Yahoo right now. But, it has got me thinking (again) about that piece of crap operating system they make up in redmond. Now, I know there are a lot of super smart people up in [...]]]></description>
			<content:encoded><![CDATA[<p>Of course, I can&#8217;t say anything about the Microsoft deal, which is of course the #1 most popular conversation topic at<br />
Yahoo right now. But, it has got me thinking (again) about that piece of crap operating system they make up in redmond. Now, I know there are a lot of super smart people up in redmond working on windows, so I assume that the crappiness of windows comes from poor design decisions made early on (before things like security and multiple users were considered important for a desktop OS) and the nightmare of maintaining backwards compatibility. </p>
<p>So what is MS to do? It seems based on vista and recent news about SP1 that they have hit a wall with Windows NT, they can&#8217;t get the crappy out. So I propose its time to through it out and start over. Now, you can&#8217;t do that easily, but if you were here would be the goals of the project:</p>
<ul>
<li>multiuser from the ground up</li>
<li>support SMP to take advantage of multi-core processors</li>
<li>designed to be secure at the base level</li>
<li>preserve a &#8220;windows&#8221; user interface</li>
<li>POSIX compliant</li>
<li>backwards compatible</li>
<li>run on x86</li>
<li>Not be GPL</li>
</ul>
<p>So, that&#8217;s a really big project. But I propose microsoft do what apple did when facing this kind of project&#8211;go buy yourself a real operating system. And that operating system is SCO Unix. Now available at a bargain price. You would take SCO Unix, port a bunch of drivers, port the various .net/MIL/WPF stuff over to give it a windows interface. Now you have a secure os that runs on x86, has a windows interface, supports all the design goals but one and does not suck. And the good news about backwards compatible is that with modern, very fast processors (including those that support hypervisor) backwards compatibility can be maintained with a virtual machine, possibly using a very light version of the windows kernel.</p>
<p>Done and done.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenwoods.net/wordpress/2008/02/07/windows-7/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 3.160 seconds -->
<!-- Cached page served by WP-Cache -->
<!-- Compression = gzip -->