<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
        <title>aron</title>
        <description>aron - Andreas Aronsson</description>
        <link>http://andreasaronsson.github.io</link>
        <atom:link href="http://andreasaronsson.github.io/rss.xml" rel="self" type="application/rss+xml" />
        <lastBuildDate>Fri, 19 Sep 2025 16:19:43 +0000</lastBuildDate>
        <pubDate>Fri, 19 Sep 2025 16:19:43 +0000</pubDate>
        <ttl>60</ttl>


        <item>
                <title>nextversion maven plugin</title>
                <description>
&lt;p&gt;Time to announce the nextversion-maven-plugin.
Releases CD style.
VCS tags are a thing of the past.
Binaries contain the git-sha instead.
Uses the last released version to decide what to name the binary.&lt;/p&gt;

&lt;p&gt;Details here &lt;a href=&quot;https://github.com/andreasaronsson/nextversion-maven-plugin&quot;&gt;https://github.com/andreasaronsson/nextversion-maven-plugin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/code,%20programming/2020/02/15/nextversion-maven-plugin&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/code,%20programming/2020/02/15/nextversion-maven-plugin</link>
                <guid>http://andreasaronsson.github.io/code,%20programming/2020/02/15/nextversion-maven-plugin</guid>
                <pubDate>Sat, 15 Feb 2020 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Maven dependency version properties</title>
                <description>
&lt;p&gt;Writing maven pom files can be tedious.
I rarely want to spend another minute more than I need to doing it.
Thus it makes sense to figure out how to do it as efficiently as possible.&lt;/p&gt;

&lt;p&gt;Efficiency is not only related to automation and reuse.
What workflows the individual developer prefers also goes into consideration.&lt;/p&gt;

&lt;p&gt;This post is specifically about doing updates to dependency and plugin versions.&lt;/p&gt;

&lt;p&gt;Doing upgrades brings new features and bug fixes.
They can enhance security or performance or allow the developer to remove code that is no longer needed.
It can also require migration due to deprecations and changes to the transitive dependencies.
Migration can entail code changes, dependency management and quite excessive troubleshooting.&lt;/p&gt;

&lt;p&gt;To successfully upgrade a dependency.
The developer must find out that there are one or more new versions available.
Do the upgrade.
Verify that no unintended behavior changes appear and that the application builds.&lt;/p&gt;

&lt;p&gt;For finding out there are new versions available I have found some different tools.
One is invoking &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;versions-maven-plugin:display-dependency-updates&lt;/code&gt;.
Another is doing a search in the browser on the depency GAV on Maven Central or Maven Repository.
A third is to use an editor capable of doing queries for repositories defined in the maven settings.&lt;/p&gt;

&lt;p&gt;Changing the values in the pom can be done manually or with a tool.
Manual editing is required when migration is needed.
Using VSCode I can to both operations in one.&lt;/p&gt;

&lt;p&gt;The majority of updates (given that they are done frequently as they are in any security aware installments) are patch updates and are preferably automated.
Automation can be done as described in this post &lt;a href=&quot;https://www.baeldung.com/maven-dependency-latest-version&quot;&gt;https://www.baeldung.com/maven-dependency-latest-version&lt;/a&gt;.
With subsequent test builds and checkins.&lt;/p&gt;

&lt;p&gt;Using a capable IDE and plugins to find and update versions are important to avoid wasting time.&lt;/p&gt;

&lt;p&gt;I often see the practice where the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;properties&amp;gt;&lt;/code&gt; section is used.
This can be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;version.my-beloved-3pp&amp;gt;1.2.2&amp;lt;/version.my-beloved-3pp&amp;gt;&lt;/code&gt; and then refered in the dependency &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;version&amp;gt;${version.my-beloved-3pp}&amp;lt;/version&amp;gt;&lt;/code&gt;.
This can seem efficient when there is no BOM and you would like to avoid editing the same version in two or three places.
However, this makes it impossible to use the IDE to find and edit versions in one operation.
It also prevents use of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;versions:use-latest-versions&lt;/code&gt; with configuration to update in several places at once.
It also requires the pom maintainer to put information about a GAV in more than one place in the pom.
When dependencies are removed it easy to forget to remove the properties.
How the keys are named differ from author to author which makes mistakes more frequent.&lt;/p&gt;

&lt;p&gt;Hence I prefer to not use properties.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2019/11/09/maven-dependency-version-properties&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2019/11/09/maven-dependency-version-properties</link>
                <guid>http://andreasaronsson.github.io/programming/2019/11/09/maven-dependency-version-properties</guid>
                <pubDate>Sat, 09 Nov 2019 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Single responsibility and function reuse</title>
                <description>
&lt;p&gt;Five basics principles in &lt;a href=&quot;https://en.wikipedia.org/wiki/Object-oriented_programming&quot;&gt;OOP&lt;/a&gt; is &lt;a href=&quot;https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)&quot;&gt;SOLID&lt;/a&gt;
The first principle is &lt;a href=&quot;https://en.wikipedia.org/wiki/Single_responsibility_principle&quot;&gt;Single Responsibility Principle&lt;/a&gt;.
One reason to change leads unequivocally to smaller classes in terms of lines of code.
There are many advantages that comes from using this principle.
Classes becomes easier to test.
Classes becomes easier to reason about.
Seeing opportunities for reuse becomes easier.
The way you organize code in packages in Java makes this work.
In a different language where many classes are defined in the same compilation unit or file.
This way a module may contain a smaller number of compilation units / files.
The files on average contain more classes and functions.
Depending on how the information is visualized.
With an IDE classes could be lined up in one view.
In a pure text editor this is much more rare.
This can make it harder to spot opportunities for function reuse.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2019/09/14/single-responsibility-and-function-reuse&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2019/09/14/single-responsibility-and-function-reuse</link>
                <guid>http://andreasaronsson.github.io/programming/2019/09/14/single-responsibility-and-function-reuse</guid>
                <pubDate>Sat, 14 Sep 2019 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Anecdotal performance improvement maven jdk</title>
                <description>
