<?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>Coding My Thoughts &#187; Programming</title>
	<atom:link href="http://marianoiglesias.com.ar/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://marianoiglesias.com.ar</link>
	<description>A glimpse at a coder&#039;s troubled mind</description>
	<lastBuildDate>Wed, 06 Jan 2010 19:25:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Real life lessons: take your code and shove it!</title>
		<link>http://marianoiglesias.com.ar/programming/real-life-lessons-take-your-code-and-shove-it/</link>
		<comments>http://marianoiglesias.com.ar/programming/real-life-lessons-take-your-code-and-shove-it/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 03:10:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/real-life-lessons-take-your-code-and-shove-it/</guid>
		<description><![CDATA[<p>
It&#8217;s been some time now that I&#8217;ve taken upon coding on an application that someone else&#8217;s built. Now that&#8217;s not unusual, I have done so on many other projects. What makes this endevour quite unlike many others is that&#8230;</p>


No related posts.]]></description>
			<content:encoded><![CDATA[<p>
It&#8217;s been some time now that I&#8217;ve taken upon coding on an application that someone else&#8217;s built. Now that&#8217;s not unusual, I have done so on many other projects. What makes this endevour quite unlike many others is that it has made me realize how often we can find bad code. Sorry, scratch that, I mean really bad code.
</p>
<p>
It&#8217;s not bad code as a result of ignorance, but worst, because of bad habit. Actually, scratch that too. I would say malice. Take this PHP class:
</p>
<pre name="code" class="php">
class SomeClass {
	function someFunction($parameter = null) {
		// If the parameter is 1
		if ($parameter == 1) {
			// Launch a passing parameter
			return $this-&gt;__launchA($parameter);
		} else {
			// Give back error
			$this-&gt;error = 'Not good';
		}

		// Launch the default function sending parameter
		$value = $this-&gt;__launchDefault($parameter);

		// If value returned is ok, give it back
		if ($value &gt; 2) {
			return $value;
		}

		// If not valid, return false
		return false;
	}

	function __launchA($parameter = null) {
		// Take action based on $parameter
		switch($parameter) {
			// If it's 2
			case 2:
				return 2;
			default:
				return $this-&gt;__launchDefault($parameter);

		}
	}

	// ...
}
</pre>
<p>
Because of some NDA agreement that I have signed, I&#8217;m actually mocking what I have to deal with every day. But trust me, it&#8217;s much worst than this. Get the picture? A huge chain of private methods, calling each other, and a comment ratio *way* about what is acceptable (what good is it if on a comment you are actually explaining what a very simple if statement is doing?). Now, you may be asking yourself, why do I call this (crappy) code malice? Because it is meant to generate mode source code lines. Therefore: more money to charge to the client.
</p>
<p>
I have seen this over and over lately, on a very big project I&#8217;m working on. And the truth is, as a member of an outsourcing software developing firm, I&#8217;ve come to realize that us (freelance developers) should be accountable for such bad code. The one who produced this kind of crappy code should be made accountable for the amount of hours it takes to refactor their code, and make it actually usable.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/programming/real-life-lessons-take-your-code-and-shove-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cricava launches CRICAVA Technologies Open Source</title>
		<link>http://marianoiglesias.com.ar/programming/cricava-launches-cricava-technologies-open-source/</link>
		<comments>http://marianoiglesias.com.ar/programming/cricava-launches-cricava-technologies-open-source/#comments</comments>
		<pubDate>Thu, 22 Dec 2005 17:15:00 +0000</pubDate>
		<dc:creator>mariano</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://marianoiglesias.com.ar/1/cricava-launches-cricava-technologies-open-source/</guid>
		<description><![CDATA[<div>
<p>We are more than pleased to announce the launch of <a href="http://www.cricava.org" rel="nofollow" >CRICAVA Technologies Open Source</a>, a portal that will be the home of numerous programming related articles (targetting Java, C++, and PHP, among other languages), and a</p></div><p>&#8230;</p>


Related posts:<ol><li><a href='http://marianoiglesias.com.ar/it/sharpdevelop-an-open-source-c-ide/' rel='bookmark' title='Permanent Link: SharpDevelop, an open source C# IDE'>SharpDevelop, an open source C# IDE</a></li>
<li><a href='http://marianoiglesias.com.ar/general/a-german-in-cricava/' rel='bookmark' title='Permanent Link: A german in Cricava'>A german in Cricava</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div>
<p>We are more than pleased to announce the launch of <a href="http://www.cricava.org" rel="nofollow" >CRICAVA Technologies Open Source</a>, a portal that will be the home of numerous programming related articles (targetting Java, C++, and PHP, among other languages), and a variety of open source projects that CRICAVA is donating to the open source community.</p>
<p>I&#8217;ve finished uploading my first article on the portal, entitled <a href="http://cricava.com/org/index.php?option=com_content&amp;task=view&amp;id=12&amp;Itemid=26" rel="nofollow" >Simulating method / function overload in a PHP 4 class</a>, that covers how to achieve method overloading on a PHP4 framework, where it is not natively available. Check it out.</p>
</div>


<p>Related posts:<ol><li><a href='http://marianoiglesias.com.ar/it/sharpdevelop-an-open-source-c-ide/' rel='bookmark' title='Permanent Link: SharpDevelop, an open source C# IDE'>SharpDevelop, an open source C# IDE</a></li>
<li><a href='http://marianoiglesias.com.ar/general/a-german-in-cricava/' rel='bookmark' title='Permanent Link: A german in Cricava'>A german in Cricava</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://marianoiglesias.com.ar/programming/cricava-launches-cricava-technologies-open-source/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk
Database Caching 24/73 queries in 0.101 seconds using disk

Served from: marianoiglesias.com.ar @ 2010-07-30 05:09:39 -->