<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aleksei Matiushkin on Medium]]></title>
        <description><![CDATA[Stories by Aleksei Matiushkin on Medium]]></description>
        <link>https://medium.com/@mudasobwa?source=rss-eda6ec8eca5d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Tmdt3R8_JKjIkgvd.jpg</url>
            <title>Stories by Aleksei Matiushkin on Medium</title>
            <link>https://medium.com/@mudasobwa?source=rss-eda6ec8eca5d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:03:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mudasobwa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[This post should have been named “Open Letter to @tadman”.]]></title>
            <link>https://medium.com/@mudasobwa/this-post-should-have-been-named-open-letter-to-tadman-7a58925022a2?source=rss-eda6ec8eca5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a58925022a2</guid>
            <category><![CDATA[stackoverflow]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Aleksei Matiushkin]]></dc:creator>
            <pubDate>Fri, 22 Apr 2016 06:52:28 GMT</pubDate>
            <atom:updated>2016-04-22T06:52:28.604Z</atom:updated>
            <content:encoded><![CDATA[<p>This post should have been named “Open Letter to @<a href="http://stackoverflow.com/users/87189/tadman">tadman</a>”. I decided to write it when I got a “don’t do it” comment under my very correct answer on StackOverflow.</p><p><a href="http://stackoverflow.com/a/36775404/2035262">Here is a link</a>, if anybody is curious.</p><p>For those, who does not like surfing, here goes the <strong>tl;dr</strong>:</p><blockquote><strong>Q.</strong> I need to construct a 3D matrix out of existing data.</blockquote><blockquote><strong>A.</strong> One might use the <a href="http://ruby-doc.org/core-2.3.0/Hash.html#method-i-default_proc">Hash#default_proc</a> in the following manner:</blockquote><pre>result = Hash.new { |h1, k1|<br>  (0…col1.size) === k1 ? h1[k1] = Hash.new { |h2, k2|<br>    (0…col2.size) === k2 ? h2[k2] = Hash.new { |h3, k3| do<br>      o3 = col3.detect { |o| o.id == k3 }<br>      o3 ? h3[k3] = Obj.new(col1[k1].att, col2[k2].att, o3.att) : nil<br>    } : nil<br>  } : nil<br>}</pre><blockquote><strong>C.</strong> This is one crazy intense nugget of code.</blockquote><p>The comment above was given by the person, I know as being experienced,<br>highly professional, talented ruby developer. I put the disclaimer into my answer, saying “please do not do it at home.” That’s it.</p><p>From this very moment I feel myself frustrated. I am convinced that:</p><ul><li>this code is not complex by no means;</li><li>it is very maintainable, since it delegates everything to ruby internal implementation of `default_proc`, which I trust;</li><li>it has an added value.</li></ul><p>BTW, I would not ever have decided to write a post on the topic, just because somebody thinks my code is ugly. I was mostly disappointed by indirect claim that we should stick to giving answers in the “ruby for dummies” style.</p><p>I volunteer to StackOverflow for nearly five years. I deserve (and desire) some payback. This is not about achievements, reputation, badges and +10s. This is about my willingness to understand that I help people to learn. I am there not because I want to write the code for others for free. I don’t. That simple.</p><p>I feel pity that nowadays the development process is not about R&amp;D anymore. It’s mostly about S&amp;A (aka Search’N’Apply.) I don’t think I bring any goodness to the universe by providing another piece of code, that might be copy-pasted into some application without any thought.</p><p>Rails framework is so great that it is awful. It brings an ability to stop<br>thinking at all, just constantly apply patterns found in the internet. An<br>average Rails programmer requires neither research nor development. It is<br>sufficiently enough to <em>google || ask_on_so &amp;&amp; copy_paste</em>.</p><p>And — let me repeat that — I am there on StackOverflow not to multiply the amount of dumb snippets, that are to be blindmindly applied.</p><p>While I have an ability to demonstrate the technique, pattern, younameit — I am to keep doing that. In hope, that maybe experienced and talented programmers won’t consider the trivial codepieces like the one above as being “rather complicated thing to throw at someone.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a58925022a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>