<?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>Nothing and More &#187; programming</title>
	<atom:link href="http://www.xmonk.org/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xmonk.org</link>
	<description>Not much, not less</description>
	<lastBuildDate>Fri, 06 Mar 2009 00:18:05 +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>Update on emacs+trac interface</title>
		<link>http://www.xmonk.org/2008/10/01/update-on-emacstrac-interface-mylyn-clone/</link>
		<comments>http://www.xmonk.org/2008/10/01/update-on-emacstrac-interface-mylyn-clone/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 11:20:47 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[elisp]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/?p=72</guid>
		<description><![CDATA[Things are shaping up rather well, most of the functionality is already implemented, I can query, modify and create, tickets. There are quite a few outstanding features to add, and quite a few annoying bugs to squash, soon there should be a alpha release. How soon? now that&#8217;s the question.]]></description>
			<content:encoded><![CDATA[<p>Things are shaping up rather well, most of the functionality is already implemented, I can query, modify and create, tickets. There are quite a few outstanding features to add, and quite a few annoying bugs to squash, soon there should be a alpha release. How soon? now that&#8217;s the question.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2008/10/01/update-on-emacstrac-interface-mylyn-clone/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Design as the silver bullet (my take)</title>
		<link>http://www.xmonk.org/2008/06/12/design-as-the-silver-bullet-my-take/</link>
		<comments>http://www.xmonk.org/2008/06/12/design-as-the-silver-bullet-my-take/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 13:52:25 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[software design]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/?p=56</guid>
		<description><![CDATA[While I agree with most of what  Elvis say. There is a need to look deeper, there are open ends: 1.) How do you determine individuals are &#8220;qualified and prepared&#8221;? 2.) Assuming you can consistently solve point 1, if the individual does not care, is not motivated, then all preparedness and qualifications, and even professionalism [...]]]></description>
			<content:encoded><![CDATA[<p>While I agree with most of what  <a title="Elvis - Design as the silver bullet" href="http://www.elvismontero.com/2008/06/11/design-as-the-silver-bullet/" target="_blank">Elvis</a> say. There is a need to look deeper, there are open ends:</p>
<p>1.) How do you determine individuals are &#8220;qualified and prepared&#8221;?</p>
<p>2.) Assuming you can consistently solve point 1, if the individual does not care, is not motivated, then all preparedness and qualifications, and even professionalism wont help.</p>
<p>3.) Assuming all the above are covered, there still is the human condition. Meaning we are creatures of interpretations, and this adds to the complexity.</p>
<p>I think design is important, but seldom does the designers have the full picture of what&#8217;s being designed. We want to approach software design, as an architect approaches the design of a building. The problem is that the best architects, do an extreme amount of research before starting the design process. Things like:</p>
<ul>
<li> Location.</li>
<li>Elevation</li>
<li>Soil</li>
<li>Dispersion,</li>
<li>Region</li>
<li>Are earthquakes common place in this region?</li>
<li>Are hurricanes or tornadoes common place here?</li>
</ul>
<p>Among many other things they consider before putting pencil or pen to paper, or going into CAD. When the above is decided they work out the best materials for the location, and design they envision. They then analyze costs and what not, make compromises and arrangements to mitigate costs.</p>
<p>After all this they start what we (developers/software engineers) call the design process, and that&#8217;s making drawings or mock ups, showing it to the client, changing to the tastes/needs of the client, when everything is agreed upon, then the plans are made and drawn, there may be a need to adjust the budget here. Then we have peer reviews in the form of all the revisions, etc.. needed to get approval for construction.</p>
<p>So this is a very time consuming process, and one that most Software designers don&#8217;t even bother with. Most don&#8217;t know or care where the application is going to run, or an idea of the resources need for said application, or whether the application really benefits from a heavily threaded system, or if going that route may be even more detrimental performance wise. They just don&#8217;t know or care. I&#8217;m sure there are numerous exceptions to this, and there are quite capable designers that take all the above in consideration, but I believe they are the minority.</p>
<p>Some of you may ask: So, If I want to design an application, I should take into consideration and know about, the Operating System, the Web server, whether threads may help or make it worst, etc?</p>
<p>My answer is a conclusive yes! You should research and know about all of this to make inform decision on what is needed and why. For example: IIS and Apache are completely different servers, and have different requirements maintenance overheads, performance tweaks, etc.. Same goes for the DB, and how you deal with replication, etc..</p>
<p>If you do all the above, it&#8217;s easier for the DB engineers to prepare and optimize querys, etc.. for the application, because there is a clear picture, of what is expected of the DB. Same goes for the other parts of the equation.</p>
<p>So yes, properly designing software is hard, but really what that&#8217;s worth having or building isn&#8217;t hard? The problem in my view is not the silver bullet (I personally don&#8217;t think there is one) but I do think the approach described in <a title="Worse is Better" href="http://www.dreamsongs.com/WorseIsBetter.html" target="_blank">worst is better</a> is better than the approach that&#8217;s being nurtured in the enterprise, working but needs occasional reboots it&#8217;s great to good. Everything below that is good to ok.</p>
<p>This is a very interesting topic, and complex topic, hence all the papers and research around it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2008/06/12/design-as-the-silver-bullet-my-take/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C do&#8217;s and don&#8217;ts (mostly don&#8217;ts)</title>
		<link>http://www.xmonk.org/2008/04/28/c-dos-and-donts-mostly-donts/</link>
		<comments>http://www.xmonk.org/2008/04/28/c-dos-and-donts-mostly-donts/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 17:31:36 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[C]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/2008/04/28/c-dos-and-donts-mostly-donts/</guid>
		<description><![CDATA[This past Friday, I received a surprising email, from a former co-worker, it&#8217;s been a year or more since I left that particular company (wont name, names). We were in different departments, but were by fate put on the same project. This particular project was (is) of the utmost importance for that company, and in [...]]]></description>
			<content:encoded><![CDATA[<p>This past Friday, I received a surprising email, from a former co-worker, it&#8217;s been a year or more since I left that particular company (wont name, names). We were in different departments, but were by fate put on the same project.</p>
<p>This particular project was (is) of the utmost importance for that company, and in his development team he&#8217;s the only one that was working on this specific application (a server). To the suffering of all the involved in his department this particular piece of code had to be written in C, and there was just no way around it for several technical and design reasons that are not important at this moment.</p>
<p>I was in charge of testing his application (not unit testing), I had to performance test his application, to do this, one needs to know the architecture, and all that the developer needs to know to develop it, and more. I don&#8217;t have to tell you that this was a painful experience that mostly drove me crazy.</p>
<p>Just seeing who the email was from and subject surprised me to no end. As it was, they were having some issues, more to the point he was having some issues &#8211;as we were friendly, which basically means he was the only person I didn&#8217;t tell to f..k off. He asked for my number which I gave to him, and a few minutes later, his boss (whom I would have gladly frag&#8217;d) was on the line, telling me, how my NDA still applies and what not&#8230; at this point I just calmly stated you called me. What do you want?</p>
<p>The server has been having issues, and they have to reboot it every 72 hours or so&#8230; at this moment they have put the old code base (which was the one I worked with) back in production, but need the new functionality ASAP, and basically wanted me to check it out. Now, I was curious, I have that problem, I&#8217;m too curious so I said yes, sure.</p>
<p>They sent me the vmstat of the last 72 hours of the server, along with several log files, and after a cursory glance, it was obvious there were memory leaks. This they already knew (they are not dumb) but couldn&#8217;t find the spots where they were happening, and it&#8217;s here where the story gets interesting and where we might learn a few things, so this doesn&#8217;t happen to you.</p>
<p>First a disclaimer, this particular developer is quite good, and diligent. Also I&#8217;m not as good or diligent, and I don&#8217;t know much more than anybody else, but I have had the grand advantage of working with people that do know more than me, and that are willing to show me, so I learn and get better, this is my way of giving back, and saying thanks to all of them.</p>
<p><strong>Malloc</strong></p>
<p>The first issue when I saw the code, was the scheme he was using for memory allocation. I believe that with regards to memory allocation, if there is a failure allocating memory, aborting right then and there is the right thing to do, of course there are exceptions, but for most situations this is ideal, a well done policy, is also something to look into, for this type of scenarios.</p>
<p>His scheme was like this:</p>
<ul>
<li>Allocate a good chunk of memory, that will be shared among threads.</li>
<li> Each thread allocates the memory needed to do it&#8217;s operation, write the results to the shared chunk, and clean after itself.</li>
</ul>
<p>I wouldn&#8217;t do it this way, but this scheme works as long as everyone plays nice. As it happens all threads are playing nice, the problem lies with the allocation done internally by the threads.</p>
<p>He is over writing the pointer that malloc returns, and while he is freeing it, the portion returned by malloc is never free(), this goes on for all the threads.</p>
<p>Some of you might be thinking What? Over writing? How, why? Well the thing is that he didn&#8217;t noticed or know he was doing it, which is not good, but it&#8217;s a common mistake with C programmers (newbies, and not so newbies).</p>
<p>Another nice little side effect, is that every time, a thread wrote to the shared memory chunk, this was sent out to the appropriate interfacing systems, upon a successful completion, the memory chunk was de-allocated and the re-allocated, meaning he free() and then malloc() again and again. Which also brought the nifty problem, that if a thread was waiting in place to write to the chunk, the reference it had to the chunk had gone bye bye, so to avoid a segmentation fault, he worked around this problem in a very creatively unnecessary way (that I would rather soon forget).</p>
<p>Don&#8217;ts:</p>
<ul>
<li>Do not over write (change where it points) the pointer returned by malloc(), don&#8217;t do it ever.</li>
<li>Wrap your malloc() call in a way that it checks (once is enough) no out of memory errors, if there is exit immediately.</li>
<li>Don&#8217;t blindly accept that the arguments to your methods are what you are expecting, or valid data.</li>
<li>When returning an error state from a function, for God&#8217;s sake, don&#8217;t abuse NULL!</li>
</ul>
<p>Do&#8217;s:</p>
<ul>
<li> Learn how to use lint.</li>
<li> Use lint often.</li>
<li> Run lint, after every compilation, add it to the build.</li>
<li> Check and double check all of lint&#8217;s warning and errors, fix them.</li>
<li> Run lint again after fixing the errors.</li>
<li> Read your code, go thru it in your head, or which ever way you prefer.</li>
</ul>
<p>I&#8217;m in agreement with <a title="Thomas Ptacek" href="http://www.matasano.com/log/1041/introduced-a-resolution-resolving-the-semantic-quarrel-over-malloc-checking/" target="_blank">Thomas Ptacek</a>. If my friend would&#8217;ve done that, this problem would have surfaced in the pre-production stages, because the system would have crashed earlier, enabling them to find the culprit much sooner.</p>
<p>There are other things that contributed to the problems, but the good news is after an hour of going thru the code, the system is back up, and it&#8217;s been over 72 hours and it hasn&#8217;t crashed, and it&#8217;s memory consumption is minimal as it should&#8217;ve been from the start.</p>
<p><strong>Update:</strong></p>
<p>Forgot to mention I provided them with a nice little Ring buffer implementation that captures the steps/states of the threads, from beginning to end, in case of an error, it dumps it&#8217;s content to disk.</p>
<p>That way they will be able to pin point more or less what triggered the crash, where in the code this happen, and the time this happened.</p>
<p>For more info on ring buffers, check out this links:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Circular_buffer">http://en.wikipedia.org/wiki/Circular_buffer</a></li>
<li><a href="# http://www.ibm.com/developerworks/aix/library/au-buffer/index.html">http://www.ibm.com/developerworks/aix/library/au-buffer/index.html</a></li>
<li><a href="# http://visibleworkings.com/trace/Documentation/ring-buffer.pdf">http://visibleworkings.com/trace/Documentation/ring-buffer.pdf</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2008/04/28/c-dos-and-donts-mostly-donts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Laziness and Hubris (Well more laziness than anything else)</title>
		<link>http://www.xmonk.org/2007/11/28/laziness-and-hubris-well-more-laziness-than-anything-else/</link>
		<comments>http://www.xmonk.org/2007/11/28/laziness-and-hubris-well-more-laziness-than-anything-else/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 14:28:28 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/2007/11/28/laziness-and-hubris-well-more-laziness-than-anything-else/</guid>
		<description><![CDATA[Long day! Been up for 46 hours don&#8217;t ask, not pretty, and I&#8217;m very pissed off! So what&#8217;s all this about, I was writing some code, that was proclaimed finished three weeks ago, to find out that, well, it needs to be ported to a new hardware, and the demo is today (I was told [...]]]></description>
			<content:encoded><![CDATA[<p>Long day! Been up for 46 hours don&#8217;t ask, not pretty, and I&#8217;m very pissed off! So what&#8217;s all this about, I was writing some code, that was proclaimed finished three weeks ago, to find out that, well, it needs to be ported to a new hardware, and the demo is today (I was told this last night). I&#8217;ve been working on unrelated critical project, which has made a mess of sleep cycle.</p>
<p>One of the beauty of said hardware spec, is that there is a set of instructions that needs to be run in sequential order, checked, and continue to the next instruction. Now each instruction is a separate function, because they are huge and are reused in other parts of the code. The spec had a list of all the functions names (of course the list was in a spread sheet) so I just copied and pasted the functions name, to the code (I don&#8217;t do copy and paste, but after only having slept for an hour, It looked might attractive).</p>
<p>So in my laziness I came up with this:</p>
<pre class="textmate-source"><span class="linenum">    1</span> <span class="source source_c"><span class="storage storage_type storage_type_c">void</span> *(*p_foo[])() = <span class="meta meta_block meta_block_c">{
<span class="linenum">    2</span>         function1,
<span class="linenum">    3</span>         function2,
<span class="linenum">    4</span>         function3,
<span class="linenum">    5</span> }</span>;
<span class="linenum">    6</span>
<span class="linenum">    7</span> <span class="keyword keyword_control keyword_control_c">for</span> (i = <span class="constant constant_numeric constant_numeric_c">0</span>; i < ILIMIT; i++)
<span class="linenum">    8</span> <span class="meta meta_function meta_function_c"><span class="punctuation punctuation_whitespace punctuation_whitespace_function punctuation_whitespace_function_leading punctuation_whitespace_function_leading_c">        </span><span class="entity entity_name entity_name_function entity_name_function_c">trace_error</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_c">(</span></span>p_foo[i](param1,param2));</pre>
<p>Now this works, because all the functions share the same prototype, and return a pointer to void. The value of ILIMIT is huge,  so I saved myself a lot of typing. I don&#8217;t remember seeing that idiom anywhere, I&#8217;m not claiming I made it up, or is my invention or anything of the sort. It&#8217;s not that creative to begin with, and can be made a lot better.</p>
<p>But if you ever find yourself with a similar problem, and don&#8217;t want to write code to generate the function calls for you (or are to tired to do so :)). This is a clean alternative.</p>
<p>Going to sleep now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2007/11/28/laziness-and-hubris-well-more-laziness-than-anything-else/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Busy with work.</title>
		<link>http://www.xmonk.org/2007/07/27/busy-with-work/</link>
		<comments>http://www.xmonk.org/2007/07/27/busy-with-work/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 22:40:28 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/?p=41</guid>
		<description><![CDATA[It&#8217;s been a bit since I blogged. I&#8217;ve been busy with work. I&#8217;m working on a non-deterministic algorithm, that will be used for random data generation that serve as seeds for a more complex algorithm that generates serial keys.* I know the above is very ambiguous but that&#8217;s all I&#8217;m allowed to say. It&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a bit since I blogged. I&#8217;ve been busy with work. I&#8217;m working on a non-deterministic algorithm,  that will be used for random data generation that serve as seeds for a more complex algorithm that generates serial keys.* I know the above is very ambiguous but that&#8217;s all I&#8217;m allowed to say. It&#8217;s not an easy task, and I&#8217;m quite sure it is a futile task, but it meets the company needs, and it&#8217;s just one step of validation, and besides it keeps me happy busy.</p>
<p>In the process, I have been trying out several distributed revision control systems. So far I have tried:</p>
<ul>
<li>Bazaar</li>
<li>Mercurial</li>
<li>Darcs</li>
<li>Arch</li>
<li>monotone</li>
<li>svk</li>
</ul>
<p>I think they are all good at what they do, and picking one above the others, is really a matter of personal preference.</p>
<p>I liked bazaar, git, and mercurial the most. I decided on Git, because of the ability to interact with svn out of the box, it&#8217;s svn integration is really good. I actually liked bazaar the most, but it&#8217;s svn support is not as robust as git&#8217;s.  Now let me be clear I hate git&#8217;s command interface, but it&#8217;s growing on me. The fact that there is a emacs vcs mode makes it a lot simpler for me.</p>
<p>With this I&#8217;m not suggesting ditching svn for a distributed system. At work we use svn and it&#8217;s not going to change any time soon. If it were not for the fact that I have the bad habit of using svn branches for development, I wouldn&#8217;t care about merging all that much, while merging in svn  it&#8217;s not really as bad, as some people make it sound, you do have to be careful, and svn it&#8217;s not very helpful with conflict resolutions, besides that, the fact that I don&#8217;t have to run a server for my local repository is a wonderful thing. I also like the simplicity and multiple methods for publishing my Git branch.</p>
<p>If you haven&#8217;t tried a distributed revision control system, and you are a svn user, I suggest you start with bazaar, as it&#8217;s user interface is very much like svn so the learning curve is really small, Mercurial is also a nice system to start with, though a bit different than svn.</p>
<p>If you do try them out, I would love to hear about your experience.</p>
<p>* This has nothing to do with warez keygens, it&#8217;s part of the validation process of our software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2007/07/27/busy-with-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>good programmer, bad programmer.</title>
		<link>http://www.xmonk.org/2007/07/06/good-programmer-bad-programmer/</link>
		<comments>http://www.xmonk.org/2007/07/06/good-programmer-bad-programmer/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 15:01:53 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/?p=40</guid>
		<description><![CDATA[A friend of my wife came up to me yesterday, he&#8217;s studying to become a Systems Engineer, and he wanted to know: What did I do to become a good programmer? My answer: Who said I was a good programmer? To be honest, I&#8217;m not sure if I am a good or bad programmer, and [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of my wife came up to me yesterday, he&#8217;s studying to become a Systems Engineer, and he wanted to know: What did I do to become a good programmer?</p>
<p>My answer: Who said I was a good programmer?</p>
<p>To be honest, I&#8217;m not sure if I am a good or bad programmer, and I never thought about it until he asked.</p>
<p>Coincidentally I found a few blogs talking about this very subject. They go to explain how, good programmers are more efficient and productive than bad programmers, and how good programmers take ownership of their projects, and don&#8217;t need to be micro-managed etcetera.</p>
<p>In my opinion it is true that good programmers tend to be more efficient, productive, and effective. I also agree that most good programmers are capable of taking ownership of a project and running with it.</p>
<p>But, I think in the real world things are not black and white, as the above statements seem to imply.</p>
<p>There are circumstances that can make a good programmer, behave like a bad programmer, the implications that good programmers are more disciplined,  is also not necessarily true.</p>
<p>Humor me a bit more, and let me outline the variables, that I think are important, and may break the above perceptions:</p>
<p><strong> Work Environment</strong>: The work environment is a very important variable. Productivity, efficiency and reliability depends highly of your work environment, and what you as a programmer need.</p>
<p>Some programmers need peace and quiet, others need to be surrounded by people, others need open spaces, other needs music, or a combination of some or all of the above, we are complex beings.</p>
<p>If you put someone that needs to work in a open space, in an office, he&#8217;s productivity will go down, we humans can get used to almost any environment, but there is always a trade off, and it is the programmer that has the short end of the deal. I believe this is why Google works the way it does, there are offices, cubes, open spaces, recreation rooms, conference rooms, and much more. They don&#8217;t care where you do your work (at least that is what googlites tells us).  That right there is a productivity booster.</p>
<p><strong>Projects</strong>: The type of projects you work on, can motivate you and inspire you to be better, and study more, or they can stifle you and bore you. This is a big problem, in several fronts, the truth is that no matter what the company needs the work has to be done, boring or not, and usually they need it by yesterday.</p>
<p>The problem for the programmer, is how does he motivates himself to do the work, and do it well?</p>
<p>I know this seems like a childish or amateurish proposition, and most professionals will roll their eyes at it. Don&#8217;t get me wrong it has to be done, it is your job, whether you like it or not, but it depends on the character of the programmer, and his own self pride, whether the level of the result is to par, with the results, of work he finds interesting and challenging.</p>
<p>Most managers overlook this issue, and in the end, either the programmer leaves the company or department, or he stops caring.</p>
<p>It is not an easy problem to solve, some companies have worked out this issue by given programmers, time slots to work on whatever they want, others will sit all the programmers down, explain the projects at hand, and let them volunteer for the different projects (this has a lot of potential problems).</p>
<p>But the truth is that most companies can&#8217;t afford to that, and they have to resort to other types of incentives, sometimes they work sometimes they don&#8217;t.</p>
<p>In this life, people have to do a lot things they don&#8217;t like, and they have to do it well, I&#8217;m not making excuses here, I do believe you need to be realistic, and know, that no matter what you do, or where you work, you will have to do things you do not like, and when that time comes, you have to make tough decisions, you can do it or leave.</p>
<p>But my personal opinion is that life is to short, to waste your time on things you don&#8217;t care about, or don&#8217;t want to do, sometimes we don&#8217;t have a choice, we have families to provide for, but if you do have a choice, use it wisely.</p>
<p><strong>Management</strong>: A good manager, is a blessing. He is the first and in some cases the last line of defense or defiance.</p>
<p>A good manager, knows his team, and knows what they are capable of doing, he knows how to push them to be better, faster, and efficient. In short he knows: the good, the bad and the ugly, of his team, and is aware of the role that each member currently plays, and what they could play, he fights and stand up for his team</p>
<p>When upper-management puts out a ridiculous deadline to a highly critical project, it is usually the manager, and the Senior staff, that comes with a plan of action to deliver in time.</p>
<p>Sadly, this is hardly ever the case.</p>
<p>Most managers are ill prepare to  handle the different  personalities, and work ethics of his employees, most managers don&#8217;t understand, and don&#8217;t even try to understand the realities of each team member, sometimes there isn&#8217;t time for him to do that, after all he/she does have a life.</p>
<p>A lot of people think they can be a manager, and that being a manager is easy, well, being a bad manager is a piece of  cake, all you need is to be good at watching your own back, and obvious denial ability, because nobody likes excuses.</p>
<p>But being a good manager, is a very tough job, you are dealing with people, different cultures, and personalities, your boss has certain expectations, usually this expectations are unrealistic, and brought by lack of knowledge or by politics.</p>
<p>Managers, &#8211;good one at least, have the task of bringing clueless upper-management requests, to reality. It&#8217;s difficult to explain; that the project they want deployed in three months, actually needs a year. More so when s/he has to wrestle with the managers and directors of the other departments, who say that&#8217;s the design is ready, corrected, and certified, that he&#8217;s just giving excuses, because his team, are a bunch of whining hacks!</p>
<p>Of course, when the problems start flying, you would hear the requirement people, shouting that, that feature is not correct, or a feature was overlooked, a procedure is not following all the steps outlined in the documents, designer will then come out, defend themselves in which ever way possible and point the finger else where.</p>
<p>And so the cycle continues.</p>
<p>This is the reality that some, most programmers live, and deal with.</p>
<p>In an ideal environment, the:</p>
<p>Good Programmer = Productivity + Efficiency + Self dependence.</p>
<p>Is true, and even in not such and ideal environment, it can hold, but then there is the human aspect, that&#8217;s never taken into account.</p>
<p>Now,  if a bad programmer is one that is:</p>
<ul>
<li>Unproductive.</li>
<li>Inefficient.</li>
<li>Slow, or dependent on others</li>
</ul>
<p>Then there is no problem, because, if they want, they can learn to be the opposite of that. You the good programmer can teach them.</p>
<p>The truth is that, if you think about it, you can&#8217;t rely on the above conditions to differentiate the good from the bad.</p>
<p>I read a blogger, who said that:</p>
<blockquote><p> You can know a good programmer from a bad or not so good programmer, because when the project is assigned a bad programmer, will start looking for sample code, and waste time looking for how others have tackled the problem, while the good programmer just starts working on it.</p></blockquote>
<p>I think, that is not a fair or realistic statement. If I&#8217;m given a problem, that I know it was solved, efficiently and intelligently by someone else, I would go and look and talk to the person, who did it and if I can use the code unchanged, I would use it, and give due credit.</p>
<p>I don&#8217;t know if all this makes sense, I&#8217;m sure it doesn&#8217;t.</p>
<p>I have to say that all this has to be taken with a grain of salt. I have had been told, by some that I&#8217;m a good programmer, and by others that I suck. Truth be told, neither of the opinions affect me in any way, I love what I do, and will keep on doing it, with or without pay.  I think that alone makes me a decent programmer.</p>
<p>I&#8217;m very interested on your thoughts in the matter, it does not matter if you are not a programmer, I think this extends to other careers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2007/07/06/good-programmer-bad-programmer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Programmer vs. Developer</title>
		<link>http://www.xmonk.org/2007/06/27/programmer-vs-developer/</link>
		<comments>http://www.xmonk.org/2007/06/27/programmer-vs-developer/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 15:18:48 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[music]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/?p=38</guid>
		<description><![CDATA[For years I have ignored the programmer vs. developer problem. For those of you that don&#8217;t know of this problem it&#8217;s quite simple: There is a trend in some IT circles to regard programmers as second class citizens, as code cowboys that are trigger happy, and are just good for writing code. Right now if [...]]]></description>
			<content:encoded><![CDATA[<p>For years I have ignored the programmer vs. developer problem. For those of you that don&#8217;t know of this problem it&#8217;s quite simple: There is a trend in some IT circles to regard programmers as second class citizens, as code cowboys that are trigger happy, and are just good for writing code.</p>
<p>Right now if you Google programmer vs. developer, you will get articles on how developers:</p>
<ul>
<li>Design the application from the ground up.</li>
<li>Write specs, and documentation.</li>
<li>Write test cases.</li>
<li>Write unit tests.</li>
<li>Write code.</li>
</ul>
<p>Instead a programmer:</p>
<ul>
<li>Write codes.</li>
<li>Fix bugs; if you are lucky.</li>
</ul>
<p>Well I don&#8217;t know about you but that does not seems like a real picture to me. People can call themselves whatever they want, you can call yourself a programmer, developer, engineer etcetera. Hell there was guy at my former employer that referred to me as &#8220;Engineer&#8221;, let me tell you I&#8217;m not an Engineer don&#8217;t have the degree, don&#8217;t have the know how.  The point is that the word developer to my knowledge is a relative new term, while programmer is a much older term. Maybe the reasons of such distinction is to differentiate the real programmers, from the posers? I don&#8217;t know.</p>
<p>The truth is that when I hear the world programmer I think of people like:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Dennis_Ritchie" title="Dennis Ritchie" target="_blank">Dennis Ritchie</a></li>
<li><a href="http://en.wikipedia.org/wiki/Ken_Thompson" title="Ken Thompson" target="_blank">Ken Thompson</a></li>
<li><a href="http://en.wikipedia.org/wiki/Bjarne_Stroustrup" title="Bjarne Stroustrup">Bjarne Stroustrup</a></li>
<li> <a href="http://en.wikipedia.org/wiki/Bill_Joy" title="Bill Joy" target="_blank">Bill Joy</a></li>
<li><a href="http://en.wikipedia.org/wiki/James_Gosling" title="James Gosling" target="_blank">James Gosling</a></li>
<li><a href="http://en.wikipedia.org/wiki/Linus_Torvalds" title="Linus Torvalds" target="_blank">Linus Torvalds</a></li>
<li><a href="http://en.wikipedia.org/wiki/Keith_Bostic" title="Keith Bostic" target="_blank">Keith Bostic</a></li>
<li><a href="http://en.wikipedia.org/wiki/Alfred_Aho" title="Alfred Aho" target="_blank">Alfred Aho</a></li>
<li><a href="http://en.wikipedia.org/wiki/Brian_Kernighan" title="Brian Kernighan" target="_blank">Brian Kernighan</a></li>
<li><a href="http://en.wikipedia.org/wiki/Rob_Pike" title="Rob Pike" target="_blank">Rob Pike</a></li>
<li><a href="http://en.wikipedia.org/wiki/Jwz" title="Jamie Zawinski" target="_blank">Jamie Zawinski</a> (<a href="http://www.jwz.org/" title="jwz" target="_blank">jwz</a>)</li>
<li><a href="http://en.wikipedia.org/wiki/Theo_De_Radt" title="http://en.wikipedia.org/wiki/Theo_De_Radt" target="_blank">Theo de Raadt</a></li>
<li><a href="http://en.wikipedia.org/wiki/Paul_Graham" title="Paul Graham" target="_blank">Paul Graham</a></li>
<li><a href="http://en.wikipedia.org/wiki/John_McCarthy_%28computer_scientist%29" title="John McCarthy" target="_blank">John McCarthy</a></li>
<li><a href="http://en.wikipedia.org/wiki/Guy_L._Steele%2C_Jr." title="Guy L. Steele Jr." target="_blank">Guy L. Steele Jr.</a></li>
<li><a href="http://en.wikipedia.org/wiki/Larry_Wall" title="Larry Wall" target="_blank">Larry Wall</a></li>
<li><a href="http://en.wikipedia.org/wiki/Eric_S._Raymond" title="Eric S. Raymond" target="_blank">Eric S. Raymond</a></li>
</ul>
<p>For a more complete list please go <a href="http://en.wikipedia.org/wiki/List_of_programmers" title="Programmers" target="_blank">here</a>.</p>
<p>If you take the time to visit each of the links above, you will see some are referred to as:</p>
<ul>
<li><a href="http://http://en.wikipedia.org/wiki/Computer_scientist" title="Computer Scientist">Computer Scientist</a></li>
<li><a href="http://en.wikipedia.org/wiki/Software_engineer" title="Software Engineering" target="_blank">Software Engineer</a></li>
<li><a href="http://en.wikipedia.org/wiki/Computer_programmer" title="Computer Programmer" target="_blank">Computer Programmers</a></li>
</ul>
<p>Those who know me, might be perplexed I left out from the list, who to me is a great programmer and someone that I admire, that is <a href="http://en.wikipedia.org/wiki/Donald_Knuth" title="Donald Knuth" target="_blank">Donald Knuth</a>. Dr. Knuth is to me is a master, any other title in my opinion falls short of his achievements.</p>
<p>Now I&#8217;m sure you are asking yourself, what is my position, if I failed to make my position clear from the statements above let me just say, I don&#8217;t believe in labeling, that said I don&#8217;t consider myself to be one or the other, but if you push me I have to go with Programmer.</p>
<p>I know a lot of people that ware the title &#8220;developer or programmer&#8221; and are neither. Programming is a lot more than writing code in your favorite language, and to me there are only: good programmers or bad programmers &#8211;of course the posers, but those are easier to spot.</p>
<p>I leave you with this little snippet from Donald Knuth:</p>
<blockquote><p> Languages come and go much faster than I can write books. That&#8217;s why I chose to explain algorithms in English, not in the language of the moment. Readers learn a lot by converting from English to their favorite language; The Art of Computer Programming emphasizes things that are independent of languages. No matter what programming language is hot, you need good ideas to express in those languages. If you want your algorithms to be prepackaged, fine, but then my books aren&#8217;t written for you.<br />
Actually I&#8217;m extremely glad to see the continuing development of languages, not only because programming languages are getting better and better in important ways, but also because such work soaks up a lot of people&#8217;s energy-therefore computer scientists don&#8217;t write papers that I would otherwise have to read, and I can get my books finished a lot sooner.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2007/06/27/programmer-vs-developer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Weblogger</title>
		<link>http://www.xmonk.org/2007/06/23/weblogger/</link>
		<comments>http://www.xmonk.org/2007/06/23/weblogger/#comments</comments>
		<pubDate>Sat, 23 Jun 2007 16:29:14 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[personal]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/?p=36</guid>
		<description><![CDATA[In my quest for being more efficient, I&#8217;ve been playing around with Weblogger. I know most of you are not interested in Emacs, but just in case someone besides me uses Emacs as it&#8217;s default editor, this might be helpful or just plain cool.]]></description>
			<content:encoded><![CDATA[<p>In my quest for being more efficient, I&#8217;ve been playing around with <a href="http://www.emacswiki.org/cgi-bin/wiki/WebloggerMode" title="Weblogger">Weblogger</a>.<br />
I know most of you are not interested in Emacs, but just in case someone<br />
besides me uses Emacs as it&#8217;s default editor, this might be helpful or just plain cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2007/06/23/weblogger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The art of programming</title>
		<link>http://www.xmonk.org/2007/06/21/the-art-of-computer-programming/</link>
		<comments>http://www.xmonk.org/2007/06/21/the-art-of-computer-programming/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 02:01:09 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/?p=35</guid>
		<description><![CDATA[There has been a lot said about code being art, and there are quite a few different reasons for this, but I won&#8217;t go into them here. There is truth, in that code is art, the problem is that in most cases, programmers misunderstand the term art, and believe that art is whimsical, people look [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot said about code being art, and there are quite a few  different reasons for this, but I won&#8217;t go into them here. There is truth, in  that code is art, the problem is that in most cases, programmers misunderstand  the term art, and believe that art is whimsical, people look at a painting done  by <a href="http://en.wikipedia.org/wiki/Jackson_Pollock" title="Jackson Pollock" target="_blank">Jackson Pollock</a> using his drip technique and they go:</p>
<p>&#8220;Oh, but I can do that!, it just paint splashed in a canvas! How hard can it  be?&#8221;</p>
<p>The same happens when they hear a cool Rock song:</p>
<p>&#8220;Oh! I&#8217;m going to be a guitarist, and land me some chicks! How hard could it  be to play guitar?&#8221;</p>
<p>Well as it turns out, it&#8217;s easier to play three chords on a guitar, than to  paint like <a href="http://en.wikipedia.org/wiki/Jackson_Pollock" title="Jackson Pollock" target="_blank">Jackson Pollock</a> or <a href="http://en.wikipedia.org/wiki/Picasso" title="Pablo Picasso" target="_blank">Picasso</a>. But the premise of art being simple, does  not make it easy, the same way, that it being complex, does not make  it hard.  Learning a programming language, is not an easy task, it takes weeks or days to  &#8220;learn&#8221;, but years to use it correctly; just like some one can learn the notes  on a pentagram, and the scales, in weeks, but it will take them years for them  to write a Symphony.</p>
<p>There is a lot more to just sitting down and banging words out on a keyboard,  you need to:</p>
<ul>
<li> plan or design.</li>
<li>structure the information your code is going to handle (data structures)</li>
<li>the efficient use of said information (algorithms).</li>
</ul>
<p>There are those that believe, that all the above is only needed for big  projects &#8211;They believe so because they read articles on how Linus wrote GIT on  a few days, or how &#8220;X&#8221; wrote &#8220;Y&#8221; in three days. They are wrong.</p>
<p>The truth is that you won&#8217;t see me with a UML program, doing diagrams, use  case scenarios, and class diagrams, not because I don&#8217;t like them, I like them,  and use them, when communicating ideas to others, but for the most part I the  design in my head, and can visualize it.  Before I even consider writing code, I  work out the different scenarios in my head, this is easy to do for me, but it  might not be easy for you, and that&#8217;s fine, sometimes I need to do an outline,  or a brain map, before writing code, this is all part of the process of  writing.</p>
<p>It&#8217;s the same way for a composer when he&#8217;s got a commission for a new piece,  composers can&#8217;t wait for the muse to come when they have a due date for the work  &#8211;oh, yes composers, writers and painters have due dates.</p>
<p>Composers devise ways of making themselves efficient, and be able to complete  their work with enough time, to proof read, re-write, revise, etcetera.. It&#8217;s  here where some programmers deviate, once the code is written, compiles and runs  as expected, only a bug , will make the programmer look at the code again.</p>
<p>Programmers don&#8217;t proof read, and they sure as hell don&#8217;t like to re-write,  and revising is not liked much either. Some do unit testing, which in some cases  can cause the programmer to go back, and refactor/revise the code, but in most  cases, the programmer just fixes the bug, and does not even care to investigate  why the bug was there in the first place, also programmers don&#8217;t really look for  the most efficient way to code, they avoid making their life easier.</p>
<p>This brings me to the fact that most programmers don&#8217;t think about their  craft; there are hundreds of books about the craft of music composition, writing  a novel, and very few that deal with the craft of programming.</p>
<p>Most programmers don&#8217;t even realize that programming, goes beyond the  language being use, the language is just a tool; you don&#8217;t see painters having  flame wars on whether the smaller brush, is better than the bigger brush, for  doing a sky line? I&#8217;ve never seeing construction workers arguing about which  brand of hammer is the best for the job, but you will see that with  programmers.</p>
<p>After a long time working on different teams, with different tools  (languages) I&#8217;ve concluded that most programmers don&#8217;t take their craft  seriously, and in most cases they sabotage themselves, by not taking the time to  look for ways of being more efficient with their time, and their code.</p>
<p>Programming is an art, there is no question about it in my mind, but for it  to reach the level of recognition, of the other arts, there is still a long way  to go. The knowledge of algorithms, logic, design, and the abilities to do this  things well, are worth nothing, if they are not accompanied by thorough,  efficient and intelligent coding, do not fool yourself into thinking, that you  will be able to make a finished product in a few days. Care for your code, at  the end it&#8217;s your creation, it exists because you exist, and you made it.</p>
<p><a href="http://en.wikipedia.org/wiki/Fred_Brooks" title="Fred Brooks" target="_blank">Frederick Brooks</a> had the following to say in his book, &#8220;The Mythical Man Month: Essays on Software Engineering&#8221;:</p>
<blockquote><p>The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of  the imagination.  Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures.&#8221;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2007/06/21/the-art-of-computer-programming/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Source code management craziness</title>
		<link>http://www.xmonk.org/2007/06/08/source-code-management-crazyness-2/</link>
		<comments>http://www.xmonk.org/2007/06/08/source-code-management-crazyness-2/#comments</comments>
		<pubDate>Fri, 08 Jun 2007 15:49:13 +0000</pubDate>
		<dc:creator>xmonk</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.xmonk.org/?p=32</guid>
		<description><![CDATA[What the hell is going on? I am totally for competition, variety and completeness, but the surge of source code management tools is getting out of hand! Git: According to Linus and some kernel developers, it&#8217;s IT. There is nothing better, oh and SVN and CVS suck and you are either a sucker or a [...]]]></description>
			<content:encoded><![CDATA[<p>What the hell is going on? I am totally for competition, variety and completeness, but the surge of source code management tools is getting out of hand!</p>
<ul>
<li><a href="http://git.or.cz/" title="GIT" target="_blank">Git</a>: According to Linus and some kernel developers, it&#8217;s IT. There is nothing better, oh and SVN and CVS suck and you are either a sucker or a moron if you are using CVS or SVN! (That&#8217;s the gospel of Linus, not mine.)  I agree with him that merging is the key.</li>
<li><a href="http://www.abridgegame.org/darcs/" title="Darcs" target="_blank">Darcs</a>: Is another distributed SCM, this one uses, smart; which according to the site, is a unique algebra of patches.</li>
<li><a href="http://www.selenic.com/mercurial/wiki/" title="Mercurial" target="_blank">Mercurial</a>: Yet another distributed SCM, there are quite a few projects using it.</li>
<li><a href="http://www.bazaar-vcs.org" title="Bazaar">Bzr</a>: Which is yet another, though I find it quite nice in Linux, because it lets you work with existing CVS and SVN repositories, of course you need a plugin that only works in Linux.</li>
</ul>
<p>And there are many, many, more, commercial, shareware, open source, etc.. The premise of all this, is that CVS sucks, and SVN is not good enough, to tell you the truth I feel these guys are making CVS a more desirable alternative, because while CVS has a lot of issues, they are well known and documented issues, with well known and documented work arounds.  I feel more attached to CVS every passing day, It&#8217;s true that I&#8217;m used to CVS, but I have and still am giving the SCM mention above a shot, and I&#8217;m currently using SVN too.</p>
<p>I used to love SVN, until I had to do some real work, that needed to use the full power of the SVN, and it worked ok, but things that I was told were easy, were in fact hackish, and not all that simple. Setting SVN up is a simple affair, but the way to manage keywords and properties is not trivial, as it should be, and there are a few others things that should be simple and easy to use or administer, but in turn are quite difficult.</p>
<p>CVS is alive and well on many projects, both Open and closed, and I believe, it will keep a good share of the market. I&#8217;m not saying the above software is not good, it is, but they are bombarding us, and some projects are using different SCM for different modules for reasons I don&#8217;t know and will probably wont understand.</p>
<p>I do agree that the distributed model is very appealing and in theory is ideal, that git and the others like it, make merging trivial, and it&#8217;s quite smart too.</p>
<p>But that does not mean CVS or SVN is less than the above, in fact some of the largest code bases are served and managed in CVS and SVN (Yes code bases bigger than the linux kernel, a lot bigger), without problems, yes they have policies and standards in place to minimize issues, but that&#8217;s not because of CVS, it&#8217;s the nature of a big project, you need consistency, and safe guards. So in a organized work model, the distributed system may be more chaotic, and inefficient than CVS or SVN.</p>
<p>The sad part, is the new crop of SCM looks more of a recursive re-envention of the wheel, with very little new or unique features, that would merit one over the other. It&#8217;s like a collective exercise on how to make a distributed SCM.</p>
<p>Let&#8217;s see what will come out of all this SCM crazyness, hopefully something will make our collective life easier.</p>
<p>Here is the video of Linus on Git.</p>
<p>[youtube=http://www.youtube.com/watch?v=4XpnKHJAok8]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xmonk.org/2007/06/08/source-code-management-crazyness-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