&lt;p&gt;Looking through &lt;a href=&quot;https://cr.openjdk.java.net/~redestad/slides/lean_mean_openjdk.pdf&quot;&gt;this presentation on performance enhancements jdk 8 through 13&lt;/a&gt;.
And &lt;a href=&quot;https://maven.apache.org/docs/3.6.2/release-notes.html&quot;&gt;these release notes for maven-3.6.2&lt;/a&gt;.
I was inspired to see if jdk13 and maven-3.6.2 made any difference over jdk11 and maven-3.6.1.
A minimal project and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mvn validate&lt;/code&gt;.
The average build times went from about 0.45 to 0.30.
There is of course a wide variety of other things to measure using many other methods.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/code,%20programming/2019/09/14/anecdotal-performance-improvement-maven-jdk&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/code,%20programming/2019/09/14/anecdotal-performance-improvement-maven-jdk</link>
                <guid>http://andreasaronsson.github.io/code,%20programming/2019/09/14/anecdotal-performance-improvement-maven-jdk</guid>
                <pubDate>Sat, 14 Sep 2019 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Bash windows in to survive follow up</title>
                <description>
&lt;p&gt;Looking again at the &lt;a href=&quot;https://insights.stackoverflow.com/survey/&quot;&gt;Stack Overflow Developer Survey Results&lt;/a&gt;.
It is possible to calculate a trend for “Developed for Platform” category.
‘win’ for Windows Desktop or server depending on year.&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;| Year | other|  win |
|------|------|------|
| 2013 | 38.6 | 61.4 |
| 2014 | 41.2 | 58.8 |
| 2015 | 42.0 | 58.0 |
| 2016 | 47.9 | 52.1 |
| 2017 | 59.0 | 41.0 |
| 2018 | 64.8 | 35.2 |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In a five years almost half of the share is gone.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;http://venturebeat.com/2016/03/30/microsoft-is-bringing-the-bash-shell-to-windows/&quot;&gt;bash on windows improvement&lt;/a&gt; allows more developers to use Windows while developing for other platforms. 
At the same time &lt;a href=&quot;https://www.zdnet.com/article/microsoft-working-on-porting-sysinternals-to-linux/&quot;&gt;more Microsoft things are being ported to linux&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;NTFS is still the biggest gripe.
Along with very slow search and system updates.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/2018/11/14/bash-windows-in-to-survive-follow-up&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/2018/11/14/bash-windows-in-to-survive-follow-up</link>
                <guid>http://andreasaronsson.github.io/2018/11/14/bash-windows-in-to-survive-follow-up</guid>
                <pubDate>Wed, 14 Nov 2018 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>The junior and the senior developer</title>
                <description>
&lt;p&gt;Junior and senior quantifies professional maturity.
It does not describe age or years spent in the industry.
Professional maturity indicates how valuable a developer is for the employer.&lt;/p&gt;

&lt;h1 id=&quot;problem-solving&quot;&gt;Problem solving&lt;/h1&gt;

&lt;p&gt;Junior starts to think on how to solve it.
Realizes it is possible to solve.
Can see the path to the solution.
Perhaps gets a tad excited about the prospect.
Gives estimate based on how long it takes to implement.
This estimate is wrong.
It is too optimistic.&lt;/p&gt;

&lt;p&gt;Senior starts to think on how to solve it.
Takes into account the effort needed for sufficient readability.
Adds time for future maintenance and bugfixes.
Gives estimate based on as many of the above constituents as senior is capable of.
Tries hard to give as much information along the way as possible.
This estimate is wrong.
It is a little too optimistic.&lt;/p&gt;

&lt;p&gt;The outcome depends on promises made to the customer.
Perhaps developers have not been involved.
Then it might be impossible for a team of developers to do a good job.
The recipient of the feature is very disappointed with the junior.
The recipient is disappointed with the senior but respects him.&lt;/p&gt;

&lt;h1 id=&quot;maintaining-code&quot;&gt;Maintaining code&lt;/h1&gt;

&lt;p&gt;Both are very busy.&lt;/p&gt;

&lt;p&gt;Junior works hard.
Perhaps with no regard for his on stress levels.
Tries not to complain too much.
Feels important because he is in high demand.
Prefers the code written in house.
Finds reasons to keep the home grown code.&lt;/p&gt;

&lt;p&gt;Senior tries not to work too hard.
Spends a lot of time thinking about how to decrease the cost of maintenance for his employer.
If an opportunity presents itself to introduce third party code.
Then senior is keen on deleting the old code.
Unsentimentally because senior put a lot of effort into writing the code.&lt;/p&gt;

&lt;h1 id=&quot;discussions&quot;&gt;Discussions&lt;/h1&gt;

&lt;p&gt;Both advocate their ideas with a passion.&lt;/p&gt;

&lt;p&gt;Junior has a very hard time changing his mind.
Invests emotionally in arguments.
Can become offended if not listened to.&lt;/p&gt;

&lt;p&gt;When new information reaches senior.
Then senior immediately has a change of mind.
Completely devoid of prestige.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/general/2018/02/07/senior-junior-developer&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/general/2018/02/07/senior-junior-developer</link>
                <guid>http://andreasaronsson.github.io/general/2018/02/07/senior-junior-developer</guid>
                <pubDate>Wed, 07 Feb 2018 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>We cannot maintain</title>
                <description>
&lt;p&gt;A large organization involves many people working together.
A large and complex product can have many requirements.
Say we split requirements into two categories.
One relates to customers and the core business.
The other consists of functionality that a user can not immediately observe.
These things can be configuration, deployment and logging.&lt;/p&gt;

