<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lasse Schultebraucks</title>
    <description>The latest articles on DEV Community by Lasse Schultebraucks (@lschultebraucks).</description>
    <link>https://dev.to/lschultebraucks</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F17455%2F98e980da-feb4-40a5-afc5-202ea274dc2c.jpg</url>
      <title>DEV Community: Lasse Schultebraucks</title>
      <link>https://dev.to/lschultebraucks</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lschultebraucks"/>
    <language>en</language>
    <item>
      <title>German Corona warning app GitHub repo got published</title>
      <dc:creator>Lasse Schultebraucks</dc:creator>
      <pubDate>Wed, 13 May 2020 14:29:14 +0000</pubDate>
      <link>https://dev.to/lschultebraucks/german-corona-warning-app-github-repo-got-published-3l71</link>
      <guid>https://dev.to/lschultebraucks/german-corona-warning-app-github-repo-got-published-3l71</guid>
      <description>&lt;p&gt;The aim of the Corona warning app is to recognize and break through SARS-CoV-2 infection chains as quickly as possible. Users should be reliably and quickly informed about encounters with infected users of the app and thus possible transmissions of the virus so that they can voluntarily isolate themselves in order to help contain the SARS-CoV-2 pandemic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/corona-warn-app/cwa-documentation"&gt;https://github.com/corona-warn-app/cwa-documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the README:&lt;/p&gt;

&lt;p&gt;"The German government has asked SAP and Deutsche Telekom to develop the Corona-Warn-App for Germany as open source software. Deutsche Telekom is providing the network and mobile technology and will operate and run the backend for the app in a safe, scalable and stable manner. SAP is responsible for the app development, its framework and the underlying platform. Therefore, development teams of SAP and Deutsche Telekom are contributing to this project. At the same time our commitment to open source means that we are enabling -in fact encouraging- all interested parties to contribute and become part of its developer community."&lt;/p&gt;

&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;Update: the &lt;a href="https://github.com/corona-warn-app/cwa-server"&gt;backend&lt;/a&gt; got published.&lt;/p&gt;

&lt;p&gt;As a german citizen its very interesting to me, also because it is a controversial discussed topic. &lt;/p&gt;

&lt;p&gt;What do you think of such apps? &lt;/p&gt;

&lt;p&gt;Do you have similar projects in your countries?&lt;/p&gt;

</description>
      <category>corona</category>
      <category>covid</category>
      <category>opensource</category>
      <category>discuss</category>
    </item>
    <item>
      <title>The best investment you will make</title>
      <dc:creator>Lasse Schultebraucks</dc:creator>
      <pubDate>Tue, 12 May 2020 07:19:17 +0000</pubDate>
      <link>https://dev.to/lschultebraucks/the-best-investment-you-will-make-29d5</link>
      <guid>https://dev.to/lschultebraucks/the-best-investment-you-will-make-29d5</guid>
      <description>&lt;p&gt;The best investment if you are young (not only if you are young) is probably not investing all your money in assets like the stock market.&lt;/p&gt;

&lt;p&gt;You probably don't reached the highest potential of your income.&lt;/p&gt;

&lt;p&gt;So investing in yourself will probably have an higher effect on your income than investing in assets like stocks or fonds.&lt;/p&gt;

&lt;p&gt;If you have higher skills and knowledge on your field, you will earn more money.&lt;/p&gt;

&lt;p&gt;I don't say that you should not invest a little bit of your money. I build up financial resource assets since I am 18 years old.&lt;/p&gt;

&lt;p&gt;But your biggest asset is yourself. So investing in yourself should be more important to you than investing in other assets. You should always choose investing in yourself before investing in the stock market etc.&lt;/p&gt;

&lt;p&gt;In Brian Tracys book "No Excuses" he describes the 3%-formula. He says, that to guarantee your lifelong success, you should make a decision today to invest 3% of your income back into yourself.&lt;/p&gt;

&lt;p&gt;So if you are making 10,000$, invest 300$ in yourself.&lt;br&gt;
If you are making 50,000$, invest 1,500$ in yourself.&lt;br&gt;
If you are making 100,000$ invest 3,000$ in yourself.&lt;br&gt;
I think you got the point.&lt;/p&gt;

&lt;p&gt;This is definitely something that everybody can apply, no matter how much money they earn at the moment.&lt;/p&gt;

&lt;p&gt;Investing in yourself with the 3% rule will increase your income by far more than only 3%. Especially if you are young, your yearly income will increase at a high rate if you put in the effort.&lt;/p&gt;

