<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><description>Jarmo Pertman is an enthusiastic Ruby developer. He is one of the core developers of the popular automated testing framework Watir. He is also responsible for some other libraries like RAutomation, Win32::Screenshot, require_all and many more. He is also responsible of the cool site called Hacker Says. IT Really Matters is his personal blog where he tries to write about stuff that really matter in IT.</description><title>IT Really Matters</title><generator>Tumblr (3.0; @itreallymatters)</generator><link>https://itreallymatters.net/</link><item><title>Reasons not use Rails Single-Table-Inheritance</title><description>&lt;p&gt;Long time not written anything in here, but I&amp;rsquo;d like to rant a little about Rails&amp;rsquo; single-table-inheritance (STI) half-assed support.&lt;/p&gt;

&lt;p&gt;
I&amp;rsquo;m doing a project where using an STI started to make sense when looking from a database/models perspective so I thought to give Rails&amp;rsquo;s STI support a try.
&lt;/p&gt;

&lt;p&gt;
As a sidenote - I&amp;rsquo;ve used it before at another projects, but with really simple cases.
&lt;/p&gt;

&lt;p&gt;
It turns out that everything does not work as expected in ActiveRecord when using STI and I did spend almost a day to refactor code so that STI would start to work. In the end I reverted everything and ditched STI.
&lt;/p&gt;

&lt;p&gt;
Here&amp;rsquo;s why.
&lt;/p&gt;

&lt;p&gt;
1) ActiveRecord needs you to specify actual table names in &lt;i&gt;#where&lt;/i&gt; statements so you end up writing code where association names and table names are mixed in a single line (&lt;i&gt;#includes&lt;/i&gt; takes an association name of course). See &lt;a href="https://github.com/rails/rails/issues/27495" target="_blank"&gt;#27495&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
2) ActiveRecord does not make it easy to create aliases for associations in STI sub-classes so that using specific associations instead of a more generic ones would be possible. See &lt;a href="https://github.com/rails/rails/issues/27496" target="_blank"&gt;#27496&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
3) SQL queries are getting more complex due to automatic inclusion of &lt;i&gt;type&lt;/i&gt; everywhere.
&lt;/p&gt;

&lt;p&gt;
4) It&amp;rsquo;s quite easy to fetch records from all STI related &amp;ldquo;models&amp;rdquo; since you need to mix-and-match table-names with association names (see point number 2 above).
&lt;/p&gt;

&lt;p&gt;
Now I&amp;rsquo;m writing code without using STI and using similar code sharing techniques via some other means and having a little duplication at database side instead.&lt;/p&gt;</description><link>https://itreallymatters.net/post/155117194078</link><guid>https://itreallymatters.net/post/155117194078</guid><pubDate>Thu, 29 Dec 2016 16:02:02 +0200</pubDate><category>rails</category><category>rant</category><category>activerecord</category><category>morerant</category></item><item><title>Funny Programming Comment #81</title><description>&lt;p&gt;if (&lt;i&gt;/*you*/&lt;/i&gt; $_GET[&amp;lsquo;action&amp;rsquo;]) { &lt;i&gt;//celebrate&lt;/i&gt;&lt;/p&gt;</description><link>https://itreallymatters.net/post/105964311374</link><guid>https://itreallymatters.net/post/105964311374</guid><pubDate>Tue, 23 Dec 2014 17:00:21 +0200</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #80</title><description>&lt;p&gt;&lt;i&gt;//3.4  JeK  My manager promised me a lap dance if I can fix this release&lt;br/&gt;
//3.5  JeK  Still waiting for that dance from my manager&lt;br/&gt;
//3.6  JeK  My manager got changed, the new manager is hairy, dont want the dance anymore&lt;br/&gt;
//3.7  Jek  Got that dance, yuck!&lt;/i&gt;&lt;/p&gt;</description><link>https://itreallymatters.net/post/105355146058</link><guid>https://itreallymatters.net/post/105355146058</guid><pubDate>Tue, 16 Dec 2014 17:00:19 +0200</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #79</title><description>&lt;p&gt;&lt;i&gt;// Catching exceptions is for communists&lt;/i&gt;&lt;/p&gt;</description><link>https://itreallymatters.net/post/104760555507</link><guid>https://itreallymatters.net/post/104760555507</guid><pubDate>Tue, 09 Dec 2014 17:01:20 +0200</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #78</title><description>&lt;p&gt;In drivers/net/sunhme.c (Linux kernel):&lt;br/&gt;
&lt;i&gt;/* Welcome to Sun Microsystems, can I take your order please? */&lt;/i&gt;&lt;br/&gt;
if(!hp-&amp;gt;happy_flags &amp;amp; HFLAG_FENABLE)&lt;br/&gt;
        return happy_meal_bb_write(hp, tregs, reg, value);&lt;/p&gt;

