<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">

  <channel>
	<title>Alfonso Jiménez</title>
	<link>http://www.alfonsojimenez.com</link>
	<description>El somni d'una nit d'estiu</description>
	<pubDate>Thu, 30 Oct 2008 19:50:08 GMT</pubDate>
	<generator>http://www.alfonsojimenez.com</generator>

	
    <item>
      <title><![CDATA[Visualization of a Phing buildfile]]></title>
      <link>http://www.alfonsojimenez.com/2008/10/30-visualization-of-a-phing-buildfile</link>
      <pubDate>Thu, 30 Oct 2008 19:50:08 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p><strong>Raphael Stolt</strong> published a method to get a <strong>visualization of a Phing buildfile</strong> a few days ago:</p>
<p><em>Out of the box the Phing -l option can be used to get a first overview of all available targets in a given buildfile but it doesn&#8217;t untangle the target dependencies and sometimes a picture is still worth a thousand words. Luckily the Ant community already provides several tools to accomplish the visualization of Ant buildfiles, reaching from solutions that apply a Xslt stylesheet upon a given buildfile.</em></p>
<p>He uses the <em>ant2dot</em> tool and the <em>Graphiz</em> library to show the XML from a buildfile into a graphic. The image represents the flow of the build.</p>
<p><img src="http://farm4.static.flickr.com/3030/2974636277_e31efcd536_o.png" class="centro_sinmarco" alt="Phing" /></p>
<p>Via | <a href="http://raphaelstolt.blogspot.com/2008/10/getting-visualization-of-phing.html" title="Visualization of a Phing buildfile">Raphael Stolt</a>
</p>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[Webgrind: A web frontend for Xdebug]]></title>
      <link>http://www.alfonsojimenez.com/2008/10/17-webgrind-a-web-frontend-for-xdebug</link>
      <pubDate>Fri, 17 Oct 2008 11:11:37 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p><strong>Webgrind</strong> is a web frontend for the popular <strong>Xdebug</strong>. Written by <a href="http://jokke.dk/">Joakim Nygård</a> and <a href="http://oettinger.dk/">Jacob Oettinger</a>, <strong>Webgrind</strong> parses the Xdebug output and shows it on a dropdown table.</p>
<p>It doesn&#8217;t make such a big job, but it&#8217;s nice to see the result on a clean interface. The last release is 0.81, and you can get it from <a href="http://code.google.com/p/webgrind/" title="Web Grind" rel="nofollow">Google Code</a>.</p>
<p><img src="http://www.alfonsojimenez.com/images/2008/10/webgrind.png" alt="Webgrind" class="centro_sinmarco" />
</p>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[Rasmus, Think again!]]></title>
      <link>http://www.alfonsojimenez.com/2008/10/15-rasmus-think-again</link>
      <pubDate>Wed, 15 Oct 2008 15:43:37 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p>I would like to share with you my friend <a href="http://www.bermilabs.com/en/team/arno-schneider/" title"Arno Schneider">Arno</a>&#8217;s slides. He expounded this presentation during the last <strong>PHP Conference</strong> in Barcelona. He gave a speech on the usage of frameworks and software components in order to build PHP applications.</p>
<p>The famous Rasmus Lerdorf&#8217;s dixit is shown up in these slides, via some amusing examples: <em>Frameworks are performing poorly</em>. Arno prooves this statement using a <em>Hello World</em> application, and yes, Rasmus is right and framework performances suck for <em>Hello Word</em> applications.</p>
<div style="text-align:center; margin-bottom: 20px"><object width="450" height="346"><br />
<param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=rasmus-think-again-agile-framework-happy-php-developer-1222716601566030-9"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowScriptAccess" value="always"></param><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=rasmus-think-again-agile-framework-happy-php-developer-1222716601566030-9" type="application/x-shockwave-flash" width="420" height="336" allowFullScreen="true" allowScriptAccess="always"></embed></object></div>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[Google 404]]></title>
      <link>http://www.alfonsojimenez.com/2008/08/27-google-404</link>
      <pubDate>Wed, 27 Aug 2008 11:44:33 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p>I gotta say, I had thought this before. <strong>Google</strong> provides a new way to enhance 404 pages. If our visitors get a <em>not found</em> error, we can give them some alternatives using a simple Google snippet. This code provides the <strong>closest match</strong> (for the URL) and other things to try such as search into the site. This is useful information designed to help them find the information the users need.</p>