</description>
      <category>career</category>
      <category>motivation</category>
      <category>beginners</category>
      <category>strategy</category>
    </item>
    <item>
      <title>What is your favorite Udemy course?</title>
      <dc:creator>Lasse Schultebraucks</dc:creator>
      <pubDate>Thu, 07 May 2020 12:35:29 +0000</pubDate>
      <link>https://dev.to/lschultebraucks/what-is-your-favorite-udemy-course-2dgi</link>
      <guid>https://dev.to/lschultebraucks/what-is-your-favorite-udemy-course-2dgi</guid>
      <description>&lt;p&gt;When I start learning about a new topic, I usually watch a video course on Udemy which covers a wide range of the topic.&lt;/p&gt;

&lt;p&gt;What is your favorite Udemy course?&lt;/p&gt;

&lt;p&gt;The one I learned the most about a topic was probably Angular - The complete Guide by Maximilian Schwarzmüller a couple of years ago. The course really helped me to get into the world of Angular. Even now it is getting updated and a helpful resource for me.&lt;br&gt;
But I also enjoyed Spring 5 Framework - Beginner to Guru by John Thompson a lot.&lt;/p&gt;

</description>
      <category>udemy</category>
      <category>elearning</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Basic Authentication</title>
      <dc:creator>Lasse Schultebraucks</dc:creator>
      <pubDate>Tue, 22 Jan 2019 10:41:38 +0000</pubDate>
      <link>https://dev.to/lschultebraucks/basic-authentication-1j31</link>
      <guid>https://dev.to/lschultebraucks/basic-authentication-1j31</guid>
      <description>&lt;p&gt;&lt;em&gt;First published on my &lt;a href="https://lasseschultebraucks.com/rest/security/2019/01/22/basic-authentication.html"&gt;blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In one of my latest blog posts I talked about &lt;a href="https://lasseschultebraucks.com/security/2019/01/18/introduction-to-authentication-and-authorization.html"&gt;authentication and authorization&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now I want to dive deeper and tackle common authentication methods for REST APIs.&lt;br&gt;
In this blog post I start with one of the most common and easiest way to implement authentication methods.&lt;/p&gt;
&lt;h1&gt;
  
  
  Basic Authentication (BA)
&lt;/h1&gt;

&lt;p&gt;One of the most common and easiest ways to secure a REST API is by using Basic authentication. Its a protocol which current standard is written down in &lt;a href="https://tools.ietf.org/html/rfc7617"&gt;RFC 7617&lt;/a&gt; (2015).&lt;/p&gt;

&lt;p&gt;Technical you use the HTTP headers to send information in the form of&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Authorization: Basic &amp;lt;credentials&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;where credentials is base64 encoded username (or id) and password are joined by a colon.&lt;/p&gt;

&lt;p&gt;So e.g. a User with username &lt;code&gt;user&lt;/code&gt; and password &lt;code&gt;user&lt;/code&gt; is represented in the HTTP header in the following way:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Authorization: Basic dXNlcjp1c2Vy&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dXNlcjp1c2Vy&lt;/code&gt; is a encoded base64 string of &lt;code&gt;user:user&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security
&lt;/h2&gt;

&lt;p&gt;Basic Authentication is not confidential, which means that the information can be viewed by everyone and is not private. Because Base64 can simply be encoded and decoded it is not secured information like hashed or encrypted information. &lt;/p&gt;

&lt;p&gt;Nevertheless Basic Authentication can be used in a confidential way by simply using HTTPS instead of HTTP.&lt;/p&gt;

&lt;p&gt;If you are using Basic Authentication in production, be sure to always use HTTPS!&lt;/p&gt;

&lt;h2&gt;
  
  
  Mechanism
&lt;/h2&gt;

&lt;p&gt;Because of the technical conditions the browser is required to cache the the credentials of the user. This is necessary, because the headers has to be sent within every HTTP request. &lt;/p&gt;

&lt;p&gt;Also the server has no direct way to logout a user of his session. The server can't just declare the credentials of the user as expired or invalid. But instead he can redirect the client to a URL of the site where the credentials are incorrect by purpose. Another possibility is to call a JavaScript method to clear stored credentials. But this is dependent from browser. &lt;/p&gt;

&lt;p&gt;The most and easiest way to create a log out mechanism is to send the user a 401 if the client clicked on log out and then direct him to wrong credentials like a blank user and password. In this way his previous credentials will be deleted from cache and he is successfully unauthorized.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;The actual implementation of Basic Authentication on client and server side is easy compared to other authentication methods.&lt;/p&gt;

&lt;p&gt;Plain JavaScript actually provides with &lt;code&gt;window.btoa&lt;/code&gt; a method to encode a string in base64. To save the credentials you can use the local storage in your browser.&lt;/p&gt;

