<?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>whats the plot &#187; technology</title>
	<atom:link href="http://whatstheplot.com/blog/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://whatstheplot.com/blog</link>
	<description>a plotting plotter plotted a plot at whatstheplot.com</description>
	<lastBuildDate>Mon, 23 Jan 2012 10:56:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>ramadan kareem!</title>
		<link>http://whatstheplot.com/blog/2011/07/31/ramadan-kareem-2/</link>
		<comments>http://whatstheplot.com/blog/2011/07/31/ramadan-kareem-2/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 00:47:13 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[islam]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ramadan]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=618</guid>
		<description><![CDATA[ramadan kareem!  just for fun, here&#8217;s a list of some of the things i&#8217;ll be using this ramadan insha&#8217;Allah: quran android &#8211; free, open source quran android application. haramainrecordings &#8211; latest mp3s for salah at the haramain (including taraweeh!)  these guys are awesome masha&#8217;Allah! guidance for mac &#8211; know what time salah is with this [...]]]></description>
			<content:encoded><![CDATA[<p>ramadan kareem!  just for fun, here&#8217;s a list of some of the things i&#8217;ll be using this ramadan insha&#8217;Allah:</p>
<ul>
<li><a title="quran android" href="https://market.android.com/details?id=com.quran.labs.androidquran">quran android</a> &#8211; free, open source quran android application.</li>
<li><a title="haramain recordings" href="http://www.haramainrecordings.com">haramainrecordings</a> &#8211; latest mp3s for salah at the haramain (including taraweeh!)  these guys are awesome masha&#8217;Allah!</li>
<li><a title="guidance" href="http://batoulapps.com/software/guidance/">guidance for mac</a> &#8211; know what time salah is with this useful tool on osx.</li>
</ul>
<div>i want to remind myself and you guys to keep the ummah in our prayers, especially since many people are undergoing difficulties, war, tyranny, and so on&#8230;</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2011/07/31/ramadan-kareem-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>dstar html5</title>
		<link>http://whatstheplot.com/blog/2011/06/19/dstar-html5/</link>
		<comments>http://whatstheplot.com/blog/2011/06/19/dstar-html5/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 13:38:46 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[gamedev]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=588</guid>
		<description><![CDATA[wanted to play around with html5, so came up with this html5 version of dstar.  it&#8217;s less than 100 lines of code (not including the levels and simple html).  it&#8217;s based on the ti and hp48 versions of the same game.  this version only has 2 levels.  graphics by @somaiagabr. source code could be better, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/code/dstar_html5/levels.js" title="levels javascript code"></a>wanted to play around with html5, so came up with <a title="dstar5 html" href="/code/dstar_html5/">this</a> html5 version of dstar.  it&#8217;s less than 100 lines of code (not including the levels and simple html).  it&#8217;s based on the ti and hp48 versions of the same game.  this version only has 2 levels.  graphics by <a title="somaiagabr on twitter" href="http://twitter.com/somaiagabr">@somaiagabr</a>.</p>
<p>source code could be better, but you can find the non-minified game logic <a title="dstar source" href="/code/dstar_html5/dstar.js">here</a> and the levels <a title="levels" href="/code/dstar_html5/levels.js">here</a>.  if i were to try to optimize this, i would start at the levels, since each level could be represented as 27 bytes (+2 bytes metadata) instead of 108 bytes.</p>
<p><strong>click <a href="/code/dstar_html5/" title="dstar html5">here</a> to play!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2011/06/19/dstar-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>search quran with alfredapp on osx</title>
		<link>http://whatstheplot.com/blog/2011/06/01/search-quran-with-alfredapp-on-osx/</link>
		<comments>http://whatstheplot.com/blog/2011/06/01/search-quran-with-alfredapp-on-osx/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 00:05:51 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[quran]]></category>
		<category><![CDATA[screenshots]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=567</guid>
		<description><![CDATA[if you don&#8217;t already use alfred on osx, you really should!  it&#8217;s a great application launcher for osx.  i switched to alfred shortly after quicksilver development stopped (although it is now back again).  anyhow, alfred is awesome!  the application itself is free (and there&#8217;s an option to buy some additional features via the powerpack).  according [...]]]></description>
			<content:encoded><![CDATA[<p>if you don&#8217;t already use <a title="alfredapp" href="http://alfredapp.com" target="_blank">alfred</a> on osx, you really should!  it&#8217;s a great application launcher for osx.  i switched to alfred shortly after quicksilver development stopped (although it is now back again).  anyhow, alfred is awesome!  the application itself is free (and there&#8217;s an option to buy some additional features via the powerpack).  according to alfred, on my laptop, &#8220;<a title="alfredapp on twitter" href="http://twitter.com/alfredapp" target="_blank">@alfredapp</a> has been shown 2,319 times. Average 13.4 times per day.&#8221;</p>
<p>to install the quran search plugin, just click <a title="Quran Search on Alfred" href="alfredapp://customsearch/Search Quran/quran/utf8/url=http://quran.com/search?q={query}" target="_blank">here</a>.  also, make sure to check out the <a title="alfred tips" href="http://alfredtips.com/home/" target="_blank">alfred tips</a> page for many more cool custom searches.</p>
<p><img class="aligncenter" title="Quran Search on Alfred" src="/images/quran.alfred.06.02.2011.png" alt="" width="623" height="164" /></p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2011/06/01/search-quran-with-alfredapp-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>updating osx for egypt&#8217;s dst changes</title>
		<link>http://whatstheplot.com/blog/2011/04/28/updating-osx-for-egypts-dst-changes/</link>
		<comments>http://whatstheplot.com/blog/2011/04/28/updating-osx-for-egypts-dst-changes/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 05:55:23 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[egypt]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[timezones]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=539</guid>
		<description><![CDATA[as people in egypt know, dst was cancelled in egypt: &#8220;&#8230;Egypt&#8217;s interim cabinet decided on Wednesday to cancel daylight saving time after a poll posted on its website showed the majority of Egyptians would approve the cancellation.&#8221; (via almasryalyoum). so, what do us apple users do until apple releases a fix?  @vodafoneegypt suggested that people [...]]]></description>
			<content:encoded><![CDATA[<p>as people in egypt know, dst was cancelled in egypt:</p>
<blockquote><p>&#8220;&#8230;Egypt&#8217;s interim cabinet decided on Wednesday to cancel daylight saving time after a poll posted on its website showed the majority of Egyptians would approve the cancellation.&#8221; (via <a title="almasryalyoum" href="http://www.almasryalyoum.com/en/node/407168">almasryalyoum</a>).</p></blockquote>
<p>so, what do us apple users do until apple releases a fix?  <a title="VodafoneEgypt" href="http://twitter.com/vodafoneegypt">@vodafoneegypt</a> <a title="VodafoneEgypt's fix" href="http://www.tweetdeck.com/twitter/VodafoneEgypt/~q0Sgr">suggested</a> that people switch to the Harare time zone.  not my cup of tea.  thinking about manually changing your time?  <a title="failed to validate oauth and token on twitter oauth - check your clock" href="http://blainegarrett.com/2009/07/14/failed-to-validate-oauth-signature-and-token-on-twitter-oauth-check-your-cloc/">bad idea</a> if you have a twitter client.</p>
<p>so how do you properly fix it?  here&#8217;s a set of instructions that i adopted (based off of <a title="osx fix argentina dst october 2009" href="http://brickybox.com/2009/10/18/os-x-fix-argentina-dst-october-2009">this post</a> from argentina and <a title="new zealand dst change osx and java" href="http://juretta.com/log/2007/10/05/new_zealand_daylight_saving_time_change_mac_os_x_and_java/">this post</a> from new zealand) to properly solve the problem in egypt.</p>
<p><strong>updating osx<br />
</strong></p>
<p>as people who have dealt with timezones before know, the timezones are updated via the zoneinfo database.  you can see more information on the database <a title="tzdata on wikipedia" href="http://en.wikipedia.org/wiki/Tzdata">on wikipedia</a>.</p>
<p>1.  download the latest tzdata file from <a title="tzdata2011g.tar.gz" href="ftp://elsie.nci.nih.gov/pub/tzdata2011g.tar.gz">here</a> (currently, this links to 2011 version g, updated as of 4/25/2011, however, check <a title="ftp://elsie.nci.nih.gov/pub/" href="ftp://elsie.nci.nih.gov/pub/">here</a> to see if there is a newer one).</p>
<p>2.  run the following commands:</p>
<pre class="brush: bash; title: ; notranslate">
mkdir a
cd a
tar xzf ../tzdata2011g.tar.gz
sudo zic africa
</pre>
<p>by the way, just for fun, open the africa file and search for egypt &#8211; you&#8217;ll notice all the different times egypt&#8217;s timezone rules changed <img src='http://whatstheplot.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   anyhow, at this point, your command line (terminal) time should be correct &#8211; verify it by typing <code>date</code>.  you&#8217;ll notice, however, that your system clock is still wrong.  let&#8217;s fix it&#8230;</p>
<p>3.  so the time in osx is not just affected by updating the zoneinfo database &#8211; you also need to update the icu database so that it also uses the latest zoneinfo database. <strong> if you have xcode and want to build manually</strong>, download <a title="ICU-400.40.tar.gz" href="http://www.opensource.apple.com/tarballs/ICU/ICU-400.40.tar.gz">icu</a> from apple (i am using 400.40, but you can check <a title="ICU tarballs" href="http://www.opensource.apple.com/tarballs/ICU/">here</a> if there&#8217;s a later one).  otherwise, jump to step 4b.</p>
<p>4a.  <strong>if you have xcode</strong>, run the following commands:</p>
<pre class="brush: bash; title: ; notranslate">
tar xzf ICU-400.40.tar.gz
cd ICU-400.40
cd icuSources/tools/tzcode
# ./icuSources/tools/tzcode/readme.txt tells us that placing a tzdata
# file in the tzcode directory will compile with that zoneinfo database

# copy the tzdata file from step 1 here
cp ~/Downloads/tzdata2011g.tar.gz .
cd ../..

# compile
./runConfigureICU MacOSX --with-data-packaging=archive
gnumake
# if you want, backup your current icu file first
cp /usr/share/icu/icudt40l.dat ~

# replace the data file only
sudo install -o root -g wheel -m 0644 -Sp data/out/icudt40l.dat /usr/share/icu/icudt40l.dat
</pre>
<p>4b.  <strong>if you don&#8217;t have xcode</strong>, you can download my icudt40l.dat file from <a title="icudt40l.2001g.bz2" href="http://whatstheplot.com/misc/icudt40l.2001g.bz2">here</a> and install it by doing:</p>
<pre class="brush: bash; title: ; notranslate">
bunzip2 icudt40l.2001g.bz2
mv icudt40l.2001g icudt40l.dat
sudo install -o root -g wheel -m 0644 -Sp icudt40l.dat /usr/share/icu/icudt40l.dat
</pre>
<p>reboot your system and you should be good to go!</p>
<p><strong>ios?<br />
</strong>although technically speaking, the same steps for osx apply, the icu file is a different version (icu46l.dat) &#8211; i built icu4c-4.6.1 and pushed the dat file to my iphone, but unfortunately, it didn&#8217;t fix the problem.  unfortunately, i don&#8217;t have solution for this one yet <img src='http://whatstheplot.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> <strong><br />
</strong></p>
<p><strong>java developer?</strong></p>
<p>if you are a java developer, you&#8217;ll notice that java&#8217;s time is also wrong&#8230;  this is because java also has its own timezone database that needs updating.  although, <del>sun</del> oracle provides a tool for fixing this, it is only up to 2011e (rather than 2011g) as of the time of this post.</p>
<p>you can verify that the time is wrong by running a program like this:</p>
<pre class="brush: java; title: ; notranslate">
import java.util.Date;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.GregorianCalendar;

public class Test {
 public static void main(String[] args){
 Calendar cal = new GregorianCalendar(TimeZone.getTimeZone(&quot;Africa/Cairo&quot;));
 cal.setTimeInMillis(new Date().getTime());
 System.out.format(&quot;%1$tT (%1$tB %1$td %1$tY)&quot;, cal);
 }
}
</pre>
<p>sure enough, one hour off.   when the package is updated for the 2011g changes, you&#8217;ll download the latest version, extract it, and then run:</p>
<pre class="brush: bash; title: ; notranslate">
sudo java -Djava.vendor=&quot;Sun Microsystems Inc.&quot; -jar tzupdater.jar -v -u
</pre>
<p>if you were to do this now, you&#8217;d update to 2011e, which still doesn&#8217;t include the fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2011/04/28/updating-osx-for-egypts-dst-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>what do you name your computers?</title>
		<link>http://whatstheplot.com/blog/2010/06/27/what-do-you-name-your-computers/</link>
		<comments>http://whatstheplot.com/blog/2010/06/27/what-do-you-name-your-computers/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 22:43:02 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[random]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=481</guid>
		<description><![CDATA[my machines typically have had some sort of video game related (and specifically, rpg related) names. some names i&#8217;ve used in the past: meribia &#8211; a town from the lunar rpgs weltall &#8211; a &#8220;gear&#8221; name from xenogears termina &#8211; a city from chrono cross zanarkand &#8211; a city from ffx dalmasca &#8211; a city [...]]]></description>
			<content:encoded><![CDATA[<p>my machines typically have had some sort of video game related (and specifically, rpg related) names.</p>
<p>some names i&#8217;ve used in the past:</p>
<ul>
<li>meribia &#8211; a town from the lunar rpgs</li>
<li>weltall &#8211; a &#8220;gear&#8221; name from xenogears</li>
<li><strong>termina</strong> &#8211; a city from chrono cross</li>
<li>zanarkand &#8211; a city from ffx</li>
<li><strong>dalmasca</strong> &#8211; a city name from ffxii</li>
<li><strong>lab32</strong> &#8211; a location from chrono trigger</li>
</ul>
<p>the machine names in bold are in-use as of this post&#8217;s writing.  some of these were actually named for a reason &#8211; <em>termina</em> was named because it&#8217;s a linux box (ie a linux <em>termina</em>-l), for example, and <em>zanarkand</em> was named because it was a far away city (and the laptop traveled far away from home).  interestingly enough, zanarkand actually refers to &#8220;zanarkand ruins,&#8221; a place left in ruins in ffx.  by mere coincidence, this happened to also become the <a href="http://masr.whatstheplot.com/2010/06/11/the-aftermath-of-the-accident/">fate of that laptop</a>.</p>
<p>i&#8217;ve typically named servers by city names (ie <em>makkah</em>, <em>madinah</em>, <em>aqsa</em>), but have now started using names related to the domain name(s) hosted on that machine.</p>
<p>oh, and any printer i have gets named <em>hydralisk</em>, after the famous zerg creatures from starcraft.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2010/06/27/what-do-you-name-your-computers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>desktop screenshot for february 2010</title>
		<link>http://whatstheplot.com/blog/2010/02/25/desktop-screenshot-for-february-2010/</link>
		<comments>http://whatstheplot.com/blog/2010/02/25/desktop-screenshot-for-february-2010/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 07:08:18 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[screenshots]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=463</guid>
		<description><![CDATA[here&#8217;s a screenshot of my linux box taken on february 25th, 2010. click the image above for the full sized view. linux desktop running openbox, a bunch of transparent urxvt terminals, cairo clock, and trayer (with banshee, pidgin, transmission, pino, dropbox, guake, and tomboy running). i recently finished watching the old star trek movies, hence [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://whatstheplot.com/images/screenshot-02.25.2010.png"><img alt="" src="http://whatstheplot.com/images/thumbnail-02.25.2010.png" title="screenshot, feb 25th, 2010" class="aligncenter" width="384" height="240" /></a><br />
here&#8217;s a screenshot of my linux box taken on february 25th, 2010.  click the image above for the full sized view.  linux desktop running openbox, a bunch of transparent urxvt terminals, cairo clock, and trayer (with banshee, pidgin, transmission, pino, dropbox, guake, and tomboy running).</p>
<p>i recently finished watching the old star trek movies, hence the star trek influenced desktop.  and, of course, here&#8217;s <a href="http://www.youtube.com/watch?v=9eTUz61LNjo">the problem with teleportation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2010/02/25/desktop-screenshot-for-february-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rtm versus toodledo</title>
		<link>http://whatstheplot.com/blog/2009/09/26/rtm-versus-toodledo/</link>
		<comments>http://whatstheplot.com/blog/2009/09/26/rtm-versus-toodledo/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 07:40:44 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=368</guid>
		<description><![CDATA[last year, i signed up for a 1 year subscription to rememberthemilk. now that it has expired, i&#8217;ve started wondering whether i should re-subscribe or switch to something else (toodledo appears to be a popular option). so i made a toodledo free account and imported my tasks from rtm &#8211; fairly straight forward and easy [...]]]></description>
			<content:encoded><![CDATA[<p>last year, i signed up for a 1 year subscription to <a href="http://rememberthemilk.com">rememberthemilk</a>.  now that it has expired, i&#8217;ve started wondering whether i should re-subscribe or switch to something else (<a href="http://toodledo.com">toodledo</a> appears to be a popular option).</p>
<p>so i made a toodledo free account and imported my tasks from rtm &#8211; fairly straight forward and easy (although i had to re-tag and group everything, but no big deal).  i tried using both of them for a few days together, and here are my thoughts:</p>
<ul><strong>what i like about rtm:</strong></p>
<li>interface &#8211; the ui is really slick</li>
<li>keyboard shortcuts are like vim&#8217;s &#8211; familiarity is good!</li>
<li>the new smart input bar is really nice and allows for fast inputting of tasks</li>
</ul>
<ul><strong>what i like about toodledo:</strong></p>
<li>more emphasis on goals, tying tasks to goals, etc</li>
<li>development seems a lot more active &#8211; rtm seems dead at times</li>
<li>team seems to be more friendly</li>
<li>nice subscription features (statistics, subtasks, auto-scheduler).</li>
</ul>
<p>i&#8217;ve used rtm&#8217;s iphone app but haven&#8217;t used toodledo&#8217;s yet (although i read that it&#8217;s also really good) &#8211; so i am guessing that on the phone front, they are roughly equivalent.  rtm is $25/year and toodledo is either $15 or $30/year, depending on which plan you get.</p>
<p>rtm is pretty functional without a pro subscription, but you can&#8217;t use the iphone version.  with toodledo, you can use the iphone app (a one time ~$4 charge), but you have other limitations (task history of completed tasks is limited to 2 weeks).</p>
<p><strong>so in summary</strong> &#8211; it&#8217;d be pretty nice to use something like <a href="http://orgmode.org/">orgmode</a> for emacs (if i can dedicate enough time to learn it) or something like <a href="http://taskwarrior.org/">taskwarrior</a> and just use plain text files.  the advantages of such approaches are the price tag and portability/accessibility, and ease of use.  the downside is that there&#8217;s no mobile (or web) interfaces unless i were to serve my todo files on my webserver (or write some code to sync to another service, etc).</p>
<p>another option is to buy <a href="http://culturedcode.com/things/">things</a>, which is a really well done app &#8211; but the problem is that i am then locked in to seeing my tasks on my mac and my phone (but not on the web and therefore, not on my linux box).  it&#8217;s also $50 for the desktop app plus $10 for the iphone app.  other apps have similar issues (<a href="http://www.omnigroup.com/applications/omnifocus">omnifocus</a> and <a href="http://www.potionfactory.com/thehitlist/">the hit list</a>).</p>
<p>decisions, decisions&#8230;  sometimes, deciding on this sort of thing makes it &#8220;how to <strong>not</strong> to get things done&#8221; <img src='http://whatstheplot.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2009/09/26/rtm-versus-toodledo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>reading quran on the iphone</title>
		<link>http://whatstheplot.com/blog/2009/03/08/reading-quran-on-the-iphone/</link>
		<comments>http://whatstheplot.com/blog/2009/03/08/reading-quran-on-the-iphone/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 07:43:50 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[islam]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[quran]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=269</guid>
		<description><![CDATA[a long time ago, when i got my iphone, i realized that it would be nice to be able to read the quran on my phone. what i wanted was a way to read the arabic text on the phone (page by page, not ayah by ayah). anyhow, i&#8217;ll outline the solutions i&#8217;ve found here [...]]]></description>
			<content:encoded><![CDATA[<p>a long time ago, when i got my iphone, i realized that it would be nice to be able to read the quran on my phone.  what i wanted was a way to read the arabic text on the phone (page by page, not ayah by ayah).  anyhow, i&#8217;ll outline the solutions i&#8217;ve found here along with my preferred solution and how to set it up.</p>
<p><strong>options</strong></p>
<ul>
<li>quran applications in the app store &#8211; there are a few in the app store, but only one version of iQuran is free.  it shows you the text (ayah by ayah, however), has translations, and audio.</li>
<li>images &#8211; copy a set of 604 images to your iphone, with each image representing one page of the Quran.  then, when you want to read Quran, you load up the photo viewer and read the pages there.  you can find these images in many places. <a href="http://www.hackint0sh.org/forum/f127/10088.htm">here</a> is one example.  this is the best solution for reading the Quran in Arabic if you don&#8217;t want to jailbreak your phone.</li>
<li>pdfs &#8211; in my opinion, the best way to read quran on the iphone (if you have a good pdf viewer).  you don&#8217;t have to hassle with syncing images, nor do you have to deal with 604 files on your phone that you must go through in order to read Quran.  also, pdfs tend to be of higher quality than images.  this is the solution i recommend if you have or are willing to jailbreak your phone.</li>
</ul>
<p>since the first solution is straight forward and instructions for the second solution are available on the link above, i will here outline instructions on how to use pdfs.</p>
<p>first, i need to point something out &#8211; you technically don&#8217;t need to jailbreak your phone to view the quran pdfs on it &#8211; you could download one of the apps in the appstore that views pdfs and use it.  however, i&#8217;ve tried several of the free ones, and was never satisfied with the speed and performance of any of them.  the best pdf viewer i found for the iphone is safari itself.  so in order to be able to access these pdfs without a connection, you need to have a webserver running on your phone&#8230; and that is why you need to jailbreak your phone <img src='http://whatstheplot.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>preview</strong><br />
here are three screenshots of how it looks like:<br />
<a href="/images/iphonepdfs/pdf_quran_menu-03.07.2009.png">menu</a><br />
<a href="/images/iphonepdfs/pdf_quran.03.07.2009.png">quran text</a><br />
<a href="/images/iphonepdfs/pdf_quran_w-03.07.2009.png">quran text (wide)</a>.</p>
<p><strong>instructions</strong></p>
<ol>
<li>jailbreak your phone.  on an older iphone, this is easy (install the newest firmware via itunes, then install and run <a href="http://www.quickpwn.com/">quickpwn</a>).  for the 3g iphone, carefully read the instructions on <a href="http://www.quickpwn.com/">quickpwn</a>&#8216;s website, especially if you want your phone to be unlocked and/or are already using it unlocked.</li>
<li>once the phone is jail broken, run cydia.  install openssh.  then install lighttpd.</li>
<li>when you&#8217;re on a wifi network, go to your phone&#8217;s settings (from the main screen), click on wifi, and choose the network that you are currently connected to by pressing the blue arrow &#8211; note down the value of the ip address</li>
<li>ssh into your iphone as root &#8211; in linux or osx, just open a terminal and run &#8220;ssh root@[your phone's ip address]&#8220;.  on windows, you can do this by downloading <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">putty</a>.  the default password is alpine.  keep this terminal open for the next step (recommendation &#8211; once you&#8217;re in, change your password.  type passwd and choose something else besides the default.  this is for security purposes).</li>
<li>now you can set up lighttpd.  download <a href="/misc/iphone_pdfs/com.http.lighttpd.plist">com.http.lighttpd.plist</a> and scp it to /Library/LaunchDaemons (using mac/linux, just do scp com.http.lighttpd.plist root@[iphone's ip]:/Library/LaunchDaemons).  on windows, download <a href="http://winscp.net">winscp</a>, log in (user name root, password is &#8216;alpine&#8217; unless you&#8217;ve changed it in the above step), navigate to /Library/LaunchDaemons, and copy the file over).  this file is what will set up lighttpd to start every time the phone is started, and to read the lighttpd.conf from the path below.</li>
<li>download <a href="/misc/iphone_pdfs/lighttpd.conf">lighttpd.conf</a> and scp it to /etc.  this is the configuration file for the webserver.</li>
<li>download the <a href="/misc/iphone_pdfs/iphone_web.zip">pdfs and web files</a>.  unzip them (you&#8217;ll get a web directory), and scp this directory to /var/root/Media (so that the files will be in /var/root/Media/web/*).  note that if you change this path, you have to edit lighttpd.conf to reflect wherever you put this.</li>
<li>finally, in the terminal you opened in the earlier step, type the following command (this command is what ultimately makes lighttpd start everytime the phone is started):<br />
<code>launchctl load -w /Library/LaunchDaemons/com.http.lighttpd.plist</code>.</li>
</ol>
<p>and that&#8217;s it&#8230; you should be good to go!  open up safari and navigate to http://localhost/index.html and enjoy!</p>
<p><strong>known issues</strong></p>
<ul>
<li>when transferring data to and from the phone (via ssh or scp), you want to make sure that you&#8217;re on wireless.  you may also want to make sure the iphone doesn&#8217;t &#8220;sleep&#8221; so that the connection doesn&#8217;t drop.</li>
<li>sometimes, when you choose a particular file to read, you get a &#8220;cannot connect to server&#8221; error &#8211; it usually disappears and loads the page before you have a chance to click &#8220;ok.&#8221;</li>
<li>if you turn the iphone off while reading a pdf (or go to the main screen, etc), when you come back to safari, sometimes, the page may appear malformed and not allow you to read.  to solve this problem, hit back to go to the index and choose a juz&#8217; to reload it.</li>
</ul>
<p>suggestions/additions/comments are welcome and appreciated.</p>
<p><strong>update</strong> &#8211; i&#8217;ve been using batoul apps&#8217; <a href="http://quranapp.com/iphone/">quranreader</a> at the recommendation of a friend.  it&#8217;s $1 in the app store, but well worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2009/03/08/reading-quran-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>thoughts on the g1</title>
		<link>http://whatstheplot.com/blog/2009/02/11/thoughts-on-the-g1/</link>
		<comments>http://whatstheplot.com/blog/2009/02/11/thoughts-on-the-g1/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 09:14:35 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[g1]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=252</guid>
		<description><![CDATA[for some (crazy) reason, i decided to try out the g1 after reading gina&#8217;s article and finding a good deal on craigslist. the summary is &#8211; i think i am going to sell it and keep my iphone thoughts so far: it&#8217;s nice to have a keyboard &#8211; but something doesn&#8217;t feel right about it. [...]]]></description>
			<content:encoded><![CDATA[<p>for some (crazy) reason, i decided to try out the g1 after reading <a href="http://smarterware.org/184/why-i-switched-to-android-from-the-iphone">gina&#8217;s article</a> and finding a good deal on craigslist.  the summary is &#8211; i think i am going to sell it and keep my iphone <img src='http://whatstheplot.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>thoughts so far:</p>
<ul>
<li>it&#8217;s nice to have a keyboard &#8211; but something doesn&#8217;t feel right about it.  i can&#8217;t quite put my hands on it yet.</li>
<li>no arabic fonts in the browser, and no arabization!! <img src='http://whatstheplot.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   iphone doesn&#8217;t have it either, but third party solutions <a href="http://iphoneislam.com">(iphone islam)</a> exist that work very well.</li>
<li>touch screen isn&#8217;t multi touch.  also, you have to press with your finger (not the finger tip) &#8211; pressing with the finger tip is useless.
   </li>
<li>gmail app totally rocks</li>
<li>integration with google (for gmail and calendar) rocks</li>
<li>integration with contacts is HORRIBLE.  seriously.  gmail, as you may know, makes a contact for every person you email.  so if you sync your contacts as is with the phone, you&#8217;re looking at a ridiculous set of contacts.  moreover, if you use the built in google syncing within address book, your address book gets sullied with all these random contacts, duplicates, etc.  not very cool.  i worked around this by using <a href="http://www.antoniolore.net/ab2csv.php">ab2csv exporter</a>, exporting a csv, and importing it into google contacts under a specific group, then only syncing that group with the phone.</li>
<li>one odd caveat &#8211; you have to use the supplied usb cable to connect the hone to the pc and be able to mount the micro sd card.  using any normal cable you may have (from a camera, for example) will charge the phone, but won&#8217;t work for mounting the micro sd card.  took me a while to figure this out.</li>
</ul>
<p>i upgraded the firmware, but haven&#8217;t played with <a href="http://www.google.com/latitude/intro.html">google latitude</a> yet (nor with the gps).</p>
<p>i may play with it some more, but at the time being, i am thinking of selling this and sticking with my iphone, as it feels a lot more polished.  there are definitely some nice things about it that are missing from the iphone &#8211; gears, the fact it runs linux, development seems to be easier (java based), cut and paste, better camera, built in voice dialer, etc.  but the iphone feels a lot more polished.</p>
<p><strong>*update*</strong> &#8211; &#8220;compare everywhere&#8221; app rocks &#8211; iphone has an equivalent (snaptell, and the amazon app is good too), but it doesn&#8217;t scan barcodes.  the english to arabic dictionary actually renders proper shaped arabic.  apparently, <a href="http://www.ahmed-essam.com/2007/11/applicability-for-arabizing-android.html">some</a> <a href="http://blog.amr-gawish.com/39/arabic-language-in-android/">people</a> have gotten arabic (the font and shaping) to work (though i am not sure if it&#8217;s throughout all the apps or not).  they haven&#8217;t documented it all yet but should soon.  i doubt it&#8217;ll be to the extent that arabization is done on the iphone, however.  battery life is sup-par &#8211; went from 100% to 82% in a few minutes by installing and trying a handful of apps.</p>
<p>summary &#8211; iphone (even the first gen) still wins.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2009/02/11/thoughts-on-the-g1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>faster and better text search</title>
		<link>http://whatstheplot.com/blog/2009/01/25/faster-and-better-text-search/</link>
		<comments>http://whatstheplot.com/blog/2009/01/25/faster-and-better-text-search/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 01:54:04 +0000</pubDate>
		<dc:creator>ahmedre</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[lucene]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sphinx]]></category>

		<guid isPermaLink="false">http://whatstheplot.com/blog/?p=232</guid>
		<description><![CDATA[important update (august 5th, 2009) &#8211; so i realized that some of the results here (specifically, the java lucene ones) were incorrect. the reason is because as is mentioned on the lucene wiki, the first search has to initialize the caches. as thus, the results aren&#8217;t accurate. this seems to be very true. for example, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>important update (august 5th, 2009)</strong> &#8211; <em>so i realized that some of the results here (specifically, the java lucene ones) were incorrect.  the reason is because as is mentioned on the lucene wiki, the first search has to initialize the caches.  as thus, the results aren&#8217;t accurate.  this seems to be very true.  for example, if i run a test query, discard the results, and then run the real query, results for the three classes of queries are now 17, 8, and 4 ms respectively, which is very comparable (if not sometimes better) than that of sphinx.  i will probably need to re-run this benchmark to do a better job of giving the backend systems a level playing field to test on.</em></p>
<p><strong>update (jan 26th, 2009)</strong> &#8211; <em>as mentioned in the comments, the mysql results aren&#8217;t very accurate either because i was probably not properly searching against the index.</em></p>
<p>i have a set of ~6000 quotes (verses, if you will), along with a multiple set of translations for each of those verses.  before, i was searching across these verses using mysql.  while this seemed to work, it was very limiting, and i began looking into alternatives.</p>
<p>so i did a little bit of research and tried out <a href="http://lucene.apache.org/java/docs/">lucene</a> and <a href="http://www.sphinxsearch.com/">sphinx</a>.  for lucene, i specifically used the <a href="http://framework.zend.com/manual/en/zend.search.lucene.html">zend version</a> (i&#8217;ll discuss standard <a href="http://lucene.apache.org/">lucene</a> (java) towards the end of this post.)</p>
<p>i&#8217;ll show the results first, and then explain them after.</p>
<p><img src="http://chart.apis.google.com/chart?chs=350x100&#038;cht=bhs&#038;chd=t:8.030,7.542,8.324|8.304,7.898,11.131|106.254,106.561,108.747|285.759,116.222,224.381&#038;chds=0,400&#038;chco=ff0000,C6D9FD,4D89F9,123456&#038;chxt=y&#038;chxl=0:|query3|query2|query1&#038;chdl=sphinx|sphinx alt|mysql|lucene"/></p>
<p>the graph above shows a quick overview of the tests run.  a set of 3 different queries were run against 4 different backends.  the numbers were generated using apache bench (ab) using 100 requests with a concurrency of 1.</p>
<p><strong>backends</strong>:<br />
<em>lucene</em>:  this was the first implementation.  in it, each verse was a &#8220;document.&#8221;  each translation was a property of the document.  the total number of documents was thus equivalent to the number of verses. </p>
<p><em>sphinx</em>:  this was the second sphinx implementation (see sphinx alt below for the first implementation).  this implementation was just done to make the data model similar to that of lucene, which is exactly what it is.  although this ended up being the fastest (by &lt; 5ms in the tests run), i prefer the sphinx alt implementation because it&#8217;s closest to that of the database schema.</p>
<p><em>sphinx alt</em>: although it is named &#8220;sphinx alt&#8221; in the graph above, this is really the initial sphinx implementation.  in this model, a translation of one verse was a document.  consequently, the total number of documents was (number of translations) * (number of verses).  i sort of like this one most (even though it&#8217;s not the fastest) because it is the closest to the current database schema.</p>
<p><em>mysql</em>:  this is sort of the baseline, and, to be honest, it&#8217;s not fair either.  the query used here is something in the nature of getting the row where the text is like &#8216;%word1%word2%&#8217;;  the number of results returned by this are far fewer (and less valuable) than those returned by either lucene or sphinx.  one would need to do &#8220;where text like &#8216;%word1%word2%&#8217; or text like &#8216;%word2%word1%&#8217;&#8221; to get a more accurate estimate, but for baseline purposes, i simply ran the first query.  note that the query cache size is 0 (ie query cache is on but effectively off for this set of tests).  note that the text field has a fulltext index on it.</p>
<p><strong>results</strong>:<br />
sphinx wins hands down.  however, although it seems that lucene comes in last, this is not really accurate because of the type of mysql query being used.  from my limited tests (using a more complicated sql query), lucene and mysql have comparable performance, but lucene of course has the added benefit of more advanced query options, etc.</p>
<p>sphinx times were 8.030 ms, 7.542 ms, 8.324 ms, sphinx alt times were 8.304 ms, 7.898 ms, 11.131 ms, lucene times were 285.759 ms, 116.222 ms, 224.381 ms, and mysql times were 106.254 ms, 106.561 ms, 108.747 ms for queries 1, 2, and 3, respectively.  query 1 contained three words (+term1 +term2 +term3), query 2 contained one word (+term4), and query 3 contained two words (+term5 +term6).</p>
<p><strong>additional details</strong>:<br />
plain vanilla java lucene is usually faster than zend&#8217;s lucene implementation.  the largest difference can be noted in indexing times (a few seconds for java versus 15+ minutes in php).  if i had to index frequently, i&#8217;d use java lucene or sphinx because they are <em>insanely</em> faster.</p>
<p>for example, the first query takes 179.84 ms on average in java (over 100 queries) versus about 272.61 ms on average for php.  the second query takes 173.22 ms on average in java versus about 103.30 ms in php. the third query takes 178.98 ms on average in java versus about 214.78 ms in php.</p>
<p>php only won at the second query, which also happens to be the simplest query.  two things to note &#8211; first, the times here don&#8217;t include the jvm or php interpreter start times.  these are times reported by taking the time before and after the search call and displaying them.  second, unlike the first test, this was all run from the command line and not directly via web (didn&#8217;t want to bother setting up tomcat or solr, etc).</p>
<p>just for fun, i implemented the &#8220;sphinx alt&#8221; data scheme in java lucene as well and re-ran the 3 tests 100 times each.  the results were 178.54 ms, 160.20 ms, and 172.72 ms &#8211; very much comparable to the results with the alternate schema.</p>
<p><strong>the summary of this very long post in 2 words</strong>:  sphinx rocks.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatstheplot.com/blog/2009/01/25/faster-and-better-text-search/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

