<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Crazy thinking - Just my Weblog</title>
	<atom:link href="http://crazythinking.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://crazythinking.wordpress.com</link>
	<description>Just another weblog</description>
	<lastBuildDate>Tue, 15 Nov 2011 11:15:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='crazythinking.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Crazy thinking - Just my Weblog</title>
		<link>http://crazythinking.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://crazythinking.wordpress.com/osd.xml" title="Crazy thinking - Just my Weblog" />
	<atom:link rel='hub' href='http://crazythinking.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Creating an application for checking lottery numbers &#8211; Design, Modelling and Code creation</title>
		<link>http://crazythinking.wordpress.com/2011/11/13/creating-an-application-for-checking-lottery-numbers-design-modelling-and-code-creation/</link>
		<comments>http://crazythinking.wordpress.com/2011/11/13/creating-an-application-for-checking-lottery-numbers-design-modelling-and-code-creation/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 11:01:54 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[life, universe and everything else]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/?p=226</guid>
		<description><![CDATA[In Brazil we have a lottery that pays millions of reais / dollars twice a week.  This value is paid for the winner that got all 6 numbers (out of 60) correctly.  We can buy a ticket with the numbers we choose (or random numbers) for up to 8 draws, what means that we can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=226&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In <a class="zem_slink" title="Brazil" href="http://maps.google.com/maps?ll=-15.75,-47.95&amp;spn=10.0,10.0&amp;q=-15.75,-47.95 (Brazil)&amp;t=h" rel="geolocation">Brazil</a> we have a lottery that pays millions of <a class="zem_slink" title="Brazilian real" href="http://en.wikipedia.org/wiki/Brazilian_real" rel="wikipedia">reais</a> / dollars twice a week.  This value is paid for the winner that got all 6 numbers (out of 60) correctly.  We can buy a ticket with the numbers we choose (or random numbers) for up to 8 draws, what means that we can win at any draw within the next 30 days or so.</p>
<p>But they also pay money if you got 4 or 5 numbers drawn.  It can be a tedious process to check if you got any number right, since there are 15 <a class="zem_slink" title="Combination" href="http://en.wikipedia.org/wiki/Combination" rel="wikipedia">combinations</a> for 4 numbers, 6 combinations for 5 numbers and a single combination for all the 6 numbers, with a total of 22 paying combinations.</p>
<p>In the first version of my code, I am checking all those 22 combinations automatically for a user that plays only 6 numbers (yes, we can play more numbers, up to 15, with increasing costs).  But how to be sure that this is done in an efficient manner?</p>
<p>I started with the process that I usually start any application:</p>
<ul>
<li>What I want to be done?</li>
<li>What interfaces will I have to work with the user?  (e.g. command line, graphical interface, web interface, etc.)</li>
<li>What interfaces will I have to work with the data? (e.g. one single app accessing the data, more than one app, web app, external access, just internal access, etc.)</li>
<li>Where do I want things done? (e.g. and the <a class="zem_slink" title="Front and back ends" href="http://en.wikipedia.org/wiki/Front_and_back_ends" rel="wikipedia">frontend</a> code, at backend code, at database, in the server, etc.)</li>
<li>etc.</li>
</ul>
<p>This makes me think and define some simple rules that will be the foundations of my <a class="zem_slink" title="Application programming interface" href="http://en.wikipedia.org/wiki/Application_programming_interface" rel="wikipedia">API</a> and that will guide my code.</p>
<p>Most of the time, I do not have answers to all those questions and need to play on the safe side.  The usual answers &#8212; and something I have to be very careful with since it is already a bias &#8212; are:</p>
<ul>
<li>&lt;something&gt;</li>
<li><a class="zem_slink" title="User interface" href="http://en.wikipedia.org/wiki/User_interface" rel="wikipedia">Web Interface</a></li>
<li>A web app that might have external parties consuming the informaiton from it</li>
<li><a class="zem_slink" title="Database" href="http://en.wikipedia.org/wiki/Database" rel="wikipedia">Database</a>, browser, backend &#8212; in that order.</li>
</ul>
<p>With that in mind, I started the development of the database based on the data that the lottery provides and that I thought would be useful for some statistical analysis.</p>
<p>This would be analyzing the customer&#8217;s requirements (myself, in this case) and modelling the database to be able to represent that information in a manner that will be able to answer the basic questions from the customer.</p>
<p>The second step would be analyzing indices and other database specific questions that will allow me to deal with the volume of data, the type of queries that will be performed, the number of concurrent accesses, the type of concurrent queries, etc.  It is the work of a DBA to plan that.</p>
<p>The third step is creating the code.  The first question is: where?</p>
<p>As I wanted to try it out fast, and the situation is not all that complicated, I could code it inside the database itself (<a class="zem_slink" title="PostgreSQL" href="http://www.postgresql.org" rel="homepage">PostgreSQL</a> allows me to code very complex things inside of it, in many different <a class="zem_slink" title="Programming language" href="http://en.wikipedia.org/wiki/Programming_language" rel="wikipedia">programming languages</a>, so this is one of the reasons why I must be careful to not have everything inside the database itself).  The next question becomes: in which language?</p>
<p>The fastest language is plain <a class="zem_slink" title="SQL" href="http://www.iso.org/iso/catalogue_detail.htm?csnumber=45498" rel="homepage">SQL</a>, then plpgsql, and then plpython (that is <a class="zem_slink" title="Python (programming language)" href="http://www.python.org/" rel="homepage">Python</a> embedded on the database). My first thought, out of convenience was Python.  Then, I do not needed a full set of it to justify requiring plpython to run a simple query, so I moved to plpgsql.  But, this meant that I was not generating the combinations dynamically, so why not trying to go to plain SQL?  And that is what I ended up doing.</p>
<p>The following code helped me to get all possible combinations for 4 and 5 numbers out of 6 possible numbers:</p>
<pre>&gt;&gt;&gt; a=itertools.combinations([1, 2, 3, 4, 5, 6], 4)
&gt;&gt;&gt; for x in a:
...    print x
...</pre>
<p>and</p>
<pre>&gt;&gt;&gt; a=itertools.combinations([1, 2, 3, 4, 5, 6], 5)
&gt;&gt;&gt; for x in a:
...    print x
...</pre>
<p>This I copied onto my SQL code, applied some magic text replacement commands and ended up with my SQL function in PostgreSQL:</p>
<pre>CREATE OR REPLACE FUNCTION f_v_is_possible_result(
       i_dezena1 INTEGER,
       i_dezena2 INTEGER,
       i_dezena3 INTEGER,
       i_dezena4 INTEGER,
       i_dezena5 INTEGER,
       i_dezena6 INTEGER)
       RETURNS SETOF INTEGER
AS $_$
SELECT contest_number
       FROM megasena
       WHERE
-- Checking four numbers
        <a class="zem_slink" title="Array data type" href="http://en.wikipedia.org/wiki/Array_data_type" rel="wikipedia">ARRAY</a>[$1, $2, $3, $4] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $2, $3, $5] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $2, $3, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $2, $4, $5] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $2, $4, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $2, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $3, $4, $5] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $3, $4, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $3, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $4, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$2, $3, $4, $5] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$2, $3, $4, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$2, $3, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$2, $4, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$3, $4, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