&lt;p&gt;On server side you can also just decode the credentials and match them with the actual password. If you are using frameworks like Spring Boot you can write your whole Security configuration at one place. The server side code implementation of Basic Authentication is probably more costly than the client side implementation, but this also heavily depends on your chosen technologies for your backend. For most technologies you can find a fitting implementation on the internet.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Basic Authentication is an easy and fast way to implement authentication for your API and or web application. Be sure to always use HTTPS if you are in production and you are using Basic Authentication. SSL certificates are free therefore there is no excuse not to have one for your web application.&lt;/p&gt;

</description>
      <category>security</category>
      <category>auth</category>
      <category>authentication</category>
      <category>basicauthentication</category>
    </item>
    <item>
      <title>Introduction to Java Stream API</title>
      <dc:creator>Lasse Schultebraucks</dc:creator>
      <pubDate>Sun, 20 Jan 2019 17:51:10 +0000</pubDate>
      <link>https://dev.to/lschultebraucks/introduction-to-java-stream-api-31ie</link>
      <guid>https://dev.to/lschultebraucks/introduction-to-java-stream-api-31ie</guid>
      <description>&lt;p&gt;&lt;em&gt;First published on my &lt;a href="https://lasseschultebraucks.com/java/2019/01/20/introduction-to-java-stream-api.html"&gt;blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Java Stream API is there since Java 8. It is used to express computation on data is a short and elegant way. In the following post I will introduce you to the most common methods to give you an idea what you can achieve with the Java Stream API.&lt;/p&gt;

&lt;h1&gt;
  
  
  Streams vs Collections
&lt;/h1&gt;

&lt;p&gt;Before jumping right into the code I want to explain the difference between Streams and Collections. It is clear that both have properties in common, they can both be iterated for example. You can iterate through Collection external with e.g. for each loops. Instead you don't loop explicit through streams. You express your computations in a functional way and the Stream API deals for iterations internally. Also the Stream API is lazy, its elements are computed or fetched via network by demand. Collections are a in memory data store which means that every element in your Collection has to be computed and stored in your RAM before you can access it. But this does not mean that you can't use streams for already computed data. It rather makes Streams more flexible than Collections in specific situations. You also can create Streams out of Collection based data structures as I will do in the following examples.&lt;/p&gt;

&lt;h1&gt;
  
  
  Examples
&lt;/h1&gt;

&lt;p&gt;In the following I will show you some examples of the usage of Streams and I will also compare my solution to the classical programming approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;filter&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If you want to filter a list, you can just use &lt;code&gt;filter&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let's assume we have a list of words.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;words&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Abra"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Kadrabra"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Aloha"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now we want to filter all words which starts with a capital A and print them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;word&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;word&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;startsWith&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"A"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;forEach&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;println&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We actually use two stream methods here. First we transform the list to a stream and filter and words which starts with a capital A. On the resulting stream we are printing out every word with &lt;code&gt;System.out.println&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;You probably have seen similar lambda expressions like the on in the &lt;code&gt;filter&lt;/code&gt; before, but maye you have not seen many which I used in the &lt;code&gt;forEach&lt;/code&gt; method. &lt;code&gt;System.out::println&lt;/code&gt; is just syntactic sugar for following lambda expression: &lt;code&gt;x -&amp;gt; System.out.println(x)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We can also write the code by not using streams by simply using a for loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;word&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;word&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;startsWith&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"A"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;word&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This solution is in my opinion less elegant and can be written more expressive as I showed in the upper code snippet.&lt;/p&gt;

&lt;p&gt;We can even improve our Stream example by creating a method for the &lt;code&gt;startsWith&lt;/code&gt; condition in a external method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="n"&gt;words&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;StreamExamples:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;startsWithA&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;forEach&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;println&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;boolean&lt;/span&gt; &lt;span class="nf"&gt;startsWithA&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;word&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;word&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;startsWith&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"A"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;code&gt;sum&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;With the Stream API you also never have to write code like this again&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Integer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Integer&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Instead you can write&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;mapToInt&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;Integer:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;intValue&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;which does exactly the same as the upper code snippet.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;map&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;map&lt;/code&gt; projects every element of a stream into another form. As I used &lt;code&gt;mapToInt&lt;/code&gt; to project the element to Int's, I can use map to project every element of a stream in to a new element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;map&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;forEach&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;println&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;A traditional approach of writing this code would be following snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Integer&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;squaredNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;squaredNumber&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;code&gt;flatMap&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Next lets assume we have following data source:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Integer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;matrix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Our task is it now to sum up all element in the matrix.&lt;/p&gt;