&lt;p&gt;&lt;i&gt;/* Would you like fries with that? */&lt;/i&gt;&lt;br/&gt;
hme_write32(hp, &amp;amp;tregs-&amp;gt;frame,&lt;br/&gt;
            (FRAME_WRITE | (hp-&amp;gt;paddr &amp;lt;&amp;lt; 23) |&lt;br/&gt;
             ((reg &amp;amp; 0xff) &amp;lt;&amp;lt; 18) | (value &amp;amp; 0xffff)));&lt;br/&gt;
while(!(hme_read32(hp, &amp;amp;tregs-&amp;gt;frame) &amp;amp; 0x10000) &amp;amp;&amp;amp; &amp;ndash;tries)&lt;br/&gt;
        udelay(20);&lt;/p&gt;

&lt;p&gt;&lt;i&gt;/* Anything else? */&lt;/i&gt;&lt;br/&gt;
if(!tries)&lt;br/&gt;
        printk(KERN_ERR &amp;ldquo;happy meal: Aieee, transceiver MIF write bolixed\n&amp;rdquo;);&lt;/p&gt;

&lt;p&gt;&lt;i&gt;/* Fifty-two cents is your change, have a nice day. */&lt;/i&gt;&lt;/p&gt;</description><link>https://itreallymatters.net/post/104161027853</link><guid>https://itreallymatters.net/post/104161027853</guid><pubDate>Tue, 02 Dec 2014 17:00:27 +0200</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #77</title><description>&lt;p&gt;long time; &lt;i&gt;/* know C */&lt;/i&gt;&lt;/p&gt;</description><link>https://itreallymatters.net/post/103553987098</link><guid>https://itreallymatters.net/post/103553987098</guid><pubDate>Tue, 25 Nov 2014 17:00:12 +0200</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #76</title><description>&lt;p&gt;&lt;i&gt;/*&lt;br/&gt;
after hours of consulting the tome of google&lt;br/&gt;
i have discovered that by the will of unknown forces&lt;br/&gt;
without the below line, IE7 believes that 6px = 12px&lt;br/&gt;
*/&lt;/i&gt;&lt;br/&gt;
font-size: 0px;&lt;/p&gt;</description><link>https://itreallymatters.net/post/102960096887</link><guid>https://itreallymatters.net/post/102960096887</guid><pubDate>Tue, 18 Nov 2014 17:00:31 +0200</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #75</title><description>&lt;p&gt;Repeat&lt;br/&gt;
    &amp;hellip;&lt;br/&gt;
Until (JesusChristsReturn) &lt;i&gt;&amp;rsquo; Not sure&lt;/i&gt;&lt;/p&gt;</description><link>https://itreallymatters.net/post/102363930622</link><guid>https://itreallymatters.net/post/102363930622</guid><pubDate>Tue, 11 Nov 2014 17:00:13 +0200</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #74</title><description>&lt;p&gt;&lt;i&gt;//MailBody builders for two outgoing messages&lt;/i&gt;&lt;br/&gt;
StringBuilder hanz = new StringBuilder();&lt;br/&gt;
StringBuilder franz = new StringBuilder();&lt;/p&gt;</description><link>https://itreallymatters.net/post/101760292192</link><guid>https://itreallymatters.net/post/101760292192</guid><pubDate>Tue, 04 Nov 2014 17:00:26 +0200</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #73</title><description>&lt;pre&gt;// TODO: Fix this.  Fix what?&lt;/pre&gt;</description><link>https://itreallymatters.net/post/95823861177</link><guid>https://itreallymatters.net/post/95823861177</guid><pubDate>Tue, 26 Aug 2014 17:00:26 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #72</title><description>&lt;pre&gt;
def format_ticket_content(text, recursive = true)
  if text.is_a?(TicketNote)
    note = text
    text = note.content
  else
    note = nil
  end

  ## Safety pig has arrived!
  text = h(text)
  ##                               _
  ##  _._ _..._ .-',     _.._(`))
  ## '-. `     '  /-._.-'    ',/
  ##    )         \            '.
  ##   / _    _    |             \
  ##  |  a    a    /              |
  ##  \   .-.                     ;  
  ##   '-('' ).-'       ,'       ;
  ##      '-;           |      .'
  ##         \           \    /
  ##         | 7  .__  _.-\   \
  ##         | |  |  ``/  /`  /
  ##        /,_|  |   /,_/   /
  ##           /,_/      '`-'
  ##&lt;/pre&gt;</description><link>https://itreallymatters.net/post/95190309192</link><guid>https://itreallymatters.net/post/95190309192</guid><pubDate>Tue, 19 Aug 2014 17:00:05 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #71</title><description>&lt;pre&gt;// John! If you'll svn remove this once more,