-- Checking five numbers
        ARRAY[$1, $2, $3, $4, $5] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $2, $3, $4, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $2, $3, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $2, $4, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$1, $3, $4, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
        ARRAY[$2, $3, $4, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6] OR
-- Checking six numbers
        ARRAY[$1, $2, $3, $4, $5, $6] &lt;@ ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6]
       ORDER BY contest_number;
$_$ LANGUAGE SQL;</pre>
<p>In this particular case, I exploited some advantages from PostgreSQL and worked with array comparisons to check any of the possible combinations, since the number of conditions was small.  If I had been working with all 15 numbers that one can play, then I would have to dynamically generate that in the code.</p>
<p>The &#8220;&lt;@&#8221; operator working with arrays means &#8220;is contained in&#8221;, so I check that the combinations from the left side are contained in the array of drawn numbers.  &#8221;dezena1&#8243; to &#8220;dezena6&#8243; are the drawn numbers &#8212; their column names, actually &#8211;, already ordered in ascending order (even though with arrays on PostgreSQL this ordering does not matter, the only requirement is that all elements from the left side are available on the right side to be a successful match).</p>
<p>This approach, as I mentioned before, would not work with all the 15 numbers since there are 1365 combinations for 4 numbers out of 15, 3003 combinations for 5 numbers out of 15 and 5005 combinations for 6 numbers out of 15, adding up to 9373 possible combinations.  Even with magic text replacement, this would mean a lot of work and a huge code for a SQL function.  Not the best idea at all&#8230;  In this case, I would go with a Python function.</p>
<p>With that being done, now I can move on to the next step: the web interface building.</p>
<p>As with the latest applications, I will be using ExtJS and grids.  The numbers from my bet will be the filters and this function above will help me limiting the number of lines I will be showing on the grid.</p>
<p>Around version 2 or 3, I will be changing it to allow up to 15 numbers to be played, with a minimum of 6 numbers.  But, then, it is another project, with another design phase, decision making, etc.  I will try remembering to post about it here when that time comes (and if I get there, since I never play more than 6 numbers anyway&#8230;).</p>
<p>Why this post?  Because the process is the same for every application and because this is a somewhat common problem.  Using arrays and their special operators shows up as an elegant solution to a problem.</p>
<p>Happy hacking and wish me luck with my bets. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>UPDATE1:. I won a lesser prize.  Found out with the above code. About US$ 300, last week.</p>
<p>UPDATE2:. After a series of interactions with a colleague, I changed the above code to the one below:</p>
<pre>CREATE OR REPLACE FUNCTION f_v_is_possible_result(
       i_dezena1 INTEGER,
       i_dezena2 INTEGER,
       i_dezena3 INTEGER,
       i_dezena4 INTEGER,
       i_dezena5 INTEGER,
       i_dezena6 INTEGER,
       i_matches INTEGER = 4,
       OUT contest_number INTEGER,
       OUT numbers INTEGER[],
       OUT quantity INTEGER)
       RETURNS SETOF RECORD
AS $_$
WITH numbers AS (SELECT contest_number, ARRAY_INTERSECT (ARRAY[$1, $2, $3, $4, $5, $6],
                                                   ARRAY[dezena1, dezena2, dezena3, dezena4, dezena5, dezena6]) AS intersect
                 FROM megasena
                 ORDER BY contest_number)
     SELECT numbers.contest_number,
            numbers.intersect AS numbers,
            ARRAY_LENGTH(numbers.intersect, 1) AS quantity
     FROM numbers
     WHERE ARRAY_LENGTH(numbers.intersect, 1) &gt;= $7;
$_$ STABLE LANGUAGE SQL;</pre>
<p>The &#8220;WITH&#8221; clause will allow me to process the information more than once while preventing the query from being repeated at every time I use it.</p>
<p>The &#8220;i_matches&#8221; parameter allow me to show cases where there was no prize won or filter out specific types of prizes (4, 5 or 6 numbers matching).</p>
<p>The new code also shows me which numbers matched.  Here&#8217;s the new output:</p>
<pre>megasena=# select * FROM f_v_is_possible_result(03, 11, 20, 49, 51, 59);
 contest_number |   numbers    | quantity
----------------+--------------+------------
           1335 | {3,20,51,49} |          4
(1 row)

megasena=# select * FROM f_v_is_possible_result(03, 11, 20, 49, 51, 59, 3);
 contest_number |   numbers    | quantity
----------------+--------------+------------
             56 | {20,51,59}   |          3
            217 | {3,51,49}    |          3
            296 | {3,20,51}    |          3
            548 | {51,49,59}   |          3
            658 | {11,3,20}    |          3
            857 | {3,49,59}    |          3
           1034 | {3,20,49}    |          3
           1035 | {11,51,59}   |          3
           1057 | {3,49,59}    |          3
           1192 | {20,49,59}   |          3
           1247 | {11,3,51}    |          3
           1335 | {3,20,51,49} |          4
(12 rows)

megasena=#</pre>
<p>My prize was on contest number 1335.</p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/database/'>database</a>, <a href='http://crazythinking.wordpress.com/category/life-universe-and-everything-else/'>life, universe and everything else</a>, <a href='http://crazythinking.wordpress.com/category/postgresql/'>postgresql</a>, <a href='http://crazythinking.wordpress.com/category/python/'>python</a>, <a href='http://crazythinking.wordpress.com/category/statistics/'>statistics</a>, <a href='http://crazythinking.wordpress.com/category/updates/'>updates</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/226/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=226&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/11/13/creating-an-application-for-checking-lottery-numbers-design-modelling-and-code-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>Almost there</title>
		<link>http://crazythinking.wordpress.com/2011/08/07/almost-there/</link>
		<comments>http://crazythinking.wordpress.com/2011/08/07/almost-there/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 01:35:24 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[everything]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[organization]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[pmi]]></category>
		<category><![CDATA[pmp]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[updates]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[PMP]]></category>

		<guid isPermaLink="false">https://crazythinking.wordpress.com/2011/08/07/almost-there/</guid>
		<description><![CDATA[And we have received the sign off to apply for the certification for PMP. In my mind this is the point of no return. I have many things to report here and I will include then on my agenda. First thing is: if you don&#8217;t have one, buy a smartphone. My new toy is an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=225&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>And we have received the sign off to apply for the certification for PMP.</p>
<p>In my mind this is the point of no return.</p>
<p>I have many things to report here and I will include then on my agenda.</p>
<p>First thing is: if you don&#8217;t have one, buy a smartphone. My new toy is an android.</p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/everything/'>everything</a>, <a href='http://crazythinking.wordpress.com/category/life/'>life</a>, <a href='http://crazythinking.wordpress.com/category/organization/'>organization</a>, <a href='http://crazythinking.wordpress.com/category/personal/'>personal</a>, <a href='http://crazythinking.wordpress.com/category/pmi-2/'>pmi</a>, <a href='http://crazythinking.wordpress.com/category/pmp-2/'>pmp</a>, <a href='http://crazythinking.wordpress.com/category/project-management/'>project management</a>, <a href='http://crazythinking.wordpress.com/category/updates/'>updates</a>, <a href='http://crazythinking.wordpress.com/category/work/'>work</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/android/'>Android</a>, <a href='http://crazythinking.wordpress.com/tag/pmp/'>PMP</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=225&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/08/07/almost-there/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>Stakeholders Influence</title>
		<link>http://crazythinking.wordpress.com/2011/07/22/stakeholders-influence/</link>
		<comments>http://crazythinking.wordpress.com/2011/07/22/stakeholders-influence/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 22:32:00 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[pmi]]></category>
		<category><![CDATA[pmp]]></category>
		<category><![CDATA[PMI]]></category>
		<category><![CDATA[PMP]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[project management]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/2011/07/22/stakeholders-influence/</guid>
		<description><![CDATA[When categorizing the stakeholders one thing that we have to do is write down the type of influence they have on the project: positive or negative. But what to do when we don&#8217;t know what is it? What if we are tempted to say it is &#8220;neutral&#8221;, in the sense of &#8220;this stakeholder doesn&#8217;t care [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=222&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When categorizing the stakeholders one thing that we have to do is write down the type of influence they have on the project: positive or negative. </p>
<p> But what to do when we don&#8217;t know what is it?  What if we are tempted to say it is &#8220;neutral&#8221;, in the sense of &#8220;this stakeholder doesn&#8217;t care if the project is successful as well as if it is unsuccessful&#8221;? </p>
<p> Discussing this today, with a fellow PMP at work, I got to some conclusions / decisions. </p>
<p> The first one, and the most obvious one, is that there is no rule on what types of classifications we can have.  As with most things, the Project Manager is free to customize the project as needed.  So, adding a &#8220;neutral&#8221; influence is perfectly possible. </p>
<p> The second conclusion is that there is no &#8220;neutral&#8221; stakeholder. There is always a small tendency on being pro or against the project. What can be done, then, is adding the &#8220;neutral&#8221; influence type and using it as a marker for reviewing this classification as soon as a better judgment of the stakeholder&#8217;s influence type is known. </p>
<p> The third thing is that not knowing the correct classification <b>is</b> a project risk.  That stakeholder can be working against the project and a misclassification of him / her can lead to ignoring key factors as well as loosing opportunities to neutralize / mitigate the bad influence from the stakeholder. </p>
<p> The correct classification and identification of stakeholders is one of the factors that can help with project management and lead to the success of the project. </p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/pmi-2/'>pmi</a>, <a href='http://crazythinking.wordpress.com/category/pmp-2/'>pmp</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/pmi/'>PMI</a>, <a href='http://crazythinking.wordpress.com/tag/pmp/'>PMP</a>, <a href='http://crazythinking.wordpress.com/tag/project/'>project</a>, <a href='http://crazythinking.wordpress.com/tag/project-management/'>project management</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=222&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/07/22/stakeholders-influence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>Project Management Certification</title>
		<link>http://crazythinking.wordpress.com/2011/06/19/project-management-certification/</link>
		<comments>http://crazythinking.wordpress.com/2011/06/19/project-management-certification/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 16:01:00 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[pmi]]></category>
		<category><![CDATA[pmp]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[pmbok]]></category>
		<category><![CDATA[PMI]]></category>
		<category><![CDATA[PMP]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/2011/06/19/project-management-certification/</guid>
		<description><![CDATA[It is being a tough week since I have started studying to get my PMP &#8211; Project Management Professional &#8211; certification. A lot of reading, studying, training, etc. going on. I am thankful that the company I work for has access to all the resources I need to study and also has many certified professionals [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=221&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is being a tough week since I have started studying to get my PMP &ndash; Project Management Professional &ndash; certification. </p>
<p> A lot of reading, studying, training, etc. going on.  I am thankful that the company I work for has access to all the resources I need to study and also has many certified professionals that I can refer to and that have reviewed some documents and training courses I am using.  </p>
<p> I have laid out a plan with some colleagues and we are doing weekly meetings that take from 1h to 1h30 to discuss what we have learned from the week&#8217;s targets. </p>
<p> Since we&#8217;re on the first week, our target was taking two training courses and reading the first two chapters of the PMBOK (Project Management Body of Knowledge). </p>
<p> I am taking notes and using a mindmapper software to map my learnings.  So, I expect to have a lot of things written here in the next months all related to my studies. </p>
<p> And, of course, since these are a personal effort, I still have all my usual activities going on at work. </p>
<p> There are some changes and I will move from full responsibility on Communications Systems and Services to Enterprise Technologies, on the platforms area, assuming the global leadership for IBM&#8217;s System I (former iSeries) platform.  </p>
<p> It will be an interesting challenge since I don&#8217;t know anything about this technology and it will then become my first managerial experience where I don&#8217;t fully understand the technology I am managing. </p>
<p> I will have to rely a lot on our technical specialists, self study and documentation on the technology and processes related to it.  </p>
<p> I also have to work on globalizing this service and keep the globalization of one of my former projects going on.  I was &ndash; and I still am &ndash; responsible for laying out the foundations for it to happen and now it will be my responsibility to keep it moving, even if I am not managing the teams that work with that technology anymore. </p>
<p> VERY interesting challenges coming up and, of course, I will keep some news about how I am dealing with them here. </p>
<p> Stay tuned and enjoy <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p> And, if you want to share some information on any of the topics I am writing about, feel free to do so. </p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/pmi-2/'>pmi</a>, <a href='http://crazythinking.wordpress.com/category/pmp-2/'>pmp</a>, <a href='http://crazythinking.wordpress.com/category/project-management/'>project management</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/management/'>management</a>, <a href='http://crazythinking.wordpress.com/tag/pmbok/'>pmbok</a>, <a href='http://crazythinking.wordpress.com/tag/pmi/'>PMI</a>, <a href='http://crazythinking.wordpress.com/tag/pmp/'>PMP</a>, <a href='http://crazythinking.wordpress.com/tag/project/'>project</a>, <a href='http://crazythinking.wordpress.com/tag/project-management/'>project management</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=221&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/06/19/project-management-certification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>Updates, News and New Implementations</title>
		<link>http://crazythinking.wordpress.com/2011/06/13/updates-news-and-new-implementations/</link>
		<comments>http://crazythinking.wordpress.com/2011/06/13/updates-news-and-new-implementations/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 18:09:00 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[emacs]]></category>
		<category><![CDATA[org-mode]]></category>
		<category><![CDATA[orgmode]]></category>
		<category><![CDATA[updates]]></category>
		<category><![CDATA[PMI]]></category>
		<category><![CDATA[PMP]]></category>
		<category><![CDATA[transparency]]></category>
		<category><![CDATA[transparent]]></category>
		<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/?p=219</guid>
		<description><![CDATA[Even though I have been quiet for a while, things are a lot busy. I have been spending a lot of time on preparing myself to get a PMI certication and become a PMP. I had classes with the PMBOK while at College, I participated on several training courses after that, I have read many [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=219&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Even though I have been quiet for a while, things are a lot busy.</p>
<p>I have been spending a lot of time on preparing myself to get a PMI certication and become a PMP. I had classes with the PMBOK while at College, I participated on several training courses after that, I have read many books… and even then, I don&#8217;t feel ready to apply for the certification.</p>
<p>It is part of my daily tasks, but what makes me believe I am not ready are the subtleties of things and some of the questions I remember from College, when studying that and thinking about applying for the certification.</p>
<p>On the IT field, I have been playing more with org-mode and I am almost ready with making it &#8220;talk&#8221; to my Google Calendar. Here are some hints for that:</p>
<p><a href="http://emacsworld.blogspot.com/2011/05/integrating-emacs-org-mode-and-google.html">http://emacsworld.blogspot.com/2011/05/integrating-emacs-org-mode-and-google.html</a></p>
<p><a href="http://thread.gmane.org/gmane.emacs.help/80824">http://thread.gmane.org/gmane.emacs.help/80824</a></p>
<p><a href="http://code.google.com/p/googlecl/">http://code.google.com/p/googlecl/</a></p>
<p>And, I am also happy with finally being able to enable the transparent background on Emacs. I have added this code to my <code>.emacs</code> (actually, I use org-mode to manage it as well, so the process was a bit different, but the idea is the same):</p>
<pre class="src src-emacs-lisp"><span style="color:#7f7f7f;">(</span><span style="color:#cf6a4c;font-weight:bold;">defun</span> <span style="color:#e9c062;font-weight:bold;">djcb-opacity-modify</span> <span style="color:#7f7f7f;">(</span><span style="color:#c5af75;font-weight:bold;">&amp;optional</span> dec<span style="color:#7f7f7f;">)</span>
  <span style="color:#65b042;">"modify the transparency of the emacs frame; if DEC is t, decrease the transparency, otherwise increase it in 1%-steps"</span>
  <span style="color:#7f7f7f;">(</span><span style="color:#cf6a4c;font-weight:bold;">let*</span> <span style="color:#7f7f7f;">((</span>alpha-or-nil <span style="color:#7f7f7f;">(</span>frame-parameter nil 'alpha<span style="color:#7f7f7f;">))</span> <span style="color:#888888;">; </span><span style="color:#666;font-style:italic;">nil before setting </span>          <span style="color:#7f7f7f;">(</span>oldalpha <span style="color:#7f7f7f;">(</span><span style="color:#cf6a4c;font-weight:bold;">if</span> alpha-or-nil alpha-or-nil 100<span style="color:#7f7f7f;">))</span>
          <span style="color:#7f7f7f;">(</span>newalpha <span style="color:#7f7f7f;">(</span><span style="color:#cf6a4c;font-weight:bold;">if</span> dec <span style="color:#7f7f7f;">(</span>- oldalpha 1<span style="color:#7f7f7f;">)</span> <span style="color:#7f7f7f;">(</span>+ oldalpha 1<span style="color:#7f7f7f;">))))</span>
    <span style="color:#7f7f7f;">(</span><span style="color:#cf6a4c;font-weight:bold;">when</span> <span style="color:#7f7f7f;">(</span>and <span style="color:#7f7f7f;">(</span>&gt;= newalpha frame-alpha-lower-limit<span style="color:#7f7f7f;">)</span> <span style="color:#7f7f7f;">(</span>&lt;= newalpha 100<span style="color:#7f7f7f;">))</span>
      <span style="color:#7f7f7f;">(</span>modify-frame-parameters nil <span style="color:#7f7f7f;">(</span>list <span style="color:#7f7f7f;">(</span>cons 'alpha newalpha<span style="color:#7f7f7f;">))))))</span>

 <span style="color:#888888;">;; </span><span style="color:#666;font-style:italic;">C-8 will increase opacity (== decrease transparency) </span> <span style="color:#888888;">;; </span><span style="color:#666;font-style:italic;">C-9 will decrease opacity (== increase transparency </span> <span style="color:#888888;">;; </span><span style="color:#666;font-style:italic;">C-0 will returns the state to normal </span><span style="color:#7f7f7f;">(</span>global-set-key <span style="color:#7f7f7f;">(</span>kbd <span style="color:#65b042;">"C-8"</span><span style="color:#7f7f7f;">)</span> '<span style="color:#7f7f7f;">(</span><span style="color:#cf6a4c;font-weight:bold;">lambda</span><span style="color:#7f7f7f;">()(</span>interactive<span style="color:#7f7f7f;">)(</span>djcb-opacity-modify<span style="color:#7f7f7f;">)))</span>
<span style="color:#7f7f7f;">(</span>global-set-key <span style="color:#7f7f7f;">(</span>kbd <span style="color:#65b042;">"C-9"</span><span style="color:#7f7f7f;">)</span> '<span style="color:#7f7f7f;">(</span><span style="color:#cf6a4c;font-weight:bold;">lambda</span><span style="color:#7f7f7f;">()(</span>interactive<span style="color:#7f7f7f;">)(</span>djcb-opacity-modify t<span style="color:#7f7f7f;">)))</span>
<span style="color:#7f7f7f;">(</span>global-set-key <span style="color:#7f7f7f;">(</span>kbd <span style="color:#65b042;">"C-0"</span><span style="color:#7f7f7f;">)</span> '<span style="color:#7f7f7f;">(</span><span style="color:#cf6a4c;font-weight:bold;">lambda</span><span style="color:#7f7f7f;">()(</span>interactive<span style="color:#7f7f7f;">)</span>
                               <span style="color:#7f7f7f;">(</span>modify-frame-parameters nil `<span style="color:#7f7f7f;">((</span>alpha . 100<span style="color:#7f7f7f;">)))))</span></pre>
<p>The source for that is available at <a href="http://emacs-fu.blogspot.com/2009/02/transparent-emacs.html">http://emacs-fu.blogspot.com/2009/02/transparent-emacs.html</a></p>
<p>The original code had the steps move in steps of 10%. I have changed the code a little to make it move in 1% steps.</p>
<p>And, finally, this weekend it was Valentine&#8217;s Day here in Brazil. It was really cold – with some ice on the glass ceiling from my neighbor – what contributed a lot to the romance and for my wife and I spending the time together.</p>
<p>Every time I am able to spend some time like this, I stop and think about how many times I am doing that and if it is not something that I need to improve. It is hard to manage all the work tasks, studies, and still get some free time to spend without worrying, but I am sure that my Number One priority should be my family.</p>
<p>I think that these updates were not enough for the time I didn&#8217;t post, but I am trying. This blog already has more – relevant – posts than anything I was able to keep before (maybe Multiply had more posts, but it was a different time in my life).</p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/emacs/'>emacs</a>, <a href='http://crazythinking.wordpress.com/category/org-mode/'>org-mode</a>, <a href='http://crazythinking.wordpress.com/category/orgmode/'>orgmode</a>, <a href='http://crazythinking.wordpress.com/category/updates/'>updates</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/emacs/'>emacs</a>, <a href='http://crazythinking.wordpress.com/tag/org-mode/'>org-mode</a>, <a href='http://crazythinking.wordpress.com/tag/orgmode/'>orgmode</a>, <a href='http://crazythinking.wordpress.com/tag/pmi/'>PMI</a>, <a href='http://crazythinking.wordpress.com/tag/pmp/'>PMP</a>, <a href='http://crazythinking.wordpress.com/tag/transparency/'>transparency</a>, <a href='http://crazythinking.wordpress.com/tag/transparent/'>transparent</a>, <a href='http://crazythinking.wordpress.com/tag/updates-2/'>Updates</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/219/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/219/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=219&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/06/13/updates-news-and-new-implementations/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>Using matplotlib / pylab without a DISPLAY</title>
		<link>http://crazythinking.wordpress.com/2011/05/01/using-matplotlib-pylab-without-a-display/</link>
		<comments>http://crazythinking.wordpress.com/2011/05/01/using-matplotlib-pylab-without-a-display/#comments</comments>
		<pubDate>Mon, 02 May 2011 00:40:00 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[rpy]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/2011/05/01/using-matplotlib-pylab-without-a-display/</guid>
		<description><![CDATA[I&#8217;ve been having issues with a web system I coded for a while now and couldn&#8217;t find a solution that worked to my satisfaction to eliminate the need of a Xvnc running to provide a virtual DISPLAY to run some commands to plot data using pylab. Finally, today, I found the solution here and I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=218&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having issues with a web system I coded for a while now and couldn&#8217;t find a solution that worked to my satisfaction to eliminate the need of a Xvnc running to provide a virtual DISPLAY to run some commands to plot data using pylab. </p>
<p> Finally, today, I found the solution <a href="http://stackoverflow.com/questions/4706451/how-to-save-a-figure-remotely-with-pylab">here</a> and I want to share it. </p>
<pre class="src src-python"><span style="color:#cf6a4c;font-weight:bold;">import</span> matplotlib
matplotlib.use(<span style="color:#65b042;">'Agg'</span>) <span style="color:#666;font-style:italic;"># Must be before importing matplotlib.pyplot or pylab!
</span><span style="color:#cf6a4c;font-weight:bold;">import</span> matplotlib.pyplot <span style="color:#cf6a4c;font-weight:bold;">as</span> plt

fig = plt.figure()
plt.plot(<span style="color:#cf6a4c;font-weight:bold;">range</span>(10))
fig.savefig(<span style="color:#65b042;">'temp.png'</span>)
</pre>
<p> The solution, here, is the Agg option as the &#8220;device&#8221; to be used to plot files. </p>
<p> Solution in place, and I can now eliminate the requirement for Xvnc from my code and all the issues that came with it are also automatically gone. </p>
<p> So, here&#8217;s the code for Pylab: </p>
<pre class="src src-python"><span style="color:#cf6a4c;font-weight:bold;">import</span> matplotlib
matplotlib.use(<span style="color:#65b042;">'Agg'</span>) <span style="color:#666;font-style:italic;"># Must be before importing matplotlib.pyplot or pylab!
</span><span style="color:#cf6a4c;font-weight:bold;">import</span> pylab

pylab.plot(<span style="color:#cf6a4c;font-weight:bold;">range</span>(10))
pylab.savefig(<span style="color:#65b042;">'temp.png'</span>)
</pre>
<p> Enjoy! </p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/python/'>python</a>, <a href='http://crazythinking.wordpress.com/category/r/'>R</a>, <a href='http://crazythinking.wordpress.com/category/statistics/'>statistics</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/python/'>python</a>, <a href='http://crazythinking.wordpress.com/tag/r/'>R</a>, <a href='http://crazythinking.wordpress.com/tag/rpy/'>rpy</a>, <a href='http://crazythinking.wordpress.com/tag/statistics/'>statistics</a>, <a href='http://crazythinking.wordpress.com/tag/web/'>web</a>, <a href='http://crazythinking.wordpress.com/tag/webdev/'>webdev</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=218&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/05/01/using-matplotlib-pylab-without-a-display/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>Customizing your Emacs Colors</title>
		<link>http://crazythinking.wordpress.com/2011/04/16/customizing-your-emacs-colors/</link>
		<comments>http://crazythinking.wordpress.com/2011/04/16/customizing-your-emacs-colors/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 13:01:00 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[emacs]]></category>
		<category><![CDATA[color theme]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[customization]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/2011/04/16/customizing-your-emacs-colors/</guid>
		<description><![CDATA[The best thing besides using the best text editor &#8211; that is really the one you adapts better, in my case it is Emacs &#8211; is being able to make it look like how you want it to look. The first step is always customizing colors in a manner that doesn&#8217;t get you tired after [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=217&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The best thing besides using the best text editor &ndash; that is really the one you adapts better, in my case it is Emacs &ndash; is being able to make it look like how you want it to look. </p>
<p> The first step is always customizing colors in a manner that doesn&#8217;t get you tired after some hours of work as well as in a manner that integrates it with your desktop environment. </p>
<p> Here are two suggestions of websites where you can take a look at different profiles and customize colors in Emacs: </p>
<p> <a href="http://gnuemacscolorthemetest.googlecode.com/svn/html/index-pl.html">GNU Emacs Color Theme Test &#8211; Perl</a> </p>
<p> <a href="http://alexpogosyan.com/color-theme-creator/">Emacs color-theme creator</a> </p>
<p> The second link &ndash; color-theme creator &ndash; is the best one to create unique themes. </p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/emacs/'>emacs</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/color-theme/'>color theme</a>, <a href='http://crazythinking.wordpress.com/tag/custom/'>custom</a>, <a href='http://crazythinking.wordpress.com/tag/customization/'>customization</a>, <a href='http://crazythinking.wordpress.com/tag/customize/'>customize</a>, <a href='http://crazythinking.wordpress.com/tag/emacs/'>emacs</a>, <a href='http://crazythinking.wordpress.com/tag/theme/'>theme</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=217&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/04/16/customizing-your-emacs-colors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>Implementing and Monitoring</title>
		<link>http://crazythinking.wordpress.com/2011/04/10/implementing-and-monitoring/</link>
		<comments>http://crazythinking.wordpress.com/2011/04/10/implementing-and-monitoring/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 10:44:00 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[emacs]]></category>
		<category><![CDATA[org2blog]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[universe]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/2011/04/10/implementing-and-monitoring/</guid>
		<description><![CDATA[Most of us, people from IT, forget about the post-implementation process. It isn&#8217;t just supporting the application, but providing means to monitor the system health. Lets say you deploy a web system and for that you have to install the webserver, the database server and your own code. You guarantee that your system will work [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=216&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most of us, people from IT, forget about the post-implementation process. </p>
<p> It isn&#8217;t just supporting the application, but providing means to monitor the system health. </p>
<p> Lets say you deploy a web system and for that you have to install the webserver, the database server and your own code.  You guarantee that your system will work based on several tests you have coded and perharps some techniques to restart the application in case it fails or reach some limits.  But what about when your application stops because of the web server?  Or the database server? </p>
<p> If the customer has a team to support them, it is understandable that it is this team&#8217;s responsibility to install, monitor and keep the infrastructure needed by your software.  If they don&#8217;t, a failure on any of those components is a failure on the functionality <b>you</b> provided them. </p>
<p> You can make agreements, draw the component structure, etc. but when things fail, it is your software that has become unusable to them. </p>
<p> Other than that, as time passes, disks fill up, hardware starts showing issues (some of them are SMART &ndash; hint! &ndash; enough to provide you with alerts) and that dedicated server to a single task is not &#8220;so dedicated&#8221; anymore (again, if you manage the infrastructure you can have some control over it, otherwise their IT will have to take care of what goes where for them). </p>
<p> One great thing that can be done &ndash; and should be done &ndash; is documenting certain thresholds on your system and providing alerting and monitoring tools to the customer.  Put that in written form and say that when certain threshold is reached they should take some corrective or preventative actions (automate it if you can!) and for other components you can show them that new hardware is needed. </p>
<p> We are so focused and worried with delivering things that we forget about keeping it running. </p>
<p> Putting things on the cloud helps reducing some of your concerns, but shouldn&#8217;t be an excuse for not monitoring and reporting things. </p>
<p> A last reason to monitor: know your system requirements.  Do you know how much memory your system requires with 10 simultaneous users?  With 50?  What about 1000?  What is the required hardware to recommend your customer to upgrade to? </p>
<p> Monitor.  Report.  Follow on. </p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/emacs/'>emacs</a>, <a href='http://crazythinking.wordpress.com/category/org2blog/'>org2blog</a>, <a href='http://crazythinking.wordpress.com/category/python/'>python</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/life/'>life</a>, <a href='http://crazythinking.wordpress.com/tag/universe/'>universe</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=216&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/04/10/implementing-and-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting back to exercises</title>
		<link>http://crazythinking.wordpress.com/2011/04/04/getting-back-to-exercises/</link>
		<comments>http://crazythinking.wordpress.com/2011/04/04/getting-back-to-exercises/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 22:42:00 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[universe]]></category>
		<category><![CDATA[diet]]></category>
		<category><![CDATA[exercise]]></category>
		<category><![CDATA[motivation]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/2011/04/04/getting-back-to-exercises/</guid>
		<description><![CDATA[Yesterday I weighted myself again. I lost 2 kg since I went to the doctor, almost 3 weeks ago. I thought I still had the same weight and that the plateau effect was still in place. Seeing that I was wrong, I felt motivated to resume exercising every day, so today I gave goodbye to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=215&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yesterday I weighted myself again.  I lost 2 kg since I went to the doctor, almost 3 weeks ago. </p>
<p> I thought I still had the same weight and that the <i>plateau</i> effect was still in place. </p>
<p> Seeing that I was wrong, I felt motivated to resume exercising every day, so today I gave goodbye to candies and white bread and went back to my 40 minutes exercise on the elliptical machine. </p>
<p> I simply feel great! </p>
<p> Target is loosing 12 kg in the next 5 months.  Not that hard, not easy as well (in the past I had a second <i>plateau</i> effect close to 105 kg).  I like to think of it as a SMART goal. </p>
<p> <b>S</b> pecific </p>
<p> <b>M</b> easurable </p>
<p> <b>A</b> chievable </p>
<p> <b>R</b> elevant </p>
<p> <b>T</b> imely </p>
<p> I will blog more about it here in the future. </p>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/life/'>life</a>, <a href='http://crazythinking.wordpress.com/category/universe/'>universe</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/diet/'>diet</a>, <a href='http://crazythinking.wordpress.com/tag/exercise/'>exercise</a>, <a href='http://crazythinking.wordpress.com/tag/motivation/'>motivation</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=215&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/04/04/getting-back-to-exercises/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>
	</item>
		<item>
		<title>In the kitchen</title>
		<link>http://crazythinking.wordpress.com/2011/04/02/in-the-kitchen/</link>
		<comments>http://crazythinking.wordpress.com/2011/04/02/in-the-kitchen/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 23:57:00 +0000</pubDate>
		<dc:creator>Godoy</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[universe]]></category>
		<category><![CDATA[coffee]]></category>
		<category><![CDATA[kitchen]]></category>
		<category><![CDATA[salmon]]></category>

		<guid isPermaLink="false">http://crazythinking.wordpress.com/2011/04/02/in-the-kitchen/</guid>
		<description><![CDATA[Today it was day to make some salmon for dinner. It is extremely easy to make and delicious to eat. Of course, as a coffee lover, I couldn&#8217;t end without making some espresso. I still think it is one of the best acquisitions I made here at home&#8230; My next step with regards to coffee [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=213&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today it was day to make some salmon for dinner. </p>
<p> <img src="http://boaforma.abril.com.br/imagens/mt/papillote-salmao.jpg" alt="http://boaforma.abril.com.br/imagens/mt/papillote-salmao.jpg" /> </p>
<p> It is extremely easy to make and delicious to eat. </p>
<p> Of course, as a coffee lover, I couldn&#8217;t end without making some espresso. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p> I still think it is one of the best acquisitions I made here at home&hellip;  My next step with regards to coffee is buying a grinder. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1">The recipe</h2>
<div class="outline-text-2" id="text-1">    </div>
<div id="outline-container-1_1" class="outline-3">
<h3 id="sec-1_1">Ingredients</h3>
<div class="outline-text-3" id="text-1_1">
<ul>
<li> 2 x 300g of Salmon  </li>
<li> Garlic (the original recipe had it mashed, but I prefer it sliced)  </li>
<li> Half an onion (a medium onion)  </li>
<li> Juice of 1/2 a lemon  </li>
<li> Salt  </li>
<li> Olive oil  </li>
<li> 1 tea spoon of Light Shoyu  </li>
<li> Tomato (again, the original recipe had 8 of those small cherry tomatoes, since I had much more salmon to make &ndash; about 1.5 kg &#8212; and I had none of those small tomatoes, I used two standard tomatoes here)  </li>
<li> Parsley </li>
</ul></div>
</p></div>
<div id="outline-container-1_2" class="outline-3">
<h3 id="sec-1_2">Cooking it</h3>
<div class="outline-text-3" id="text-1_2">
<p> I marinated the salmon with the lemon juice, the shoyu sauce, some salt and the garlic slices for about 15 minutes (now, I would let it rest a bit longer, maybe about 30 minutes&hellip;). </p>
<p> After that, I used some aluminum foil and put the salmon filets side by side, covered them with onions, tomatoes, parsley and some olive oil. </p>
<p> Then, I put everything in the oven for about 40 minutes at 200°C. </p>
<p> After that comes the hardest part: eating it all <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p> Enjoy! </p>
</div></div>
</p></div>
<br />Filed under: <a href='http://crazythinking.wordpress.com/category/life/'>life</a>, <a href='http://crazythinking.wordpress.com/category/universe/'>universe</a> Tagged: <a href='http://crazythinking.wordpress.com/tag/coffee/'>coffee</a>, <a href='http://crazythinking.wordpress.com/tag/kitchen/'>kitchen</a>, <a href='http://crazythinking.wordpress.com/tag/salmon/'>salmon</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/crazythinking.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/crazythinking.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/crazythinking.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/crazythinking.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/crazythinking.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/crazythinking.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/crazythinking.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/crazythinking.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/crazythinking.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/crazythinking.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/crazythinking.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/crazythinking.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/crazythinking.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/crazythinking.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=crazythinking.wordpress.com&amp;blog=3761525&amp;post=213&amp;subd=crazythinking&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://crazythinking.wordpress.com/2011/04/02/in-the-kitchen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4405c7bda81bf6e6708ef7abc68f02fc?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">crazythinking</media:title>
		</media:content>

		<media:content url="http://boaforma.abril.com.br/imagens/mt/papillote-salmao.jpg" medium="image">
			<media:title type="html">http://boaforma.abril.com.br/imagens/mt/papillote-salmao.jpg</media:title>
		</media:content>
	</item>
	</channel>
</rss>
