<?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>ZiNgA BuRgA&#039;s Quacks</title>
	<atom:link href="http://zingaburga.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://zingaburga.com</link>
	<description>You shall find no incessant chirping here</description>
	<lastBuildDate>Fri, 08 Jul 2011 00:02:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Moved Server</title>
		<link>http://zingaburga.com/2011/07/moved-server/</link>
		<comments>http://zingaburga.com/2011/07/moved-server/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 00:01:55 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[PC]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=180</guid>
		<description><![CDATA[﻿Helloo~ another rare post from me! Recently shifted my websites from my old dedicated server to this VPS server &#8211; a move which I&#8217;ve been too lazy to do for like 2 years. The dedicated server was rather overkill for the website I&#8217;m running (originally had other plans, but didn&#8217;t follow them through) so have [...]]]></description>
			<content:encoded><![CDATA[<p>﻿Helloo~ another rare post from me!</p>
<p>Recently shifted my websites from my old dedicated server to this VPS server &#8211; a move which I&#8217;ve been too lazy to do for like 2 years.</p>
<p>The dedicated server was rather overkill for the website I&#8217;m running (originally had other plans, but didn&#8217;t follow them through) so have been paying too much for hosting for quite a while.</p>
<p>This new VPS is a Xen 1GB RAM, 30GB HDD, 1.5TB/mo from ChicagoVPS, using the <a href="http://www.lowendbox.com/blog/chicagovps-6-50-1gb-openvz-vps-in-chicago/">awesome deal here</a>.  Asked support to increase space to 50GB which they did for only $1.75/mo extra (awesomesauce).  They also agreed to supply a further yearly prepayment discount if I switch to an annual billing cycle, which I plan to do soon.  Been happy with speeds and I/O performance; CPU is a Xeon X3450 (Xeon equivalent of i7 920) so pretty cool too.</p>
<p>Now the fun part: setting the thing up.  Previously using CentOS 5 64-bit, but after using Debian, I somewhat like the setup better, so decided on Debian 6 32-bit for this server.  Server stack software:</p>
<p><strong>Webserver<br />
</strong>Running an nginx frontend proxying to an Apache backend, with PHP module.  Historically had issues with CGI/FastCGI, which is why I decided to go with the more familiar Apache PHP module, although the last time I tried FastCGI was years ago.  But nginx was great and allows me to run a minimalist Apache which works well for me.  Also I get the advantage of <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=907">accelerated proxy responses in XThreads</a>, although I&#8217;ve removed all the big downloads I used to have to fit in the 50GB disk space.</p>
<p>Unfortunately, different from my other installs of Apache with PHP module, it seems that Apache was leaking memory on this setup.  Went tweaking a few PHP configuration variables and seems to have magically gone away, me not knowing why.  Nevertheless, I decided on using a higher *SpareChildren configuration and a very low MaxRequestsPerChild to get around any possible memory leaks.  Apache itself only has 3 modules active (some configuration needed to be modified to accomodate this minimalist setup): mod_dir, mod_rewrite and mod_php5</p>
<p>Also have gotten nginx to send HTTP Expires headers, so pages will also load faster (since Firefox won&#8217;t be sending check requests waiting for HTTP 304 responses for static files).  But otherwise, configuring two servers is a bit more of an issue, especially with rewrite rules, but manageable.</p>
<p><strong>Database Server<br />
</strong>Have decided to go with MariaDB instead of MySQL here.  As with MySQL, the MariaDB defaults are a bit overkill for a 1GB server, so my.cnf needs tweaking.  Unfortunately though, there are many MySQL tweaking articles out there, but I didn&#8217;t find any for MariaDB &#8211; although MySQL largely translates over, there are parts which don&#8217;t.  So configuration took a bit more time and effort to get right.</p>
<p>Whilst disabling InnoDB and tweaking buffers is probably enough for a standard MySQL setup which only runs MyISAM tables, MariaDB includes, and activates by default, a number of other plugins which probably need to be disabled (such as PBXT).  Aria being the new internally used storage engine cannot be disabled, and you need to remember to tweak down the default buffer size in addition to the MyISAM buffers.</p>
<p>Speaking of Aria, I decided to switch all my tables to Aria format as it&#8217;s essentially an improved version of MyISAM anyway.  Everything seems smooth sailing so far.</p>
<p>As for database backups, I&#8217;ve decided to move away from the mysqldump command I&#8217;ve been using for so long.  Although I&#8217;d disabled table locking when dumping, so that the website didn&#8217;t lock up for 15 minutes during the dump, I&#8217;m not sure how appropriate that really is, not to mention that it seems like a lot of unnecessary load.  Considering alternatives, there seems to be only two: mysqlhotcopy or a replicated slave which I can run mysqldump on.  Latter requires more configuration so am considering the former.  However, mysqlhotcopy seems to lock all tables being dumped, which means the site locks up for about a 30 seconds whilst the database gets copied.  I&#8217;m not really worried about the downtime, but the fact that requests queue up on the server and quickly chews through RAM is something I do have to take into consideration.  As the mybb_posts table will obviously be the one taking the longest, and locking the table will only really affect new posts, it seems better to lock individual tables and copy, which will probably mean I&#8217;ll have to write my own script (or call mysqlhotcopy a few times).  There&#8217;s a slight possibility for data desynchronisation between tables, without referential integrity, but I&#8217;d presume this is somewhat rare.  Besides, if this really is an issue, it&#8217;s possible to group commonly used tables together.</p>
<p><strong>Other<br />
</strong>Well the webserver/PHP and database server are the most exciting to configure since they&#8217;re the heart of website-server (trying not to say &#8220;webserver&#8221; again).  Went with postfix instead of sendmail, and the email configuration wasn&#8217;t as scary as I thought it would be.  Nothing else particularly worth mentioning otherwise&#8230;</p>
<p><strong>Moving the server</strong><br />
Had originally planned to stagger the move.  Firstly moved zingaburga.com over, so I could identify any issues (such as the Apache memory leak).  After that, moving everything else over went pretty quickly, even the EP database (well, I did move all the attachments over before closing down the forums; included with setting the domain&#8217;s TTL to 60 seconds, there wasn&#8217;t that much downtime).</p>
<p>Unfortunately, the EP tables were defaulting to latin1 encoding.  This seems to have caused an issue as UTF-8 data was stored in them, and the default encoding for this new server is UTF-8.  Which meant hours of downtime, me staying up into the wee hours of the night repairing the encoding.  And then after I did that, I forgot to switch the users table back to textual formats (from binary fields) so no-one could actually log in.  Other bugs which I didn&#8217;t have before needed some nginx proxy tweaking but otherwise, everything seems to be well.</p>
<p>Overall, server seems to never be going over 500MB RAM usage for normal situations, so glad I got 1GB for plenty of headroom.  Am also surprised at this relatively low memory usage, despite me being rather generous to buffer sizes, but I guess tweaking pays off.</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2011/07/moved-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Too Much Bandwidth (or maybe, just quota)</title>
		<link>http://zingaburga.com/2011/02/too-much-bandwidth-or-maybe-just-quota/</link>
		<comments>http://zingaburga.com/2011/02/too-much-bandwidth-or-maybe-just-quota/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 10:55:24 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[PC]]></category>
		<category><![CDATA[internet]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=175</guid>
		<description><![CDATA[So, time for another pointless update on myself (well, I may as well post, otherwise this place would be entirely dead). I&#8217;ve posted a number of times before about my internet connection and that, and how you&#8217;ve probably figured that I&#8217;ll never shut up about it until something like the NBN comes (if it ever [...]]]></description>
			<content:encoded><![CDATA[<p>So, time for another pointless update on myself (well, I may as well post, otherwise this place would be entirely dead).</p>
<p>I&#8217;ve posted a <a href="http://zingaburga.com/tag/internet/">number of times before about my internet connection</a> and that, and how you&#8217;ve probably figured that I&#8217;ll never shut up about it until something like the <a href="http://en.wikipedia.org/wiki/National_Broadband_Network">NBN comes</a> (if it ever will).  But anyway, this might be a bit of a turn.</p>
<p>Right now, I&#8217;m on a 1.5Mbps connection with 25GB peak downloads and 120GB off-peak (2am &#8211; 12pm) quota per month. (if you&#8217;re wondering, the annoying slowdowns have since mysteriously vanished)  Exetel (my ISP) have decided to be a fag and increase prices by $10/month, so their lowest (non-shit) plan is now $50/month.  They <em>have</em> somewhat &#8220;compensated&#8221; by increasing quotas to 30GB+180GB off-peak (which will become 2am &#8211; 2pm), however, I&#8217;m already finding it really difficult to use up my current quota.</p>
<p>I&#8217;ve looked around, but for 1.5Mbps connections, it seems there really isn&#8217;t much cheaper available (thanks to Telstra&#8217;s dominance in the area) &#8211; probably the most I could save would be $5/month which would also require bundling with a phone.  Oh well.</p>
<p>So, back to the issue of using up the quota.  I guess I don&#8217;t really <em>have</em> to, but I guess I&#8217;ve developed this idea that I should, and despite myself saying it&#8217;s unnecessary, I&#8217;m always trying to find something to exhaust the bandwidth.  So yeah&#8230; downloading useless stuffs.  Especially difficult with me as I try to be conservative with bandwidth usage.  Am really starting to run out of ideas over what I should do with the quota &#8211; perhaps I should convince myself not to bother with it (and save some electricity by not having the computer on at 2am downloading stuff).</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2011/02/too-much-bandwidth-or-maybe-just-quota/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Streaming POST data through PHP cURL Using CURLOPT_READFUNCTION</title>
		<link>http://zingaburga.com/2011/02/streaming-post-data-through-php-curl-using-curlopt_readfunction/</link>
		<comments>http://zingaburga.com/2011/02/streaming-post-data-through-php-curl-using-curlopt_readfunction/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 01:32:58 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=171</guid>
		<description><![CDATA[Well, I haven&#8217;t posted here in quite some time&#8230; I&#8217;m not dead, and don&#8217;t plan on completely ditching this blog, but well&#8230; Anyway, onto the article. I had a PHP application where I wanted to upload part of a large file to some other server.  The naive method may be to simply split the file [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I haven&#8217;t posted here in quite some time&#8230; I&#8217;m not dead, and don&#8217;t plan on completely ditching this blog, but well&#8230;</p>
<p>Anyway, onto the article.</p>
<p>I had a PHP application where I wanted to upload <em>part</em> of a large file to some other server.  The naive method may be to simply split the file and upload through cURL, however I wanted to do this without any splitting.  So I needed a way to send a POST request, being able to build the request body on the fly (note, you&#8217;ll need to know the total size to be able to send the <code>Content-Length</code> header)</p>
<p>The obvious decision would be to use sockets rather than cURL, but I felt like seeing if it was possible with cURL anyway.  Although I&#8217;ll still probably use sockets (because it&#8217;s easier in the end), I thought this might (well, not really) be useful to one of the three readers I get every month.</p>
<p>Anyway, if you look at the <a href="http://php.net/manual/en/function.curl-setopt.php">curl_setopt documentation</a>, you&#8217;ll see a <code>CURLOPT_READFUNCTION</code> constant, however, how to really use it doesn&#8217;t seem clear (especially with the boundaries for <em>multipart/form-data </em>encoding type).  Also, the documentation is wrong.</p>
<p>Without further ado, here&#8217;s some sample code:</p>
<pre>&lt;?php

$boundary = '-----------------------------168279961491';
// our request body
$str = "$boundary\r\nContent-Disposition: form-data; name='how_do_i_turn_you'\r\n\r\non\r\n$boundary--\r\n";

// set up cURL
$ch=curl_init('http://example.com/');
curl_setopt_array($ch, array(
 CURLOPT_HEADER =&gt; false,
 CURLOPT_RETURNTRANSFER =&gt; true,
 CURLOPT_POST =&gt; true,
 CURLOPT_HTTPHEADER =&gt; array( // we need to send these two headers
 'Content-Type: multipart/form-data; boundary='.$boundary,
 'Content-Length: '.strlen($str)
 ),
 // note, do not set the CURLOPT_POSTFIELDS setting
 CURLOPT_READFUNCTION =&gt; 'myfunc'
));

// function to stream data
// I'm not sure what the file pointer $fp does in this context
// but $ch is the cURL resource handle, and $len is how many bytes to read
function myfunc($ch, $fp, $len) {
 static $pos=0; // keep track of position
 global $str;
 // set data
 $data = substr($str, $pos, $len);
 // increment $pos
 $pos += strlen($data);
 // return the data to send in the request
 return $data;
}

// execute request, and show output for lolz
echo curl_exec($ch);
curl_close($ch);
</pre>
<p>Hopefully the comments give you enough idea how it all works.</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2011/02/streaming-post-data-through-php-curl-using-curlopt_readfunction/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PMPs &#8211; Why do People Ignore Compression?</title>
		<link>http://zingaburga.com/2010/11/pmps-why-do-people-ignore-compression/</link>
		<comments>http://zingaburga.com/2010/11/pmps-why-do-people-ignore-compression/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 00:07:51 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[PC]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[pmp]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=167</guid>
		<description><![CDATA[One thing I notice is that many portable devices, companies sell higher capacity versions for exorbitant premiums, when flash memory really isn&#8217;t that expensive.  Seems to be less of an issue for players which do include an (mini/micro)SDHC expansion slot, as you can effectively increase capacity with a cheap add-on card. But despite this, it [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I notice is that many portable devices, companies sell higher capacity versions for exorbitant premiums, when flash memory really isn&#8217;t that expensive.  Seems to be less of an issue for players which do include an (mini/micro)SDHC expansion slot, as you can effectively increase capacity with a cheap add-on card.</p>
<p>But despite this, it seems that many people really do pay these excessive premiums for this increased storage.  I sometimes do wonder how people fill up so much space, eg getting a 32GB player over a 16GB one.  Surely these people have lots of videos and music, probably more than they need, and obviously, a higher capacity player allows them to carry more on the same device.</p>
<p>Whilst this is fine for the majority who aren&#8217;t so technically inclined, I do wonder about the people who <em>are</em> more technically inclined, and them overlooking the other side of the equation.  For example:</p>
<p style="text-align: center;">Amount of music that can be stored = Storage capacity ÷ per song size</p>
<p>Now we want to be able to store more music (again, even if it&#8217;s a lot more than we need), but the general approach of simply upping storage capacity is only one part of the equation &#8211; most people, even more technically inclined people, seem to ignore the fact that you can also store more stuff <em>by reducing the file sizes of media!</em></p>
<p>Admittedly, compressing stuff can take effort.  In fact, I&#8217;ve had a number of motivations that most probably never had, including the old days of me trying to fit MP3s on floppies, squish as much as I could out of my 4GB harddrive, squeeze music on a 256MB MP3 player, and packing videos onto my 1GB PSP memory stick.  However, with a bit of reading, it&#8217;s mostly sticking your music/videos into a batch converter and then copying everything across.  It&#8217;s slightly less convenient when you add stuff (you probably need to pass these through a converter too), though, personally, I&#8217;m used to doing this, so I don&#8217;t mind.</p>
<p>But does compression really yield much benefit?  From what I&#8217;ve seen, I&#8217;d say so.  It seems most people just dump their 128/192/256/320kbps MP3s (usually more 320kbps as this is a popular size in P2P) on the device and that&#8217;s all they care about.  From the fact that most people cannot tell defects in 128kbps MP3s (let&#8217;s just say it&#8217;s <a href="http://lame.sourceforge.net/">LAME</a> encoded), and my own listening tests, I&#8217;d say that most people cannot hear defects in 56-64kbps HE-AAC (encoded with <a href="http://www.nero.com/eng/downloads-nerodigital-nero-aac-codec.php">NeroAAC</a>).  Support for this format is limited though (difficulty of implementing SBR on embedded devices), though I believe Rockbox supports it, along with the latest iDevices (pre-late-2009 do not support HE-AAC).  Next in line would be 80-96kbps OGG Vorbis, if your player supports it.  In fact, I cannot personally hear defects in 128kbps Vorbis, so even audiophiles could use a big space saving by using higher bitrate Vorbis.  But support for Vorbis is surprisingly low, considering that this is a royalty free codec.</p>
<p>For an audio format with a fair bit of support, would be LC-AAC (aka &#8220;AAC&#8221;) which achieves similar quality to 128kbps MP3 at around 96-112kbps (using NeroAAC or iTunes).  Failing that, using LAME to encode MP3s with a variable bitrate can yield decent quality with average bitrates around 112kbps.</p>
<p>Now if we assume that the average song is a 320kbps MP3 and the listener really can&#8217;t hear defects in 128kbps MP3s, <em>and</em> the underlying player supports HE-AAC, we could get a massive 320-56 = 264kbps saving (82.5% smaller!) by being a bit smarter in storing our music.  This equates to being able to store over 5 times more music in the same amount of space.  But of course, this is an optimal situation, and may not always work.  Even if we&#8217;re more conservative, and say that the average MP3 is 192kbps, and the underlying player only supports LC-AAC, we can still get a 50% reduction in size by converting the 192kbps MP3 to 96kbps LC-AAC, which equates to a doubling in storage space.</p>
<p>Videos are perhaps more difficult to get right as the parameters involved in video encoding is significantly more complex than audio encoding (also note that videos often include audio).  But from what I&#8217;ve seen, significant space savings can be gained by encoding videos more intelligently, but it&#8217;s hard to provide rough figures as most people do convert videos for their portable devices, but use a wide variety of applications and settings.  For reference, I see a lot of &gt;100MB PSP encoded anime episodes, however, I can personally get them to around 30-40MB using a x264 crf of 25 and ~8MB audio stream (allowing me to easily store a 12 episode anime series on a 1GB stick, with plenty of space to spare).</p>
<p>So for those who don&#8217;t compress their media, maybe give it a bit of a shot and see what space savings you can get.  You may be surprised at how much 16GB can really store.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 144px; width: 1px; height: 1px; overflow: hidden;"><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG /> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-AU</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:EnableOpenTypeKerning /> <w:DontFlipMirrorIndents /> <w:OverrideTableStyleHps /> </w:Compatibility> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val="&#45;-" /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="9" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="20" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-fareast-language:EN-US;} --> <!--[endif] --></p>
<p class="MsoNormal"><span>×</span></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2010/11/pmps-why-do-people-ignore-compression/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Why would anyone buy an iMac?</title>
		<link>http://zingaburga.com/2010/11/why-would-anyone-buy-an-imac/</link>
		<comments>http://zingaburga.com/2010/11/why-would-anyone-buy-an-imac/#comments</comments>
		<pubDate>Fri, 05 Nov 2010 04:48:56 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[PC]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[imac]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=162</guid>
		<description><![CDATA[People who know me probably know that I&#8217;m a lot more anti-Apple than I am anti-Microsoft, but that&#8217;s besides the point here. Was browsing some ads that got sent to my house today and I saw an ad for an iMac (as Apple tightly controls prices, I would expect them to be similar across stores) [...]]]></description>
			<content:encoded><![CDATA[<p>People who know me probably know that I&#8217;m a lot more anti-Apple than I am anti-Microsoft, but that&#8217;s besides the point here.</p>
<p>Was browsing some ads that got sent to my house today and I saw an ad for an iMac (as Apple tightly controls prices, I would expect them to be similar across stores) and, seriously quite shocked at what was on offer.  The cheapest system had:</p>
<p style="padding-left: 30px;">Intel i3 3GHz CPU<br />
4GB RAM (probably DDR3)<br />
500GB Harddisk<br />
256MB ATI Radeon HD 4670 GPU<br />
21.5in screen<br />
MacOSX 10.6</p>
<p>All for AU$1598!  To put this in perspective, my current computer, which I bought in 2008 <strong>when the AUD crashed</strong> cost me less, <em>and</em> is still more powerful than the above.  This is what I paid:</p>
<p style="padding-left: 30px;">Intel Core2Quad Q6600 [$295] (FYI: a C2D E8500 was about $285 at the time &#8211; <a href="http://www.anandtech.com/bench/Product/118?vs=55">comparison with i3</a>)<br />
4GB DDR2 <strong>1066MHz </strong>Kingmax RAM [$95]<br />
640GB Samsung F1 7200rpm HDD [$89]<br />
512MB ATI RadeonHD 4670 GPU [$119]<br />
Gigabyte EP45-DS4P motherboard [$199] (that&#8217;s a rather expensive motherboard BTW)<br />
Antec NSK6580 case with 430W Earthwatts PSU [$128]<br />
Logitech Desktop 350 (basic kb+mouse) [$22]</p>
<p>&#8230;which totals $947.  If we add in a 21.5in screen [probably under $200 at the time] and a DVD burner [around $30 at the time], and even add in a copy of Windows (around $200) it&#8217;s <em>still significantly</em> cheaper than the iMac <em>today</em> even disregarding the fact that the AUD was worth 60% of what it&#8217;s worth today, relative to the USD.  Oh, and yes, my system pretty much beats the iMac in every way, not to mention it&#8217;s far more customisable and not as locked down as anything Apple make.</p>
<p>Okay, Apple&#8217;s stuff is absurdly expensive, this is probably nothing new.  From what I&#8217;ve heard, people may buy Apple stuff for its design.  But is the design really any good?  I personally don&#8217;t think so.</p>
<p>Our Uni recently replaced all library computers with iMacs (different to the one advertised, so I may be a little misinformed here) and I really don&#8217;t like their design in a number of ways.  After using one for a while, this is my thoughts so far:</p>
<p><strong>The Screen and Machine<br />
</strong></p>
<ul>
<li>It&#8217;s big, heavy and somewhat cumbersome.  It appears you can only tilt the screen forward and backwards.  Although most screens (especially cheaper ones) don&#8217;t seem to be terribly adjustable, I much prefer the Dells in the IT labs, where you can adjust the height, swivel horizontally and rotate the screen itself on the stand.</li>
<li>It&#8217;s glossy.  I don&#8217;t know WTF people make glossy screens.  If I wanted to see my own face, I&#8217;d look in a mirror.  If I wanted to see that bright light behind me, which is reflecting off this stupid glossy screen, I&#8217;d look directly at it (but I wouldn&#8217;t, I&#8217;m not that stupid).  But when I&#8217;m looking at a screen, I want to see what&#8217;s actually on there.</li>
<li>I can&#8217;t seem to find any controls on the screen.  Maybe there&#8217;s some on the back, but I didn&#8217;t look too much.  Not that screen controls should be on the back anyway.</li>
<li>USB ports.  The last time I used a computer which didn&#8217;t have USB ports at the front was made about 10 years ago.  Apple helps you bring back those memories by not putting USB ports at the front (or sides).  As for the back USB ports, the number of them is somewhat limited&#8230;<br />
I did actually later realise that there were USB ports on the side of the keyboard.  I guess that&#8217;s a reasonable way to do things, though I still would be concerned whether these ports supply enough power for a portable HDD.</li>
<li>Actually, make it that there&#8217;s <em>nothing</em> useful on the front or sides of the screen.  The power button is conveniently located at the back of the screen, so if you want to turn it on, you&#8217;re going to have to pull the screen forward, and then turn it around so you can reach the button (making sure you don&#8217;t pull out any cords), then do the reverse to return the screen to its original position.</li>
<li>The back doesn&#8217;t appear to have that many ports, though I didn&#8217;t check much (not easy to), and certainly looks a lot less than what my Gigabyte EP45-DS4P motherboard supplies.</li>
<li>I still haven&#8217;t managed to find where the optical drive is&#8230;</li>
</ul>
<p><strong>The Keyboard</strong></p>
<ul>
<li>Is small and flat &#8211; very much like a laptop keyboard.  Maybe some people prefer laptop keyboards, but I don&#8217;t.</li>
<li>Has very little extra keys.  Fair enough I guess, but overall, seems like a cheapish keyboard and hardly anything I&#8217;d pay a premium for.  Overall quite usable though.</li>
<li>Doesn&#8217;t have a Windows key, for all those planning to install Windows on it (the Uni library iMacs all run Windows).  Fair enough from an Apple standpoint I guess.</li>
</ul>
<p><strong>The Mouse</strong></p>
<ul>
<li>The trackball is quite small.  At first I didn&#8217;t like it, but after a while of using it, it seems okay.  In fact, it being a ball allows you to horizontally scroll quite nicely, despite many applications not supporting horizontal scrolling, but I guess that&#8217;s not the mouse&#8217;s fault.</li>
<li>One-button design.  Despite its looks, the mouse can actually distinguish left, centre (the ball) and right button clicks reasonably well, however, only if you push your fingers in the right place.  Unfortunately, as this is a single button design, there isn&#8217;t really any clear way to feel where the right place is without looking, apart from finding the ball with your fingers and distinguishing left and right portions from there.  If you push too close to the centre though, you can inadvertently get the mouse to press the wrong button.</li>
<li>From the above, you cannot click the left and right mouse button at the same time.  Not important for most applications perhaps, though I know some games require (or can be enhanced with the ability) both buttons to be pressed at the same time.</li>
<li>Like the keyboard, the mouse is fairly basic and has no extra side buttons and the like.  Hardly anything I&#8217;d pay a premium for.</li>
</ul>
<p>So there&#8217;s my thoughts on the iMac.  Seriously overpriced and badly designed.  Unless you absolutely must use OSX (and unwilling to build a Hackintosh) or just an avid Apple fanboi, I can&#8217;t see why anyone would rationally buy this hunk of junk.</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2010/11/why-would-anyone-buy-an-imac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New USB Stick</title>
		<link>http://zingaburga.com/2010/10/new-usb-stick/</link>
		<comments>http://zingaburga.com/2010/10/new-usb-stick/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 02:06:57 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[PC]]></category>
		<category><![CDATA[filesystems]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=158</guid>
		<description><![CDATA[I&#8217;ve had a number of USB sticks in the past, and from historical situations, they tend to last around 2 years for me.  My current (well, actually, previous, now) USB is a Transcend 8GB, and I&#8217;ve already been using it for over 2.5 years, so I&#8217;ve been wondering if this thing is going to die.  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a number of USB sticks in the past, and from historical situations, they tend to last around 2 years for me.  My current (well, actually, previous, now) USB is a Transcend 8GB, and I&#8217;ve already been using it for over 2.5 years, so I&#8217;ve been wondering if this thing is going to die.  Maybe it&#8217;s better, maybe it&#8217;s just luck, but I decided to leave out that risk factor and get myself a new USB just in case. (yes, I do manually backup data, but backups are only so good)</p>
<p>Anyway, one of the things bothering me with this Transcend stick is the horrible speeds it has.  Running portable apps like Firefox Portable takes forever to load, and saving anything on the USB has a noticeable latency lag.  As USBs are really cheap these days, I decided to look for a faster stick, rather than a large one.  I&#8217;m only using around 300-500MB anyway, and rarely go above 700MB unless I&#8217;m in the rare situation where I&#8217;m transferring some large files (in which case, I don&#8217;t mind bringing my USB HDD to do that), so I could easily live on a 2GB USB, perhaps 4GB for good measure.</p>
<p>Unfortunately, it seems all the faster USB drives are also large.  Looking around, the best that appealed to me were the 8GB Corsair Voyager and Patriot XT Xporter Boost from Umart (which now sell for around $25).  Drives like the OCZ Throttle and Corsair Voyager GT I could only find in at least 16GB sizes, which cost significantly more, and I seriously don&#8217;t need all that space.</p>
<p>Then I saw that MSY were selling a Patriot Xporter Rage 8GB for $25, so I decided to get one of them.  After some Googling though, I was a little worried on whether it delivered its advertised speed, finding <a href="http://www.patriotmem.com/forums/showthread.php?t=4310">a thread</a> where users were complaining about the 16GB version&#8217;s write speeds, also hinting that the larger drives (64GB) may actually deliver on the advertised speeds (and I&#8217;m getting a smaller 8GB one).  But anyway, I went ahead and bought it (after they managed to get one in stock) for $24 (yay, $1 saving!).</p>
<p>Bringing it home, it&#8217;s formatted as FAT32 with a 64KB sector by default.  I do seem to get around 25MB/sec on sequential writes (woot!).  64KB sector is a bit excessive, but as I don&#8217;t really care about space, I don&#8217;t mind it.</p>
<p>As for the physical drive itself, it&#8217;s slightly smaller than the Transcend, and its capless design, I actually like.  On my old stick, it&#8217;s a little slider at the side, which you push forward to push out the USB connector.  On this one, you push the entire back part of the casing forward to reveal the USB connector.  A thing about the capless designs is that applying pressure to the USB port can cause it to retract (a pain if it gets loose and you don&#8217;t quite fit the connector in properly), but with the new Patriot drive, you&#8217;re naturally going to be applying pressure from the back of the USB stick, so it doesn&#8217;t really matter.  Anyway, the outside is also slightly rubbery, though I don&#8217;t think the additional grip is much importance.  The thing I don&#8217;t like is that it no longer has an indicator activity LED.</p>
<p>So, now that I have a 8GB stick, what to fill it up with?  As this is supposedly a fast drive, I decided to stick some bootable stuff on it, just in case I ever need it (unlikely, but oh well).  I&#8217;m too lazy on how to read up on making Linux boot drives, so I just used <a href="http://www.pendrivelinux.com/boot-multiple-iso-from-usb-multiboot-usb/">this</a> and added some stuff that might come in handy &#8211; <a href="http://www.ultimatebootcd.com/">UBCD</a>, <a href="http://www.sysresccd.org/">System RescueCD</a> and <a href="http://www.ubuntu.com/">Ubuntu 10.10</a> (Knoppix and Bart&#8217;s PE might&#8217;ve been nice; would be nice to have a quick booting text based Linux distro which runs a shell script at bootup &#8211; might be useful for quickly performing some offline actions on a PC).</p>
<p>Unfortunately, the formatting process also reverts the drive&#8217;s sector size to 4KB, but it seems that Acronis Disk Director, which I happened to have installed, is able to convert sector sizes, so I upped it to 64KB.  First time I tried, it didn&#8217;t work (maybe cause I didn&#8217;t reboot the PC as it asked me to).  Out of interest, I noticed that Disk Director allowed creating multiple filesystems on a USB (Windows disk management doesn&#8217;t allow this), however, it seems that Windows just ignores other filesystems on the drive&#8230;  Anyway, reformatted and recreated the drive a second time, upping the sector size to 64KB and it worked.  Except that I got some warnings in the bootloader about the sector size &gt; 32KB.  Despite that everything worked, I decided to just convert the thing down to 32KB for good measure anyway.</p>
<p>So that&#8217;s the wondrous story of my new USB, where Firefox Portable doesn&#8217;t take forever to load.  Maybe it&#8217;ll mean that I take up more space, since I used to stick everything in self extracting EXEs on my old drive (would extract stuff to C: drive and run from there as sequential reads on the USB were reasonable, as opposed to random reads).</p>
<p>Oh, and I&#8217;m also running a git repo on there too, with <a href="http://www.syntevo.com/smartgit/">SmartGit</a> as my portable Git client. (tip, you don&#8217;t need the full MSYS Git for it to work, just git.exe and libiconv.dll seem to be enough)</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2010/10/new-usb-stick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delv into Git</title>
		<link>http://zingaburga.com/2010/10/delv-into-git/</link>
		<comments>http://zingaburga.com/2010/10/delv-into-git/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 05:50:45 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=155</guid>
		<description><![CDATA[A few days ago, I decided to start a git repository (+ github account) for my XThreads MyBB plugin.  I never really believed this plugin to be complex enough to really require version control, but as I have never used git before, I decided to use it as an opportunity to test it out and [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I decided to start a git repository (+ <a href="http://github.com/zingaburga/XThreads-MyBB-Plugin">github account</a>) for my <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads MyBB plugin</a>.  I never really believed this plugin to be complex enough to really require version control, but as I have never used git before, I decided to use it as an opportunity to test it out and gain some experience with it.</p>
<p>I&#8217;ve previously had experience with SVN, and felt that it was rather clunky for handling most personal projects, and the idea of a decentralised version control system (DVCS) somewhat appealed to me.  I did some research before diving into git &#8211; apparently, one of git&#8217;s criticisms is its steep learning curve.  But I still chose it above other systems such as <a href="http://en.wikipedia.org/wiki/Mercurial">Mercurial</a>, mainly due to its popularity.  I decided to counter this difficult learning curve by using a <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> to do most of the stuff for me.</p>
<p>So far, I really do quite like this system over SVN:</p>
<ul>
<li>I no longer have to run an SVN server on my computer (don&#8217;t really like running background services that much), and/or have to always commit to a remote server</li>
<li>Potentially, I could put it on a USB and commit stuff when away from home (except no TortoiseGit; maybe there&#8217;s a nice Windows based git GUI somewhere&#8230;)</li>
<li>It doesn&#8217;t have pesky .svn folders all over the place, so you can simply copy out or package the stuff you&#8217;re distributing without having to worry about performing an export</li>
<li>Being all contained within a folder, you can easily make a backup copy of the repo if you wish, and restore it if you totally trash the repo</li>
<li>It seems a lot faster than SVN.  Maybe it&#8217;s because I&#8217;ve only got a very small amount of code, but it does certainly seem faster, despite the MSYS builds of Git apparently being slower than the Linux ones.</li>
</ul>
<p>One negative is that it doesn&#8217;t have revision numbers like SVN does.  Possibly this is due to it being designed for non-linear development.  Maybe the feature is there somewhere (as git is said to be powerful) or can be implemented in some way, but it appears that the stock system doesn&#8217;t support revision numbers (I guess commit dates can be a reasonable proxy for linear development).</p>
<p>Using public key authentication over passwords is an interesting one &#8211; I haven&#8217;t really thought about it, but my 2 second intuition doesn&#8217;t seem to show much benefit.  Maybe it&#8217;s because it uses SSH rather than HTTP (SVN)?</p>
<p>As for GitHub, their issue tracker seems to be basic compared to something like Redmine.  I also noticed that it doesn&#8217;t seem to have the ability to diff between arbitrary revisions (would be really useful IMO).<br />
But I guess it&#8217;s probably sufficient for a personal project (although I would like to be able to diff between multiple revisions).</p>
<p>Overall, I somewhat like this system, and in fact may put a lot of my code under Git version control, if I can get a better USB drive and maybe learn the Git command line (or find a good portable Git GUI).</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2010/10/delv-into-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compressing PSP ISOs with 7z deflate</title>
		<link>http://zingaburga.com/2010/09/compressing-psp-isos-with-7z-deflate/</link>
		<comments>http://zingaburga.com/2010/09/compressing-psp-isos-with-7z-deflate/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 00:51:48 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[PSP]]></category>
		<category><![CDATA[ciso]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[multi-threading]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=149</guid>
		<description><![CDATA[Many applications which compress data, do so using the free zlib library.  It&#8217;s relatively fast and provides a good speed/compression ratio for most applications, but above anything else, I imagine it&#8217;s huge popularity is due to it being licensed under a very liberal license. zlib implements the deflate compression algorithm (same algorithm used in the [...]]]></description>
			<content:encoded><![CDATA[<p>Many applications which compress data, do so using the free <a href="http://www.zlib.net/">zlib</a> library.  It&#8217;s relatively fast and provides a good speed/compression ratio for most applications, but above anything else, I imagine it&#8217;s huge popularity is due to it being licensed under a very liberal license.</p>
<p>zlib implements the <a href="http://en.wikipedia.org/wiki/Deflate">deflate compression algorithm</a> (same algorithm used in the popular ZIP file format, as well as GZip, PNG, PDF etc), and supports 9 compression levels (10, if you include &#8220;no compression&#8221; as a level), 9 being the highest compression level (at the expense of compression speed).</p>
<p>It may be somewhat known that <a href="http://www.7-zip.org/">7-Zip</a> implements its own deflate algorithms (not to be confused with the .7z format or its default LZMA algorithm) which tend to outperform zlib in terms of compression, at the expense of speed.  Some applications, such as <a href="http://advancemame.sourceforge.net/comp-readme.html">AdvanceCOMP</a>, have, thus, leveraged this to allow some files to have slightly higher compression ratios than that created with most applications.</p>
<p>Now, all CISO/CSO (compressed ISO) makers, for compressing PSP ISOs use zlib, so I imagined that replacing this with a 7z implementation of deflate would allow CSOs of smaller size to be made.</p>
<p>The CSO format compresses the ISO in blocks for 2048 bytes each (probably to match the ISO sector size) to allow the format to actually be read on the fly and playable on the PSP.  This does, unfortunately, mean that there&#8217;s a hit to compression, and therefore, CSOs will larger than an ISO compressed with GZip (assuming same deflate algorithm and settings).</p>
<p>But due to the above structure, it also means that compression can easily be made multi-threaded, simply by passing blocks around to different threads to compress.  So I decided to make such an application, not only to get the benefits of smaller CSOs, but also as an exercise in multi-threaded programming (haven&#8217;t really done this before).  The latter was somewhat a bit of a challenge, and I may write a separate blog post on it, but I have managed to compress some ISOs without it corrupting the thing, or just deadlocking during the process.</p>
<p>Unfortunately, the results seem to be somewhat disappointing.  I recall trying to compress the Europe release of Loco Roco and I only got about a 500KB smaller CSO compared to zlib level 9.  Just tried DJ Max Portable 2 ISO, using 7z&#8217;s deflate, 5 passes, fastbytes = 255, NC ratio = 98% (if compression ratio is above this, it will store the block uncompressed; the default ciso compressor doesn&#8217;t do this):</p>
<p style="padding-left: 30px;">Uncompressed ISO: 1,778,319,360 bytes<br />
Compressed with zlib 9: 1,637,928,332 bytes<br />
Compressed with 7z: 1,636,999,514 bytes</p>
<p>So a disappointing gain of less than 1MB or 0.057%.  Granted, more can be done to achieve higher ratios (test with various fastbytes sizes, check with <a href="http://advsys.net/ken/utils.htm">kzip</a>, apply <a href="http://www.walbeehm.com/download/">DeflOpt</a>, maybe even reference duplicate blocks) but I doubt any of these would give even close to the gain I&#8217;ve gotten here, not to mention that they&#8217;d increase compression time by a lot.  The above process, with 6 threads, already took around 18 minutes on my Core 2 Quad Q6600 CPU @2.4GHz (was consuming 90%+ CPU throughout the process; I haven&#8217;t implemented I/O threading, which may allow it to get closer to 100%).  Compare this to the standard ciso compressor which (okay, I didn&#8217;t actually measure this) only took a few minutes to do, and this is only a single threaded app.</p>
<p>Oh well, at least I got some experience with multi-threaded programming, and I guess 1MB is still 1MB&#8230;  Maybe it&#8217;ll work better for popstation, as it seems to be using a larger block size of 37,632 bytes (=18*2048 or 16*2352?).</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2010/09/compressing-psp-isos-with-7z-deflate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Safe PHP expressions in templates</title>
		<link>http://zingaburga.com/2010/09/safe-php-expressions-in-templates/</link>
		<comments>http://zingaburga.com/2010/09/safe-php-expressions-in-templates/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 22:54:13 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[MyBB]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=146</guid>
		<description><![CDATA[In regards to my PHP in Templates MyBB plugin, I&#8217;ve been thinking of the possibility of using &#8220;safe expressions&#8221;, that is, allowing &#60;if&#62; conditionals without allowing admins to enter in &#8220;undesirable&#8221; PHP. I came up with an idea yesterday, which I&#8217;m giving a shot at. Basically, there&#8217;s probably only two main types of undesirable code: [...]]]></description>
			<content:encoded><![CDATA[<p>In regards to my <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=260">PHP in Templates MyBB plugin</a>, I&#8217;ve been thinking of the possibility of using &#8220;safe expressions&#8221;, that is, allowing &lt;if&gt; conditionals without allowing admins to enter in &#8220;undesirable&#8221; PHP.</p>
<p>I came up with an idea yesterday, which I&#8217;m giving a shot at.</p>
<p>Basically, there&#8217;s probably only two main types of undesirable code:</p>
<ul>
<li>arbitrary modifications of any kind</li>
<li>retrieving restricted information</li>
</ul>
<p>So, any arbitrary PHP code which does neither of the above should be considered &#8220;safe&#8221;, although I admit that I feel a little edgy over this assumption.</p>
<p>For the first point, there&#8217;s only really three ways to perform any modifications in PHP:</p>
<ul>
<li>Assignment operations (<code>=</code>, <code>+=</code>, <code>|=</code>, <code>++</code> etc) &#8211; this can easily be blocked by finding them in the code (after removing strings); interestingly, PHP doesn&#8217;t allow expressions such as <code>$a--$b</code>, instead, they need to be written (IMO properly) as <code>$a-(-$b)</code></li>
<li>Functions/statements (<code>unset</code>, <code>fopen</code>, <code>mysql_query</code> etc) &#8211; a whitelist of allowable functions could feasibly block this, although there&#8217;d need to be a huge list of allowable functions &gt;_&gt;</li>
<li>Executing processes (backtick operator, eg <code>`ls -a`</code>) &#8211; just simply block this operator</li>
</ul>
<p>For the second point, the MyBB template system already allows some information gathering by printing variables (eg <code>$_SERVER[...]</code>) so I won&#8217;t consider this to be an issue, instead, I&#8217;ll block some constants, such as <code>__FILE__</code> and <code>PHP_OS</code>, which don&#8217;t seem to be easily printable through the MyBB templates system.  The other thing is through functions/statements, which we&#8217;re already going to whitelist, so shouldn&#8217;t be an issue.</p>
<p>After all that, we just have to consider a few &#8220;backdoors&#8221;:</p>
<ul>
<li>Executing code within PHP strings, eg <code>"{${phpinfo()}}"</code></li>
<li>Variable function calls, eg <code>$func()</code></li>
</ul>
<p>Hopefully, this catches all the bad expressions.</p>
<p>I&#8217;m planning on releasing a separate version of the plugin which will not accept these bad expressions.</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2010/09/safe-php-expressions-in-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So busy&#8230;</title>
		<link>http://zingaburga.com/2010/09/so-busy/</link>
		<comments>http://zingaburga.com/2010/09/so-busy/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 03:53:38 +0000</pubDate>
		<dc:creator>ZiNgA BuRgA</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://zingaburga.com/?p=143</guid>
		<description><![CDATA[Well, I haven&#8217;t updated this blog in quite a while.  I haven&#8217;t forgotten about it, rather, I&#8217;ve been hung up with so much to do lately.  Just finished my mid-semester exams, so at least that&#8217;s done &#8211; doesn&#8217;t mean I&#8217;ll update this any time soon any way, for the 2 people or 100 spammers who [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I haven&#8217;t updated this blog in quite a while.  I haven&#8217;t forgotten about it, rather, I&#8217;ve been hung up with so much to do lately.  Just finished my mid-semester exams, so at least that&#8217;s done &#8211; doesn&#8217;t mean I&#8217;ll update this any time soon any way, for the 2 people or 100 spammers who actually visit my blog.</p>
<p>/useless post</p>
]]></content:encoded>
			<wfw:commentRss>http://zingaburga.com/2010/09/so-busy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

