<?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>Blue Topaz Games</title>
	<atom:link href="http://www.bluetopazgames.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.bluetopazgames.com</link>
	<description>A developers blog.</description>
	<lastBuildDate>Sat, 28 Aug 2010 15:47:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>S3CMD continued</title>
		<link>http://www.bluetopazgames.com/?p=164</link>
		<comments>http://www.bluetopazgames.com/?p=164#comments</comments>
		<pubDate>Sat, 28 Aug 2010 15:47:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon s3 s3cmd]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=164</guid>
		<description><![CDATA[Ok, I&#8217;ve been using the s3cmd more and more lately. s3cmd has a sync and delete command that can actually speed up deletes significantly. If you want to delete a few thousand files or maybe a million instead of taking days with other tools you can blast through deleting s3 objects by running several processes [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I&#8217;ve been using the s3cmd more and more lately.<br />
s3cmd has a sync and delete command that can actually speed up deletes significantly. If you want to delete a few thousand files or maybe a million instead of taking days with other tools you can blast through deleting s3 objects by running several processes of s3cmd at once.</p>
<p>There are 2 ways to delete files.<br />
<code><br />
s3cmd del --recursive --force s3://bucketname<br />
s3cmd sync --delete-removed /tmp/empty s3://bucketname<br />
</code></p>
<p>/tmp/empty is an empty directory.</p>
<p>Get 5-20 processes with these commands running and you&#8217;ll be motoring along. I&#8217;ve read horror stories about people trying to delete a billion records it costing them lots of money because it takes a long time. </p>
<p>Doing 5 processes I&#8217;m deleting probably 5x as fast as 1 process right now so I&#8217;m happy with the delete recursive command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=164</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL finding duplicate records.</title>
		<link>http://www.bluetopazgames.com/?p=148</link>
		<comments>http://www.bluetopazgames.com/?p=148#comments</comments>
		<pubDate>Mon, 23 Aug 2010 18:37:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQL Programming]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=148</guid>
		<description><![CDATA[When adding unique indexs to tables to prevent data duplication you discover there are already duplicates in the table you wish to fix/improve. Here&#8217;s a quick way to list records with duplicates. select count( id ) as cnt, id from table group by id having cnt > 1 You still have to go through and [...]]]></description>
			<content:encoded><![CDATA[<p>When adding unique indexs to tables to prevent data duplication you discover there are already duplicates in the table you wish to fix/improve.</p>
<p>Here&#8217;s a quick way to list records with duplicates.</p>
<p>select count( id ) as cnt, id from table<br />
group by id<br />
having cnt > 1</p>
<p>You still have to go through and figure out what data is valid and such but it definitely saves time to run that query first.  In MySQL you can run the following query to view all of the records in a table that are duplicate (make&#8217;s it easier to know which ones to delete then).</p>
<p>select * from table where id in (<br />
select id from (<br />
select count( id ) as cnt, id from table group by id<br />
having cnt > 1 ) as table_alias )<br />
order by id</p>
<p>This will list of the rows that have duplicates in order so you can see which records to delete in your favorite mysql client.</p>
<p>If you want something simpler and are not necessarily interested in what record might have better data.<br />
<a href="http://www.justin-cook.com/wp/2006/12/12/remove-duplicate-entries-rows-a-mysql-database-table/">Follow these instructions here on creating a new table to get rid of duplicate rows</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web based chat and shout boxes.</title>
		<link>http://www.bluetopazgames.com/?p=144</link>
		<comments>http://www.bluetopazgames.com/?p=144#comments</comments>
		<pubDate>Wed, 14 Jul 2010 18:37:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=144</guid>
		<description><![CDATA[Here are some of the solutions I've found or have dealt with lately when trying to find the perfect solution to website(s) I'm working on.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a strong advocate of chatting and texting on the internet. One of the first things I ever used the internet for was chatting on the irc.undernet back when it was popular and the place to be.</p>
<p>These days there are many different chat options.<br />
Every website should probably have some place that users can communicate in a real time manner.</p>
<p>Here are some of the solutions I&#8217;ve found or have dealt with lately when trying to find the perfect solution to website(s) I&#8217;m working on.</p>
<p><a href='http://www.chatango.com/'>Chatango</a><br/><br />
Probably the easiest chat program to add to your website with the most features.</p>
<p>Advantages: </p>
<ul>
<li>It&#8217;s easy to add to your website.</li>
<li>Has excellent moderation abilities. </li>
<li>Easy to customize. </li>
<li>Some popular websites use it.</li>
</ul>
<p>Disadvantages: </p>
<ul>
<li>Authentication is handled by chatango.</li>
</ul>
<p><a href='http://www.lightirc.com/'> Light IRC </a>.<br/><br />
It allows you to use the existing IRC servers and put your users in popular channels.<br />
It&#8217;s a very interesting solution and could be used to draw traffic to your site as well as providing a place<br />
for people to chat. The only major downside I&#8217;ve seen so far is that it generates an error message when<br />
navigating away from a page that sounds like it was exploiting some security hole in IE.</p>
<p>Advantages: </p>
<ul>
<li> Works with IRC </li>
<li> Very customizable.</li>
<li> Authentication is customizable. </li>
<li> Create your own custom channels or put your users into existing channels. </li>
<li> You can purchase a full solution. </li>
</ul>
<p>Disadvantages:</p>
<ul>
<li> Uses IRC protocol so chat isn&#8217;t remembered between page reloads. </li>
<li> Possible javascript exploit in older browsers. </li>
<li> Runs off their server but you can purchase a better solution if needed. </li>
</ul>
<p><a href='http://www.ajaxdaddy.com/demo-jquery-shoutbox.html'> Ajaxdaddy.com Shout Box </a><br />
I ended up using this solution since I could tailor it to my needs.<br />
I found 1 or 2 bugs to fix and that was it. It worked how I needed it to.<br />
I wasn&#8217;t looking for the &#8220;ultimate&#8221; solution just something that would work with my websites authentication and did what I needed it to do. Even so I still had to put a bit of work into this.</p>
<p>Advantages: </p>
<ul>
<li> It&#8217;s a shout box. It does what it needs to do well. </li>
</ul>
<p>Disadvantages:</p>
<ul>
<li> Requires more work to get working.
<li>
<li> Has fewer features then most chats. </li>
<li> Bug 1: It caches data on IE. Add a random # or date to the jquery getJSON call </li>
<li> Bug 2: Times were incorrect 19:02:05 would show up as 19:2:5. </li>
</ul>
<p>Once I fixed those two bugs I was pretty happy with the solution.<br />
There are still a few minor things to fix as well but overall I&#8217;m happy with ajaxdaddy shoutbox.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=144</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Performance.</title>
		<link>http://www.bluetopazgames.com/?p=136</link>
		<comments>http://www.bluetopazgames.com/?p=136#comments</comments>
		<pubDate>Sat, 26 Jun 2010 04:00:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=136</guid>
		<description><![CDATA[I&#8217;ve noticed the performance of my PHP is dog slow. I&#8217;ve since put in some debugging code and performance measuring code. My code might not be as modular or pretty looking but at least it will work in a reasonable amount of time. Object oriented PHP is causing me many performance headaches. It was disgustingly [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed the performance of my PHP is dog slow. I&#8217;ve since put in some debugging code and performance measuring code. My code might not be as modular or pretty looking but at least it will work in a reasonable amount of time. Object oriented PHP is causing me many performance headaches. It was disgustingly slow.</p>
<p>Here&#8217;s a link to probably the best guide/page on the net on PHP optimisation.</p>
<p>http://www.wardontheweb.com/10-performance-tips-to-speed-up-php/</p>
<p>Another decent site/page with citations/references:</p>
<p>http://www.hm2k.com/posts/50-php-optimisation-tips-revisited</p>
<p><strong>Problem Solved</strong><br />
It turns out much of my class headaches came from an extremely slow classloader function.<br />
So if you are having issues with PHP class loading look into what your class loader is doing.<br />
Mine was searching everywhere for the class and this was wasting gobs of time.<br />
Meanwhiles all classes were in 2 directories.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=136</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yum and Git on Centros 4/4.5</title>
		<link>http://www.bluetopazgames.com/?p=137</link>
		<comments>http://www.bluetopazgames.com/?p=137#comments</comments>
		<pubDate>Wed, 23 Jun 2010 02:58:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=137</guid>
		<description><![CDATA[Trying to install software on linux sometimes can be a real pain. Sure yum is great but some hosts such as MediaTemple don&#8217;t have that installed. So here&#8217;s a list of the commands I had to run in order to get Yum installed on a Centros 4.* box in an attempt to install another program: [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to install software on linux sometimes can be a real pain.<br />
Sure yum is great but some hosts such as MediaTemple don&#8217;t have that installed.<br />
So here&#8217;s a list of the commands I had to run in order to get Yum installed<br />
on a Centros 4.* box in an attempt to install another program:</p>
<p>Everything for centros 4.* is located here now => http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/</p>
<p><code><br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-libs-4.3.3-32_nonptl.i386.rpm http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-4.3.3-32_nonptl.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/popt-1.9.1-32_nonptl.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-python-4.3.3-32_nonptl.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-2.6.16-12.6.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-python-2.6.16-12.6.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-python-4.3.3-32_nonptl.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm<br />
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm<br />
</code></p>
<p>After installing that amazing number of packages for yum. It turns out the program I wanted wasn&#8217;t even available from yum. So I looked elsewhere.</p>
<p>To install &#8220;Git&#8221; you can do the following:</p>
<p><code><br />
rpm -Uvh http://download.fedora.redhat.com/pub/epel/4/i386/git-core-1.5.4.7-3.el4.i386.rpm  http://download.fedora.redhat.com/pub/epel/4/i386/perl-Git-1.5.4.7-3.el4.i386.rpm<br />
</code></p>
<p>Everything is downloaded from Fedora Redhat.<br />
It runs ~/git  woo. Now to see if I can use git to fetch my source/respository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=137</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Libraries and Tools.</title>
		<link>http://www.bluetopazgames.com/?p=131</link>
		<comments>http://www.bluetopazgames.com/?p=131#comments</comments>
		<pubDate>Sat, 22 May 2010 20:07:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=131</guid>
		<description><![CDATA[Here are some javascript libraries and tools that I find useful: http://jquery.com/ http://www.bitrepository.com/ajax-login-modal-box.html http://tablesorter.com/docs/]]></description>
			<content:encoded><![CDATA[<p>Here are some javascript libraries and tools that I find useful:</p>
<p>http://jquery.com/</p>
<p>http://www.bitrepository.com/ajax-login-modal-box.html</p>
<p>http://tablesorter.com/docs/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=131</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perforce/VSS/CSV and Subversion: Mistakes Made</title>
		<link>http://www.bluetopazgames.com/?p=122</link>
		<comments>http://www.bluetopazgames.com/?p=122#comments</comments>
		<pubDate>Fri, 14 May 2010 08:15:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Coding Blunder Mistake]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=122</guid>
		<description><![CDATA[A Bug/Version control software story: I figured I would share one of my most embarassing development stories with the whole wide internet. This happened about 10 years ago and never happened again since so I think I&#8217;ve learned from the mistake. I had been working on a particularly crappy piece of code that no one [...]]]></description>
			<content:encoded><![CDATA[<p>A Bug/Version control software story:</p>
<p>I figured I would share one of my most embarassing development stories with the whole wide internet. This happened about 10 years ago and never happened again since so I think I&#8217;ve learned from the mistake.</p>
<p>I had been working on a particularly crappy piece of code that no one else in the company wanted to do. I call it crappy because no one in their right mind would go about trying to modify MFC code to do what I was doing.<br />
I was Hacking MFC to make tab panes for dialogs that had a particular behaviour. At the time I had barely an inkling of win32 coding at the time and modifying MFC is was a lesson in pain I wouldn&#8217;t want to inflict on my worst enemy.</p>
<p>After spending nearly a week or more I had just finished the tabbed dialogs and went to check in my completed work.<br />
I had not checked in my work for nearly a week but since everything seemed to work AOK I went to check it in.<br />
However, instead of checking in my code I mistakenly got the lastest code I checked in. It overwrote all of my work and changes up until that point.</p>
<p>Lets just say I had a panic attack. I&#8217;ve had 1 case before that where someone else had overwritten my code but up until that point I&#8217;ve never had that myself. In the previous case I was able to retrieve the code because it was on a FAT disk system. For whatever reason this time around I wasn&#8217;t able to get my code back. (NTFS ARGGG)<br />
All I know is I didn&#8217;t retrieve files this time around and within a couple weeks I was out of a job.</p>
<p>What did I learn from that mistake?</p>
<p>1. Check your code in daily. If the class compiles. Check it in.</p>
<p>2. Use an editor that has a local history. (eclipse, etc)<br />
That way if you do &#8220;get latest&#8221; over some file you can restore it.</p>
<p>Occationally I do &#8220;get lastest&#8221; over code I had not intended. However with the tools and experience<br />
I&#8217;ve found the mistakes can be minimized.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=122</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript prompt() replacements</title>
		<link>http://www.bluetopazgames.com/?p=121</link>
		<comments>http://www.bluetopazgames.com/?p=121#comments</comments>
		<pubDate>Mon, 10 May 2010 03:41:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Javascript programming]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=121</guid>
		<description><![CDATA[javascript prompt() replacement. I wanted a simple to use function to ask the user for some information. The javascript prompt() function seemed like a good way of doing this until you notice the security issues with IE. So I visited google and started looking for replacements. http://www.anyexample.com/webdev/javascript/ie7_javascript_prompt()_alternative.xml Tried it out. Works. Didn&#8217;t like the design. [...]]]></description>
			<content:encoded><![CDATA[<p>javascript prompt() replacement.</p>
<p>I wanted a simple to use function to ask the user for some information.<br />
The javascript prompt() function seemed like a good way of doing this until<br />
you notice the security issues with IE.<br />
So I visited google and started looking for replacements.</p>
<p>http://www.anyexample.com/webdev/javascript/ie7_javascript_prompt()_alternative.xml</p>
<p>Tried it out. Works. Didn&#8217;t like the design.</p>
<p>http://www.skybound.nl/products/javascript/Prompt/</p>
<p>Tried it. Works. Not polished.</p>
<p>http://meteora.astrata.com.mx/</p>
<p>Tried it. Works. Works and looks nice.</p>
<p>http://abeautifulsite.net/2008/12/jquery-alert-dialogs/</p>
<p>Tried it. Using it based on suggestion from another developer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=121</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding and Removing duplicate data from SQL Tables</title>
		<link>http://www.bluetopazgames.com/?p=120</link>
		<comments>http://www.bluetopazgames.com/?p=120#comments</comments>
		<pubDate>Sun, 09 May 2010 21:50:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SQL Programming]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=120</guid>
		<description><![CDATA[Here&#8217;s an decent article with various methods of finding duplicate data in databases with SQL. http://www.delphifaq.com/faq/delphi/database/f20.shtml Removing duplicate data can be a troublesome task as well. One of the fastest ways to do so involves creating a new table with a unique index to the column you wish to purge of duplicate data. Then you [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an decent article with various methods of finding duplicate data in databases with SQL.</p>
<p>http://www.delphifaq.com/faq/delphi/database/f20.shtml</p>
<p>Removing duplicate data can be a troublesome task as well. One of the fastest ways to do so involves creating a new table with a unique index to the column you wish to purge of duplicate data.</p>
<p>Then you copy data over form the original table to the new using a insert ignore into table ( columns ) select columns from table type of query. Don&#8217;t forget the &#8220;ignore&#8221; otherwise the batch insert will fail at the first case of a duplicate piece of data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=120</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determine if mod_rewrite is enabled using php/environment vars</title>
		<link>http://www.bluetopazgames.com/?p=119</link>
		<comments>http://www.bluetopazgames.com/?p=119#comments</comments>
		<pubDate>Sat, 10 Apr 2010 15:09:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://www.bluetopazgames.com/?p=119</guid>
		<description><![CDATA[A useful way to determine if mod_rewrite is enabled using php/environment vars. I googled this post and thought it was useful. This is useful for anyone switching between windows development + a linux deployment /w mod rewrite. It was on the 2nd or 3rd page of my google results so I&#8217;m putting it here http://christian.roy.name/blog/detecting-modrewrite-using-php]]></description>
			<content:encoded><![CDATA[<p>A useful way to determine if mod_rewrite is enabled using php/environment vars. I googled this post and thought it was useful. This is useful for anyone switching between windows development + a linux deployment /w mod rewrite. It was on the 2nd or 3rd page of my google results so I&#8217;m putting it here <img src='http://www.bluetopazgames.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>http://christian.roy.name/blog/detecting-modrewrite-using-php</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bluetopazgames.com/?feed=rss2&amp;p=119</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