<p><img src="http://www.alfonsojimenez.com/images/2008/08/google404.jpg" class="centro_sinmarco" alt="Google 404 Pages" /></p>
<p>You can read more about it on the <a href="http://googlewebmastercentral.blogspot.com/2008/08/make-your-404-pages-more-useful.html" title="Google 404 Pages">Official Google Webmaster Blog</a>.
</p>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[Multiple Constructors in PHP]]></title>
      <link>http://www.alfonsojimenez.com/2008/07/29-multiple-constructors-in-php</link>
      <pubDate>Tue, 29 Jul 2008 21:02:25 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p><img src="http://www.alfonsojimenez.com/images/2008/07/bob.jpg" class="izquierda_sinmarco" alt="Bob the builder" />As you probably know, it&#8217;s possible to have multiple constructors in Java. They need to have the same name as the class, and they can only be distinguished by the number and type of arguments. In PHP5, you can only have <strong>one constructor</strong>. You can define it using the reserved word <em>__construct</em>. If the <em>__construct</em> function doesn&#8217;t exist, PHP5 will search for the old-style constructor function (by the name of the class). So if we cannot have multiple constructors, how could we create objects with different initial conditions? It&#8217;s not a big deal. There&#8217;s a pattern called <strong>Factory Method</strong>, which <strong>defines <em>virtual</em> constructors using static methods</strong>. Let&#8217;s see an example:</p>
<pre class="code"><code>
class Person
{
    private $name;
    private $email;

    public static function withName($name)
    {
        $person       = new Person();
        $person->name = $name;

        return $person;
    }

    public static function withEmail($email)
    {
        $person        = new Person();
        $person->email = $email;

        return $person;
    }

    public static function fullPerson($name, $email)
    {
        $person        = new Person();
        $person->name  = $name;
        $person->email = $email;

        return $person;
    }
}
</code></pre>
<p>We have a class called <strong>Person</strong> which contains 2 private attributes: <strong>name</strong> and <strong>email</strong>. It also has 3 static methods: <strong>withName</strong>, <strong>withEmail</strong> and <strong>fullPerson</strong>. These methods will behave like constructors.</p>
<p>So if we want to create a Person object just with the name value, we can do it using the following statement:</p>
<pre class="code">
<code>
$person = Person::withName('Example');
</code>
</pre>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[7 tips to write intelligible code]]></title>
      <link>http://www.alfonsojimenez.com/2008/07/27-7-tips-to-write-intelligible-code</link>
      <pubDate>Sun, 27 Jul 2008 12:52:41 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p><img src="http://www.alfonsojimenez.com/images/2008/07/php_logo.jpg" alt="PHP" class="derecha_sinmarco" />Writing <strong>intelligible code</strong> helps to increase the productivity of a developing team, even if you are an independent worker. Why is it so important to write intelligible code? How can it improve the productivity of my team? A messed up code could delay your partners understanding, or it could create a barrier for new developers. Even trying to understand your own code could be a real challenge as well. Here are 7 tips of how to make more <strong>intelligible PHP code</strong> (<em>coding style tips</em>):</p>
<ol>
<li><strong>75-85 characters per line</strong>: Each line must contains approximately 75-85 characters. If a line exceeds more than 85 characters, consider splitting the line into multiple lines. It will be helpful for code readability. You can see a great post on this topic in <a href="http://paul-m-jones.com/?p=276">Paul Jones&#8217; blog</a>. He talks about why this limitation is not really arbitrary, and he puts some brilliant examples such as this one:
<p><em>Bad</em></p>
<pre style="overflow: scroll;"><code>list($foo, $bar, $baz) = array(Zim::getVal('foo'), Dib::getVal('bar'), Gir::getVal('baz', Gir::DOOM));
</code></pre>
<p><em>Good</em></p>
<pre><code>$foo = Zim::getVal('foo');
$bar = Dib::getVal('bar');
$baz = Gir::getVal('baz', Gir::DOOM);
</code></pre>
</li>
<li><strong>Assignment statements</strong>: Assignment statements ought be aligned for better readability. Let&#8217;s see an example:
<p><em>Bad</em></p>
<pre class="code"><code>
$example = 'string_value';
$anotherExample = 42;
$exampleInst = new ExampleClass();
</code></pre>
<p><em>Good</em></p>
<pre class="code"><code>
$example        = 'string_value';
$anotherExample = 42;
$exampleInst    = new ExampleClass();
</code></pre>
</li>
<li><strong>4-spaces block indentation</strong>: Use an indent of 4 spaces with no tabs. It helps to avoid problems with diffs, patches and SVN history. It helps the readability as well. Usually tabs are 8 spaces length, which means a 5th-block indent starts 40 spaces from the left border (nearly to 50% of a code line).<br />
<pre class="code">
<code>
{block1}
    {block2}
        {block3}
            ...
