<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>programming &amp;mdash; musicmatzes blog</title>
    <link>https://beyermatthias.de/tag:programming</link>
    <description></description>
    <pubDate>Mon, 12 Oct 2026 04:21:43 +0200</pubDate>
    <item>
      <title>Rust 2021</title>
      <link>https://beyermatthias.de/rust-2021</link>
      <description>&lt;![CDATA[Holy crap, I haven&#39;t written on my blog for a long time. And I almost missed&#xA;that the Rust community&#xA;asked for blog posts about Rust in 2021 -&#xA;but I am in time I guess, so here it goes.&#xA;&#xA;Most Rustaceans won&#39;t agree with this blog post, I guess. But I also think&#xA;that&#39;s fine, because that&#39;s the whole point of the Blog-Post-For-The-Roadmap&#xA;thing, right? Asking people for different opinions and starting a constructive&#xA;discussion about the topic. I also must say that I haven&#39;t read a single one of&#xA;the other Rust-2021 Blog posts just yet.&#xA;&#xA;I also think this will be rather short, but I hope I express my feelings in the&#xA;best way possible for you all to understand.&#xA;&#xA;Don&#39;t Change!&#xA;&#xA;I got into Rust at about Rust 1.5.0. After the first half of 2020, I felt like&#xA;January was years ago, so I feel like Rust 1.5.0 was in another lifetime. So&#xA;much happened this year, and still, so little was accomplished by me and my&#xA;friends. The world turned upside down, essentially.&#xA;&#xA;Rust changed a lot between 1.5.0 and the current compiler I have installed on&#xA;my system:&#xA;&#xA;$ rustc --version&#xA;rustc 1.46.0 (04488afe3 2020-08-24)&#xA;&#xA;The RELEASES.md file&#xA;is a whooping 9167 lines long.&#xA;We got cargo workspaces, we got awesome things like the ? operator (which I&#xA;definitively was not a friend of in the beginning), we got associated constants,&#xA;incremental compilation, impl Trait, we got const functions and most&#xA;importantly we got async/await.&#xA;&#xA;Fairly, that&#39;s where I started to struggle to keep up.&#xA;I definitively see the value in async-await and what it actually enables us to&#xA;do with Rust, and how to do it.&#xA;But I just couldn&#39;t keep up with the change anymore. It was too much. I couldn&#39;t&#xA;cope learning all these new things just in time they arrived.&#xA;I, to this day, struggle to write a simple Program with async/await if there&#39;s&#xA;too much iterators involved.&#xA;I don&#39;t know where my actual problems are, because I cannot see through the&#xA;whole concept enough to understand what I am doing wrong.&#xA;&#xA;The last five years were full of change. Good change, of course.&#xA;But this last (almost)year just drowned me. Too much to handle.&#xA;&#xA;My hope is, that Rust does not change anymore when it comes to features. I see&#xA;that there is a lot of demand for const generics, especially by the embedded&#xA;community. I understand why. I hope it doesn&#39;t have any impact on me as a&#xA;commandline-program-writing Rustacean.&#xA;&#xA;But...&#xA;&#xA;But. There&#39;s always a &#34;but&#34;, isn&#39;t there?&#xA;&#xA;I still have high hopes for some things concerning Rust. But they do not at all&#xA;have to do with the language Rust, but the environment around it.&#xA;As stated before, I&#39;m a commandline-program writing person. I do not write web&#xA;services (yet?), I do not write embedded stuff, I do not write&#xA;high-performance/performance-critical stuff.&#xA;&#xA;Essentially: I write programs in Rust that others would write in Python, Ruby or&#xA;Node. I write them in Rust because I am a lazy programmer, because I do not&#xA;care enough. I write Rust, because the compiler YELLS at me to get it right.&#xA;If I would do the same thing in Ruby, my go-to-language for everything below&#xA;100LOC, I would get myself into a wheelchair because I would use every footgun&#xA;available.&#xA;&#xA;Deep inside, I&#39;m a bad programmer and rustc forces me to be a good one.&#xA;&#xA;That was a bit of a rant, I hope you&#39;re still with me.&#xA;The paragraph above was for you to understand where I come from. I don&#39;t care if&#xA;my program runs in 1 second or 10, because the domain I write for does not care&#xA;most of the time.&#xA;But what is important to me, is that I actually can write my programs. Often,&#xA;I cannot. And that&#39;s simply because of one thing:&#xA;&#xA;Libraries are missing.&#xA;&#xA;Those who know me knew that this was coming.&#xA;Libraries for domains that I care about are missing. That is calendar&#xA;(icalendar) reading/writing, vcard reading/writing, email reading/writing (the&#xA;format, not the networking stuff), ...&#xA;There are already libraries out there for these things, although they are far&#xA;from being complete, usable or even correct.&#xA;Writing a simple TUI MUA for notmuch is pain right now, because parsing email&#xA;is really hard in Rust, and there are no high-level libraries available. The&#xA;&#34;mail&#34; crate ecosystem is closest, but they do&#xA;not yet have a parser.&#xA;&#xA;There are, I am sure, more things in this part of the ecosystem (that is&#xA;libraries for basic formats) where Rust could shine, but does not yet.&#xA;&#xA;My request for Rust in 2021 is: Make things shiny. Make them available, make&#xA;them work, make them correct, make them nice to use (E.G. parsing mails into&#xA;tokens and handing them to me is okay, but having a high-level interface is&#xA;much nicer).&#xA;&#xA;---&#xA;&#xA;To sum it up in one sentence:&#xA;&#xA;  Don&#39;t change rust itself, but improve the library ecosystem.&#xA;&#xA;That&#39;s my hope for Rust 2021. Thank you for having me in this awesome community&#xA;and thank you for reading.&#xA;&#xA;tags: #rust #programming&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Holy crap, I haven&#39;t written on my blog for a long time. And I almost missed
that the Rust community
<a href="https://blog.rust-lang.org/2020/09/03/Planning-2021-Roadmap.html">asked for blog posts about Rust in 2021</a> -
but I am in time I guess, so here it goes.</p>

<p>Most Rustaceans won&#39;t agree with this blog post, I guess. But I also think
that&#39;s fine, because that&#39;s the whole point of the Blog-Post-For-The-Roadmap
thing, right? Asking people for different opinions and starting a constructive
discussion about the topic. I also must say that I haven&#39;t read a single one of
the other Rust-2021 Blog posts just yet.</p>

<p>I also think this will be rather short, but I hope I express my feelings in the
best way possible for you all to understand.</p>

<h1 id="don-t-change" id="don-t-change">Don&#39;t Change!</h1>

<p>I got into Rust at about Rust 1.5.0. After the first half of 2020, I felt like
January was years ago, so I feel like Rust 1.5.0 was in another lifetime. So
much happened this year, and still, so little was accomplished by me and my
friends. The world turned upside down, essentially.</p>

<p>Rust changed a <em>lot</em> between 1.5.0 and the current compiler I have installed on
my system:</p>

<pre><code>$ rustc --version
rustc 1.46.0 (04488afe3 2020-08-24)
</code></pre>

<p>The <a href="https://raw.githubusercontent.com/rust-lang/rust/master/RELEASES.md">RELEASES.md file</a>
is a whooping 9167 lines long.
We got cargo workspaces, we got awesome things like the <code>?</code> operator (which I
definitively was not a friend of in the beginning), we got associated constants,
incremental compilation, <code>impl Trait</code>, we got const functions and most
importantly we got async/await.</p>

<p>Fairly, that&#39;s where I started to struggle to keep up.
I definitively see the value in async-await and what it actually enables us to
do with Rust, and <em>how</em> to do it.
But I just couldn&#39;t keep up with the change anymore. It was too much. I couldn&#39;t
cope learning all these new things just in time they arrived.
I, to this day, struggle to write a simple Program with async/await if there&#39;s
too much iterators involved.
I don&#39;t know where my actual problems are, because I cannot see through the
whole concept enough to understand what I am doing wrong.</p>

<p>The last five years were full of change. Good change, of course.
But this last (almost)year just drowned me. Too much to handle.</p>

<p>My hope is, that Rust does not change anymore when it comes to features. I see
that there is a lot of demand for const generics, especially by the embedded
community. I understand why. I hope it doesn&#39;t have any impact on me as a
commandline-program-writing Rustacean.</p>

<h1 id="but" id="but">But...</h1>

<p>But. There&#39;s always a “but”, isn&#39;t there?</p>

<p>I still have high hopes for some things concerning Rust. But they do not at all
have to do with the language Rust, but the environment around it.
As stated before, I&#39;m a commandline-program writing person. I do not write web
services (yet?), I do not write embedded stuff, I do not write
high-performance/performance-critical stuff.</p>

<p>Essentially: I write programs in Rust that others would write in Python, Ruby or
Node. I write them in Rust because I am a <em>lazy</em> programmer, because I <em>do not
care enough</em>. I write Rust, because the compiler <em>YELLS</em> at me to get it right.
If I would do the same thing in Ruby, my go-to-language for everything below
100LOC, I would get myself into a wheelchair because I would use every footgun
available.</p>

<p>Deep inside, I&#39;m a bad programmer and <code>rustc</code> forces me to be a good one.</p>

<p>That was a bit of a rant, I hope you&#39;re still with me.
The paragraph above was for you to understand where I come from. I don&#39;t care if
my program runs in 1 second or 10, because the domain I write for does not care
most of the time.
But what is important to me, is that I actually <em>can</em> write my programs. Often,
I cannot. And that&#39;s simply because of one thing:</p>

<p>Libraries are missing.</p>

<p>Those who know me knew that this was coming.
Libraries for domains that I care about are missing. That is calendar
(icalendar) reading/writing, vcard reading/writing, email reading/writing (the
format, not the networking stuff), ...
There are already libraries out there for these things, although they are far
from being complete, usable or even correct.
Writing a simple TUI MUA for notmuch is <em>pain</em> right now, because parsing email
is <em>really</em> hard in Rust, and there are no high-level libraries available. The
<a href="https://crates.io/crates/mail">“mail” crate</a> ecosystem is closest, but they do
not yet have a parser.</p>

<p>There are, I am sure, more things in this part of the ecosystem (that is
libraries for basic formats) where Rust could shine, but does not yet.</p>

<p>My request for Rust in 2021 is: Make things shiny. Make them available, make
them work, make them correct, make them nice to use (E.G. parsing mails into
tokens and handing them to me is okay, but having a high-level interface is
<em>much</em> nicer).</p>

<hr>

<p>To sum it up in one sentence:</p>

<blockquote><p>Don&#39;t change rust itself, but improve the library ecosystem.</p></blockquote>

<p>That&#39;s my hope for Rust 2021. Thank you for having me in this awesome community
and thank you for reading.</p>

<p>tags: <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a> <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/rust-2021</guid>
      <pubDate>Mon, 28 Sep 2020 18:40:11 +0200</pubDate>
    </item>
    <item>
      <title>serde-select</title>
      <link>https://beyermatthias.de/serde-select</link>
      <description>&lt;![CDATA[Finally, I managed to implement a proof of concept of serde-select. But lets&#xA;start at the beginning.&#xA;&#xA;The Problem&#xA;&#xA;The problem I tried to solve with this crate is rather simple: You need to be&#xA;able to get values from a serde-compatible document (e.g. toml, json, yaml, ...)&#xA;but you don&#39;t know the full schema of the document at compiletime of your crate.&#xA;&#xA;The origin of the idea of serde-select was when I first started working on my&#xA;imag project, where a lot of seperated crates coexist in&#xA;one ecosystem, but all of them should be configured in one big configuration&#xA;file. Of course I did not want to have one central crate just for defining the&#xA;schema, especially since a user might not want to use all functionality from the&#xA;ecosystem, thus not having a &#34;full&#34; configuration file, but only the parts they&#xA;needed.&#xA;&#xA;So I started writing &#34;toml-query&#34;, a crate which lets the programmer query a&#xA;toml::Value with a &#34;path&#34;. For example:&#xA;&#xA;[calendar]&#xA;listformat = &#34;{{lpad 5 i}} | {{abbrev 5 uid}} | {{summary}} | {{location}}&#34;&#xA;showformat = &#34;&#34;&#34;&#xA;{{i}} - {{uid}}&#xA;&#34;&#34;&#34;&#xA;&#xA;[ref]&#xA;[ref.basepathes]&#xA;music = &#34;/home/user/music&#34;&#xA;contacts = &#34;/home/user/contacts&#34;&#xA;calendars = &#34;/home/user/calendars&#34;&#xA;&#xA;The document looks like this, but in the program code we only need calendar&#xA;and its sub-values. So we can do&#xA;&#xA;let r = document.read(&#34;calendar.listformat&#34;);&#xA;&#xA;in the code and get a ResultOption&lt;&amp;&#39;document Value   value back.&#xA;&#xA;toml-query evolved over the time, now featuring more flexibility by&#xA;implementing &#34;Partials&#34;, how I call them. These are structs that are&#xA;Serialize + Deserialize and have a path attached to them, so deserializing the&#xA;partial document is possible right away:&#xA;&#xA;let r: ResultOption&lt;CalendarConfig,   = document.readpartial::CalendarConfig();&#xA;&#xA;where CalendarConfig: Serialize + Deserialize + Debug + tomlquery::Partial&#xA;(see here).&#xA;&#xA;The evolution&#xA;&#xA;toml-query works perfectly fine and I use it in my other projects a lot.&#xA;It is fast and easy to use. Its error reporting is nice.&#xA;&#xA;But an idea formed in the back of my head and I did not stop to think about it.&#xA;&#xA;  Can toml-query by generalized to work with all formats serde can handle?&#xA;&#xA;So I started to experiement with a more general implementation: serde-select was&#xA;born.&#xA;&#xA;And today I managed to get the first bits working.&#xA;&#xA;Meet serde-select&#xA;&#xA;serde-select&#xA;implements a &#34;read&#34; functionality for both JSON and TOML, depending on what&#xA;features you enable.&#xA;The inner implementation of the resolve-algorithm is agnostic of the actual&#xA;format.&#xA;&#xA;For a quick overview how to use the crate right now, have a look at the&#xA;tests for toml&#xA;for example.&#xA;&#xA;I strongly advice against using this crate, though. It is only an experiement&#xA;for now and shouldn&#39;t be used in production code.&#xA;Nevertheless, I published the first preview on crates.io.&#xA;&#xA;tags: #rust #programming&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Finally, I managed to implement a proof of concept of serde-select. But lets
start at the beginning.</p>

<h1 id="the-problem" id="the-problem">The Problem</h1>

<p>The problem I tried to solve with this crate is rather simple: You need to be
able to get values from a serde-compatible document (e.g. toml, json, yaml, ...)
but you don&#39;t know the full schema of the document at compiletime of your crate.</p>

<p>The origin of the idea of serde-select was when I first started working on my
<a href="https://imag-pim.org">imag</a> project, where a lot of seperated crates coexist in
one ecosystem, but all of them should be configured in one big configuration
file. Of course I did not want to have one central crate just for defining the
schema, especially since a user might not want to use all functionality from the
ecosystem, thus not having a “full” configuration file, but only the parts they
needed.</p>

<p>So I started writing “toml-query”, a crate which lets the programmer query a
<code>toml::Value</code> with a “path”. For example:</p>

<pre><code class="language-toml">[calendar]
list_format = &#34;{{lpad 5 i}} | {{abbrev 5 uid}} | {{summary}} | {{location}}&#34;
show_format = &#34;&#34;&#34;
{{i}} - {{uid}}
&#34;&#34;&#34;

[ref]
[ref.basepathes]
music = &#34;/home/user/music&#34;
contacts = &#34;/home/user/contacts&#34;
calendars = &#34;/home/user/calendars&#34;
</code></pre>

<p>The document looks like this, but in the program code we only need <code>calendar</code>
and its sub-values. So we can do</p>

<pre><code>let r = document.read(&#34;calendar.list_format&#34;);
</code></pre>

<p>in the code and get a <code>Result&lt;Option&lt;&amp;&#39;document Value&gt;&gt;</code> value back.</p>

<p>toml-query evolved over the time, now featuring more flexibility by
implementing “Partials”, how I call them. These are structs that are
<code>Serialize + Deserialize</code> and have a path attached to them, so deserializing the
partial document is possible right away:</p>

<pre><code>let r: Result&lt;Option&lt;CalendarConfig&gt;, _&gt; = document.read_partial::&lt;CalendarConfig&gt;();
</code></pre>

<p>where <code>CalendarConfig: Serialize + Deserialize + Debug + toml_query::Partial</code>
(see <a href="https://git.imag-pim.org/toml-query/tree/src/read.rs?id=c566fc5d1078a37b38cfb25ebf92f3e18f0646b8#n393">here</a>).</p>

<h1 id="the-evolution" id="the-evolution">The evolution</h1>

<p>toml-query works perfectly fine and I use it in my other projects a lot.
It is fast and easy to use. Its error reporting is nice.</p>

<p>But an idea formed in the back of my head and I did not stop to think about it.</p>

<blockquote><p>Can toml-query by generalized to work with all formats serde can handle?</p></blockquote>

<p>So I started to experiement with a more general implementation: serde-select was
born.</p>

<p>And today I managed to get the first bits working.</p>

<h1 id="meet-serde-select" id="meet-serde-select">Meet serde-select</h1>

<p><a href="https://git.sr.ht/~matthiasbeyer/serde-select">serde-select</a>
implements a “read” functionality for both JSON and TOML, depending on what
features you enable.
The inner implementation of the resolve-algorithm is agnostic of the actual
format.</p>

<p>For a quick overview how to use the crate right now, have a look at the
<a href="https://git.sr.ht/~matthiasbeyer/serde-select/tree/master/tests/toml/read.rs">tests for toml</a>
for example.</p>

<p>I strongly advice against using this crate, though. It is only an experiement
for now and shouldn&#39;t be used in production code.
Nevertheless, I published <a href="https://crates.io/crates/serde-select">the first preview</a> on crates.io.</p>

<p>tags: <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a> <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/serde-select</guid>
      <pubDate>Sat, 09 May 2020 16:40:10 +0200</pubDate>
    </item>
    <item>
      <title>Rust is one of the best C replacements we currently have</title>
      <link>https://beyermatthias.de/rust-is-one-of-the-best-c-replacements-we-currently-have</link>
      <description>&lt;![CDATA[This is a reply to the article&#xA;published by Drew DeVault called&#xA;&#34;Rust is not a good C replacement&#34;.&#xA;&#xA;---&#xA;&#xA;First of all, let me say that Drew is one of the people out there on the&#xA;internet whose opinions I highly value. Indeed he is one of the people I try&#xA;to read and listen to regardless of topic, because I think he is one of the&#xA;people that deserve unconditional attention.&#xA;&#xA;Needless to say that I&#39;ve also read his latest piece&#xA;&#34;Rust is not a good C replacement&#34;.&#xA;I have to admit I was shocked at first, but after a bit of cooling down (and&#xA;doing the dishes), I can see where this comes from.&#xA;&#xA;And I have to disagree.&#xA;&#xA;But let me start with my background - because that might be important for you,&#xA;dear reader, to classify this article.&#xA;&#xA;My background is mostly hobbyist programming. I did a few years of C, probably&#xA;a few 100kloc, not more. I also do rust since about&#xA;Rust 1.5.0 (2015-12).&#xA;I started a job where I expect to write C and C++ professionally about 1 month&#xA;ago.&#xA;&#xA;So, I do not have a background like Drew with probably millions of lines of&#xA;C, but I guess that I have a bit more experience with Rust - I wouldn&#39;t say&#xA;that I&#39;m a Rust professional, but I would consider myself a &#34;Advanced Rust&#xA;Hobbyist&#34;.&#xA;&#xA;I&#39;m also not as skilled in writing blog articles or even with the english&#xA;language, so keep that in mind when reading this.&#xA;&#xA;---&#xA;&#xA;I am not a big fan of statement-by-statement replying to an article, but&#xA;I guess for this type of article it is good enough.&#xA;&#xA;First of all, Drews initial statement that Rust was designed by C++&#xA;programmers: Yes, I absolutely see that this is true. Nevertheless I have to&#xA;say that these C++ programmers started developing Rust because C++ was too&#xA;complex and too error-prone in what it did and how it did it.&#xA;Rust is far away from the complexity C++ gives us in terms of language&#xA;features!&#xA;From the top of my head, we have&#xA;&#xA;A full-blown OOP programming paradigm, including&#xA;  Overloading&#xA;  &#34;friends&#34;&#xA;  (multi-)inheritance&#xA;  abstract classes&#xA;  partly and fully virtual functions&#xA;  pointers and references&#xA;  implicit conversions&#xA;  Copy/Move constructors&#xA;  Dynamic and static polymorphism&#xA;Manual memory management&#xA;Template Metaprogramming / Generic programming&#xA;operator overloading&#xA;Lambda expressions&#xA;Exceptions&#xA;&#xA;in C++, whereas in Rust we only get&#xA;&#xA;Dynamic and static polymorphism&#xA;operator overloading&#xA;Lambda expressions&#xA;Generic programming&#xA;&#xA;()&#xA;&#xA;You might consider this list cheated as Rust is not an object oriented&#xA;language like C++, but an imperative one like C. That is very true.&#xA;Nevertheless it is one reason why the cognitive load a C++-Program requires&#xA;one to handle is much higher than an equivalent (as in features of the&#xA;program) Rust program!&#xA;&#xA;Drew claims that the values of C and C++ programmers are incompatible and I&#xA;would agree with that. But that does not (have to) mean that a C-programmer&#xA;and a Rust programmer do not have the same values.&#xA;It is true, though, that Rust can excel at a lot of topics that C++ covers,&#xA;but it also empower programmers that do not feel comfortable writing good C&#xA;code to write their software. And that in a safe and at the same time&#xA;performant language while not being overly blown up.&#xA;&#xA;Further Drew compares C, C++, Go and Rust by their complexity, measured with&#xA;features introduced in the language over the years.&#xA;I am really sorry to say this here, Drew, but we are used to much better from&#xA;you! You say that this approach (bullet points/features listed on wikipedia&#xA;vs. bullet points in articles and release notes) is not very scientific, yes.&#xA;But not even to mention the years these languages were released! For the&#xA;record:&#xA;&#xA;C was released in 1972; 47 years ago)&#xA;C++ was released in 1985; 35 years ago&#xA;Go was released in 2009; 9 years ago)&#xA;Rust was released in 2010; 8 years ago)&#xA;&#xA;I am not saying that this disproves your statement - it even supports it! But&#xA;I do say that comparing based on features per year/release/whatever must&#xA;include a statement about how old these languages are, even if it is just for&#xA;showing the reader about what timeframe we are talking.&#xA;&#xA;So, Rust is a relatively young language and yes, it has added a lot of&#xA;features and therefore can be compared to C++ much better than it can be to C.&#xA;But saying that a 10-year-old C programm might even compile today and&#xA;everything might be okay but not so much with Rust is just ignorant of the&#xA;fact that Rust is not even that old.&#xA;Having a Rust program that is one year old still compiles fine today (assuming&#xA;it didn&#39;t use a compiler bug) and does not &#34;look old&#34; at all!&#xA;Rust has a big infrastructure for doing regression tests and for being&#xA;compatible with older programs.&#xA;&#xA;As you say, out of the way with the philosophical stuff and lets get down to&#xA;the facts.&#xA;&#xA;C is more portable.&#xA;But as mentioned before, C is almost six times as old as Rust. We&#39;ll get there!&#xA;&#xA;C has a spec. Yes, and I completely hear you on this one. Rust does not&#xA;(yet?) have a spec and it really is a pain-point. I want one, too! Maybe we&#39;ll&#xA;get there at some point.&#xA;By the way: Does Go have a spec? It&#xA;seems like it, but that rather looks like a&#xA;language definition and I doubt that this is what Drew meant when talking&#xA;about &#34;a spec&#34;, is it?&#xA;&#xA;C has many implementations. Yes and how much trouble has it been because&#xA;different compilers do different things on undefined behaviour?&#xA;Too many. This is where Rust tries to solve a problem: Get a language where&#xA;undefined behaviour is not allowed or at least as minimal as possible, then we&#xA;can have a spec for that language and then we can have different&#xA;implementations.&#xA;Time will tell whether we can get there.&#xA;&#xA;C has a consistent &amp; stable ABI. Point taken. I do not argue about that.&#xA;&#xA;Cargo is mandatory. Yes, another point taken. I again do not argue.&#xA;&#xA;Concurrency is generally a bad thing.&#xA;This statement gives me the impression that you did not yet try Rust,&#xA;actually. Like in a big (and possibly&#xA;multithreaded/concurrent/parallel/whateveryoucallit) environment.&#xA;You say that most software does not have to be parallel and I fully agree on&#xA;that - but if you need to be parallel, I&#39;d rather chose Rust over Go, C or&#xA;C++. Having the safety guarantees Rust gives me allows normal people (and not&#xA;Rockstar-programmers) to write software that can be massively parallel without&#xA;having to fear about deadlocks and other ugly things you get with other&#xA;languages.&#xA;&#xA;It is still true that bad design decisions are possible and might result in&#xA;bad software - but that is true for every language, isn&#39;t it? And I&#39;d rather&#xA;like to have a bad program that gets the job done because it can be statically&#xA;verified that it does than a program that crashes because I ran into a bug&#xA;that was introduced by bad design decisions.&#xA;&#xA;The next paragraph Drew writes makes me really, really sad. Fullquote:&#xA;&#xA;  Safety. Yes, Rust is more safe. I don’t really care. In light of all of&#xA;  these problems, I’ll take my segfaults and buffer overflows. I especially&#xA;  refuse to “rewrite it in Rust” - because no matter what, rewriting an entire&#xA;  program from scratch is always going to introduce more bugs than maintaining&#xA;  the C program ever would. I don’t care what language you rewrite it in.&#xA;&#xA;This gives me the impression that Drew was hit with &#34;Just rewrite it&#34; too many&#xA;times. And I completely agree with you, Drew, that you should indeed not&#xA;rewrite it in Rust just for the sake. Nobody should ever rewrite anything&#xA;in any other language than what &#34;it&#34; currently is written in.&#xA;I hate these people that actually say things like that (if it isn&#39;t for&#xA;trolling, but I have the uneasy feeling that Drew was hit with real &#34;Just&#xA;rewrite it&#34;ers and not just trolling).&#xA;&#xA;I do not say that the points Drew shows are false.&#xA;&#xA;What I do say is that the initial assumption that Rust is there to replace C&#xA;or C++ is, in my opinion, false.&#xA;It is certainly meant to get things right that C++ got wrong - and it is&#xA;certainly there to replace the C++-Monster that we call Gecko, because Mozilla&#xA;is exactly trying to do that!&#xA;But it is not there to replace all C or C++ code ever written because of&#xA;some stupid &#34;Hey we can do X better than your language&#34; bullshit!&#xA;&#xA;Also, the statement that Rust might end up as Kitchen-Sink like C++ and die&#xA;with feature-bloat is one that concerns me because I do not want Rust to end&#xA;up like C++. It certainly is not as complex as C++ and we (as in &#34;the Rust&#xA;community&#34;) have a lot of work to do to not end up with feature-creep - but&#xA;we are also certainly not there yet.&#xA;But I definitively see where this statement is coming from.&#xA;&#xA;The title of this article is&#xA;&#34;Rust is one of the best C replacements we currently have&#34; - and I stand by&#xA;this. But I also think that it is false to say that anyone has to replace C&#xA;or that Rust is necessarily there to do so.&#xA;&#xA;There are domains where you might want to rewrite C code, if you have the time&#xA;and resources. But I&#39;d rather advice against it.&#xA;Improving existing code is always easier than a rewrite of a program and&#xA;rewriting software does not improve the value of the software or even make&#xA;customers more happy. Rewriting software is IMHO only legit in two cases:&#xA;&#xA;It makes you happy because you&#39;re doing it for fun&#xA;It makes your boss happy because he ordered you to do so (for whatever&#xA;  reasons, may it be speed, resource usage, customer request or whatever)&#xA;&#xA;But just for the sake of it? Nah.&#xA;&#xA;I see where Drews article comes from and I see why he thinks like he does. I&#xA;greatly value his opinion and thoughts, and that&#39;s why I took the time to&#xA;write this article.&#xA;&#xA;I see that we (as in &#34;the Rust community&#34;) have a lot to&#xA;do to make more people happy. Not as in making them Rust programmers, because&#xA;that&#39;s not our goal, but as in showing them that we do not want everything&#xA;to be written in Rust and that it is just trolls that request a &#34;rewrite in&#xA;Rust&#34;.&#xA;&#xA;We do value friendlyness and kindness - let me state explicitely that this&#xA;does also include other programming-language-communities (and all other&#xA;communities as well)!&#xA;&#xA;Trolling does not help with that.&#xA;&#xA;: Yes we have generic programming in Rust. I&#39;m not a professional regarding C++, so I cannot say whether they are comparable in this regard.&#xA;: Some might say that we have manual memory management in Rust as well. That might be true by definition, but not the way I meant it: In C++ we can allocate something on the heap and then forget it. We have to try really hard to do that in Rust, though!&#xA;: In fact I might get into the situation where I have to rewrite an application in my job, but I&#39;d rather rewrite it in the same language than switching languages just for the sake of it!&#xA;&#xA;tags: #open-source #programming #rust #c #c++ #cpp&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>This is a reply to the article
published by Drew DeVault called
<a href="https://drewdevault.com/2019/03/25/Rust-is-not-a-good-C-replacement.html">“Rust is not a good C replacement”</a>.</p>

<hr>

<p>First of all, let me say that Drew is one of the people out there on the
internet whose opinions I highly value. Indeed he is one of the people I try
to read and listen to regardless of topic, because I think he is one of the
people that deserve unconditional attention.</p>

<p>Needless to say that I&#39;ve also read his latest piece
<a href="https://drewdevault.com/2019/03/25/Rust-is-not-a-good-C-replacement.html">“Rust is not a good C replacement”</a>.
I have to admit I was shocked at first, but after a bit of cooling down (and
doing the dishes), I can see where this comes from.</p>

<p>And I have to disagree.</p>

<p>But let me start with my background – because that might be important for you,
dear reader, to classify this article.</p>

<p>My background is mostly hobbyist programming. I did a few years of C, probably
a few 100kloc, not more. I also do rust since about
<a href="https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-150-2015-12-10">Rust 1.5.0 (2015-12)</a>.
I started a job where I expect to write C and C++ professionally about 1 month
ago.</p>

<p>So, I do <em>not</em> have a background like Drew with probably millions of lines of
C, but I <em>guess</em> that I have a bit more experience with Rust – I wouldn&#39;t say
that I&#39;m a Rust professional, but I would consider myself a “Advanced Rust
Hobbyist”.</p>

<p>I&#39;m also not as skilled in writing blog articles or even with the english
language, so keep that in mind when reading this.</p>

<hr>

<p>I am not a big fan of statement-by-statement replying to an article, but
I guess for this type of article it is good enough.</p>

<p>First of all, Drews initial statement that Rust was designed by C++
programmers: Yes, I absolutely see that this is true. Nevertheless I have to
say that these C++ programmers started developing Rust <em>because</em> C++ was too
complex and too error-prone in what it did and how it did it.
Rust is <em>far</em> away from the complexity C++ gives us in terms of language
features!
From the top of my head, we have</p>
<ul><li>A full-blown OOP programming paradigm, including
<ul><li>Overloading</li>
<li>“friends”</li>
<li>(multi-)inheritance</li>
<li>abstract classes</li>
<li>partly and fully virtual functions</li>
<li>pointers and references</li>
<li>implicit conversions</li>
<li>Copy/Move constructors</li>
<li>Dynamic and static polymorphism</li></ul></li>
<li>Manual memory management</li>
<li>Template Metaprogramming / Generic programming</li>
<li>operator overloading</li>
<li>Lambda expressions</li>
<li>Exceptions</li></ul>

<p>in C++, whereas in Rust we only get</p>
<ul><li>Dynamic and static polymorphism</li>
<li>operator overloading</li>
<li>Lambda expressions</li>
<li>Generic programming[^1]</li></ul>

<p>([^2])</p>

<p>You might consider this list cheated as Rust is not an object oriented
language like C++, but an imperative one like C. That is very true.
Nevertheless it is one reason why the cognitive load a C++-Program requires
one to handle is <em>much</em> higher than an equivalent (as in features of the
program) Rust program!</p>

<p>Drew claims that the values of C and C++ programmers are incompatible and I
would agree with that. But that does not (have to) mean that a C-programmer
and a Rust programmer do not have the same values.
It <em>is</em> true, though, that Rust can excel at a lot of topics that C++ covers,
but it also empower programmers that do not feel comfortable writing good C
code to write their software. And that in a safe and at the same time
performant language while not being overly blown up.</p>

<p>Further Drew compares C, C++, Go and Rust by their complexity, measured with
features introduced in the language over the years.
I am really sorry to say this here, Drew, but we are used to much better from
you! You say that this approach (bullet points/features listed on wikipedia
vs. bullet points in articles and release notes) is not very scientific, yes.
But not even to mention the years these languages were released! For the
record:</p>
<ul><li>C was released <a href="https://en.wikipedia.org/wiki/C_(programming_language)">in 1972; 47 years ago</a></li>
<li>C++ was released <a href="https://en.wikipedia.org/wiki/C%2B%2B">in 1985; 35 years ago</a></li>
<li>Go was released <a href="https://en.wikipedia.org/wiki/Go_(programming_language)">in 2009; 9 years ago</a></li>
<li>Rust was released <a href="https://en.wikipedia.org/wiki/Rust_(programming_language)">in 2010; 8 years ago</a></li></ul>

<p>I am not saying that this disproves your statement – it even supports it! But
I do say that comparing based on features per year/release/whatever <em>must</em>
include a statement about how old these languages are, even if it is just for
showing the reader about what timeframe we are talking.</p>

<p>So, Rust is a relatively young language and yes, it has added a lot of
features and therefore can be compared to C++ much better than it can be to C.
But saying that a 10-year-old C programm might even compile today and
everything might be okay but not so much with Rust is just ignorant of the
fact that Rust is not even that old.
Having a Rust program that is one year old still compiles fine today (assuming
it didn&#39;t use a compiler bug) and does not “look old” at all!
Rust has a big infrastructure for doing regression tests and for being
compatible with older programs.</p>

<p>As you say, out of the way with the philosophical stuff and lets get down to
the facts.</p>

<p><strong>C is more portable.</strong>
But as mentioned before, C is almost six times as old as Rust. We&#39;ll get there!</p>

<p><strong>C has a spec.</strong> Yes, and I completely hear you on this one. Rust does not
(yet?) have a spec and it really is a pain-point. I want one, too! Maybe we&#39;ll
get there at some point.
By the way: Does Go have a spec? It
<a href="https://golang.org/ref/spec">seems like it</a>, but that rather looks like a
language definition and I doubt that this is what Drew meant when talking
about “a spec”, is it?</p>

<p><strong>C has many implementations.</strong> Yes and how much trouble has it been because
different compilers do different things on undefined behaviour?
Too many. This is where Rust tries to solve a problem: Get a language where
undefined behaviour is not allowed or at least as minimal as possible, then we
can have a spec for that language and then we can have different
implementations.
Time will tell whether we can get there.</p>

<p><strong>C has a consistent &amp; stable ABI.</strong> Point taken. I do not argue about that.</p>

<p><strong>Cargo is mandatory.</strong> Yes, another point taken. I again do not argue.</p>

<p><strong>Concurrency is generally a bad thing.</strong>
This statement gives me the impression that you did not yet try Rust,
actually. Like in a big (and possibly
multithreaded/concurrent/parallel/whateveryoucallit) environment.
You say that most software does not have to be parallel and I fully agree on
that – but <em>if</em> you need to be parallel, I&#39;d rather chose Rust over Go, C or
C++. Having the safety guarantees Rust gives me allows normal people (and not
Rockstar-programmers) to write software that can be massively parallel without
having to fear about deadlocks and other ugly things you get with other
languages.</p>

<p>It is still true that bad design decisions are possible and might result in
bad software – but that is true for every language, isn&#39;t it? And I&#39;d rather
like to have a bad program that gets the job done because it can be statically
verified that it does than a program that crashes because I ran into a bug
that was introduced by bad design decisions.</p>

<p>The next paragraph Drew writes makes me really, really sad. Fullquote:</p>

<blockquote><p>Safety. Yes, Rust is more safe. I don’t really care. In light of all of
these problems, I’ll take my segfaults and buffer overflows. I especially
refuse to “rewrite it in Rust” – because no matter what, rewriting an entire
program from scratch is always going to introduce more bugs than maintaining
the C program ever would. I don’t care what language you rewrite it in.</p></blockquote>

<p>This gives me the impression that Drew was hit with “Just rewrite it” too many
times. And I completely agree with you, Drew, that you should indeed <em>not</em>
rewrite it in Rust just for the sake. Nobody should <em>ever</em> rewrite <em>anything</em>
in <em>any</em> other language than what “it” currently is written in.
I hate these people that actually say things like that (if it isn&#39;t for
trolling, but I have the uneasy feeling that Drew was hit with real “Just
rewrite it”ers and not just trolling).</p>

<p>I do not say that the points Drew shows are false.</p>

<p>What I do say is that the initial assumption that Rust is there to replace C
or C++ is, in my opinion, false.
It is certainly meant to get things right that C++ got wrong – and it is
certainly there to replace the C++-Monster that we call Gecko, because Mozilla
is exactly trying to do that!
But it is not there to replace <em>all</em> C or C++ code ever written because of
some stupid “Hey we can do X better than your language” bullshit!</p>

<p>Also, the statement that Rust might end up as Kitchen-Sink like C++ and die
with feature-bloat is one that concerns me because I do not want Rust to end
up like C++. It certainly is not as complex as C++ and we (as in “the Rust
community”) have a lot of work to do to <em>not</em> end up with feature-creep – but
we are also certainly not there yet.
But I definitively see where this statement is coming from.</p>

<p>The title of this article is
“Rust is one of the best C replacements we currently have” – and I stand by
this. But I also think that it is false to say that anyone <em>has to</em> replace C
or that Rust is necessarily there to do so.</p>

<p>There are domains where you might want to rewrite C code, if you have the time
and resources. But I&#39;d rather advice against it[^3].
Improving existing code is always easier than a rewrite of a program and
rewriting software does not improve the value of the software or even make
customers more happy. Rewriting software is IMHO only legit in two cases:</p>
<ul><li>It makes you happy because you&#39;re doing it for fun</li>
<li>It makes your boss happy because he ordered you to do so (for whatever
reasons, may it be speed, resource usage, customer request or whatever)</li></ul>

<p>But just for the sake of it? Nah.</p>

<p>I see where Drews article comes from and I see why he thinks like he does. I
greatly value his opinion and thoughts, and that&#39;s why I took the time to
write this article.</p>

<p>I see that we (as in “the Rust community”) have a lot to
do to make more people happy. Not as in making them Rust programmers, because
that&#39;s not our goal, but as in showing them that we do <em>not</em> want everything
to be written in Rust and that it is just trolls that request a “rewrite in
Rust”.</p>

<p>We do value friendlyness and kindness – let me state explicitely that this
does <em>also</em> include other programming-language-communities (and all other
communities as well)!</p>

<p>Trolling does not help with that.</p>

<p>[^1]: Yes we have generic programming in Rust. I&#39;m not a professional regarding C++, so I cannot say whether they are comparable in this regard.
[^2]: Some might say that we have manual memory management in Rust as well. That might be true by definition, but not the way I meant it: In C++ we can allocate something on the heap and then forget it. We have to try really hard to do that in Rust, though!
[^3]: In fact I might get into the situation where I have to rewrite an application in my job, but I&#39;d rather rewrite it in the same language than switching languages just for the sake of it!</p>

<p>tags: <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a> <a href="https://beyermatthias.de/tag:c" class="hashtag"><span>#</span><span class="p-category">c</span></a> <a href="https://beyermatthias.de/tag:c" class="hashtag"><span>#</span><span class="p-category">c</span></a>++ <a href="https://beyermatthias.de/tag:cpp" class="hashtag"><span>#</span><span class="p-category">cpp</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/rust-is-one-of-the-best-c-replacements-we-currently-have</guid>
      <pubDate>Tue, 26 Mar 2019 16:40:00 +0100</pubDate>
    </item>
    <item>
      <title>How to improve your open source code (9) - Types</title>
      <link>https://beyermatthias.de/how-to-improve-your-open-source-code-9-types</link>
      <description>&lt;![CDATA[small&#xA;  This post was written during my trip through Iceland and published much&#xA;  later than it was written.&#xA;/small&#xA;&#xA;This is a really important topic in programming and I really hope to get&#xA;this article right. Not only for technical correctness, but also for&#xA;ease to understand, as explaining types is not that simple if one has&#xA;never heard of them.&#xA;&#xA;Let&#39;s give it a try...&#xA;&#xA;What are types&#xA;&#xA;Well, that&#39;s a question which is, in my opinion, not easy to answer. In&#xA;fact, I thought several days about this question before writing this&#xA;down, in hope it will become a sufficient answer. Hence, you might find&#xA;other answers which are easier to understand and maybe more correct as&#xA;mine, but I&#39;ll give it a try nonetheless.&#xA;&#xA;From what I think&#xA;&#xA;  Types are a combination of abilities and properties that are combined&#xA;  to express and limit a certain scope of a thing.&#xA;&#xA;For example, A type Car may have four wheels, two doors and a horn&#xA;(its properties) and can drive slow, drive fast and park (its&#xA;abilities). That is certainly not a real representation of a car (also&#xA;because only a car is a real representation of a car) but because of the&#xA;domain this is used in, it is sufficient in the scenario at hand.  The&#xA;type Car cannot be multiplied, but another type Number may have this&#xA;ability. Thus, the scope and abilities are also limited in a certain&#xA;way.&#xA;&#xA;I hope this description is a good one for you to understand.&#xA;&#xA;Now that we know what types are, we should also learn some other terms&#xA;around the subject of types. The first thing I want to talk about here&#xA;is &#34;strong typing&#34; and &#34;weak typing&#34;. The reason for this is: These&#xA;things do not exist. Yes, you&#39;ve read this correctly: There is no such&#xA;thing as &#34;strong typing&#34;. There is only stronger and weaker&#xA;typing. The Java programming language is not strongly typed, neither&#xA;is it weakly typed (but it is, of course badly typed... forgive me&#xA;that joke, pity java programmer).&#xA;&#xA;But what is a stronger typing? That is rather simple to explain,&#xA;actually. We discussed that types are limitations of things to be able&#xA;to only do some specific operations and such. These things are enforced&#xA;by the compiler or interpreter of the programming language, of course.&#xA;And stronger typing only says that the compiler has more information&#xA;(implicitly via the definition of the programming language) to enforce&#xA;these rules, the rules of &#34;the function A is defined for type T, so you&#xA;cannot call it on U&#34;. Of course there is more to that because of generic&#xA;typing and so on, but that&#39;s basically it.&#xA;&#xA;The next term is &#34;type inference&#34;. Type inference is nothing a&#xA;programmer experiences explicitely, because it happens implicitly. Type&#xA;inference is a feature of the compiler and interpreter of the language&#xA;to guess the type of a variable without the programmer stating the&#xA;actual type. It&#39;s nothing more to that actually.&#xA;&#xA;I mentioned the term &#34;generic types&#34; in one of the former paragraphs&#xA;already, so we should have a look there, too. Generic types, or shorter&#xA;Generics, are types which are partial, in a way. So for example, one&#xA;can define a Bag of things, whatever things is. This is often (at&#xA;least in typed languages - languages where types actually matter for the&#xA;compiler or interpreter) specified in the code via &#34;type parameters&#34;&#xA;(though this term differs from language to language).&#xA;&#xA;Why more types are better then few&#xA;&#xA;The more types you introduce in your programs (internally or even for&#xA;the public API), the more safety you get (speaking in the context of a&#xA;stronger typed programming language, but also if you do a lot of&#xA;runtime-type-checking in a weaker typed language).  That does not mean&#xA;that you should introduce a BlueCar, a BlackCar and a GreenCar as&#xA;types in your program, but rather a type Color and a type Car&#xA;whereas each Car has a Color - even if your domain is cars and not&#xA;colors.&#xA;&#xA;Maybe that example lacks a certain expressiveness, so consider this:&#xA;Your Car has wheels. You can set the number of wheels when&#xA;constructing the Car object. But instead of passing an integer here,&#xA;which would yield an API where one can pass 17 as valid number for the&#xA;number of wheels - or 1337 or possibly even -1. But if you introduce a&#xA;type which represents the number of wheels, you get some safety into the&#xA;construction of the Car object - safety checks in your code are not&#xA;necessary anymore and thus your code will be shorter, better focused on&#xA;what the actual problem is instead of fighting for valid values and of&#xA;course, the compiler or interpreter can do the work for you.&#xA;&#xA;Sounds nice, doesn&#39;t it? You can get this all with (almost) no cost&#xA;attached, you just have to write down some more types. If your&#xA;programming language contains feature like enumerations, you do not even&#xA;have to make validity checks anymore, as the compiler can execute them.&#xA;&#xA;Next&#xA;&#xA;In the next post we will focus on the coding environment.&#xA;&#xA;tags: #open-source #programming #software #tools #rust&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><small>
  This post was written during my trip through Iceland and published much
  later than it was written.
</small></p>

<p>This is a really important topic in programming and I really hope to get
this article right. Not only for technical correctness, but also for
ease to understand, as explaining types is not that simple if one has
never heard of them.</p>

<p>Let&#39;s give it a try...</p>

<h1 id="what-are-types" id="what-are-types">What are types</h1>

<p>Well, that&#39;s a question which is, in my opinion, not easy to answer. In
fact, I thought several days about this question before writing this
down, in hope it will become a sufficient answer. Hence, you might find
other answers which are easier to understand and maybe more correct as
mine, but I&#39;ll give it a try nonetheless.</p>

<p>From what I think</p>

<blockquote><p>Types are a combination of abilities and properties that are combined
to express and limit a certain scope of a thing.</p></blockquote>

<p>For example, A type <code>Car</code> may have four wheels, two doors and a horn
(its properties) and can drive slow, drive fast and park (its
abilities). That is certainly not a real representation of a car (also
because only a car is a real representation of a car) but because of the
domain this is used in, it is sufficient in the scenario at hand.  The
type <code>Car</code> cannot be multiplied, but another type <code>Number</code> may have this
ability. Thus, the scope and abilities are also limited in a certain
way.</p>

<p>I hope this description is a good one for you to understand.</p>

<p>Now that we know what types are, we should also learn some other terms
around the subject of types. The first thing I want to talk about here
is “strong typing” and “weak typing”. The reason for this is: These
things do not exist. Yes, you&#39;ve read this correctly: There is no such
thing as “strong typing”. There is only strong<strong>er</strong> and weak<strong>er</strong>
typing. The Java programming language is not <em>strongly typed</em>, neither
is it <em>weakly typed</em> (but it is, of course <em>badly typed</em>... forgive me
that joke, pity java programmer).</p>

<p>But what is a stronger typing? That is rather simple to explain,
actually. We discussed that types are limitations of things to be able
to only do some specific operations and such. These things are enforced
by the compiler or interpreter of the programming language, of course.
And stronger typing only says that the compiler has more information
(implicitly via the definition of the programming language) to enforce
these rules, the rules of “the function A is defined for type T, so you
cannot call it on U”. Of course there is more to that because of generic
typing and so on, but that&#39;s basically it.</p>

<p>The next term is “type inference”. Type inference is nothing a
programmer experiences explicitely, because it happens implicitly. Type
inference is a feature of the compiler and interpreter of the language
to <em>guess</em> the type of a variable without the programmer stating the
actual type. It&#39;s nothing more to that actually.</p>

<p>I mentioned the term “generic types” in one of the former paragraphs
already, so we should have a look there, too. Generic types, or shorter
<em>Generics</em>, are types which are partial, in a way. So for example, one
can define a <code>Bag</code> of <em>things</em>, whatever <em>things</em> is. This is often (at
least in typed languages – languages where types actually matter for the
compiler or interpreter) specified in the code via “type parameters”
(though this term differs from language to language).</p>

<h1 id="why-more-types-are-better-then-few" id="why-more-types-are-better-then-few">Why more types are better then few</h1>

<p>The more types you introduce in your programs (internally or even for
the public API), the more safety you get (speaking in the context of a
stronger typed programming language, but also if you do a lot of
runtime-type-checking in a weaker typed language).  That does not mean
that you should introduce a <code>BlueCar</code>, a <code>BlackCar</code> and a <code>GreenCar</code> as
types in your program, but rather a type <code>Color</code> and a type <code>Car</code>
whereas each <code>Car</code> has a <code>Color</code> – even if your domain is cars and not
colors.</p>

<p>Maybe that example lacks a certain expressiveness, so consider this:
Your <code>Car</code> has wheels. You can set the number of wheels when
constructing the <code>Car</code> object. But instead of passing an integer here,
which would yield an API where one can pass 17 as valid number for the
number of wheels – or 1337 or possibly even -1. But if you introduce a
type which represents the number of wheels, you get some safety into the
construction of the <code>Car</code> object – safety checks in your code are not
necessary anymore and thus your code will be shorter, better focused on
what the actual problem is instead of fighting for valid values and of
course, the compiler or interpreter can do the work for you.</p>

<p>Sounds nice, doesn&#39;t it? You can get this all with (almost) no cost
attached, you just have to write down some more types. If your
programming language contains feature like enumerations, you do not even
have to make validity checks anymore, as the compiler can execute them.</p>

<h1 id="next" id="next">Next</h1>

<p>In the next post we will focus on the coding environment.</p>

<p>tags: <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/how-to-improve-your-open-source-code-9-types</guid>
      <pubDate>Sun, 22 Apr 2018 16:39:30 +0200</pubDate>
    </item>
    <item>
      <title>How to improve your open source code (8) - Code verbosity</title>
      <link>https://beyermatthias.de/how-to-improve-your-open-source-code-8-code-verbosity</link>
      <description>&lt;![CDATA[small&#xA;  This post was written during my trip through Iceland and published much&#xA;  latern than it was written.&#xA;/small&#xA;&#xA;While we heavily focused on the code-surrounding things in the last&#xA;parts, we will return to focus on code-related things from here on.&#xA;&#xA;This article discusses code verbosity and how it can improve your open&#xA;source code and also your contributors experience a lot.&#xA;&#xA;What is code verbosity&#xA;&#xA;Code verbosity is mainly explicitness of code. For example, in Java you&#xA;have to be more explicit when declaring a variable than in (recent) C++&#xA;or even Ruby:&#xA;&#xA;String s = someFunctionCall(param); // Java&#xA;&#xA;auto s = someFunctionCall(param); // C++&#xA;&#xA;s = someFunctionCall param # Ruby&#xA;&#xA;So code verbosity is how explicit you have to state certain things&#xA;so that the compiler or interpreter understands your intention.&#xA;&#xA;Because we do not always tell the compiler or interpreter what we want&#xA;to do exactly and because we want to re-use functionality, we&#xA;introduced abstractions. So abstractions are a way to make code less&#xA;verbose, in some ways.&#xA;&#xA;How to make code less verbose&#xA;&#xA;Abstraction. It is as simple as this. You introduce abstraction to&#xA;minimize repetition which leads to less verbose code. Of course, you&#xA;cannot always make the code less verbose if the language does not allow&#xA;it: in the above example we used the auto keyword for specifying the&#xA;type in C++, which is nice, but not possible in Java. So in the borders&#xA;of your languages abilities, you can make code less verbose.&#xA;&#xA;If you do that right and the abstractions results in nice code, you&#xA;know that you&#39;ve done fine.&#xA;&#xA;How much is too much&#xA;&#xA;But there can also be too much abstraction which then yields unreadable&#xA;code. Not unreadable as in clustered with stuff but just too abstract to&#xA;grasp at first sight.&#xA;&#xA;Abstraction can get too much. So make sure you introduce sensible&#xA;abstractions, abstractions that can be combined nicely and of course one&#xA;can step around the abstractions and use the core functionality, the&#xA;not-abstracted things beneath.&#xA;&#xA;As a sidenote: sometimes it makes sense to hide certain things&#xA;completely or even introducing several layers of abstractions.&#xA;&#xA;Next&#xA;&#xA;This was a rather short one, I guess. The next article will be longer I&#xA;hope, as it will be about typing.&#xA;&#xA;tags: #open-source #programming #software #tools #rust&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><small>
  This post was written during my trip through Iceland and published much
  latern than it was written.
</small></p>

<p>While we heavily focused on the code-surrounding things in the last
parts, we will return to focus on code-related things from here on.</p>

<p>This article discusses code verbosity and how it can improve your open
source code and also your contributors experience a lot.</p>

<h1 id="what-is-code-verbosity" id="what-is-code-verbosity">What is code verbosity</h1>

<p>Code verbosity is mainly explicitness of code. For example, in Java you
have to be more explicit when declaring a variable than in (recent) C++
or even Ruby:</p>

<pre><code>String s = someFunctionCall(param); // Java

auto s = someFunctionCall(param); // C++

s = someFunctionCall param # Ruby
</code></pre>

<p>So code verbosity is how <em>explicit</em> you have to <em>state</em> certain things
so that the compiler or interpreter understands your intention.</p>

<p>Because we do not always tell the compiler or interpreter what we want
to do <em>exactly</em> and because we want to re-use functionality, we
introduced <em>abstractions</em>. So abstractions are a way to make code less
verbose, in some ways.</p>

<h1 id="how-to-make-code-less-verbose" id="how-to-make-code-less-verbose">How to make code less verbose</h1>

<p>Abstraction. It is as simple as this. You introduce abstraction to
minimize repetition which leads to less verbose code. Of course, you
cannot always make the code less verbose if the language does not allow
it: in the above example we used the <code>auto</code> keyword for specifying the
type in C++, which is nice, but not possible in Java. So in the borders
of your languages abilities, you can make code less verbose.</p>

<p>If you do that right and the abstractions results in nice code, you
know that you&#39;ve done fine.</p>

<h1 id="how-much-is-too-much" id="how-much-is-too-much">How much is too much</h1>

<p>But there can also be too much abstraction which then yields unreadable
code. Not unreadable as in clustered with stuff but just too abstract to
grasp at first sight.</p>

<p>Abstraction can get too much. So make sure you introduce sensible
abstractions, abstractions that can be combined nicely and of course one
can step around the abstractions and use the core functionality, the
not-abstracted things beneath.</p>

<p>As a sidenote: sometimes it makes sense to hide certain things
completely or even introducing several layers of abstractions.</p>

<h1 id="next" id="next">Next</h1>

<p>This was a rather short one, I guess. The next article will be longer I
hope, as it will be about typing.</p>

<p>tags: <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/how-to-improve-your-open-source-code-8-code-verbosity</guid>
      <pubDate>Wed, 04 Apr 2018 16:39:28 +0200</pubDate>
    </item>
    <item>
      <title>How to improve your open source code (7) - Contributor experience</title>
      <link>https://beyermatthias.de/how-to-improve-your-open-source-code-7-contributor-experience</link>
      <description>&lt;![CDATA[small&#xA;  This post was written during my trip through Iceland and published much&#xA;  latern than it was written.&#xA;/small&#xA;&#xA;This is the last post which does not deal with code directly, I promise.&#xA;&#xA;When it comes to open source hobby projects, contributions from others&#xA;are often happily taken. But making the contribution process smooth for&#xA;everyone does involve some precautions.&#xA;&#xA;In this article I want to summarize how to make a contribution to a&#xA;project as smooth as possible for all persons involved.&#xA;&#xA;Public code and contributions&#xA;&#xA;I wrote about this before and I want to shortly reiterate on it. &#34;Open&#34;&#xA;as in open source (or even better: open contributions) is not&#xA;black-white at all but there are several levels of grey in between, in my&#xA;opinion.&#xA;&#xA;The more open your code is, the better a contributor is able to&#xA;contribute. Whether it be discussion, requests, bug reports, bug fixes&#xA;or even feature implementation or general enhancement.  On the other&#xA;side, though, the more open your code is the less your contributors are&#xA;&#34;bound&#34; (in a mentally way) to your project. It can happen (and it&#xA;happened to me) that a contributor stops by for one pull request or&#xA;issue and then you&#39;ll never hear of them. The better the contribution&#xA;process is for them, the more likely they come back - and how relevant&#xA;the project is to them, of course.&#xA;&#xA;The contribution process in the rust community (for the Rust compiler&#xA;itself) is awesome, from what I&#39;ve heard. This, of course, enhances the&#xA;&#34;I will come back and give another issue a try&#34; a lot.&#xA;The&#xA;contribution process of the nixpkgs project is slightly worse (but still&#xA;rather good). Sometimes, nobody answers questions you might have for&#xA;your pull request for several days or even weeks.&#xA;This does not really make one eager to file another request.&#xA;&#xA;Platforms&#xA;&#xA;From what I think, github is the &#34;most open&#34; in the sense of&#xA;&#34;open contributions&#34;.&#xA;That&#39;s not only because of how github works, as other platforms&#xA;work equally well (gitlab, gitea, gogs, bitbucket) but also because&#xA;everyone is on github.&#xA;&#xA;If you want to close down contributions a bit, you could host your own&#xA;instances of gitea or gitlab - contributors can easily open an account&#xA;for their contribution, though that slight hurdle will make the &#34;casual&#xA;code dumper&#34; likely go away.&#xA;&#xA;Even &#34;more closed&#34; would be a email-patch-workflow, git supports (and&#xA;the kernel community uses successfully for years now). In this case, the&#xA;code is often made available via a web interface like cgit or&#xA;klaus.&#xA;&#xA;Readme&#xA;&#xA;A project should always contain a readme file in its root folder. The&#xA;readme file is often the first thing a contributor will look at, not&#xA;only but also because github renders and displays them.&#xA;&#xA;Therefore, keeping your readme file up to date and filled with current&#xA;information can be a good way to show your contributors (and users) what&#xA;is going on in the projects code base. It should contain a short&#xA;description what the project/code does and how it works (only from a&#xA;users view - implementation details or why you implemented this in&#xA;Haskell instead of JavaScript do not necessarily belong here). It should&#xA;contain a few examples how to use the code or, if it is a library, how&#xA;to call it. It also should contain build instructions (if necessary) or&#xA;a pointer to a &#34;BUILDING&#34; file if the build process is long or&#xA;complicated. At the end of the Readme file, a license statement (how the&#xA;project is licensed) should be pasted. Not the entire license, but only&#xA;a short note and a copyright note as well. It happens to be kind to do&#xA;so.&#xA;&#xA;Contributing File&#xA;&#xA;Often, projects contain a Contributing file where guidelines (or even&#xA;rules) are written down on how to contribute. It does not only contain&#xA;statements on how code is submitted but also how issues are filed or&#xA;requests should be made.&#xA;&#xA;I think it is extremely important to have such an file available,&#xA;especially if not hosting the code on a site like github, where it is&#xA;obvious that code is submitted through pull requests and issues are&#xA;submitted via the issue tracker.&#xA;&#xA;The length of such an file should respect the size of the project&#xA;itself. If the project contains 10KLOC, one should be able to read the&#xA;contribution file in less than two minutes, preferably in less than one&#xA;minute. It should state not only how code should be submitted, but also&#xA;whether it should conform to some style guide (which itself can be&#xA;outsourced to yet another file), how to behave in&#xA;the community, how to write bug reports and also how to file issues&#xA;(what information must be included).&#xA;&#xA;Issue handling&#xA;&#xA;Handling issues is clearly a way to improve the contributors experience.&#xA;As soon as a contributor files an issue, she or he should be greeted&#xA;and thanked for the issue. Take it this way: Someone just invested time&#xA;to look at your project and cared enough to have a question, try it out&#xA;or even found a bug. This is truly a cool thing and therefore they&#xA;should be thanked for this, as soon as you have the time to do so. The&#xA;Rust community even automated this, but I don&#39;t think this would be&#xA;necessary for a small or medium sized project/community.&#xA;&#xA;So be nice to every one. Nothing is worse than a maintainer that babbles&#xA;about bad things or insults the contributor because of his or her ideas&#xA;or ways an issue was proposed to be resolved. Don&#39;t ever do this. I&#39;ve&#xA;seen issues where the maintainer of the project started rambling about&#xA;how bad things were (not the project itself but rather its dependencies&#xA;or even things that had nothing to do with the project itself). I&#xA;cannot believe that such projects will last long, let alone survive at&#xA;all. These projects will die.&#xA;&#xA;Also, your ramblings have nothing to do with the issue at hand and even&#xA;if they do: be kind and humble will most likely be better in every way,&#xA;right?&#xA;&#xA;Next&#xA;&#xA;In the next part we will finally go back and actually talk code.&#xA;&#xA;What I want to discuss in the next article of this series is code&#xA;verbosity. I want to make sure how DRY a code actually needs to be and&#xA;how much abstraction is enough for the sake of understandability and&#xA;cleanness of code.&#xA;&#xA;tags: #open-source #programming #software #tools #rust&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><small>
  This post was written during my trip through Iceland and published much
  latern than it was written.
</small></p>

<p>This is the last post which does not deal with code directly, I promise.</p>

<p>When it comes to open source hobby projects, contributions from others
are often happily taken. But making the contribution process smooth for
everyone does involve some precautions.</p>

<p>In this article I want to summarize how to make a contribution to a
project as smooth as possible for all persons involved.</p>

<h1 id="public-code-and-contributions" id="public-code-and-contributions">Public code and contributions</h1>

<p>I wrote about this before and I want to shortly reiterate on it. “Open”
as in open source (or even better: open contributions) is not
black-white at all but there are several levels of grey in between, in my
opinion.</p>

<p>The more open your code is, the better a contributor is able to
contribute. Whether it be discussion, requests, bug reports, bug fixes
or even feature implementation or general enhancement.  On the other
side, though, the more open your code is the less your contributors are
“bound” (in a mentally way) to your project. It can happen (and it
happened to me) that a contributor stops by for one pull request or
issue and then you&#39;ll never hear of them. The better the contribution
process is for them, the more likely they come back – and how relevant
the project is to them, of course.</p>

<p>The contribution process in the rust community (for the Rust compiler
itself) is awesome, from what I&#39;ve heard. This, of course, enhances the
“I will come back and give another issue a try” a lot.
The
contribution process of the nixpkgs project is slightly worse (but still
rather good). Sometimes, nobody answers questions you might have for
your pull request for several days or even weeks.
This does not really make one eager to file another request.</p>

<h1 id="platforms" id="platforms">Platforms</h1>

<p>From what I think, github is the “most open” in the sense of
“open contributions”.
That&#39;s not only because of how github works, as other platforms
work equally well (gitlab, gitea, gogs, bitbucket) but also because
<em>everyone is on github</em>.</p>

<p>If you want to close down contributions a bit, you could host your own
instances of gitea or gitlab – contributors can easily open an account
for their contribution, though that slight hurdle will make the “casual
code dumper” likely go away.</p>

<p>Even “more closed” would be a email-patch-workflow, git supports (and
the kernel community uses successfully for years now). In this case, the
code is often made available via a web interface like cgit or
<a href="https://github.com/jonashaag/klaus">klaus</a>.</p>

<h1 id="readme" id="readme">Readme</h1>

<p>A project should always contain a readme file in its root folder. The
readme file is often the first thing a contributor will look at, not
only but also because github renders and displays them.</p>

<p>Therefore, keeping your readme file up to date and filled with current
information can be a good way to show your contributors (and users) what
is going on in the projects code base. It should contain a short
description what the project/code does and how it works (only from a
users view – implementation details or why you implemented this in
Haskell instead of JavaScript do not necessarily belong here). It should
contain a few examples how to use the code or, if it is a library, how
to call it. It also should contain build instructions (if necessary) or
a pointer to a “BUILDING” file if the build process is long or
complicated. At the end of the Readme file, a license statement (how the
project is licensed) should be pasted. Not the entire license, but only
a short note and a copyright note as well. It happens to be kind to do
so.</p>

<h1 id="contributing-file" id="contributing-file">Contributing File</h1>

<p>Often, projects contain a <code>Contributing</code> file where guidelines (or even
rules) are written down on how to contribute. It does not only contain
statements on how code is submitted but also how issues are filed or
requests should be made.</p>

<p>I think it is extremely important to have such an file available,
<em>especially</em> if not hosting the code on a site like github, where it is
obvious that code is submitted through pull requests and issues are
submitted via the issue tracker.</p>

<p>The length of such an file should respect the size of the project
itself. If the project contains 10KLOC, one should be able to read the
contribution file in less than two minutes, preferably in less than one
minute. It should state not only how code should be submitted, but also
whether it should conform to some style guide (which itself can be
outsourced to yet another file), how to behave in
the community, how to write bug reports and also how to file issues
(what information must be included).</p>

<h1 id="issue-handling" id="issue-handling">Issue handling</h1>

<p>Handling issues is clearly a way to improve the contributors experience.
As soon as a contributor files an issue, she or he should be greeted
and thanked for the issue. Take it this way: Someone just invested time
to look at your project and cared enough to have a question, try it out
or even found a bug. This is truly a cool thing and therefore they
should be thanked for this, as soon as you have the time to do so. The
Rust community even automated this, but I don&#39;t think this would be
necessary for a small or medium sized project/community.</p>

<p>So be nice to every one. Nothing is worse than a maintainer that babbles
about bad things or insults the contributor because of his or her ideas
or ways an issue was proposed to be resolved. Don&#39;t ever do this. I&#39;ve
seen issues where the maintainer of the project started rambling about
how bad things were (not the project itself but rather its dependencies
or <em>even things that had nothing to do with the project itself</em>). I
cannot believe that such projects will last long, let alone survive at
all. These projects will die.</p>

<p>Also, your ramblings have nothing to do with the issue at hand and even
if they do: be kind and humble will most likely be better in every way,
right?</p>

<h1 id="next" id="next">Next</h1>

<p>In the next part we will finally go back and actually talk code.</p>

<p>What I want to discuss in the next article of this series is <em>code
verbosity</em>. I want to make sure how DRY a code actually needs to be and
how much abstraction is enough for the sake of understandability and
cleanness of code.</p>

<p>tags: <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/how-to-improve-your-open-source-code-7-contributor-experience</guid>
      <pubDate>Tue, 20 Mar 2018 16:39:16 +0100</pubDate>
    </item>
    <item>
      <title>How to improve your open source code (6) - Version control</title>
      <link>https://beyermatthias.de/how-to-improve-your-open-source-code-6-version-control</link>
      <description>&lt;![CDATA[small&#xA;  This post was written during my trip through Iceland and published much&#xA;  later than it was written.&#xA;/small&#xA;&#xA;Version Control is one important aspect when developing software as a&#xA;whole, and especially when developing open source software.&#xA;&#xA;Here are some thoughts about it.&#xA;&#xA;Technology&#xA;&#xA;First of all, technology wise it doesn&#39;t matter which version control&#xA;system one uses. For the sake I&#39;m using git here as an example VCS,&#xA;though others might do as well.&#xA;&#xA;One important thing, at least in my opinion, is that the VCS has some&#xA;basic functionality. This is mainly that it can be used distributed and&#xA;has a branching functionality (which are two things I like to believe&#xA;go hand in hand).&#xA;&#xA;So I do not care whether one uses git, mecurial, or anything else. Most&#xA;important is that a (D)VCS is actually used.&#xA;&#xA;Branching model&#xA;&#xA;Branching is a method that came up before git was created, as bitkeeper&#xA;had such functionality (as far as I can tell) before Linus Torvalds&#xA;wrote git. It is only that git has revolutionised the way we do version&#xA;control and brought branching to wider knowledge and use.&#xA;&#xA;In my opinion it is really important how branching is done. There is not&#xA;simply &#34;the branching&#34; but there are many ways to do branching and one&#xA;might be better for certain use case than another. There are known&#xA;models such as feature branching, the gitflow branching model and a&#xA;rebase-merge workflow. I don&#39;t want to explain each of them because&#xA;others have done so way better than I ever could.&#xA;&#xA;What I want to tell is that branching is not only important, but as&#xA;flexible as you might not even guess. This is not necessarily a good&#xA;thing - I&#39;ll show you in a minute. In my opinion, branching and&#xA;developing a branching model for a project is like developing an API.&#xA;Once it is set up properly, it may serve as a communication rule for a&#xA;project, putting developers on the same page about how certain things&#xA;have to be handled. Having a protocol on how to work on things is a good&#xA;thing. If implemented properly, branching can improve the work of&#xA;everyone as it is one point less to think about.&#xA;&#xA;The bad thing about flexibility of branching functionality is that it&#xA;can be done wrong. It&#39;s as simply as that, but merging one branch into&#xA;another when one is not supposed to do that, creates overhead which&#xA;might not be reversible. This has happened to the best communities (for&#xA;example the kernel community) but also happens in small communities,&#xA;often due to too few knowledge of the tools at hand.&#xA;&#xA;To summarize: If an open source project gets to a certain size (both&#xA;code-wise and contributor/community-wise) a branching model should be&#xA;implemented. If there are rules that contributors agree upon, it can&#xA;improve working speed and therefore overall happiness in the community.&#xA;Because developers like to bikeshed, it could also worsen happiness, of&#xA;course. Though, it is better than no plan and chaos instead.&#xA;&#xA;Hosting&#xA;&#xA;I will not go into thoughts about hosting platforms in this article but&#xA;rather on the how and why.&#xA;&#xA;First of all, hosting the code somewhere with a way to show it in a web&#xA;browser is a good way to improve the &#34;open&#34; part of open source code. Of&#xA;course, tarball downloads and such suffice, but we are in the 21st&#xA;century, so having a nice web interface is something one can expect.&#xA;&#xA;Making the code browsable is often done via a VCS-specific web frontend,&#xA;for example cgit for code version controlled with git. Therefore this&#xA;web interfaces often also feature functionality to go back in time&#xA;and view the history of one file. Maybe this is not needed&#xA;often, but nevertheless helpful if needed.&#xA;&#xA;I personally do not care about comments on code in my web interfaces&#xA;or even ways to register users on the site, but of course some people like&#xA;that. There are web interfaces that feature such things, for example for&#xA;the git VCS there is gitea, gogs, gitlab, ... and many more. And of&#xA;course there are the closed providers github, bitbucket and others...&#xA;&#xA;Making code public and contributions easy&#xA;&#xA;Hosting helps a lot with enabling contributions from strangers. No&#xA;doubt, github makes contributions ridiculously easy.&#xA;&#xA;I don&#39;t want to reiterate what others have said better and most people&#xA;already know. What I want to point out here is that open source does not&#xA;mean &#34;open contributions&#34;. One is completely free to reject all&#xA;contributions one ones code base.&#xA;&#xA;I really want to stress this. Open source does indeed mean that everyone&#xA;is able to view the code, which also enables them to copy it (though&#xA;redistribution might be limited or forbidden, as only free software&#xA;allows you - by definition - to redistribute and alter code) but not&#xA;necessarily that one is allowed or welcome to send in changes, feature&#xA;requests or the like.&#xA;&#xA;So if you want people to contribute to your code and suggest changes,&#xA;features or report bugs, you should somehow give them the opportunity to&#xA;do so. Depending on how &#34;open&#34; you want to be with your development you&#xA;either should use a hosting platform (like github or bitbucket) or a&#xA;slightly more &#34;closed&#34; variant, for example hosting your code on&#xA;your own gitea instance. One step further you&#39;d host your code on a&#xA;site where people might be able to get it, maybe even with a &#34;git&#xA;clone&#34;, though not send in pull requests, feature requests or open&#xA;issues (for example a hosted git repository with cgit interface).&#xA;Issues and bug reports could still be done via a mailinglist, if&#xA;desired.&#xA;&#xA;In fact, that last bit is what I consider for my own project&#xA;imag.&#xA;&#xA;SemVer, Change Management, Release Management&#xA;&#xA;As soon as your code is out there, you have to think about change and&#xA;release management. In my opinion, these are topics closely related to&#xA;source code version control as VCS often offer functionality to do&#xA;releases in one form or another and are clearly involved in the process&#xA;of change management.&#xA;&#xA;First of all, I&#39;d like to suggest you read the SemVer specification. It&#xA;is not that long but will help you understanding the next few&#xA;paragraphs. So if you haven&#39;t read it already, go ahead and do so. Even&#xA;if you don&#39;t apply SemVer to your projects it might open your eyes in&#xA;one aspect or another.&#xA;&#xA;But before we get into releases, we should first talk about change&#xA;management, or better named for my points: Pull request management.&#xA;&#xA;What I personally do with my PRs is, merge them when they&#39;re ready. This&#xA;approach is easy and works, so far, pretty well. From time to time I&#xA;have changes in my working branches (as stated before, I use feature&#xA;branches) which might conflict with other peoples work. For the sake of&#xA;contributor experience, I pause my PRs and wait until they are done with&#xA;theirs. We will talk a lot about this in the next episode of this&#xA;series, so I won&#39;t go into much detail. For now: This is a simple&#xA;approach that works perfectly well so far for me and my (considerably&#xA;small) open source projects.&#xA;&#xA;But as soon as ones project grews bigger, that approach might not do the&#xA;job anymore. If there are too many changes in a short amount of time&#xA;which have to be agreed on and that have to be merged, it might be time&#xA;to think about an alternative approach.&#xA;&#xA;There are two ways I would tackle this problem. I never experienced it in&#xA;the &#34;real world&#34;/in my projects, so the following is just a write down&#xA;of my thoughts. Take a grain of salt from here on.&#xA;&#xA;The first approach I can think of is to assign certain subsystems to&#xA;certain people. If the amount of changes has become too big, one could&#xA;assume that the codebase has also become tremendous. If that is the&#xA;case, sub-maintainers can handle certain subsystems and the project&#xA;leader can then periodically merge all changes together. This requires,&#xA;of course, at least two people that are interested into the subject and&#xA;willing to contribute maintaining efforts to the project.&#xA;&#xA;If the latter is not the case or there are too few people around for&#xA;this, one could consider a merge-window style approach, like known from&#xA;Linus himself. Changes are pulled in every other week, for example, and&#xA;the rest of the time, only bug fixes are merged into the project.&#xA;&#xA;These two approaches might become handy some day if one is about to&#xA;maintain a large code base alone (as in &#34;as the only project owner&#34;).&#xA;&#xA;Now on to release management. In my opinion, releases should be done as&#xA;soon as something works and from there on periodically. I myself made&#xA;one mistake too often: Pull more things into one release than would have&#xA;been good. For example the imag 0.2.0 release was over one year ago.&#xA;0.3.0 is almost ready, but not yet. I should&#39;ve done more releases in&#xA;between.&#xA;&#xA;In my opinion, more releases with clear-cut edges are better than long&#xA;release-cycles. As soon as there is a new feature for users - release.&#xA;User-facing fixed - release. This might result in high numbers for&#xA;versioning, but who cares?&#xA;&#xA;This is where I want to throw SemVer in, to adjust my statement from the&#xA;last paragraph with a &#34;but&#34;.&#xA;&#xA;SemVer can be used to notify breaking user interfaces. This is a really&#xA;good thing and therefore I think SemVer should be applied everywhere.&#xA;SemVer also states that in the &#34; 0.y.z phase&#34; everything is allowed to&#xA;happen, also API breakage. This is where I want to adjust my statement&#xA;from above. A lot of releases should be done in the 0.y.z phase, but&#xA;also within that scope. As soon as a library or program hits the 1.0.0,&#xA;changes should be applied carefully. One really does not want to end up&#xA;with a program or library in version 127.0.0, right? That&#39;d also&#xA;decrease a users trust into the application as one can expect breakage&#xA;with every new release.&#xA;&#xA;So what I&#39;d do and actually plan doing with my projects is releasing a&#xA;number of zero-releases until I am confident that everything is all&#xA;right and then go from there. For imag specifically I am not thinking&#xA;about 1.0.0 because imag is far from ready, but for my other projects,&#xA;especially toml-query, I think of 1.0.0 already.&#xA;&#xA;Another point which popped into my head weeks after the initial draft of&#xA;this article was: Do not plan the features of the next release with a&#xA;release number! This might sound a bit odd, so let me explain. For&#xA;example, you&#39;re planning three major features for the next release,&#xA;which will be 0.15.0 then. And you&#39;re slowly getting to a point where&#xA;the release becomes ready, you might need three more weeks to get it&#xA;ready. Now, a contributor steps up and opens a pull request with&#xA;another feature, which is already completely implemented, tested and&#xA;also documented in the pull request. The contributor needs this feature&#xA;as soon as possible in your code and you also think that it might be a&#xA;great idea to release this as soon as possible. After you merged the&#xA;request, you release the source - as 0.15.0, despite your three features&#xA;are not yet completed.&#xA;&#xA;Two things come to mind in this scenario: First, if two of your three&#xA;features are already completed, they might show up in 0.15.0 but one&#xA;feature has to be moved to the next release. If these two features are&#xA;ready, but not tested, you might end up with a buggy&#xA;release and have to release 0.15.1 soonish - more effort for you. If you&#xA;do not merge your features into the master branch of your project, but&#xA;you have a 0.15.0-prepare branch or something like that, you end up with&#xA;a rather ugly merge-mess later on, as 0.15.0 is already released and you&#xA;cannot just rename a public branch.&#xA;&#xA;So how to handle this properly? I came to the conclusion that&#xA;release-branches is the way to go here. In the scenario described above,&#xA;you&#39;d branch off of the release before, most certainly 0.14.x and create&#xA;a new branch 0.15.0, where the pull request of the contributor would be&#xA;merged than. As soon as the release is out, 0.15.0 will be tagged and&#xA;merged back to the master branch.&#xA;&#xA;What my point is here: you&#39;d still need to rename your next milestone or&#xA;rewrite your issues for the next release. That&#39;s why I would not plan&#xA;&#34;0.15.0&#34;, but simply &#34;the next release&#34; - because you&#39;ll never know&#xA;whether your planned things will actually be the next release or the&#xA;the release after. So lessen the effort for yourself here!&#xA;&#xA;Next&#xA;&#xA;In the next article in this series I want to elaborate on how to make a&#xA;contribution as pleasing as possible for the contributor. I guess I can&#xA;talk a lot about that because I&#39;ve contributed to a lot of projects&#xA;already, including but not limited to linux,&#xA;nixpkgs and&#xA;nanoc.&#xA;&#xA;tags: #open-source #programming #software #tools #rust&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><small>
  This post was written during my trip through Iceland and published much
  later than it was written.
</small></p>

<p>Version Control is one important aspect when developing software as a
whole, and especially when developing open source software.</p>

<p>Here are some thoughts about it.</p>

<h1 id="technology" id="technology">Technology</h1>

<p>First of all, technology wise it doesn&#39;t matter which version control
system one uses. For the sake I&#39;m using git here as an example VCS,
though others might do as well.</p>

<p>One important thing, at least in my opinion, is that the VCS has some
basic functionality. This is mainly that it can be used distributed and
has a branching functionality (which are two things I like to believe
go hand in hand).</p>

<p>So I do not care whether one uses git, mecurial, or anything else. Most
important is that a (D)VCS is actually used.</p>

<h1 id="branching-model" id="branching-model">Branching model</h1>

<p>Branching is a method that came up before git was created, as bitkeeper
had such functionality (as far as I can tell) before Linus Torvalds
wrote git. It is only that git has revolutionised the way we do version
control and brought branching to wider knowledge and use.</p>

<p>In my opinion it is really important how branching is done. There is not
simply “the branching” but there are many ways to do branching and one
might be better for certain use case than another. There are known
models such as feature branching, the gitflow branching model and a
rebase-merge workflow. I don&#39;t want to explain each of them because
others have done so way better than I ever could.</p>

<p>What I want to tell is that branching is not only important, but as
flexible as you might not even guess. This is not necessarily a good
thing – I&#39;ll show you in a minute. In my opinion, branching and
developing a branching model for a project is like developing an API.
Once it is set up properly, it may serve as a communication rule for a
project, putting developers on the same page about how certain things
have to be handled. Having a protocol on how to work on things is a good
thing. If implemented properly, branching can improve the work of
everyone as it is one point less to think about.</p>

<p>The bad thing about flexibility of branching functionality is that it
can be done wrong. It&#39;s as simply as that, but merging one branch into
another when one is not supposed to do that, creates overhead which
might not be reversible. This has happened to the best communities (for
example the kernel community) but also happens in small communities,
often due to too few knowledge of the tools at hand.</p>

<p>To summarize: If an open source project gets to a certain size (both
code-wise and contributor/community-wise) a branching model should be
implemented. If there are rules that contributors agree upon, it can
improve working speed and therefore overall happiness in the community.
Because developers like to bikeshed, it could also worsen happiness, of
course. Though, it is better than no plan and chaos instead.</p>

<h1 id="hosting" id="hosting">Hosting</h1>

<p>I will not go into thoughts about hosting platforms in this article but
rather on the how and why.</p>

<p>First of all, hosting the code somewhere with a way to show it in a web
browser is a good way to improve the “open” part of open source code. Of
course, tarball downloads and such suffice, but we are in the 21st
century, so having a nice web interface is something one can expect.</p>

<p>Making the code browsable is often done via a VCS-specific web frontend,
for example cgit for code version controlled with git. Therefore this
web interfaces often also feature functionality to go back in time
and view the history of one file. Maybe this is not needed
often, but nevertheless helpful if needed.</p>

<p>I personally do not care about comments on code in my web interfaces
or even ways to register users on the site, but of course some people like
that. There are web interfaces that feature such things, for example for
the git VCS there is gitea, gogs, gitlab, ... and many more. And of
course there are the closed providers github, bitbucket and others...</p>

<h1 id="making-code-public-and-contributions-easy" id="making-code-public-and-contributions-easy">Making code public and contributions easy</h1>

<p>Hosting helps a lot with enabling contributions from strangers. No
doubt, github makes contributions ridiculously easy.</p>

<p>I don&#39;t want to reiterate what others have said better and most people
already know. What I want to point out here is that open source does not
mean “open contributions”. One is completely free to reject all
contributions one ones code base.</p>

<p>I really want to stress this. Open source does indeed mean that everyone
is able to view the code, which also enables them to copy it (though
redistribution might be limited or forbidden, as only free software
allows you – by definition – to redistribute and alter code) but not
necessarily that one is allowed or welcome to send in changes, feature
requests or the like.</p>

<p>So if you want people to contribute to your code and suggest changes,
features or report bugs, you should somehow give them the opportunity to
do so. Depending on how “open” you want to be with your development you
either should use a hosting platform (like github or bitbucket) or a
slightly more “closed” variant, for example hosting your code on
your own gitea instance. One step further you&#39;d host your code on a
site where people might be able to get it, maybe even with a “git
clone”, though not send in pull requests, feature requests or open
issues (for example a hosted git repository with cgit interface).
Issues and bug reports could still be done via a mailinglist, if
desired.</p>

<p>In fact, that last bit is what I consider for my own project
<a href="https://imag-pim.org">imag</a>.</p>

<h1 id="semver-change-management-release-management" id="semver-change-management-release-management">SemVer, Change Management, Release Management</h1>

<p>As soon as your code is out there, you have to think about change and
release management. In my opinion, these are topics closely related to
source code version control as VCS often offer functionality to do
releases in one form or another and are clearly involved in the process
of change management.</p>

<p>First of all, I&#39;d like to suggest you read the SemVer specification. It
is not that long but will help you understanding the next few
paragraphs. So if you haven&#39;t read it already, go ahead and do so. Even
if you don&#39;t apply SemVer to your projects it might open your eyes in
one aspect or another.</p>

<p>But before we get into releases, we should first talk about change
management, or better named for my points: Pull request management.</p>

<p>What I personally do with my PRs is, merge them when they&#39;re ready. This
approach is easy and works, so far, pretty well. From time to time I
have changes in my working branches (as stated before, I use feature
branches) which might conflict with other peoples work. For the sake of
contributor experience, I pause my PRs and wait until they are done with
theirs. We will talk a lot about this in the next episode of this
series, so I won&#39;t go into much detail. For now: This is a simple
approach that works perfectly well so far for me and my (considerably
small) open source projects.</p>

<p>But as soon as ones project grews bigger, that approach might not do the
job anymore. If there are too many changes in a short amount of time
which have to be agreed on and that have to be merged, it might be time
to think about an alternative approach.</p>

<p>There are two ways I would tackle this problem. I never experienced it in
the “real world”/in my projects, so the following is just a write down
of my thoughts. Take a grain of salt from here on.</p>

<p>The first approach I can think of is to assign certain subsystems to
certain people. If the amount of changes has become too big, one could
assume that the codebase has also become tremendous. If that is the
case, sub-maintainers can handle certain subsystems and the project
leader can then periodically merge all changes together. This requires,
of course, at least two people that are interested into the subject and
willing to contribute maintaining efforts to the project.</p>

<p>If the latter is not the case or there are too few people around for
this, one could consider a merge-window style approach, like known from
Linus himself. Changes are pulled in every other week, for example, and
the rest of the time, only bug fixes are merged into the project.</p>

<p>These two approaches might become handy some day if one is about to
maintain a large code base alone (as in “as the only project owner”).</p>

<p>Now on to release management. In my opinion, releases should be done as
soon as something works and from there on periodically. I myself made
one mistake too often: Pull more things into one release than would have
been good. For example the imag 0.2.0 release was over one year ago.
0.3.0 is almost ready, but not yet. I should&#39;ve done more releases in
between.</p>

<p>In my opinion, more releases with clear-cut edges are better than long
release-cycles. As soon as there is a new feature for users – release.
User-facing fixed – release. This might result in high numbers for
versioning, but who cares?</p>

<p>This is where I want to throw SemVer in, to adjust my statement from the
last paragraph with a “but”.</p>

<p>SemVer can be used to notify breaking user interfaces. This is a really
good thing and therefore I think SemVer should be applied everywhere.
SemVer also states that in the “ 0.y.z phase” everything is allowed to
happen, also API breakage. This is where I want to adjust my statement
from above. A lot of releases should be done in the 0.y.z phase, but
also within that scope. As soon as a library or program hits the 1.0.0,
changes should be applied carefully. One really does not want to end up
with a program or library in version 127.0.0, right? That&#39;d also
decrease a users trust into the application as one can expect breakage
with every new release.</p>

<p>So what I&#39;d do and actually plan doing with my projects is releasing a
number of zero-releases until I am confident that everything is all
right and then go from there. For imag specifically I am not thinking
about 1.0.0 because imag is far from ready, but for my other projects,
especially toml-query, I think of 1.0.0 already.</p>

<p>Another point which popped into my head weeks after the initial draft of
this article was: Do not plan the features of the next release with a
release number! This might sound a bit odd, so let me explain. For
example, you&#39;re planning three major features for the next release,
which will be 0.15.0 then. And you&#39;re slowly getting to a point where
the release becomes ready, you might need three more weeks to get it
ready. Now, a contributor steps up and opens a pull request with
<em>another</em> feature, which is already completely implemented, tested and
also documented in the pull request. The contributor needs this feature
as soon as possible in your code and you also think that it might be a
great idea to release this as soon as possible. After you merged the
request, you release the source – as 0.15.0, despite your three features
are not yet completed.</p>

<p>Two things come to mind in this scenario: First, if two of your three
features are already completed, they might show up in 0.15.0 but one
feature has to be moved to the next release. If these two features are
ready, but not tested, you might end up with a buggy
release and have to release 0.15.1 soonish – more effort for you. If you
do not merge your features into the master branch of your project, but
you have a 0.15.0-prepare branch or something like that, you end up with
a rather ugly merge-mess later on, as 0.15.0 is already released and you
cannot just rename a public branch.</p>

<p>So how to handle this properly? I came to the conclusion that
release-branches is the way to go here. In the scenario described above,
you&#39;d branch off of the release before, most certainly 0.14.x and create
a new branch 0.15.0, where the pull request of the contributor would be
merged than. As soon as the release is out, 0.15.0 will be tagged and
merged back to the master branch.</p>

<p>What my point is here: you&#39;d still need to rename your next milestone or
rewrite your issues for the next release. That&#39;s why I would not plan
“0.15.0”, but simply “the next release” – because you&#39;ll never know
whether your planned things will actually be the <em>next</em> release or the
<em>the release after</em>. So lessen the effort for yourself here!</p>

<h1 id="next" id="next">Next</h1>

<p>In the next article in this series I want to elaborate on how to make a
contribution as pleasing as possible for the contributor. I guess I can
talk a lot about that because I&#39;ve contributed to a lot of projects
already, including but not limited to <a href="https://kernel.org">linux</a>,
<a href="https://github.com/nixos/nixpkgs">nixpkgs</a> and
<a href="https://nanoc.ws">nanoc</a>.</p>

<p>tags: <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/how-to-improve-your-open-source-code-6-version-control</guid>
      <pubDate>Sat, 03 Feb 2018 16:38:57 +0100</pubDate>
    </item>
    <item>
      <title>2017 in Rust</title>
      <link>https://beyermatthias.de/2017-in-rust</link>
      <description>&lt;![CDATA[Inspired by the&#xA;Call for Community Blogposts&#xA;I want to summarize my experiences and thoughts on Rust in 2017 and what I am&#xA;excited about for 2018.&#xA;&#xA;!-- more --&#xA;&#xA;Reflecting 2017&#xA;&#xA;2017 was an amazing year for Rust.&#xA;We got 8 releases of rust itself! We got basic procedural macros allowing custom&#xA;derive (also known as &#34;macros 1.1&#34;) in the first release last year (1.15.0).&#xA;This made serde 1.0 possible, if I&#39;m not mistaken?&#xA;We got 103 stabilized APIs in 2017. This is incredible!&#xA;The improvements of compiletime and also the tooling got so much better. I&#xA;mean, it was awesome before. But now it is even better!&#xA;&#xA;On a personal side I got a lot better at programming Rust. I wrote about 37800&#xA;lines of rust code in my main project imag and 17380&#xA;lines in other crates (authored and contributed, according to a bit git-fooing&#xA;around). Is that a lot? I don&#39;t know.&#xA;&#xA;Hopes for 2018&#xA;&#xA;Now lets talk about 2018. This year will be amazing, I am sure.&#xA;&#xA;Language features&#xA;&#xA;I am really excited about the &#34;impl trait&#34; thing. Beeing able to return an&#xA;trait from a function will reduce the imag codebase so much, for example. We&#xA;no longer need to define our own iterator helper types but can simply return&#xA;IteratorItem = Whatever!&#xA;&#xA;I have no other hopes for the language itself, because what we have right now&#xA;is really amazing and I honestly cannot think of ways it could be improved.&#xA;&#xA;Ecosystem needs / Tooling enhancements&#xA;&#xA;I&#39;m still a bit concerned about cargo functionality for building workspace&#xA;projects. From what I see, building two different crates in one workspace&#xA;which share dependencies rebuilds the dependencies. This is not as intended,&#xA;I guess, but that&#39;s what I see. I did not dive deep into this, so I might be&#xA;wrong, though.&#xA;&#xA;What I am thinking about for several weeks now is a cargo/rust tool for&#xA;calculating code metrics. I think of things like documentation/code ratio,&#xA;average function length, simple things... but also about cohesion and coupling&#xA;metrics and other inter-module/inter-crate metrics.&#xA;&#xA;Also, I tried to set up the rust language server for vim on my workstation and&#xA;failed hard. I guess this is a packaging problem with my distro (NixOS),&#xA;though. Either way, installing the rls with a stable toolchain would be nice!&#xA;&#xA;Crates I am still missing / should be improved&#xA;&#xA;There are some crates I would love to have which do not exist yet.&#xA;&#xA;A (high level) email crate. There is the email crate, but it is mainly&#xA;  unstable and does not even have a 0.1.0 yet. There&#39;s also lettre_email,&#xA;  which is in 0.7.0, but it doesn&#39;t support parsing of emails.&#xA;I really hope rust-vobject (which is one of the crates I contributed to in&#xA;  2017) will improve even more and be the defacto-standard crate for handling&#xA;  vcard and icalendar data.&#xA;I follow the development of Cursive and&#xA;  from what I see it is awesome. I really hope people start writing high-level&#xA;  objects for cursive (like a file explorer, a form builder, a text editor&#xA;  like thing, a tab helper and so on) so I have to do less&#xA;  work when implementing a TUI for imag. (To be fair, there are already some&#xA;  crates available).&#xA;I hope there will be some awesome crates for handling multi-media files and&#xA;  reading/writing their metadata. Especially audio formats and video formats&#xA;  are important to me with imag.&#xA;Rust bindings for pass would be awesome.&#xA;Markdown (and other formats, like asciidoc, restructured text, textile and&#xA;  maybe even bbcode) parsers and renderers should be written/improved&#xA;A API for IPFS or maybe even a protocol implementation&#xA;Qt bindings (yeah, I have high hopes for 2018)&#xA;&#xA;There are possibly thousands more... But I won&#39;t list them all.&#xA;&#xA;tags:  #open-source #programming #software #rust&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Inspired by the
<a href="https://blog.rust-lang.org/2018/01/03/new-years-rust-a-call-for-community-blogposts.html">Call for Community Blogposts</a>
I want to summarize my experiences and thoughts on Rust in 2017 and what I am
excited about for 2018.</p>



<h1 id="reflecting-2017" id="reflecting-2017">Reflecting 2017</h1>

<p>2017 was an amazing year for Rust.
We got 8 releases of rust itself! We got basic procedural macros allowing custom
derive (also known as “macros 1.1”) in the first release last year (1.15.0).
This made serde 1.0 possible, if I&#39;m not mistaken?
We got 103 stabilized APIs in 2017. This is incredible!
The improvements of compiletime and also the tooling got <em>so</em> much better. I
mean, it was awesome before. But now it is even better!</p>

<p>On a personal side I got a lot better at programming Rust. I wrote about 37800
lines of rust code in my main project <a href="https://imag-pim.org">imag</a> and 17380
lines in other crates (authored and contributed, according to a bit git-fooing
around). Is that a lot? I don&#39;t know.</p>

<h1 id="hopes-for-2018" id="hopes-for-2018">Hopes for 2018</h1>

<p>Now lets talk about 2018. This year will be amazing, I am sure.</p>

<h2 id="language-features" id="language-features">Language features</h2>

<p>I am really excited about the “impl trait” thing. Beeing able to return an
trait from a function will reduce the imag codebase <em>so much</em>, for example. We
no longer need to define our own iterator helper types but can simply return
<code>Iterator&lt;Item = Whatever&gt;</code>!</p>

<p>I have no other hopes for the language itself, because what we have right now
is really amazing and I honestly cannot think of ways it could be improved.</p>

<h2 id="ecosystem-needs-tooling-enhancements" id="ecosystem-needs-tooling-enhancements">Ecosystem needs / Tooling enhancements</h2>

<p>I&#39;m still a bit concerned about cargo functionality for building workspace
projects. From what I see, building two different crates in one workspace
which share dependencies rebuilds the dependencies. This is not as intended,
I guess, but that&#39;s what I see. I did not dive deep into this, so I might be
wrong, though.</p>

<p>What I am thinking about for several weeks now is a cargo/rust tool for
calculating code metrics. I think of things like documentation/code ratio,
average function length, simple things... but also about cohesion and coupling
metrics and other inter-module/inter-crate metrics.</p>

<p>Also, I tried to set up the rust language server for vim on my workstation and
failed hard. I guess this is a packaging problem with my distro (NixOS),
though. Either way, installing the <code>rls</code> with a stable toolchain would be nice!</p>

<h2 id="crates-i-am-still-missing-should-be-improved" id="crates-i-am-still-missing-should-be-improved">Crates I am still missing / should be improved</h2>

<p>There are some crates I would love to have which do not exist yet.</p>
<ul><li>A (high level) email crate. There is the <code>email</code> crate, but it is mainly
unstable and does not even have a <code>0.1.0</code> yet. There&#39;s also <code>lettre_email</code>,
which is in <code>0.7.0</code>, but it doesn&#39;t support parsing of emails.</li>
<li>I really hope <code>rust-vobject</code> (which is one of the crates I contributed to in
2017) will improve even more and be the defacto-standard crate for handling
vcard and icalendar data.</li>
<li>I follow the development of <a href="https://github.com/gyscos/Cursive">Cursive</a> and
from what I see it is awesome. I really hope people start writing high-level
objects for cursive (like a file explorer, a form builder, a text editor
like thing, a tab helper and so on) so I have to do less
work when implementing a TUI for imag. (To be fair, there are already some
crates available).</li>
<li>I hope there will be some awesome crates for handling multi-media files and
reading/writing their metadata. Especially audio formats and video formats
are important to me with imag.</li>
<li>Rust bindings for <a href="https://www.passwordstore.org/">pass</a> would be awesome.</li>
<li>Markdown (and other formats, like asciidoc, restructured text, textile and
maybe even bbcode) parsers and renderers should be written/improved</li>
<li>A API for IPFS or maybe even a protocol implementation</li>
<li>Qt bindings (yeah, I have high hopes for 2018)</li></ul>

<p>There are possibly thousands more... But I won&#39;t list them all.</p>

<p>tags:  <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/2017-in-rust</guid>
      <pubDate>Fri, 05 Jan 2018 16:38:41 +0100</pubDate>
    </item>
    <item>
      <title>How to improve your open source code (5) - Planning of an Application or Library</title>
      <link>https://beyermatthias.de/how-to-improve-your-open-source-code-5-planning-of-an-application-or-library</link>
      <description>&lt;![CDATA[small&#xA;  This post was written during my trip through Iceland and published much&#xA;  latern than it was written.&#xA;/small&#xA;&#xA;In this and also maybe in the next few articles we will focus on rather&#xA;code-related things than on direct code properties. I hope that&#39;s okay.&#xA;&#xA;Planning of an application or library is not easy, not at all. But how&#xA;much planning do we actually do before writing code? And should we do&#xA;more?&#xA;&#xA;My thoughts on the subject.&#xA;&#xA;What we&#39;ve learned&#xA;&#xA;One that has studied computer science should know at least some UML&#xA;types like class diagrams, flow charts, module plans and use case&#xA;diagrams. They are used in (let&#39;s call it) &#34;normal&#34; software development&#xA;and in the professional world out there.&#xA;&#xA;But when we are developing open source software for our own needs and&#xA;maybe for our friends, we do that often in our chambers at home. Class&#xA;diagrams are often not being developed and I can say that I never saw a&#xA;hobby programmer draw a use case diagram before writing the code of the&#xA;application.&#xA;&#xA;Why we don&#39;t use it&#xA;&#xA;Why is that? Well, because open source software is often done as a hobby&#xA;type of thing, there is often no need for planning ahead. A hobbyist is&#xA;able to hold use case, simple class diagrams and flow charts &#34;in his&#xA;mind&#34; because he has great knowledge of the domain.&#xA;&#xA;In fact. as he defines the domain entirety, he is both stakeholder,&#xA;project leader, software architect, programmer, tester and marketing guy&#xA;at the same time. He knows what problems are about to be solved and&#xA;therefore can adjust every aspect of the application to the needs&#xA;required.&#xA;&#xA;This holds true for small and medium sized applications or code bases,&#xA;where the problems is of certain complexity but not too big. Basically&#xA;one could say that every aspect of the domain has to fit into one head&#xA;without much effort, in the open-source-programming-at-home-world. With&#xA;a bit of training, I believe, one can even get to a point where only a&#xA;few aspects of the domain have to be in a persons mind to be able to&#xA;work on a solution&#xA;&#xA;But there is certainly a point where the effort needed to solve a&#xA;specific problem explodes. One can still write software to solve the&#xA;problem at hand, but not in reasonable time.&#xA;&#xA;So why don&#39;t we hobby programmers do not use planning tools like we&#39;ve&#xA;learned in university? Why don&#39;t we use diagrams to make things clearer,&#xA;better documented, even before the real programming starts? The answer&#xA;is quite simple: because it annoys the hell out of us. We don&#39;t like to&#xA;plan ahead. We don&#39;t like to adjust plans as soon as we find out that&#xA;changing a small aspect of our library could be changed to gain more&#xA;flexibility and overall goodness. We don&#39;t like to check our plans&#xA;before writing down the next module until it works.&#xA;&#xA;Coding is fun, planning is not.&#xA;&#xA;But should we use these things&#xA;&#xA;In my opinion, this is foolish. We really should use the things we&#xA;learned in university to plan out software and of course also to&#xA;document it. It would be such a huge improvement of everything to simply&#xA;think a bit more about it before actually implementing it!&#xA;&#xA;How we do it&#xA;&#xA;What we do and why we do not use tools to plan ahead is explained with&#xA;one sentence: We program from the user interface to the implementation,&#xA;because the other way round is to complicated. Or, with other words: We&#xA;program top-down because bottom-up needs planning and therefore not that&#xA;easy.&#xA;&#xA;Of course, I&#39;m speaking about the average case. I&#39;ve programmed&#xA;bottom-up before but, for me, it seems much more error prone than&#xA;top-down does, especially without a plan.&#xA;&#xA;Also, I do not say that top-down is not error prone. Not at all. When&#xA;writing an API without an actual implementation in mind, one easily&#xA;results in sacrificing cleanness and speed at some points to keep the&#xA;API nice, which is not always a good idea. So top-down is only good as&#xA;long as we get it right.&#xA;&#xA;Tooling&#xA;&#xA;Tooling is one big problem in this context. We do not have a toolchain&#xA;for planning just yet. At least I do not have one that I would like to&#xA;use. Because we are really good at controlling (versioning, moving&#xA;around, managing) our source code (for example with git, and to some&#xA;extend github), we also want to be able to do this with charts&#xA;diagrams. But we also want the niceness of SVG-rendered graphics. We&#xA;don&#39;t want to play around with layout all day long, but use tools to&#xA;simply get the job done.&#xA;&#xA;And there are no such tools available.&#xA;&#xA;Sure, one can use graphviz to design such things, but then again we do&#xA;not have a nice overview on what&#39;s going on while editing our work. One&#xA;could use ascii-art to draw all those things, but hey... ascii-art. We&#xA;are better than that, aren&#39;t we? We could render the ascii-art into&#xA;SVG... though the tooling there is not yet as good as it should be. And&#xA;even if it would be, version controlling these things with git is (I&#xA;fail to believe otherwise) painful.&#xA;&#xA;Conclusion&#xA;&#xA;Well, I can only conclude the obvious here. We need better tooling for&#xA;the open source programming community to do their planning, if they need&#xA;to. Clearly, one does not always have to (or want to) plan things before&#xA;trying out. But when one does, the tooling should be there and be useful&#xA;and help with the process.&#xA;&#xA;Next&#xA;&#xA;In the next episode we will talk about version control of open source&#xA;software projects. I&#39;m not going into details about git or other systems&#xA;used, but rather on the style how they should be used so everyone is&#xA;pleased with it. This might be strongly biased, but hey, isn&#39;t this&#xA;whole article series biased?&#xA;&#xA;tags: #open-source #programming #software #tools #rust&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><small>
  This post was written during my trip through Iceland and published much
  latern than it was written.
</small></p>

<p>In this and also maybe in the next few articles we will focus on rather
code-related things than on direct code properties. I hope that&#39;s okay.</p>

<p>Planning of an application or library is not easy, not at all. But how
much planning do we actually do before writing code? And should we do
more?</p>

<p>My thoughts on the subject.</p>

<h1 id="what-we-ve-learned" id="what-we-ve-learned">What we&#39;ve learned</h1>

<p>One that has studied computer science should know at least some UML
types like class diagrams, flow charts, module plans and use case
diagrams. They are used in (let&#39;s call it) “normal” software development
and in the professional world out there.</p>

<p>But when we are developing open source software for our own needs and
maybe for our friends, we do that often in our chambers at home. Class
diagrams are often not being developed and I can say that I never saw a
hobby programmer draw a use case diagram before writing the code of the
application.</p>

<h1 id="why-we-don-t-use-it" id="why-we-don-t-use-it">Why we don&#39;t use it</h1>

<p>Why is that? Well, because open source software is often done as a hobby
type of thing, there is often no need for planning ahead. A hobbyist is
able to hold use case, simple class diagrams and flow charts “in his
mind” because he has great knowledge of the domain.</p>

<p>In fact. as he defines the domain entirety, he is both stakeholder,
project leader, software architect, programmer, tester and marketing guy
at the same time. He knows what problems are about to be solved and
therefore can adjust every aspect of the application to the needs
required.</p>

<p>This holds true for small and medium sized applications or code bases,
where the problems is of certain complexity but not too big. Basically
one could say that every aspect of the domain has to fit into one head
without much effort, in the open-source-programming-at-home-world. With
a bit of training, I believe, one can even get to a point where only a
few aspects of the domain have to be in a persons mind to be able to
work on a solution</p>

<p>But there is certainly a point where the effort needed to solve a
specific problem explodes. One can still write software to solve the
problem at hand, but not in reasonable time.</p>

<p>So why don&#39;t we hobby programmers do not use planning tools like we&#39;ve
learned in university? Why don&#39;t we use diagrams to make things clearer,
better documented, even before the real programming starts? The answer
is quite simple: because it annoys the hell out of us. We don&#39;t like to
plan ahead. We don&#39;t like to adjust plans as soon as we find out that
changing a small aspect of our library could be changed to gain more
flexibility and overall goodness. We don&#39;t like to check our plans
before writing down the next module until it works.</p>

<p>Coding is fun, planning is not.</p>

<h1 id="but-should-we-use-these-things" id="but-should-we-use-these-things">But should we use these things</h1>

<p>In my opinion, this is foolish. We really should use the things we
learned in university to plan out software and of course also to
document it. It would be such a huge improvement of everything to simply
think a bit more about it before actually implementing it!</p>

<h1 id="how-we-do-it" id="how-we-do-it">How we do it</h1>

<p>What we do and why we do not use tools to plan ahead is explained with
one sentence: We program from the user interface to the implementation,
because the other way round is to complicated. Or, with other words: We
program top-down because bottom-up needs planning and therefore not that
easy.</p>

<p>Of course, I&#39;m speaking about the average case. I&#39;ve programmed
bottom-up before but, for me, it seems much more error prone than
top-down does, especially without a plan.</p>

<p>Also, I do <em>not</em> say that top-down is not error prone. Not at all. When
writing an API without an actual implementation in mind, one easily
results in sacrificing cleanness and speed at some points to keep the
API nice, which is not always a good idea. So top-down is only good as
long as we get it right.</p>

<h1 id="tooling" id="tooling">Tooling</h1>

<p>Tooling is one big problem in this context. We do not have a toolchain
for planning just yet. At least I do not have one that I would like to
use. Because we are really good at controlling (versioning, moving
around, managing) our source code (for example with git, and to some
extend github), we also want to be able to do this with charts
diagrams. But we also want the niceness of SVG-rendered graphics. We
don&#39;t want to play around with layout all day long, but use tools to
simply get the job done.</p>

<p>And there are no such tools available.</p>

<p>Sure, one can use graphviz to design such things, but then again we do
not have a nice overview on what&#39;s going on while editing our work. One
could use ascii-art to draw all those things, but hey... ascii-art. We
are better than that, aren&#39;t we? We could render the ascii-art into
SVG... though the tooling there is not yet as good as it should be. And
even if it would be, version controlling these things with git is (I
fail to believe otherwise) painful.</p>

<h1 id="conclusion" id="conclusion">Conclusion</h1>

<p>Well, I can only conclude the obvious here. We need better tooling for
the open source programming community to do their planning, if they need
to. Clearly, one does not always have to (or want to) plan things before
trying out. But when one does, the tooling should be there and be useful
and help with the process.</p>

<h1 id="next" id="next">Next</h1>

<p>In the next episode we will talk about version control of open source
software projects. I&#39;m not going into details about git or other systems
used, but rather on the style how they should be used so everyone is
pleased with it. This might be strongly biased, but hey, isn&#39;t this
whole article series biased?</p>

<p>tags: <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/how-to-improve-your-open-source-code-5-planning-of-an-application-or-library</guid>
      <pubDate>Fri, 08 Dec 2017 16:38:38 +0100</pubDate>
    </item>
    <item>
      <title>How to improve your open source code (4) - API Design</title>
      <link>https://beyermatthias.de/how-to-improve-your-open-source-code-4-api-design</link>
      <description>&lt;![CDATA[small&#xA;  This post was written during my trip through Iceland and published much&#xA;  latern than it was written.&#xA;/small&#xA;&#xA;What is a nice and gold API. How is &#34;nice&#34; defined when it comes to&#xA;library interfaces? That&#39;s a question I want to discuss in this post and&#xA;also, how you can create a nice API in your open source library without&#xA;studying a topic like software architecture or similar.&#xA;&#xA;Definition of a &#34;nice&#34;/&#34; easy to use&#34; API&#xA;&#xA;But first, we have to define what makes an API good. And that&#39;s not that&#xA;easy because this topic is very biased.&#xA;&#xA;For me, a good API is one where I can get the job done without thinking&#xA;much about it. That means that there shouldn&#39;t be that much setup code&#xA;involved in my code just to use the library. So no Factory hell if the&#xA;only thing I want to have is the current time, for example. This also&#xA;means that the API has to be decent high level, but without losing the&#xA;ability to do fine-grained work if necessary. So for the most part, low&#xA;level (for example implementation details) things are not interesting&#xA;for me. But when I want to bit-fiddle around with the library, it should&#xA;    let me.&#xA;&#xA;If a builder, factory or some other mechanism is necessary to produce&#xA;objects in some way, the library should make clear (documentation wise&#xA;but also code wise) why it is needed. There&#39;s no point in making the&#xA;user call the tenth factory instantiation if it is not necessary and&#xA;also it makes the users codebase blow up in size and complexity.&#xA;&#xA;The naming of things in the library should be good, appropriate and, for&#xA;the most part, be consistent. If a function on an object which returns&#xA;the string representation of that objectbis named &#34;tostring&#34; it should&#xA;be named that way for all types from that library, not only some parts.&#xA;&#xA;Statelessness&#xA;&#xA;Calling functions of your API should always result in the same values&#xA;for the same arguments. That does not mean that your API should be pure&#xA;in a functional programming meaning, but rather that the actions&#xA;executed when calling a function should not result in some&#xA;library-internal variables to be set, changed or unset. This is&#xA;easily achievable by letting the user of the API have an object that&#xA;holds the state, and functions of your API work based on that value.&#xA;In short: your library should not have global variables.&#xA;&#xA;This simple design pattern already results in easy to use APIs and a&#xA;nice user experience.&#xA;&#xA;Error exposure&#xA;&#xA;Good libraries don&#39;t hide errors. Indeed, it is even better if errors&#xA;are exposed to the user as much as possible. Because the user of the&#xA;library knows best when and how to handle errors, even from your&#xA;library.&#xA;&#xA;I&#39;m also a big fan of lots of error cases. The more error cases (the&#xA;better a user of a library can distinguish between different errors) the&#xA;better. This way, you let the user decide where she doesn&#39;t distinguish&#xA;between two almost-equal error cases and where it is better to handle&#xA;them independently. If your library does not give that opportunity, the&#xA;user has to make ugly Spaghetti-code handling things to be able to tell&#xA;what is going on.  Of course, these things have to be documented&#xA;properly.&#xA;&#xA;Another thing that can come in handy is when your error types or your&#xA;library exposes functionality to translate error types into text which&#xA;can be shown to a user of your library. Nothing is worse (from a users&#xA;point of view) than a &#34;CallOnInconsistenStateObjectBuilderFactory on&#xA;line 2832&#34; error message shown in an user-facing interface (and trust&#xA;me, I&#39;ve seen such things already).&#xA;&#xA;Completeness&#xA;&#xA;Nothing is worse than an API that is not complete. I mean, don&#39;t get me&#xA;wrong - sometimes one does not think of all cases a library could be&#xA;used for - and that&#39;s completely okay. But some things are too obvious&#xA;for being left out. For example, if you provide functions to transform&#xA;your time object from local time into GMT, why wouldn&#39;t you provide&#xA;functions for converting it into UTC or EST? These also matter!&#xA;&#xA;Also cleanup routines. In some languages it is necessary to include&#xA;cleanup routines for your objects. If your library exposes&#xA;allocvacationlocationobj() it should also provide&#xA;freevacationlocationobj()! Sure, a user could use free(), but it&#xA;is not nice API-wise. Even if your function does nothing more than call&#xA;to free(), it is better to provide a function (and if you want to&#xA;include some more cleanup in your function later on, in a new version of&#xA;your library, a user does not have to think about it that much when&#xA;upgrading their dependencies).&#xA;&#xA;Consistency&#xA;&#xA;We had the naming game already, but it always comes back to us, right?&#xA;Consistent naming is one of the most important things in an API. If&#xA;allocating worked with functions prefixed with new all the time, it&#xA;shouldn&#39;t be done with alloc_ this time. Also not in later versions if&#xA;your library. Not even in a major version bump.&#xA;&#xA;Even more important than naming is behaviour. A function that is named&#xA;with some alloc prefix should only allocate, never initialize or do&#xA;other fancy stuff (debugging output excluded here, if necessary).&#xA;&#xA;Next&#xA;&#xA;In the next episode we will talk about how one can plan an application.&#xA;&#xA;tags: #open-source #programming #software #tools #rust&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><small>
  This post was written during my trip through Iceland and published much
  latern than it was written.
</small></p>

<p>What is a nice and gold API. How is “nice” defined when it comes to
library interfaces? That&#39;s a question I want to discuss in this post and
also, how you can create a nice API in your open source library without
studying a topic like software architecture or similar.</p>

<h1 id="definition-of-a-nice-easy-to-use-api" id="definition-of-a-nice-easy-to-use-api">Definition of a “nice”/” easy to use” API</h1>

<p>But first, we have to define what makes an API good. And that&#39;s not that
easy because this topic is very biased.</p>

<p>For me, a good API is one where I can get the job done without thinking
much about it. That means that there shouldn&#39;t be that much setup code
involved in my code just to use the library. So no Factory hell if the
only thing I want to have is the current time, for example. This also
means that the API has to be decent high level, but without losing the
ability to do fine-grained work if necessary. So for the most part, low
level (for example implementation details) things are not interesting
for me. But when I want to bit-fiddle around with the library, it should
    let me.</p>

<p>If a builder, factory or some other mechanism is necessary to produce
objects in some way, the library should make clear (documentation wise
but also code wise) why it is needed. There&#39;s no point in making the
user call the tenth factory instantiation if it is not necessary and
also it makes the users codebase blow up in size and complexity.</p>

<p>The naming of things in the library should be good, appropriate and, for
the most part, be consistent. If a function on an object which returns
the string representation of that objectbis named “to_string” it should
be named that way for all types from that library, not only some parts.</p>

<h1 id="statelessness" id="statelessness">Statelessness</h1>

<p>Calling functions of your API should always result in the same values
for the same arguments. That does not mean that your API should be pure
in a functional programming meaning, but rather that the actions
executed when calling a function should not result in some
library-internal variables to be set, changed or unset. This is
easily achievable by letting the user of the API have an object that
holds the state, and functions of your API work based on that value.
In short: your library should not have global variables.</p>

<p>This simple design pattern already results in easy to use APIs and a
nice user experience.</p>

<h1 id="error-exposure" id="error-exposure">Error exposure</h1>

<p>Good libraries don&#39;t hide errors. Indeed, it is even better if errors
are exposed to the user as much as possible. Because the user of the
library knows best when and how to handle errors, even from <em>your</em>
library.</p>

<p>I&#39;m also a big fan of lots of error cases. The more error cases (the
better a user of a library can distinguish between different errors) the
better. This way, you let the user decide where she doesn&#39;t distinguish
between two almost-equal error cases and where it is better to handle
them independently. If your library does not give that opportunity, the
user has to make ugly Spaghetti-code handling things to be able to tell
what is going on.  Of course, these things have to be documented
properly.</p>

<p>Another thing that can come in handy is when your error types or your
library exposes functionality to translate error types into text which
can be shown to a user of your library. Nothing is worse (from a users
point of view) than a “CallOnInconsistenStateObjectBuilderFactory on
line 2832” error message shown in an user-facing interface (and trust
me, I&#39;ve seen such things already).</p>

<h1 id="completeness" id="completeness">Completeness</h1>

<p>Nothing is worse than an API that is not complete. I mean, don&#39;t get me
wrong – sometimes one does not think of all cases a library could be
used for – and that&#39;s completely okay. But some things are too obvious
for being left out. For example, if you provide functions to transform
your time object from local time into GMT, why wouldn&#39;t you provide
functions for converting it into UTC or EST? These also matter!</p>

<p>Also cleanup routines. In some languages it is necessary to include
cleanup routines for your objects. If your library exposes
<code>alloc_vacation_location_obj()</code> it should also provide
<code>free_vacation_location_obj()</code>! Sure, a user could use <code>free()</code>, but it
is not nice API-wise. Even if your function does nothing more than call
to <code>free()</code>, it is better to provide a function (and if you want to
include some more cleanup in your function later on, in a new version of
your library, a user does not have to think about it that much when
upgrading their dependencies).</p>

<h1 id="consistency" id="consistency">Consistency</h1>

<p>We had the naming game already, but it always comes back to us, right?
Consistent naming is one of the most important things in an API. If
allocating worked with functions prefixed with <code>new_</code> all the time, it
shouldn&#39;t be done with <code>alloc_</code> this time. Also not in later versions if
your library. Not even in a major version bump.</p>

<p>Even more important than naming is behaviour. A function that is named
with some <code>alloc</code> prefix should only allocate, never initialize or do
other fancy stuff (debugging output excluded here, if necessary).</p>

<h1 id="next" id="next">Next</h1>

<p>In the next episode we will talk about how one can plan an application.</p>

<p>tags: <a href="https://beyermatthias.de/tag:open" class="hashtag"><span>#</span><span class="p-category">open</span></a>-source <a href="https://beyermatthias.de/tag:programming" class="hashtag"><span>#</span><span class="p-category">programming</span></a> <a href="https://beyermatthias.de/tag:software" class="hashtag"><span>#</span><span class="p-category">software</span></a> <a href="https://beyermatthias.de/tag:tools" class="hashtag"><span>#</span><span class="p-category">tools</span></a> <a href="https://beyermatthias.de/tag:rust" class="hashtag"><span>#</span><span class="p-category">rust</span></a></p>
]]></content:encoded>
      <guid>https://beyermatthias.de/how-to-improve-your-open-source-code-4-api-design</guid>
      <pubDate>Wed, 15 Nov 2017 16:38:24 +0100</pubDate>
    </item>
  </channel>
</rss>