<?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>The monkeys Speak</title>
	<atom:link href="http://www.fantastic-monkey.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.fantastic-monkey.com/blog</link>
	<description>Fantastic monkey productions official product appreciacion society’s blog.</description>
	<lastBuildDate>Fri, 30 Sep 2011 08:52:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>automatic type promotion in c++</title>
		<link>http://www.fantastic-monkey.com/blog/?p=24</link>
		<comments>http://www.fantastic-monkey.com/blog/?p=24#comments</comments>
		<pubDate>Fri, 30 Sep 2011 08:52:33 +0000</pubDate>
		<dc:creator>kristo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fantastic-monkey.com/blog/?p=24</guid>
		<description><![CDATA[At work, we got into a bit of a discussion, about how c++ compilers do automatic promotion of variable types, because it is somewhat unexpected sometimes (did you know, that if you do if(variable of type unsigned char), it gets promoted to int?) So, how and if is prmotion done for signed/unsigned mismatches. Well, here [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">At work, we got into a bit of a discussion, about how c++ compilers do automatic promotion of variable types, because it is somewhat unexpected sometimes (did you know, that if you do if(variable of type unsigned char), it gets promoted to int?)</div>
<div id="_mcePaste"></div>
<div>So, how and if is prmotion done for signed/unsigned mismatches. Well, here a re a few test programs:</div>
<div></div>
<div id="_mcePaste">test1:</div>
<div id="_mcePaste">#include &lt;stdio.h&gt;</div>
<div id="_mcePaste">int main(void)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">unsigned int a = 3000000000;</div>
<div id="_mcePaste">if (a &gt; -2)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">printf(&#8220;yes!\r\n&#8221;);</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">return 0;</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">result: as expected, nothing is printed, since there really is no way for this to work anyway.</div>
<div id="_mcePaste">test2:</div>
<div id="_mcePaste">#include &lt;stdio.h&gt;</div>
<div id="_mcePaste">int main(void)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">unsigned int a = 4;</div>
<div id="_mcePaste">if (a &gt; -2)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">printf(&#8220;yes!\r\n&#8221;);</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">return 0;</div>
<div id="_mcePaste">}</div>
<div></div>
<div id="_mcePaste">result: the same, although the compiler could have made this work theoretically.</div>
<div id="_mcePaste">test3:</div>
<div></div>
<div id="_mcePaste">#include &lt;stdio.h&gt;</div>
<div id="_mcePaste">int main(void)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">unsigned int a = 4;</div>
<div id="_mcePaste">signed int b = -2;</div>
<div id="_mcePaste">if (a &gt; b)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">printf(&#8220;yes!\r\n&#8221;);</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">return 0;</div>
<div id="_mcePaste">}</div>
<div>result: the same, which does make sense, since no automatic promotion is done in this case.</div>
<div></div>
<div id="_mcePaste">now, for the really surprising bit hough:</div>
<div id="_mcePaste">what switches are needed for gcc to warn you about this?</div>
<div id="_mcePaste">I assumed, -Wall is enough, but no. So I tried -Wall -pedantic, but to my great surprise, still nothing!</div>
<div id="_mcePaste">Apparently you need the -Wextra switch for this to generate a warning about comparing signed and unsigned values!</div>
]]></content:encoded>
			<wfw:commentRss>http://www.fantastic-monkey.com/blog/?feed=rss2&#038;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Say it with me!</title>
		<link>http://www.fantastic-monkey.com/blog/?p=21</link>
		<comments>http://www.fantastic-monkey.com/blog/?p=21#comments</comments>
		<pubDate>Tue, 08 Feb 2011 08:09:19 +0000</pubDate>
		<dc:creator>kristo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fantastic-monkey.com/blog/?p=21</guid>
		<description><![CDATA[If you trust yourself and believe in your dreams and follow your star, you’ll still get beaten by people who spent their time working hard and learning things and weren’t so lazy. –Terry Pratchett, The Wee Free Men Damn straight YO!]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><em>If you trust yourself and believe in your dreams<br />
and follow your star, you’ll still get beaten by people<br />
who spent their time working hard and<br />
learning things and weren’t so lazy.</em></p>
<p style="text-align: center;">–Terry Pratchett, The Wee Free Men</p>
<p style="text-align: center;">
<p style="text-align: left;">Damn straight YO!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fantastic-monkey.com/blog/?feed=rss2&#038;p=21</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>content or no content. there is no question.</title>
		<link>http://www.fantastic-monkey.com/blog/?p=17</link>
		<comments>http://www.fantastic-monkey.com/blog/?p=17#comments</comments>
		<pubDate>Tue, 25 May 2010 09:50:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fantastic-monkey.com/blog/?p=17</guid>
		<description><![CDATA[have to say – business class is the only way to fly no, really, even on estonian air – the airline recently voted as having the worst meals in the history of all airlines. which I don’t agree with by the way. to look at it heartlessly and only considering the true facts – yes, [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>have to say – business class is the only way to fly <img src="http://www.fantastic-monkey.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<p>no, really, even on estonian air – the airline recently voted as having the  worst meals in the history of all airlines. which I don’t agree with by the  way.</p>
<p>to look at it heartlessly and only considering the true facts – yes, the seat  is the same and the legroom is the same and on this particular plane there isn’t  even a curtain to separate you from the rest of the plebeians (not that it makes  much difference, but damn it makes you feel superior), but there is just  something very nice and relaxing about looking out the window at clouds passing  by 5 kilometers below you while a stewardess inquires if perhaps sir would like  some more wine.</p>
<p>but I have to think about why that mekes me feel good. is it just the feeling  of superiority (although I am here only by accident – usually my company flies  me coach as does every other company I know of) or is it really better to get a  sandwitch instead of a roll? empirically, of course, the difference in the  actual food is minimal. there is the aspect of free booze of course and it just  might be the influence of alcohol that makes all the happy juice. but, for the  sake of argument, let’s say that it isn’t and look at the other  possibilities.</p>
<p>so – the small difference in food or being seated separetely from the people  who have the cheap tickets. the essence of them is of course the same – you are  better than them and they can see it. you are at the top of the pack. but of  course I’m not really at the top of the pack, in fact the real top is so far  away I couldn’t even see it if I could somehow get access to the hubble  telescope. wo, what this really is about, is desception – make things seem like  they are better than they really are.</p>
<p>to sum up so far: I am being fooled into thinking that things are going  really good for me and I am being treated like royalty and that makes me feel  really good. this little theatrical play really works.</p>
<p>but why? I am a fairly intelligent person – I should realize that this is  just a sham and should even perhaps be insulted by this sharade. for the flex  ticket I got a different sandwitch, a glass of wine and a small bottle of  whiskey – even the most adventurous restorant owner would not be able to justify  charging an extra 3000 EEK for those things. of course, it isn’t really MY  money, it’s moy employer who’s paying for it, but still.</p>
<p>from this it would seem that there is no real tangible difference between  being fooled into feeling superior and actually being superior. another proof to  the postulation that “manufactured” happiness is the same as real happiness. as  some philosophe said – we only see shadows of the real world and what we  percieve as reality is really only going on inside of our own heads. each of us  creates their own little universe in their head and with just a small nudge from  the outside world we can be the kings of our own universe.</p>
<p>making a product or service that induces this feeling in me, thus enables me  to feel like a king. what are the properties that a device needs to have to  induce in me this feeling? if we base our reasoning in the airplane industry,  then it seems, that it doesn’t really matter if the content is much better (ham  sandwitch in business class versus a bacon roll in coach) or different, but the  way it is presented is what sets it apart. the stewardess here smiles at me and  does try to make me feel as comfortable as possible. I feel more comfortable,  but in every measurable aspect I am only as comfortable as everyone else on the  plane.</p>
<p>this is of course what apple and google have figured out as well – make  things that look good and are comfortable and intuitive to use, not things that  break new ground technologically. using devices or software like that makes me  feel in control, like I am the boss. like a king.</p>
<p>it seems to me, that during this flight I really have managed to convince  myself here, that presentation really IS content.</p>
<p>happy flight experiences,<br />
the flying monkey.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fantastic-monkey.com/blog/?feed=rss2&#038;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>“The space shuttles’ retirement follows almost 30 years of service and will after September leave the US without any major way of launching astronauts into space”</title>
		<link>http://www.fantastic-monkey.com/blog/?p=14</link>
		<comments>http://www.fantastic-monkey.com/blog/?p=14#comments</comments>
		<pubDate>Tue, 06 Apr 2010 09:49:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fantastic-monkey.com/blog/?p=14</guid>
		<description><![CDATA[I like rockets. Really, space is way cool! After the iron curtain opened and information about the outside world started coming in, I started hearing about NASA and the cool rockets they send to space and the astronauts who fly them. And ever since that it has always been my opinion that working for NASA [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>I like rockets. Really, space is way cool! After the iron curtain opened and  information about the outside world started coming in, I started hearing about  NASA and the cool rockets they send to space and the astronauts who fly them.  And ever since that it has always been my opinion that working for NASA is the  ultimate job for common people, being an astronaut the job that every single  person who wants to be the best in the world should strive towards.</p>
<p>I have always dreamed that when my son is maybe 7 or something around that  age, we’d go take a trip to the US and see a shuttle launch and then I could  point to it taking off and say that look, son, there’s people in that thing and  they are going into space. They are doing the greatest thing any person in the  world can possibly do. And if you study real hard and make the right choices,  there is a chance that you will be able to do that as well some day.</p>
<p>And today my dream was broken, because it seems they really are going to end  the shuttle flights – the last one is scheduled to take off in September. It  will probably be extended a bit, but not the four years it will take for my son  to turn seven. After that the ISS servicing crews will be launched by Russian  rockets from Baikonur, I believe. And for an Estonian, getting into that  program, the chances are 0% unfortunately.</p>
<p>There is some hope, that commercial space launches will start to happen, but  that is still probably a decade away as well.</p>
<p>This is a sad time for the people of the earth.</p>
<p><a href="http://www.networkworld.com/community/node/59718">http://www.networkworld.com/community/node/59718</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fantastic-monkey.com/blog/?feed=rss2&#038;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>this will be the new code monkey card</title>
		<link>http://www.fantastic-monkey.com/blog/?p=10</link>
		<comments>http://www.fantastic-monkey.com/blog/?p=10#comments</comments>
		<pubDate>Wed, 31 Mar 2010 09:48:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fantastic-monkey.com/blog/?p=10</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="xNozd" src="http://www.fantastic-monkey.com/blog/wp-content/uploads/2010/10/xNozd-300x170.jpg" alt="xNozd" width="300" height="170" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fantastic-monkey.com/blog/?feed=rss2&#038;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>oh, those open-source developers. they are all about fun-fun-fun!</title>
		<link>http://www.fantastic-monkey.com/blog/?p=7</link>
		<comments>http://www.fantastic-monkey.com/blog/?p=7#comments</comments>
		<pubDate>Tue, 30 Mar 2010 09:46:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fantastic-monkey.com/blog/?p=7</guid>
		<description><![CDATA[I just found these two macros in the jffs2 filesystem implementation in ecos: #define JFFS2_INODE_INFO(i) (&#38;(i)-&#62;jffs2_i) #define OFNI_EDONI_2SFFJ(f) ((struct _inode *) ( ((char *)f) – ((char *)(&#38;((struct _inode *)NULL)-&#62;jffs2_i)) ) ) oh boy, someone was having a good day]]></description>
			<content:encoded><![CDATA[<div>
<p>I just found these two macros in the jffs2 filesystem implementation in  ecos:</p>
<p>#define JFFS2_INODE_INFO(i) (&amp;(i)-&gt;jffs2_i)<br />
#define  OFNI_EDONI_2SFFJ(f) ((struct _inode *) ( ((char *)f) – ((char *)(&amp;((struct  _inode *)NULL)-&gt;jffs2_i)) ) )</p>
<p>oh boy, someone was having a good day <img src="http://www.fantastic-monkey.com/blog/wp-includes/images/smilies/icon_razz.gif" alt=":P" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fantastic-monkey.com/blog/?feed=rss2&#038;p=7</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>man, that schneier dude is smart</title>
		<link>http://www.fantastic-monkey.com/blog/?p=5</link>
		<comments>http://www.fantastic-monkey.com/blog/?p=5#comments</comments>
		<pubDate>Thu, 10 Dec 2009 09:45:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fantastic-monkey.com/blog/?p=5</guid>
		<description><![CDATA[just read this: http://www.schneier.com/essay-114.html your friendly neighborhood privacy-monkey.]]></description>
			<content:encoded><![CDATA[<div>
<p>just read this: <a href="http://www.schneier.com/essay-114.html">http://www.schneier.com/essay-114.html</a></p>
<p>your friendly neighborhood privacy-monkey.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fantastic-monkey.com/blog/?feed=rss2&#038;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>give up and use tables.com</title>
		<link>http://www.fantastic-monkey.com/blog/?p=1</link>
		<comments>http://www.fantastic-monkey.com/blog/?p=1#comments</comments>
		<pubDate>Wed, 18 Feb 2009 13:26:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fantastic-monkey.com/blog/?p=1</guid>
		<description><![CDATA[I am a programmer. always have been. In the dark old days of yesteryear, I was the kind of guy, who thought that javascript is the language of hell and css and div’s are for people with tiny brains, who find a couple of nested &#60;table’s too hard to follow. Which they are not. Then [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>I am a programmer. always have been. In the dark old days of yesteryear, I  was the kind of guy, who thought that javascript is the language of hell and css  and div’s are for people with tiny brains, who find a couple of nested  &lt;table’s too hard to follow. Which they are not.</p>
<p>Then one day I was pointed towards a javascript library, called JQuery and  from that day on, nothing has ever been the same to me again. This really was  the fix that javascript needed in my opinion – a well-defined set of methods  that work on all browsers and work exactly the same. Of course, I understand  that this could not have come from any single browser manufacturer or even the  w3c – it had to be an independednt effort. And so it was, as the old saying goes  – “any problem in computer science can be solved with another layer of  abstraction” that the problem with javascript was solved. Now you could do lots  of clever things with layers and it would actually work the same on any browser!  YAY!</p>
<p>So I decided to learn javascript properly. It seemed to be ok at first, all  the dynamic typing and other details seemed just fine. And then I read about  prototypes and went – WOW – this is what has been missing from my life all these  years! It’s brilliant!</p>
<p>And it was. And still is. I also read that javascript was basically invented  and implemented at first by one guy, working at netscape. Remember this, because  it will be important later.</p>
<p>Now, the next logical step after learning javascript is – learn xhtml and css  properly. Forget about tables and single pixel gifs forever. (unless presenting  tabular information, of course!)</p>
<p>So I decided to gove that a try as well, being excited about having learnt  javascript and seen the greatness that it is, I figured css – being at it’s  third version and all would be quite mature and awesome by now.</p>
<p>Oh boy was I in for disappointment. Just to give a small example: make a  &lt;div style=”height: 250px; width: 250px;”&gt; and now, center an image inside  it. or some text. or bloody well anything. Horizontally, you can, quite easily,  but vertically – no. it is just impossible (you can do it if you know the heght  of the item inside, but you can’t portably if you don’t). Honestly, I was just  flabbergasted when I found this out. Unbelievable.</p>
<p>How can this be – probably hundreds of people have spent years designing this  thing, the standard is hundreds of pages long and still I can find several items  that are not well defined in the first 30 minutes or trying to use it. Perhaps  it is just another proof of the theorem that design by committee does not work,  but it seems to be even more than that. I can’t even think what exactly –  Ignorance, just plain stupidity … ? Honestly, it is just awful.</p>
<p>Of course, some time later, I found a website http://giveupandusetables.com  and have been happy ever since.</p>
<p>So what is the moral of the story? Simple, really – try new things but be  prepared for the possibility that they suck and you will have to go back to the  good old ways and use the things that have always worked, because they were  created to scratch an itch somebody had, not by a committee that thought it is  the right way to do things. So, no xhtml for me, thanks very much and welcome  back, html 4.01 transitional.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fantastic-monkey.com/blog/?feed=rss2&#038;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