&lt;p&gt;With many teams involved it is easy to spot opportunities for reuse.
Avoid reinventing the wheel.
It is desirable to have a product that is easy to maintain.
Maximising use of available third party libraries is a given in this context.&lt;/p&gt;

&lt;p&gt;Two ways are conceivable to achieve this.
Either write your own wrapper that teams must use.
Or provide written instructions for teams to follow.&lt;/p&gt;

&lt;p&gt;With a wrapper comes the cost of maintaining the wrapper itself.
This includes maintaining well written documentation.
Teams and new team members needs education on using the wrapper.
In time the third party libraries release new versions.
They can contain new features that makes the product better or reduces work.
Then the maintainers of the wrapper may need to make changes to make the feature available.&lt;/p&gt;

&lt;p&gt;With a written instruction use audits to ensure compliance.
Any problems that occur due to non-compliance by teams are bugs.
We can assume that teams consists of talented individuals.
Following a written instruction is an easy task.
Interacting with third party libraries can be easier for a new employee.
Third party libraries with a large user base are likely to be familiar.
They also have on average well written documentation.&lt;/p&gt;

&lt;p&gt;When in doubt do not write a wrapper.
It may seem tempting as first glance.
Doing well at communicating instructions can prove a lot more efficient.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/general/2017/04/02/we-cannot-maintain&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/general/2017/04/02/we-cannot-maintain</link>
                <guid>http://andreasaronsson.github.io/general/2017/04/02/we-cannot-maintain</guid>
                <pubDate>Sun, 02 Apr 2017 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>OOP data or behaviour</title>
                <description>
&lt;p&gt;I have put a significant effort into understanding &lt;a href=&quot;https://en.wikipedia.org/wiki/Object-oriented_programming&quot;&gt;OOP&lt;/a&gt;.
Years ago I remember thinking that my knowledge was becoming mature.
An important concepts is that data and procedures to manipulate the data go together.
Applying the principles in my daily work made me reconsider some aspects.
One aspect that I started to use was to do the opposite.
Classes contained data &lt;em&gt;or&lt;/em&gt; procedures.
Actually not as clean cut as that but rather that I created two kinds of classes.
One kind I tried to make as dumb as possible.
Free from logic.
Data and accessors only.
The other kind had logic.
I wrote tests for both kinds.
The kind that contained data wasn’t very interesting to test.
We tested them anyway to please the coverage metrics gods.&lt;/p&gt;

&lt;p&gt;A handful more years have passed since then.
I have delved deep into the realms of functional programming.
Today I frown on void methods and methods without parameters.
I am much more picky about making classes members of other classes.
There are many examples of how it has affected the way I think.&lt;/p&gt;

&lt;p&gt;Thinking back I realize something.
We may have understood some of these things on a subconscious level.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2017/02/22/oop-data-or-behaviour&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2017/02/22/oop-data-or-behaviour</link>
                <guid>http://andreasaronsson.github.io/programming/2017/02/22/oop-data-or-behaviour</guid>
                <pubDate>Wed, 22 Feb 2017 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Romannumerals kata</title>
                <description>
&lt;p&gt;More &lt;a href=&quot;http://www.javaslang.io&quot;&gt;JAVASLANG&lt;/a&gt; kata!
Last time it was &lt;a href=&quot;https://andreasaronsson.github.io/programming/2016/06/19/bank-ocr-kata&quot;&gt;Bank OCR&lt;/a&gt;
This time the &lt;a href=&quot;http://codingdojo.org/kata/RomanNumerals/&quot;&gt;Roman Numerals&lt;/a&gt;.
Some usage of property based testing.
Rare cases seems hard to catch with property based testing.
Perhaps this is something I will learn to overcome when I become more proficient.&lt;/p&gt;

&lt;p&gt;Code here &lt;a href=&quot;https://github.com/andreasaronsson/kataromannumerals&quot;&gt;https://github.com/andreasaronsson/kataromannumerals&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2017/01/22/romannumerals-kata&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2017/01/22/romannumerals-kata</link>
                <guid>http://andreasaronsson.github.io/programming/2017/01/22/romannumerals-kata</guid>
                <pubDate>Sun, 22 Jan 2017 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Tests should read like prose</title>
                <description>
&lt;p&gt;Expressing solutions to problems is at the heart of programming.
Cognitive load slows you down.
Not using natural language adds to the cognitive load.
Writing software benefits from using natural language.
This is something I think of very often in my work.&lt;/p&gt;

&lt;p&gt;When using &lt;a href=&quot;http://junit.org/&quot;&gt;JUnit&lt;/a&gt; I use the Junit4 API &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;assertThat&lt;/code&gt; whenever possible.
This enables me to write&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;assertThat(result, is(expected))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Compare this to Junit3&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;assertEquals(expected, result)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Junit5 is in development.
It surprised me to see that they are using what I perceived as “Junit3 syntax”.
In the
&lt;a href=&quot;http://junit.org/junit5/docs/current/user-guide/#third-party-assertion-libraries&quot;&gt;user guide&lt;/a&gt;
we find the explanation.
The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;assertThat&lt;/code&gt; API is reserved for third party assertion libraries like hamcrest or assertj.
The more powerful API is open to extension and pluggable.&lt;/p&gt;

&lt;p&gt;An excellent choice.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2017/01/21/tests-should-read-like-prose&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2017/01/21/tests-should-read-like-prose</link>
                <guid>http://andreasaronsson.github.io/programming/2017/01/21/tests-should-read-like-prose</guid>
                <pubDate>Sat, 21 Jan 2017 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Programming across borders</title>
                <description>
&lt;p&gt;In our new reality change happens faster and faster.
This puts pressure on programs and systems to adapt to change.
Building blocks become ever larger to help meet expectations on feature deliver rates.&lt;/p&gt;

