<?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>code-diesel &#187; software</title>
	<atom:link href="http://www.codediesel.com/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codediesel.com</link>
	<description>/* PHP &#38; MySQL Journal */</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:19:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Comparing programming languages</title>
		<link>http://www.codediesel.com/software/comparing-programming-languages/</link>
		<comments>http://www.codediesel.com/software/comparing-programming-languages/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 04:27:42 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[languages]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/?p=2970</guid>
		<description><![CDATA[Programming language comparisons raise the most flame wars on blogs and forums. Each developer rooting for his favorite language and deriding all the others. Most comparisons are like comparing apples-to-oranges, devoid of any logic, and arguments frequently hinging on ad-hoc rationalization and technical naïveté. Seldom do we see any empirical evidence backing up the claims. [...]]]></description>
			<content:encoded><![CDATA[<p>Programming language comparisons raise the most flame wars on blogs and forums. Each developer rooting for his favorite language and deriding all the others. Most comparisons are like comparing apples-to-oranges, devoid of any logic, and arguments frequently hinging on ad-hoc rationalization and technical naïveté.<br />
<span id="more-2970"></span><br />
Seldom do we see any empirical evidence backing up the claims. This is one of the reasons I rarely become part of the ‘my-language-is-better’ rigmarole. The most comprehensive empirical study on programming language comparisons I found was at <a href="http://www.plat-forms.org/" rel="nofollow"  title="Plat_Forms - The web development platform comparison" target="_blank">http://www.plat-forms.org/</a>. </p>
<p>&#8220;Plat_Forms&#8221; is a contest in which teams of three programmers compete to implement the same requirements for a web-based system using different technology platforms (e.g. Java, .NET, Perl, PHP, Python, Ruby, Scala, Smalltalk, JavaScript or what-have-you). The main contenders for 2011 were Ruby, PHP, Perl and Java. The results for the 2011 are given <a href="http://www.plat-forms.org/results-2011" rel="nofollow"  title="Plat_Forms - The web development platform comparison" target="_blank">here</a>. Compared to the 2007 study, the results differ markedly.</p>
<p>The detailed results are yet to come, but you can draw your conclusions from whatever data is currently available.</p>
<p><strong>Further reading:</strong><br />
Chapter 14 &#8211; Two comparisons of Programming Language from <a href="http://www.amazon.com/Making-Software-Really-Works-Believe/dp/0596808321/ref=sr_1_sc_1?ie=UTF8&#038;qid=1323837444&#038;sr=8-1-spell" rel="nofollow"  title="making software" target="_blank">Making software</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/software/comparing-programming-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Source Code Signatures in PHP</title>
		<link>http://www.codediesel.com/php/source-code-signatures-in-php/</link>
		<comments>http://www.codediesel.com/php/source-code-signatures-in-php/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 05:38:55 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/?p=2939</guid>
		<description><![CDATA[This post is based on Ward Cunningham&#8217;s Signature Survey: A Method for Browsing Unfamiliar Code article. Ward suggests that when studying new and unfamiliar source codes, it is vital that a programmer get a intuitive sense of the code structure under consideration. One method he suggests is that of summarizing on a single line select [...]]]></description>
			<content:encoded><![CDATA[<p>This post is based on Ward Cunningham&#8217;s <a href="http://c2.com/doc/SignatureSurvey/" rel="nofollow"  title="Signature Survey:  A Method for Browsing Unfamiliar Code" target="_blank">Signature Survey: A Method for Browsing Unfamiliar Code</a> article. Ward suggests that when studying new and unfamiliar source codes, it is vital that a programmer get a intuitive sense of the code structure under consideration. One method he suggests is that of summarizing on a single line select punctuation characters from each source file. He calls this the file&#8217;s &#8220;signature&#8221;. This will help the developer gauge the complexity of the code base.</p>
<p>So for example, if we only consider using braces &#8216;{}&#8217;, and semicolon &#8216;;&#8217; &#8211; one of the common punctuation elements in a PHP program, a programmer can get a feel for the structure of a source file. Usually braces delimit blocks and functions in PHP, and many other languages, so this can give a programmer a sense of the length of code blocks or function sizes.<br />
<span id="more-2939"></span><br />
A sample source file taken from a WordPress system, and its signature using select punctuation characters ( &#8216;{}&#8217; and &#8216;;&#8217; ) is given below.</p>
<p><strong>Sample WordPress source file &#8211; wp-blog-header.php:</strong></p>

<div class="wp_codebox"><table><tr id="p29397"><td class="code" id="p2939code7"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_did_header</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$wp_did_header</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">require_once</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-load.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	wp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">require_once</span><span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/template-loader.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><strong>Signature of the above file:</strong></p>

<div class="wp_codebox"><table><tr id="p29398"><td class="code" id="p2939code8"><pre class="text" style="font-family:monospace;">wp-blog-header.php : {;;;;}</pre></td></tr></table></div>

<p>This shows that the file has one block section (function, class or other), containing four statements. Of course to get a quick intuitive feel for the signature, you will have to work with at least a few diverse code bases. This will prime you to estimate the complexity of the code by just looking at the signature.</p>
<p>If we also include parenthesis &#8216;()&#8217; in the signature, we get the following. But this looks a little complex and less intuitive than the previous one.</p>

<div class="wp_codebox"><table><tr id="p29399"><td class="code" id="p2939code9"><pre class="text" style="font-family:monospace;">wp-blog-header.php : (()){;(());();();}</pre></td></tr></table></div>

<p>Some more signatures of various WordPress root files is given below.</p>

<div class="wp_codebox"><table><tr id="p293910"><td class="code" id="p2939code10"><pre class="text" style="font-family:monospace;">index.php : ;;
wp-atom.php : ;;;
wp-blog-header.php : {;;;;}
wp-comments-post.php : {;;;;};;;;{;;};;{;;}{;;}{;;}{;;}{;};;;;;{;;;;
{{;;}}}{;};{;;};;;;;{;;;;};;;;
wp-commentsrss2.php : ;;;
wp-config-sample.php : {};;;;;;{};;;;;;;;;;;;;
wp-config.php : ;{};;;;;;{}}{{{;{};;{;;{;{};{{{;{;}{;;;;;;
wp-cron.php : ;;;{;};;;;{;{{;{;;};;}}};
wp-feed.php : ;;;
wp-links-opml.php : ;;;;{;;};;;;;;;;;;;;;;;;
xmlrpc.php : ;;{;};;{;;;;};;;;;;{;{;;;;;};};;;;;
wp-load.php : ;;{;}{;}{;;;;;;;;;;;;}
wp-pass.php : ;;;;;
wp-rdf.php : ;;;
wp-register.php : ;;;
wp-rss.php : ;;;
wp-rss2.php : ;;;
wp-login.php : ;{{;;}{;;}}{;;;;;;;;;;;;;;;;{;;;;{;}{;}}{{;}};;{;;;}{;;
;};;{;;}{;;{;{;;}};;}}{;;;{;;}{};;;}{;;{;{;}{;{;;}}};{;}{;}{;;{{;};}{{
;;}{}}}{;;;;;};}{;;;{;;}{;;};;{;;};;;;;;;;{;;;};;;;;;;;;;;;;}{;;;;;;;}
{;;;}{;;;{;}{;;}{;}{;}{;;;}{;};;;;;{;;;};;;};;;;;;;{;;;};;;;;{;;;;;;{;
{;;;}};;;;;;;;;;;;;{;;};{;}{;;;;};;;;;;;;;;;{;;}{;;};;{;;;{;;;}};;;;;;
;;;;;{;{{;;}}}{;;}{;};;;;{{;;{};;;}{;;;};;};;;;;;;;;;;;;;;;;;{}{;}{;}{
{{{;;}{;{;}};;}{}};}{;};;;}
wp-mail.php : ;;;;;;;;;;;;;;{;;;};;{;;;;;;;;;;{;{;}{{;;;;{;;};}{;;;;;}
{;;;}{;;{;}{;};;}{;;;{;;{;}{;;}}{;}}{;;{;};;;;;;;;;;{{;}};;;;;}}}{;;}{
;};{;;{;;};};;{;}{;};;;;;;;;;;;;;;;{;;;}{;}};
wp-settings.php : ;;;;;;;;;;;;;;;;;;;;;;;;;;;;{;;}{;};;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;{;;;};{;};{{;};};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;{;
;};;;;;{{;;};};
wp-signup.php : ;;;{;;}{;};{;}{;;}{;;};{{;;}{;}{;;;;;}{;;;}{;;}{;;;;}{;
}{;;;;;}};;;{;;;{};;{;;;}{};;{};{};;}{;;;}{;{;};;;{}{;};}{;}{;;{;};;;;;
{;};;{{;;}};;;}{;;;;;{;;};;;;;;}{{}{}{};;;}{;;;;;;;;;;;{}{}{}}{;;{;;}{;
;};;;}{;;}{;;;;;;;;;;}{;;{;;};;{;;};;;;;;}{{}{}{};;;;;};;;;;;;;;;;;{;}{
;;;;}{;{;;;;;;;;;;;;;;{;;;};}};;
wp-trackback.php : {;;}{;;{;;;;;;}{;;;;}};{;;};;;;;;;;{;;;};;;;;{;;}{;;
;;;;;;;;;;;;;;;}
wp-activate.php : ;;;{;;};;{;};{{;}{;;}{;}{;}{;;;;;}};;{;}{;;{{;;;{;;
;}{;;;};}{;;}}{;;;;;;;;;;}};;;</pre></td></tr></table></div>

<p>To generate the signatures yourself, you can use the following shell script or a PHP program. The shell script is shown below.</p>

<div class="wp_codebox"><table><tr id="p293911"><td class="code" id="p2939code11"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span>.php; <span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$i</span>: &quot;</span>
    <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/[^{};]//g'</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">'\n'</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> 
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>And below is a PHP version to do the same.</p>

<div class="wp_codebox"><table><tr id="p293912"><td class="code" id="p2939code12"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/* Get all PHP files in the current directory */</span>
<span style="color: #000088;">$dir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'./*.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/* Use the SPL Iterator class */</span>
<span style="color: #000088;">$files</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> GlobIterator<span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/* Get the signature of each file */</span>
<span style="color: #000000; font-weight: bold;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$files</span> <span style="color: #000000; font-weight: bold;">as</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/[{};]/'</span><span style="color: #339933;">,</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span><span style="color: #000088;">$out</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$signature</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$out</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #000000; font-weight: bold;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$signature</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$line</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">echo</span> <span style="color: #000088;">$file</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFilename</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; : &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$signature</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Furthermore, we can make the output more attractive and user friendly, by outputting it to HTML, with links to each source file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/php/source-code-signatures-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OPA : new generation of web development platform</title>
		<link>http://www.codediesel.com/software/opa-new-generation-of-web-development-platform/</link>
		<comments>http://www.codediesel.com/software/opa-new-generation-of-web-development-platform/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 08:23:56 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[libraries]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[opa]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/?p=2878</guid>
		<description><![CDATA[Opa is a new generation of web development platform &#8211; it is a new programming language, a new web server, a new database and a new distributed execution engine, all of them tightly integrated to provide a great experience for web developers. OPA is concise, simple and readable, it is also provides concurrent, dynamically distributed, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codediesel.com/wp-content/uploads/2011/08/banner-cloud-language.png"><img src="http://www.codediesel.com/wp-content/uploads/2011/08/banner-cloud-language.png" alt="" title="opa-language-cloud-language" width="108" height="94" class="alignleft size-full wp-image-2880" /></a>Opa is a new generation of web development platform &#8211; it is a new programming language, a new web server, a new database and a new distributed execution engine, all of them tightly integrated to provide a great experience for web developers.</p>
<p><a href="http://opalang.org/" rel="nofollow" target="_blank" >OPA </a>is concise, simple and readable, it is also provides concurrent, dynamically distributed, and extremely secure programming model. Opa is designed to make web development fun, secure and right. Opa is a complete language and not just a framework, the unified approach of Opa delivers a new level of developing experience with unmatched ease of use and security.<br />
<span id="more-2878"></span><br />
While Opa offers all the features that developers have come to expect from a high-end web server, a high-end distributed database management system, frameworks or distribution engine, Opa does not resemble Apache or Tomcat, MySQL or Oracle SQL, Drupal or Ruby on Rails, Google AppEngine or Hadoop.</p>
<p>Developing with Opa is as simple as it gets: first, you write your code with the Opa programming language — and only the Opa programming language, no JavaScript, no SQL, or anything such (this is something new, will take sometime getting used to). Then compile the code, and let Opa analyze security, generate the code for the browser, for the server, for the database, and combine it with the web server. Finally, launch your executable and your browser. No need to independently deploy, administer or maintain a database management system, a web server, frameworks or middleware. And, of course, the application works on any recent browser, whether mobile or desktop. Oh yes, and it is right away “Cloud-ready”.</p>
<p>Let us take a sneak peek preview and take a look at the simplest application: Hello, web.</p>

<div class="wp_codebox"><table><tr id="p287817"><td class="code" id="p2878code17"><pre class="php" style="font-family:monospace;">server <span style="color: #339933;">=</span> one_page_server<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Hello&quot;</span><span style="color: #339933;">,</span> <span style="color: #339933;">-&gt;</span> <span style="color: #339933;">&lt;&gt;</span>Hello<span style="color: #339933;">,</span> web<span style="color: #339933;">!&lt;/&gt;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>This is the full source code of the application. Without any setup (besides the installation of the compiler), obtaining a complete, deployable application is only a matter of one step:</p>

<div class="wp_codebox"><table><tr id="p287818"><td class="code" id="p2878code18"><pre class="php" style="font-family:monospace;">opa hello_web<span style="color: #339933;">.</span>opa</pre></td></tr></table></div>

<p>This command produces a stand-alone executable binary, containing everything required for execution, including database management, compiled requests, server code, client code, user interface and everything that may be needed to connect them or to handle malicious connections or inputs. Opa generated and checked all this code for you. You may now launch the server:</p>

<div class="wp_codebox"><table><tr id="p287819"><td class="code" id="p2878code19"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">./</span>hello_web<span style="color: #339933;">.</span>exe</pre></td></tr></table></div>

<p>Or, if you prefer, you may deploy it to a cloud:</p>

<div class="wp_codebox"><table><tr id="p287820"><td class="code" id="p2878code20"><pre class="php" style="font-family:monospace;">opa<span style="color: #339933;">-</span>cloud hello_web<span style="color: #339933;">.</span>exe <span style="color: #339933;">--</span>host localhost <span style="color: #339933;">--</span>host my<span style="color: #339933;">@</span>server1 <span style="color: #339933;">--</span>host my<span style="color: #339933;">@</span>server2</pre></td></tr></table></div>

<p>Your application is launched, load-balanced, and servers share whichever information is necessary.</p>
<p>Although I&#8217;ve yet to develop an OPA application of more than average complexity to gauge the actual benefits of it; it looks promising and also something new to try. The OPA <a href="http://opalang.org/resources/doc/index.html#crypto.opa.html/!/value_stdlib.crypto" rel="nofollow" target="_blank" >API</a> also looks quite complete and well documented.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/software/opa-new-generation-of-web-development-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a intelligent web</title>
		<link>http://www.codediesel.com/software/building-a-intelligent-web/</link>
		<comments>http://www.codediesel.com/software/building-a-intelligent-web/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 05:06:49 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[intelligence]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/?p=2872</guid>
		<description><![CDATA[We have come a long way in web development – from static sites to distributed applications in the cloud; helped by a plethora of languages and frameworks. Many technologies made a surprising return &#8211; like the Phoenix rising from the ashes, JavaScript made a resurrection and with it the rise of libraries like jQuery and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codediesel.com/wp-content/uploads/2011/08/JicJac_Parts_Container.png"><img src="http://www.codediesel.com/wp-content/uploads/2011/08/JicJac_Parts_Container.png" alt="" title="web parts" width="148" height="150" class="alignleft size-full wp-image-2874" /></a>We have come a long way in web development – from static sites to distributed applications in the cloud; helped by a plethora of languages and frameworks. Many technologies made a surprising return &#8211; like the Phoenix rising from the ashes, JavaScript made a resurrection and with it the rise of libraries like jQuery and others; CSS helped us create stunningly attractive sites and entice the audience. But after all these years and the amazing technologies at our disposal, the websites we create are still fundamentally dumb in nature.<br />
<span id="more-2872"></span><br />
Take a daily scenario in my life. I’m a hypoglycemic – my blood sugar tends to plummet if I don’t eat for more than 4 hours. Lately I’ve been gorging on miniature cheese pizzas every evening from my local bakery (the cheese tends to control sugar levels). Each day for the last few days I go to the shop, read the menu (again) and order a pizza. Yesterday I sauntered to the shop for another measure of pizza, when the person behind the counter on seeing me immediately responded that they were out of pizzas for the day. He didn’t wait for me to check the menu; over the last few days he had learnt about my preferred food and had reasoned that in all probability I’ was going to order the same (which I was). That’s something we humans naturally do and which makes our interaction with others effortless and pleasurable.</p>
<p>Now contrast this with my typical interaction with a website. Last month I’d planned a tour itinerary for my relatives who had been travelling around Europe and had been using <a href="http://www.tripadvisor.com/" rel="nofollow" target="_blank" >tripadvisor.com</a> extensively for my research. Tripadvisor is an indispensible tool for travelers and offers some good features, but like most sites it is still dumb. Take for example the restaurant selection menu on the site from were you can select your preferred cuisine type. Being Indian my relatives naturally prefer eating at Indian restaurants. The hitch here is that every time I choose a different city the menu resets to its default and I have to re-select the ‘Indian Cuisine’ menu; which becomes exhausting after some time. Of course I can signup with the site and store my preferences, which is what most other sites do. But what I really want instead, is for the site to “learn about my preferences” as I go along interacting with it. After selecting the ‘Indian Cuisine’ menu for maybe six cities in a row, the site should understand that I’m interesting in ‘Indian Cuisine’ and  automatically select the relevant menu for my next city.</p>
<p>Of course not every site is dumb in design; some big sites use sophisticated <a href="http://en.wikipedia.org/wiki/Machine_learning" rel="nofollow" target="_blank" >machine learning</a> algorithms to help the user, but they are few and far between. And by intelligence I do not mean the ‘<a href="http://en.wikipedia.org/wiki/Semantic_Web" rel="nofollow" target="_blank" >Semantic Web</a>’ &#8211; which is a different beast altogether. By intelligence I mean an intelligent UI. Interfaces that cleverly help the user as he works around a website. Interfaces which, like a dutiful servant, anticipate the users’ needs and works accordingly. Are such kinds of artifacts hard to build? With so much programming talent around, I don&#8217;t think so.</p>
<p>I think we have had enough of jQuery plugins that show yet another photo gallery; or a new PHP framework, that like dozen others, promises to reduce the development time and make programming fun. Yes, programming should be fun, but what should be more fun is the final application we produce. A web application that users will love to work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/software/building-a-intelligent-web/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How not to create a Random string</title>
		<link>http://www.codediesel.com/php/how-not-to-create-a-random-string/</link>
		<comments>http://www.codediesel.com/php/how-not-to-create-a-random-string/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 04:55:52 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/?p=2765</guid>
		<description><![CDATA[It is surprising to see how after all the code floating around people still find it hard to create random numbers. In a recent piece of code I encountered, the following was used to generate a string of random numbers. The code was written to provide a random string to be passed to a email [...]]]></description>
			<content:encoded><![CDATA[<p>It is surprising to see how after all the code floating around people still find it hard to create random numbers. In a recent piece of code I encountered, the following was used to generate a string of random numbers. The code was written to provide a random string to be passed to a email verifier system – the type wherein a new user when he subscribes to a website needs to verify his email by clicking on a provided link.<br />
<span id="more-2765"></span><br />
The verification code was created by the following lines.</p>

<div class="wp_codebox"><table><tr id="p276525"><td class="code" id="p2765code25"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$alphanum</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;123456789&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;"># $insertedId is the id of the last database insert
</span><span style="color: #009933; font-style: italic;"># $verification_code is saved in the database
</span><span style="color: #000088;">$verification_code</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">str_shuffle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$alphanum</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$insertedId</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;"># Good till here, but the following line botches it up,
</span><span style="color: #009933; font-style: italic;"># the generated number is further multiplied by a constant.
</span><span style="color: #000088;">$verificationCode</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$verification_code</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">12345</span><span style="color: #009900;">&#41;</span> <span style="color: #009933; font-style: italic;">#ouch!;
</span>
<span style="color: #009933; font-style: italic;"># $verificationCode is now sent through the email link as a GET parameter,
</span><span style="color: #009933; font-style: italic;"># e.g http://www.xyz.com/verify_email.php?vid=$verificationCode</span></pre></td></tr></table></div>

<p>When the user clicked on the verify email link the verification code was retrieved from the GET parameter, divided by a constant number and the result compared to the original verification code stored in the database.</p>

<div class="wp_codebox"><table><tr id="p276526"><td class="code" id="p2765code26"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$verificationCode</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$verifyCode</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$verificationCode</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">12345</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The problem was that once in a while the random string generation code would spew a somewhat larger number, which PHP would happily convert to a exponential format and pass it over the email link in the GET parameter.</p>

<div class="wp_codebox"><table><tr id="p276527"><td class="code" id="p2765code27"><pre class="php" style="font-family:monospace;">http<span style="color: #339933;">:</span><span style="color: #009933; font-style: italic;">//www.xyz.com/verify_email.php?vid=6.9833696969697E+19</span></pre></td></tr></table></div>

<p>The number which when retrieved by the system would obviously not compare with the original and the system would flag the email link as invalid, robbing the site owner of potential subscribers.</p>
<p>Rather than go with all the rigmarole, a good way would have been to generate a random string using the following.</p>

<div class="wp_codebox"><table><tr id="p276528"><td class="code" id="p2765code28"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$verificationCode</span>  <span style="color: #339933;">=</span>  <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">uniqid</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The point being that you cannot be too careful when dealing with numbers, a single overlooked fact can trip you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/php/how-not-to-create-a-random-string/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Measuring user effectiveness with the Apdex metric</title>
		<link>http://www.codediesel.com/software/measuring-user-effectiveness-with-the-apdex-metric/</link>
		<comments>http://www.codediesel.com/software/measuring-user-effectiveness-with-the-apdex-metric/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 14:20:33 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[apdex]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/?p=2727</guid>
		<description><![CDATA[Creating a business application is one thing, measuring user-satisfaction another. Most software houses in recent years have woken up to the importance of user-facing metrics, the knowledge that user satisfaction regarding software application performance is an integral part of business success. But the problem in application performance measurement is that there are too many metrics [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a business application is one thing, measuring user-satisfaction another. Most software houses in recent years have woken up to the importance of user-facing metrics, the knowledge that user satisfaction regarding software application performance is an integral part of business success. But the problem in application performance measurement is that there are too many metrics and measurements which in the end adds nothing of real value to the performance reports. What most people need is a metric that is easy to calculate and interpret. Apdex is one such metric.<br />
<span id="more-2727"></span></p>
<h4>Apdex: Measuring user effectiveness</h4>
<p>Apdex (Application Performance Index) is an open measurement standard developed by a  group of companies. It is a numerical measure of user satisfaction regarding performance of web or desktop applications. It enables management to gain insights about user satisfaction with respect to the developed application. </p>
<p>Apdex converts multiple  measurements into a single number on a scale of 0 to 1 (0 = no users satisfied, 1 = all users satisfied). This metric can be applied to any source of end-user performance measurements that gathers timing data.</p>
<p>The index is based on three areas of application responsiveness, we will see this in the context of web applications. The three areas are partitioned by two time limits, <strong>T</strong> and <strong>F</strong>. <strong>T</strong> (satisfied-tolerating<br />
boundary) represents the base time limit (in seconds) below which the application is responsive; and <strong>F</strong> represents the maximum limit after which the application response drops considerably and the user may close the application or navigate to another site. F is taken as (4xT) or four times T.</p>
<p><a href="http://www.codediesel.com/wp-content/uploads/2010/10/apdex3.gif"><img  style="border:none;"  src="http://www.codediesel.com/wp-content/uploads/2010/10/apdex3.gif" alt="" title="apdex3" width="514" height="194" class="aligncenter size-full wp-image-2731" /></a></p>
<p>■ <strong>Satisfied</strong>—The user is completely productive. This represents the time value <strong>T</strong> below which<br />
users are not impeded by application response time. For e.g when a web page loads in less than 3 seconds.</p>
<p>■ <strong>Tolerating</strong>— With response time greater than <strong>T</strong> the user starts noticing the performance lag but continues the process. E.g. when the page takes around 10-15 seconds to completely load.</p>
<p>■ <strong>Frustrated</strong>—Performance with a response time greater than <strong>F</strong> seconds leads to frustration and the user usually navigates away from the site.</p>
<p>So if we need to measure the Apdex score for a 75 page enterprise web application, we have to initially set the target times <strong>T</strong> and <strong>F</strong> around which our three measurements will be based.</p>
<p>Lets set T to 3 seconds and F to 12 seconds. After measuring the load time of the 75 pages we find that 28 pages load in less than 3 seconds, 40 page load between T and F seconds, and the remaining load in more than F seconds. In short:</p>
<p>Load time of 28 pages <= T<br />
T < Load time of 40 pages <= F<br />
Load time of 7 pages > F</p>
<p>We can then calculate the Apdex score using the following formula:</p>
<p><a href="http://www.codediesel.com/wp-content/uploads/2010/10/apdex11.gif"><img  style="border:none;" src="http://www.codediesel.com/wp-content/uploads/2010/10/apdex11.gif" alt="" title="apdex1" width="324" height="82" class="aligncenter size-full wp-image-2733" /></a></p>
<p>Which in our case will give a score of <strong>0.64</strong>:</p>
<p><a href="http://www.codediesel.com/wp-content/uploads/2010/10/apdex22.gif"><img  style="border:none;"  src="http://www.codediesel.com/wp-content/uploads/2010/10/apdex22.gif" alt="" title="apdex2" width="191" height="69" class="aligncenter size-full wp-image-2735" /></a></p>
<p>The score gives a value of &#8217;1&#8242; when all the users are satisfied with the application performance, a &#8217;0&#8242; when no one is satisfied and &#8217;0.5&#8242; when all the users are tolerating the application performance. For other variations the score can range  between 0 &#8211; 1.</p>
<h4>Advantages of Apdex</h4>
<p>The main advantage of the metric is that it provides a single score that lets the IT manager easily compare performace between different applications or different versions of the same applications. In the context of web applications a IT manager can easily compare the Apdex score before and after optimizing a web application.</p>
<p><strong>References:</strong><br />
<a href="http://en.wikipedia.org/wiki/Apdex" rel="nofollow" >http://en.wikipedia.org/wiki/Apdex</a><br />
<a href="http://www.apdex.org/index.html" rel="nofollow" >http://www.apdex.org/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/software/measuring-user-effectiveness-with-the-apdex-metric/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importance of logging in web development</title>
		<link>http://www.codediesel.com/software/logging-in-web-development/</link>
		<comments>http://www.codediesel.com/software/logging-in-web-development/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 14:32:19 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[logs]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/sql/logging-for-your-sanity/</guid>
		<description><![CDATA[Software development is an exercise in managing complexity, and the more tools and methods we have at our disposal the easier it gets. One of my favorites is logging – recording important code execution points that I think are important, especially during debugging. Whenever developing functions or class methods I make it a point to [...]]]></description>
			<content:encoded><![CDATA[<p>Software development is an exercise in managing complexity, and the more tools and methods we have at our disposal the easier it gets. One of my favorites is logging – recording important code execution points that I think are important, especially during debugging. Whenever developing functions or class methods I make it a point to add logging capabilities to the same.  Logging helps one to quickly tracks bugs and evaluate the health of the system under development.<br />
<span id="more-2710"></span><br />
But what information does one log and what does one keep out. This usually depends on what kind of application you are developing. While developing database intensive applications I prefer to log every query execution state – the whole CRUD things. This helps me to quickly pinpoint any query errors and the sequence in which the queries are run. </p>
<p>Take an example class method addUser() shown below. When the query is executed the result is logged in a file with the function name and a user_id or a serialized error string in case of an error. Whenever the application is in a testing phase, the error logs are an immense help in diagnosing error points. This is better than a splattering of <em>print_r</em> statements all around the code.</p>

<div class="wp_codebox"><table><tr id="p271032"><td class="code" id="p2710code32"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;LOG&quot;</span><span style="color: #339933;">,</span>  <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/** Add new user to the system
 *
 *  @param array $user_data
 *  @return boolean
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span>  addUser<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_data</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #339933;">.</span>
<span style="color: #339933;">.</span>
    <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$sql</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">LOG</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$err_string</span> <span style="color: #339933;">=</span> <span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errorInfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_log<span style="color: #339933;">-&gt;</span><span style="color: #004000;">LogError</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;addUserd | error | &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$err_string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">LOG</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_log<span style="color: #339933;">-&gt;</span><span style="color: #004000;">LogInfo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;addUser| no. | &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$user_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The contents of a sample log file are shown below.</p>

<div class="wp_codebox"><table><tr id="p271033"><td class="code" id="p2710code33"><pre class="text" style="font-family:monospace;">2010-07-31 4:52:58 - INFO  | addUser | no. | h1280551978 
2010-07-31 4:53:04 - INFO  | user edit | no. | 1 
2010-07-31 4:53:06 - INFO  | user edit | no. | 1 
2010-07-31 4:53:07 - INFO  | addUser| no. | 1 
2010-07-31 4:53:09 - ERROR | addUser| error | 
a:3:{i:0;s:5:&quot;23&quot;;i:1;i:148;i:2;s:30:&quot;Column 'fileno' cannot be null&quot;;}</pre></td></tr></table></div>

<p>Although logs can add some overhead to your code, it is a small price to pay for the benefits it provides. And if you do not want the logging feature you can easily disable it by setting the <em>LOG</em> constant to &#8216;false&#8217; in the above code.</p>
<h4>Which logger to use</h4>
<p>Although there a variety of libraries, I prefer <a href="http://github.com/katzgrau/KLogger" rel="nofollow" target="_blank" >KLogger</a> as it has a small footprint and is easy to use. Other more advanced contender is <a href="http://logging.apache.org/log4php/" rel="nofollow" target="_blank" >Log4PHP</a>, a PHP port of log4j, a Java logger. <a href="http://framework.zend.com/manual/en/zend.log.html" rel="nofollow" target="_blank" >Zend_Log</a> also looks nice but I am yet to give it a try.</p>
<h4>Analyzing logs</h4>
<p>For big, frequently used applications, log files can quickly get quite huge. The easy way to analyze them is to use GUI tools like <a href="http://www.logmx.com/" rel="nofollow" target="_blank" >LogMX</a> and <a href="http://logging.apache.org/chainsaw/index.html" rel="nofollow" target="_blank" >Apache Chainsaw</a>. But if you just need to get some simple statistics from your logs, you could use the trusty old <em>grep</em> and other *nix utilities. For example to count the total error lines having the string &#8216;mysql&#8217; you could use the following code.</p>

<div class="wp_codebox"><table><tr id="p271034"><td class="code" id="p2710code34"><pre class="unix" style="font-family:monospace;">$ grep 'ERROR ' activity.log | grep 'mysql' | wc -l</pre></td></tr></table></div>

<p>The advantage of scripts over GUI tools is that you can automatically process them using CRON jobs, e.g &#8211;  emailing the admin if some particular type of errors in a log reaches some critical limit.</p>
<p>In conclusion, logs are one of the simplest ways of keeping track of your code problems or to check the execution sequence of your statements. This can be immensely helpful during development and for tracking down bugs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/software/logging-in-web-development/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>For whom do we develop software!</title>
		<link>http://www.codediesel.com/browser/for-whom-do-we-develop-software/</link>
		<comments>http://www.codediesel.com/browser/for-whom-do-we-develop-software/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 03:15:51 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[browser]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[interface]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/general/these-are-your-users/</guid>
		<description><![CDATA[interface design as an important part of software development]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codediesel.com/wp-content/uploads/2010/04/badaman_hands_on_clay.png"><img src="http://www.codediesel.com/wp-content/uploads/2010/04/badaman_hands_on_clay.png" alt="badaman_hands_on_clay" title="badaman_hands_on_clay" width="90" height="66" class="alignleft size-full wp-image-2649" style="border: none;" /></a>Interface design is hard. Which is why most programmers turn a blind eye to it. During collaborative development I frequently encounter fellow programmers remark something to the following effect: &#8216;<em>&#8230;do not worry, the users are not idiots, they will understand for what these buttons have been provided, no need to provide tool-tips or any help, lets get these code working and show it to the client</em>.&#8217;<br />
Interface design or rather usability design is usually left as an after thought; a colorful facade that you stick on to your backend code.</p>
<p>The following two videos provide a stark reminder, that for most of the time these are the people we develop software for.<br />
<span id="more-2648"></span><br />
<object width="500" height="280"><param name="movie" value="http://www.youtube.com/v/o4MwTvtyrUQ&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/o4MwTvtyrUQ&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="280"></embed></object></p>
<p><object width="500" height="280"><param name="movie" value="http://www.youtube.com/v/lEt0N3xu0Do&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lEt0N3xu0Do&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="280"></embed></object></p>
<p>Although the above videos are in the context of the users familiarity with the concept of a browser, it brings home the point that for the user the interface is everything, which most of us developers give little thought. Most users don&#8217;t care what browser or the version thereof they are using, they just need to get the work done somehow.</p>
<p>People are not idiots as the above videos may have you believe, on the contrary we developers are not smart enough to create usable software. </p>
<p>Writing software, once we become comfortable with the language and environment is easy. But crafting software that the user will love and admire is a lot harder, which in the end is what really matters. Not that I&#8217;m downplaying the importance of good code &#8211; testing, security, code efficiency are all important elements of a good product. But for the user, <em>the interface is the product</em>.  Apple seems to get it, so why can&#8217;t everyone.</p>
<p>The path out of this quandary is to really <em>understand </em> usability. If you are a freelancer developer get some good books on interface design and usability, read them, try to implement as much good interface designs into your current project as you possibly can. Over time this will become almost second nature to you. Below are some of the books related to good interface designs that I personally like:</p>
<p><a href="http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1272343205&#038;sr=8-1" rel="nofollow" ><img src="http://www.codediesel.com/wp-content/uploads/2010/04/dontmakemethink.jpeg" alt="don't make me think" title="don't make me think" width="101" height="130" class="alignleft size-full wp-image-2650" /></a><a href="http://www.amazon.com/Designing-Interfaces-Patterns-Effective-Interaction/dp/0596008031/ref=sr_1_26?ie=UTF8&#038;s=books&#038;qid=1272343557&#038;sr=8-26" rel="nofollow" ><img src="http://www.codediesel.com/wp-content/uploads/2010/04/designing-interfaces.jpeg" alt="designing-interfaces" title="designing-interfaces" width="101" height="130" class="alignleft size-full wp-image-2651" /></a><a href="http://www.amazon.com/Effective-UI-ebook/dp/B003AU7DPC/ref=sr_1_2?ie=UTF8&#038;m=AH9CGK6QR37LL&#038;s=digital-text&#038;qid=1272344179&#038;sr=8-2" rel="nofollow" ><img src="http://www.codediesel.com/wp-content/uploads/2010/04/effectiveui.jpg" alt="effectiveui" title="effectiveui" width="101" height="130" class="alignleft size-full wp-image-2652" /></a><a href="http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0465067107/ref=sr_1_2?ie=UTF8&#038;s=books&#038;qid=1272345314&#038;sr=8-2" rel="nofollow" ><img src="http://www.codediesel.com/wp-content/uploads/2010/04/designofeverydaythings.jpg" alt="designofeverydaythings" title="designofeverydaythings" width="90" height="130" class="alignleft size-full wp-image-2653" /></a></p>
<p>Many readers will be surprised by the absence of Coopers&#8217; <a href="http://www.amazon.com/About-Face-Essentials-Interaction-Design/dp/0470084111/ref=sr_1_7?ie=UTF8&#038;s=books&#038;qid=1272344671&#038;sr=8-7" rel="nofollow" >About Face 3</a> here. Coopers&#8217; is a decent book, but I somehow do not like it. It is a tad wordy and preachy, most of which I do not agree on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/browser/for-whom-do-we-develop-software/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating win/win projects using Project Value Analysis</title>
		<link>http://www.codediesel.com/software/creating-win-win-projects-using-project-value-analysis/</link>
		<comments>http://www.codediesel.com/software/creating-win-win-projects-using-project-value-analysis/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 07:41:42 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[clients]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/software/6-maxims-to-satisfy-a-client/</guid>
		<description><![CDATA[importance of Project Value Analysis in delivering a successful project]]></description>
			<content:encoded><![CDATA[<p>From a client’s perspective, the most important criteria when developing any new software is that it adds some &#8216;value&#8217; to his company. Every software application has some financial and some intangible value attached with it. Without it there would be no reason for a client to invest in developing new software or for that matter, upgrading an existing one. The client has some financial goals in his mind when he proposes to develop some software. He plans to make some profit (financial or otherwise) from the development of the software. Whether the financial gains are immediate or peripheral is a different matter.<br />
<span id="more-2266"></span><br />
But it is a complete different scene at the typical software development house. Developers are usually in the dark about the value aspects of the software they are developing. This most often, but not always, leads to a restrained and blithe attitude of developers. Not to squarely put the blame on the developers or management only, many times  the fault also lies with the client, who fails to communicate the ‘expected value’ of the proposed software clearly.</p>
<p>As a small reminder, below are six of the most important expectations the client has from the developed software, every other thing hinges on these:</p>
<blockquote><p>
1. Revenue generation from the new application<br />
2. Cost reductions from the new application or upgrade<br />
3. Indirect revenue generation<br />
4. Increase in exiting user base due to some new features<br />
5. Increase in market share<br />
6. Revenue increase in companion application
</p></blockquote>
<p>The points raised above may come as common-sense; but how many times when developing for a client, have you given thought to these matters. We developers and usually busy thinking about the best way to structure the application, the best way to run a SQL query, the best MVC framework;  leaving the business and value aspects of the proposed software to the management; who usually do not find it prudent to enlighten the developers’ in that matter. It’s not that the technical issues are not important; what is wrong is the predominant focus on technical issues.</p>
<p>Taking the business and value aspects into consideration during development enables you to view the project from the clients perspective. This in itself makes taking decisions regarding certain technical issues easier. It is even more important for you to take the business issues into consideration if you are a freelance developer, where you are solely responsible for bad project outcome, unlike a company where you can play the blame game and walk away from the mess unscathed.</p>
<p>In a nutshell, a client does not care if you have used the latest MVC framework, or used your expert programming skills to design that perfect algorithm. What they truly care is whether the developed software will garner them some intrinsic value more then what they paid for, which in business parlance we know as ROI. Everything else is just details. </p>
<p>Consider those matters when developing your next project and you will have a win/win project in your hands with a satisfied and smiling client as a bonus.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/software/creating-win-win-projects-using-project-value-analysis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Where did that bug come from?</title>
		<link>http://www.codediesel.com/software/where-did-that-bug-come-from/</link>
		<comments>http://www.codediesel.com/software/where-did-that-bug-come-from/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 15:44:25 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.codediesel.com/?p=1988</guid>
		<description><![CDATA[how small changes in code can introduce bugs]]></description>
			<content:encoded><![CDATA[<p>This is the second time this week that I encountered a annoying bug, introduced just by a small change in the code. Just when you think you can get away with minor changes without testing, you are in for a surprise.</p>
<p>The most common sense thing you can do is to test your code even for small changes; whether you are testing it yourself or sending it to the testing team. Seems simple, but how many times have you really done that. Its not that we are stupid, rather software was never so simple. Maybe we are careless sometimes. The moral is plain &#8211; treat even small changes important, and move it through a test before committing it to a version control.<br />
<span id="more-1988"></span><br />
The following figure from Steve Mcconnell&#8217;s <a href="http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670" rel="nofollow" >Code Complete</a> shows the relation between lines of code changed and errors introduced.</p>
<p><a href="http://www.codediesel.com/wp-content/uploads/2009/11/bug_source.gif"><img src="http://www.codediesel.com/wp-content/uploads/2009/11/bug_source.gif" alt="bug_source" title="bug_source" width="430" height="235" class="aligncenter size-full wp-image-1990" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codediesel.com/software/where-did-that-bug-come-from/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 2.922 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-08 10:55:22 -->

