<?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>Me, Ahmed Soliman &#187; Ahmed</title>
	<atom:link href="http://www.ahmedsoliman.com/category/personal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ahmedsoliman.com</link>
	<description>{yet another technology geek!}</description>
	<lastBuildDate>Sat, 24 Dec 2011 17:46:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Introduction to Android Development in Java Course</title>
		<link>http://www.ahmedsoliman.com/2011/12/24/introduction-to-android-development-in-java-course/</link>
		<comments>http://www.ahmedsoliman.com/2011/12/24/introduction-to-android-development-in-java-course/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 17:46:31 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=1053</guid>
		<description><![CDATA[A few weeks ago I&#8217;ve published the specifications page of my latest additions to my training academy, the Android Development Course in Java. A 60+ hours of live-coding hands-on experience in the development of native applications on android using Java. The course will take you from the basics of the Android operating system and the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F12%2F24%2Fintroduction-to-android-development-in-java-course%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F12%2F24%2Fintroduction-to-android-development-in-java-course%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A few weeks ago I&#8217;ve published the specifications page of my latest additions to my training academy, the <a href="http://www.ahmedsoliman.com/academy/introduction-to-android-programming-in-java/" target="_blank">Android Development Course in Java</a>. A<strong> 60+ hours of live-coding hands-on experience</strong> in the development of native applications on android using Java. The course will take you from the basics of the Android operating system and the architecture behind this brilliant piece of software to the level of a professional Android developer, while taking into consideration the best practices and tips-and-tricks of writing successful killer mobile applications, and publishing them on the Android market.</p>
<p style="text-align: center;"><a href="http://www.ahmedsoliman.com/wp-content/uploads/2011/12/Android-4.0-Ice-Cream-Sandwich.png"><img class="aligncenter  wp-image-1055" title="Android-4.0-Ice-Cream-Sandwich" src="http://www.ahmedsoliman.com/wp-content/uploads/2011/12/Android-4.0-Ice-Cream-Sandwich.png" alt="" width="413" height="271" /></a></p>
<p>Android as the <strong>#1</strong> operating system for smart handheld devices is being hacked by thousands around the world, over <strong>350,000 applications</strong> are available today on the android market with around <strong>35,000</strong> new applications published <strong>monthly</strong> on the android market. You cannot miss such crazy market and stay behind the technology hype.</p>
<p>Training is available initially in <strong>Mansoura City</strong> and might be repeated again in several cities based on the requests received.</p>
<p>The course will cost you only <strong>EGP1000</strong> and will start in mid-january 2012. If you are willing to register in this course, <a href="https://docs.google.com/a/nozom.org/spreadsheet/viewform?formkey=dEY1bWdMVVlBVWpiUHdhUUM0MXViQ1E6MQ#gid=0">you must register in the registration form</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/12/24/introduction-to-android-development-in-java-course/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Impressions on Samsung Galaxy Tab 10.1 3G Edition</title>
		<link>http://www.ahmedsoliman.com/2011/11/08/impressions-on-samsung-galaxy-tab-10-1-3g-edition/</link>
		<comments>http://www.ahmedsoliman.com/2011/11/08/impressions-on-samsung-galaxy-tab-10-1-3g-edition/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 08:25:21 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=1026</guid>
		<description><![CDATA[A few weeks ago, I purchased Samsung Galaxy Tab 10.1 3G edition from Vodafone Egypt for a relatively good price, the device is shipped with Android 3.1 Honeycomb with 16GB of storage and a very attractive white back. There are many reviews on how the device looks and feels, so, I decided to wrap my [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F11%2F08%2Fimpressions-on-samsung-galaxy-tab-10-1-3g-edition%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F11%2F08%2Fimpressions-on-samsung-galaxy-tab-10-1-3g-edition%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A few weeks ago, I purchased Samsung Galaxy Tab 10.1 3G edition from Vodafone Egypt for a relatively good price, the device is shipped with Android 3.1 Honeycomb with 16GB of storage and a very attractive white back.</p>
<p style="text-align: center;"><a href="http://www.ahmedsoliman.com/wp-content/uploads/2011/11/Samsung-Galaxy-Tab-10.1-White.jpg"><img class="size-full wp-image-1030 aligncenter" title="Samsung-Galaxy-Tab-10.1-White" src="http://www.ahmedsoliman.com/wp-content/uploads/2011/11/Samsung-Galaxy-Tab-10.1-White.jpg" alt="" width="436" height="284" /></a></p>
<p>There are many reviews on how the device looks and feels, so, I decided to wrap my opinion in a short note to everybody:</p>
<h2>Pros:</h2>
<ol>
<li>Lightweight, lighter and thinner than iPad2</li>
<li>Very good battery life</li>
<li>Vivid bright screen with superb resolution, far better than iPad2</li>
<li>Smooth Operating system, much more attractive and flexible than iOS</li>
<li>Supports Arabic (not sure if it&#8217;s a Samsung mod or stock feature)</li>
</ol>
<h2>Cons:</h2>
<ol>
<li><strong>Battery recharging issue through USB</strong>: You basically cannot charge the device through PC-connected USB, the travel adapter is needed to charge the device. Some claim that it charged through the USB but very slowly. <strong>Solved</strong> by replacing the kernel with <a href="http://droidbasement.com/db-blog/">Pershoot&#8217;s kernel</a>and then do the following command from your computer
<pre class="brush: bash; title: ; notranslate">adb shell echo 1 &gt; /sys/class/power_supply/battery/force_usb_charging</pre>
</li>
<li><strong>File transfer (MTP problem on Mac)</strong>: File transfer is not smooth from PC/Mac to Android because the device doesn&#8217;t appear as a flash-disk as you might have expected. You need a special software that uses MTP (Media Transfer Protocol) to communicate with the tab&#8217;s internal storage and in my case I tried using (<a href="http://www.android.com/filetransfer/">Android File Transfer</a>) which never worked!</li>
<li><strong>Applications Quality on the android market:</strong> Well, that&#8217;s the main differentiation for Android, many applications exist for phones but only a few optimized for Honeycomb+, which makes it great for those interested in developing applications for Honeycomb, a lot of space still exist.</li>
<li><strong>Accessories availability in the market</strong>: I&#8217;ve been searching for <strong>any</strong> accessories for the tablet in the Egyptian market and in Dubai with complete failure, even the promised gifts (cover and USB adapter) from Vodafone never arrived</li>
<li><strong>A little bit slow sometimes</strong>: Solved by rooting and replacing the kernel with Pershoot&#8217;s kernel, Overclocked to 1.4GHz on-demand.</li>
</ol>
<h1>Conclusion</h1>
<p>All in all, a great device and will definitely shine even more when more &#8220;useful&#8221; applications come up in the market. my 2 cents is that Google should allow non-free apps to be distributed in Egypt, it&#8217;s such a shame that a big company like Google is lagging years in respect to Apple in that particular area. Apple app store has been open in Egypt for years now for paid and free apps. Google, do you need an advice from Apple on how did they do that? <img src='http://www.ahmedsoliman.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://tablets-planet.com/">Photo source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/11/08/impressions-on-samsung-galaxy-tab-10-1-3g-edition/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Introducing Redique</title>
		<link>http://www.ahmedsoliman.com/2011/10/04/introducing-redique/</link>
		<comments>http://www.ahmedsoliman.com/2011/10/04/introducing-redique/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 07:28:49 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=1019</guid>
		<description><![CDATA[I&#8217;ve been working on a very simple project that allow processes or computers to communicate seamlessly using Redis as a backend. I love Redis because it&#8217;s very powerful, yet very simple to configure and use. Let&#8217;s first understand the motivation behind redique The motivation is the need for a small, cool, json-based, super-fast RPC system [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F10%2F04%2Fintroducing-redique%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F10%2F04%2Fintroducing-redique%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve been working on a very simple project that allow processes or computers to communicate seamlessly using <a href="http://redis.io/">Redis</a> as a backend. I love Redis because it&#8217;s very powerful, yet very simple to configure and use. Let&#8217;s first understand the motivation behind <strong>redique</strong></p>
<p>The motivation is the need for a <em>small, cool, json-based, super-fast</em> RPC system between processes, that led me to build a tiny project on top of <a href="http://redis.io/">Redis</a> database and I called it <strong><em>Redique</em></strong></p>
<p><strong>Redique</strong> is an implementation of a high-performance Async RPC/Task Queue system built on top of Redis datastructure store and <a href="http://www.json.org/">JSON</a> marshalling protocol.</p>
<p>You normally want to use <strong>redique</strong> when you need to publish tasks to a set of workers to process asynchronously and retrieve the result using a task_id, or when you want to distribute workload over multiple workers easily without going through the hassle of understanding how message buses work.</p>
<h2>Getting Started</h2>
<p>You need to install the package first using pip:</p>
<pre class="brush: bash; title: ; notranslate"># pip install redique</pre>
<p>Then you need to create a backend class that contains the actual logic you want implement over the transport</p>
<pre class="brush: python; title: ; notranslate">class Calculator(object):
    def add(self, x, y):
        return x + y
    def raiseError(self):
        raise Exception(&quot;An Error Happened!&quot;)</pre>
<p>Then you need to create a queue consumer on your worker side:</p>
<pre class="brush: python; title: ; notranslate">import redique
calculator = Calculator()
queue = redique.RediQue(&quot;calculator&quot;)
queue.consume_loop(calculator)</pre>
<p>The last statement will block forever consuming tasks as they arrive.</p>
<p>On the publisher machine you need to execute tasks remotely</p>
<pre class="brush: python; title: ; notranslate">import redique
queue = redique.RediQue(&quot;calculator&quot;)
task_id = queue.push_task(&quot;add&quot;, 1, 2)
print queue.get_task_state(task_id)
print queue.wait_task_result(task_id)</pre>
<p>Another way to do that is to call execute_task that blocks till the result is returned</p>
<pre class="brush: python; title: ; notranslate">import redique
queue = redique.RediQue(&quot;calculator&quot;)
print queue.execute_task(&quot;add&quot;, 1, 2)</pre>
<p>You can grab the source code from <a href="https://github.com/AhmedSoliman/redique">https://github.com/AhmedSoliman/redique</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/10/04/introducing-redique/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Use Virtualenv with IPython 0.11</title>
		<link>http://www.ahmedsoliman.com/2011/09/27/use-virtualenv-with-ipython-0-11/</link>
		<comments>http://www.ahmedsoliman.com/2011/09/27/use-virtualenv-with-ipython-0-11/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 18:28:54 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=1011</guid>
		<description><![CDATA[If you are a Python hacker, most likely you will be using a virtualenv for your development environment, you are probably an iPython user. Unluckily, IPython doesn&#8217;t pick the virtualenv paths by default and you will have to tweak it a little bit to make it work. Basically, this a slightly tweaked version of this [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F27%2Fuse-virtualenv-with-ipython-0-11%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F27%2Fuse-virtualenv-with-ipython-0-11%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you are a Python hacker, most likely you will be using a <a href="http://pypi.python.org/pypi/virtualenv">virtualenv</a> for your development environment, you are probably an iPython user. Unluckily, <a href="http://pypi.python.org/pypi/ipython">IPython</a> doesn&#8217;t pick the virtualenv paths by default and you will have to tweak it a little bit to make it work. Basically, this a slightly tweaked version of <a href="http://blog.ufsoft.org/2009/1/29/ipython-and-virtualenv">this article</a> but tailored for the recent version of IPython 0.11.</p>
<p>You simply need to drop this snippet of code into the iPython configuration directory as illustrated below so that IPython can add the virtualenv paths.</p>
<pre class="brush: python; title: ; notranslate">import site
from os import environ
from os.path import join
from sys import version_info

if 'VIRTUAL_ENV' in environ:
    virtual_env = join(environ.get('VIRTUAL_ENV'),
                       'lib',
                       'python%d.%d' % version_info[:2],
                       'site-packages')
    site.addsitedir(virtual_env)
    print 'Using Virtualenv =&gt;', virtual_env
    del virtual_env
del site, environ, join, version_info</pre>
<p>Drop that snippet into a file named &#8220;ipython_config.py&#8221; in the following path if you are using Mac OS X or Linux (tested on Ubuntu natty):</p>
<pre class="brush: bash; title: ; notranslate">~/.ipython/profile_default/ipython_config.py</pre>
<p>Happy Hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/09/27/use-virtualenv-with-ipython-0-11/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My Startup Weekend Alex 2011 Experience</title>
		<link>http://www.ahmedsoliman.com/2011/09/24/my-startup-weekend-alex-2011-experience/</link>
		<comments>http://www.ahmedsoliman.com/2011/09/24/my-startup-weekend-alex-2011-experience/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 11:20:50 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[entrepreneurship]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[محاضرات]]></category>
		<category><![CDATA[مصر]]></category>
		<category><![CDATA[النهضة]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=1002</guid>
		<description><![CDATA[&#8220;An extraordinary experience with the top-notch geeks in the city and nearby cities&#8221; &#8211; That was my definition to this event &#8220;Startup Weekend&#8221; after participating a few months ago in SWCairo, I was pleased to launch Fakkarny and very excited to meet the top-notch geeks. That experience changed a lot in the way I think [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F24%2Fmy-startup-weekend-alex-2011-experience%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F24%2Fmy-startup-weekend-alex-2011-experience%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://alexandria.startupweekend.org/"><img class="aligncenter size-full wp-image-1006" title="swalex" src="http://www.ahmedsoliman.com/wp-content/uploads/2011/09/swalex.png" alt="" width="450" height="287" /></a></p>
<p>&#8220;An extraordinary experience with the top-notch geeks in the city and nearby cities&#8221; &#8211; That was my definition to this event &#8220;<a href="http://startupweekend.org/">Startup Weekend</a>&#8221; after participating a few months ago in SWCairo, I was pleased to launch <a href="http://fakkarny.com">Fakkarny</a> and very excited to meet the top-notch geeks. That experience changed a lot in the way I think about startups, teamwork, rapid development, pitching ideas in front of investors, and managing geeks <img src='http://www.ahmedsoliman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-1002"></span></p>
<p>This weekend the same extraordinary event is taking place in Alexandria, and guess what, I&#8217;m a participant and/or mentor in that event. I&#8217;ve been helping out 4 teams as a mentor and/or technical guy and I&#8217;m very proud of this experience, I feel it&#8217;s a life-changing experience to be able to push and support multiple teams and to witness the progress of every minute. Let me tell you more about those teams.</p>
<p><strong><a href="http://www.khasesny.com">Khasesny.com</a></strong>: خسسني is a collaboratively-generated idea between me and <a href="http://www.mahmoudmetwally.com/">Mahmoud Metwally</a>. An idea about building a social network for those who need to lose weight, physicians, gyms, and etc. The idea to build a network of supporters and helpers around you if you are into that mission-impossible plan, it let&#8217;s you get the support from your friends emotionally and the support from physicians technically in the same place. With a plethora of tools to create goals, track them, and to make sure you are eating healthy food.</p>
<p><strong><a href="http://www.weladlbalad.com">Weladlbalad.com</a></strong>: ولاد البلد is an awesome idea of building a social network that brings locals and travelers into a place where they share questions, new places for outing or sightseeing. Just as any social network it is driven by the power of people, locals are the best to answer your questions about how to drive from a place to another, or what&#8217;s the best meal you could have under 5$ in a city. It&#8217;s an awesome tool for someone like me who travel a lot between cities and I&#8217;m sure you will love it!</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/ahmedsoliman/6177715958/"><img class="aligncenter" title="Welad El Balad Team" src="http://farm7.static.flickr.com/6179/6177715958_23fcbab807.jpg" alt="" width="500" height="320" /></a></p>
<p><strong>1001 Inventions</strong>: An iPhone/Android game about the global educational initiative that promotes awareness of a thousand years of scientific and cultural achievements from Muslim civilization from the 7th century onwards, and how those contributions helped build the foundations of our modern world. A glimpse on the initiative is <a href="http://www.youtube.com/watch?v=JZDe9DCx7Wk">here</a></p>
<p><strong>Raga3holy</strong>: رجعهولي A team from Mansoura decided to write his first Android application to detect stolen smartphones, the phone reports his location, call log , and recent locations to the phone owner via SMS and/or 3g/wireless connection. Smart algorithms were designed to ensure that 90% of the times the device location can be detected and transferred to the web service.</p>
<h2>Conclusion</h2>
<p>The effect of every participation in this event will blow your mind away, super excitement is everywhere, energy is countless and the flow of ideas between team will make you happy being around such positive energy. <strong>I love Startup Weekend!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/09/24/my-startup-weekend-alex-2011-experience/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Auto restarting python application</title>
		<link>http://www.ahmedsoliman.com/2011/09/21/auto-restarting-python-application/</link>
		<comments>http://www.ahmedsoliman.com/2011/09/21/auto-restarting-python-application/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 10:02:55 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=997</guid>
		<description><![CDATA[This is a cool sample on how to write an automatic self-restarting python application after a timeout, of course you can modify this application to be much more sophisticated so it can close all open files before restarting or restarting based on a signal (SIGHUP maybe?) or whatever you like]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F21%2Fauto-restarting-python-application%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F21%2Fauto-restarting-python-application%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This is a cool sample on how to write an automatic self-restarting python application after a timeout, of course you can modify this application to be much more sophisticated so it can close all open files before restarting or restarting based on a signal (SIGHUP maybe?) or whatever you like</p>
<pre class="brush: python; title: ; notranslate">#!/usr/bin/env python

import os, sys, time

def main():
	print &quot;AutoRes is starting&quot;
	executable = sys.executable
	args = sys.argv[:]
	args.insert(0, sys.executable)

	time.sleep(1)
	print &quot;Respawning&quot;
	os.execvp(executable, args)

if __name__ == &quot;__main__&quot;:
	main()</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/09/21/auto-restarting-python-application/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Building VirtualBox on Mac OS X Lion with Python Bindings</title>
		<link>http://www.ahmedsoliman.com/2011/09/19/building-virtualbox-on-mac-os-x-lion-with-python-bindings/</link>
		<comments>http://www.ahmedsoliman.com/2011/09/19/building-virtualbox-on-mac-os-x-lion-with-python-bindings/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 19:37:12 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=986</guid>
		<description><![CDATA[After building VirtualBox with VNC support in my previous post I discovered two problems with that installation (VirtualBox 4.1.2 on Mac OS X Lion 10.7): SDK was not installed by default, import vboxapi from python failed. VBox Python bindings were built for python 2.6 and segfaults on python 2.7 I contacted some guys on #vbox-dev on [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F19%2Fbuilding-virtualbox-on-mac-os-x-lion-with-python-bindings%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F19%2Fbuilding-virtualbox-on-mac-os-x-lion-with-python-bindings%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>After <a href="http://www.ahmedsoliman.com/2011/09/18/building-virtualbox-on-mac-os-x-with-vnc-support/">building VirtualBox with VNC support in my previous post</a> I discovered two problems with that installation (VirtualBox 4.1.2 on Mac OS X Lion 10.7):</p>
<ol>
<li>SDK was <strong>not</strong> installed by default, import vboxapi from python failed.</li>
<li>VBox Python bindings were built for python<strong> 2.6</strong> and <strong>segfaults</strong> on python<strong> 2.7</strong></li>
</ol>
<p>I contacted some guys on #vbox-dev on IRC and it what happened is that VirtualBox 4.1.2 was not built for Lion and all build scripts are configured for 10.6. So, I decided to hack my way around for the second time to fix the two issues.</p>
<p>To cut the very long story short, you need to create your own port local repository like how I described in <a href="http://www.ahmedsoliman.com/2011/09/18/building-virtualbox-on-mac-os-x-with-vnc-support/">that post</a> and remove the virtualbox directory inside emulators/ and <a href="http://ahmedsoliman.com/myspace/patches/virtualbox-vnc-lion.tar.gz">replace it with the patched port</a></p>
<div>Steps to do download and extract are:</div>
<div>
<pre class="brush: bash; title: ; notranslate">$ cd ~/ports/emulators
$ curl -O &quot;http://ahmedsoliman.com/myspace/patches/virtualbox-vnc-lion.tar.gz&quot;
$ tar vxzf virtualbox-vnc-lion.tar.gz
</pre>
</div>
<div>The you should just try to install virtualbox again:</div>
<div>
<pre class="brush: bash; title: ; notranslate">$ sudo port install virtualbox +vnc +vde2</pre>
</div>
<div>After installation you should be able immediately to use the Python APIs, open iPython and try the following:</div>
<div>
<pre class="brush: python; title: ; notranslate">import vboxapi
mgr = vboxapi.VirtualBoxManager(None, None)</pre>
</div>
<p>If this code succeeded without throwing any exceptions then you should be really happy <img src='http://www.ahmedsoliman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div>I&#8217;ve also created a relevant <a href="https://trac.macports.org/ticket/31328">ticket on MacPorts for that 31328</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/09/19/building-virtualbox-on-mac-os-x-lion-with-python-bindings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building VirtualBox on Mac OS X with VNC Support</title>
		<link>http://www.ahmedsoliman.com/2011/09/18/building-virtualbox-on-mac-os-x-with-vnc-support/</link>
		<comments>http://www.ahmedsoliman.com/2011/09/18/building-virtualbox-on-mac-os-x-with-vnc-support/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 13:18:59 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=973</guid>
		<description><![CDATA[I&#8217;ve been using VirtualBox for months for several reasons and recently I&#8217;ve been forced to use only the free version of vbox (without the Extensions Pack), which doesn&#8217;t include the sweet bits of VRDP server among other things. I wanted to boot my virtual machines headless and access it using VNC which doesn&#8217;t come by [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F18%2Fbuilding-virtualbox-on-mac-os-x-with-vnc-support%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F09%2F18%2Fbuilding-virtualbox-on-mac-os-x-with-vnc-support%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve been using <a href="http://Virtualbox.org">VirtualBox</a> for months for several reasons and recently I&#8217;ve been forced to use only the free version of vbox (without the Extensions Pack), which doesn&#8217;t include the sweet bits of VRDP server among other things. I wanted to boot my virtual machines headless and access it using VNC which doesn&#8217;t come by default in Oracle&#8217;s builds of VirtualBox, so I decided to roll my own build.</p>
<p><a href="http://Virtualbox.org">VirtualBox</a> is available on <a href="http://macports.org">MacPorts</a> but doesn&#8217;t have VNC variant yet, unless <a href="https://trac.macports.org/ticket/31305">my contribution to MacPorts </a><a href="https://trac.macports.org/ticket/31305">is accepted</a>.</p>
<h2>First steps</h2>
<p>I searched for a VirtualBox port and I was surprised to find one, but I wasn&#8217;t quite happy with it, because it doesn&#8217;t build <a href="http://Virtualbox.org">VirtualBox</a> with VNC support, so I had to hack my way around. I wanted to implement that cleanly by adding a new port variant +vnc to that port.</p>
<p>The following steps will help you do the same; I&#8217;ve tested that on Mac OS X Lion 10.7 64bit but should work exactly the same on Snow Leopard 10.6 too.<span id="more-973"></span></p>
<p>Creating your own MacPorts repo:</p>
<pre class="brush: bash; title: ; notranslate">$ mkdir -p ~/ports/emulators/</pre>
<p>Then copying the portfile and patches to your new MacPorts repo:</p>
<pre class="brush: bash; title: ; notranslate">$ cp -r `port dir virtualbox` ~/ports/emulators/</pre>
<p>Editing MacPorts sources file to include your local repository (assuming your MacPorts prefix is /opt/local as mine)</p>
<pre class="brush: bash; title: ; notranslate">$sudo vim /opt/local/etc/macports/sources.conf</pre>
<p>Add the following line in the beginning of the file (change your_user_name to your real username)</p>
<pre class="brush: bash; title: ; notranslate">file:///Users/your_user_name/ports</pre>
<p>Then you are ready to hack the portfile</p>
<pre class="brush: bash; title: ; notranslate">$ cd ~/ports/emulators/virtualbox</pre>
<p>Download the <a href="https://trac.macports.org/raw-attachment/ticket/31305/Portfile-virtualbox.diff">patch of the Portfile</a> in that directory and apply the patch</p>
<pre class="brush: bash; title: ; notranslate">$ patch -u Portfile &lt; Portfile-virtualbox.diff</pre>
<p>Then build port index</p>
<pre class="brush: bash; title: ; notranslate">$ cd ~/ports
$ portindex</pre>
<p>You should be able to see the new variant now:</p>
<pre class="brush: bash; title: ; notranslate">$ port variants virtualbox

You should see two variants now:
 virtualbox has the variants:
 [+]vde2: Enable support for VDE
 [+]vnc: Enable support for VNC</pre>
<p>Install virtualbox:</p>
<pre class="brush: bash; title: ; notranslate">$ sudo port install virtualbox +vnc</pre>
<p>After quite some long time building dependencies, you should be able to see the new &#8211;vnc option in VBoxHeadless command.</p>
<p><strong>Update:</strong> You should also check <a href="http://www.ahmedsoliman.com/2011/09/19/building-virtualbox-on-mac-os-x-lion-with-python-bindings/">this relevant post if you are interesting in using the Python bindings of VirtualBox on Lion</a></p>
<p>Enjoy <img src='http://www.ahmedsoliman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/09/18/building-virtualbox-on-mac-os-x-with-vnc-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The pain in the web application development frameworks around</title>
		<link>http://www.ahmedsoliman.com/2011/08/26/the-pain-in-the-web-application-development-frameworks-around/</link>
		<comments>http://www.ahmedsoliman.com/2011/08/26/the-pain-in-the-web-application-development-frameworks-around/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 22:29:13 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[Personal Reviews]]></category>
		<category><![CDATA[professional]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=947</guid>
		<description><![CDATA[I&#8217;ve been working on a big project for more than a year now and during that year I&#8217;ve played with many web development frameworks with different approaches to tackle modern developer problems. Honestly, I&#8217;ve been impressed with some of the frameworks on how simple it&#8217;s designed and the elegance in their usability. I even wrote [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F08%2F26%2Fthe-pain-in-the-web-application-development-frameworks-around%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F08%2F26%2Fthe-pain-in-the-web-application-development-frameworks-around%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve been working on a big project for more than a year now and during that year I&#8217;ve played with many web development frameworks with different approaches to tackle modern developer problems. Honestly, I&#8217;ve been impressed with some of the frameworks on how simple it&#8217;s designed and the elegance in their usability. I even wrote <a href="http://www.ahmedsoliman.com/2010/07/29/the-good-and-bad-about-web2py/">some</a> <a href="http://www.ahmedsoliman.com/2011/04/01/what-i-love-about-play/">articles</a> about that. But that didn&#8217;t last long!</p>
<p><img class="size-full wp-image-951 alignright" title="development" src="http://www.ahmedsoliman.com/wp-content/uploads/2011/08/development.jpg" alt="" width="180" height="180" /></p>
<p>In any web development project, things start out cleanly organized and well-designed, and by adding more features, functionality, code, templates, and javascript, the application becomes very painful to maintain. Applying modularity concepts become harder, following good design rules become impossible, every piece of the web page is conditional. It&#8217;s simply a mess!</p>
<p>I&#8217;m still trying to figure out the best way to split a project into smaller pieces to maintain its tidiness, cleanness, and maintainability. Out of my experience, I can list some of the issues I&#8217;ve seen inherent in all of the frameworks I&#8217;ve used so far:<img title="More..." src="http://www.ahmedsoliman.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /><span id="more-947"></span></p>
<ol>
<li>Template language is <strong>not</strong> HTML/XML, so it basically breaks most of HTML/CSS/JS code highlighters, scrambles your clean HTML with lots of includes, if conditions, loops, etc. Think of editing the design and forgetting to change the error state, branched code that you missed to see, Sigh.</li>
<li><em>Common bases are not really common</em>! You start out by writing a base template for your whole application UI, which potentially contains header, footer, main container, and etc. and after a while you discover that you need to customize that base based on some conditions, you need to parametrize its widgets to look differently in different pages. Then you discover that you actually need more than one base, so you create a base for those bases <img src='http://www.ahmedsoliman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You are actually doing OO inheritance but in HTML templates, OO inheritance suck as in HTML inheritance.</li>
<li>Where/when to load a specific Javascript library? in the base? Can we load that on demand? Is there scripts dependency? Is there a case where javascript libraries are loaded twice? same for CSS. Trust me, this happens all the time.</li>
<li>Maintaining versions of javascript libraries inside your templates is also a mess, with the best code organization schemes you are still in charge of managing versions, ensuring conflicts doesn&#8217;t happen, making sure you are loading the correct version every time you need to load a library.</li>
<li>No debugging in template code, <em>most</em> of the frameworks doesn&#8217;t allow you to debug template&#8217;s code, <em>you are on your own</em>. Use traditional techniques like printing, logging, generating non-sense output to understand what&#8217;s actually going wrong in the template. This wastes tons of time.</li>
<li><strong>95</strong>% of the time, the template language is just a new language, you need to learn it, understand its tricks, you are limited by its capabilities/stupidity, and guess what? Every framework is inventing its own language and conventions!</li>
<li>Very few frameworks are designed for today&#8217;s demands, asynchronous processing, distributed workers, distributed caching, Comet, NoSQL backend, multi-tier REST communication, etc.</li>
</ol>
<p>As it appears, most of the framework developers were focusing on giving you <strong>cool</strong> backend features, MVC, and neglecting those issues affecting the UI. I deeply think that a revolutionary solution to those inherent problems must rise soon.</p>
<p>That&#8217;s why some frameworks started looking at those problems and <strong>introduced some interesting solutions</strong>. One of those frameworks is <strong><a href="http://liftweb.net/">Lift</a></strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/08/26/the-pain-in-the-web-application-development-frameworks-around/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>What if apple created a search engine?</title>
		<link>http://www.ahmedsoliman.com/2011/07/04/what-if-apple-created-a-search-engine/</link>
		<comments>http://www.ahmedsoliman.com/2011/07/04/what-if-apple-created-a-search-engine/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 08:49:58 +0000</pubDate>
		<dc:creator>Ahmed S. Farghal</dc:creator>
				<category><![CDATA[Ahmed]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.ahmedsoliman.com/?p=926</guid>
		<description><![CDATA[What would happen if apple was to create a search engine? They would call it iSearch Steve jobs would come and say that they have &#8220;Reinvented the Internet&#8221;, iSearch &#8212; it changed everything! Websites have to go through an approval process to be included in their search results iSearch won&#8217;t index any website containing Adobe [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F07%2F04%2Fwhat-if-apple-created-a-search-engine%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ahmedsoliman.com%2F2011%2F07%2F04%2Fwhat-if-apple-created-a-search-engine%2F&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>What would happen if apple was to create a search engine?</p>
<ul>
<li>They would call it <strong>iSearch</strong></li>
<li>Steve jobs would come and say that they have &#8220;Reinvented the Internet&#8221;, <strong>iSearch</strong> &#8212; it changed everything!</li>
<li>Websites have to go through an <em>approval process</em> to be included in their search results</li>
<li><strong>iSearch</strong> won&#8217;t index any website containing Adobe <strong>Flash</strong></li>
<li>A yearly subscription will be required to include your website in their search results</li>
<li>They will build an API for their search engine and the whole internet has to use it in order to integrate with the search engine</li>
<li>Websites must be optimized for <strong>iOS</strong> to be indexed</li>
<li>Apple would ship a hardware search device that uses <strong>iSearch</strong> service</li>
<li>Any website promoting <strong>Microsoft</strong> cannot &#8211; for technical reasons &#8211; be included in their search engine index</li>
</ul>
<p>What do you have in mind for the new <strong>iSearch</strong>? <img src='http://www.ahmedsoliman.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ahmedsoliman.com/2011/07/04/what-if-apple-created-a-search-engine/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