&lt;p&gt;Using as small as possible least common denominators like standard libraries and the types defined there puts a healthy pressure on the semantic intricacies that needs to be communicated.
Surprisingly often one can get the job done with less.&lt;/p&gt;

&lt;p&gt;One consequence is that large monoliths are becoming less common.
A corollary of this is that developers write smaller programs more often.
What follows is the number of boundaries increase.
We need protocols and API’s to share information.&lt;/p&gt;

&lt;p&gt;A &lt;a href=&quot;https://en.wikipedia.org/wiki/Communications_protocol&quot;&gt;protocol&lt;/a&gt; is a system of rules that allow two or more entities to communicate.
Simplicity in these rules is an advantage.
It is desirable for efficiency at scale to make the system usable and easy to change.
The amount of effort needed to understand the rules and implement them needs to be small.&lt;/p&gt;

&lt;p&gt;Abstractions like user defined types can be a way to enable code reuse.
It can limit the number of ways to do a certain operations and make it harder to make mistakes.
Abstractions can model the domain and document code.
Using a compiler capable of providing a &lt;a href=&quot;https://en.wikipedia.org/wiki/Type_system&quot;&gt;sound type system&lt;/a&gt; the usage can prove efficient.
Sometimes these abstractions comes from a third party like an open source library.&lt;/p&gt;

&lt;p&gt;When programs transmit information over a protocol the compiler is not there to help.
This means that each type or abstraction must have a representation.
The representation must follow the rules.
This requires translation.
When data reaches the receiving end translated back to the original form.
These translations can become cumbersome and are good candidates for automation and code generation.
Even when using code generation and automation.
The translated representation will often require more data transmission in the end.&lt;/p&gt;

&lt;p&gt;Communication is important to do well.
Being succinct can be hard but it has benefits.
Adding a third party library types to a programmatic API will in most cases force the user to also adopt this library.
Transmitting more data will affect performance and possibly saturate network connections.&lt;/p&gt;

&lt;p&gt;It is good to put a healthy pressure on the semantic intricacies.
Using as small as possible least common denominators helps.
These can be standard libraries and archetypal types.
Surprisingly often one can get the job done with less.
An interesting mental model to aim to emulate is the mouse with one button or &lt;a href=&quot;https://en.wikipedia.org/wiki/KISS_principle&quot;&gt;less is more&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2016/12/02/programming-across-borders&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2016/12/02/programming-across-borders</link>
                <guid>http://andreasaronsson.github.io/programming/2016/12/02/programming-across-borders</guid>
                <pubDate>Fri, 02 Dec 2016 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Bank OCR kata</title>
                <description>
&lt;p&gt;All aspects of functional features in programming languages are interesting.
This makes &lt;a href=&quot;http://www.javaslang.io&quot;&gt;JAVASLANG&lt;/a&gt; intriguing.
I have spent some
time reading up on it.
I think that it could give some of the advantages of
&lt;a href=&quot;http://www.scala-lang.org/&quot;&gt;Scala&lt;/a&gt; without some of the drawbacks.&lt;/p&gt;

&lt;p&gt;Quite often when I write something these days I feel the urge to try it with JAVASLANG.
I am especially interested in two things.
To see how hard it is to make it play nice with other parts of the vast Java ecosystem and how usage affects compile times.
Both things are pretty severe drawbacks with Scala (especially compile times).&lt;/p&gt;

&lt;p&gt;So far I am getting the notion that compile times are longer.
I have done no measurements so I won’t take that to heart.
You can find one of my experiments where most nice things are nowadays;
&lt;a href=&quot;https://github.com/andreasaronsson/katabankocr&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2016/06/19/bank-ocr-kata&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2016/06/19/bank-ocr-kata</link>
                <guid>http://andreasaronsson.github.io/programming/2016/06/19/bank-ocr-kata</guid>
                <pubDate>Sun, 19 Jun 2016 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Developers perspective on predictability and velocity</title>
                <description>
&lt;p&gt;Being agile means working towards being predictable and being fast.
Repeated measurement are a prerequisite for progress over time.
An interesting thought is that without measuring predictability and speed accountability remains a mirage.&lt;/p&gt;

&lt;h1 id=&quot;predictable&quot;&gt;Predictable&lt;/h1&gt;

&lt;p&gt;Optimum is to be able to tell in a short amount of time; minutes or days when a feature is ready.
Worst case is to promise to deliver a features and then breaking that promise.
It is easy to end up in a perpetual lie where each promise is done in earnest.
When the team then fails to deliver in time it has no repercussions.&lt;/p&gt;

&lt;h2 id=&quot;measuring-predictability&quot;&gt;Measuring predictability&lt;/h2&gt;

&lt;p&gt;The team need a data series over comparisons between prognosis and outcome.&lt;/p&gt;

&lt;h1 id=&quot;fast&quot;&gt;Fast&lt;/h1&gt;

&lt;p&gt;A feature is done when it works in production without interruptions.
Granted there are vast possibilities to interpret things.
It is important to decide what is in scope and what is not.
Success is when there is an agreement between the consumer and the producer.
The negotiating skill will play an important role.&lt;/p&gt;

&lt;h2 id=&quot;measuring-how-fast&quot;&gt;Measuring how fast&lt;/h2&gt;

&lt;p&gt;Simple in theory if you have engaged stakeholders and all features are of equal size.&lt;/p&gt;

&lt;h1 id=&quot;the-road-there&quot;&gt;The road there&lt;/h1&gt;

&lt;p&gt;One way to improve is to adopt a zero defect strategy.
This means that the team does not tolerate any outstanding issues (reported bugs or the like).
They are promptly dealt with.
Decide if it is worth the investment.
If not clearly communicate this at the earliest opportunity.
Decide if it is a bug in existing features or new functionality.
If it is a bug drop planned work and fix it.
Else put in backlog and prioritize.&lt;/p&gt;