</code>
</pre>
</li>
<li>
<strong>Control &#038; conditional structures</strong>: These statements must have <em>one space</em> between the control keyword (if, else, for, while, &#8230;) and the opening parenthesis, to distinguish them from function calls (which obviously don&#8217;t have a space). It&#8217;s nice to always use curly braces because they help to decreases the likelihood of logic errors.</p>
<pre class="code">
<code>
if ($display === 1) {
    while ($obj->next()) {
        echo $obj->toString();
    }
}
</code>
</pre>
</li>
<li>
<strong>Class and function/methods declarations</strong>: Class and function/methods declarations have their opening brace on a new line.</p>
<pre class="code"><code>
class Foo
{
    private $_obj;

    public function __construct($obj)
    {
        $this->_obj = $obj;
    }
}
</code></pre>
</li>
<li><strong>Comma-space between items of a list</strong>: When we list some items, it&#8217;s nice to separate them clearly with a comma followed by a space.
<p><em>BAD</em></p>
<pre class="code"><code>
$example = array(Foo::get('key',2),$value,true);
</code></pre>
<p><em>GOOD</em></p>
<pre class="code"><code>
$example = array(Foo::get('key', 2), $value, true);
</code></pre>
</li>
<li><strong>Use constants properly</strong>: If we have a method which returns some status codes, it&#8217;s nice to use literal constants. Having descriptive constants helps to make better intelligible code. For example:
<p><em>BAD</em></p>
<pre class="code"><code>
class Foo
{
    public static function getStatus()
    {
        $res = 0;

        if (!self::isValid()) {
            $res = 1;
        }
        ...

        if ($res === 0 &#038;&#038; self::isRepeated()) {
            $res = 2;
        }

        return $res;
    }
}
</code></pre>
<p><em>GOOD</em></p>
<pre class="code"><code>
class Foo
{
    const STATUS_SUCCESS  = 0;
    const STATUS_FAILURE  = 1;
    const STATUS_REPEATED = 2;

    public static function getStatus()
    {
        $res = self::STATUS_SUCCESS;

        if (!self::isValid()) {
            $res = self::STATUS_FAILURE;
        }

        ...

        if ($res === self::STATUS_SUCCESS &#038;&#038; self::isRepeated()) {
            $res = self::STATUS_REPEATED;
        }

        return $res;
    }
}
</code></pre>
</li>
</ol>
<p>These tips are just some <em>coding style tips</em>. If we really want to write intelligible code, we would keep in mind many more things like to use software patterns, to make use of well established software practises, &#8230;
</p>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[Amarok: Project Neon]]></title>
      <link>http://www.alfonsojimenez.com/2008/05/06-amarok-project-neon</link>
      <pubDate>Tue, 06 May 2008 20:27:47 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p><img src="http://www.alfonsojimenez.com/images/2008/05/amarok-neon.png" class="centro_sinmarco" alt="Project Neon Amarok" /></p>
<p>Ladies and gentlemen, the doors are opened on the <strong>Neon</strong> project. <strong>Neon</strong> is no more than a new service by <strong>Amarok</strong>, which offers nightly builds to the users who want to try the lastest available version. It should be noted that is <strong>not a stable version</strong>, but it&#8217;s intended to be used by everyone who wants to help find bugs or to join development for <strong>Amarok</strong>.</p>
<p>If you are using Kubuntu Hardy Heron and you are interested on installing it, just add this line to <em>/etc/apt/source.list</em> and install the <strong>amarok-nightly</strong> package:</p>
<pre class="code">deb http://ppa.launchpad.net/project-neon/ubuntu hardy main</pre>
<p>More information | <a href="http://amarok.kde.org/de/node/485" title="Amarok">Official Amarok site</a>
</p>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[Non-free SF on free systems]]></title>
      <link>http://www.alfonsojimenez.com/2008/05/04-non-free-sf-on-free-systems</link>
      <pubDate>Sun, 04 May 2008 22:17:11 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p><img src="http://www.alfonsojimenez.com/images/2008/05/gnu_floating.jpg" alt="GNU" class="centro_sinmarco" /><br />
