<?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>Ben McGraw's Egometry &#187; php</title>
	<atom:link href="http://www.egometry.com/tags/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.egometry.com</link>
	<description>cogito ergo stfu</description>
	<lastBuildDate>Wed, 28 Jul 2010 20:12:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>vrpg beta work continues&#8230;</title>
		<link>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/</link>
		<comments>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 20:59:13 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vrpg]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=902</guid>
		<description><![CDATA[I&#8217;ve mainly been dealing with code concerning the files section.  I&#8217;ve improved the quality of the upload process, corrected the file lineage graph and made strides towards a saner system, have made it so you can comment upon file entries, and made it so anyone can upload screenshots of any file. Also I made an [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve mainly been dealing with code concerning the files section.  I&#8217;ve improved the quality of the upload process, corrected the file lineage graph and made strides towards a saner system, have made it so you can comment upon file entries, and made it so anyone can upload screenshots of any file.</p>
<p>Also I made an schema-application tool to keep track of which .sql files have been applied in what environment.  Trust me, this is useful.</p>
<p>So where did I go for two months, far, far away from Gruedorf?  I honestly can say I was shocked to crack open this dev folder to find the last svn log from <em>July 10</em>.  So wherever I went, it didn&#8217;t seem as long as it was. :(</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP, Language of Mystery</title>
		<link>http://www.egometry.com/tech/php-language-of-mystery/</link>
		<comments>http://www.egometry.com/tech/php-language-of-mystery/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 17:08:12 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=896</guid>
		<description><![CDATA[PHP seems so arbitrary sometimes. function test_nine() { $$"9" = 22; } fails to parse. (which is good, I suppose) This passes: function test_nine() { $n = 9; $$n = 22; $this->assertEqual($$n, 22); } -Andy Friesen, of giant-communist-robots.com.]]></description>
			<content:encoded><![CDATA[<p>PHP seems so arbitrary sometimes.</p>
<pre style="background-color: #ccc; font-family: monospace; padding: 10px;">
function test_nine() {
	$$"9" = 22;
}
</pre>
<p>fails to parse.<br />
(which is good, I suppose)</p>
<p>This passes:</p>
<pre style="background-color: #ccc; font-family: monospace; padding: 10px;">
function test_nine() {
	$n = 9;
	$$n = 22;
	$this->assertEqual($$n, 22);
}
</pre>
<p>-Andy Friesen,<br />
of <a href=http://giant-communist-robots.com/>giant-communist-robots.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/tech/php-language-of-mystery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP5, you king of bastards (setting an instance member inside a static class call)</title>
		<link>http://www.egometry.com/tech/php5-you-king-of-bastards-setting-an-instance-member-inside-a-static-class-call/</link>
		<comments>http://www.egometry.com/tech/php5-you-king-of-bastards-setting-an-instance-member-inside-a-static-class-call/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 13:48:58 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scope]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=888</guid>
		<description><![CDATA[If I&#8217;m in an instanced class, and I call another class&#8217;s method statically inside of a method in the first class, and that static method should happen to (erroneously) have $this->whatever inside of it&#8230; &#8230;it sets $whatever on my outer instanced class. Here&#8217;s some illustrative code: &#60;? &#160;&#160;&#160;&#160;class&#160;Inner_Static&#160;{ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;function&#160;burrito()&#160;{ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$this-&#62;_member&#160;=&#160;‘A&#160;keyboard.&#160;How&#160;quaint.’; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} &#160;&#160;&#160;&#160;} &#160;&#160;&#160;&#160;class&#160;Outer_Instance&#160;{ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;function&#160;taco()&#160;{ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Inner_Static::burrito(); [...]]]></description>
			<content:encoded><![CDATA[<p>If I&#8217;m in an instanced class, and I call another class&#8217;s method statically inside of a method in the first class, and that static method should happen to <i>(erroneously)</i> have $this->whatever inside of it&#8230;</p>
<p>&#8230;it sets $whatever on my outer instanced class.</p>
<p>Here&#8217;s some illustrative code:</p>
<pre style="padding: 8px; background-color: rgb(221, 221, 221);" >
&lt;?
&nbsp;&nbsp;&nbsp;&nbsp;class&nbsp;Inner_Static&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;burrito()&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_member&nbsp;=&nbsp;‘A&nbsp;keyboard.&nbsp;How&nbsp;quaint.’;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;class&nbsp;Outer_Instance&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;taco()&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inner_Static::burrito();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;$my_guy&nbsp;=&nbsp;new&nbsp;Outer_Instance();
&nbsp;&nbsp;&nbsp;&nbsp;$my_guy-&gt;taco();

&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;‘$my_guy-&gt;_member:&nbsp;‘&nbsp;.&nbsp;$my_guy-&gt;_member;&nbsp;
</pre>
<p>This boggles my mind a bit.  Tracking it down cost me a bit of time.  Is there actually a sane use for this little tidbit, or am I justified in thinking that a good language would warn you that scope shenanigans are going on here?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/tech/php5-you-king-of-bastards-setting-an-instance-member-inside-a-static-class-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple scripts always ship.</title>
		<link>http://www.egometry.com/gruedorf/simple-scripts-always-ship/</link>
		<comments>http://www.egometry.com/gruedorf/simple-scripts-always-ship/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 11:03:26 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[escaping strings]]></category>
		<category><![CDATA[jokesfornerds]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[strings]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=862</guid>
		<description><![CDATA[Simple needs, simple deeds. A need for a simple one-off occurred Monday evening at work. Some non-engineer coworkers needed to be shown how to make some non-Latin-1 text into html entities. Basically, they needed a 5 line php script. Right before sending them to any number of sites that already do this 5-line operation, I [...]]]></description>
			<content:encoded><![CDATA[<h2>Simple needs, simple deeds.</h2>
<p>A need for a simple one-off occurred Monday evening at work.  Some non-engineer coworkers needed to be shown how to make some non-<a href="http://en.wikipedia.org/wiki/ISO_8859-1" target=_blank>Latin-1</a> text into html entities.  </p>
<p>Basically, they needed a 5 line php script.</p>
<p>Right before sending them to <a href="http://www.google.com/search?q=html+entity+converter" target=_blank>any number of sites that already do this 5-line operation</a>, I decide: <i>what the hell, I&#8217;ll just make one of my own</i>.  And so, that night after unwinding, <a href="http://www.egometry.com/html-entitizer/" target=_blank>I did</a>.</p>
<p>Here&#8217;s my <a href="http://www.egometry.com/html-entitizer/" target=_blank>HTML Entitizer</a>.  Suitable for all your HTML entitizing needs, large <i>or</i> small!</p>
<h2>PHP in <u>Escape from &amp;#76;&amp;#46;&amp;#65;&amp;#46;</u><a href="http://www.zefrank.com/thewiki/the_show:_05-10-06" target=_blank style="font-size:40%; color: #eee;">(jokesfornerds)</a></h2>
<p>One of the reasons PHP is so popular is the fact that it&#8217;s got so many handy little functions.  In this case, <a href="http://php.net/manual/en/function.htmlentities.php">htmlentities()</a> is the blade of PHP&#8217;s swiss army knife that we&#8217;re using.  Of course, indiscriminate use of functions like this cause problems like double-escaped characters (&amp;amp;amp;) showing up in databases. </p>
<p><a href="http://www.egometry.com/i/2009/07/swiss-army-everything.jpg" rel="lightbox[pics862]" title="PHP, the swiss-army knife."><img src="http://www.egometry.com/i/2009/07/swiss-army-everything.thumbnail.jpg" alt="PHP, the swiss-army knife." width="200" height="152" class="attachment wp-att-864 alignright" /></a>PHP&#8217;s solution to this sort of thing is generally to throw new corkscrews and toothpicks onto it&#8217;s ever-growing pile of tools on it&#8217;s knife.  If you look at the <a href="http://php.net/manual/en/function.htmlentities.php">documentation page for htmlentities()</a>, you can see that as of version 5.2.3 of PHP, another optional parameter was added: double_encode. Which will</p>
<p>Getting the right escape order can be hard, especially for novices or small teams inheriting code from other small teams.  To date I don&#8217;t think I&#8217;ve inherited work on a webapp whose database wasn&#8217;t littered with extraneous &amp;amp;&#8217;s and rogue \\&#8217;s. It&#8217;s only by virtue of verge-rpg.com having a single developer who is really, <i>really</i> annoyed by this problem the the point of neuroticism that &amp;amp;amp; never appears in the database except in <a href="http://verge-rpg.com/boards/display_thread.php?id=131844#post131851" target=_blank>posts that actually wanted to display &amp;amp;</a>.</p>
<p>Although even this level of OCD-database-cleansing didn&#8217;t prevent <a href="http://verge-rpg.com/boards/display_thread.php?id=131844#post131850" target=_blank>escaping-related errors on the first go-round</a>.</p>
<h2>Teh (sic) Implementation.</h2>
<p>So, the only time-consuming part of getting this script into my wordpress site (other than me taking a bloody half hour to blog about a 2-minute job) was convincing wordpress that it should allow <span style="color: red;">&lt;?php</span> fragments into my posts.</p>
<p>Luckily, other people before me have wanted this very thing.  WordPress&#8217;s biggest strength is again one of PHP&#8217;s: if you want it, it&#8217;s already been made for you.  In this case the <a href="http://bluesome.net/post/2005/08/18/50/%20Exec-PHP" target=_blank>Exec-PHP</a> module will let admin-level users of your blog post for-reals, actual PHP into your posts!  You&#8217;d better hope your admins don&#8217;t have their accounts compromised! <span style="font-size:40%; color: #eee;">(&#8230;one moment.  Changing my password.)</span></p>
<p>In PHP&#8217;s case, the code that you want that&#8217; already been written for you is <a href="http://www.php.net/manual/en/function.htmlentities.php#84612">in every single function&#8217;s talkback thread</a>.  These functions may not be hyper-optimized or the best solution for any given problem, but they generally are what you want to prove a point.  You scan the docs, you grab the code, you put it in your site, and you move on to the next problem in your own app.</p>
<p>Quick and dirty, the way PHP likes it.</p>
<p>For the curious, here&#8217;s the solution I spat out (copy included):</p>
<pre style="background-color: #ddd; padding: 10px; line-height: 110%;">
&lt;h1&gt;Escape html&lt;/h1&gt;
&lt;p&gt;This is a simple script to give the escaped codes for some html. Useful
for making foreign languages play nice with html, regardless of how the
server handles string encoding.&lt;/p&gt;
&lt;?
if( isset($_POST['escape_me']) ) {
echo('&lt;h2&gt;Your escaped html&lt;/h2&gt;&lt;div'.
     'style="background-color: #ddd; padding: 8px;"&gt;');
echo(str_replace('&amp;','&amp;amp;',htmlentities(stripslashes($_POST['escape_me']),
     ENT_NOQUOTES,'UTF-8')));
echo( '&lt;/div&gt;' );
}
?&gt;
&lt;form action='/html-entitizer/' method='POST'&gt;
Text to escape:
&lt;textarea name='escape_me' style='width: 550px; height: 200px;'&gt;&lt;/textarea&gt;
&lt;input type='submit' value='Create my html entities'&gt;
&lt;/form&gt;
</pre>
<p>(weird formatting so it doesn&#8217;t run off the side of the screen; I don&#8217;t actually code like that.  Mostly. ;)</p>
<h2>Coda</h2>
<p>It is of note that this <i>tiny</i> amount of effort got me two really sincere &#8220;thank yous&#8221; from the non-engineers.  It&#8217;s important to note that things that are mindlessly trivial to a programmer can be tedious tasks to someone without the power to bully the computer into doing labor for them.  One of the guys, a computer saavy guy who had access to lists of what each escaped character translated to, insisted that he&#8217;d just search/replace the offensive characters by hand.  </p>
<p>Ostensibly, this was offered to save me work.</p>
<p>How much time did my 2 minutes of code save him?</p>
<p>(<a href="http://www.google.com/search?q=html+entity+converter" target=_blank>Don&#8217;t forget a google for &#8220;html entity converter&#8221; would&#8217;ve saved even that, had I cared to not make the tiny toy script of my own</a>.  I&#8217;ll ramble on about re-using other people&#8217;s work more later, but it&#8217;s key to remember even what little work I did end up doing was extraneous and largely an exercise in vanity.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/simple-scripts-always-ship/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do Not Google That! (dot com)</title>
		<link>http://www.egometry.com/gruedorf/do-not-google-that-dot-com/</link>
		<comments>http://www.egometry.com/gruedorf/do-not-google-that-dot-com/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 08:05:47 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[dontgooglethat]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webapp]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=606</guid>
		<description><![CDATA[Oh, and a fair word of warning to those looking to do additional research: Do not Google "oily sweat wrestling men." Just don't do it. Some things can't be unseen.]]></description>
			<content:encoded><![CDATA[<h3>The Premise</h3>
<p>Late at night a few days ago in <a href="http://imvu.com">imvu.com&#8217;s</a> secret lair, #engineering&#8230;</p>
<pre style="width: 510px; padding: 20px;  background-color: #efefef;">
<b>&lt;Veep></b> from an article on an ultimate fighting controversy about a guy
       putting slippery stuff on to gain an unfair advantage:
<b>&lt;Veep></b> Oh, and a fair word of warning to those looking to do additional
       research: Do not Google "oily sweat wrestling men."
       Just don't do it. Some things can't be unseen.
<b>&lt;Grue></b> :D
<b>&lt;Grue></b> That which does not kill you will make you OH GOD.
<b>&lt;Veep></b> that would be a good webpage: "things you shouldn't search for on
       google", with http://www.google.com/search?q=  links
<b>&lt;Grue></b> hm, yeah.
<b>&lt;Grue></b> simple apps are simple.
<b>&lt;Grue></b> it's something that you need not even moderate the submission to.
<b>&lt;Veep></b> No match for "DONOTGOOGLETHAT.COM".
<b>&lt;Grue></b> This is a compelling application, veep.
<b>&lt;Veep></b> thanks.
<b>&lt;Grue></b> you calling dibs?
<b>&lt;Veep></b> no, my queue of unfinished projects is large. if you want it, you
       can have it.
</pre>
<h3>The Addiction</h3>
<p>I have a problem with domain name purchasing.  They&#8217;re all so pretty.  Most of my domains are empty, so the idea of a fully operational site made within a few hours of coding was very appealing to me.  </p>
<p>I haven&#8217;t had a simple project since I made my <a href="http://ipbeer.com">exceptionally puerile knockoff of ipchicken.com</a> (whose sole functionality is to display <span style="font-family: monospace;">$_SERVER['REMOTE_ADDR']</span> and <span style="font-family: monospace;">$_SERVER['HTTP_USER_AGENT']</span> to the user, and doa ip2latlon lookup to feed to gmaps.  Oh: and a <s>gif</s> png of urine.).   The idea of completing an &#8220;art project&#8221; website in less than half a day and throwing some ads on it to potentially make it so it can be cash-neutral for my lifetime as far as domain re-registration costs go is oddly, strangely, <i>irrationally</i> appealing to me.  And this felt like that.</p>
<p>So I bought <a href=http://donotgooglethat.com/>donotgooglethat.com</a>.</p>
<p>And then I bought <a href=http://dontgooglethat.com/>dontgooglethat.com</a> and made donotgooglethat.com 301 redirect to this one.  <i>Because I have a problem with buying domains</i>.</p>
<h3>The Implementation</h3>
<p>Who needs security or user auth on a site meant to provide terrible, sullied links to the underbelly of the googleverse?</p>
<h4>Style decisions</h4>
<p>I started out by ripping apart a copy of everyone&#8217;s favorite search page.  After taking out a bunch of stuff (wow, they use tables!) I was left with a raw googlish-looking site.  I replaced the topbar links with a few links to some of my sites, and added the minimalist google ads to the side, with a link to the real google on the right.  </p>
<p>My goal is to be googlish but not confusable with the Real McCoy for legal reasons, so I opted not to go with any rainbow text or <a href="http://www.identifont.com/show?HF">the google Font</a> (Catull, for you typography nerds).</p>
<p>Even so, I&#8217;m wary of using the trademarked term.  Worse comes to worse I&#8217;m out $14 for reg costs and have a cute story.</p>
<p>Finally I grabbed two icons from the <a href=http://www.famfamfam.com/archive/silk-icons-thats-your-lot/>Silk Icon Set</a> over at famfamfam.  Even though I&#8217;m a <a href=http://www.verge-rpg.com/gallery/gallery.php?sully>competent sprite artist</a>, I was trying to get this done as quickly as possible.</p>
<h4>User Experience Decisions</h4>
<p>I wanted to keep it damned simple.  So I opted for only showing the top ten &#8220;worst&#8221; searches that were upvoted, without an option for pagination.  There are no &#8220;about&#8221; pages since the links go straight to google searches, so there&#8217;s no need for SEO&#8217;d urls or concern for &#8220;losing valuable index space&#8221; by not exposing all of the content.  Who cares?  Not this site!</p>
<p>Each of the top ten links can be voted up or down.  On successful vote (or failure!) you&#8217;re notified above the dontGOOGLEthat header.  You can add a new search by clicking on the yellow button after entering some (hopefully offensive) text into the search box, or just by searching (done via an async post onClick of the &#8220;No Don&#8217;t Search&#8221; button).</p>
<p>The search results go to an adsense&#8217;d google personal search result page, which I chose to keep unbranded. The rationale here was that I want this thing to basically net $7 a year, so the least annoying way to do that would be to tie any possible revenue into the only real thing it does: making searches.  Even so, I&#8217;m not pleased with the results; <a href=http://twitter.com/benmcgraw/status/1205056882>Google Safesearch</a> seems to be on by default, and I couldn&#8217;t find anything (in the five minutes I scanned for it) in the customized search api to turn it off programatically or via a pref setting in adsense.  </p>
<p>I decided to put a minimal amount of discouragement for vote-hammering by putting a session-based lock on votes in.  However, anyone with half a brain and an ounce of desire can get around it.  Really: I don&#8217;t care.  Should I start caring, it wouldn&#8217;t be that hard to fix it or just disable voting&#8230;</p>
<p>To get a small amount of churn, the most recent search shows up at the bottom with a googlish <font color=red>New!</font> next to it, and the option to upvote it there.</p>
<p>Also to promote searching, I did the same very simple trick google did to up their revenue long ago: a
<pre>document.getElementById('q').focus();</pre>
<p> on page load.  This just puts the cursor straight into the search form, so when you load the page and type, the input goes straight there.  Such a tiny trick, and it netted them millions and millions more dolars in revenue.  <i>And</i> it improved the user experience.</p>
<h4>Codey Decisions</h4>
<p>MySQL Database: One table.  Three fields: id, query, and votes.  Trivial.</p>
<p>Two queries per page load: one to get the top ten votes, one to get the most recent post.  The votes field has an index (normal), so both queries are optimally cheap.</p>
<p>One of two optional queries per page load: an insert of a new search term or an up/down vote.  The insert actually is two queries: one to see if a search already exists, and if it doesn&#8217;t: do an insert (and if it does, and you haven&#8217;t already voted on it, upvote it!). </p>
<p>No templating.  No javascript libraries.  A few boilerplate functions (mainly query error reporting stuff I handrolled years ago that&#8217;s been very faithful and useful).  A few lifted javascript functions (because who needs to include all of jQuery for a single XMLHttpRequest call?).  A google analytics tracker just for the hell of it, because analytics are fun!</p>
<p>There is only the main index and the About page, and the about page has no preprocessing logic.  </p>
<p>The index weighs in at 12kb, and 297 lines.</p>
<p>A few tests shows that the main index presently renders in 0.008s from a cold start and in 0.001s afterwards.  I assume this 8x speedup is just Filesystem or OS or MySQL or Apache level caching, since I sure didn&#8217;t put any caching in myself.</p>
<p>The whole operation was 4 hours top to bottom, sans tweaks here and there for the past few days.  This is roundtrip from registration, administrative stuff like editing my dns entries, apache conf files, setting up the database user, setting up an adsense and analytics account, and then implementation.  The actual coding part was between 60 and 120 minutes, mostly debug stemming from sandbox/server inconsistencies.  A lot of time was also wasted talking to <a href="http://sheisept.com">the girlfriend</a> on gtalk.</p>
<p>For contrast, this blog post has taken about 90 minutes in a text editor, and currently weighs 8kb.  The line count is lower, but the lines are far longer; English is a less concise language than PHP&#8230; but even English is more internally consistent than PHP.</p>
<h4>And that&#8217;s it!</h4>
<p>I&#8217;d like to see if it gets some use, but I&#8217;m not exactly sure who to expose it to to see if anyone cares.  I thought about posting it to 4chan, but I don&#8217;t think it&#8217;s got enough shock value for that, especially since it defaults to safesearch.  </p>
<p>Even if it rots in obscurity, though, it&#8217;s a tiny completed work, so I&#8217;m all good by it.  </p>
<p>If anyone has any comments or suggestions: please leave them!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/do-not-google-that-dot-com/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Two Days of Hell</title>
		<link>http://www.egometry.com/gruedorf/two-days-of-hell/</link>
		<comments>http://www.egometry.com/gruedorf/two-days-of-hell/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 10:57:16 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[hell]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[refactoring]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=321</guid>
		<description><![CDATA[Hell truly is revisiting old, crufty code made by yourself.]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin-left: 20px;">
<div id="attachment_322" class="wp-caption alignnone" style="width: 277px"><a href="http://www.egometry.com/wp-content/uploads/2008/12/screenshot.png"><img class="size-medium wp-image-322" title="screenshot" src="http://www.egometry.com/wp-content/uploads/2008/12/screenshot.png" alt="A screenshot of code for Syn" width="267" height="145" /></a><p class="wp-caption-text">A screenshot of code for Syn</p></div>
</div>
<p>As a brief gruedorf update, I&#8217;ve completed moving the old site&#8217;s code from mysql_fetch_row() to mysql_fetch_assoc() on all queries with tablename.* on their select clause.</p>
<p>I can now move forward with the beta site&#8217;s schema changes unimpeded.  </p>
<blockquote><p>Hell truly is revisiting old, crufty code made by yourself.</p></blockquote>
<p>As an unintentional side effect, several old bugs have cleared up.  Apparently in the past I added fields and some time later noticed bugs and never correlated the two events happening.  </p>
<p>Hell truly is revisiting old, crufty code made by yourself.</p>
<p>I added a screenshot of the last two days of gruedorf progress for Syn, who apparently likes screenshots.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/two-days-of-hell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