&lt;p&gt;A second way is to measure and adress build problems.
This can be failing builds on any level (component, integration and system tests).
Count the incident rate.
Then adress the ones that occurs most often first.
It can also be execution time.
Mixing integration testing with the step where the binaries are created is a common cause.&lt;/p&gt;

&lt;p&gt;A third way is to keep things tidy.
Make sure documentation is built with the product and updated.
Remember to update or enhance the documentation whenever there are questions from users or the team itself.
Eradicate warnings and errors in the build logs.
Make ample use of static analysis to help find flaws and adress them as they are discovered.
The earlier the better.&lt;/p&gt;

&lt;p&gt;Finally there can be architectural flaws as the underlying cause for all of the above.
As soon as possible attempt to adress these flaws.
Be careful to have enough experience to have high confidence in proposed improvements.
For larger changes this is even more important.&lt;/p&gt;

&lt;p&gt;All this requires a hefty amount of discipline. 
Keep in mind that your responsibility is to maximize the output for the team in a year from now.
This means it can be pragmatic to take a shortcut at times.
However, it is hard to estimate when the shortcut is worth taking.
Extremely hard since the amount of information about the future drastically shrinks the further into the future one tries to foresee.
This makes the prospect high risk and should not be taken lightly.&lt;/p&gt;

&lt;h1 id=&quot;references&quot;&gt;References&lt;/h1&gt;

&lt;p&gt;https://www.thoughtworks.com/continuous-delivery
https://www.cprime.com/resources/what-is-agile-what-is-scrum/&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2016/06/12/developers-perspective-on-predictability-and-velocity&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2016/06/12/developers-perspective-on-predictability-and-velocity</link>
                <guid>http://andreasaronsson.github.io/programming/2016/06/12/developers-perspective-on-predictability-and-velocity</guid>
                <pubDate>Sun, 12 Jun 2016 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Bash windows in to survive</title>
                <description>
&lt;p&gt;Looking at the
&lt;a href=&quot;http://stackoverflow.com/research/developer-survey-2016&quot;&gt;Stack Overflow Developer Survey 2016 Results&lt;/a&gt;
it is possible to calculate a trend. Taking some of the figures and putting them
in an orgmode document (which is also a spreadsheet if one wishes) renders the
following table:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;| Year | *nix |  win |
|------+------+------|
| 2013 | 38.6 | 61.4 |
| 2014 | 41.2 | 58.8 |
| 2015 |  42. |   58 |
| 2016 | 47.9 | 52.1 |
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In a few years the developer share drops nearly ten percent.
&lt;a href=&quot;https://www.youtube.com/watch?v=Vhh_GeBPOhs&quot;&gt;Developers&lt;/a&gt; not so much. One can
suspect that this triggered the recent
&lt;a href=&quot;http://venturebeat.com/2016/03/30/microsoft-is-bringing-the-bash-shell-to-windows/&quot;&gt;bash on windows improvement&lt;/a&gt;
whis is excellent and will be a relief for many developers.&lt;/p&gt;

&lt;p&gt;If they replaced the NTFS file system with something better
&lt;a href=&quot;http://itvision.altervista.org/why-windows-10-sucks.html&quot;&gt;and some other things&lt;/a&gt;
it starts looking really interesting.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/general/2016/04/02/bash-windows-in-to-survive&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/general/2016/04/02/bash-windows-in-to-survive</link>
                <guid>http://andreasaronsson.github.io/general/2016/04/02/bash-windows-in-to-survive</guid>
                <pubDate>Sat, 02 Apr 2016 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Alternative error handling in maven plugin</title>
                <description>
&lt;p&gt;This is a small example for anyone writing maven plugins and feels the need for increased testability at the unit test level.&lt;/p&gt;

&lt;h2 id=&quot;on-tools-used-when-compiling-artifacts&quot;&gt;On tools used when compiling artifacts&lt;/h2&gt;

&lt;p&gt;Artifacts can be runnable programs, documentation, libraries etc.
There are many things that fall into this category; compilers, project management, analysis etc.
These tools tend to be most conservative when it comes to compatibility with other tools.
These requirements have consequences on the behaviors they exhibit and what patterns they follow.
To emphasize productivity is is important to manage complexity and enable reuse.
The paradigm &lt;a href=&quot;https://en.wikipedia.org/wiki/Convention%5Fover%5Fconfiguration&quot;&gt;convention over configuration&lt;/a&gt; combats complexity and makes reuse easier.&lt;/p&gt;

&lt;h2 id=&quot;error-handling-in-maven-plugins&quot;&gt;Error handling in maven plugins&lt;/h2&gt;

&lt;p&gt;Plugins extend the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AbstractMojo&lt;/code&gt; and implements the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;execute&lt;/code&gt; method.
Whenever a plugin wants to signal a ‘failed build’ the contract states to throw a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MojoFailureException&lt;/code&gt;.
When an unexpected problem occurs the plugin is required to throw a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MojoExecutionException&lt;/code&gt;.
&lt;a href=&quot;https://maven.apache.org/guides/plugin/guide-java-plugin-development.html&quot;&gt;Guide to plugin development&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Maven as a project management tool deals to a large extent with &lt;a href=&quot;https://en.wikipedia.org/wiki/Side%5Feffect%5F%27computer%5Fscience%28&quot;&gt;side effects&lt;/a&gt;.
Essentially maven takes a set of instructions and then produces a side effect.
Checked exceptions are a good fit in this domain.&lt;/p&gt;

&lt;h2 id=&quot;functional-principles&quot;&gt;Functional principles&lt;/h2&gt;