People are ignorant, but we already know that. As usual, I&#8217;ve read something really stupid on <a href="http://twitter.com/nova/statuses/803141313" rel="nofollow" title="Nova">Twitter</a> this morning. It said: <em>I hope Apple will develop for everyone [every OS]</em>. I think it would be one of the worst things to ever happen. <strong>Why do people want to install non-free software on free systems?</strong> If we want a truly free system, we cannot accept non-free software in our system. If people keep installing, running or developing non-free components, <strong>GNU/Linux will be turned into a fuzzy combination of free and non-free software</strong>. And we also could find free software which depends on non-free packages. The freedom movement would have failed if this happens.</p>
<p>People wants to install non-free software on free systems because <strong>they have not idea</strong>. They have not been educated using the free software principles. They don&#8217;t understand why the software should be free. They are confused between the free software and the open source movement. The universities doesn&#8217;t teach anything about the free software principles, even many teachers don&#8217;t know anything about free software. People wants to install non-free software on free systems because <strong>they don&#8217;t know what the free software is</strong>.</p>
<p><img src="http://www.alfonsojimenez.com/images/2008/05/adobe.jpg" class="derecha_sinmarco" />The insistence of running <strong>Adobe Photoshop</strong> on GNU/Linux is a good example of this. I&#8217;m not going to talk about the Photoshop/The Gimp challenge, although I manage well myself using The Gimp. Each user should know that Adobe Photoshop has a horrible license which it doesn&#8217;t allow the freedom to run, modify and redistribute it. The Gimp (GNU Image Manipulation Program) is available under the terms of the GNU General Public License (<em>GPL</em>), so we have the freedom to run, copy, change, study, distribute, improve the software and release our improvements. That&#8217;s how the community gets benefits. The Gimp, like free software, contributes to human knowledge, whilst Adobe Photoshop, like non-free software does not.</p>
<p>I read a <a href="http://winehq.org/pipermail/wine-devel/2008-February/062550.html" rel="nofollow" title="Google supports Wine">message</a> in a mailing list that could not have shocked me more. It said: <em>Google also sponsored some work by Codeweavers to improve [Wine] support for Photoshop (&#8217;cause so many people want it)</em> What a bad news for the free software! That&#8217;s not what people want, that&#8217;s not what GNU/Linux was made for. <strong>Why don&#8217;t Google support The Gimp instead of a Wine support for Adobe Photoshop?</strong>
</p>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[Ubuntu on lettuces]]></title>
      <link>http://www.alfonsojimenez.com/2008/04/06-ubuntu-on-the-lettuces</link>
      <pubDate>Sun, 06 Apr 2008 12:59:59 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p>I&#8217;ve seen on <a href="http://tuxpepino.wordpress.com/2008/04/05/lechugas-ubunteras/" rel="nofollow">Entre tuxes y pepinos</a> a curious lettuce with the <strong>Ubuntu Logo</strong>! The company is called <strong>El corral de los niños</strong> (<em>The children&#8217;s farmyard</em>) and it has been seen in <em>Badajoz</em>. And from what I have read, I would like to advise that it can contain bugs <img src='http://www.alfonsojimenez.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://www.alfonsojimenez.com/images/2008/04/lechugaubuntera1vq9.jpg" class="centro" alt="Lettuce" /></p>
<p><img src="http://www.alfonsojimenez.com/images/2008/04/lechugaubuntera2zh9.jpg" class="centro" alt="Lettuce" />
</p>
]]></description>
    </item>
	
    <item>
      <title><![CDATA[The Mythical Man-Month]]></title>
      <link>http://www.alfonsojimenez.com/2008/03/28-the-mythical-man-month</link>
      <pubDate>Fri, 28 Mar 2008 22:16:48 GMT</pubDate>
      <author>alfonso</author>
      <description><![CDATA[<p>It&#8217;s obvious that a woman can <em>create</em> a baby in 9 months, but 9 women cannot <em>create</em> a baby in 1 month. This is the idea which <strong>The Mythical Man-Month</strong> wants to explain. If a job can be done by 5 men in 1 month, it&#8217;s said that this job requires 5 <em>man-months</em>. So applying simple arithmetic, would this project be completed in half the time if 10 men work on it? In the software development world, this thought is an outright fallacy. <strong>It&#8217;s not possible to multiply people by hours</strong>. The cost of a project is proportional to the man/months, but the progress is not.</p>
<p>Sometimes, assigning more people to a project to speed up the development is not the best idea, due to the time required to explain, learn, understand, mets, &#8230; about the project. Also we can find non-divisible tasks, so only one person can to do it. If we want to reduce the time, the way to do this is not by adding developers but discarding functionalities not implemented yet. For example, in <em>DSDM</em> we have the time and the resources fixed and the functionalities are variable (they depends on the fixed stuff).</p>
<p><img src="http://www.alfonsojimenez.com/images/2008/03/dsdm.gif" alt="DSDM" class="centro" /></p>
<p><em>The Mythical Man-Month</em> is a chapter of a book called <em>The Mythical Man-Month: Essays on Software Engineering</em> written by <em>Fred Brooks</em>. This book was written 32 years ago, and it&#8217;s been one of the most transcendental books about software project management. It was republished as an anniversary edition in 1995 with the essay <em>No Silver Bullet</em>, where the author maintains the idea that there isn&#8217;t single development, in either technology or in management technique, that by itself promises even one order-of-magnitude improvement in productivity, in reliability or in simplicity. The main question is: <em>Is it possible to develop without developers?</em>
</p>
]]></description>
    </item>
	

  </channel>
</rss>