// I'll shut you, for God's sake!
// That piece of code is not “something strange”!
// That is THE AUTH VALIDATION.&lt;/pre&gt;</description><link>https://itreallymatters.net/post/94533552082</link><guid>https://itreallymatters.net/post/94533552082</guid><pubDate>Tue, 12 Aug 2014 17:00:08 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #70</title><description>&lt;pre&gt;* ...and don't just declare it volatile and think you've solved
 * the problem. You young punks think you know what volatile
 * means... why in my day we had to cast it volatile uphill
 * both ways, and the code still didn't work! Whippersnappers...&lt;/pre&gt;</description><link>https://itreallymatters.net/post/93874385149</link><guid>https://itreallymatters.net/post/93874385149</guid><pubDate>Tue, 05 Aug 2014 17:00:13 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #69</title><description>&lt;pre&gt;virgin = 0;     /* you're not a virgin anymore, sweety */&lt;/pre&gt;</description><link>https://itreallymatters.net/post/93210549355</link><guid>https://itreallymatters.net/post/93210549355</guid><pubDate>Tue, 29 Jul 2014 17:00:16 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #68</title><description>&lt;pre&gt;public boolean isDirty() {
    //Why do you always go out and
    return dirty;
}&lt;/pre&gt;</description><link>https://itreallymatters.net/post/92532601440</link><guid>https://itreallymatters.net/post/92532601440</guid><pubDate>Tue, 22 Jul 2014 17:00:25 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #67</title><description>&lt;pre&gt;try {

}
catch (SQLException ex) {
    // Basically, without saying too much, you're screwed. Royally and totally.
}
catch(Exception ex)
{
    //If you thought you were screwed before, boy have I news for you!!!
}&lt;/pre&gt;</description><link>https://itreallymatters.net/post/92532600900</link><guid>https://itreallymatters.net/post/92532600900</guid><pubDate>Tue, 22 Jul 2014 17:00:25 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #66</title><description>&lt;pre&gt;class Act //That's me!!!
{

}&lt;/pre&gt;</description><link>https://itreallymatters.net/post/91847894303</link><guid>https://itreallymatters.net/post/91847894303</guid><pubDate>Tue, 15 Jul 2014 17:00:28 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #65</title><description>&lt;pre&gt;// This comment is self explanatory.&lt;/pre&gt;</description><link>https://itreallymatters.net/post/91149556728</link><guid>https://itreallymatters.net/post/91149556728</guid><pubDate>Tue, 08 Jul 2014 17:00:03 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #64</title><description>&lt;p&gt;} catch (PartInitException pie) {&lt;br/&gt;
    &lt;i&gt;// Mmm&amp;hellip; pie&lt;/i&gt;&lt;/p&gt;</description><link>https://itreallymatters.net/post/90455134738</link><guid>https://itreallymatters.net/post/90455134738</guid><pubDate>Tue, 01 Jul 2014 17:00:09 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item><item><title>Funny Programming Comment #63</title><description>&lt;p&gt;&lt;i&gt;// this comment included for the benefit of anyone grepping for swearwords: shit.&lt;/i&gt;&lt;/p&gt;</description><link>https://itreallymatters.net/post/89757710208</link><guid>https://itreallymatters.net/post/89757710208</guid><pubDate>Tue, 24 Jun 2014 17:00:16 +0300</pubDate><category>funny</category><category>programming</category><category>comment</category></item></channel></rss>