&lt;p&gt;In &lt;a href=&quot;https://en.wikipedia.org/wiki/Functional%5Fprogramming&quot;&gt;functional programming&lt;/a&gt; pure functions are a key part.
They have a plethora of advantages on several levels.
One of them being testability.
Say a caller wants to verify a set of inputs.
A function that always produces a return value is preferable over a function that does not.
A method that throws a checked exception may return a value, or not.
Imagine you ask someone a question that you feel is important.
Then imagine someone answering you, smiling, “Yes. Or no.”. 
An efficient way to annoy your co workers.&lt;/p&gt;

&lt;h2 id=&quot;now-for-the-example&quot;&gt;Now for the example&lt;/h2&gt;

&lt;p&gt;It will not be possible to write pure functions here.
Instead we can use a property from the pure functions.
The property to always produce a return value.
This value can be propagated or checked immediately.
Unit tests will verify it immediately.
When propagated it will be used to create a checked exception.
This is what we need to communicate with the layer above us.&lt;/p&gt;

&lt;p&gt;The usual pattern:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;methodThatWillBeCalledByExecute&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MojoExecutionException&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// Do work and throw on error&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;With the above method an error will be propagated and the build will fail.
All good but hard to test in a unit test.&lt;/p&gt;

&lt;p&gt;Using &lt;a href=&quot;https://github.com/google/guava&quot;&gt;Google guava&lt;/a&gt; or Java 8 it is possible to use the option &lt;a href=&quot;https://en.wikipedia.org/wiki/Monad%5F%27functional%5Fprogramming%28&quot;&gt;monad&lt;/a&gt; or the &lt;a href=&quot;https://en.wikipedia.org/wiki/Option%5Ftype&quot;&gt;option type&lt;/a&gt;. 
Below the Optional from Java 8 is used:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;nc&quot;&gt;Optional&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;IOException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;methodThatWillBeCalledByExecute&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;createNewFile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// write&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;IOException&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Optional&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Optional&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;absent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The above method is now a little easier to write a small test for. In the calling code, in this example the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;execute&lt;/code&gt; method, we can now use&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;throws&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MojoExecutionException&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nc&quot;&gt;Optional&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;IOException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;methodThatWillBeCalledByExecute&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;isPresent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;MojoExecutionException&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;());&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Note that the use of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;isPresent&lt;/code&gt; is considered a &lt;a href=&quot;http://mail.openjdk.java.net/pipermail/lambda-dev/2012-September/005982.html&quot;&gt;code
smell&lt;/a&gt;
and in most cases &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;getOrElse&lt;/code&gt; is prefered. Compare:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;optionVar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;isPresent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;DEFAULT_CONSTANT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;optionVar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;with the more concise&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;n&quot;&gt;optionVar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;getOrElse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;DEFAULT_CONSTANT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In the first alternative you risk making a mistake in the conditional. 
There are also more lines which hurts readability.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2015/11/29/alternative-error-handling-in-maven-plugin&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2015/11/29/alternative-error-handling-in-maven-plugin</link>
                <guid>http://andreasaronsson.github.io/programming/2015/11/29/alternative-error-handling-in-maven-plugin</guid>
                <pubDate>Sun, 29 Nov 2015 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Leading Behaviours</title>
                <description>
&lt;p&gt;Here are some thoughts on desirable behavioural patterns for developers.&lt;/p&gt;

&lt;p&gt;At first I was thinking about writing about anti-patterns in behaviour or
anti-behaviours.
That would be instant irony.
Anyways, seeing
&lt;a href=&quot;https://twitter.com/shawnbut/status/591230483117244417&quot;&gt;this clever tweet&lt;/a&gt; made
me think and the term for this would be &lt;strong&gt;Leading Behaviours&lt;/strong&gt;.
An idea here is
to coin the terms &lt;strong&gt;Leading Patterns&lt;/strong&gt; and &lt;strong&gt;Leading Behaviours&lt;/strong&gt;.
Using the
word ‘leading’ signals that they may not be leading forever which I believe is
true for both terms.
Juxtaposed to “best” - there can only be one best and one
does not expect best to change.
Not as frequent anyways.&lt;/p&gt;

&lt;p&gt;Desirable consequences of &lt;strong&gt;Leading Behaviours&lt;/strong&gt; would be to inspire others,
energize others and in general be supportive.
It should only in a way that
promotes other developers to adopt &lt;strong&gt;Leading Behaviours&lt;/strong&gt;.
&lt;a href=&quot;http://www.phrases.org.uk/meanings/give-a-man-a-fish.html&quot;&gt;This proverb&lt;/a&gt; is one
example of how one could practice leading behaviours.&lt;/p&gt;

&lt;h2 id=&quot;fearlessness&quot;&gt;Fearlessness&lt;/h2&gt;

&lt;p&gt;In a balanced approach to solving problems fear will play a small role.
Especially true in problem domains new to the individual.
This enables
developers to try out practices and tools.
This is essential when striving to
work at as high an abstraction level as possible.
It will also be a great help
to make pragmatic and earthbound decisions.
It will make it easier to
concentrate on doing the most important things rather than some peripheral
issue.
Time is spent on what is most important to a larger degree.&lt;/p&gt;

&lt;h2 id=&quot;detached-decision-making&quot;&gt;Detached decision making&lt;/h2&gt;

&lt;p&gt;Anything an individual invests much time and energy into will have a profound effect on that person.
Staying emotionally detached allows the developer to stay rational.
It will make it easier to avoid &lt;a href=&quot;http://www.logicalfallacies.info/&quot;&gt;logical fallacies&lt;/a&gt; when reasoning.
It is highly beneficial to know these by heart.
This enables one to avoid wasting time an navigate successfully in many different contexts.
Aptness to take into account all relevant factors is important.
Likewize is realizing that it is very common with trade offs when making choices.
A mind very open to new information allows rapid stance changes as any significant new information is presented.
Previous experiences and only a real help when there is no other path of reasoning available.
This is more and more true in a world where change is one of the ever fewer constants.
More important to make novel deductions from the current set if variables.&lt;/p&gt;

