<?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>Daniel Tharp</title>
	<atom:link href="http://danieltharp.com/weblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://danieltharp.com/weblog</link>
	<description>Big in France.</description>
	<lastBuildDate>Thu, 03 May 2012 01:27:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Ogre Game Labs: A Proposal</title>
		<link>http://danieltharp.com/weblog/2012/04/ogre-game-labs-a-proposal/</link>
		<comments>http://danieltharp.com/weblog/2012/04/ogre-game-labs-a-proposal/#comments</comments>
		<pubDate>Tue, 01 May 2012 03:14:56 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Nerd Stuff]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=365</guid>
		<description><![CDATA[(This is intended for one person, really, but I thought I&#8217;d put it on here so you all could see a new project I&#8217;m wanting to work on and maybe express some interest.) Myself and several other members have a particular interest in designing games, and enough new online tools have emerged recently that I [...]]]></description>
			<content:encoded><![CDATA[<p>(This is intended for one person, really, but I thought I&#8217;d put it on here so you all could see a new project I&#8217;m wanting to work on and maybe express some interest.)</p>
<p>Myself and several other members have a particular interest in designing games, and enough new online tools have emerged recently that I want to pursue the thought of an extension of the OGREs. The Ogre Game Labs would be something a little different from a traditional chapter, as membership in it would be as temporary or permanent as the OGRE choosed, though they would need to first be OGREs to make use of the Game Labs.</p>
<p>The Ogre Game Labs has a few immediate goals and a few stretch goals. Immediate goals are:</p>
<ol>
<li>Provide a resource for game designers to get support in the designing of their game, through (mostly online) playtesting, consulting with other game designers, working with people that have experience in online game designing tools such as Vassal (www.vassalengine.org), Roll20 (www.roll20.net), and Magic Workstation (www.magicworkstation.com).</li>
<li>Provide a way for gamers to get involved at the ground level of new games and designers/design teams. They can find a game concept that&#8217;s of particular interest and volunteer to playtest games, or find a group with a similar schedule. One resource will be that all OGREs will be able to set their availability by day of the week, and this will be public. By joining the Game Labs you opt-in to being contacted by designers who are available when you are.</li>
<li>Answer some basic questions on copyright law as it pertains to card, board, and video games. Not legal advice but links to useful resources on how you are protected (and not protected) as a game designer.</li>
</ol>
<p>Some stretch goals are:</p>
<ol>
<li>Provide connections to artists, graphic designers, distribution chains, game stores that would do further playtests. Make it a real one-stop place for a game designer no matter how far along the project is to completion.</li>
<li>X-TREME STRETCH GOAL: I&#8217;ve toyed with the idea of designing a modular game engine in HTML5. We may be able to turn some games into something that the public can play, and if there&#8217;s enough selection of quality games, turn it into a monthly membership service.</li>
</ol>
<p>I&#8217;m fairly flexible on the overall structure of the Game Labs, and I think people would take on some self-granted titles. Jesse Schell&#8217;s excellent &#8220;The Book of Lenses: The Art of Game Design&#8221; is very adamant about this fact: To become a game designer, all you have to do is say you are one. The games will come later, but it&#8217;s important to take on the role first. So there are some positions that anyone would be able to take (with no limit), and some permanent positions.</p>
<p><strong>Director</strong> &#8211; Likely myself in the dual role of webmaster, responsible for the overall direction of the Game Labs. Catches all the requests that slip between the cracks (and assigns new positions if enough slip through the same crack).<br />
<strong>Head of Development</strong> &#8211; The member with the most experience in gaming and rule systems, available as a last-level resource to ask questions of all sorts on game design. A sort of &#8220;Resident OG&#8221; position equivalent to a chapter&#8217;s Senior DM.<br />
<strong>Project Coordinator</strong> &#8211; Provides designers with new subforums and blogs for their project, and passes on other technical requests to the webmaster. Also responsible for answering questions on the new designer process.<br />
<strong>Chapter Liaison</strong> &#8211; One member from each OGRE chapter that want to use the Game Labs should have a Liaison that matches people up with projects, and helps raise awareness of the Labs as a tool open to all members.<br />
<strong>Design Head, (game)</strong> &#8211; Self-granted position once a game is far enough along that the designer needs to start recruiting for playtesting. Multiple people can be heads of the same project if it&#8217;s a team, and team accounts can be made to speak as one voice. One person can be Design Head of multiple games.<br />
<strong>Designer</strong> &#8211; Position granted on entry to the Game Labs. I considered making &#8220;Playtester&#8221; another option on entry but if you playtest, you are helping design, so you&#8217;re a designer first.</p>
<p>That&#8217;s just a list I came up with while writing this so I&#8217;m sure some things aren&#8217;t covered but it should give an idea of the structure and day-to-day operation. Chapter Liaisons, the Project Coordinator, the Head of Development and Director would make up a Board of Directors that would vote on issues every so often (Not sure how often, and it seems silly to decide on a timeframe before the project goes live.) I&#8217;m open to suggestions on term lengths and the like, but also bear in mind this is going to be almost exclusively online, so voting will be forum-based before a deadline (and likely count as an abstention if not submitted).</p>
<p>I can have a forum up at ogregamelabs.com within the week you all decide you want to go ahead with it. I&#8217;m excited to push this idea forward and maybe even make the OGREs known as a think tank for up-and-coming designers. I&#8217;m available for questions via email at daniel.tharp@gmail.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2012/04/ogre-game-labs-a-proposal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Windows XP SP3 on Mac OSX Lion and get drivers, too. [updated 5/2/12]</title>
		<link>http://danieltharp.com/weblog/2012/04/how-to-install-windows-xp-sp3-on-mac-osx-lion-and-get-drivers-too/</link>
		<comments>http://danieltharp.com/weblog/2012/04/how-to-install-windows-xp-sp3-on-mac-osx-lion-and-get-drivers-too/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 23:57:37 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Nerd Stuff]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=348</guid>
		<description><![CDATA[I considered various triple and quad boot options for my new (to me) MacBook Pro, but eventually decided on a simple dual-boot, OSX Lion and Windows XP.  If you&#8217;re reading this via a Google search, you likely ran into some problems too.  If you have been trying to do this without involving Boot Camp at [...]]]></description>
			<content:encoded><![CDATA[<p>I considered various triple and quad boot options for my new (to me) MacBook Pro, but eventually decided on a simple dual-boot, OSX Lion and Windows XP.  If you&#8217;re reading this via a Google search, you likely ran into some problems too.  If you have been trying to do this without involving Boot Camp at all, bear in mind that even with all the drivers technically working you&#8217;re not going to be able to do things like use the multi-touch trackpad, use the function keys on the keyboard, etc.  Don&#8217;t worry though, this is an end-to-end guide on what to do to get XP running on a machine running Lion, complete with download links.</p>
<p>5/2/2012 Edit: From the comments I can pretty safely say this <strong>doesn&#8217;t work on  2011 Macbook Pros</strong>. Sorry, it&#8217;s likely due to them using new hardware not accounted for in the Leopard driver pack. If you can find a way to make it work, please leave a comment.</p>
<p><strong>Things you will need:</strong></p>
<ul>
<li>Bootable Windows XP disc.  I&#8217;m using a TechNet XP SP3 disc, but any full, non-OEM option should work.</li>
<li>Access to Disk Utility from something other than your active partition.  This can be via your Mac Install Disc, Install USB drive, etc.  I had a Lion USB drive.</li>
<li>Boot Camp 2.1, i.e. the version that shipped on Leopard retail discs.  <strong>Use Leopard install disc 1 or download it <a href="http://danieltharp.com/files/Boot%20Camp%20XP%20Drivers%20for%20Leopard-Lion.7z">here</a>.</strong></li>
</ul>
<p><strong>Quick Guide:</strong></p>
<ol>
<li>Use Disk Utility from your bootable media, partition off however much space you want to use and make sure the format is set to &#8220;MS-DOS (FAT)&#8221;  (which is actually FAT32)</li>
<li>Install Windows  on your new partition.  You can choose to re-format your partition as NTFS if you want, which is more efficient than FAT32 but only allows read access to the Windows partition from OSX, where FAT32 is read/write.</li>
<li>Download the Leopard version of Boot Camp <a href="http://danieltharp.com/files/Boot%20Camp%20XP%20Drivers%20for%20Leopard-Lion.7z">here</a>. (same link as above)</li>
<li>Run setup.exe, don&#8217;t bother trying to drill-down into the Drivers folders manually.  The setup catches it all.</li>
<li>Reboot; if you have sound, you&#8217;re finished!  If you don&#8217;t have sound,  go to Device Manager, expand System Devices, disable &#8220;Microsoft UAA Bus for High Definition Audio&#8221;, then uninstall it.  Verify Realtek High Definition Audio is also gone from Sound, video and game controllers (disable and uninstall if it is still there).</li>
<li>DO NOT REBOOT, run WDM_R268.exe provided in the driver 7z file or <a href="http://danieltharp.com/files/WDM_R268.exe">here</a>.</li>
<li>Done, reboot to finish audio driver install.</li>
</ol>
<p><strong>Step-by-step Guide:</strong></p>
<ol>
<li>Boot to your OSX bootable media by inserting the disc (or plugging in the flash drive) and holding down the Option/Alt key once you hear the startup chime.</li>
<li>From the Install Menu, choose Disk Utility and hit continue.</li>
<li>Click on your hard drive, usually the top-most item in the list of devices, and in the main pane hit the Partition button.</li>
<li>On a default Lion install, it takes up the entire hard drive.  Provided you aren&#8217;t using all of it, select the partition and click the + button beneath it to create a new partition.  Name it what you want, set the size in GBs that you want to give to your Windows installation (I set mine to 120 out of 500, so I have room for XP-friendly games.).  In the details on the right side of the main pane, change the format of your new Windows partition from Mac OS Extended (Journaled) to MS-DOS (FAT).  This is actually FAT32, not standard FAT with it&#8217;s 4GB file limits and whatnot.  FAT32 has a downside here in that it makes 32KB clusters, which can be wasteful at large sizes (partitions above 32GB).  The advantage to formatting as FAT32 and not NTFS (which is possible later on) is what you&#8217;ll have read AND write access to your Windows files when booted into OS X.  NTFS is read-only to OS X.</li>
<li>When everything looks correct, hit Apply and wait for your partitions to be modified.  If you get an error at this point, select the Mac partition (not the hard drive itself), select First Aid (losing your changes to the partition table, unfortunately), then hit Repair Disk.  If you still have errors, repeat this step but choose Repair Disk Permissions.</li>
<li>Once your partition is set, put your Windows XP disc in the Mac and reboot, again holding down the Option/Alt key to choose your boot device.  You should see the typical Windows XP setup process begin.  After a few minutes of loading, you should be able to begin the installation.  Hit Enter to begin the installation and F8 if you agree to the license terms.  At this point, you should see your Windows partition, two [Unknown] partitions and possibly some unallocated space.  Make sure you install to your newly created partition.  You&#8217;ll be given the option to format to NTFS.  Again, NTFS only allows Read-Only access to your files from OS X, but is more efficient space-wise than FAT32, which you can read and write from in OS X.  Make your decision according to your needs and proceed with the installation.</li>
<li>If you&#8217;re used to installing Windows XP on computers, bear in mind <strong>this is not an unattended installation</strong>; every time the machine reboots you&#8217;ll need to be there to hold down Option/Alt and tell it to boot to your Windows partition (NOT the disc, which would start the setup process over again). So hold your computer&#8217;s hand through the installation process.</li>
<li>When setup finishes, you now technically have a working dual-boot setup.  But there are a lot of missing drivers and a lot of things you won&#8217;t be able to do.  The big one would be your lack of network drivers, which means no way to get online to get your other drivers.  So now grab Boot Camp 2.1, with it&#8217;s sweet cache of Windows XP drivers, <a href="http://danieltharp.com/files/Boot%20Camp%20XP%20Drivers%20for%20Leopard-Lion.7z">here</a>.  You will need <a href="http://www.7-zip.org/download.html">7zip</a>to unpack it.  The files in that archive are copied directly from my Leopard Install Disc and 7z&#8217;ed with Ultra compression.  Be patient.<strong>Again, <a href="http://danieltharp.com/files/Boot%20Camp%20XP%20Drivers%20for%20Leopard-Lion.7z">download the driver pack for getting XP working on Lion here</a>. Get <a href="http://www.7-zip.org/download.html">7zip here</a> if you don&#8217;t have it.</strong></li>
<li>Once you have the driver pack downloaded and unpacked to your XP installation, run setup.exe to begin the Boot Camp installation process.  It will ask to install the Apple Software Updater first, which I went ahead and did because iTunes is going to install it anyway.  Watch as the Boot Camp installer finds and installs all the drivers for you.  Once it&#8217;s done, it will ask to reboot.  Don&#8217;t forget to hold down Option/Alt to get back in when it does.</li>
<li>When XP comes back up, you may find that your video looks like it didn&#8217;t install.  On nVidia systems, Go to Start -&gt; Control Panel and double-click nVidia Control Panel.  It should immediately ask to adjust your resolution.  While you&#8217;re in here you can make any changes to the color, etc. that you need.</li>
<li>Test if you have sound by clicking the speaker icon in the system tray on the bottom right, dragging the volume slider all the way to the top and releasing.  You should hear a tone.  If you do, go to Start -&gt; Control Panel -&gt; System -&gt; Hardware -&gt; Device Manager.  If there are no exclamation points, red Xs or anything of the sort then you&#8217;re done, enjoy your XP-on-Lion goodness.</li>
<li>If you do not have sound, Boot Camp has probably installed a Realtek audio driver that is incompatible with Service Pack 3 of Windows XP.  Go to Start -&gt; Control Panel -&gt; System -&gt; Hardware -&gt; Device Manager.  Expand System Devices by clicking the + next to it, find &#8221;Microsoft UAA Bus for High Definition Audio&#8221; in the list of entries, right-click it (on a Mac laptop, you can now right click by placing two fingers on the trackpad and clicking the mouse button over what you want to right-click on) and click Disable.  It will ask to confirm you want to disable it, click Yes.  Right-click it again, and click Uninstall.  Hit yes to confirm uninstallation.</li>
<li>In the big driver download there is a file in the root called <a href="http://danieltharp.com/files/WDM_R268.exe">WDM_R268.exe</a>.  If you didn&#8217;t download the pack (because you already had Leopard Discs, for example), download just the audio driver <a href="http://danieltharp.com/files/WDM_R268.exe">here</a>.  Run that exe and it will install working audio drivers.  You should hear the &#8220;fwop&#8221; of a Windows message in the system tray on installation saying a reboot is needed to complete installation. At this point, everything should be working on your system.</li>
<li>You&#8217;re done, Boot Camp now sits in the system tray as a gray diamond.  You can use it to determine which OS gets run by default.  If you see a boot selection prompt when you&#8217;re booting to Windows, having you choose between Windows XP and &#8220;Unknown boot on drive C&#8221; or something to that effect, go to Start-&gt;Control Panel-&gt;System-&gt;Advanced-&gt;Settings under Startup and Recovery.  Make sure Microsoft Windows XP is your default Operating System in the dropdown list, and uncheck the box immediately below it that says &#8220;Time to display list of operating systems&#8221;.  I leave the second box checked in case I do want to boot to Safe Mode after a loss of power.</li>
</ol>
<p>Hopefully that&#8217;s all it takes to get you up and going, please comment if this helped you out, or if this doesn&#8217;t work for you (likely if you have a 2011-2012 machine).</p>
<p>Daniel Tharp<br />
<a href="http://www.danieltharp.com/weblog">danieltharp.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2012/04/how-to-install-windows-xp-sp3-on-mac-osx-lion-and-get-drivers-too/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Read My Lips, No New Fart Apps</title>
		<link>http://danieltharp.com/weblog/2012/04/read-my-lips-no-new-fart-apps/</link>
		<comments>http://danieltharp.com/weblog/2012/04/read-my-lips-no-new-fart-apps/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 04:18:19 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[DanielTharp.com]]></category>
		<category><![CDATA[Nerd Stuff]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=345</guid>
		<description><![CDATA[I took the plunge, bit the bullet, followed the crowd and clichéd all the clichés. I bought a Mac, specifically a MacBook Pro from Late 2008. I’ve already pre-emptively deleted a paragraph that sounded like gushing because I’m honestly very impressed with OS X, moreso than I expected to be. Anyway, the reason I’m writing [...]]]></description>
			<content:encoded><![CDATA[<p>I took the plunge, bit the bullet, followed the crowd and clichéd all the clichés. I bought a Mac, specifically a MacBook Pro from Late 2008. I’ve already pre-emptively deleted a paragraph that sounded like gushing because I’m honestly very impressed with OS X, moreso than I expected to be.</p>
<p>Anyway, the reason I’m writing this post is that I bought this thing to write iOS apps on, and I’ll be sharing my experience learning, debugging, testing and (probably) swearing with all of you. I hope it is informative to some of you, because I’m coming from a background in function-oriented PHP. It has done everything I needed it to do, and while OO programming is definitely cleaner, more secure code, I have seen little appeal in such a mental overhaul of my approach. So I approach this with no small amount of trepidation, the tutorials I’ve read so far haven’t really clicked with me yet, and I still feel out of my depth. I have one app I’m going to be working on right away, the series of posts will be mostly unfiltered, I will be learning, breaking things, and fixing things from post to post, so you get a feel of what I’m going through; my reasoning for this is that I know I’m not the only one making this transition from function-oriented PHP to Objective-C and Xcode.</p>
<p>The first post will be up before Friday, dealing mostly with Xcode and my understanding of things going in. I’m also revealing my studio name (obviously an important step in being an iPhone millionaire, much like how “writers” will have a grand story in their head, but when you ask “oh, how far along is the book?” they respond with, “Well, I haven’t actually written anything yet, but that part’s easy.” For the record, I don’t care. My studio name is awesome and you’ll just have to deal with my hypocrisy.</p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2012/04/read-my-lips-no-new-fart-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Toolbelt: Some of my most-used code snippets for PHP, MySQL, HTML and CSS.</title>
		<link>http://danieltharp.com/weblog/2012/02/the-toolbelt-some-of-my-most-used-code-snippets-for-php-mysql-html-and-css/</link>
		<comments>http://danieltharp.com/weblog/2012/02/the-toolbelt-some-of-my-most-used-code-snippets-for-php-mysql-html-and-css/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 22:27:54 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Nerd Stuff]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=338</guid>
		<description><![CDATA[I&#8217;ve meant to work on this for quite a while. These are some of my most used code snippets to shorten a process, handy workarounds, pieces of code I need all the time or other such things. HTML: The Meta Redirect Use case: You need to redirect someone to another page, and don&#8217;t want to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve meant to work on this for quite a while.  These are some of my most used code snippets to shorten a process, handy workarounds, pieces of code I need all the time or other such things.</p>
<p><strong>HTML: The Meta Redirect</strong></p>
<p>Use case:  You need to redirect someone to another page, and don&#8217;t want to bother notifying them.</p>
<p>Code:
<pre class="qoate-code">&lt;meta http-equiv="refresh" content="0;url=http://www.absolutepath.to/page.php"&gt;</pre>
<p>Advantages:  Silent, works cross-platform, timer can be set (in whole seconds) by adjusting the 0 in content, will work in the body even though it&#8217;s a meta tag.<br />
Disadvantages:  Breaks back buttons.</p>
<p><strong>PHP/MySQL: Quickly process and sanitize form data.</strong></p>
<p>Use case:  You&#8217;ve just accepted a form and want to easily work with the data, and escape the data to prevent SQL injection attacks.</p>
<p>Code:
<pre class="qoate-code">foreach($_POST as $key=&gt;$value) { $$key=addslashes($value); }</pre>
<p>Advantages:  Saves a lot of repetitive entering of $_POST['element'].  Instead you just use $element.  Also escapes the data early on so we don&#8217;t forget further along in the code.<br />
Disadvantages:  You create a lot of variables instead of one array.  Your array isn&#8217;t actually destroyed, just copied.  The idea is that the backend is working primarily with this POST data so making a lot of variables isn&#8217;t an unwanted thing.</p>
<p><strong>PHP/MySQL:  Save an if statement on every mysql_error() check.</strong></p>
<p>Use case:  You need to use mysql_error() function to handle errors in your SQL statement.</p>
<p>Old code:
<pre class="qoate-code">$result = mysql_query($query);
if(!$result) { die(mysql_error()); }</pre>
<p>New code:
<pre class="qoate-code">$result = mysql_query($query) or die(mysql_error());</pre>
<p>Advantages: Reduces risk of typos breaking your page, cleaner.<br />
Disadvantages:  No known disadvantages.</p>
<p><strong>PHP/MySQL: One standardized method of DB querying.</strong></p>
<p>Use case:  You want to get in the habit of one naming scheme for your MySQL queries, and don&#8217;t want to go the OOP route.</p>
<p>Code:
<pre class="qoate-code">function doQuery($query) {
$result = mysql_query($query) or die(mysql_error());
return $result; }

...

$q_descriptivename = "SELECT * FROM table WHERE 1";
$descriptivename = doQuery($q_descriptivename);</pre>
<p>Note:  No advantage or disadvantage here, I just thought I&#8217;d share the way I do my queries.  I usually have a functions.php file with things like doQuery, doConnect, and so forth.  I then make the file a require_once() in my header.php. There are more efficient ways to do it via object-oriented code, but there are certainly less efficient ways too.</p>
<p><strong>PHP:  Regex out non-numerals from a phone number, then put them back for display purposes.</strong></p>
<p>Use case:  You have a form input for a phone number, and want to be guaranteed it works in your database.  If you&#8217;re trying to optimize and want to use a CHAR(10), or just want a unified dataset to work against.  Really it&#8217;s common sense to have all your data be uniformly stored here.</p>
<pre class="qoate-code">$phone=preg_replace("/[^0-9.]/", "", $phone); // strip non-numerals
		if (strlen($phone) == 7) { $phone = "505".$phone; } // if the user was too lazy to add their area code, add the expected one.  Handle this how you like.

...

$disp_phone = preg_replace("/^(\d{3})(\d{3})(\d{4})$/", "($1) $2-$3", $phone); //present it in the standard (123) 456-7890 format.</pre>
<p>Advantages:  Regular expressions take a lot of possible entries and catch them all.  One-line solutions are always preferable to a switch or some such.<br />
Disadvantages:  The code above is a very crude handling of too few numbers, but the regex can be tweaked to accommodate that or you can do it via Javascript.</p>
<p><strong>CSS:  3-column div-based website with a &#8220;sticky footer&#8221;</strong></p>
<p>Use case:  You find tables too outdated and confining, and would rather use divs and CSS.</p>
<p>Code: <a href="http://www.danieltharp.com/dev/3colstickyfooter.css">3colstickyfooter.css</a></p>
<p>Note:  The &#8220;sticky footer&#8221;, where the footer is on the bottom of the page even when the rest of the content doesn&#8217;t reach that far, is a surprisingly tricky behavior to get right.  You can see the result <a href="http://www.danieltharp.com/dev/projecthavana">here</a>.  Notice how the footer stays stuck to the bottom of the window as you resize it.</p>
<p><strong>PHP/CSS/HTML: Blind-friendly, captcha-free, spam-fighting input field.</strong></p>
<p>Use case: I had a client that was opposed to captchas, yet one of his forms was constantly hammered by spammers and filled his mailbox.  Thus I designed a hidden text input field that spambots fill out, blind users are audibly instructed to leave empty, and sighted users never see.</p>
<p>Code:
<pre class="qoate-code">HTML:

&lt;tr class="robotic"&gt;
&lt;td class="label"&gt;If you're human leave this blank.&lt;/td&gt;
&lt;td class="field"&gt;&lt;input name="url" type="text" id="url" /&gt;&lt;/td&gt;
&lt;td class="status"&gt;&lt;/td&gt;
&lt;/tr&gt;

...

CSS: tr .robotic { display: none; }

...

PHP: if(strlen($_POST['url']) &gt; 0) { die(); }</pre>
<p>Advantages:  The home-brewed nature of this solution has resulted in a 100% decrease in spam getting through. We thwart the spammer by knowing they don&#8217;t respect CSS; they just look at a page as raw HTML and fill in data wherever possible.  Naming the field &#8220;url&#8221; guarantees the spammer is going to put a link in it, and then the PHP sees there is data in the field and silently rejects it.  Just use a different input name for your real URL field.  This also eliminates false positives and frustrating re-validation attempts by end-users that can&#8217;t read the captcha.<br />
Disadvantages:  No known disadvantages.</p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2012/02/the-toolbelt-some-of-my-most-used-code-snippets-for-php-mysql-html-and-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pie to Finger Ratio</title>
		<link>http://danieltharp.com/weblog/2011/12/pie-to-finger-ratio/</link>
		<comments>http://danieltharp.com/weblog/2011/12/pie-to-finger-ratio/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 06:35:46 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[DanielTharp.com]]></category>
		<category><![CDATA[Nerd Stuff]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=334</guid>
		<description><![CDATA[I thought it would help me focus if I wrote down all the web projects I&#8217;m working on now. Project Havana: Lot of work to go, got some pretty jQuery animations going on but very little content. Lot of data entry to go, but I feel like this project has the best odds of being [...]]]></description>
			<content:encoded><![CDATA[<p>I thought it would help me focus if I wrote down all the web projects I&#8217;m working on now.</p>
<p>Project Havana:  Lot of work to go, got some pretty jQuery animations going on but very little content.  Lot of data entry to go, but I feel like this project has the best odds of being monetizable. (Is that a word?  It is now.)  Day-to-day investment of time seems like it could be quite high for a while.</p>
<p>Project Xenon:  Data entry&#8217;s done, and hell a lot of the code from Project FAST is reusable.  jQTouch is still eluding me with regards to passing data across the POST in PHP and still getting those pretty animations.  I need to buy that peepcode screencast and get it over with.  If I had a week to knock this out it would be donezo.  Not much oversight needed once the code is stable, especially when I&#8217;m not expecting much of an audience.</p>
<p>Ogre Game Labs:  Pretty much from scratch.  I think the stuff you learn from Project Havana will pay off here, because you&#8217;re gonna want that asynchronous data transfer.  It&#8217;s a must, actually.  So get Havana up and going, spread the word in the channels where you&#8217;ll get an instant audience.  Then re-evaluate how much of this you can do.  Day-to-day is a real wildcard, as is the eventual size of the audience.  Main competitor is only about 5,000-6,000 registered users but up to 200 concurrent sessions.  That&#8217;s serious stuff, but we&#8217;ve got a level of flexibility that they don&#8217;t.  I think.</p>
<p>Ogre Lair:  Operational.  Needs customization and getting moved to the correct domain.  I like that I&#8217;ll be able to hand the day-to-day of this one off.</p>
<p>Paid job for IPC:  Mostly data entry and their calendar left.</p>
<p>Paid job for AUMC: Done?  No callbacks so I think they&#8217;re done.</p>
<p>Paid job for NMBA:  Just the one associates page left, knock that out and get it off the whiteboard.</p>
<p>Project CSA:  Goodness this one is never gonna end.  Downside of working with the end-user on a daily basis is the scope of work is always changing.  Need to figure out a plan of attack, and where to start with the code.  You have the existing WO tool done, maybe that can be retrofitted.</p>
<p>Eight balls to juggle at once is about all I can stand, I need to knock these out.  Can we order them by ETA?<br />
AUMC (done?)<br />
NMBA (one page? come on)<br />
IPC<br />
Ogre Lair<br />
Havana<br />
CSA<br />
Xenon (just in no rush to do this one)<br />
Ogre Game Labs</p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2011/12/pie-to-finger-ratio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First World Dilemmas</title>
		<link>http://danieltharp.com/weblog/2011/12/first-world-dilemmas/</link>
		<comments>http://danieltharp.com/weblog/2011/12/first-world-dilemmas/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 19:45:52 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Fragrance]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=332</guid>
		<description><![CDATA[My creative impulses are dragging me all over the place. I&#8217;ve got about a half-dozen projects I want to work on and I&#8217;m paralyzed with indecision. Maybe writing them down will help. In no particular order, I want to&#8230; - Get started on the perfume I&#8217;m making for Eve. - Play the hell out of [...]]]></description>
			<content:encoded><![CDATA[<p>My creative impulses are dragging me all over the place.  I&#8217;ve got about a half-dozen projects I want to work on and I&#8217;m paralyzed with indecision.  Maybe writing them down will help.  In no particular order, I want to&#8230;</p>
<p>- Get started on the perfume I&#8217;m making for Eve.<br />
- Play the hell out of some Skyrim.<br />
- Make something in FL Studio.  I don&#8217;t really have a hook in my head to start with, though.<br />
- Finish configuring the netbook for emulator play.  Yesterday&#8217;s testing was mixed.  It&#8217;s fine with NES, Game Boy, Game Boy Color, and Sega Genesis, but some SNES games are choppy, particularly Super-FX enabled ones.  N64 games were hit and miss, I was getting probably 50fps on Super Mario 64 but it choked up a big hairball on Goldeneye and Hot Wheels Turbo Racing.  I haven&#8217;t bothered with my PSX roms.  I haven&#8217;t set up Quickplay for my MAME roms yet as it&#8217;s quite <a href="http://www.quickplayfrontend.com/index.php?showtopic=48&#038;st=0#entry739">involved</a>.<br />
- Get Quickbooks set up for Diana.  She&#8217;s wanting to learn how to use it so she has another marketable skill for the future job search.  The idea I had is that we can set up Shooting Star Perfumes as the business to learn with. It might get us back into making our own stuff.<br />
- Eat the hell out of some pizza.<br />
- Listen to some new albums that came out, particularly the new M83.<br />
- Channel former blogging buddy <a href="http://krooze.wordpress.com/">Krooze L. Roy</a> and review some old video games.  I hope he reads this some time, because I miss the hell out of his writing, and I still want him to message me some time about Amplitude on PS2.</p>
<p>And even out of so many tempting options, the combination of pizza and Skyrim is a siren&#8217;s call I am unable to ignore.  Bye.</p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2011/12/first-world-dilemmas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Brevity</title>
		<link>http://danieltharp.com/weblog/2011/12/329/</link>
		<comments>http://danieltharp.com/weblog/2011/12/329/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 22:58:34 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Deep Thoughts]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=329</guid>
		<description><![CDATA[Brevity is fine, I need to remember this. See you on Monday.]]></description>
			<content:encoded><![CDATA[<p><em>Brevity is fine,<br />
I need to remember this.<br />
See you on Monday.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2011/12/329/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Am I a writer?  Or just restless?</title>
		<link>http://danieltharp.com/weblog/2011/11/am-i-a-writer-or-just-restless/</link>
		<comments>http://danieltharp.com/weblog/2011/11/am-i-a-writer-or-just-restless/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 21:57:00 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Fragrance]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=327</guid>
		<description><![CDATA[There&#8217;s a certain self-righteous quality to calling yourself a writer when you have no published/paid work to your name. At that point you are closer to the truth if you refer to yourself as a &#8220;typist.&#8221; I have some friends, though, that exhibit that trait that I think is the telltale sign of a &#8220;real&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a certain self-righteous quality to calling yourself a writer when you have no published/paid work to your name.  At that point you are closer to the truth if you refer to yourself as a &#8220;typist.&#8221;  I have some friends, though, that exhibit that trait that I think is the telltale sign of a &#8220;real&#8221; writer, and that&#8217;s the urge to write almost constantly.</p>
<p>I have these urges, but I am usually sated by a one-liner or statement that&#8217;s been on my mind.  I have several friends that are finishing up on their <a href="http://www.nanowrimo.org" title="NaNoWriMo" target="_blank">NaNoWriMo</a> projects today.  A novel!  Jeez.  I don&#8217;t think I can keep a train of thought from derailing for that kind of length.  An overactive imagination needs an outlet, though, and I have many.  Lately it&#8217;s been Skyrim, but other common pastimes have been making perfumes, designing houses in The Sims 3, writing, trying to come close to the talent level of my 18-year old self at FL Studio, making stepcharts in StepMania, designing board, card, or role-playing games&#8230;I can keep busy.  There&#8217;s something deeply satisfying about writing, especially on a platform like this where I can toss these words into empty space and whatever happens, happens.</p>
<p>Every creative outlet of mine has a muse, and for writing it is two entities.  The first, my long-time muse, has been Jerry Holkins (Tycho Brahe) at Penny Arcade.  He puts out the most amazingly smooth, polished work three times a week and his tone just makes me happy, his sense for when to drop the flowery language and rage-curse for a while is incredible.  The second, a somewhat more recent find, are several of the writers at Cracked.  What&#8217;s more, they blatantly encourage writing at all skill levels.  Somehow, a website that routinely publishes lists like &#8220;The 7 Most Elaborate Dick Moves in Gaming History&#8221; has become a beacon for aspiring writers.</p>
<p>An <a href="http://www.cracked.com/blog/4-stunning-revelations-idiot-has-about-running/" title="4 Stunning Revelations an Idiot has about Running" target="_blank">article</a> that Robert Brockway (arguably my favorite writer on the Cracked staff, incidentally) put up today got me to thinking.  Three posts a week on here was the idea and that fell apart rather quickly.  I get a surprising amount of traffic for how little I post, so if I were to start up again I may end up with an even bigger audience.  If I were a &#8220;real&#8221; writer that shouldn&#8217;t matter, but I find it disheartening to write to an empty room.  And, I must admit, the fragrance industry is short on top-tier writers and I can&#8217;t help but be fascinated with the prospect of working in that industry.  So expect more reviews in the future as I sharpen my nose and writing chops.</p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2011/11/am-i-a-writer-or-just-restless/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brought to you by the letter 5</title>
		<link>http://danieltharp.com/weblog/2011/10/brought-to-you-by-the-letter-5/</link>
		<comments>http://danieltharp.com/weblog/2011/10/brought-to-you-by-the-letter-5/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 22:26:43 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Nerd Stuff]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=324</guid>
		<description><![CDATA[This morning I started in earnest on converting a WordPress theme for thelegendofmax.net into the nostalgic, 2003-2004 era site. So far it&#8217;s going quite well. I&#8217;m not sure exactly what I will do with a new old TLoM once it&#8217;s up and running but that&#8217;s neither here nor there. Step 1 is getting it set [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I started in earnest on converting a WordPress theme for thelegendofmax.net into the nostalgic, 2003-2004 era site.  So far it&#8217;s going quite well.  I&#8217;m not sure exactly what I will do with a new old TLoM once it&#8217;s up and running but that&#8217;s neither here nor there.  Step 1 is getting it set back up, then I can figure out what I&#8217;m gonna do with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2011/10/brought-to-you-by-the-letter-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Music Club?</title>
		<link>http://danieltharp.com/weblog/2011/08/music-club/</link>
		<comments>http://danieltharp.com/weblog/2011/08/music-club/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 07:01:44 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://danieltharp.com/weblog/?p=320</guid>
		<description><![CDATA[I&#8217;m thinking about starting a Spotify-centric music club. They&#8217;re a lot of fun, they get you to listen to stuff you wouldn&#8217;t normally listen to, you get to share your favorite artists with others, and you get to do some critical writing. I&#8217;m in favor of all these things. The format would be something like [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m thinking about starting a Spotify-centric music club.  They&#8217;re a lot of fun, they get you to listen to stuff you wouldn&#8217;t normally listen to, you get to share your favorite artists with others, and you get to do some critical writing.  I&#8217;m in favor of all these things.</p>
<p>The format would be something like so:  Each round, there is a theme, as vague as &#8220;Favorite Album&#8221; or something like &#8220;Guilty Pleasures&#8221;, &#8220;Favorite Release of the last 12 Months&#8221; or &#8220;8 Favorite Covers&#8221;.  Each week, we listen to one member&#8217;s selection and review it.  The order is determined at random for the first round and then the order is reversed every round after.  So a big club can take a while, but there&#8217;s no real rush and a week gives everyone time to listen and write, and if everyone&#8217;s done early you can start the next persons entry.  There&#8217;s a standardized grading scale to use, as well.</p>
<p>I&#8217;m probably gonna start this idea whenever I use up all my Spotify invites.  If you know you&#8217;re interested now, let me know and I&#8217;m gonna start a Facebook group.</p>
]]></content:encoded>
			<wfw:commentRss>http://danieltharp.com/weblog/2011/08/music-club/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