&lt;p&gt;To flat the data structure we can use &lt;code&gt;flatMap&lt;/code&gt;. It concatenates streams and generates a single stream as a result. So to compute the sum, we can use first &lt;code&gt;flatMap&lt;/code&gt; to concatenate multiple streams into one and then use &lt;code&gt;mapToInt&lt;/code&gt; and &lt;code&gt;sum&lt;/code&gt; as shown in the upper example of &lt;code&gt;sum&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;matrix&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;flatMap&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;Collection:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;mapToInt&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;Integer:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;intValue&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;flatMap&lt;/code&gt; allows use to abstain from for-loops in for-loops and write elegant code in one line.&lt;/p&gt;

&lt;p&gt;Your colleagues will thank you if they pull your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;collect&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Last but not least you can transform a stream into a traditional data structure by using &lt;code&gt;collect&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Integer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Integer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;evenNumbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;collect&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Collectors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toList&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;I have uploaded all examples to my &lt;a href="https://github.com/LSchultebraucks/StreamAPIExamples/blob/master/src/StreamExamples.java"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Java 8 introduced Java Streams which allows us to express data processing queries in a short functional and elegant way. There are many more operations to explore, this post should just gave you an introduction to the Stream API. I hope you are motivated now to use the Stream API next time when you are using Java.&lt;/p&gt;

</description>
      <category>java</category>
      <category>streams</category>
      <category>functional</category>
    </item>
    <item>
      <title>Introduction to Authentication and Authorization</title>
      <dc:creator>Lasse Schultebraucks</dc:creator>
      <pubDate>Fri, 18 Jan 2019 10:19:41 +0000</pubDate>
      <link>https://dev.to/lschultebraucks/introduction-to-authentication-and-authorization-1bio</link>
      <guid>https://dev.to/lschultebraucks/introduction-to-authentication-and-authorization-1bio</guid>
      <description>&lt;p&gt;&lt;em&gt;First published on my &lt;a href="https://lasseschultebraucks.com/security/2019/01/18/introduction-to-authentication-and-authorization.html"&gt;blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Lately I have dealt a lot of with authentication and authorization. Therefore I will probably blog a little bit more about these topics in the next weeks. But before that happens I want to talk about specific technologies and tools I want to talk a little bit about the basics.&lt;/p&gt;

&lt;p&gt;First let's understand what authentication and authorization is.&lt;/p&gt;

&lt;h1&gt;
  
  
  Authentication
&lt;/h1&gt;

&lt;p&gt;Authentication is the process of verifying that a claimed property is true. In the context of IT a machine or a person claims to be someone, e.g. some entity and proves someone, e.g. a server where he wants to fetch some resources from, that&lt;br&gt;
he is actually the one he claims to be. In the process of authentication not only the claim but also the confirmation of the claim is involved. So if the confirmation has successfully happened, the authentication has been successful, else the authentication failed because the person who claims to own an identity failed to prove it.&lt;/p&gt;

&lt;p&gt;Every time you log in to a website you use authentication to prove the website server that you are actually the person you claims to be. Without a secure authentication everybody could just claim to be someone else.&lt;/p&gt;

&lt;h1&gt;
  
  
  Authorization
&lt;/h1&gt;

&lt;p&gt;After the process of authentication has successfully happened, an authorization process decides which resources you can access. So authorization is basically about distributing roles, rights and privileges and making sure that nobody can see or modify resources which are out of their scope. &lt;/p&gt;

&lt;p&gt;Therefore authorization makes sure that just you - and the admins of a website - can make changes to your posted content. Just imagine that everybody could modify content on the web after a successful authentication process. There would be more than just chaos.&lt;br&gt;
Also limiting the reading of resources is very important. Not everybody should see private shared content or sensitive data.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Authentication and Authorization is very important for securing resources and limiting access in the whole IT.&lt;/p&gt;

&lt;p&gt;That's for now. In the next post I want to talk more about different authentication methods and Identity Provider.&lt;/p&gt;

</description>
      <category>security</category>
      <category>authentication</category>
      <category>authorization</category>
    </item>
    <item>
      <title>Don't Think Technology orientated - Think Solution orientated</title>
      <dc:creator>Lasse Schultebraucks</dc:creator>
      <pubDate>Tue, 04 Dec 2018 18:35:50 +0000</pubDate>
      <link>https://dev.to/lschultebraucks/dont-think-technology-orientated---think-solution-orientated-3f99</link>
      <guid>https://dev.to/lschultebraucks/dont-think-technology-orientated---think-solution-orientated-3f99</guid>
      <description>&lt;p&gt;&lt;a href="https://lasseschultebraucks.com/life/work/2018/12/04/dont-think-technology-orientated-think-solution-orientated.html"&gt;Fist published on my homepage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A problem I always had and I think every developer has is that the amount of diverse and interesting technologies out there is huge. It is BIG and you could literally jump from one to the other every day.&lt;/p&gt;