&lt;h2 id=&quot;emotional-involvement&quot;&gt;Emotional involvement&lt;/h2&gt;

&lt;p&gt;Various emotions and feelings are the impetus behind our actions.
Perhaps the most potent character trait of them all is passion for our field of work.
This makes developers spend that extra time and energy.
This enables them to delve deeper and excel at whatever is needed to grow mentally to be able to grasp the most enigmatic concepts.
Being dissatisfied and looking for ways to improve written and code not yet written is the hallmark of a developer that will learn massive amounts during a career.
A sign of maturity is where there is a complete objectiveness when evaluating code.
Self awareness is priceless here.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/general/2015/04/26/leading-behaviours&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/general/2015/04/26/leading-behaviours</link>
                <guid>http://andreasaronsson.github.io/general/2015/04/26/leading-behaviours</guid>
                <pubDate>Sun, 26 Apr 2015 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Is TDD dead takeaway</title>
                <description>
&lt;p&gt;Watching (again) the
&lt;a href=&quot;http://martinfowler.com/articles/is-tdd-dead/&quot;&gt;discussions about TDD&lt;/a&gt; and
subsequent &lt;a href=&quot;http://www.infoq.com/presentations/tdd-original&quot;&gt;presentations&lt;/a&gt; and
pondering them for a while I have reached an important conclusion for how I
should regard my own reactions and thought patterns.
I have come to realize that
being prepared to throw away code without giving it a second thought is a
&lt;strong&gt;Leading Behaviour&lt;/strong&gt;.
Naturally this is only the cases where the code and the
features it brings can no longer be motivated by the existence of requirements.&lt;/p&gt;

&lt;p&gt;What took longer time without me realizing it what that the same applies to tests.
Let’s say I have written tests that give me a healthy dose of confidence.
Then I can change things and be quite certain that I didn’t break anything.
Now we can roughly divide tests into two categories: tests that test how something is implemented and tests that only verify behaviour.
During implementation a test that tests how code is doing something is often quite handy.
It can help you write the code faster.
Yet as soon as the functionality is verified it instead becomes an impediment.
We are no longer free to change the code.
Maintainability is paramount.
How easy it is to change code is very important for maintainability.
It makes sense to delete these tests.
Only keep tests that verify a behavior outside in, keeping implementation details a secret from the important tests.
We would like for this not to reduce code coverage but if it does in places it is a price we should be prepared to pay.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2015/04/26/is-tdd-dead-takeaway&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2015/04/26/is-tdd-dead-takeaway</link>
                <guid>http://andreasaronsson.github.io/programming/2015/04/26/is-tdd-dead-takeaway</guid>
                <pubDate>Sun, 26 Apr 2015 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Private projects a necessity?</title>
                <description>
&lt;p&gt;Apparently, some companies make it more or less mandatory for their applicants to have one or more private projects that they are working on and being proud of.
I have been one of those people that gets completely engulfed in work for my employer for quite long stretches of time.
It certainly does not seem impossible to be among the best developers without having private projects and some dreams of creating a startup with at least one of them.
I can tell for certain that it is possible to meet people at your workplace that are significantly less interested in our field of work without spending hardly any time on private projects for years on end.
For some reason people I meet that only seem to think about creating software when they are at work prefer microsoft windows to a larger degree.&lt;/p&gt;

&lt;p&gt;Anyways, I have tried to see the advantages, especially in the long term of pouring my extra energy into private projects rather than trying to excel at my workplace.
I now think that I might be less frustrated with the shortcomings or lack of ambition of my peers.
The strong longing for using better tools - especially compilers - I can get access to way easier.
Some more blogging might help too I guess.
At this time I plan to use github and &lt;a href=&quot;https://bintray.com/&quot;&gt;bintray&lt;/a&gt;.
And if I don’t find something better I will use a jenkins instance on my personal server for building.
Already this looks significantly better compared to what I have at my workplace.
As a project I plan to rewrite an old project I worked on during my days in the students commune that I inherited from previous students but this time in a functional language.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2015/03/22/private-projects-a-necessity&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2015/03/22/private-projects-a-necessity</link>
                <guid>http://andreasaronsson.github.io/programming/2015/03/22/private-projects-a-necessity</guid>
                <pubDate>Sun, 22 Mar 2015 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Github and maven-release-plugin setup</title>
                <description>
&lt;p&gt;Assuming you have a &lt;a href=&quot;http://github.com&quot;&gt;Github&lt;/a&gt; account setup you can use the &lt;a href=&quot;http://maven.apache.org/maven-release/maven-release-plugin/&quot;&gt;maven-release-plugin&lt;/a&gt; to push the changes associated with a release to github.
Further, assuming you have set up the github account with an ssh key you can configure the maven-release-plugin to push your changes not requiring entering a password every time a release is created.
It appears to be canon to use the term “cut a release” for this activity.
Eventually I’ll get around to asking my english speaking friends about this.
Anyway, this requires you to have an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;scm&amp;gt;&lt;/code&gt; element in your project description file.
It must look like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;scm&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;connection&amp;gt;&lt;/span&gt;scm:git:git@github.com:username/projectname.git&lt;span class=&quot;nt&quot;&gt;&amp;lt;/connection&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;developerConnection&amp;gt;&lt;/span&gt;scm:git:git@github.com:username/projectname.git&lt;span class=&quot;nt&quot;&gt;&amp;lt;/developerConnection&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;url&amp;gt;&lt;/span&gt;https://github.com/username/projectname&lt;span class=&quot;nt&quot;&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/scm&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The data inside the elements is a colon separated (only the first two is significant for the plugin making up three partitions in all).
The first two parts; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scm&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git&lt;/code&gt; tells it to use the &lt;a href=&quot;https://maven.apache.org/scm/maven-scm-plugin/&quot;&gt;maven-scm-plugin&lt;/a&gt; and its git executor.
The rest is passed in as an argument.
Now to the thing that made me spend a good amount of time before getting this to work.
There is some &lt;a href=&quot;http://stackoverflow.com/questions/5948659/trailing-slash-in-urls-which-style-is-preferred&quot;&gt;debate&lt;/a&gt; on whether a “proper” URL shall end with a slash or not.
I have been in the pro-add-slash camp and yesterday I came to regret it.
It turns out that adding a trailing slash to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;developerConnection&amp;gt;&lt;/code&gt; makes the invocation of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mvn release:prepare&lt;/code&gt; fail complaining about either missing repo or failure to authorize.
The error messages led me to believe that I had constructed the data in error so I tried using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ssh://&lt;/code&gt; and slash instead of colon etc.&lt;/p&gt;

