<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Angry Robots &#187; Geek2</title>
	<atom:link href="http://angryrobotsblog.com/category/geek2/feed/" rel="self" type="application/rss+xml" />
	<link>http://angryrobotsblog.com</link>
	<description>Because robots are everywhere, and they eat old people's medicine for fuel</description>
	<lastBuildDate>Wed, 21 Jul 2010 04:44:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Non-Badgeholder&#8217;s Guide to Fantastic Fest 2008</title>
		<link>http://angryrobotsblog.com/2008/09/16/the-non-badgeholders-guide-to-fantastic-fest-2008/</link>
		<comments>http://angryrobotsblog.com/2008/09/16/the-non-badgeholders-guide-to-fantastic-fest-2008/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 03:44:50 +0000</pubDate>
		<dc:creator>Math</dc:creator>
				<category><![CDATA[Film]]></category>
		<category><![CDATA[Geek2]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Link Roundup]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[fantastic fest]]></category>

		<guid isPermaLink="false">http://angryrobotsblog.com/?p=202</guid>
		<description><![CDATA[Fantastic Fest is so close I can taste it. But since it&#8217;s completely sold out, I feel kinda bad for folks who didn&#8217;t get badges in time. For them I&#8217;ve put together a list of publicly-accessible FF screenings and events. Check it out on Austinist.
]]></description>
			<content:encoded><![CDATA[<p>Fantastic Fest is so close I can taste it. But since it&#8217;s completely sold out, I feel kinda bad for folks who didn&#8217;t get badges in time. For them I&#8217;ve put together a list of publicly-accessible FF screenings and events. <a href="http://austinist.com/2008/09/16/_the_nonbadgeholders_guide_to_fanta.php">Check it out on Austinist</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://angryrobotsblog.com/2008/09/16/the-non-badgeholders-guide-to-fantastic-fest-2008/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Webmonkey Is Back</title>
		<link>http://angryrobotsblog.com/2008/05/30/webmonkey-is-back/</link>
		<comments>http://angryrobotsblog.com/2008/05/30/webmonkey-is-back/#comments</comments>
		<pubDate>Fri, 30 May 2008 15:44:36 +0000</pubDate>
		<dc:creator>Math</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Geek2]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://angryrobotsblog.com/2008/05/30/webmonkey-is-back/</guid>
		<description><![CDATA[If you learned to make websites during the late 90s dotcom boom, you definitely know about Webmonkey. The web design tutorial site got me through a lot of hard times in college, and I though I hadn&#8217;t really used it in a while I was still pretty bummed when it died in 2004.
Anyway, long story [...]]]></description>
			<content:encoded><![CDATA[<p>If you learned to make websites during the late 90s dotcom boom, you definitely know about Webmonkey. The web design tutorial site got me through a lot of hard times in college, and I though I hadn&#8217;t really used it in a while I was still pretty bummed when it died in 2004.</p>
<p>Anyway, long story short: <a href="http://www.webmonkey.com">Webmonkey is back</a>. It has apparently been acquired by Wired (hey&#8211;I just busted a rhyme!) and relaunched as a wiki. This makes my heart happy. (via <a href="http://www.veen.com/jeff/archives/000987.html">Jeff Veen</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://angryrobotsblog.com/2008/05/30/webmonkey-is-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Charlie Rose Talks to Charlie Rose About Technology</title>
		<link>http://angryrobotsblog.com/2008/05/25/charlie-rose-talks-to-charlie-rose-about-technology/</link>
		<comments>http://angryrobotsblog.com/2008/05/25/charlie-rose-talks-to-charlie-rose-about-technology/#comments</comments>
		<pubDate>Mon, 26 May 2008 02:42:42 +0000</pubDate>
		<dc:creator>Math</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Geek2]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://angryrobotsblog.com/2008/05/25/charlie-rose-talks-to-charlie-rose-about-technology/</guid>
		<description><![CDATA[Here.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.youtube.com/watch?v=LFE2CCfAP1o&#038;eurl=http://greg.org/">Here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://angryrobotsblog.com/2008/05/25/charlie-rose-talks-to-charlie-rose-about-technology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smart Vertical Centering Using CSS and Javascript</title>
		<link>http://angryrobotsblog.com/2008/02/16/smart-vertical-centering-using-css-and-javascript/</link>
		<comments>http://angryrobotsblog.com/2008/02/16/smart-vertical-centering-using-css-and-javascript/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 06:36:14 +0000</pubDate>
		<dc:creator>Math</dc:creator>
				<category><![CDATA[Geek2]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://angryrobotsblog.com/2008/02/16/smart-vertical-centering-using-css-and-javascript/</guid>
		<description><![CDATA[Here's the setup: I have a fixed-size div containing a flash movie. I want this flash movie to appear perfectly centered most of the time, but I also want it to respect the top of the page, so if a client's window is shrunk below the height of the movie, the top doesn't appear "cut off".]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been up for a while now wrestling with a seemingly simple problem&#8211;how do you vertically center a fixed-size DIV without allowing it to crawl off the top of the page? And it turns out that the solution was much simpler than I expected, so I initially looked right past it. It includes some JavaScript though, so it&#8217;s not right for everyone.</p>
<p>Here&#8217;s the setup: I have a fixed-size div containing a flash movie. I want this flash movie to appear perfectly centered most of the time (easily done using some simple CSS), but I also want it to respect the top of the page, so if a client&#8217;s window is shrunk below the height of the movie, the top doesn&#8217;t appear &#8220;cut off&#8221;.</p>
<p>The first step was to do the centering. Let&#8217;s say my div, called &#8220;content_container&#8221;, is 900px by 675px. This CSS will center it both horizontally and vertically:</p>
<p><em>#content_container {<br />
        position:absolute;<br />
	width:900px;<br />
	left:50%;<br />
        top:50%;<br />
	margin:-337px 0 0 -450px;<br />
}</em></p>
<p>Works! Unless, of course, the browser window is less than 675px high, in which case the div (while technically still centered) shifts off the top of the page. This is the issue.</p>
<p>My first instinct was to use Javascript to grab the coordinates of the div and make sure the top was at least zero. If it wasn&#8217;t, I&#8217;d set it to zero. And while that worked well for keeping the top from sliding off the page, it introduced a logic issue: once I set the top to zero, a test for &#8220;less than or equal to zero&#8221; is useless, and the div is stuck in one position. In other words, even if the user resizes their browser to an acceptable size, once the script fires the div will be stuck at the top.</p>
<p>After tinkering with it for like an hour, I realized that I&#8217;ve been taking the wrong approach. I don&#8217;t need to know the div&#8217;s position at all. All I need to know is whether or not the window is at least 675px high. If it&#8217;s not, I set the top to 337px (which, counting the negative margin, puts it at zero). If it is, I reset the top to 50%, and we have our centering back.</p>
<p>So first, I figure out the height of the window (adapted from <a href="http://www.howtocreate.co.uk/tutorials/javascript/browserwindow">this</a> handy bit of code, which is pretty browser-friendly all the way back to IE4):</p>
<p><em>function getWinHeight() {<br />
  var myHeight = 0;<br />
  if( typeof( window.innerWidth ) == &#8216;number&#8217; ) {<br />
    myHeight = window.innerHeight;<br />
  } else if( document.documentElement &#038;&#038; ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {<br />
    myHeight = document.documentElement.clientHeight;<br />
  } else if( document.body &#038;&#038; ( document.body.clientWidth || document.body.clientHeight ) ) {<br />
    myHeight = document.body.clientHeight;<br />
  }<br />
  return (myHeight);<br />
}</em></p>
<p>Now I check this height against our div&#8217;s height, which is 675px. If it&#8217;s less than that, I reset the top to zero. Otherwise, I make sure the top is 50%:</p>
<p><em>function fixPos() {<br />
	var thisTime = getWinHeight();<br />
        myDiv=document.getElementById(&#8217;content_container&#8217;);<br />
	if (thisTime < 675) {<br />
	 myDiv.style.top = "337px";<br />
	} else {<br />
	myDiv.style.top = "50%";<br />
	}<br />
}</em></p>
<p>I call this fixPos() function from both the onLoad and onResize events. And while using the onResize event can make things a bit twitchy (especially in Firefox), it totally works. Of course, folks with JavaScript turned off will have to settle for the non-corrected position.</em></p>
<p>If anybody has another, cleaner way to vertically center a fixed-size div, gimme an email. I&#8217;d be totally interested to see it.</p>
]]></content:encoded>
			<wfw:commentRss>http://angryrobotsblog.com/2008/02/16/smart-vertical-centering-using-css-and-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Netflix plugin breaks my validation</title>
		<link>http://angryrobotsblog.com/2008/02/15/netflix-plugin-breaks-my-validation/</link>
		<comments>http://angryrobotsblog.com/2008/02/15/netflix-plugin-breaks-my-validation/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 22:12:48 +0000</pubDate>
		<dc:creator>Math</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Geek2]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://angryrobotsblog.com/2008/02/15/netflix-plugin-breaks-my-validation/</guid>
		<description><![CDATA[So just as I was buying champagne for my validation party, Albert Banks's <a href="http://www.albertbanks.com/wordpress-netflix-plugin/">Netflix plugin for Wordpress</a> broke my website. Well, not really--it just introduced a small, annoying error that I'll have to fix somehow,]]></description>
			<content:encoded><![CDATA[<p>So just as I was buying champagne for my validation party, Albert Banks&#8217;s <a href="http://www.albertbanks.com/wordpress-netflix-plugin/">Netflix plugin for Wordpress</a> broke my website. Well, not really&#8211;it just introduced a small, annoying error that I&#8217;ll have to fix somehow: any &#8220;&amp;&#8221; symbols that are rendered through the plugin (for example, the one in <em>Romance &amp; Cigarettes</em>, which I have at home right now) don&#8217;t get converted to the correct character entity. </p>
<p>XHTML 1.0 assumes that every instance of the &#8220;&amp;&#8221; symbol is the beginning of a charcter entity, and it gets cranky when it&#8217;s not followed by a valid reference and a semicolon (like this: <em>&amp;amp;</em>) . Even in alt tags and URL strings.</p>
<p>Not a big deal, really. And it&#8217;s something I might not have even noticed if I hadn&#8217;t had that particular movie at home right now. Some quick PHP changes should fix &#8216;er up.</p>
]]></content:encoded>
			<wfw:commentRss>http://angryrobotsblog.com/2008/02/15/netflix-plugin-breaks-my-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starbucks Finally Gets Free Wireless. Sort Of.</title>
		<link>http://angryrobotsblog.com/2008/02/12/starbucks-finally-gets-free-wireless-sort-of/</link>
		<comments>http://angryrobotsblog.com/2008/02/12/starbucks-finally-gets-free-wireless-sort-of/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 18:20:53 +0000</pubDate>
		<dc:creator>Math</dc:creator>
				<category><![CDATA[Geek2]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://angryrobotsblog.com/2008/02/12/starbucks-finally-gets-free-wireless-sort-of/</guid>
		<description><![CDATA[According to the New York Times, AT&#38;T will begin offering free wireless internet at most Starbucks stores sometime this spring. There is a small catch though--only customers who use a Starbucks purchase card will get free time.]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://www.nytimes.com/aponline/technology/AP-Starbucks-ATT.html?em&#038;ex=1202965200&#038;en=6a14f67ad099a6e0&#038;ei=5087%0A">this New York Times article</a>, AT&amp;T will be offering free wireless internet at most Starbucks stores beginning this spring. I&#8217;ve long hated T-Mobile (Starbucks&#8217; longtime, money-gouging internet partner), and I&#8217;ve wondered why anyone would hang out at a Starbucks when so many mom and pop cafes offer free internet access. This must have been frustrating for Starbucks as well&#8211;especially in a city like Austin, where virtually every type of business, including movie theatres and bookstores, offer free wifi.</p>
<p>There is a small catch though&#8211;only customers who use a Starbucks purchase card will get free time. The rest will have to pay $4 for every two hours of use, or $20 per month (which will also grant access to the nationwide network of non-Starbucks AT&amp;T hotspots). But compared to T-Mobile&#8217;s pricing, that&#8217;s not bad at all. They charged as much as $40 per month, $10 per day, or $6 per hour for internet use.</p>
<p>In emergencies, I&#8217;ve sometimes grudgingly paid for the $10 day pass, but I&#8217;ve rarely spent more than an hour online at Starbucks. So a cheaper, two-hour plan seems much more reasonable to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://angryrobotsblog.com/2008/02/12/starbucks-finally-gets-free-wireless-sort-of/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding Flash Files Without Breaking Validation</title>
		<link>http://angryrobotsblog.com/2008/02/07/embedding-flash-files-without-breaking-validation/</link>
		<comments>http://angryrobotsblog.com/2008/02/07/embedding-flash-files-without-breaking-validation/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 04:13:35 +0000</pubDate>
		<dc:creator>Math</dc:creator>
				<category><![CDATA[Geek2]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://angryrobotsblog.com/2008/02/07/embedding-flash-files-without-breaking-validation/</guid>
		<description><![CDATA[Ever since IE7 sent web developers into a panic by breaking the object and embed tags (then fixing them again), I’ve been using Macromedia’s AC_RunActiveContent.js to render flash movies. The problem is, the script writes unnecessarily ugly code that doesn’t validate as XHTML 1.0 Transitional, so it kind of makes me look like a chump.]]></description>
			<content:encoded><![CDATA[<p>Today I finally ran this new site through the W3C validator, and found that I had all kinds of red exclamation points. Some of the errors were simple oversights on my part, but most of them revolved around my header, which is an embedded flash movie.</p>
<p>Ever since IE7 sent web developers into a panic by breaking the object and embed tags (then <a href="http://msdn2.microsoft.com/en-us/ie/bb969055.aspx">fixing them again</a>), I&#8217;ve been using Macromedia&#8217;s AC_RunActiveContent.js to render flash movies. The problem is, the script writes unnecessarily ugly code that doesn&#8217;t validate as XHTML 1.0 Transitional, so it kind of makes me look like a chump.</p>
<p>While searching for a solution today, I found Drew Mclellan&#8217;s brilliantly simple, five-year-old <a href="http://alistapart.com/articles/flashsatay">Flash Satay method</a>, which works really well for my purposes (a small flash movie that doesn&#8217;t need to stream). To accommodate IE7 users who haven&#8217;t updated their browsers yet, I wrote my own very simple JS function that doc.writes the necessary object tag. It looks like this:</p>
<p><em>function make_flash(swfPath, swfWidth, swfHeight)<br />
{<br />
	var str = &#8216;&lt;object type=&#8221;application/x-shockwave-flash&#8221;&#8216;;<br />
	str += &#8216;data=&#8221;&#8216; + swfPath + &#8216;&#8221;&#8216;;<br />
	str += &#8216;width=&#8221;&#8216; + swfWidth + &#8216;&#8221; height=&#8221;&#8216; + swfHeight + &#8216;&#8221;&gt;&#8217;;<br />
	str += &#8216;&lt;param name=&#8221;movie&#8221; value=&#8221;&#8216; + swfPath + &#8216;&#8221; /&gt;&#8217;;<br />
	str += &#8216;&lt;param name=&#8221;allowScriptAccess&#8221; value=&#8221;always&#8221; /&gt;&#8217;;<br />
	str += &#8216;&lt;/object&gt;&#8217;;</p>
<p>	document.write(str);<br />
}</em></p>
<p>Much, much simpler (but, admittedly, less flexible) than the Macromedia code. In the spirit of thoroughness, I also created a straight HTML version of the header for users with Javascript turned off.</p>
<p>I also learned another strange lesson while trying to get this seemingly simple flash header to work: if the user visits you at, say, http://angryrobots.com, but the link in your flash movie points literally to http://<strong>www</strong>.angryrobots.com, flash will see this as a cross-domain transaction, and won&#8217;t execute the getURL command. It doesn&#8217;t throw an error either&#8211;it simply doesn&#8217;t work. This is an issue for me, because I have two domains pointing at this site, and I can&#8217;t control whether or not users will type in the &quot;www&quot;. So to combat this weird behavior, I had to throw in the &quot;allowScriptAccess&quot; parameter with a value set to &quot;always&quot;. Lesson learned for next time, I guess.</p>
<p>Anyway&#8230; if you have another simple, flexible, standards-compliant method of embedding flash movies, please shoot me an email. I&#8217;d love to hear it.</p>
]]></content:encoded>
			<wfw:commentRss>http://angryrobotsblog.com/2008/02/07/embedding-flash-files-without-breaking-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