&lt;p&gt;Yesterday I had a very interesting conversation with a senior developer. We talked about different things among others about technologies and the rapid change of technologies. I told him that I always have problems to keep on one project and I just jump after a couple of weeks after I have played and get started with a new technology like a framework or a new programming language and then jumped to another one. He responded that this is probably the wrong way and I should act more solution orientated rather than technology orientated.&lt;/p&gt;

&lt;p&gt;What did he mean by that? Is it wrong to learn different technologies and different programming languages?&lt;/p&gt;

&lt;p&gt;Of course not. But it is probably wrong to live technology driven instead of solution driven. I mean it is super nice to always keep up with technology and stay on the hype train, but once this is super hard and you will never become an expert in anything by that. The senior developer I talked to called himself a Full Stack, but not because he always keep up with the latest and different JavaScript frameworks. He applies new technologies to problems the want to solve and therefore builds real solutions instead of just playing with new technology.&lt;/p&gt;

&lt;p&gt;Next he also suggested me to contribute on Open Source project if I have no idea for a own project. There a multiple reasons why you should contribute to Open Source software as a developer and I don’t want to go into detail here rather I want to point out some points. With your specific expertise you can make huge impacts, even it is a trivial and simple task for you. And you don’t also give your work to others you will learn a lot by contributing to Open Source.&lt;/p&gt;

&lt;p&gt;All in all the conversation made two points clear for me: First think solution orientated rather than technology orientated. It will bring your skill set further even if you want to be a Full Stack developer. Next contributing to Open Source can be very important for you as a Junior Developer. It is basically a win win win situation. You will learn something new, you will create real value and your will create attention to potential employers.&lt;/p&gt;

&lt;p&gt;This post should remind me about the points that got clear for me after the conversation. I hope this will help also other young developers who want to learn and grow.&lt;/p&gt;

</description>
      <category>technology</category>
      <category>solution</category>
      <category>junior</category>
      <category>opensource</category>
    </item>
    <item>
      <title>A Short History of Artificial Intelligence</title>
      <dc:creator>Lasse Schultebraucks</dc:creator>
      <pubDate>Sun, 17 Dec 2017 19:14:17 +0000</pubDate>
      <link>https://dev.to/lschultebraucks/a-short-history-of-artificial-intelligence-7hm</link>
      <guid>https://dev.to/lschultebraucks/a-short-history-of-artificial-intelligence-7hm</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;a href="https://lasseschultebraucks.com/ai/machine%20learning/2017/12/17/a-short-history-of-artificial-intelligence.html" rel="noopener noreferrer"&gt;First published on lasseschultebraucks.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What is Artificial Intelligence? What has Artificial Intelligence reached in the past? What are appreciable milestones of Artificial Intelligence in the last years? What will Artificial Intelligence solve in 5 years, 20 years, 50 years or 100 years from now? And how will look Artificial Intelligence the future?&lt;/p&gt;

&lt;p&gt;There are many question around Artificial Intelligence. We already can answer some of them and talk about what we have solved with Artificial Intelligence in the past.&lt;/p&gt;

&lt;p&gt;On the other hand talking about future scenarios, especially if we talk about superintelligence, turns out difficult. But there are some scenarios we can think and evaluate about.&lt;/p&gt;

&lt;h2&gt;
  
  
  Definition of Artificial Intelligence
&lt;/h2&gt;

&lt;p&gt;Artificial Intelligence is a term, which consists of two words.&lt;/p&gt;

&lt;h3&gt;
  
  
  Artificial
&lt;/h3&gt;

&lt;p&gt;Artificial is something that is not real and which is kind of fake because it is simulated. The simplest thing what I can think of which is artificial is artificial grass. Artificial grass is not real grass, so it is kind of fake. It is used to substitute real grass for various reason. Artificial grass is often used for sports, because it is more resistant and therefore can be used longer than real grass. It is also easier to care than real grass. I am sure there are many more reason for artificial grass and against real grass. But that is not the point I want to make. The point is, that there are reasons why some things are artificial and substitute real things.&lt;/p&gt;

&lt;h3&gt;
  
  
  Intelligence
&lt;/h3&gt;

&lt;p&gt;Intelligence is are very complex term. It can be defined in many different ways like logic, understanding, self-awareness, learning, emotional knowledge, planning, creativity and of course problem solving.&lt;/p&gt;