&lt;p&gt;Another problem I encountered was when I tried to use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;release:prepare-with-pom&lt;/code&gt; goal.
I was then hit by &lt;a href=&quot;http://jira.codehaus.org/browse/MRELEASE-539&quot;&gt;MRELEASE-539&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The future for maven-release-plugin is questionable.
The approach has been &lt;a href=&quot;http://axelfontaine.com/blog/final-nail.html&quot;&gt;bemoaned&lt;/a&gt; and I do see there are merits to using an alternative approach like described especially since other, well working plugins are used in combination.
It would probably be relatively easy to create a wrapper plugin to automate those tasks.
Also, when Maven 4 arrives with continuous delivery support using maven-release-plugin looks even less fitting.&lt;/p&gt;

&lt;p&gt;With hope this helps someone.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2015/03/22/github-and-maven-setup&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2015/03/22/github-and-maven-setup</link>
                <guid>http://andreasaronsson.github.io/programming/2015/03/22/github-and-maven-setup</guid>
                <pubDate>Sun, 22 Mar 2015 00:00:00 +0000</pubDate>
        </item>

        <item>
                <title>Learning Scala and functional thoughts.</title>
                <description>
&lt;p&gt;Incredibly enough it is more than two years ago now I took the &lt;a href=&quot;https://en.wikipedia.org/wiki/Massive_open_online_course&quot;&gt;MOOC&lt;/a&gt; Scala course at &lt;a href=&quot;https://www.coursera.org/&quot;&gt;Coursera&lt;/a&gt; &lt;a href=&quot;https://www.coursera.org/course/progfun&quot;&gt;Functional Programming Principles in Scala&lt;/a&gt; .
In this text I try to reminisce what the learning experience was like.&lt;/p&gt;

&lt;p&gt;Looking back now I realize it has affected me profoundly.
These days I pick other youtube videos to watch as functional programming is much more interesting.
It has also changed my way of thinking when I write code.
As I have become aware of what makes it hard to reason about the constituents more and more of my energy is spent on these things.
The course is highly rewarding and I am sure it has been improving since I participated.&lt;/p&gt;

&lt;p&gt;When I first saw the syntax I noticed the use of parenthesis instead of brackets as I was accustomed to in Java.
My thought then was ‘why change that which is not broken’.
After studying some more I realized that this was that it followed logically from the fact that ‘everything is an object &lt;em&gt;and&lt;/em&gt; a function’.
Another aha-moment for me was when I was writing tests for the code I has written.
I realized that the tests was really testing the things I was interested in testing.
The amount of bolt-and-nut problems one has to solve when working with a language this elegant is minute compared to what I do in my regular work.
Exceptions, nulls and mutating state even if only for external iteration keeps getting in my way.&lt;/p&gt;

&lt;p&gt;Functional thinking has made such a deep impression on me.
However, as always with any tool I use I soon find many things I dislike about it.
The things that prevents me from doing even more Scala today are compile times, weird inconsistencies that probably follows from putting all kinds of features into the language at a senseless pace.
This is highlighted in detail by the mesmerizing &lt;a href=&quot;https://www.youtube.com/watch?v=TS1lpKBMkgg&quot;&gt;Paul Phillips&lt;/a&gt;.
I believe that Martin Odersky is spot on with his plans to &lt;a href=&quot;http://www.scala-lang.org/news/roadmap-next&quot;&gt;simplify the language in the coming years&lt;/a&gt;.
Today it feels a bit like a research experiment to me.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/share&quot; class=&quot;twitter-share-button&quot; data-via=&quot;andreasaronsson&quot;&gt;Tweet&lt;/a&gt;&lt;/p&gt;

&lt;!-- Put this just before the closing body tag --&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;

&lt;!-- Google + --&gt;
&lt;p&gt;&lt;g:plusone size=&quot;medium&quot;&gt;&lt;/g:plusone&gt;&lt;/p&gt;

&lt;!-- Add this just before the closing body tag of your web page --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
      var po = document.createElement(&apos;script&apos;); po.type =
  &apos;text/javascript&apos;; po.async = true;
  po.src = &apos;https://apis.google.com/js/plusone.js&apos;;
      var s = document.getElementsByTagName(&apos;script&apos;)[0];
  s.parentNode.insertBefore(po, s);
  })();
  &lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.reddit.com/buttonlite.js?i=2&amp;amp;styled=off&amp;amp;url=http://andreasaronsson.github.io/programming/2014/11/23/learning-scala-and-functional-thoughts&amp;amp;newwindow=1&quot;&gt;&lt;/script&gt;

</description>
                <link>http://andreasaronsson.github.io/programming/2014/11/23/learning-scala-and-functional-thoughts</link>
                <guid>http://andreasaronsson.github.io/programming/2014/11/23/learning-scala-and-functional-thoughts</guid>
                <pubDate>Sun, 23 Nov 2014 00:00:00 +0000</pubDate>
        </item>


</channel>
</rss>
