<?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>Adam's Continuity at BlackAcid &#187; aballai</title>
	<atom:link href="http://blogs.blackacid.org/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.blackacid.org</link>
	<description>Experiments in Real Time</description>
	<lastBuildDate>Tue, 27 Jan 2009 23:24:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Linking ncurses with Ocaml</title>
		<link>http://blogs.blackacid.org/2009/01/27/linking-ncurses-with-ocaml/</link>
		<comments>http://blogs.blackacid.org/2009/01/27/linking-ncurses-with-ocaml/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 23:24:00 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ocaml]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/?p=69</guid>
		<description><![CDATA[Just a quick reminder to myself to remember to pass a -linkpkg flag on all when compiling sources using linked c libraries. ocamlfind ocamlc -package unix,curses -linkpkg -o scr scr.ml]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder to myself to remember to pass a -linkpkg flag on all when compiling sources using linked c libraries.</p>
<p><code><br />
ocamlfind ocamlc -package unix,curses -linkpkg -o scr scr.ml<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2009/01/27/linking-ncurses-with-ocaml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twilio Emulator</title>
		<link>http://blogs.blackacid.org/2009/01/24/twilio-emulator/</link>
		<comments>http://blogs.blackacid.org/2009/01/24/twilio-emulator/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 19:50:59 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[twilio]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/2009/01/24/twilio-emulator/</guid>
		<description><![CDATA[So I&#8217;ve been putting this off for the last month. I&#8217;ve written loggers, done the manual way, etc. Instead of starting my second private project with twilio, I decided while in the shower I needed to do this before I &#8230; <a href="http://blogs.blackacid.org/2009/01/24/twilio-emulator/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been putting this off for the last month.  I&#8217;ve written loggers, done the manual way, etc.  Instead of starting my second private project with twilio, I decided while in the shower I needed to do this before I start.  After about an hour, I&#8217;ve uploaded the start of it to my github profile, first repo to try it out too!  Anyways, feel free to try it out and not burn any trial minutes or pay minutes (like myself) while developing your phone app.  There are a number of bugs that I have not taken care of, but I&#8217;m not done working on it this weekend.  And yes, not all nodes are implemented, but hopefully by the end of the day we have a nice pretty command line with proper tag validation and exception handling.<br />
Below are the links to the repo.<br />
<a href="http://github.com/minddog/twilio-emulator/tree/master">GitHub Master</a><br />
<a href="git://github.com/minddog/twilio-emulator.git">Public Clone URL</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2009/01/24/twilio-emulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alphabet Soup .com</title>
		<link>http://blogs.blackacid.org/2009/01/03/alphabet-soup-com/</link>
		<comments>http://blogs.blackacid.org/2009/01/03/alphabet-soup-com/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:07:53 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[Daily Dwindle]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/?p=56</guid>
		<description><![CDATA[With the brain running in low gear after exploring ideas and concepts with people all day, I decided to do something silly by running through all domains that had port 80 open from a to z in the .com tld &#8230; <a href="http://blogs.blackacid.org/2009/01/03/alphabet-soup-com/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With the brain running in low gear after exploring ideas and concepts with people all day, I decided to do something silly by running through all domains that had port 80 open from a to z in the .com tld namespace.  Results are as follows.</p>
<ul>
<li>http://www.q.com -> Qwest</li>
<li>http://www.x.com -> Paypal&#8217;s Dev site</li>
<li>http://www.z.com -> Nissan&#8217;s 350z</li>
</ul>
<p>Interesting that no other domain is actually registered.  Now I&#8217;m curious as to why the other domains whois records show they are <a href="http://www.google.com/search?q=IANA_RESERVED&#038;ie=utf-8&#038;oe=utf-8&#038;aq=t&#038;rls=org.debian:en-US:unofficial&#038;client=iceweasel-a">IANA_RESERVED</a>.  </p>
<p>In a thread on <a href="http://http://answers.google.com/answers/threadview?id=498509">google answers</a>, someone states that if someone lets a two-letter domain expire it will not be allowed to be re-registered ever again.  This makes me wonder that all the people with single letter domains let their domains expire and became reserved?  With a little research into wikipedia of <a href="http://en.wikipedia.org/wiki/Single-letter_second-level_domains">single letter  second level domains</a>, we learn that these domains were &#8220;grandfathered&#8221; in.  </p>
<p><em>Such domains are rare, due to the fact that on December 1, 1993, The Internet Assigned Numbers Authority explicitly reserved all single-letter and single-digit second-level domain names in the top-level domains .com, .net, and .org. This was done in case the registries for these domains became overloaded.</em> &#8211; wikipedia</p>
<p>Hope you learned something new!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2009/01/03/alphabet-soup-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building an IVR with Twilio</title>
		<link>http://blogs.blackacid.org/2008/12/10/building-an-ivr-with-twilio/</link>
		<comments>http://blogs.blackacid.org/2008/12/10/building-an-ivr-with-twilio/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 05:52:25 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ivr]]></category>
		<category><![CDATA[phones]]></category>
		<category><![CDATA[twilio]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/?p=28</guid>
		<description><![CDATA[Developing an IVR can immediately be a daunting task if you have not had any experience doing so before. To simplify it, Twilio.com came up with a solution that takes the complicated choices in technology away from the project. You &#8230; <a href="http://blogs.blackacid.org/2008/12/10/building-an-ivr-with-twilio/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Developing an IVR can immediately be a daunting task if you have not had any experience doing so before.  To simplify it, <a href="http://twilio.com">Twilio.com</a> came up with a solution that takes the complicated choices in technology away from the project.  You will immediately start to think about your call system instead of which text-to-speech solution should we go with, which software pbx technology to implement, how much will our phone costs be, can we afford it?  Wait, what about multi-lingual call handling?  Don&#8217;t get me wrong, I like to build systems, asterisk is quite fun to get dirty with, but you can&#8217;t do both and have immediate results.  <div id="attachment_29" class="wp-caption alignleft" style="width: 160px"><img src="http://blogs.blackacid.org/wp-content/uploads/2008/12/photo-150x150.jpg" alt="A glimpse at a call diagram" title="IVR Design" width="150" height="150" class="size-thumbnail wp-image-29" /><p class="wp-caption-text">A glimpse at a call diagram</p></div> So after whiteboarding your idea, you want to start out with a menu system.  I&#8217;d recommend splitting up the greeting from your initial menu.  For example in TwiML, do a call redirect from the greeting to your menu.</p>
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span></code></li>
<li class="tab0 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Response<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 even"><code>Welcome to Hello IVR.</code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Redirect<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 odd"><code>http://example.com/voice/hello/</code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Redirect<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab0 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Response<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://blogs.blackacid.org/code/ivr-twilio/welcome.xml">welcome.xml</a></li>
</ol>
<p>Menu&#8217;s should be simple, they should also conform to the same usage standard through every call screen.</p>
<p>Some common dial keys that have been recommended by others are:</p>
<ul>
<li>* &#8211; Repeat</li>
<li># &#8211; Go back</li>
<li>7 &#8211; Previous</li>
<li>9 &#8211; Next</li>
<li>0 &#8211; Operator</li>
</ul>
<p>Also, when asking for user selection, keep the number of choices to 5.  Have them enter 9 for more options.  With menu&#8217;s always make sure to gather input at anytime to allow quick navigation for experienced phone users.  Here&#8217;s an example of a call menu with TwiML.</p>
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span></code></li>
<li class="tab0 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Response<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Gather</span><br />
</span</code></li>
<li class="tab4 even"><code>numDigits=&quot;1&quot;</code></li>
<li class="tab4 odd"><code>method=&quot;GET&quot;&gt;</code></li>
<li class="tab4 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab6 odd"><code>Sales, press 1.</code></li>
<li class="tab4 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab6 even"><code>Support, press 2.</code></li>
<li class="tab4 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab6 odd"><code>Frontdesk, press 3.</code></li>
<li class="tab4 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab6 even"><code>For more options, press 9.</code></li>
<li class="tab4 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab6 odd"><code>For the operator, press 0.</code></li>
<li class="tab4 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab6 even"><code>To hear the options again, please stay on the line.</code></li>
<li class="tab4 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Gather<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Pause</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Redirect<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 odd"><code>http://example.com/voice/menu/</code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Redirect<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab0 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Response<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://blogs.blackacid.org/code/ivr-twilio/menu.xml">menu.xml</a></li>
</ol>
<p>When you want to build a search interface into your IVR, you need to make it simple, but also make sure you accept all input and handle all operations normally.  People really want to press 0 when it doesn't work.  Additionally, you need to keep track of the number of search failures and offer a solution.  In most cases, a dial out to a human will suffice.  In the case of no man power, I recommend a voicemail using TwiML's record tags.  Here's an example search interface:</p>
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span></code></li>
<li class="tab0 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Response<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Gather</span><br />
</span</code></li>
<li class="tab4 even"><code>method=&quot;GET&quot;</code></li>
<li class="tab4 odd"><code>numDigits=&quot;3&quot;</code></li>
<li class="tab4 even"><code>finishOnKey=&quot;&quot;</code></li>
<li class="tab4 odd"><code>timeout=&quot;5&quot;</code></li>
<li class="tab4 even"><code>action=&quot;http://example.com/voice/search/?failures=0&quot;&gt;</code></li>
<li class="tab4 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab6 even"><code>Please enter the first three letters of what you are looking for.</code></li>
<li class="tab4 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Gather<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Redirect<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 even"><code>http://search.earth911.com/voice/what/?failures=0</code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Redirect<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab0 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Response<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="odd">&nbsp;</li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://blogs.blackacid.org/code/ivr-twilio/search.xml">search.xml</a></li>
</ol>
<p>When you have too much data, too little structure, and need to tell the phone user a book, don't.  Give them options, a details menu is a good thing.  If you provide information such as phone numbers, add an option to redirect the call.  If you have related information or you are nested one level deep in a list, offer the option to go directly to the next item.  It's important to provide this level of navigation as it will save them time and you money on your minutes.</p>
<p>Voicemail systems are not complicated, but are difficult to maintain.  Fortunately, for us we don't have to worry about that, we just want to send the recorded message to the right dept.  Handle your voicemail successes &#038; failures accordingly.  Have the user try again if the voicemail fails and always provide a fail-safe redirect so that they can try something else if they can't leave a voicemail at that time.</p>
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span></code></li>
<li class="tab0 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Response<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 even"><code>Leave your name, company, and your phone number to best reach you.</code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 odd"><code>Press the star key when finished.</code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Record</span><br />
</span</code></li>
<li class="tab4 even"><code>action=&quot;http://example.com/voice/voicemail/&quot;</code></li>
<li class="tab4 odd"><code>method=&quot;GET&quot;</code></li>
<li class="tab4 even"><code>maxLength=&quot;20&quot;</code></li>
<li class="tab4 odd"><code>finishOnKey=&quot;*&quot;</code></li>
<li class="tab4 even"><code>/&gt;</code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 even"><code>Try again. &nbsp;Press the star key when finished.</code></li>
<li class="tab2 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Say<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Record</span><br />
</span</code></li>
<li class="tab4 odd"><code>action=&quot;http://example.com/voice/voicemail/&quot;</code></li>
<li class="tab4 even"><code>method=&quot;GET&quot;</code></li>
<li class="tab4 odd"><code>maxLength=&quot;20&quot;</code></li>
<li class="tab4 even"><code>finishOnKey=&quot;*&quot;</code></li>
<li class="tab2 odd"><code>/&gt;</code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Redirect<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab4 odd"><code>http://example.com/voice/</code></li>
<li class="tab2 even"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Redirect<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="tab0 odd"><code><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Response<span style="font-weight: bold; color: black;">&gt;</span></span></span></code></li>
<li class="even">&nbsp;</li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://blogs.blackacid.org/code/ivr-twilio/voicemail.xml">voicemail.xml</a></li>
</ol>
<p>Next up, I'll talk about Robo-Calling!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2008/12/10/building-an-ivr-with-twilio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XMMS2 and Python</title>
		<link>http://blogs.blackacid.org/2008/11/30/xmms2-and-python/</link>
		<comments>http://blogs.blackacid.org/2008/11/30/xmms2-and-python/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 22:30:01 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xmms2]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/2008/11/30/xmms2-and-python/</guid>
		<description><![CDATA[I rarely get to sit down at my home machine and make something for my own use these days. I&#8217;ve always been interested in working with xmms and now these days xmms2. I built a plugin years ago that would &#8230; <a href="http://blogs.blackacid.org/2008/11/30/xmms2-and-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I rarely get to sit down at my home machine and make something for my own use these days.  I&#8217;ve always been interested in working with xmms and now these days xmms2.  I built a plugin years ago that would dump audio information via http.  These days I&#8217;d do the same, but with a script instead of a compiled c module for xmms.  So this brings me to experimenting with xmms2 and python.  This could be the first in a series of me blogging about python integration and what is possible with linux libraries and apps that have native python libraries.  Python lends itself to being a lightweight language with great performance and fast turnover.  According to debian there is a package that contains xmms2 bindings for python.</p>
<p><b>python-xmmsclient &#8211; XMMS2 &#8211; Python bindings</b><br />
<code>apt-get install python-xmmsclient</code></p>
<p>I decided to port a display_track shell script found on a <a href="http://www.debian-administration.org/articles/509">debian administration article</a></p>
<p>Instead of using osd-cat I went with aosd-cat since I like the options better and it uses the libaosd library.  Whatever I build next is news to me =)  See the code below if you are interested in forking it for yourself.</p>
<p>By the way, excuse the formatting, its a bug in my code highlighter!</p>
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span></code></li>
<li class="tab0 even"><code><span style="color: #ff7700;font-weight:bold;">import</span> xmmsclient</code></li>
<li class="tab0 odd"><code><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span></code></li>
<li class="tab0 even"><code><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span></code></li>
<li class="tab0 odd"><code><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">time</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #ff7700;font-weight:bold;">def</span> xmms_connect<span style="color: black;">&#40;</span>name<span style="color: black;">&#41;</span>:</code></li>
<li class="tab2 even"><code>xmms = xmmsclient.<span style="color: black;">XMMS</span><span style="color: black;">&#40;</span>name<span style="color: black;">&#41;</span></code></li>
<li class="tab2 odd"><code><span style="color: #ff7700;font-weight:bold;">try</span>:</code></li>
<li class="tab4 even"><code>xmms.<span style="color: black;">connect</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">getenv</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;XMMS_PATH&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></code></li>
<li class="tab2 odd"><code><span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">IOError</span>, detail:</code></li>
<li class="tab4 even"><code><span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Connection failed:&quot;</span>, detail</code></li>
<li class="tab4 odd"><code><span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab2 odd"><code><span style="color: #ff7700;font-weight:bold;">return</span> xmms</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #808080; font-style: italic;"># retrieve current playing id</span></code></li>
<li class="tab0 even"><code><span style="color: #ff7700;font-weight:bold;">def</span> xmms_playback_id<span style="color: black;">&#40;</span>xmms<span style="color: black;">&#41;</span>:</code></li>
<li class="tab2 odd"><code>result = xmms.<span style="color: black;">playback_current_id</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></code></li>
<li class="tab2 even"><code>result.<span style="color: black;">wait</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></code></li>
<li class="tab2 odd"><code><span style="color: #ff7700;font-weight:bold;">if</span> result.<span style="color: black;">iserror</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:</code></li>
<li class="tab4 even"><code><span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab2 even"><code><span style="color: #008000;">id</span> = result.<span style="color: black;">value</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab2 even"><code><span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">id</span></code></li>
<li class="odd">&nbsp;</li>
<li class="even">&nbsp;</li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code><span style="color: #ff7700;font-weight:bold;">def</span> get_current_track<span style="color: black;">&#40;</span>xmms, playback_id<span style="color: black;">&#41;</span>:</code></li>
<li class="tab2 odd"><code>result = xmms.<span style="color: black;">medialib_get_info</span><span style="color: black;">&#40;</span>playback_id<span style="color: black;">&#41;</span></code></li>
<li class="tab2 even"><code>result.<span style="color: black;">wait</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab2 even"><code><span style="color: #ff7700;font-weight:bold;">if</span> result.<span style="color: black;">iserror</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:</code></li>
<li class="tab4 odd"><code><span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;medialib get info returns error, %s&quot;</span> % result.<span style="color: black;">get_error</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></code></li>
<li class="tab4 even"><code><span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">None</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab2 even"><code>minfo = result.<span style="color: black;">value</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></code></li>
<li class="tab2 odd"><code><span style="color: #ff7700;font-weight:bold;">try</span>:</code></li>
<li class="tab4 even"><code>artist = minfo<span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;artist&quot;</span><span style="color: black;">&#93;</span></code></li>
<li class="tab2 odd"><code><span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">KeyError</span>:</code></li>
<li class="tab4 even"><code>artist = <span style="color: #483d8b;">&quot;No Artist&quot;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab2 even"><code><span style="color: #ff7700;font-weight:bold;">try</span>:</code></li>
<li class="tab4 odd"><code>title = minfo<span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;title&quot;</span><span style="color: black;">&#93;</span></code></li>
<li class="tab2 even"><code><span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">KeyError</span>:</code></li>
<li class="tab4 odd"><code>title = <span style="color: #483d8b;">&quot;No Title&quot;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab2 odd"><code><span style="color: #ff7700;font-weight:bold;">try</span>:</code></li>
<li class="tab4 even"><code>bitrate = minfo<span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;bitrate&quot;</span><span style="color: black;">&#93;</span></code></li>
<li class="tab2 odd"><code><span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">KeyError</span>:</code></li>
<li class="tab4 even"><code>bitrate = <span style="color: #ff4500;">0</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab2 even"><code><span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">&quot;%s - %s [%s]&quot;</span> % <span style="color: black;">&#40;</span>artist, title, bitrate<span style="color: black;">&#41;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code><span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:</code></li>
<li class="tab2 odd"><code>last_playback_id = <span style="color: #ff4500;">0</span></code></li>
<li class="tab2 even"><code>osd_options=<span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\</span></span></code></li>
<li class="tab0 odd"><code>--font=<span style="color: #483d8b;">'-b&amp;h-lucida-medium-normal-*-96-*-*-*-p-*-iso10646-1'</span> \</code></li>
<li class="tab0 even"><code>-B black \</code></li>
<li class="tab0 odd"><code>-R white \</code></li>
<li class="tab0 even"><code>-b <span style="color: #ff4500;">100</span> \</code></li>
<li class="tab0 odd"><code>--x-offset=<span style="color: #ff4500;">50</span> \</code></li>
<li class="tab0 even"><code>--y-offset=<span style="color: #ff4500;">-50</span> \</code></li>
<li class="tab0 odd"><code>--width=<span style="color: #ff4500;">900</span><span style="color: #483d8b;">&quot;</span></code></li>
<li class="tab2 even"><code>xmms = xmms_connect<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;aosd_display&quot;</span><span style="color: black;">&#41;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab2 even"><code><span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #ff4500;">1</span>:</code></li>
<li class="tab4 odd"><code>playback_id = xmms_playback_id<span style="color: black;">&#40;</span>xmms<span style="color: black;">&#41;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab4 odd"><code><span style="color: #ff7700;font-weight:bold;">if</span> playback_id != <span style="color: #ff4500;">0</span> <span style="color: #ff7700;font-weight:bold;">and</span> playback_id != last_playback_id:</code></li>
<li class="tab6 even"><code>last_playback_id = playback_id</code></li>
<li class="tab6 odd"><code>track = get_current_track<span style="color: black;">&#40;</span>xmms, playback_id<span style="color: black;">&#41;</span></code></li>
<li class="tab6 even"><code><span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;echo '%s' | /usr/bin/aosd_cat %s&quot;</span> % <span style="color: black;">&#40;</span>track, osd_options<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></code></li>
<li class="tab4 odd"><code><span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code>main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://blogs.blackacid.org/code/display_track.py">display_track.py</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2008/11/30/xmms2-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Poetry, it&#8217;s an Art</title>
		<link>http://blogs.blackacid.org/2007/11/21/code-poetry-its-an-art/</link>
		<comments>http://blogs.blackacid.org/2007/11/21/code-poetry-its-an-art/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 00:00:19 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/2007/11/21/code-poetry-its-an-art/</guid>
		<description><![CDATA[To my left is a kickass compiler poet named Gopal Vijay(shortened). I worked with Gopal when I just started to learn compilers and frameworks on the DotGNU Project. He understands what hard work is, as does Rhys Weatherly, the original &#8230; <a href="http://blogs.blackacid.org/2007/11/21/code-poetry-its-an-art/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img width="200" src="http://foss.in/2007/content/images/thumb/1/1c/Gopal.jpg/400px-Gopal.jpg" alt="Gopal V" style="float: left"/>To my left is a kickass compiler poet named Gopal Vijay(shortened).  I worked with Gopal when I just started to learn compilers and frameworks on the DotGNU Project.  He understands what hard work is, as does Rhys Weatherly, the original author of Portable.NET.  Both of them had mentored me to become a better programmer all around and not only understand what it means to do it correctly, always.  After a couple years of working on DotGNU I moved on to constructive network protocol development which pushed me straight back into webservices where I stand today repeating the circle.</p>
<p>The reality is that we like to speak, walk, run around, and play with code.  It&#8217;s our paintbrush, tinker toy, classical instrument, and pen.  It can do things that people can take for granite or widen peoples&#8217; eyes.  </p>
<p>We all need to respect the programmer and give him/her a pat on the back.  A raise might be nice too ;)  </p>
<p>Yes, it&#8217;s true, we develop for ourselves, some more than others.  If we want to build a god damn game engine for a calculator, by damn we will.  You can&#8217;t stop us!  </p>
<p>A toast for the digital poets!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2007/11/21/code-poetry-its-an-art/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Scalar Type Hinting on PHP6</title>
		<link>http://blogs.blackacid.org/2007/11/20/dynamic-scalar-type-hinting-on-php6/</link>
		<comments>http://blogs.blackacid.org/2007/11/20/dynamic-scalar-type-hinting-on-php6/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 03:02:40 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[compilers]]></category>
		<category><![CDATA[dynamic scalar type hinting]]></category>
		<category><![CDATA[interpreters]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/2007/11/20/dynamic-scalar-type-hinting-on-php6/</guid>
		<description><![CDATA[I was recently following a thread on the php-dev list that intrigued me enough to write about a new syntax feature for PHP. Sam Barrow recently posted a patch about optional scalar value type hinting that got me thinking that &#8230; <a href="http://blogs.blackacid.org/2007/11/20/dynamic-scalar-type-hinting-on-php6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was recently following a thread on the php-dev list that intrigued me enough to write about a new syntax feature for PHP.</p>
<p><a href="http://sambarrow.com/blog">Sam Barrow</a> recently posted a patch about optional scalar value type hinting that got me thinking that it was a smart approach to making php even more structured, but using a dynamic approach, since PHP has given us flexibility, let&#8217;s keep moving forward with it.</p>
<p>I propose a Dynamic Scalar Type Hinting syntax where we can declare data-types and our boundary checking callbacks during runtime.</p>
<p>We always have to do boundary checking and type checking on our functions, even though we already know the type to be used in context.</p>
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">&lt;?php</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">function</span> bounds_check_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$d</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab2 even"><code><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$d</span> &lt; <span style="color: #cc66cc;">0</span> &amp;&amp; <span style="color: #0000ff;">$d</span> &lt;= <span style="color: #cc66cc;">65535</span><span style="color: #66cc66;">&#41;</span></code></li>
<li class="tab4 odd"><code>throw <span style="color: #000000; font-weight: bold;">new</span> Exception<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Value out of range'</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="even">&nbsp;</li>
<li class="tab2 odd"><code><span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;</code></li>
<li class="tab0 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">function</span> mul_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a1</span>, <span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab2 even"><code>try <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab4 odd"><code>bounds_check_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a1</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab4 even"><code>bound_check_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab2 odd"><code><span style="color: #66cc66;">&#125;</span> catch<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$e</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab4 even"><code><a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">getMessage</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab2 odd"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab2 odd"><code><span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$a1</span> * <span style="color: #0000ff;">$a2</span>;</code></li>
<li class="tab0 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code><span style="color: #000000; font-weight: bold;">function</span> sub_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a1</span>, <span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab2 odd"><code>try <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab4 even"><code>bounds_check_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a1</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab4 odd"><code>bound_check_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab2 even"><code><span style="color: #66cc66;">&#125;</span> catch<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$e</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab4 odd"><code><a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">getMessage</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab2 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab2 even"><code><span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$a1</span> - <span style="color: #0000ff;">$a2</span>;</code></li>
<li class="tab0 odd"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">function</span> add_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a1</span>, <span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab2 even"><code>try <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab4 odd"><code>bounds_check_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a1</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab4 even"><code>bound_check_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab2 odd"><code><span style="color: #66cc66;">&#125;</span> catch<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$e</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab4 even"><code><a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">getMessage</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="tab2 odd"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab2 odd"><code><span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$a1</span> + <span style="color: #0000ff;">$a2</span>;</code></li>
<li class="tab0 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">?&gt;</span></code></li>
</ol>
<p>Let&#8217;s propose the following syntax:</p>
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">&lt;?php</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">function</span> bounds_check_uint<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$d</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab2 even"><code><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$d</span> &lt; <span style="color: #cc66cc;">0</span> &amp;&amp; <span style="color: #0000ff;">$d</span> &lt;= <span style="color: #cc66cc;">65535</span><span style="color: #66cc66;">&#41;</span></code></li>
<li class="tab4 odd"><code>throw <span style="color: #000000; font-weight: bold;">new</span> Exception<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="even">&nbsp;</li>
<li class="tab2 odd"><code><span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;</code></li>
<li class="tab0 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code>define_scalar<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'uint'</span>, <span style="color: #ff0000;">'bounds_check_uint'</span><span style="color: #66cc66;">&#41;</span>;</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code><span style="color: #000000; font-weight: bold;">function</span> mul_uint<span style="color: #66cc66;">&#40;</span>&lt;uint&gt; <span style="color: #0000ff;">$a1</span>, &lt;uint&gt; <span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab3 odd"><code><span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$a1</span> * <span style="color: #0000ff;">$a2</span>;</code></li>
<li class="tab0 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code><span style="color: #000000; font-weight: bold;">function</span> sub_uint<span style="color: #66cc66;">&#40;</span>&lt;uint&gt; <span style="color: #0000ff;">$a1</span>, &lt;uint&gt; <span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab3 odd"><code><span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$a1</span> - <span style="color: #0000ff;">$a2</span>;</code></li>
<li class="tab0 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">function</span> add_uint<span style="color: #66cc66;">&#40;</span>&lt;uint&gt; <span style="color: #0000ff;">$a1</span>, &lt;uint&gt; <span style="color: #0000ff;">$a2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab2 even"><code><span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$a1</span> + <span style="color: #0000ff;">$a2</span>;</code></li>
<li class="tab0 odd"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #000000; font-weight: bold;">?&gt;</span></code></li>
</ol>
<p>Here it appears that passing a scalar type reference via &#8216;<' + literal + '>&#8216; syntax just left adjacent from your parameter you can set an inline and possibly an internal type check.</p>
<p>Some might say why not use Java?  This is what non-dynamic based languages such as C++, Java, C#, etc. platforms of that caliber would bring to the table.  </p>
<p>They require that you declare your type ahead of time and don&#8217;t give you the option to define and adjust during runtime without an obscure mannerism.  Dynamic Scalar Type&#8217;s do not have to be defined at all or during runtime.  They can also be used as inline type hinting for runtime based performance optimizations in the execution engine.  They can be used by documentation tools to better generate phpdoc&#8217;s.</p>
<p>When all is said and done, I think this could be a fine addition to the PHP6 or possibly future versions beyond the platform.  Thanks for listening and feel free to share your comments.  As I continue to work on this patch to PHP6 CVS, I&#8217;ll need a sounding board.  </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2007/11/20/dynamic-scalar-type-hinting-on-php6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress Syntax Highlighting &#8211; Phase 2</title>
		<link>http://blogs.blackacid.org/2007/11/18/wordpress-syntax-highlighting-phase-2/</link>
		<comments>http://blogs.blackacid.org/2007/11/18/wordpress-syntax-highlighting-phase-2/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 09:43:17 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[geshi]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/2007/11/18/wordpress-syntax-highlighting-phase-2/</guid>
		<description><![CDATA[Since recent times have suggested to me that I better start putting a good collection of code online about how the things I create work, I need to start with a better syntax highlighter which is so important to explaining &#8230; <a href="http://blogs.blackacid.org/2007/11/18/wordpress-syntax-highlighting-phase-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since recent times have suggested to me that I better start putting a good collection of code online about how the things I create work, I need to start with a better syntax highlighter which is so important to explaining how things work in this world.</p>
<p>I started off using google&#8217;s system, but found it too cumbersome.  I shot straight through three more plugins tonight and found they also have strange issues.  This last one I&#8217;m working with today has found all the problems I have had and made it nice to use, besides one large issue with the WordPress TinyMCE Editor. </p>
<p>The winner is<br />
<a href="http://elasticdog.com/2004/09/code-viewer/" alt="CodeViewer">CodeViewer</a> by elasticdog &#8211; <a href="http://elasticdog.com/2004/09/code-viewer/">http://elasticdog.com/2004/09/code-viewer/</a></p>
<p>Below is a Test Program &#8211; this is a C program and you download here to it:
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #339933;">#include &lt;stdio.h&gt;</span></code></li>
<li class="tab0 even"><code><span style="color: #339933;">#include &lt;stdlib.h&gt;</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code><span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></code></li>
<li class="tab2 odd"><code><span style="color: #b1b100;">return</span>;</code></li>
<li class="tab0 even"><code><span style="color: #66cc66;">&#125;</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://blogs.blackacid.org/code/test.c">test.c</a></li>
</ol>
<p>I found that formatting is more important than the actual syntax highlighting.  So what I&#8217;m doing is using CodeViewer for the display and will use a child extension for doing actual syntax highlighting.  </p>
<p><a href="http://qbnz.com/highlighter/">GeSHi</a> has given a wonderful attempt at writing a variable syntax highlighter.  It works while in chunk-based highlighting too.  GeSHi is a O(n) based parser for syntax highlighting, yet it works pretty quickly as it keeps its use of substr and preg_replace at a minimum where doing character based descent to speed up the system.</p>
<p>I&#8217;ve partially implemented GeSHi for line-based highlighting inside CodeViewer.  You can download and compliment your wordpress installation by grabbing this tarball &#8211; <a href="/code/code-viewer_geshi.tar.bz2">Code Viewer with GeSHi Support</a>.  </p>
<p>To write a proper geshi supported tag, you must use the lang attribute.  </p>
<ol class="codelist">
<li class="tab0 odd"><code>&lt;viewcode src=&quot;cv_geshi_example.html&quot; lang=&quot;html&quot; /&gt;</code></li>
</ol>
<p>If you would like to see the changes I&#8217;ve made to the plugin, please see this diff below:</p>
<ol class="codelist">
<li class="tab0 odd"><code><span style="color: #888822;">--- code-viewer.txt&nbsp; &nbsp; &nbsp;Mon Aug <span style="">29</span> <span style="">07</span>:<span style="">08</span>:<span style="">37</span> <span style="">2005</span></span></code></li>
<li class="tab0 even"><code><span style="color: #888822;">+++ code-viewer.php&nbsp; &nbsp; &nbsp;Sun Nov <span style="">18</span> <span style="">09</span>:<span style="">33</span>:<span style="">15</span> <span style="">2007</span></span></code></li>
<li class="tab0 odd"><code><span style="color: #440088;">@@ <span style="">-9</span>,<span style="">14</span> <span style="">+9</span>,<span style="">15</span> @@</span></code></li>
<li class="tab1 even"><code>*/</code></li>
<li class="odd">&nbsp;</li>
<li class="tab1 even"><code>/* Configuration Settings */</code></li>
<li class="tab0 odd"><code><span style="color: #991111;">-$default_path = &quot;http://elasticdog.com/code/&quot;; &nbsp;// the absolute path of your code folder</span></code></li>
<li class="tab0 even"><code><span style="color: #00b000;">+$default_path = &quot;http://<span style="">&#123;</span>$_SERVER<span style="">&#91;</span>'HTTP_HOST'<span style="">&#93;</span><span style="">&#125;</span>/code/&quot;; &nbsp;// the absolute path of your code folder</span></code></li>
<li class="odd">&nbsp;</li>
<li class="tab1 even"><code>/* --- STOP EDITING --- &nbsp;*/</code></li>
<li class="tab0 odd"><code><span style="color: #00b000;">+require_once<span style="">&#40;</span>'geshi/geshi.php'<span style="">&#41;</span>;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab1 odd"><code>function code_viewer<span style="">&#40;</span>$text<span style="">&#41;</span> <span style="">&#123;</span></code></li>
<li class="tab2 even"><code>global $default_path;</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code><span style="color: #991111;">-&nbsp; &nbsp; &nbsp; &nbsp;$count = preg_match_all<span style="">&#40;</span>'/&lt;viewcode src=&quot;<span style="">&#40;</span><span style="">&#91;</span>^&quot;<span style="">&#93;</span>+<span style="">&#41;</span>&quot;<span style="">&#40;</span>?: link=&quot;<span style="">&#40;</span>?i:<span style="">&#40;</span>yes|no<span style="">&#41;</span><span style="">&#41;</span>&quot;<span style="">&#41;</span>?\s?\/&gt;/', $text, $matches<span style="">&#41;</span>;</span></code></li>
<li class="tab0 odd"><code><span style="color: #00b000;">+&nbsp; &nbsp; &nbsp; &nbsp;$count = preg_match_all<span style="">&#40;</span>'/&lt;viewcode src=&quot;<span style="">&#40;</span><span style="">&#91;</span>^&quot;<span style="">&#93;</span>+<span style="">&#41;</span>&quot;<span style="">&#40;</span>?: link=&quot;<span style="">&#40;</span>?i:<span style="">&#40;</span>yes|no<span style="">&#41;</span><span style="">&#41;</span>&quot;<span style="">&#41;</span>?<span style="">&#40;</span>?: lang=&quot;<span style="">&#40;</span>?i:<span style="">&#40;</span><span style="">&#91;</span>a-z<span style="">&#93;</span>+<span style="">&#41;</span><span style="">&#41;</span>&quot;<span style="">&#41;</span>?\s?\/&gt;/', $text, $matches<span style="">&#41;</span>;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab2 odd"><code>for <span style="">&#40;</span>$i = <span style="">0</span>; $i &lt; $count; $i++<span style="">&#41;</span> <span style="">&#123;</span></code></li>
<li class="tab3 even"><code>// Determine if the specified path is absolute, or relative to the root path</code></li>
<li class="tab0 odd"><code><span style="color: #440088;">@@ <span style="">-29</span>,<span style="">6</span> <span style="">+30</span>,<span style="">9</span> @@</span></code></li>
<li class="tab4 even"><code>$path = $default_path . $matches<span style="">&#91;</span><span style="">1</span><span style="">&#93;</span><span style="">&#91;</span>$i<span style="">&#93;</span>;</code></li>
<li class="tab3 odd"><code><span style="">&#125;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if<span style="">&#40;</span>strtolower<span style="">&#40;</span>$matches<span style="">&#91;</span><span style="">3</span><span style="">&#93;</span><span style="">&#91;</span>$i<span style="">&#93;</span><span style="">&#41;</span> != &quot;&quot;<span style="">&#41;</span> <span style="">&#123;</span></span></code></li>
<li class="tab0 even"><code><span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$language = $matches<span style="">&#91;</span><span style="">3</span><span style="">&#93;</span><span style="">&#91;</span>$i<span style="">&#93;</span>;</span></code></li>
<li class="tab0 odd"><code><span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="">&#125;</span></span></code></li>
<li class="tab3 even"><code>// Open the file</code></li>
<li class="tab3 odd"><code>// If the file can't be found, print an error message</code></li>
<li class="tab3 even"><code>if <span style="">&#40;</span>$lines = @file<span style="">&#40;</span>$path<span style="">&#41;</span><span style="">&#41;</span> <span style="">&#123;</span></code></li>
<li class="tab0 odd"><code><span style="color: #440088;">@@ <span style="">-44</span>,<span style="">8</span> <span style="">+48</span>,<span style="">11</span> @@</span></code></li>
<li class="tab5 even"><code><span style="">&#125;</span> else <span style="">&#123;</span></code></li>
<li class="tab6 odd"><code>$numtabs = strlen<span style="">&#40;</span>$line<span style="">&#41;</span> - strlen<span style="">&#40;</span>ltrim<span style="">&#40;</span>$line<span style="">&#41;</span><span style="">&#41;</span>; &nbsp;// determine the number of tabs</code></li>
<li class="tab6 even"><code>$line = trim<span style="">&#40;</span>$line<span style="">&#41;</span>; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// trim leading/trailing whitespace</code></li>
<li class="tab0 odd"><code><span style="color: #991111;">-</span></code></li>
<li class="tab0 even"><code><span style="color: #991111;">-&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $codelist .= &quot;\t&quot; . '&lt;li class=&quot;tab' . $numtabs . ' ' . $toggle . '&quot;&gt;&lt;code&gt;' . htmlspecialchars<span style="">&#40;</span>$line<span style="">&#41;</span> . '&lt;/code&gt;&lt;/li&gt;' . &quot;\n&quot;;</span></code></li>
<li class="tab0 odd"><code><span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if<span style="">&#40;</span>isset<span style="">&#40;</span>$language<span style="">&#41;</span><span style="">&#41;</span> <span style="">&#123;</span></span></code></li>
<li class="tab0 even"><code><span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$codelist .= &quot;\t&quot; . '&lt;li class=&quot;tab' . $numtabs . ' ' . $toggle . '&quot;&gt;&lt;code&gt;' . geshi_highlight<span style="">&#40;</span>$line, $language, null, true<span style="">&#41;</span> . '&lt;/code&gt;&lt;/li&gt;' . &quot;\n&quot;;</span></code></li>
<li class="tab0 odd"><code><span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="">&#125;</span> else <span style="">&#123;</span></span></code></li>
<li class="tab0 even"><code><span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$codelist .= &quot;\t&quot; . '&lt;li class=&quot;tab' . $numtabs . ' ' . $toggle . '&quot;&gt;&lt;code&gt;' . htmlspecialchars<span style="">&#40;</span>$line<span style="">&#41;</span> . '&lt;/code&gt;&lt;/li&gt;' . &quot;\n&quot;;</span></code></li>
<li class="tab0 odd"><code><span style="color: #00b000;">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="">&#125;</span></span></code></li>
<li class="tab5 even"><code><span style="">&#125;</span></code></li>
<li class="tab4 odd"><code><span style="">&#125;</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code><span style="color: #440088;">@@ <span style="">-76</span>,<span style="">4</span> <span style="">+83</span>,<span style="">4</span> @@</span></code></li>
<li class="even">&nbsp;</li>
<li class="tab1 odd"><code>add_filter<span style="">&#40;</span>'the_content', 'code_viewer', <span style="">9</span><span style="">&#41;</span>;</code></li>
<li class="tab1 even"><code>add_filter<span style="">&#40;</span>'the_content', 'fix_bad_p'<span style="">&#41;</span>;</code></li>
<li class="tab0 odd"><code><span style="color: #991111;">-?&gt;</span></code></li>
<li class="tab0 even"><code><span style="color: #aaaaaa; font-style: italic;">\ No newline at end of file</span></code></li>
<li class="tab0 odd"><code><span style="color: #00b000;">+?&gt;</span></code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="http://blogs.blackacid.org/code/code-viewer_geshi.diff">code-viewer_geshi.diff</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2007/11/18/wordpress-syntax-highlighting-phase-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BestPartyEver.com Development</title>
		<link>http://blogs.blackacid.org/2007/10/24/bestpartyevercom-development/</link>
		<comments>http://blogs.blackacid.org/2007/10/24/bestpartyevercom-development/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 00:50:32 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[Daily Dwindle]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/2007/10/24/bestpartyevercom-development/</guid>
		<description><![CDATA[Hey Guys, &#160; It&#8217;s been quite a few weeks since I last posted.&#160; I thought I would update you on my current tinker toys that I do during the day.&#160; I&#8217;m a full time CTO/Developer as well as Partner with &#8230; <a href="http://blogs.blackacid.org/2007/10/24/bestpartyevercom-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hey Guys,</p>
<p>&nbsp; It&#8217;s been quite a few weeks since I last posted.&nbsp; I thought I would update you on my current tinker toys that I do during the day.&nbsp; I&#8217;m a full time CTO/Developer as well as Partner with <a href="http://bestpartyever.com">BestPartyEver.com</a>.&nbsp; After quite a bit of busy weeks developing we have launched our alpha version of the software and are going through a series of micro-releases.&nbsp; It&#8217;s quite nice to work with a small, but agile team, creating a tremendous amount of growth in this application that has been needing an overhaul for quite a while.&nbsp; We debuted a new Budget Calculator today that uses auto-saving and live calculations.&nbsp; Numerous weeks went into making a new javascript library for the site that uses multi-level namespaces for organizing the code for re-use, speed, and compliance with third-party libraries and the silly global namespace issues with prototype, etc.&nbsp;&nbsp; Some fun modern usability technologies were used to create better site navigation such as&nbsp; the tag cloud on <a href="http://bestpartyever.com/ideas">party ideas</a>.&nbsp;  We can definitely see the popularity of <a href="http://bestpartyever.com/ideas/Halloween">halloween party ideas</a> during this season.&nbsp; We used <a href="http://en.wikipedia.org/wiki/Geoip">geoip</a> tracking to automatically detect the user&#8217;s region they are browsing from to target ad locations.&nbsp; Leveraging an open source tech for this one, <a href="http://www.hostip.info">hostip.info</a>, we transformed the data layer of hostip to fit snug in with our architecture and still be updated on a regular basis to make the ip system more accurate.&nbsp; We also developed a layer between <a href="http://bestpartyever.com">Best Party Ever</a> and <a href="http://mu.wordpress.org">WordPress MU</a>.&nbsp; This was a fantastic idea as we didn&#8217;t want to redevelop the wheel here and we can re-use technologies developed for the wordpress platform for blogging reducing a mountain of work on our part.&nbsp; Don&#8217;t forget that we do full code reviews before deciding on technologies to be part of our core system.&nbsp; I&#8217;ll write a bit more about the daytime party that I live later.&nbsp; Take care.</p>
<p style="text-align: right; font-size: 8px">Blogged with <a href="http://www.flock.com/blogged-with-flock" title="Flock" target="_new">Flock</a></p>
<p><!-- technorati tags begin -->
<p style="font-size:10px;text-align:right;">Tags: <a href="http://technorati.com/tag/halloween" rel="tag">halloween</a>, <a href="http://technorati.com/tag/party%20ideas" rel="tag">party ideas</a>, <a href="http://technorati.com/tag/%20wordpress%20mu" rel="tag"> wordpress mu</a>, <a href="http://technorati.com/tag/%20bestpartyever" rel="tag"> bestpartyever</a>, <a href="http://technorati.com/tag/%20javascript" rel="tag"> javascript</a>, <a href="http://technorati.com/tag/%20php" rel="tag"> php</a>, <a href="http://technorati.com/tag/%20work" rel="tag"> work</a>, <a href="http://technorati.com/tag/%20technology" rel="tag"> technology</a>, <a href="http://technorati.com/tag/%20geoip" rel="tag"> geoip</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2007/10/24/bestpartyevercom-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pareto Principle</title>
		<link>http://blogs.blackacid.org/2007/09/26/pareto-principle/</link>
		<comments>http://blogs.blackacid.org/2007/09/26/pareto-principle/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 08:36:40 +0000</pubDate>
		<dc:creator>aballai</dc:creator>
				<category><![CDATA[Optimizations]]></category>

		<guid isPermaLink="false">http://blogs.blackacid.org/2007/09/26/pareto-principle/</guid>
		<description><![CDATA[The Pareto Principle Economist Vilfredo Pareto found in 1897 that about 80 percent of Italy&#8217;s wealth was owned by about 20 percent of the population.8 This has become the 80/20 rule or the Pareto principle, which is often applied to &#8230; <a href="http://blogs.blackacid.org/2007/09/26/pareto-principle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="note">
<p class="normaltitle"><b>The Pareto Principle</b></p>
<p style="margin-left: 40px;">Economist Vilfredo Pareto found in 1897 that about 80 percent of Italy&#8217;s     wealth was owned by about 20 percent of the population.<sup><a href="javascript:popUp('/content/images/chap10_0735713243/elementLinks/ch10fn08.html')">8</a></sup>     This has become the 80/20 rule or the Pareto principle, which is often applied     to a variety of disciplines. Although some say it should be adjusted to a     90/10 rule, this rule of thumb applies to everything from employee productivity     and quality control to programming.</p>
<p style="margin-left: 40px;">Barry Boehm found that 20 percent of a program consumes 80 percent of the     execution time.<sup><a href="javascript:popUp('/content/images/chap10_0735713243/elementLinks/ch10fn09.html')">9</a></sup> He also     found that 20 percent of software modules are responsible for 80 percent of     the errors.<sup><a href="javascript:popUp('/content/images/chap10_0735713243/elementLinks/ch10fn10.html')">10</a></sup> Donald Knuth     found that more than 50 percent of a program&#8217;s run time is usually due     to less than 4 percent of the code.<sup><a href="javascript:popUp('/content/images/chap10_0735713243/elementLinks/ch10fn11.html')">11</a></sup>     Clearly, a small portion of code accounts for the majority of program execution     time. Concentrate your efforts on these hot areas.</p>
<p>I just recently was doing some research on Javascript Optimization techniques and found this wonderful section on The Pareto Principle.&nbsp; If you haven&#8217;t already read the above two paragraphs, please do.&nbsp; If you feel brave, please try out this guide on <a href="http://www.peachpit.com/articles/printerfriendly.aspx?p=31567&amp;rl=1">Optimizing Javascript code.</a></p>
</p></div>
<p style="text-align: right; font-size: 8px">Blogged with <a href="http://www.flock.com/blogged-with-flock" title="Flock" target="_new">Flock</a></p>
<p><!-- technorati tags begin -->
<p style="font-size:10px;text-align:right;">Tags: <a href="http://technorati.com/tag/paretoprinciple" rel="tag">paretoprinciple</a>, <a href="http://technorati.com/tag/%20optimizing%20javascript" rel="tag"> optimizing javascript</a>, <a href="http://technorati.com/tag/%20javascript" rel="tag"> javascript</a>, <a href="http://technorati.com/tag/%20web%20development" rel="tag"> web development</a>, <a href="http://technorati.com/tag/%20research" rel="tag"> research</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.blackacid.org/2007/09/26/pareto-principle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

