<?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 Sebastian Suttner on Medium]]></title>
        <description><![CDATA[Stories by Sebastian Suttner on Medium]]></description>
        <link>https://medium.com/@ssuttner?source=rss-3f164908012c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pZQpBA_JrLewfjBs731ocA.jpeg</url>
            <title>Stories by Sebastian Suttner on Medium</title>
            <link>https://medium.com/@ssuttner?source=rss-3f164908012c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:25:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ssuttner/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[Ruby Pattern Matching]]></title>
            <link>https://medium.com/cedarcode/ruby-pattern-matching-1e84cab3b44a?source=rss-3f164908012c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e84cab3b44a</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[pattern-matching]]></category>
            <dc:creator><![CDATA[Sebastian Suttner]]></dc:creator>
            <pubDate>Tue, 03 Sep 2019 14:40:26 GMT</pubDate>
            <atom:updated>2019-09-03T14:40:26.078Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tnRofxRqzhBPZrv1" /></figure><p>Pattern Matching is finally coming to Ruby in version 2.7, and I’m very excited for it to be one more tool in the toolbelt of us <em>Rubyists</em>. <br>You might or might not already know what Pattern Matching is; either way, this post is meant to give a very simple <em>crash-course</em> or <em>go-to reference</em>.</p><p><a href="https://twitter.com/k_tsj">Kazuki Tsujimoto</a> presented very straightforward definitions in <a href="https://rubykaigi.org/2019/presentations/k_tsj.html">RubyKaigi 2019</a>:</p><blockquote>Pattern matching consists of specifying patterns to which some data should conform and then checking to see if it does and deconstructing the data according to those patterns — Learn You a Haskell for Great Good! (Miran Lipovaca)</blockquote><p>Especially for <em>Rubyists</em>, he stated:</p><blockquote>It’s basically “case/when” in conjunction with “multiple assignment”</blockquote><h3>Syntax</h3><pre>case expr<br>in pattern [if|unless condition]<br>  ...<br>in pattern [if|unless condition]<br>  ...<br>else<br>  ... <br>end</pre><ul><li>Like case, patterns are run in sequence until there is a match</li><li>NoMatchingPatternError is raised, if no match and no else clause exists</li><li>When using guards, the guard expression is evaluated if the preceding pattern matches</li></ul><p>Here is a very simple example:</p><pre>case [0, 1]<br>in [a, b] unless a == b<br>  :match<br>end<br>#=&gt; :match</pre><h3>Patterns</h3><h4>VALUE PATTERN</h4><p>A value pattern matches an object such that pattern === object. The best definition for the<a href="https://ruby-doc.org/core-2.7.0.preview1/Module.html#method-i-3D-3D-3D">subsumption operator (===)</a> I could find is:</p><blockquote><a href="https://stackoverflow.com/questions/4467538/what-does-the-operator-do-in-ruby?answertab=active#tab-top">“If I have a drawer labelled <strong>pattern</strong> would it make sense to put <strong>object</strong> in that drawer?”</a></blockquote><pre>case 0<br>in 0<br>  :match<br>end<br>#=&gt; :match</pre><pre>case 0<br>in -1..1<br>  :match<br>end<br>#=&gt; :match</pre><pre>case 0<br>in 3..6<br>  :no_match<br>end<br>#=&gt; NoMatchingPatternError (0)</pre><pre>case 0<br>in Integer<br>  :match<br>end<br>#=&gt; :match</pre><pre>case 0<br>in String<br>  :no_match<br>end<br>#=&gt; NoMatchingPatternError (0)</pre><h4>VARIABLE PATTERN</h4><p>When using a variable pattern it binds the variable to the value that matches the pattern.</p><pre>case 0<br>in a<br>  a <br>end<br>#=&gt; 0</pre><p>A variable pattern always binds the variable even if you have anouter variable with the same name.</p><pre>a = 0<br>case 1<br>in a<br>  a <br>end<br>#=&gt; 1</pre><p>To overcome this, use^:</p><pre>a = 0<br>case 1<br>in ^a # this translates to: `in 0`<br>  :no_match<br>end <br>#=&gt; NoMatchingPatternError</pre><p>Using _ can be useful to <em>drop/skip</em> values:</p><pre>case [0, 1]<br>in [_, a]<br>  a <br>end<br>#=&gt; 1</pre><h4>ALTERNATIVE PATTERN</h4><p>An alternative pattern matches if any of the patterns matches.</p><pre>case 0<br>in 0 | 1 | 2<br>  :match<br>end<br>#=&gt; :match</pre><h4>AS PATTERN</h4><p>An as pattern can be used to assign the value that matches the pattern that lives on the <em>left side</em> of the hash rocket (=&gt;), to the variable that lives on the <em>right side</em>.</p><pre>case [0, 1]<br>in [0, a =&gt; b]<br>  b<br>end<br>#=&gt; 1</pre><h4>ARRAY PATTERN</h4><p>Here are some basic array pattern examples:</p><pre>case [0, 1, 2]<br>in [0, a, 3]<br> :no_match       <br>end<br>#=&gt; NoMatchingPatternError ([0, 1, 2])</pre><pre>case [0, 1, 2]<br>in [0, a, 2]<br> a        <br>end<br>#=&gt; 1</pre><pre>case [0, 1, 2]<br>in [0, *tail]<br> tail  <br>end<br>#=&gt; [1, 2]</pre><p>There is <em>syntactic sugar</em> that allows us to do:</p><pre>case [0, 1, 2]<br>in Array(0, a, 2)<br> a        <br>end<br>#=&gt; 1</pre><pre>case [0, 1, 2]<br>in Object[0, a, 2]<br> a        <br>end<br>#=&gt; 1</pre><p>We can even <em>omit</em> the <em>brackets</em> []:</p><pre>case [0, 1, 2]<br>in 0, a, 2 <br> a        <br>end<br>#=&gt; 1</pre><p><strong>Actually, </strong><strong>array pattern is not <em>solely</em> for </strong><strong>Array <em>objects</em>.</strong></p><p>An array pattern will also match if object has a #deconstruct method that returns Array, and pattern matches the Array that object.deconstruct returns.</p><p>Here is an example with Struct:</p><pre>class Struct<br>  def deconstruct<br>    to_a<br>  end<br>end</pre><pre>Color = Struct.new(:r, :g, :b)</pre><pre>color = Color[0, 10, 20]<br>color.deconstruct <br>#=&gt; [0, 10, 20]</pre><p>In the following example, pattern will need to match color.deconstruct which results in [0, 10, 20] .</p><pre>case color <br>in Color[0, 0, 0]    <br>  :no_match<br>in Color[255, 0, 0]<br>  :no_match<br>in Color[r, g, b]<br>  &quot;#{r}, #{g}, #{b}&quot; <br>end<br>#=&gt; &quot;0, 10, 20&quot;</pre><h4>HASH PATTERN</h4><p>Here are some basic hash pattern examples:</p><pre>case {a: 0, b: 1, c: 2}<br>in {a: 0, b: b, c: 3}<br> :no_match       <br>end<br>#=&gt; NoMatchingPatternError ({:a=&gt;0, :b=&gt;1, :c=&gt;2})</pre><pre>case {a: 0, b: 1, c: 2}<br>in {a: 0, b: b, c: 2}<br>  b<br>end<br>#=&gt; 1</pre><pre>case {a: 0, b: 1, c: 2}<br>in {a: 0, **rest}<br>  rest<br>end<br>#=&gt; {:b=&gt;1, :c=&gt;2}</pre><p>There is <em>syntactic sugar</em> that allows us to do:</p><pre>case {a: 0, b: 1, c: 2}<br>in Hash(a: 0, b: b, c: 2)<br>  b<br>end<br>#=&gt; 1</pre><pre>case {a: 0, b: 1, c: 2}<br>in Object[a: 0, b: b, c: 2]<br>  b<br>end<br>#=&gt; 1</pre><p>And b: is equivalent to b: b:</p><pre>case {a: 0, b: 1, c: 2}<br>in {a:, b:, c:}<br>  b<br>end<br>#=&gt; 1</pre><p>We can even <em>omit</em> the <em>curly brackets</em> {}:</p><pre>case {a: 0, b: 1, c: 2}<br>in a: 0, b: b, c: 2<br>  b<br>end<br>#=&gt; 1</pre><pre>case {a: 0, b: 1, c: 2}<br>in a:, b:, c:<br>  b<br>end<br>#=&gt; 1</pre><p>One big difference that hash pattern has with array pattern, is that hash pattern matches subsets of Hashes, while array pattern matches exact Arrays.</p><pre>case {a: 0, b: 1, c: 2}<br>in b:<br>  b<br>end<br>#=&gt; 1</pre><p><strong>Actually, </strong><strong>hash pattern is not <em>solely</em> for </strong><strong>Hash <em>objects</em>.</strong></p><p>A hash pattern will also match if object has a #deconstruct_keys method that returns Hash, and pattern matches the Hash that object.deconstruct_keys(keys) returns.</p><p>Here is an example with Date:</p><pre>class Date<br>  def deconstruct_keys(keys)<br>    {year: year, month: month, day: day}<br>  end<br>end</pre><p>The keys argument that deconstruct_keys receives is the set of <em>keys</em> present in the pattern.</p><p>In the implementation above, we are not actually leveraging the keys argument. But, it’s very important thatdeconstruct_keys is implemented as efficiently as possible to improve the overall efficiency of case. Therefore, here is a smarter implementation where only the required <em>keys</em> are <em>deconstructed</em>:</p><pre>class Date<br>  VALID_KEYS = %i(year month day)</pre><pre>  def deconstruct_keys(keys)<br>    if keys<br>      (VALID_KEYS &amp; keys).each_with_object({}) do |k, h|<br>        h[k] = send(k)<br>       end<br>    end<br>  end<br>end</pre><pre>today = Date.today<br>today.deconstruct_keys([:year])<br>#=&gt; {year: 2019}</pre><p>If **rest is specified in the pattern, nil is passed in the keys argument. In that scenario, we need to return all <em>key-value pairs.</em> Let’s add an else clause:</p><pre>class Date<br>  VALID_KEYS = %i(year month day)</pre><pre>  def deconstruct_keys(keys)<br>    if keys<br>      (VALID_KEYS &amp; keys).each_with_object({}) do |k, h|<br>        h[k] = send(k)<br>       end<br>    else<br>      {year: year, month: month, day: day}<br>    end<br>  end<br>end</pre><pre>today = Date.today<br>today.deconstruct_keys(nil)<br>#=&gt; {year: 2019, month: 9, day: 1}</pre><p>Finally, in the following example, pattern will need to match today.deconstruct_keys([:year]) which results in {year: 2019}.</p><pre>case today<br>in year:<br> year<br>end<br>#=&gt; 2019</pre><h3>Conclusion</h3><p>It becomes obvious how this is going to come in handy. It becomes easier to <em>deconstruct</em> complex <em>objects</em> and work with their data. This will help us reduce the complexity of the code and increase its maintainability.</p><p>Things might still change around Pattern Matching; but don’t worry, Ruby makes sure to remind this to us whenever we use it:</p><blockquote>warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e84cab3b44a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cedarcode/ruby-pattern-matching-1e84cab3b44a">Ruby Pattern Matching</a> was originally published in <a href="https://medium.com/cedarcode">Cedarcode</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I18n Dynamic Ruby Translations with Lambdas]]></title>
            <link>https://medium.com/cedarcode/i18n-dynamic-ruby-translations-with-lambdas-4716f5fe4af9?source=rss-3f164908012c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4716f5fe4af9</guid>
            <category><![CDATA[i18n]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[internationalization]]></category>
            <dc:creator><![CDATA[Sebastian Suttner]]></dc:creator>
            <pubDate>Fri, 24 May 2019 18:07:52 GMT</pubDate>
            <atom:updated>2019-05-24T18:07:52.909Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Gwe4mcsxINghCXcq" /></figure><p>YAML files are the number one place to define translations with I18n. But, did you know that ruby (rb) files can be another option? Even a more powerful one…</p><p>I found out about this while working on a project that uses it, and when I tried to find more about it online I realized it was not a straightforward thing to search for. I hope that with this post, developers can find this more easily and leverage it sooner in their codebase if needed. Please note that this post is based on i18n v1.6.0–I didn’t try earlier versions.</p><h3>How to store your translations</h3><p>As stated in the <a href="https://edgeguides.rubyonrails.org/i18n.html#how-to-store-your-custom-translations">Rails Guides</a>, translations can be stored in both ruby and YAML file formats. Please note that this is also true for any ruby application using i18n. Just make sure all the <a href="https://github.com/ruby-i18n/i18n#ruby-without-rails">translation files are part of the </a><a href="https://github.com/ruby-i18n/i18n#ruby-without-rails">I18n.load_path</a>.</p><pre># config/locales/en.rb</pre><pre>{<br>  en: {<br>    foo: &#39;bar&#39;<br>  }<br>}</pre><p>Which is equivalent to:</p><pre># config/locales/en.yml</pre><pre>en:<br>  foo: &#39;bar&#39;</pre><p>If both translation files are loaded, the union of the two would make up the set of translations our application will use.</p><p>These are still static translation examples we are talking about. Let’s take a look at a more complex scenario next.</p><h3>Add logic to translations</h3><p>We know we can <a href="https://edgeguides.rubyonrails.org/i18n.html#passing-variables-to-translations">pass variables into translations</a>, obviously supported by translations stored in YAML files. But, what if we need something more complex that cannot be handled by interpolation? Then, the only option left is to embed ruby logic into our translations. This is where ruby translations come in handy.</p><p>Translations stored in ruby files support the use of lambdas. Documentation about this can be found in the <a href="https://github.com/ruby-i18n/i18n/blob/v1.6.0/lib/i18n.rb#L160">code of </a><a href="https://github.com/ruby-i18n/i18n/blob/v1.6.0/lib/i18n.rb#L160">i18n itself</a>.</p><pre># config/locales/en.rb</pre><pre>{<br>  en: {<br>    salutation: lambda do |key, options|<br>      if options[:formal]<br>        &quot;Welcome #{options[:name]}.&quot;<br>      else<br>        &quot;Hi #{options[:name]}!&quot;<br>      end<br>    end<br>  }<br>}</pre><p>Actually, <a href="https://github.com/ruby-i18n/i18n/blob/v1.6.0/lib/i18n.rb#L170">the string returned by lambda will go through string interpolation too</a>.</p><pre># config/locales/en.rb</pre><pre>{<br>  en: {<br>    salutation: lambda do |key, options|<br>      if options[:formal]<br>        &quot;Welcome %{name}.&quot;<br>      else<br>        &quot;Hi %{name}!&quot;<br>      end<br>    end<br>  }<br>}</pre><p>Both of the examples above would behave in the following way:</p><pre>I18n.t(:salutation, formal: true, name: &#39;Foo&#39;) =&gt; &#39;Welcome Foo.&#39;<br>I18n.t(:salutation, formal: false, name: &#39;Foo&#39;) =&gt; &#39;Hi Foo!&#39;</pre><p>Powerful! Isn’t it? A lot of complex translations can be solved with this technique. A quick glance at the use of lambdas for pluralization in Rails can be found in the <a href="https://edgeguides.rubyonrails.org/i18n.html#locale-specific-rules">Rails Guides</a> as well.</p><p><a href="https://github.com/ruby-i18n/i18n/blob/v1.6.0/lib/i18n.rb#L174">A small caveat that the </a><a href="https://github.com/ruby-i18n/i18n/blob/v1.6.0/lib/i18n.rb#L174">i18n gem recommends taking into account:</a></p><blockquote>It is recommended to use/implement lambdas in an “idempotent” way. E.g. when a cache layer is put in front of I18n.translate it will generate a cache key from the argument values passed to #translate. Therefor your lambdas should always return the same translations/values per unique combination of argument values.</blockquote><h3>Conclusion</h3><p>Both YAML and ruby translation files are great to use on a project. While ruby files are more powerful, YAML files are more dry and maintainable.</p><p>I’ve seen them work together perfectly. They can even team up and interact with each other, letting developers unleash their full potential.</p><p>Last, but not least, check out the following example!</p><pre># config/locales/en.rb</pre><pre>{<br>  en: {<br>    salutation: lambda do |key, options|<br>      if options[:formal]<br>        I18n.t(&#39;salutations.formal&#39;, name: options[:name])<br>      else<br>        I18n.t(&#39;salutations.informal&#39;, name: options[:name])<br>      end<br>    end<br>  }<br>}</pre><pre># config/locales/en.yml</pre><pre>en:<br>  salutations:<br>    formal: &#39;Welcome %{name}.&#39;<br>    informal: &#39;Hi %{name}!&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4716f5fe4af9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cedarcode/i18n-dynamic-ruby-translations-with-lambdas-4716f5fe4af9">I18n Dynamic Ruby Translations with Lambdas</a> was originally published in <a href="https://medium.com/cedarcode">Cedarcode</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AbstractController::DoubleRenderError Fix]]></title>
            <link>https://medium.com/cedarcode/abstractcontroller-doublerendererror-fix-d18881b80476?source=rss-3f164908012c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d18881b80476</guid>
            <category><![CDATA[render]]></category>
            <category><![CDATA[concern]]></category>
            <category><![CDATA[doublerendererror]]></category>
            <category><![CDATA[double-render]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Sebastian Suttner]]></dc:creator>
            <pubDate>Thu, 25 Apr 2019 06:15:20 GMT</pubDate>
            <atom:updated>2019-04-25T16:27:10.061Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_vd9O2QWVIPB7SbyfcJ7QQ.png" /></figure><p>Is this error giving you a headache? Have you already tried using and return as <a href="https://guides.rubyonrails.org/layouts_and_rendering.html#avoiding-double-render-errors">Rails suggests in its guides</a> but still can’t make the error go away?</p><p>TL;DR: See if you are calling render in controller concerns. This post will explain why this might be the issue that’s right under your nose.</p><p>The key thing to understand here is that render has multiple implementations in Rails and we need to know which one is being used when.</p><h3>ActionView::Renderer#render</h3><pre># rails/actionview/lib/action_view/renderer/renderer.rb</pre><pre># Main render entry point shared by Action View and Action Controller.</pre><pre>def render(context, options)      <br>  if options.key?(:partial)<br>    render_partial(context, options)<br>  else<br>    render_template(context, options)<br>  end<br>end</pre><p>In the context of a view, therender method can be called multiple times to render partials. No specific restrictions apply to this implementation, so no exceptions will be raised in this case.</p><h3>ActionController::Rendering#render</h3><pre># rails/actionpack/lib/action_controller/metal/rendering.rb</pre><pre># Check for double render errors and set the content_type after rendering.</pre><pre>def render(*args) #:nodoc:<br>  raise ::AbstractController::DoubleRenderError if response_body<br>  super<br>end</pre><p>When explicitly calling render from a controller, it checks that no other response_bodywas previously set (e.g. via render or redirect_to). If there is already a response_body, it raises AbstractController::DoubleRenderError. On the other hand, if response_body is empty, then everything works just fine.</p><p>Please note that explicitly calling render in a controller action is not obligatory. In case this does not happen, then <a href="https://api.rubyonrails.org/classes/ActionController/ImplicitRender.html">ActionController::ImplicitRender</a> will figure out which template to render for us.</p><p>So far so good. We now understand how the different implementations of render work.</p><p>But, it can get tricky when trying to render partials from a controller concern. It’s true that we don’t see this very often and is probably not a good code design, but I’ve come across a situation like this when working on a project. Let’s look at the next simplified example.</p><h3>Calling render inside a controller concern</h3><p>Suppose there is a controller concern that exposes a helper_method that renders a partial.</p><pre>module Bar<br>  extend ActiveSupport::Concern</pre><pre>  included do<br>    helper_method :display_bar<br>  end</pre><pre>  def display_bar<br>    render partial: &#39;shared/bar&#39;<br>  end<br>end</pre><p>Then, a controller includes this concern.</p><pre># app/controllers/foo_controller.rb</pre><pre>class FooController &lt; ApplicationController<br>  include Bar</pre><pre>  def index<br>  end<br>end</pre><p>And uses its helper_method called display_bar.</p><pre># app/views/foo/index.html.erb</pre><pre>&lt;%= display_bar %&gt;<br>&lt;h1&gt;Home#index&lt;/h1&gt;<br>&lt;%= display_bar %&gt;</pre><p>Why would this raise ActionController::DoubleRenderError? Are we not just trying to render partials multiple times? The answer would be: “Yes and no”.</p><p>If we had rendered the partials directly in the view, then no error would have been raised. That’s because we would have called ActionView::Renderer#render and we know it has no restrictions.</p><p>But, since we are calling a helper_method implemented in the context of a controller concern, the method will actually execute as part of the controller. It will therefore call ActionController::Rendering#render, which we know cannot be explicitly called more than once.</p><h3>Conclusion</h3><p>Try not to call render in controller concerns. But if you decide to do so, please be careful about ActionController::DoubleRenderError.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d18881b80476" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cedarcode/abstractcontroller-doublerendererror-fix-d18881b80476">AbstractController::DoubleRenderError Fix</a> was originally published in <a href="https://medium.com/cedarcode">Cedarcode</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open-source & development blend]]></title>
            <link>https://medium.com/cedarcode/open-source-development-blend-3b64ff601fa5?source=rss-3f164908012c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b64ff601fa5</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[work]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Sebastian Suttner]]></dc:creator>
            <pubDate>Mon, 02 Apr 2018 20:39:12 GMT</pubDate>
            <atom:updated>2018-07-23T18:55:30.308Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TPag6VHxFwd6XF1x." /></figure><p>Let me share with you a quick life principle I keep convincing myself of: <em>“It’s never too late to reinvent ourselves.”</em> Cheesy, isn’t it? Maybe… but it’s a principle that has helped me and my partners restructure our work life.</p><p>For more than 8 years I’ve been either an employee or co-founder of software development companies and I don’t remember ever feeling comfortable with the open-source contribution approach. Not because open-source was a neglected effort, but because it was not ideally prioritized.</p><p><em>Am I responsible for it? Definitely.</em> I tried doing something about it, but I should have pushed harder. My focus was not entirely right, and therefore I lacked enough motivation.</p><p>Companies should not start working on open-source projects just because others have gotten good results from it. If a company is going to become part of the open-source community, it better be convinced about why it’s doing it.</p><p>Let’s analyze open-source from different angles and find the right motivation — a motivation that comes from the very core.</p><h3>Open-source impact on a developer’s life</h3><p>It all comes down to one thing: every person needs to feel fulfilled at work. People need to feel that what they are spending their time in matters. For any developer, this translates to either of these:</p><ul><li>they are working on a product that adds high value to end-users</li><li>they are working on a tool others developers will leverage</li></ul><p>If none of these are true, it could make them feel that they are working on something useless, or that their projects won’t see the day of light. Tell me… who wants to be that person?</p><p>Open-source is a great way for those people to level up their work routines. Developers will better their code standards and practices, learn from others, expose their work and increase self-esteem. They will better their careers and in some cases, become industry leaders. They will contribute to different communities for a good cause, giving back to the world they decided to be part of. They will feel happier and perform better when they come back to work on features.</p><h3>Open-source impact on a company</h3><p>If developers get empowered by open-source, so will the company. This is true for development companies and for product-based companies as well, because a company is only as good as their people.</p><p>By spending more time working on open-source projects, there will be more knowledge about the latest trends in tech and a more collaborative culture will be fostered. More influencers will be part of the company’s network, therefore more partnerships with other companies could be generated; it also attracts more top-talent to come and join the company.</p><h3>Open-source impact on the community</h3><p>Open-source and its community can be seen as one; one cannot exist without the other. Therefore, working on open-source projects is to invest in its community — collaborating towards a bigger and better working environment.</p><h3>Open-source balance vs. blend</h3><p>If we keep thinking that customer-work and open-source are things we should balance, we’ll keep trying to find the right approach… Why don’t we just acknowledge that both of them are needs? Why don’t we as developers use our best judgment? Let’s just <strong>blend</strong> open-source into our work life and be better professionals.</p><p>I hope this post helps others find the right answer, the right motivation. We need to aim towards a world that collaborates more closely — <strong>an empowered world</strong>.</p><p>I need to confess I got inspired to write this by an <a href="https://medium.com/taking-note/forget-work-life-balance-its-all-about-the-blend-ad3115ed1fa4">Evernote’s post about Work-Life Blend</a>. I recommend you read it if you found this post useful.<br>It’s also worth sharing this <a href="https://www.forbes.com/sites/forbestechcouncil/2018/03/07/why-your-engineers-should-spend-more-time-writing-open-source-software-code">post by The Forbes Technology Council</a>, I found it while I was looking for something that would back up my theory.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b64ff601fa5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cedarcode/open-source-development-blend-3b64ff601fa5">Open-source &amp; development blend</a> was originally published in <a href="https://medium.com/cedarcode">Cedarcode</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Craving for sharing]]></title>
            <link>https://medium.com/cedarcode/craving-for-sharing-aaefa82450fd?source=rss-3f164908012c------2</link>
            <guid isPermaLink="false">https://medium.com/p/aaefa82450fd</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[welcome]]></category>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Sebastian Suttner]]></dc:creator>
            <pubDate>Fri, 23 Mar 2018 19:23:05 GMT</pubDate>
            <atom:updated>2018-07-23T18:56:08.992Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UjU_UlBc5kyT61nF." /></figure><p>Have you ever felt that you are not working hard enough to share your work with the world? It doesn’t matter if we are talking about small achievements or masterpieces; the world is filled with problems to be solved, and we need to minimize the time people spend reinventing the wheel.</p><p>This blog is for the tech community. I’m not going to lie… we are also fulfilling our needs to write and share — yes! — , but that’s not the main goal of this blog. What we really intend to create here is a place where our ideas can see the light of day and be discussed with others; a place where people can learn from each other.</p><p>Posts will be mostly about web development, but also about all the different processes/ideas/creations/methodologies that live around it. The web is an incredible ecosystem, so why not talk about all of it?</p><p>We commit to posting interesting content as frequently as we have new things to share. Comment on it, share it, clap for it! We love to generate discussions because it ends up making the blog posts better.</p><p>Last but not least, always keep in mind that we should work towards keeping a welcoming environment. Here we reference the <a href="https://medium.com/policy/medium-rules-30e5502c4eb4">Medium Rules</a>.</p><p>We are <strong>cedarcode.</strong> You can find more about us at <a href="https://www.cedarcode.com/?utm_source=medium&amp;utm_medium=referral&amp;utm_campaign=blog&amp;utm_content=craving_for_sharing">cedarcode.com</a>.<br>Happy reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aaefa82450fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cedarcode/craving-for-sharing-aaefa82450fd">Craving for sharing</a> was originally published in <a href="https://medium.com/cedarcode">Cedarcode</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>