&lt;p&gt;We call us, humans, intelligent, because we all do this mentioned things. We perceive our environment, learn from it and take action based on what we discovered.&lt;/p&gt;

&lt;p&gt;The same applies to animals. The interesting point about intelligence on animals is, that there are many different species and because of that we can compare intelligence on between species.&lt;/p&gt;

&lt;p&gt;In both cases (human intelligence and animal intelligence) we talk about natural intelligence (NI).&lt;/p&gt;

&lt;p&gt;Next to humans and animals there has been argued about plant intelligence. Intelligence in plants shows off kind of different from humans or animals. The main reason is here because plants are not having a brain or neuronal network, but they react to their environment. Plant intelligence is a very interesting topic on its own, because plant intelligence is not instantly visible through reactions through movement or lute.&lt;/p&gt;

&lt;p&gt;If we talk about Artificial Intelligence (AI) we refer to a subfield of Computer Science. Artificial Intelligence is acted by machines, computers and mainly software. Machines mimic, here we see why it is called artificial, some kind of cognitive function based on environment, observations, rewards and learning process.&lt;/p&gt;

&lt;p&gt;To understand more about Artificial Intelligence we look at the history of Artificial Intelligence to see what Artificial Intelligence is capable of and how his status quo is related to the present.&lt;/p&gt;

&lt;h2&gt;
  
  
  History and Milestone of Artificial Intelligence
&lt;/h2&gt;

&lt;p&gt;The history of Artificial Intelligence is quite interesting and started around 100 years ago.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rossum’s Universal Robots (R.U.R.)
&lt;/h3&gt;

&lt;p&gt;In 1920 the Czech writer Karel Čapek published a science fiction play named Rossumovi Univerzální Roboti (Rossum’s Universal Robots), also better known as R.U.R. The play introduced the word robot. R.U.R. deals about a factory, which creates artificial people named as robots. They differentiate from today’s term of robot. In R.U.R. robots are living creatures, who are more similar to the term of clones. The robots in R.U.R. first worked for the humans, but then there comes are robot rebellion which leads to the extinction of the human race.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F209elmpivkfafb66m1yy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F209elmpivkfafb66m1yy.jpg" width="566" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The play is quite interesting, because of different reason. First it is introducing the term robot, even if represents not exactly the modern idea of robots. Next it is also telling the story of the creation of robots, so some kind of artificial intelligence, which first seems to be a positive effect to the humans, but later on the is the robot rebellion which threat the whole human race.&lt;/p&gt;

&lt;p&gt;Artificial Intelligence in literature and movies is a big topic for its own. The example of R.U.R. should have shown the importance and influence for Artificial Intelligence on researches and society.&lt;/p&gt;

&lt;h3&gt;
  
  
  Alan Turing
&lt;/h3&gt;

&lt;p&gt;Alan Turing was born on 23th June 1912 in London. He is widely known, because the encrypted the code of the enigma, which were used from Nazi Germany to communicate. Alan Turing’s study also led to his theory of computation, which deals about how efficient problems can be solved. His presented his idea in the model of the Turing machine, which is today still a popular term in Computer Science. The Turing machine is an abstract machine, which can ,despite the model’s simplicity, construct any algorithm’s logic. Because of discoveries in neurology, information theory and cybernetics in the same time researches and with them Alan Turing created the idea that it is possible to build an electronic brain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fft2jheyaftk7z4ntrex2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fft2jheyaftk7z4ntrex2.png" width="661" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some years after the end of World War 2, Turing introduced his widely known Turing Test, which was an attempt to define machines intelligent. The idea behind the test was that are machine (e.g. a computer) is then called intelligent, if a machine (A) and a person (B) communicate through natural language and a second person (C), a so-called elevator, can not detect which of the communicators (A or B) is the machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Dartmouth conference
&lt;/h3&gt;

&lt;p&gt;In 1956 there was probably the first workshop of Artificial Intelligence and with it the field of AI research was born. Researcher from Carnegie Mellon University (CMU), Massachusetts Institute of Technology (MIT) and employee from IBM met together and founded the AI research. In the following years they made huge process. Nearly everybody was very optimistic.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Machines will be capable, within twenty years, of doing any work what man can do.” – Herbert A. Simon (CMU)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Within a generation … the problem of creating ‘artificer intelligence’ will substantially be solved” – Marvin Minsky (MIT)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That was in the 1960s. The progress slowed down in the following years. Because of the failing recognizing of the difficulty of the tasks promises were broken.&lt;/p&gt;

