<?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>Bicosyes - since evermore...</title>
	<atom:link href="http://bicosyes.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bicosyes.com</link>
	<description></description>
	<lastBuildDate>Thu, 17 Jan 2013 10:27:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Kubuntu wiht ugly menus, buttons and weird look and feel?</title>
		<link>http://bicosyes.com/2013/01/kubuntu-wiht-ugly-menus-buttons-and-weird-look-and-feel/</link>
		<comments>http://bicosyes.com/2013/01/kubuntu-wiht-ugly-menus-buttons-and-weird-look-and-feel/#comments</comments>
		<pubDate>Thu, 17 Jan 2013 10:27:03 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Kubuntu]]></category>

		<guid isPermaLink="false">http://bicosyes.com/?p=989</guid>
		<description><![CDATA[This seems to be a popular problem in kde&#8217;s history, after an update your menus and general look &#038; feel of your desktop is just weird (actually is just without any theme). Trying to set a theme again it won&#8217;t work. To fix this you just have to remove one file and regenerate the cache <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://bicosyes.com/2013/01/kubuntu-wiht-ugly-menus-buttons-and-weird-look-and-feel/" class="more-link"><span>Read More ...</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>This seems to be a popular problem in kde&#8217;s history, after an update your menus and general look &#038; feel of your desktop is just weird (actually is just without any theme). Trying to set a theme again it won&#8217;t work. To fix this you just have to remove one file and regenerate the cache config with another command, just execute:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">rm</span> ~<span style="color: #000000; font-weight: bold;">/</span>.config<span style="color: #000000; font-weight: bold;">/</span>Trolltech.conf
$ kbuildsycoca4 <span style="color: #660033;">--noincremental</span></pre></td></tr></table></div>

<p>Then restart your session (or close your apps and open them again) and there you go, pretty again!</p>
]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/2013/01/kubuntu-wiht-ugly-menus-buttons-and-weird-look-and-feel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>error on super() method, TypeError: must be type, not classobj</title>
		<link>http://bicosyes.com/2013/01/error-on-super-method-typeerror-must-be-type-not-classobj/</link>
		<comments>http://bicosyes.com/2013/01/error-on-super-method-typeerror-must-be-type-not-classobj/#comments</comments>
		<pubDate>Wed, 09 Jan 2013 20:21:32 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://bicosyes.com/?p=983</guid>
		<description><![CDATA[If you have an error like: ... super&#40;NuclearMissileHandler, self&#41;.__init__&#40;&#41; TypeError: must be type, not classobj That means you have forgotten to inherit from object in the superclass/es. Mental note: write something interesting in the fraking blog yo.]]></description>
				<content:encoded><![CDATA[<p>If you have an error like:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="python" style="font-family:monospace;">    ...
    <span style="color: #008000;">super</span><span style="color: black;">&#40;</span>NuclearMissileHandler<span style="color: #66cc66;">,</span> <span style="color: #008000;">self</span><span style="color: black;">&#41;</span>.<span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #008000;">TypeError</span>: must be <span style="color: #008000;">type</span><span style="color: #66cc66;">,</span> <span style="color: #ff7700;font-weight:bold;">not</span> classobj</pre></td></tr></table></div>

<p>That means you have forgotten to inherit from <strong>object</strong> in the superclass/es. </p>
<p><em>Mental note: write something interesting in the fraking blog yo.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/2013/01/error-on-super-method-typeerror-must-be-type-not-classobj/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What you should know before walk into a job interview for a developer position</title>
		<link>http://bicosyes.com/2012/11/what-you-should-know-before-walk-into-a-job-interview-for-a-developer-position/</link>
		<comments>http://bicosyes.com/2012/11/what-you-should-know-before-walk-into-a-job-interview-for-a-developer-position/#comments</comments>
		<pubDate>Sun, 18 Nov 2012 23:58:33 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Desarrollo de software]]></category>

		<guid isPermaLink="false">http://bicosyes.com/?p=977</guid>
		<description><![CDATA[You could be an awesome developer or a really bad one, it doesn&#8217;t matter, a job interview is something different. It&#8217;s like doing a crossword for a writer or a drive license test for a f1 driver, they should do it just ok, but a bit of practice before won&#8217;t hurt. Things I&#8217;d recommend: To <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://bicosyes.com/2012/11/what-you-should-know-before-walk-into-a-job-interview-for-a-developer-position/" class="more-link"><span>Read More ...</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>You could be an awesome developer or a really bad one, it doesn&#8217;t matter, a job interview is something different. It&#8217;s like doing a crossword for a writer or a drive license test for a f1 driver, they should do it just ok, but a bit of practice before won&#8217;t hurt.</p>
<p>Things I&#8217;d recommend:</p>
<ul>
<li><em>To code something while other people are watching you</em> (if you have a blackboard, the better): I don&#8217;t know about you, but I get really nervous if someone is looking at my screen, I start to do a lot of typos, even with really short shell commands and don&#8217;t even try to think and write logical stuff. One thing sort of work for me is to (try to) think out loud in those situations.</li>
<li><em>Remember basic data types</em>: Nowadays we got into bad habits of using a lot of libraries so we forgot about really basic stuff, do you know how to write a basic &#8220;set&#8221; date type from zero? a list? a balanced tree? 10 years ago I knew it, right now probably it would take me much more time.</li>
<li><em>Algorithm&#8217;s costs</em>: more of the same. It&#8217;s quite easy, but you should remember and take a look into this, again.</li>
<li><em>Learn name of things: </em>once thing is to have an anonymous function without being bound to some identifier and another different thing is to have a lambda. It&#8217;s not the same to have a class that exposes the functionality that to have a façade. Well, in fact those things are the same, but it helps if we speak the same language.</li>
<li><em>Do not panic</em>: it&#8217;s not about answer quickly, take it easy.</li>
</ul>
<p>May the source be with you.</p>
]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/2012/11/what-you-should-know-before-walk-into-a-job-interview-for-a-developer-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create ruby/jruby bindings of C++/C with ffi</title>
		<link>http://bicosyes.com/2012/11/create-rubyjruby-bindings-of-cc-with-ffi/</link>
		<comments>http://bicosyes.com/2012/11/create-rubyjruby-bindings-of-cc-with-ffi/#comments</comments>
		<pubDate>Thu, 01 Nov 2012 13:05:26 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://bicosyes.com/?p=963</guid>
		<description><![CDATA[Let&#8217;s start with the basic. What are bindings? It&#8217;s a way to call low level libraries (normally in C or C++) from another language (high level one, like ruby, java or whatever). This simple step requires two important things: 1) first, to know how we should call the method itself and 2) second, how to <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://bicosyes.com/2012/11/create-rubyjruby-bindings-of-cc-with-ffi/" class="more-link"><span>Read More ...</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>Let&#8217;s start with the basic. What are <a href="http://en.wikipedia.org/wiki/Language_binding" title="bindings" target="_blank">bindings</a>? It&#8217;s a way to call low level libraries (normally in C or C++) from another language (high level one, like ruby, java or whatever). This simple step requires two important things: 1) first, to know how we should call the method itself and 2) second, how to map the type from the high level language to C primitives types. To accomplish this, we have what is called <a href="http://en.wikipedia.org/wiki/Foreign_function_interface" title="ffi" target="_blank">foreign function interface</a> which trivialize this task.</p>
<p>In ruby/jruby world we are gonna need <a href="https://github.com/ffi/ffi" title="ffi gem" target="_blank">ffi gem</a> (jruby also has a compatible ffi gem), besides that the most important part is to have a clear interface in C. You can do bindings for a C++ library if you create a C interface first (because the bindings between C++ and C are free, the compiler knows how to do it by itself). So let&#8217;s cut the crap and write some code</p>
<p>First our C++ library which can be this few lines or thousands:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">class</span> awesome_object <span style="color: #008000;">&#123;</span>
  <span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
    awesome_object<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> a, <span style="color: #0000ff;">int</span> b<span style="color: #008000;">&#41;</span> <span style="color: #008080;">:</span> a_<span style="color: #008000;">&#40;</span>a<span style="color: #008000;">&#41;</span>, b_<span style="color: #008000;">&#40;</span>b<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0000ff;">int</span> awesome_method<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">return</span> a_ <span style="color: #000040;">+</span> b_<span style="color: #008080;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
  <span style="color: #0000ff;">protected</span><span style="color: #008080;">:</span>
    <span style="color: #0000ff;">int</span> a_, b_<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Now the C bindings which will be our façade for our c++ library:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">extern</span> <span style="color: #ff0000;">&quot;C&quot;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">typedef</span> awesome_object_p <span style="color: #993333;">void</span> <span style="color: #339933;">*;</span>
&nbsp;
  awesome_object_p create_awesome_object<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> a<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> b<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> static_cast<span style="color: #339933;">&lt;</span><span style="color: #993333;">void</span> <span style="color: #339933;">*&gt;</span><span style="color: #009900;">&#40;</span>new awesome_object<span style="color: #009900;">&#40;</span>a<span style="color: #339933;">,</span> b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #993333;">void</span> delete_pointer_to_awesome_object<span style="color: #009900;">&#40;</span>awesome_object_p p<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    delete static_cast<span style="color: #339933;">&lt;</span>awesome_object <span style="color: #339933;">*&gt;</span><span style="color: #009900;">&#40;</span>p<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #993333;">int</span> awesome_method<span style="color: #009900;">&#40;</span>awesome_object_p p<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    awesome_object o <span style="color: #339933;">=</span> <span style="color: #339933;">*</span>static_cast<span style="color: #339933;">&lt;</span>awesome_object <span style="color: #339933;">*&gt;</span><span style="color: #009900;">&#40;</span>p<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> o.<span style="color: #202020;">awesome_method</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Now ruby code that use ffi gem to be able to call the methods defined in C:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'ffi'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">module</span> AwesomeObject
  <span style="color:#9966CC; font-weight:bold;">include</span> FFI
  extend <span style="color:#6666ff; font-weight:bold;">FFI::Library</span>
  ffi_lib <span style="color:#996600;">&quot;libawesome.so&quot;</span> <span style="color:#008000; font-style:italic;"># .dll if you are in windows, it doesn't matter the OS</span>
  attach_function <span style="color:#996600;">&quot;delete_pointer_to_awesome_object&quot;</span>, <span style="color:#996600;">&quot;delete_pointer_to_awesome_object&quot;</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:pointer</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:void</span>
  attach_function <span style="color:#996600;">&quot;awesome_method&quot;</span>, <span style="color:#996600;">&quot;awesome_method&quot;</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:pointer</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:int</span>
  attach_function <span style="color:#996600;">&quot;create_awesome_object&quot;</span>, <span style="color:#996600;">&quot;create_awesome_object&quot;</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:int</span>, <span style="color:#ff3333; font-weight:bold;">:int</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:pointer</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>With this you can use your C++ library from ruby code (I&#8217;d recommend package everything as a gem) just like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> MyTest
  <span style="color:#9966CC; font-weight:bold;">include</span> AwesomeObject
  <span style="color:#9966CC; font-weight:bold;">def</span> test!
    object = create_awesome_object<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">11</span>, <span style="color:#006666;">31</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    awesome_method object
    delete_pointer_to_awesome_object object
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
MyTest.<span style="color:#9900CC;">new</span>.<span style="color:#9900CC;">test</span>!</pre></td></tr></table></div>

<p>So, if you have read until now, probably you just want something working, say no more. Download <a href="http://bicosyes.com/code/bindingsruby.tar.gz" title="bindings ruby example with ffi">this tar.gz</a>, and see all this by yourself. In the tar you have the code split into c/h cpp/hpp files as it should be, in the post I&#8217;ve put all together to simplify things. Just execute make test and if you have ruby, ffi gem and g++ installed on your system, you&#8217;ll see something like:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #7a0874; font-weight: bold;">test</span>
<span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-c</span> awesome_object.cpp
<span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-c</span> awesome.c
<span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #660033;">-g</span> <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-fPIC</span> <span style="color: #660033;">-shared</span> <span style="color: #660033;">-o</span> libawesome.so awesome.o awesome_object.o
ruby test.rb
<span style="color: #000000;">42</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/2012/11/create-rubyjruby-bindings-of-cc-with-ffi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Attach android sources to your applications on eclipse</title>
		<link>http://bicosyes.com/2012/08/attach-android-sources-to-your-applications-on-eclipse/</link>
		<comments>http://bicosyes.com/2012/08/attach-android-sources-to-your-applications-on-eclipse/#comments</comments>
		<pubDate>Mon, 06 Aug 2012 22:08:50 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://bicosyes.com/?p=956</guid>
		<description><![CDATA[One of the awesome things about dealing with open software is to be able to access to the source code. When you deal with complex systems (so, every fraking day normally) the worst thing are black boxes that you cannot see, check or change their inside. This black boxes use to be closed/privaty systems/libraries/whatever. Lucky <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://bicosyes.com/2012/08/attach-android-sources-to-your-applications-on-eclipse/" class="more-link"><span>Read More ...</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>One of the awesome things about dealing with open software is to be able to access to the source code. When you deal with complex systems (so, every fraking day normally) the worst thing are black boxes that you cannot see, check or change their inside. This black boxes use to be closed/privaty systems/libraries/whatever. Lucky we are, android is open source you can get the <a href="http://source.android.com/">source easily with repo</a> but for developing applications in eclipse you can just install <a href="http://code.google.com/p/adt-addons/">Android sources plugin</a> and that&#8217;s it, really nice.</p>
<blockquote><p>http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/2012/08/attach-android-sources-to-your-applications-on-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrollbars like they used to be in Ubuntu</title>
		<link>http://bicosyes.com/2012/07/scrollbars-like-they-used-to-be-in-ubuntu/</link>
		<comments>http://bicosyes.com/2012/07/scrollbars-like-they-used-to-be-in-ubuntu/#comments</comments>
		<pubDate>Tue, 17 Jul 2012 18:59:05 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bicosyes.com/?p=951</guid>
		<description><![CDATA[I honestly don&#8217;t know why I still use ubuntu, it pisses me off a lot with so many useless change related to its user interface, very pretty (the first 2 minutes) but totally useless. At least it&#8217;s easy to change this stuff. To go back to the typical scrollbar just execute this in a console: <span class="ellipsis">&#8230;</span> <span class="more-link-wrap"><a href="http://bicosyes.com/2012/07/scrollbars-like-they-used-to-be-in-ubuntu/" class="more-link"><span>Read More ...</span></a></span>]]></description>
				<content:encoded><![CDATA[<p>I honestly don&#8217;t know why I still use ubuntu, it pisses me off a lot with so many useless change related to its user interface, very pretty (the first 2 minutes) but totally useless. At least it&#8217;s easy to change this stuff. To go back to the typical scrollbar just execute this in a console:</p>
<p><code>$ gsettings set org.gnome.desktop.interface ubuntu-overlay-scrollbars false<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/2012/07/scrollbars-like-they-used-to-be-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
