<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Niklas Lochschmidt on Medium]]></title>
        <description><![CDATA[Stories by Niklas Lochschmidt on Medium]]></description>
        <link>https://medium.com/@Niklas_L?source=rss-85552ba14f34------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Niklas Lochschmidt on Medium</title>
            <link>https://medium.com/@Niklas_L?source=rss-85552ba14f34------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:47:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Niklas_L/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Guideline for Developing Software]]></title>
            <link>https://medium.com/@Niklas_L/guideline-for-developing-software-2caa77797d48?source=rss-85552ba14f34------2</link>
            <guid isPermaLink="false">https://medium.com/p/2caa77797d48</guid>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[code-review]]></category>
            <dc:creator><![CDATA[Niklas Lochschmidt]]></dc:creator>
            <pubDate>Sun, 01 Apr 2018 18:20:50 GMT</pubDate>
            <atom:updated>2018-10-15T13:35:12.449Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<blockquote>In a recent project I took some time to write down a guideline for the development team on how we want to develop software. The idea has been that the whole team can agree and commit to the guideline, defend it if need be and use it to showcase our development values and processes to new developers. Things turned out a bit different, but nevertheless I think it may contain some value to others. I am very much looking forward to suggestions, so leave a comment below or <a href="https://twitter.com/niklas_l">on Twitter</a>. Without further ado:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7qTub6FmyWPjK0nRTvcGfA.png" /></figure><h3>Our Guideline for Developing Software</h3><p><em>This guide is intended to be read in brain-on mode. If things don’t make sense you are responsible for raising them to your peers.</em></p><p>Our common goal is to deliver <strong>value to our customer and the users</strong> of our services. We aim to keep our processes to a minimum and provide the fastest route possible from an idea to creating value. To ensure that we stay fast, we need to write <strong>high-quality code</strong> in the sense that it works in production, is robust and stays flexible and maintainable in the long run.</p><p>We aim to achieve this goal through the following key practices:</p><ul><li><strong>Clear language</strong></li><li><strong>Testing</strong></li><li><strong>Code Review</strong></li><li><strong>Continuous Integration</strong></li><li><strong>Shared Code Ownership</strong></li></ul><h4>Clear language</h4><p>The code is the truth, because the code is what gets executed. Therefore the code should be clear and expressive. This is especially important in the core domain logic where the entities and actions should be named according to the <strong>language of the business</strong>. PersonFactory.create(…)is much less expressive than Onboarding.registerCustomer(…).</p><p>Use <strong>consistent naming</strong> for the entities in the system. Do not say customer and user in the same context unless both concepts are indeed different. Refer to the glossary in case of doubt.</p><p>Only write <strong>comments in code</strong> as a last resort when the comments convey additional information that can not already be derived from the code. Always try to make the intent clear by refactoring names of variables, classes and methods or restructure the code to be simpler to reason about. When you really need to write comments, make sure to not only write what the code does, but also why you decided to do it in that way.</p><p>Make sure to write good <strong>commit messages</strong>. A short summary line with at most 50 characters followed by a blank line and the main body of the commit message with 72 characters per line. This ensures that the subject line is never truncated in notifications and summary emails and is well formed for use with git log -S and the IDEs annotation features.</p><p>When writing your commit message, think about future-you or a fellow developer looking at your commit messages on a particular line of code and try to answer the questions: Why was this introduced/changed, how does it solve the problem and whether or not there are any known shortcomings of the solution.</p><p>Independent of the programming language, we try to adhere as close as possible to the default <strong>code style</strong> of that language. However, we always allow a limit of 120 characters per line (excluding special cases like import statements which are allowed to be longer). This character limit ensures, that we can use longer names on a single line, but still show all code in a vertical split on a regular wide-screen display.</p><h4><strong>Testing</strong></h4><p>Writing tests first is strongly encouraged. All business logic needs to be covered by <strong>unit-tests</strong> to the degree that the developer as well as the reviewer have enough confidence that the code will work in production as intended.</p><p>Apart from the business logic, testing is still encouraged but not strictly mandatory, as long as the code in question is covered by larger tests, like <strong>acceptance and integration tests</strong>. For us an acceptance test is testing a module as a black-box while an integration test is also testing with real external dependencies (e.g. the database).</p><p>Testing of <strong>third party libraries and frameworks</strong> is only necessary, when we have to use an unstable version (don’t do that), where we suspect that errors can be made easily or where we have experienced actual issues and need to discover regressions early.</p><h4>Code Review</h4><p>By default <strong>all code written and checked in needs to be reviewed</strong> by at least one peer. In addition this should happen before the code is pushed to the master-branch. The reason for this is not to control one another, but to detect defects and spread knowledge about the code throughout the team. It is primarily a possibility to learn from one another.</p><p>It is therefore imperative that <strong>code reviews are conducted with respect</strong> for one another. Destructive comments, insults, blaming and generally rude comments are simply unacceptable. In case you are on the receiving end of such a comment, either as developer or reviewer, get another peers opinion or escalate the issue. Also go and read the excellent blog post by Philip Hauer on <a href="https://blog.philipphauer.de/code-review-guidelines/">Code Review Guidelines</a>)</p><p>Small changes, like changes on configuration files, on build steps, simple version bumps of dependencies, fixing typos, adding clarifying comments, code-style cleanups etc. do not need to be peer reviewed. Some of those tasks might even be automated and our extensive tests should be able to detect bugs and incompatibilities introduced like that.</p><p>We offer two ways to perform a code review:</p><p><strong>Pull Requests</strong></p><p>As developer, you start your work by creating a branch from master for the task you are about to start. Create the branch from the GitLab issue page, so that all commits belonging to the issue are tracked. Once you finished the task, you should optionally squash the commits and rebase again on master. Then create a pull request and assign someone else to review your code.</p><p>As reviewer, once you get assigned to a pull request, try to review the code as soon as possible. Leave constructive remarks as comments on the commits in GitLab, make sure to point out code that is hard to understand and if possible provide small snippets of improved code. Also make sure the tests are correct and sufficient. Also indicate which parts must be changed and which are nice to have. In case there are no critical issues, feel free to merge the pull request into master, otherwise notify the initial developer.</p><p>As developer, fix the issues that came up during code review and decide whether the code needs a second review. Otherwise merge the pull request into master.</p><p><strong>Code Walk-Through</strong></p><p>This is reserved for cases, where a task has become too large to be reviewed alone. The decision to do a walk-through can come from the developer or from a reviewer starting to review a pull request.</p><p>The developer should <strong>guide the reviewer through the finished code</strong> without necessarily looking at individual commits. Ideally the reviewer should have control over the keyboard in order to be able to easily inspect other related pieces of code and quickly jump back and forth in the code base. Discoveries during the walk-through needs to be captured and corrected by the developer afterwards.</p><p>Once the developer has incorporated the feedback from the walk-through the pull requests gets updated and a normal code review of the latest changes should be performed.</p><p><strong>Bonus: Pair Programming</strong></p><p>Code that has been written as part of a pairing session can be merged directly into master without a formal code review.</p><h4>Continuous Integration</h4><p>We aim to integrate everyone’s code into master as often as possible, so that we get very close to everyone working directly on the master branch, because everything on the master branch is on track for delivery to the customer.</p><p>For this to work we need to aim for <strong>right-sized increments</strong> that can be <strong>developed and reviewed in a day</strong>. If a task is too large, try splitting it into sub-tasks or create daily pull requests of intermediate functionality, that can already be reviewed and merged.</p><p>By continuously merging into master we acknowledge that our brains working memory is limited and therefore recognize that <strong>parallel work in progress </strong>for any developer <strong>needs to be minimized</strong>. The work in progress for a single developer should ideally be a single task. In case a developer has open review requests, those take precedence over picking a new task from the backlog.</p><p>All commits get <strong>build and tested automatically</strong> on the CI build server and an artifact (e.g. a binary, JAR or a Docker image) is created and stored away. In case of the master this artifact gets <strong>deployed into a staging environment</strong>. Build artifacts resulting from a successful build of the master-branch must always be ready to be deployed into production. That means a red build is reason for immediate investigation and recovery. Also unstable (flaky) builds must be fixed asap.</p><p>If you are working on a feature that should not be active yet, <strong>use feature toggles</strong> to hide it until it’s ready.</p><h4>Shared Code Ownership</h4><p>Since our common goal is to create value for the customer and the code is just the vehicle to get there, we must <strong>not get emotionally attached</strong> to the code. If code has been written by someone else than yourself, you have full permission to change it without consulting with the original developer, provided you test the code and let it be reviewed as always.</p><p>Always assume that your code and everyone else’s code has always been written with the <strong>best of intentions</strong>, to the best of their abilities and based on the full knowledge at that time. When you receive feedback in a code review on some code you wrote, it will not be a criticism on you as a person.</p><p>That’s it, now let’s go!</p><blockquote>P.S. I am aware that there is nothing inherently new in this text. It is simply a selection of valued practices that can be found in the Software Crafter movement, Domain Driven Design (DDD), Test Driven Development (TDD), Extreme Programming (XP), DevOps and Agile</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2caa77797d48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kotlin and Jooby in the backend]]></title>
            <link>https://medium.com/@Niklas_L/kotlin-and-jooby-in-the-backend-d85cda8b507f?source=rss-85552ba14f34------2</link>
            <guid isPermaLink="false">https://medium.com/p/d85cda8b507f</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[jooby]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[software-craftsmanship]]></category>
            <dc:creator><![CDATA[Niklas Lochschmidt]]></dc:creator>
            <pubDate>Mon, 09 Oct 2017 09:31:00 GMT</pubDate>
            <atom:updated>2018-03-12T13:01:01.348Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>Kotlin and Jooby for the backend</h3><h4>Quick, simple, fun and type-safe backend web development</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*yYaDFKp-euv3pyUAnyhwMw.png" /><figcaption>Presenting at Socrates Day Berlin. Picture in the background by <a href="https://twitter.com/dmitrykandalov">@<strong>dmitrykandalov</strong> </a>‏</figcaption></figure><p><em>On the weekend, I participated at the first SoCraTes Day Berlin, a very well organized event by my good friend Raimo Radzcewski </em><a href="https://twitter.com/rradczewski"><em>@rradzcewski</em></a><em> and the Softwerkskammer Berlin. I met old friends, got to meet great new people and learned a couple of things over the day, not least how to make sourdough bread. I also held a session, on my recent experience building a backend service with Kotlin and the Jooby Framework, with some slides created at 2am in the morning:</em></p><p><a href="http://slides.com/nlochschmidt/kotlin_and_jooby_socrates_day_berlin">Kotlin and Jooby #SoCraTesBer17 by Niklas Lochschmidt</a></p><h3>Context</h3><p>In this recent project, we had been in the fortunate situation to have been given almost complete autonomy over which language, framework and infrastructure to use. The only strong requirement that I actually recall, in that regard, has been that the backend service needs to run on the JVM.</p><h3>Why Kotlin</h3><p>The three years before I joined <a href="https://flinc.org/">flinc</a>, I have developed almost exclusively on Scala and the Play! Framework, and had little experience in the more traditional Java web development ways like JEE or Spring.</p><p>What I liked about Scala in the past has been the concise and expressive code it allows me to write. On the other hand I had encountered fairly long compilation times in bigger projects, which made TDD feel very sluggish.</p><p>Also, once in a while, I coded myself into situations where the Scala type-system and compiler have no longer been on my side and needed a couple of hours persuasion to calm down. Lastly I remember more than a few heated discussions, on which of the several possible ways to write lambdas and how to format Scala code is “the right one”<em>.</em></p><p>Coming back to Java 8 from Scala has been a bit of a shocker as well. There is so much useless cruft that is cluttering up a typical code base and adding complication. A lot of the APIs feel quite dated and in general it feels like the language has not aged well.</p><p>Kotlin has been high on my list of languages to try out (up there with Elixir), offering complete interoperability with Java. From the looks of it, the language designers seemed to take the best cues from other languages to create a more approachable Scala for the JVM. Since the language has been developed at JetBrains, the makers of IntelliJ IDEA, it comes with amazing IDE support as well (Refactorings!).</p><p>Highest on the list of features in Kotlin compared to Java, for me, have been, type inference, immutable data classes, String interpolation, a sane Collections API, extension functions, improved control flow primitives like when-expressions, and much more. Have a look at the excellent <a href="http://kotlinlang.org/">Kotlin docs</a>.</p><h3>Niklas Lochschmidt on Twitter</h3><p>TIL #Kotlin supports spaces in class and method names allowing it to work very nicely together with #JUnit and IntelliJ</p><p>So after three months of writing code for the backend in Kotlin, I can say this: <strong>I enjoyed it immensely</strong>. If you are currently writing Java you should at least try out Kotlin in some pet project.</p><h3>Jooby</h3><p>The other major technical decision we had to make at the beginning of the project has been which web-framework to use. In many projects, this decision is already done, either because a company or team has always used a certain framework, or the client requires a specific framework to be used. As it turned out, my previous experience with Play! is not that useful when Scala is removed from the equation and since we had been given full autonomy we decided to have another look around.</p><p>In the spare time between switching jobs, I tried out several different web-frameworks for the JVM, including Grails, Spring (Spring-Boot), SparkJava, Dropwizard, Jooby and others. What I found was, that I take a framework in which I tend to write explicit code and a little more boilerplate, over the convention-over-configuration magic of something like Spring any day of the week.</p><h3>Niklas Lochschmidt on Twitter</h3><p>If you thought Implicits in Scala are weird, you probably haven&#39;t heard of Spring yet.</p><p>What I wanted was a framework on top of a modern server like Netty or Undertow and preferably one that follows the approach of seeing <a href="https://monkey.org/~marius/funsrv.pdf">the server as a function</a>. Since Kotlin is fully interoperable with Java, the framework did not necessarily had to explicitly support Kotlin, but looking at the different options I found that the ones that have Kotlin support actually feel much more natural.</p><p>It was also important to me, that the API layer and other parts that are tightly coupled with the framework are still simple to test in isolation. Something that was not so in various options we had considered.</p><p><a href="http://jooby.org/">Jooby</a> ticked almost all our boxes. It’s design is simple and the layer on top of Netty is quite thin. It is also easy to change or add functionality by registering functions as handlers at various extension points.</p><p>In the simplest form, a Jooby App basically brings a server with the request handling DSL on top, but it offers loads of optional modules to turn it into a <a href="http://jooby.org/modules/">full-stack web framework</a>, complete with asset pipeline, template rendering, data access, caching, security, what have you. It is also easy to write your own module, which we have done fairly early during our project.</p><p>We ended up using Jooby with the modules for <a href="http://jooby.org/doc/jackson/">Jackson</a>, Hibernate Validator, JDBI, FlywayDB and Quartz as well as the Metrics module. Some but not all of the typical quirks that come with using libraries like Jackson, JDBI and Hibernate Validator in Java 8 are mitigated by the respective Jooby modules. Some things like having to configure Jackson and bad i18n in Hibernate Validator and so on still existed, but we could easily configure and modify the default behavior through the extension points that Jooby provides.</p><p>What I liked especially about Jooby has been the ease of testing the API-layer, complete with JSON (de-)serialization, security filters, routing, and so on. We only made sure that all interactions between our controllers and the domain model went through a layer of services and repositories and we used a JUnit rule to create a Jooby instance with the domain mocked during the API layer tests. The result have been very fast API unit tests. Testing a Jooby app is also <a href="http://jooby.org/doc/#tests-integration-tests">well documented</a>.</p><p><strong>Finally a word or two of warning:</strong> The backend service we developed has not yet been put under a lot of stress. We encountered a configuration issue in our staging environment early on, because the number of threads used by Netty and Jooby are derived from the number of cores of the machine it is running on. Since we are running the service in a container, we had to manually set the maximum number of allowed threads <em>(Update: This has since been fixed </em><a href="https://github.com/jooby-project/jooby/issues/916"><em>#916</em></a><em>)</em>. So your mileage may vary. Make sure to use the provided Metrics module and closely monitor your Jooby app.</p><p>Lastly, Jooby is an open-source project written by <a href="https://medium.com/u/8d30443086b1">Edgar Espina</a> <a href="https://twitter.com/edgarespina">@edgarespina</a> who I came to know as a helpful, nice and approachable guy. There is no Enterprise support for Jooby at the moment, but I don’t see this as an issue since it relies a lot on battle-tested libraries underneath the comparably thin layer of framework code. If you do decide to use Jooby in your product or projects, do let him know on Twitter or Gitter and contribute, if you can.</p><p>Happy coding!</p><p><em>Kudos to </em><a href="https://medium.com/u/3fdc2a92b89e"><em>Marc Reichelt</em></a><em> for leaving his trusted Android environment behind for a while to join me in the backend during this project.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d85cda8b507f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nobody would care about my writing]]></title>
            <link>https://medium.com/@Niklas_L/nobody-would-care-about-my-writing-672db41b0b8?source=rss-85552ba14f34------2</link>
            <guid isPermaLink="false">https://medium.com/p/672db41b0b8</guid>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[getting-started]]></category>
            <category><![CDATA[imposter-syndrome]]></category>
            <dc:creator><![CDATA[Niklas Lochschmidt]]></dc:creator>
            <pubDate>Sun, 26 Mar 2017 13:08:11 GMT</pubDate>
            <atom:updated>2017-03-26T13:55:59.435Z</atom:updated>
            <content:encoded><![CDATA[<p>In January I made a <a href="https://medium.com/@Niklas_L/from-reading-to-writing-new-years-resolution-2017-48c9e5a6c3fd#.a2dkrmrjs">New Year’s resolution</a> to start creating content instead of just reading a lot of stuff. So here I am, three months into the year and I haven’t published a thing.</p><h3>Niklas Lochschmidt on Twitter</h3><p>This week is my last week @TeamVaamo. I learned a lot and had a great time working with such awesome people 🙇. Thank you for 3 great years!</p><p>Now, I could make up a lot of excuses on why that is. I have recently switched from working at <a href="https://www.vaamo.de/">vaamo Finanz AG</a> to <a href="https://flinc.org/">flinc GmbH</a> and therefore had to tie up loose ends while also facilitating a couple of internal learning sessions at vaamo on topics like Data Warehouse and Business Intelligence, Domain Driven Design, Acceptance Testing and Working with Legacy Code.</p><p>However, I realize that I am bullshitting myself quite a bit here. It is not really time-constraints or that I have too many things on my plate right now, that kept me from publishing. I actually have written quite some drafts in advanced stages. I guess the real reason is, that despite my deep resolution to get into publishing more content, I still have a lot of difficulty <em>putting myself out there.</em></p><p>Case in point: I started this post with the intention of writing about the <a href="https://en.wikipedia.org/wiki/Impostor_syndrome">Imposter Syndrom</a>. Well, the definition on wikipedia says:</p><blockquote><strong>Impostor syndrome </strong>is a concept describing high-achieving individuals who are marked by an inability to internalize their accomplishments and a persistent fear of being exposed as a “fraud”.</blockquote><p>However I have kind of a Double Imposter Syndrome situation here, because writing about the Imposter Syndrome means I am attributing <em>high-achieving</em> to myself, which I am actually not comfortable with, <strong>at all</strong>.</p><p>On the other hand I know that from talking to people, that the things I could write and talk about are actually worthwhile for other people. So f*** it, I am still committed to making this work. Stay tuned…</p><p>Thanks to <a href="https://twitter.com/rradczewski">@rradczewski</a> and <a href="https://twitter.com/gtrefs">@gtrefs</a> for the nudge I needed to keep going.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=672db41b0b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Reading to Writing]]></title>
            <link>https://medium.com/@Niklas_L/from-reading-to-writing-new-years-resolution-2017-48c9e5a6c3fd?source=rss-85552ba14f34------2</link>
            <guid isPermaLink="false">https://medium.com/p/48c9e5a6c3fd</guid>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[new-years-resolutions]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Niklas Lochschmidt]]></dc:creator>
            <pubDate>Mon, 02 Jan 2017 07:38:02 GMT</pubDate>
            <atom:updated>2017-01-02T08:03:45.485Z</atom:updated>
            <content:encoded><![CDATA[<h4>New Year’s Resolution 2017</h4><p>The last decade has been a constant learning experience for me. I have studied Computer Science at the <a href="https://www.informatik.tu-darmstadt.de/en/">TU Darmstadt</a> (Germany) from 2007–2013 and since then I have learned a lot more while working at <a href="https://codecraft.vaamo.de/">Vaamo</a>, a fintech startup from Frankfurt (Germany).</p><p>During those years I also took up photography as a hobby and started to read quite a lot of stuff, books and blog posts mainly.</p><p>Now, I feel like the time has come to switch gears and turn more to creating content instead of just consuming and what better time than at the beginning of a new year.</p><p>I will therefore start to write here on Medium, because it gets out of the way and is very straight forward. I will be writing about programming, gadgets, productivity, organizational struggles, laymen’s psychology and rationality, coffee, society, start-up stuff and other things. I will also post the occasional picture in between.</p><p>Let’s give this thing a shot.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48c9e5a6c3fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>