&lt;h3&gt;
  
  
  The first AI Winter
&lt;/h3&gt;

&lt;p&gt;Because of the over optimistic settings and the not occurred breakthroughs U.S. and British government cut of exploratory research in AI. The following years were called (first) AI Winter. The enthusiasm was lost, nobody wanted to fund AI research. The interest of publicity on Artificial Intelligence decreased. This was around 1974.&lt;/p&gt;

&lt;h3&gt;
  
  
  Expert Systems
&lt;/h3&gt;

&lt;p&gt;After the first AI Winter, Artificial Intelligence came back in a form of so-called “expert systems”.&lt;/p&gt;

&lt;p&gt;Expert systems are programs that answer question and solve problems in a specific domain. They emulate an expert in a specific branch and solve problems by rules. There are two types of engines in expert systems: First, there is the knowledge engine, which represents facts and rules about a specific topic. Second, there is the inference engine, which applies the rules and facts from the knowledge engine to new facts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Synthesis of Integral Design
&lt;/h4&gt;

&lt;p&gt;In 1981 an expert system named SID (Synthesis of Integral Design) designed 93% of the VAX 9000 CPU logic gates. The SID system was existing out of 1,000 hand-written-rules. The final design of the CPU took 3 hours to calculate and outperformed in many ways the human experts. As an example, the SID produced a faster 64-bit adder than the manually designed one. Also the bug per gate rate, which where around 1 bug per 200 gates from human experts, was much lower at around 1 bug per 20,000 gates at the final result of the SID system.&lt;/p&gt;

&lt;h3&gt;
  
  
  The second AI Winter
&lt;/h3&gt;

&lt;p&gt;The second AI Winter came in the later 80s and early 90s after a series of financial setbacks. The fall of expert systems and hardware companies who suffered through desktop computers built by Apple and IBM led again to decreasing AI interest, on the one hand side from publicity and on the other side from investors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deep Blue
&lt;/h3&gt;

&lt;p&gt;After many ups and downs Deep Blue became the first chess computer to beat a world chess champions, Garry Kasparov. On 11 May 1997 IBM’s chess computer defeated Garry Kasparov after six games with 3½–2½.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8cu1epvpicqd7y0cc4w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8cu1epvpicqd7y0cc4w.jpg" width="332" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deep Blue used tree search to calculate up to a maximum of 20 possible moves. It evaluated positions by a value function mainly written by hand, which was later optimized by analyzing thousand of games. Deep Blue also contained an opening and endgame library of many grandmaster games.&lt;/p&gt;

&lt;p&gt;In 1997 DeepBlue was the 259th most powerful supercomputer with 11.38 GFLOPS. In comprising: The most powerful supercomputer in 1997 had 1,068 GFLOPS and today (December 2017) the most powerful supercomputer has 93,015 GFLOPS.&lt;/p&gt;

&lt;p&gt;FLOPS stand for floating-point operations per second and the ‘G’ in GFLOPS stands for Giga. So the equivalent of 1 GFLOPS are 10⁹ FLOPS.&lt;/p&gt;

&lt;h3&gt;
  
  
  21st Century: Deep learning, Big Data and Artificial General Intelligence
&lt;/h3&gt;

&lt;p&gt;In the last two decades, Artificial intelligence grow heavily. The AI market (hardware and software) has reached $8 billion in 2017 and the research firm IDC (International Data Corporation) predicts that the market will be $47 billion by 2020.&lt;/p&gt;

&lt;p&gt;This all is possible through Big data, faster computers and advancements in machine learning techniques in the last years.&lt;/p&gt;

&lt;p&gt;With the usage of Neural Networks complicated tasks like video processing, text analysis and speech recognition can be tackled now and the solutions which are already existing will become better in the next years.&lt;/p&gt;

&lt;h3&gt;
  
  
  Atari Games
&lt;/h3&gt;

&lt;p&gt;In 2013 DeepMind, one of the world’s foremost AI research, introduced an AI which could play a couple of Atari games on top of a level of human players. This first seems not very expressive, but they just used reinforcement learning and neural networks to let the AI self learn these games. Also they just used the pixels as an input to the agent, so there was no direct reward score given to the agent depending on the moves he did.&lt;/p&gt;

&lt;p&gt;In 2015 they further introduced a smarter agent, who successfully played 49 classic Atari games by itself.&lt;/p&gt;

&lt;p&gt;Next to classic games from old retro consoles DeepMind is developing an AI for more complex game, like e.g. Starcraft 2. Starcraft 2 is a Real Time Strategy (RTS) game, which is the most popular 1 vs.1 E-Sport title. Starcraft 2 is very popular in South Korea and the best Starcraft 2 pro player come from South Korea. Nevertheless there are many European and North American pro player who play for living. Starcraft 2 is a much more complex game than classic video games: There are much more possible actions you can do, you do not know everything about your opponent and you have to scout him to explore what he is doing. In Starcraft 2 there are also dozens of strategy decision to choose from every minute and in general much more to care about comparing to classic video games.&lt;/p&gt;

&lt;p&gt;The current AI is not very good at the moment and it only can play mini games like building units. About the Starcraft 2 AI I am very exciting about, because I am a big Starcraft 2 fan and I am exciting about how the AI will change the Starcraft 2 meta game and what new tactics it will explore.&lt;/p&gt;

&lt;h3&gt;
  
  
  AlphaGo
&lt;/h3&gt;

&lt;p&gt;Next to classic Atari games, DeepMind also managed to defeat the world best human Go player with his AI AlphaGo. In October 2015 they first defeated the European Go champion Fan Hui five to zero. After the match there was a lot of skeptics in the Go scene about AlphaGo, because Fan Hui is ‘only’ an 2-dan (out of 9-dan, which is best) European Champion. Therefore the DeepMind team flew to South Korean to face Lee Sedol, a 9-dan Go Player. Lee Sedol is known as one of the best Go players in the world. After DeepMind managed to win the first 3 matches Lee Sedol seemed very desperate. But in the fourth game AlphaGo lost after it made an obvious mistake. In the last match AlphaGo could win again. In the end AlphaGo managed to win with 4-1 against Lee Sedol.&lt;/p&gt;

&lt;p&gt;If you are more interested in the story about AlphaGo I recommend the movie about it. In my opinion the movie is great and shows, next to the technical impact of the AI, the impact on the Go community.&lt;/p&gt;

&lt;p&gt;In 2017 DeepMind published the next generation of AlphaGo. AlphaGo Zero is build up on reduced hardware and just learned Go to play against itself. After three days of training AlphaGo Zero was stronger than the version of AlphaGo who defeated Lee Sedol and won against his younger version with 100-0. After 40 days of training it also defeated his former version of AlphaGo Zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is coming next?
&lt;/h2&gt;

&lt;p&gt;Well nobody knows and I also do not know.&lt;/p&gt;

&lt;p&gt;This answer is probably very unsatisfying, therefore let’s talk about possible scenarios.&lt;/p&gt;

&lt;h3&gt;
  
  
  Artificial General Intelligence, Superintelligence – AI takeover?
&lt;/h3&gt;

&lt;p&gt;Until now there has been also some Artificial Intelligence systems who were specialists, e.g. AlphaGo (Zero), who has mastered Go and could outperform human Grandmaster player. But there is no Artificial General Intelligence (AGI) yet. AGI refers to an Artificial Intelligence, who could successfully perform any intellectual task that a human being can. The Turing test is one example to test if an AI is an AGI.&lt;/p&gt;

&lt;p&gt;Superintelligence takes AGI to the next stage. superintelligence refers to an AGI, who is smarter than a human and can outperform a human in any intellectual task that a human being can.&lt;/p&gt;

&lt;p&gt;The question, when there will be AGI and when there will be superintelligence, is of course difficult to answer (as nearly all answers who refers to future prediction). Nick Bostrom, who is a AI research on Oxford University, evaluates this question in a paper.&lt;/p&gt;

&lt;p&gt;The AI takeover refers to the scenario, that a superintelligence will take over the world and will fight against the human race. It is a popular science fiction theme and it is started to use 100 years ago in R.U.R. and still being used in more modern movies like Terminator or Matrix. So is it only fiction or is it possible, that AI can take over the world one day?&lt;/p&gt;

&lt;p&gt;I am not 100% sure about it. I favor more the opinion about that there will no AI takeover. But there are also many people like Elon Musk, Stephen Hawking and Bill Gates who are concerned about possible the possibilities of AI. Therefore I think we should not call AI takeover as a pure fiction scenario, we should be aware of it and act responsible.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you are interested in the topic of AGI and Superintelligence, I recommend you the read the book by Nick Bostrom “Superintelligence – Path, Dangers, Strategies”.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;There are already Artificial Intelligence systems who can outperform humans in specifics areas, like e.g. playing GO or data analysis. Today, if we talk about Artificial Intelligence systems in production we refer to specialists. But there in no Artificial General Intelligence (AGI) yet, who can perform like a human, and neither there is a superintelligence, who is smarter than a human being.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://lasseschultebraucks.com/artificial-intelligence-history" rel="noopener noreferrer"&gt;First published on lasseschultebraucks.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
