<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[RSQ Technologies - Medium]]></title>
        <description><![CDATA[RSQ aims at globalizing healthcare through beautifully designed software. To achieve this goal it is crucial to work at an intersection of medicine, software, art and design. We provide the best tools for those who care for our health and try to make their lives easier. - Medium]]></description>
        <link>https://medium.com/rsq-technologies?source=rss----312588f2ae19---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>RSQ Technologies - Medium</title>
            <link>https://medium.com/rsq-technologies?source=rss----312588f2ae19---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 17:08:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/rsq-technologies" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The lone genius myth: not so genius?]]></title>
            <link>https://medium.com/rsq-technologies/the-lone-genius-myth-not-so-genius-c036f08824bd?source=rss----312588f2ae19---4</link>
            <guid isPermaLink="false">https://medium.com/p/c036f08824bd</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[creative-process]]></category>
            <category><![CDATA[creativity]]></category>
            <category><![CDATA[teamwork]]></category>
            <dc:creator><![CDATA[Joanna Januszewska]]></dc:creator>
            <pubDate>Sun, 27 Nov 2022 14:04:32 GMT</pubDate>
            <atom:updated>2022-11-28T11:39:43.902Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Drake meme Teamwork Lone Wanderer painting versus Spongebob and Patric by Joanna Januszewska" src="https://cdn-images-1.medium.com/max/1024/1*1Z2iuIcUTe8I7_RB2prPdA.jpeg" /><figcaption>credits: JJanuszewska</figcaption></figure><p>Have you ever dreamed about being a genius? 🧐</p><p>I have. In my career as a designer, I was often egocentric and convinced about my omnipotence in creation. Sometimes it would negatively impact my projects. I didn’t consult them with anyone. Such a genius I was.</p><p>What is more, I kept on reassuring myself that I should not share my ideas with anyone — I thought that it would destroy my image as a good designer. In reality, the only thing I was destroying was my ability to grow. Unconsciously, I was letting my ego limit my creative potential, which was resulting in worse designs.</p><p>Now I know that it might have been a result of believing in the lone genius myth. <br>As Thomas Carlyle (a XIXth century Scottish cultural critic, historian, philosopher) had said:</p><blockquote><strong>‘The history of the world is but the biography of great men.’</strong></blockquote><p>Oh, and I was so into that! When I was in my twenties, I was consuming <br>as many biographies as I was able to: Walt Disney, John Lennon, Steve Jobs (obviously, all respectable journals in my industry would make sure to never miss his name).</p><p>Of course, I wanted to become a famous artist, a star just like one of them. <br>I was determined to find a way to do it.</p><p>Sweet Lord, my thinking was so wrong.</p><p>While I was busy studying their lives, searching for good strategies, I wasn’t seeing one important element: the other people, who helped these stars rise to their glory.</p><h3>The lone genius myth</h3><p>Back in 1995, researchers Alfonso Montuori and Ronald E. Purser deconstructed the lone genius myth in a study as ‘the problematic nature of a hyper-individualistic understanding of creativity’. The beginning of the lone genius myth can be found in the European Renaissance. That era sought to capture the experience of an exceptional individual, such as Leonardo da Vinci, also known as ‘the Renaissance man’​​.</p><p>During the Renaissance, individualism was celebrated more than ever before. It was to oppose the medieval idea of creating in the name of God. At that time, a single man, a mere individual was putting himself in the center of creation, single-handedly assuming the role of God.</p><p>Focusing on individuality gained a new life in Romanticism, another era promoting the uniqueness of artistic expression, based on personal feelings, which can be seen in Lord Byron’s writings. This divine perception of a man, a genius, standing alone in front of a sea (as in a romantic painting of ‘Wanderer above the Sea of Fog’) can seem obvious and easy to accept. Such a powerful individual brings a sense of nobility.</p><figure><img alt="Painting by Caspar David Friedrich Wanderer Above the Sea of Fog in article of Joanna Januszewska" src="https://cdn-images-1.medium.com/max/848/1*_1mhVcCAgTwwwNg3e0EB1Q.jpeg" /><figcaption>‘Wanderer above the Sea of Fog’, Caspar Friedrich, 1818</figcaption></figure><p>The lone genius myth was eventually reinforced in the United States, as an idea of a ‘self-made man’, which was a classic phrase forged in 1842 by Henry Clay in the United States Senate, to describe an individual, who became successful through his own actions.</p><p>Multiple examples of ‘self-made men’ and lone geniuses intimidate us. <br>It’s very difficult to put ourselves in their shoes and pretend to be their creative and self-sufficient equals. That pressure can easily block our initial desire for creation — if we are not even close to a golden standard of a genius, should we even bother to start a piece? This exact striving for perfection was often paralyzing me and leading to procrastination.</p><h3>Sistine Chapel — not-so-exclusive Michelangelo’s work</h3><p>The ‘lone genius’ myth is just a romantic and illusive narrative, as history proves. Let’s go back to a Renaissance monumental piece of art, the Sistine Chapel ceiling. Authorship is credited to Michelangelo, however, the final effect was a complex project of seven artists. It’s highly doubtful that Michelangelo would be able to finish the project by himself, having known his lack of expertise in fresco techniques and his admiration <br>for time-consuming details.</p><p>Michelangelo asked for help from a trusted friend from Florence, Francesco Granacci, a painter, whom he met during his studies. <br>Granacci was an easy-going man, not eager for artistic competition. <br>His tempered character and willingness to acknowledge Michelangelo’s supremacy led to a fruitful collaboration.</p><p>In this duet, Michelangelo was the great <strong>visionary</strong>, while Granacci was there to help him execute his concept (he was the <strong>producer</strong>, as suggested in ‘Power of two’ by Joshua W. Shenk).</p><figure><img alt="Sistine Chapel Ceiling by Michaelo Angelo and others in article of Joanna Januszewska" src="https://cdn-images-1.medium.com/max/1024/1*YVvR859Q6FD9U4joi1D6ag.png" /><figcaption><strong>The Sistine Chapel ceiling, 1512</strong></figcaption></figure><p>Even though Michelangelo loved to work alone, he trusted Granacci and his opinion to hire assistants. The scope of work was immense. The first stage was removing old plasters from the ceiling, to create the new ones, as <br>a canvas for painters. Michelangelo had no idea how to do it, so Granacci hired Pietro Rosselli. The canvas measured 12 000 square meters, so Granacci asked another four painters to cover the blank areas left out by the master. Michelangelo was simply unable to finish the painting on his own. We focused here on the artists only, skipping the whole construction team, building scaffolding 20 meters high! They all were essential in turning such an immense idea into reality.</p><figure><img alt="Sistine Chapel Ceiling authorship scheme by Joanna Januszewska" src="https://cdn-images-1.medium.com/max/1024/1*TJQroT1VAvaOUFdPl3wVkw.jpeg" /><figcaption><strong>Credits: JJanuszewska</strong></figcaption></figure><h3>So — is it worth designing in pairs?</h3><p>Let’s run with a basic question: is working in a pair better than working alone?</p><p>Science proves that working in a pair has the most effective and inspiring dynamic — better than being alone, in a triangle or a more complex group. A group of two people can be more creative and flexible, more easily adjustable to external or internal factors. An individual in a pair has an equal chance of being seen, both in struggle and euphoria. Being in a tandem requires honesty and actively producing ideas, since you can’t hide behind others’ backs.</p><p>In his book ‘Emotional Intelligence’, Daniel Goleman describes a phenomenon called ‘neural Wi-Fi’, occurring by mirror neurons. They are tracking intentions, emotional flow and activating the same areas in our brains. Experiencing someone else’s state, or being able to track their path of thinking, we could compare our team work to a neuroprosthesis of a kind. So, we have an extra medium to grow our ideas on, an intellectual exchange that can be far more productive with another person. <br>If we look back in history, this discovery is not such an innovation. <br>A classical figure in American philosopher George Santayana said in the late XIXth century:</p><blockquote><strong>‘Friendship is almost always the union of a part of one mind <br>with the part of another.’</strong></blockquote><p>Thanks to this brain-to-brain connection, we can enrich our old ways of thinking and replace them with advanced and expanded neuronal paths.</p><h3>Final battle: abundance vs scarcity mindset</h3><p>I started my work as a freelance designer, and I continued having this individualistic mindset even in my first job in a team. My first attempt at pair design was with my friend from the marketing department, Ola (cheers!), and, as it turned out, it ended up being my favorite part of my previous job. The quality of my performance was raising, but a real revolution was yet to come. It was in the supportive environment of my present company, RSQ Technologies, where the bomb of creativity has really exploded.</p><figure><img alt="Scarcity scheme by Joanna Januszewska" src="https://cdn-images-1.medium.com/max/1024/1*eNen3sY6BhrVYuIWtYcTJA.jpeg" /><figcaption><strong>Credits: JJanuszewska</strong></figcaption></figure><p>First, I was a bit scared during design consultation with a team, conducted every week, to brainstorm our ideas. I was thinking that I’m not so senior if I have to give my ideas under a common dispute. I represented a scarcity mindset, which limited my potential. Over time, working and brainstorming with such a wonderful team of designers, I discovered that real seniority lies in an ability<em> </em>to change our mind and build new solutions instead of accepting the most obvious one.</p><p>Initially, it took a lot of courage to endure receiving feedback. But then <br>I started seeing the fruits of my work through different eyes. Such an abundance of various perspectives gave me even better solutions.</p><figure><img alt="Abundance scheme by Joanna Januszewska" src="https://cdn-images-1.medium.com/max/1024/1*icxtlhrmVfcukED0zst3iw.jpeg" /><figcaption><strong>Credits: JJanuszewska</strong></figcaption></figure><p>Finally, I realized that I was never going to be such a great illustrator as my colleague Natalia Trochowska, my favorite person to work with. I was never drawn to the details as much as she was, what made her master the logo design and color matching. What’s new to me now, is the lack of sadness when I’m thinking that I’m not such a designer. I am a different one. <br>I support us with wit and high spirit, organize our work, provide vision and talk to clients. We create amazing projects together because we are able to use the best parts of ourselves. With motivation, honesty, and support.</p><figure><img alt="Joanna Januszewska Natalia Trochowska_RSQ Holo" src="https://cdn-images-1.medium.com/max/1024/1*hJQ86Xv_ChnPFWkKsMOYng.jpeg" /><figcaption><strong>Left: me and Natalia Trochowska | Right: RSQ Holo, one of our collaborative design projects</strong></figcaption></figure><h3>Summary</h3><p>Despite how good the lone genius myth sounds, and how beautifully it is described in Lord Byron’s literature, history over the centuries shows us that the best results are achieved in pairs.</p><p>Modern times also give us plenty of good examples to illustrate the power of collective thinking. The most famous one, Apple, a technology giant, wouldn’t exist if it wasn’t for the merge of two great minds: Steve Jobs, and his friend Steve Woźniak. If Paul McCartney hadn’t come to the church fête, he wouldn’t have met John Lennon and the Beatles would never have formed. Last but not least, if Picasso had not met Matisse in a café in Paris, we do not know how modern art would have developed further. <br>Picasso was Matisse’s most trusted critic and vice versa.</p><p>So, Thomas Carlyle was wrong. I would rather rephrase his quotation as: <em>‘The history of the world is but the biography of great collectives’.</em> It seems that it’s not only more efficient to share ideas. If two people can trust each other, without pressure to be the best, they deliver better and more unforeseeable solutions (which was proved by Bahador Bahrami and Chris Frith in their article: ‘Optimally Interacted Minds’, published by <em>Science)</em>. Later on, Herbert Spencer, another great thinker, said:</p><blockquote><strong>‘Before he [an individual] can remake his society, his society must make him.’</strong></blockquote><p>Now that we know, that the lone genius myth can be more harmful than helping, it could be the time to take the pressure off an individual. As we all can see, working together can definitely bring more benefits than just working on our own. I’m more than happy to share it with you: not only because it has improved my life, but also because the science of today seems to agree that it works.</p><ul><li><strong>Text editing, proofreading and linguistic help: <br>Dominika Dutkowska </strong><a href="https://www.linkedin.com/in/ddutkowska/"><strong>https://www.linkedin.com/in/ddutkowska/</strong></a></li></ul><p><strong>🌟</strong></p><p><em>This article was written thanks to support of many individuals, <br>my RSQ colleagues and friends.</em></p><p>🙏<em> When I was struggling with writing, my favorite author Miłosz Brzeziński repeated, after Ernest Hemingway, that ‘the first version of everything is crap.’ Because of this, I was able to continue. I’m paying him with my gratitude!</em></p><p><strong>🌟</strong></p><h4>✏️ LinkedIn: <a href="https://www.linkedin.com/in/jjanuszewska/">https://www.linkedin.com/in/jjanuszewska/</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c036f08824bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rsq-technologies/the-lone-genius-myth-not-so-genius-c036f08824bd">The lone genius myth: not so genius?</a> was originally published in <a href="https://medium.com/rsq-technologies">RSQ Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four years after changing career to a software developer]]></title>
            <link>https://medium.com/rsq-technologies/four-years-after-switching-career-to-a-software-developer-f6339e22e603?source=rss----312588f2ae19---4</link>
            <guid isPermaLink="false">https://medium.com/p/f6339e22e603</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Katarzyna Nowak]]></dc:creator>
            <pubDate>Thu, 01 Jul 2021 08:06:53 GMT</pubDate>
            <atom:updated>2021-07-12T18:45:51.121Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ftuEZNAVsJlPGV5p7SvxXA.png" /></figure><p>Right now I am a developer with more than 4 years of experience in Frontend Development. Five years ago I could barely see myself as anyone connected with IT. Before all that happened I had a completely different career plan. Well, it did not work out as I expected. I quit my job, took a break and started to wonder what exactly I could do in my life… One of my friends asked me ‘Have you ever tried coding?’. I burst out laughing. I really did not think that it was going to work out, but at least I could give it a try. It turned out that this is what I was looking for.</p><h4>Before</h4><p>After finishing high school, I wasn’t sure which field of study to choose. In the end, I chose Administration at a university, that is one of the best in the country for law studies. All in all, it was even fun to finally understand what was going on with all these paragraphs, ordinances, laws, the legislative process and many more things. I cannot deny that this knowledge has been very useful to me more than once in my life. After graduation, I had to make a choice where I would work. I decided to work in a court because I thought it would be an interesting, but also very useful job. After a year, I knew that this is just not for me. The work turned out to be much less creative than I had imagined at the beginning. Work did not give me much development prospects. I was very frustrated. I devoted a lot of time to education and work experience in which I did not feel well. I decided that I cannot spend any more time on something that does not give me satisfaction. I started looking for an alternatives. Of course, it was not an easy decision, but my inner compass told me I needed to change direction.</p><h4><strong>Yes you can</strong></h4><p>I wanted to change everything, but I had no education, experience or much help. My friend told me where to find some tutorials, try each of them to know what exactly I want to learn. I started with <a href="https://www.codecademy.com/">Codecademy</a> courses. They were easy and friendly. I could get help from other users and of course I had much much fun. After a week or two, I devoted all my time to tutorials and reading documentation. I was determined to become a software developer, and after a few weeks I knew it was going to be frontend. It was not easy, especially that most of the things I discovered by myself, like developer tools… Yeah, that was a life changing experience.</p><h4>First recruitment interviews</h4><p>It was super refreshing to start learning new things. It was some time since the last time I gave myself some goals to achieve. Gathering knowledge outside of school is a totally different experience than during school education. Everything is based on your focus and motivation. I chose a company which I wanted to work for, I learned all requirements from a list of must-haves for the position I wanted. I applied to multiple other companies before going to my chosen place. First interview was a complete disaster, but with each job conversation, I knew more and more and felt much more confident. When I was going through the recruitment process, I asked as many questions as possible. Often I met people who willingly explained everything to me and gave me great advices. I learned a lot thanks to many recruitment interviews. In the end, I did not get my dream job, but honestly I still could not be more grateful for that experience. One of the recruitment interviews was memorable. I sent my CV to every single job offer, no matter if they were looking for a junior, mid or senior (I know some of readers going to hate me for that). I was more than surprised when somebody called me from a company in which they were looking for a senior…</p><h4>Senior Front-end Developer Interview</h4><p>I was extremely nervous when I was going to the interview. I was even thinking there that there was some misunderstanding. Well, the first part was HR and I think it was not bad. Second part was a technical one. The interviewer told me from begging that they know that I do not have commercial experience, but somebody decided to give me a try and that the questions they prepared for me are on junior level. That part was not that hard, but of course I made a few mistakes. That person had like an hour-long conversation with me about why I answered like I did, no matter if they were right or wrong. He explained me a lot things I could not understand or did not know. It was like an 1 hour tutorial based on my knowledge. They were not really testing my knowledge but rather the way I think. Fun fact is that it was still not over. Third part was a conversation with the boss and you should see my face when they told me about it. I had to wait like 15 minutes for the third part…</p><p><strong>What are you doing here?</strong></p><p>The third, and luckily last, part finally started and the first question was: ‘What are you doing here? We are looking for a senior developer. Do you meet all the requirements on the list of requirements? I am looking at your CV and I have my doubts’. Well I would lie if I would say that I was not shocked. I collected my thoughts and I have said that I did not add anything that would not be true. Someone decided to invite me to that interview so why would I refuse. I came in for an interview and was doing my best. He also asked me about why I decided to try a software career even though I did not have any education or experience in regards to IT. I told him that I am very determined and there must be a reason why they decided to invite me on that interview. I can not be that bad right? I told him also that even if I will not get that job I am already satisfied because I learned a lot at that technical part and for that I am very graceful. Well… I did not get that job. He said it right away that they were looking for someone with slightly different skills. But I also heard that he really likes my determination and will definitely find a job as a software developer. I knew that I was getting close to my goal.</p><h4>First job as a developer</h4><p>At the beginning of my job search, I was primarily focused on learning. During recruitment interviews, I said that I could work for free as long as I learn as much as possible. However after all, I was offered a salary in my first job. The beginning was tough. Developing features looked different than at home: large codebase, sprints, pull requests (PR), team meetings, estimating tasks well - that was a whole new level. But as a junior I could always ask about everything or look for the answer. At first, I was very flustered by the fact that I didn’t know so many things and that I made so many mistakes. After all, I entered a completely different world and everything in the company was new to me. I had to take the time to understand certain dependencies and actions, but after a while it all made logical sense.</p><h4>First few months as a developer</h4><p>The first tasks that were assigned to me were quite simple and I tried to implement them as best as I could, but still I had many comments, improvements and questions on my PRs. I started to feel like a bad developer, but I had a chance to speak with a friend who told me to treat it as training. In fact nobody wanted to prove to me that I am not good enough, they just wanted me to learn to write better and to bulletproof code. If I did not agree with the comments, I tried to voice my doubts. Usually, we considered the best solution together. After some time, there was a visible progress with the quality of my code. I also started to work as a reviewer and then I had a chance to understand teammates` code, look for bugs but also ask about solutions, code improvements and other perspectives. I learned a lot from other people’s code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*et_5jZE8thwG1lqWx02WGQ.png" /><figcaption>That`s me at RSQ Technologies :D</figcaption></figure><h4>Few years as a developer</h4><p>After four years of work in the profession, the time has come for a brief summary and setting myself the rules that I intend to stick to in the future, as well as admitting what mistakes I made while working.</p><p><strong>First there was a few simple revelations like</strong>:</p><ul><li>I <strong>always have a dev console opened</strong>. I was not always like this. Before when I was writing code with a closed console sometimes I got feeling like I was on strike. I produced some much and everything looked fine and… ou… project is not building… ou…. the console is all red…damn I crashed the browser. When did that happen? So now the open console for me is a must have.</li><li>Looking for a bug and trying to reproduce it, yup that is my kind of stuff. When the path is not always clear and sometimes looking for the source takes much longer than to fix it. But I also had a few situations, that after I spent long hours looking for a bugged line I could not fix that easily. I refactored code multiple times, changed conditions and even if I thought I understood what was wrong, the bug still appeared. My frustration was reaching its limit and I was slowly considering a career in a local supermarket. Then I decided to <strong>change background-color to red</strong>. It did not change…Why? Because this whole time I was looking at a production version and not my local one…Thanks to that ‘background-color: red’ is also one of my friends now.</li><li><strong>Ask about everything</strong>. The more I asked the more I knew. If I could not understand something, after a while the answer appeared by itself or I would spend many hours searching, because I just couldn’t let it go — but it was worth it. There were also aspects that remain incomprehensible to me to this day. Even if I read about them and try to comprehend, I cannot say I understand those things completely. Like CSS. After the first month of learning, I thought I would be a CSS master because it is super easy… Well, now I think I will never fully understand what is going on there… but the point is that I know that it is not my direction. It is good to know that I do not have to understand absolutely everything.</li></ul><p><strong>Then with the experience came more serious rules:</strong></p><ul><li><strong>Too much logic and code in one task is usually a problem</strong>. It is hard to write, check, improve and merge too big tasks. Often it is much better to split it into smaller bits. There is also a risk that I end up choosing a wrong implementation way and do not understand a problem correctly. Better to talk to a team leader and consult the best solution. With big tasks there is also a problem that it might be not the only one big task in progress in the project. Merge conflicts are something I try to avoid at any cost. I remember that sometimes it took me hours to fix my branch because in the end nothing was working correctly.</li><li><strong>Mistakes are the best teacher</strong>. Initially, I was very stressed when in my part of code was found a serious, hard to detect or simply stupid bug. The work of a programmer requires creativity, so even with the best efforts it is impossible to always avoid mistakes. Bug fixing is fun, especially when there is a bug where I have absolutely no clue about what is wrong. Of course I like only those which I was able to fix. When I finally find the wrong line of code, I like to see who made that nasty bug, that turns out to be me.</li><li><strong>Refactor is always a good idea</strong>. No matter how much time I spend on some code I know that sooner or later I will come back to make it even better. In this profession, being up to date is very important. Even if I write some code that seems absolutely great to me, there will be changes sooner or later. I will learn how to write something differently and I will want to improve some bits and pieces. I wish I had time to improve each functionality or component from time to time.</li><li><strong>Find time to self educate</strong>. We have knowledge sharing (KS) meetings at work, as well dedicated time for self development. KS <br>is a meeting where team members share their knowledge. Sometimes we sit together to watch tutorials, conferences or discuss problems or solutions. I have had better and worse times when it comes to my own education. During all this time, as a software developer, I have learned that when I have lack of motivation, it is better to read or take up lighter topics, than to force myself to study hard all the time. Among such lighter topics I include such matters as: How to make code review, what to do before I create a PR, how to names functions correctly etc. Remember to never stop learning and If you have a <a href="https://medium.com/rsq-technologies/never-miss-your-knowledge-sharing-again-8027e556f83b">Knowledge Sharing never miss it</a>.</li><li><strong>Impostor syndrome</strong>. Yup it hits me from time to time. Every developer I know tries to solve this problem in a different way. Sometimes I get the thoughts that I’m stupid, that I can’t do anything and actually I don’t know what I’m doing in this job. Everyone around me is super smart and they look at me like I’m a moron who doesn’t understand anything. I feel that I work too slowly, that my code is bugged, that I have a lot of comments on my PRs. Later it gets to me that if I were such a terrible developer I would get fired right? So if I feel like there is too much stress, pressure and other negative emotions around me, I know that I need to find a solution. I usually need to talk to a coworker, mostly it is my leader because thanks to her I know ifs it’s only in my head or not. I get some advice and take a few days’ break and then I am ready to code again with renewed strength.</li><li>From time to time, I talk with my leader about<strong> what I like to do as part of my job and what I do not</strong>. If there is possibility to concentrate on the parts which give me more satisfaction and avoid those which I am not the best at. I am really lucky that I can speak openly about it. Sometimes it is good to listen to the opinion of someone standing a bit to the side. How I deal with problems in someone else’s eyes. I often learn that some things are better than I thought and with some I have to work on.</li></ul><h4>Best decision ever</h4><p>Summing up all these thoughts, I know that the decision I made 5 years ago was one of the best decisions I have ever made in my life. It was hard, but this effort gave me a lot of fun and satisfaction. We spend a very large part of our lives at work. If you feel that the industry, profession or work culture does not suit you, believe me that it is worth taking the risk. No matter how much time I spent on something, that turned out to be a complete flop (yup 5 years at university) there is never too late to change. I hope you found my article helpful or at least you enjoyed reading it. With the right commitment, each of us is able to achieve our goal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6339e22e603" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rsq-technologies/four-years-after-switching-career-to-a-software-developer-f6339e22e603">Four years after changing career to a software developer</a> was originally published in <a href="https://medium.com/rsq-technologies">RSQ Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Never miss your Knowledge Sharing again!]]></title>
            <link>https://medium.com/rsq-technologies/never-miss-your-knowledge-sharing-again-8027e556f83b?source=rss----312588f2ae19---4</link>
            <guid isPermaLink="false">https://medium.com/p/8027e556f83b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Paulina Anioła]]></dc:creator>
            <pubDate>Mon, 11 Jan 2021 08:25:05 GMT</pubDate>
            <atom:updated>2021-01-11T08:25:05.395Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oBAfMe3zDP2qMJFlT3nM2g.jpeg" /></figure><p>We all know that the habit of continuous learning plays a significant role in the IT world. Sometimes new projects that we start give us the opportunity to try out the latest solutions or even require us to explore previously unknown areas. It seems to me that with more frequent project rotations, learning is a natural consequence. But what if you don&#39;t start new projects every few months?</p><p>At RSQ Technologies my team has been developing the same application for over three years. For this reason, we do not have the opportunity to try the latest hot technological solutions every few months on the new codebase. The important aspect of our work is to keep up with programming news, share this knowledge within the team, and not be left behind. Three years ago we started a regular Knowledge Sharing meeting which form has changed many times. Every few months we also provide the space to discover more complex topics and put them into practice.</p><p>In this article, I will describe how the way of acquiring new knowledge and sharing it within our team has evolved over the years. What worked for us, and what ideas turned out to be a flop.</p><h3>🤯 Beginnings of Knowledge Sharing (KS) meeting</h3><p>We have always wanted to include time in our weekly plan that we would spend exploring topics that differ from what we do on a daily basis. Someday we just decided to gather in the conference room and spend 1-hour on reading articles about programming. Everyone would read on their own and when we would find something interesting we would share it with others. The source of articles was the same for all team members and it was a weekly newsletter: <a href="https://androidweekly.net/">Android Weekly</a>. We repeated this meeting every Friday for several weeks.</p><p>Did meetings without any specific plan work out? As you might have guessed — not really. We expected to receive a huge dose of knowledge every Friday but unfortunately, that didn’t happen. We could more or less profit from those meetings just because we were a group of only 4 people at the time. Nonetheless, I can easily recall the sessions when we just lost our time. Sometimes no one found an article worth paying attention to. Other times, the only interesting materials found were too demanding to read and present in one hour so they were skipped.</p><p>Despite all the disadvantages of this approach, today I think we made the right decision by meeting initially without a plan because at least we started doing anything at all. Sometimes to start is the most difficult part of the process — at least, for me. Over time, we learned in practice how to improve our meetings and what we really expect from them.</p><h4>📚 Prepare yourself before the meeting</h4><p>After several unproductive meetings, we agreed that our basic mistake was not preparing for them in advance. In order not to burden all team members with weekly preparations we assigned one person a week responsible for going through all the articles from the selected newsletter. They would then present them during the KS meeting. Every week someone else was on duty to keep us up to date with the Android world. Our meetings became more organized which facilitated the acquisition of knowledge.</p><p><strong>After some time we were surprised by the improvement of our presentation skills because of regular talks in front of an audience.</strong> This applied to all team members, no matter what skills they started with. This skill improvement was an unexpected side effect of these meetings, however, I would say that this has become my favorite profit of them. Learning how to present and explain ideas to others in a way that is understandable to everyone is priceless.</p><p>Despite all those pros, a big disadvantage of this solution was the enormous amount of work that one person had to put into the preparations for the meeting. For me, it was at least 3–4 hours which I was not always able to find while studying and working.</p><h4>👩‍🎤⏱ “You’ve got 15 minutes — show me what you can”</h4><p>After about a year of experimenting with the form of KS meeting, we finally found something suitable for all of us. It is a practice that is still used today.<br><strong>The way it works is that each team member has 15 minutes to present whatever they want. In most cases we talk about technical news, however, the content that is presented may also concern soft skills like communication, leadership, work planning, etc. </strong>The aim of the 15-minute presentation is not always to teach the rest of the group given technology or library. Often we just want to signal that such a thing exists so it would stay in the backs of our heads and that we can come back to it when we are in need of it.</p><p>When an hour-long meeting was conducted by one person, our main problem was the amount of work and time that was required to prepare yourself for it. It was often quite overwhelming. Preparations for a 15-minute presentation are not like that anymore. This time I don’t feel overwhelmed, it’s more like fun.</p><p>From time to time we entrust the whole meeting to one person to talk about their programming projects which they develop after work. Last time our team member showed us how he used technologies like Room for database and Coroutines for asynchronous work in his application <a href="https://play.google.com/store/apps/details?id=com.jemiola.moodtimeline&amp;hl=en_US&amp;gl=US">Mood Timeline</a>. Every time he develops some interesting feature to his app he books the full hour of the KS meeting to share what he has learned.</p><h3>Research and Development (R&amp;D) days</h3><p>We are aware that just talking about some technology or programming patterns during our meetings is not nearly as valuable as using it in practice. That is why every quarter we devote an entire workday to the practical exploration of technologies that interest us. So far each of these R&amp;D days has been different from the previous ones. I will briefly describe a few of them.</p><h4>😐 Our very first R&amp;D day</h4><p>During the first edition of the R&amp;D day, we allowed individual team members to freely choose the topics to explore. Most of us started by going through the tutorials we prepared earlier. Everyone chose a different field of interest and some of them were:</p><ul><li>Static Analysis library (Detekt),</li><li>Concurrency design pattern (Coroutines),</li><li>Layout type (ConstraintLayout),</li><li>Dependency Injection framework (Koin),</li><li>Set of libraries for app architecture (Android Architecture Components).</li></ul><p>From the perspective of time, I see that the best choice was made by colleagues who chose not very extensive topics like static analysis library or new layout type. These were topics that could be learned and roughly introduced to the project in 8 hours. The explorers could immediately notice the results of their work. Colleagues who chose less broad fields of their exploration were definitely more satisfied with the results of that day.</p><h4><strong>📺 </strong>Conference day</h4><p>Another formula of the R&amp;D that we organized was watching interesting conference talks for 8 hours straight. Each team member proposed some talks so we could create a playlist with something that fits everyone.</p><p>I think that an important aspect of that day was that we managed to organize it outside the office. We met at the house of one of us who has a large TV and a comfortable sofa. Getting out of the place where we spend so much time every day and which we associate with our daily routine made it seem more special to us. We haven’t reached the level of excitement that we usually get at real conferences, but I think we’ve moved into that state at least a little.</p><h4>👏 One app with different implementations</h4><p>For the next edition of the R&amp;D day, we had a completely different idea of what we would like to do. We were at this point in the development of the project that we all felt that we had to rethink its architecture and validate the decisions we made a long time ago. As the project grew, we had to grapple with the old bad concepts more and more. We decided that it would be helpful if the topic of the next R&amp;D day would be related to the architecture. <strong>The plan was to implement one simple app using different popular architecture patterns like MVP, MVVM, MVI. Everyone could choose the pattern that they always wanted to explore. The application had to be really simple so that we could do it in 8 hours.</strong> It displayed a to-do list, a random joke downloaded using the REST API, and the popup. Before that day one of us prepared the mockups of the app and found some free API to use.</p><p>The last hour of the day was intended to present the code and discuss it. Of course, not everything went as well as we planned at the beginning and not all of us finished the whole app. Even if the app wasn&#39;t fully completed each of us could present the general approach of the chosen pattern. <strong>We didn’t become experts in selected architectures, but that was never the point.</strong> Writing the code for 8 hours in a different style than on a daily basis and not being limited by the frame of our project opened our minds to other solutions. Gaining this border perspective helped us to start further discussions about changes in our business application.</p><p>This edition of the R&amp;D day was much more valuable to me than the first one. Focusing on one common issue during that day worked far more for us than being dispersed over many different topics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*0XSOVqLsaT2-QLWtFCN5Ag.png" /><figcaption>Icon made by <a href="https://www.flaticon.com/authors/freepik">Freepik</a> from a <a href="http://www.flaticon.com/">www.flaticon.com</a></figcaption></figure><h3>🤔 So what should I do?</h3><p>As I said earlier - <strong>never miss your KS meeting again</strong>!</p><p>Making a habit of learning and knowledge sharing allowed us to systematically equalize the level of knowledge within the team. When we get into the routine we can discover approaches that surprise or inspire us. <strong>Our meeting takes place every week, no matter if we are in a rush to the next release or not.</strong> If we would wonder whether there is time for this meeting or not there would always be some reason to cancel it — there is always some deadline. Therefore we never even consider canceling and I also encourage you not to.</p><p>If you don’t run something similar in your team, start even if you are not convinced of the formula that is on your mind. The formula will change many times anyway and will adapt to the possibilities and expectations of the team. I encourage you to give it a try because I am sure that you will quickly notice how you benefit from it. We experienced the first benefits after just a few weeks and we can still feel them today. Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8027e556f83b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rsq-technologies/never-miss-your-knowledge-sharing-again-8027e556f83b">Never miss your Knowledge Sharing again!</a> was originally published in <a href="https://medium.com/rsq-technologies">RSQ Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pull request template for the win!]]></title>
            <link>https://medium.com/rsq-technologies/pull-request-template-for-the-win-a248ba91ad90?source=rss----312588f2ae19---4</link>
            <guid isPermaLink="false">https://medium.com/p/a248ba91ad90</guid>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Jakub Anioła]]></dc:creator>
            <pubDate>Mon, 29 Jun 2020 06:25:58 GMT</pubDate>
            <atom:updated>2020-06-29T15:52:38.009Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Br7GBMM3YMSvZfjdXwwtmg.jpeg" /></figure><h3>First steps</h3><p>More than a year ago, our Android team at RSQ Technologies introduced a pull request description template into the code review process. It moved us one step further into more transparent and fluent application development. At that time our app was already two years old, with new features in development and continuous maintenance. Through this development process, we stepped into multiple problems with lack of knowledge about certain parts of the codebase. The code was getting harder and harder to understand with every new view, feature, or module.</p><p>We decided to use the pull request description template to help us understand the changes introduced into the app, find bugs, and point out code smells.</p><p>In this article, I want to show you our template which we have used for a year. Next, I will discuss things that worked, things that did not, and changes that we introduced. If you just are just interested in the final form of our template — just go to the <em>Current code review template </em>section<em>.</em></p><h3>What we started with</h3><p>Our pull request template has grown organically. Some of the points were based on the articles which we read at the time, some of them were added later on our weekly team Retrospective meeting.</p><pre># Description, Motivation, and Context #</pre><pre># What is the destination branch of this PR? #<br><br># How Has This Been Tested? #</pre><pre># Screenshots (if appropriate): #<br><br># Types of changes #<br>[ ] Bug fix (non-breaking change which fixes an issue)<br>[ ] New feature (non-breaking change which adds functionality)<br>[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)</pre><pre># Checklist: #<br>[ ] I merged current develop to this branch.<br>[ ] My change requires a change to the documentation (confluence test paths, code style etc.)<br>[ ] I have updated the documentation accordingly.<br>[ ] My change requires a change to the UI tests.<br>[ ] I have updated UI test accordingly.<br>[ ] I unit tested new methods.<br>[ ] I checked linter on local.<br>[ ] I checked unit tests on local.</pre><pre># Is additional manual testing needed? #</pre><pre># Files with major changes / what is worth paying more attention to? #</pre><pre># Which variances have been affected #                       <br>[ ] variant 1                       <br>[ ] variant 2                       <br>[ ] variant 3                       <br>[ ] variant 3</pre><h3>What worked, and what did not</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*0feRbO9rGnhO3Oik3tSXbQ.png" /><figcaption>Icons made by <a href="https://www.flaticon.com/authors/freepik">Freepik</a> from <a href="https://www.flaticon.com/&quot;">Flaticon</a></figcaption></figure><ol><li><strong><em>Description, Motivation and Context</em></strong></li></ol><p>Worked? Definitely yes.</p><p>One of the most important points on the list. When reviewers start to read the pull request, they have the most important information about the changes.</p><ul><li>What are the changes?</li><li>Why have you chosen this solution?</li><li>What was the goal of that task?</li><li>What was the basic idea behind the code?</li></ul><p>All of the information written under the first point gives the reviewer a clear view of the background of this change. It is much easier to point out pain points in the code when you understand what was the motivation behind this change.</p><p>2. <strong><em>What is the destination branch of this PR?</em></strong></p><p>Worked? Yes.</p><p>This one might sound silly at the first glance. You might say that the destination of the pull request is probably displayed somewhere on the top of the page (the place is depending on what you use Github, BitBucket, etc.). This question was added to the template so the PR creator would pay attention and double-check the destination.</p><p>We had multiple problems after merging the branch. Then realizing that it was merged to the default develop, not to the release branch or feature branch. Adding this question to the template solved the problem.</p><p>3. <strong><em>How has this been tested?</em></strong></p><p>Worked? Yes.</p><p>In our Android team, in this point, we mostly focus on the emulators and physical devices used for testing the code. Sometimes it was important to make sure that the feature was tested on both phone and tablet or just phone with small pixel density.</p><p>When the pull request introduces larger changes into the app, that part also consists of testing paths that have been checked, random data that have been typed, and so on.</p><p><em>4.</em><strong><em> Screenshots (if appropriate)</em></strong></p><p>Worked? Definitely yes.</p><p>That idea came to us with <a href="https://proandroiddev.com/perfecting-process-for-presenting-prs-7b3c63cd2848">Perfecting Process for Presenting PRs</a> by <a href="https://medium.com/u/c09b24c8e7b2">Ataul Munim</a>. This article was presented on one of our weekly knowledge sharing meetings and right after it ended we instantly decided that we must use it in our code review process!</p><p>In the Android environment, it is not that fast to checkout and display somebody’s specific view where the change was introduced. When the project is quite big it might take tens of minutes to checkout a new branch, compile the code, and click the app right to the place where modification was made. It is also hard to visualize the change just from reading XML files on Android or HTML/CSS on the web.<br>When pull request consists of the screenshots you can tell right off the bat if the visual part is looking correctly or there is something wrong with it.</p><p><em>5. </em><strong><em>Types of changes</em></strong></p><p>Worked? Not really.</p><pre>[ ] Bug fix (non-breaking change which fixes an issue)<br>[ ] New feature (non-breaking change which adds functionality)<br>[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)</pre><p>The first nonsense on the list. Three checkboxes which are supposed to give reviewer more context about the task but at the end they were non-informational. In most of the cases, it was a duplication of information from the first point <strong><em>Description, Motivation and Context</em></strong><em>.</em></p><p><em>6. </em><strong><em>Checklist</em></strong></p><p>Worked? In most cases - yes.</p><pre>[ ] I merged current develop to this branch.<br>[ ] My change requires a change to the documentation (confluence test paths, code style etc.)<br>[ ] I have updated the documentation accordingly.<br>[ ] My change requires a change to the UI tests.<br>[ ] I have updated UI test accordingly.<br>[ ] I unit tested new methods.<br>[ ] I checked linter on local.<br>[ ] I checked unit tests on local.</pre><p>All of those points were added just to remind the developer if she/he prepared code before it was ready to be merged.<br>Checklists are recommended in most of pull request templates.</p><p><em>7. </em><strong><em>Is additional manual testing needed?</em></strong></p><p>Worked? Yes.</p><p>The developer may ask others in their team to check out the feature and test it by themselves before merging. It is mostly used in feature branches or bugs for edge cases.</p><p><em>8. </em><strong><em>Files with major changes / what is worth paying more attention to?</em></strong></p><p>Worked? Hmm… Sometimes?</p><p>This point was added somewhere in the middle of the process when new pull requests came with massive changes but mostly with file migration and renames. In those cases, we wanted to point the reviewer to focus on the most important files where most of the logic was happening.</p><p><em>9. </em><strong><em>Which </em></strong><a href="https://developer.android.com/studio/build/build-variants"><strong><em>variants</em></strong></a><strong><em> have been affected</em></strong></p><p>Worked? Yes.</p><p>This point might be quite specific to Android development. <a href="https://developer.android.com/studio/build/build-variants">Variant</a> is a type of build — it defines what app is built from the codebase. In our project, we build multiple apps (more than four) from one codebase. It is quite important to know which apps are going to be affected by this modification.<br>It might work for you as well if your project is similar.</p><h3>Next steps</h3><p>After working with this template for one year we decided to do some changes. We started a chat on our work messaging app to discuss all the stuff we liked and disliked about the template — what we normally skip, what was most important, and which questions were not precise enough. It was time to refresh the idea and talk more about new checkpoints, questions. Also removing some purposeless points.</p><p>One of the articles which also pushed us to take the action and introduce some changes was <a href="https://hackernoon.com/a-code-review-checklist-to-focus-on-the-important-parts-au4f3ykj">A Code Review Checklist to Focus on the Important Parts</a> by <a href="https://hackernoon.com/u/michaela-greiler">Michaela Greiler</a>. All of the new points added to the code review were based on those proposed in her article. Thanks!</p><p><em>1. </em><strong><em>Link to the resources (mockups, change description)<br></em></strong>When there is more thought standing behind the change, it is good to have some links to resources that give you a wider perspective on the problem.</p><p>2. <strong><em>Does this change require updates outside of the code, like updating the documentation, configuration? If so, was this done?<br></em></strong>Previously that question was hidden in the checklist. We converted it into the question, so the PR creator might give it a deeper thought.</p><p>3. <strong><em>Is the code testable? If not - why?<br></em></strong>We stumbled upon some issues with testability in our codebase. So we wanted every programmer to rethink his code in case of testability and start a little discussion if there is a possibility to give the tests some more time.</p><p>4. <strong><em>Does similar functionality already exist in the codebase? If so, why isn’t this functionality reused?<br></em></strong>Similarly to the previous point — we wanted a place to discuss if feature like it was already written somewhere in the codebase and maybe it can be reused.</p><h3>Current code review template</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*15AuuHuO2YLygB24GfjrBQ.png" /><figcaption>Icons made by <a href="https://www.flaticon.com/authors/freepik">Freepik</a> from <a href="https://www.flaticon.com/&quot;">Flaticon</a></figcaption></figure><pre># Description, Motivation and Context</pre><pre># Link to the resources (mockups, change description)</pre><pre># What is the destination branch of this PR?</pre><pre># How Has This Been Tested?</pre><pre># Screenshots:</pre><pre># Does this change require updates outside of the code, like updating the documentation, configuration? If so, was this done?</pre><pre># Do reviewers should manually test your changes?</pre><pre># Is the code testable? If not - why?</pre><pre># Does similar functionality already exist in the codebase? If so, why isn’t this functionality reused? </pre><pre># Checklist:<br>[ ] I unit tested new methods.<br>[ ] I checked linter on local.<br>[ ] I checked unit tests on local.</pre><pre># Which variants have been affected<br>[ ] variant 1<br>[ ] variant 2<br>[ ] variant 3<br>[ ] variant 4</pre><pre># Files with major changes / what is worth paying more attention to?<br>(Delete this point if it is not needed)</pre><h3>Should you use pull request template?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*4UgtiPUjxyy6SnlFnUt3MA.png" /><figcaption>Icons made by <a href="https://www.flaticon.com/authors/flat-icons">Flat Icons</a> from <a href="https://www.flaticon.com/">Flaticon</a></figcaption></figure><p>Yes! If there is any advice that I wanted to share with you in this article — give more attention to the code reviews. When reviewers know the context, understand the data flow, and the final result is visible — it is easier to spot the problems within the code.</p><p>Make your own pull request description template, add <a href="https://support.atlassian.com/bitbucket-cloud/docs/suggest-or-require-checks-before-a-merge/">Bitbucket PR checks</a>, automate processes with Continous Integration, try <a href="https://github.com/danger/danger">Danger</a>. Make your way to better code reviews.</p><p>Well-prepared code reviews make well-reviewed code. Which at the end, makes better apps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a248ba91ad90" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rsq-technologies/pull-request-template-for-the-win-a248ba91ad90">Pull request template for the win!</a> was originally published in <a href="https://medium.com/rsq-technologies">RSQ Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migration Guide from Spring Boot 1.5 to 2.2.x]]></title>
            <link>https://medium.com/rsq-technologies/migration-guide-from-spring-boot-1-5-to-2-2-x-3a87295630cc?source=rss----312588f2ae19---4</link>
            <guid isPermaLink="false">https://medium.com/p/3a87295630cc</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Norbert Nowak]]></dc:creator>
            <pubDate>Thu, 16 Apr 2020 06:23:45 GMT</pubDate>
            <atom:updated>2020-04-16T06:23:45.625Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OsQpWumbWI1KpXjvrSrrEQ.jpeg" /></figure><h3>Hello!</h3><p>I am Norbert and I work at RSQ Technologies as a software developer. One of our main products is RSQ Health — a system that supports clinics, hospitals and doctors in their everyday work with online documentation, timetables and patient database. We also work on AI and hardware but these are not the topic of this article.</p><p>Let’s start with some project background.</p><p>Our core app is a monolith. There are also some helping microservices around it.</p><p>As you might guess — Yes, this article is about that core.</p><p>Spring Boot 1.5.6 was the latest version when we have started writing our monolith in 2017. It’s been a long time since then — numerous new versions of Spring Boot were released in the meantime.</p><p>Months were passing and we were adding new features, bug fixes etc… Nobody cared about the outdated Spring Boot until the moment I estimated that some tasks related to Hibernate update would take me (approximately) 1 hour. I found out it was related to an outdated dependency. But… digging deeper I noticed that this is not a problem of the dependency but the whole outdated Spring Boot. So I decided to start a conversation about the update. At our company, at one of our retrospective/planning weekly meetings I convinced my teammates that it is the time and we have to do that! For us and for the greater good! (I said it can take more than 1 day)</p><p>Finally the whole migration process took me 2 weeks, with pull requests and fixes included.</p><p>I would like to share my experience with you.</p><h3>Why?</h3><p>Let me explain <strong>why</strong> you also should check/update dependencies and have them up-to-date.</p><ol><li><a href="https://spring.io/blog/2019/08/06/it-is-time-goodbye-spring-boot-1-x"><strong><em>“It’s time to say goodbye”</em></strong></a><br>Official Spring blog post from 09–06–2019<em> </em>says it’s the end of 1.x version life.</li><li><strong>Compatibility</strong><br>We have several other services working on Spring Boot 2.x. For communication we are using Feign client which had compatibility issues between such different versions.</li><li><strong>Performance</strong><br>Jenkins builds used to take about <strong>1.5h and </strong>after update it’s <strong>0.5h.</strong></li><li><strong>New features</strong><br>Latest features and possibility of update to Java 11.</li><li><strong>Happy teammates</strong></li></ol><h3>Let’s start</h3><p>After one month I looked back on git history and all of commits that were made. Fortunately, during migration I kept idea of this article in mind.</p><p>Firstly, I would like to list how versions of some project dependencies have changed. In the next section, I will describe to you some steps.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fd6e71407b779c9d5efd91c1a86b7e95/href">https://medium.com/media/fd6e71407b779c9d5efd91c1a86b7e95/href</a></iframe><h3>Steps</h3><p>Below I present selected cases on which I’ve spent some time. Enjoy, and I hope it will end up helpful.</p><ul><li><strong>Imports changes</strong><br>There are many many imports that have changed with dependencies. I will not list you all the dependencies from our project. You can easily find compatibility matrix for each. For example <a href="https://spring.io/projects/spring-cloud">Spring Cloud</a>. Your IDE will show you all import/dependency problems during compilation.</li><li><strong>Application properties</strong><br><a href="https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-properties-migrator">Properties migrator dependency</a> is really helpful during application properties migration (e.g <em>application.yml</em>). It will find and make all temporary replacements for you. Furthermore, it will print for you a warning about every change. <br>If you would like to do it on your own — feel free! <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html">Here</a> is the list of all properties used in Spring.</li><li><strong>Renaming JPA functions</strong><br>The following CrudRepository methods have been renamed:</li></ul><pre>save → saveAll<br>delete → deleteAll</pre><ul><li><strong>CrudRepository <em>findOne</em></strong> <br>Previous point only tells you about repository method name replacement. However, there is another change that requires more time. Repository function findOne<strong> </strong>has been replaced by findById<strong> </strong>and now it returns an Optional. It could be too messy to replace it in the whole project so I’ve created an extension below:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c6865363a58797299615fa697a6a83ca/href">https://medium.com/media/c6865363a58797299615fa697a6a83ca/href</a></iframe><p>You can also use <strong>orElseThrow </strong>and throw an exception instead of returning null.</p><ul><li><strong>HttpServletRequestMapper is using <em>attributes</em> instead of <em>URI.</em></strong><br>We are using request mapper in the versioning process to lookup for versions of a given endpoint.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c9255f6c17149e074ed9b48c25dccc1/href">https://medium.com/media/8c9255f6c17149e074ed9b48c25dccc1/href</a></iframe><ul><li><strong>Health indicators on startup </strong><br>Honestly I didn’t notice it in Spring Boot 1.5.4 but according to <a href="https://docs.spring.io/spring-boot/docs/1.5.4.RELEASE/reference/html/production-ready-endpoints.html">documentation</a> it was already there. 😕 <br>If you are using spring. mail MailHealthIndicator will check connection on startup. You can disable it in properties by setting: management.health.mail.enabled=false</li><li><strong>Abstract class need open val/var</strong><br>Classes that extend or override regular params of an abstract class would not work. Abstract class params need to be open.</li><li><strong>LocalDate/Time in entities requires columnDefinition</strong><br>Having LocalDate/Time in your entity can be problematic for schema creator. I had to add columnDefinitions to every entity column of type as below:</li></ul><pre>java.time.LocalDate → @Column(columnDefinition=DATE)<br>java.time.LocalTime → @Column(columnDefinition=TIME)</pre><ul><li><strong>Default Charset </strong><br>I’ve had problems with JSON encoding in integration tests. The response had incorrectly encoded characters. Not sure what was the cause but I found a solution. I’ve added default charset to our JacksonConfig.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/096e3bab43cee04688cc4f32957b9fa1/href">https://medium.com/media/096e3bab43cee04688cc4f32957b9fa1/href</a></iframe><ul><li><strong>Page object JSON format change</strong><br>After migration Page object consumed as JSON structure has changed. I’ve figured it out when one of tests has failed. After some research, I’ve added this construction in our CustomPageImpl:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/69ac34391547af5021dae11018cb7b17/href">https://medium.com/media/69ac34391547af5021dae11018cb7b17/href</a></iframe><p>Helpful links: <a href="https://stackoverflow.com/q/34647303/7990631">StackOverflow</a>, <a href="https://www.wimdeblauwe.com/blog/2018/2018-06-10-pageimpl-json-serialization-with-spring-boot-2/">blog post</a>.</p><ul><li><strong>Bean overriding</strong><br>In case of having multiple beans of the same name based on active profile, adding allow-bean-definition-overriding: true helped</li><li><strong>Gradle BootRepackage renamed</strong><br>According to <a href="https://spring.io/blog/2017/04/05/spring-boot-s-new-gradle-plugin">this article</a>, bootRepackage has been replaced with bootJarand bootWar.</li><li><strong>Flyway default Schema History Table renamed</strong><br>Flyway version have changed from 3.x → 6.x.<br>So you will need to rename default table name in application properties. Flyway 6.x is uses flyway_schema_history as default table. It’s described in detail on <a href="https://stackoverflow.com/a/49067389/7990631">StackOverflow</a>.</li></ul><pre>flyway:<br>   table: &quot;schema_version&quot; </pre><p>Another solution is to rename table directly in database.</p><ul><li><strong>Integration and unit test </strong><br>Having about 2k tests written with JUnit 4 and migrating them to JUnit 5 seems to be time-consuming.<a href="https://mvnrepository.com/artifact/org.junit.vintage/junit-vintage-engine"> JUnit Vintage dependency</a> turned out to be helpful. It provides engine for running JUnit 4 tests.<br>If you would like to migrate to Junit 5, <a href="https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-properties-migrator">JUnit docs</a> or <a href="https://www.codingrevolution.com/junit-5-migration/">this article</a> could be helpful.</li><li><strong>Dependencies cleanup</strong><br>Running ./gradlew dependencies shows dependency tree and possible updates. After executing this task I’ve found some dependencies that we imported separately before migration which are now included in another dependency or just duplicated.<br>For example: <br>After update we had two hamcrest dependencies.<br>And this is gradle task execution result:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d50fda23646fc189de4578cb6f2ec4df/href">https://medium.com/media/d50fda23646fc189de4578cb6f2ec4df/href</a></iframe><p>So I’ve simply removed the older one.</p><h3>Summary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/166/1*L9HEAKK-33i0OA6e3iX9Vw.png" /><figcaption>Icons made by <a href="https://www.flaticon.com/authors/freepik">Freepik</a> from <a href="https://www.flaticon.com/">https://www.flaticon.com/</a></figcaption></figure><p>So here we are. Project builds, Jenkins is green, I’m alive, teammates are happy, our project is as fresh as when it was initialized 3 years ago. I would like to share some final insights:</p><ul><li>Check out <a href="https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide">official Spring Boot migration article </a>and use <a href="https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#configuration-properties-migration">properties migrator</a> that will speed up first steps.</li><li>Keep your git clean. Work on separate branch. Merge master to avoid conflicts. Describe changes in commits. I think that without it I wouldn’t be able to write this article today.</li><li>If you have other services depending on each other be careful about dependency compatibility e.g. Spring Cloud.</li><li>Keep dependencies up to date. ./gradlew dependencies will help you find updates.</li></ul><p>Hopefully you will spend less time than I did.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a87295630cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rsq-technologies/migration-guide-from-spring-boot-1-5-to-2-2-x-3a87295630cc">Migration Guide from Spring Boot 1.5 to 2.2.x</a> was originally published in <a href="https://medium.com/rsq-technologies">RSQ Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java vs. Kotlin — Part 1: Performance]]></title>
            <link>https://medium.com/rsq-technologies/comparative-evaluation-of-selected-constructs-in-java-and-kotlin-part-1-dynamic-metrics-2592820ce80?source=rss----312588f2ae19---4</link>
            <guid isPermaLink="false">https://medium.com/p/2592820ce80</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[benchmark]]></category>
            <dc:creator><![CDATA[Jakub Anioła]]></dc:creator>
            <pubDate>Wed, 29 Jan 2020 14:01:15 GMT</pubDate>
            <atom:updated>2020-01-29T14:01:15.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*51YYofZCS6b1FuxGoYBpEQ.jpeg" /></figure><h3>Java vs. Kotlin — Part 1: Performance</h3><p>Almost one year ago, I was a student at the Poznań University of Technology studying Software Engineering, thinking about master thesis subject. All of the recommended subjects seemed boring or totally out of the scope of my interests, so I decided to come up with my own topic for the research.</p><p>Around the same time, in October, me and my friends from RSQ Technologies headed to the KotlinConf 2018 conference in Amsterdam. We attended the closing panel with numerous interesting people from Kotlin community. One of them was Wiliam Cook. The professor from the University of Texas mentioned that Kotlin does not have a large audience in the scientific community because there is not a lot of papers about Kotlin. So I asked myself — maybe I can do something with it and try to write something about Kotlin?</p><p>Some days later, after the conference, I was chilling at my house catching up with older KotlinConf talks. I came across an awsome “<a href="https://www.youtube.com/watch?v=ExkNNsDn6Vg">The Cost of Kotlin Language Features” talk by Duncan McGregor</a> about downsizes in Kotlin code size and execution time. It motivated me to get a deep dive into performance and build differences between Java and Kotlin.</p><p>So here we are, months later, I am a master degree graduate trying to summarize my experiment and results in this Medium article. I hope you will enjoy it and get to know something new.</p><p>Link to <a href="https://medium.com/@bards95/java-vs-kotlin-part-2-bytecode-42b2154f6ae0">Java vs. Kotlin — Part 2: Bytecode</a></p><h3>Research question</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*e6GyZ5jVNXyHJCI-QdIS8g.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>First of all, I want to share with you my master thesis research question. There are two of them, but in the first article, we will focus on the first one — connected to performance.</p><blockquote>RQ: Are there significant differences between execution performance between various implementations of the same benchmark in Kotlin and Java using Java Runtime Environment?</blockquote><h3><strong>The Computer Language Benchmark Game</strong></h3><p>The dynamic metrics comparison will be based on the idea propagated by one of the most popular cross-language benchmark suite — The Computer Language Benchmark Game (CLBG).</p><p>Introduced by Doug Bagley in 2000 as <em>The Great Computer Language Shootout </em>project with a goal to compare all major languages. Nowadays, the project developed into <em>The Computer Language Benchmark Game</em> which is the most popular cross-language benchmark used scientifically. Project is always growing with the new problem benchmarks and language implementations. It is systematically updated by the creator to follow the programming market trends (by adding new languages, removing ones that are not used anymore and updating the list of benchmark algorithms to test).</p><p>There is the goal behind <em>CLBG</em> benchmark — to answer the following question, asked by one of the <em>4chan</em> users:</p><blockquote>My question is if anyone here has any experience with simplistic benchmarking and could tell me which things to test for in order to get a simple idea of each language’s general performance?</blockquote><p>To answer that question, <em>CLBG</em> presents a set of 10 different algorithm problems. All of the problems are presented and described on the <a href="https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html">official web-page</a>. Introduced algorithms have strict rules on how to implement them, what do algorithms use to achieve a correct equivalent result. With that following information, problems are implemented using specific language which will be measured.</p><p>To enable an objective comparison of the results, <em>CLBG</em> benchmark always uses fixed scripts that implement the metrics for all of the experiments. The collected measurements are independent of the implementations of algorithms in the indicated languages.</p><h3>Benchmarks selection</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*gK1Sj62-ZYDvr7WjA2jXsA.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>During the development of the experiment, <em>The Computer Language Benchmark Game</em> consisted of 10 benchmark programs (sidenote: the number of benchmarks in CLBG change in time). Each of them proposes a different kind of problem which uses different language paradigms, language features, and methodologies in general to solve them. <br>(I am not going to describe every benchmark in CLBG, if you are interested I encourage you to read the information on the <a href="https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/nbody.html#nbody">webpage</a>)</p><p>The main idea standing behind this experiment was to compare Java and Kotlin. To achieve that, the experiment used the base implementation of programs in Java (taken from CLBG benchmarks repository) and two implementations in Kotlin — converted and idiomatic (described in the next sections).</p><p>With these assumptions, benchmarks used in the experiment were selected based on two factors:</p><ol><li>best Java implementation taken from CLBG repository has to be convertible to Kotlin language</li><li>the programs must manipulate on as diverse as possible data</li></ol><p>Authors of <a href="http://www.dcs.gla.ac.uk/~jsinger/pdfs/pppj13.pdf">“JVM-Hosted Languages: They Talk the Talk, but do they Walk the Walk?” paper</a> proposed method of distinguishing CLBG corpus of programs by indicating whether a program mostly manipulates integers, floating-point numbers, pointers or strings. This information will help us divide benchmarks into groups.</p><p>Taking everything into account, there are only 6 of the CLBG benchmarks that were used in the final experiment. Four of the ten benchmarks were rejected in order to be consistent with the assumption that Java code has to be convertible to Kotlin language without the need for large changes in the code.</p><ul><li>int - integer</li><li>fp - floating point</li><li>ptr - pointer</li><li>str - string</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2F28e6596b90&amp;dntp=1&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2F28e6596b90&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="394" frameborder="0" scrolling="no"><a href="https://medium.com/media/57ffcc3a90b75cc370b390e94949cb7f/href">https://medium.com/media/57ffcc3a90b75cc370b390e94949cb7f/href</a></iframe><p><strong>Remarks</strong></p><ul><li>after benchmark selection (as it is depicted in <em>Table 1)</em>, the<em> </em>final full benchmark suite does not contain programs which manipulate mostly on string resources.</li></ul><h3>Implementations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*akPTH9vxPu6DYTfHT1yRwQ.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>There are three implementations for every benchmark in this experiment.</p><ol><li>Java</li><li>Kotlin-converted</li><li>Kotlin-idiomatic</li></ol><p>All of those codes were used for experiments — compiled, executed and measured by the external Python scripts. None of the implementations have any measurements or irrelevant code parts which could interfere with final results.</p><p>Kotlin was divided into two versions. I wanted to check what is the difference between multiple Kotlin implementations. I assumed that Kotlin-converted might be the code with similar performance and bytecode results to the Java version. On the other hand, I used Kotlin-idiomatic implementation to achieve benchmark results for codes which are more likely to be produced by experienced Kotlin programmer.</p><p>If you are interested in more implementation details, check out the <a href="https://github.com/bardss/javakotlinbenchmarks">Java vs Kotlin comparison repository.</a></p><p><strong>Java implementation</strong></p><p>All Java codes were taken directly from most actual benchmark implementations available in The Computer Language Benchmark Game repository, without making any changes to them.<br> <br>In the benchmark repository, there were multiple versions of Java benchmarks. The codes used in the experiment are those which achieved the best results, according to the leaderboard available on CLBG webpage.</p><p><strong>Kotlin-converted implementation</strong></p><p>Implementation is created using <em>Java to Kotlin converter </em>provided by IntelliJ IDEA. Multiple changes have been made, to the raw converted versions, to bring the code to an executable state. Most of the changes were necessary to allow the compiler to run the code.</p><p>All Kotlin-converted implementations have one change which was introduced into the code. In order to make the code compilable using the command-line interface, the method <em>main()</em>, was extracted outside the original file class.</p><p><strong>Kotlin-idiomatic implementation</strong></p><p>Changes introduced into the Kotlin-idiomatic implementations are mostly based on:</p><ul><li><a href="https://kotlinlang.org/docs/reference/idioms.html">Idioms</a> — which lists Kotlin frequently used idioms. The site is part of the official Kotlin documentation</li><li><a href="https://kotlinlang.org/docs/reference/coding-conventions.html">Coding Conventions</a> — which contains the current recommended coding style for the Kotlin language. The page is also a part of Kotlin documentation</li><li>IDEA default code inspections</li></ul><p>Kotlin idiomatic implementations are based on the converted versions.</p><p><strong>Remarks</strong></p><ul><li>five out of six benchmarks work in parallel using Threads (Java and Kotlin implementations), none of Kotlin implementations uses coroutines, the use of which could significantly affect the performance results</li></ul><h3>Languages version and hardware</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*PhMBbjb52l9_lkp1jU1pPQ.png" /><figcaption><em>Icon made by </em>Nikita Golubev<em> from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>Obligatory information about software and hardware environment used for benchmark execution.<br> <br>The experiments were executed on the hardware environment which details are presented in <em>Table 2.</em> The choice of the Linux Ubuntu System was dictated by the fact that it was recommended OS for the CLBG metrics measurement scripts.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2Ff5b2ad2b83&amp;dntp=1&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2Ff5b2ad2b83&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="270" frameborder="0" scrolling="no"><a href="https://medium.com/media/c9940370eb423f248856f158137fff58/href">https://medium.com/media/c9940370eb423f248856f158137fff58/href</a></iframe><p><em>Table 3</em> presents the versions of Java and Kotlin which were used for executing benchmark implementation. Both versions represent the newest available version of languages at the time.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2F66ca070c32&amp;dntp=1&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2F66ca070c32&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="173" frameborder="0" scrolling="no"><a href="https://medium.com/media/990de33f7d7208fc48685d09c43915d1/href">https://medium.com/media/990de33f7d7208fc48685d09c43915d1/href</a></iframe><p><strong>Remarks</strong></p><ul><li>all of the benchmark executions are done on Oracle HotSpot VM</li></ul><h3>Dynamic metrics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*brUI9Xj4iSWaMp7prsX-7Q.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>So yeah, what did I really measure in that dynamic metrics comparison? <br>I decided to compare languages using most metrics which are most often considered as most important for programmers:</p><ul><li><strong>Execution time</strong></li><li><strong>Memory usage</strong></li><li><strong>CPU load</strong></li></ul><p>Every program was executed and measured 500 times.</p><p>Benchmark metrics are also based on those used in The Computer Language Benchmark Game. All of the programs were executed and measured using <a href="https://salsa.debian.org/benchmarksgame-team/benchmarksgame/blob/master/README.md">dedicated CLBG scripts</a>.</p><p>Multiple measurement methods were experimented in Kotlin and Java benchmark suite development process and are still available in the repository. Initially, the time was measured using Java/Kotlin code with methods like <em>currentTimeMilis()</em> or <em>nanoTime()</em> from <em>System</em> class, but that idea was abandoned in further work. The results had a large variance, and later on, I decided to abandon this measurement method. Measuring other load metrics like CPU and memory turned out to be also not straightforward and affected by various factors, depending on the environments (deep dive into benchmark measurement ways is a subject for another long article!).</p><p>All of that work led to the decision that applying the official CLBG measurement scripts is going to be the most objective method in that case. That method can help put all of the Kotlin measurement conclusions in the context of results given for different languages evaluation presented by CLBG benchmark.</p><p>Details of how each parameter is measured by the Python script are available at <a href="https://benchmarksgame-team.pages.debian.net/benchmarksgame/how-programs-are-measured.html">CLBG measurements page</a>.</p><h3>Results</h3><p>Full list of measurement results for each benchmark is available in the <a href="https://github.com/bardss/javakotlinbenchmarks">project repository</a>.</p><p><strong>Execution time</strong></p><p>The Figure below presents execution time box plots for each benchmark and each implementation. Letters in brackets represent most manipulated data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ywvkrZC_YQN8vDcxCiT2yw.png" /></figure><p><strong>Memory usage</strong></p><p>The Figure below presents memory consumption box plots for each benchmark and each implementation. Letters in brackets represent most manipulated data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*21RzvXl35n8DiVFvvmNnuw.png" /></figure><p><strong>CPU Load</strong></p><p>The table below is presenting the CPU load on each CPU core in each benchmark and each implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xTJU3mXsfMHztJpG7WigiA.png" /><figcaption>Table 4: <strong>CPU load</strong> results</figcaption></figure><h3>Conclusions</h3><p>The table below presents benchmark results comparison with median memory consumption and median execution time. Letters in brackets stand for most manipulated data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RTU6CGHrFl2BPkfXpooSrw.png" /></figure><p><strong>The first thing that catches the eye is that Kotlin-idiomatic implementation never achieved the best result in any median of the measurements</strong>. Median execution time, in this case, is higher than the rest of the implementations. The same goes for memory consumption: the idiomatic implementation is sometimes in the second position, but never achieves the best result with a given benchmark. We can thus conclude that writing the Kotlin code using recommended techniques might not be the best option for someone who is looking for the best result in memory management and fastest execution time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mNZmtzAD-sUqO2ai_EYB2Q.png" /></figure><p>Based on those results, we can also assume, that Java implementation is usually better at managing the memory optimization and program execution. Java implementation carries out better median execution time in four out of six benchmarks. The same implementations also achieve the best median memory usage in four out of six benchmarks. The Kotlin-converted measurement outcome presents shorter execution time in <em>Mandelbrot</em> and <em>Fannkuch Redux</em>, and lower memory consumption in <em>Fasta</em> and <em>Binary Trees</em> benchmarks.</p><p>The largest diversity between the highest and lowest median execution time is noticeable in <em>Binary Trees</em> benchmark. The difference between the best execution time (Java) and the worst (Kotlin-idiomatic) is at the level of 6.76%. There are also benchmarks where Java, Kotlin-converted and idiomatic implementations achieved very similar results. In <em>Spectral Norm</em> and <em>Mandelbrot</em>, the difference between the highest and lowest median execution time is less than 1%.</p><p>Considerable memory usage measurement outcome variation is visible in <em>Fannkuch Redux</em> benchmark. As mentioned earlier, <em>Fannkuch Redux </em>is a program which mostly manipulates integer numbers. There is a major difference in the way do Java and Kotlin manage integer numbers. In Java, numbers without fractional component are mostly saved as primitive types, in contrast to Kotlin, where all those numbers have to be boxed as Integer objects.</p><p>On Figure 3, we can see that the Kotlin-converted implementation has much lower median memory consumption than other implementations. The difference between memory usage medians is even greater than 100MB. The study conducted for this thesis’ provides no clear explanation for the observed result because even static bytecode analysis results do not present any notable variance in favor of the Kotlin-converted implementation.</p><p>On the other hand, we have the last dynamic metrics results — CPU load. As mentioned in the previous section, there is no significant difference among particular measurements. Taking into consideration that tasks are allocated randomly to the CPU cores, the difference between the implementations is, in most cases, not higher than 3%. The differences like this can vary at that level between executions, because of differences in the computer hardware and software. The difference between benchmarks implemented in various languages can be much higher. The number of CPU load results with more significant differences are available at the official CLBG benchmark webpage.</p><p>With all of that information, we can assume that both languages load the CPU in a similar manner. There is no notable decrease in CPU load in any of those languages or implementations.</p><h3>So… what’s the answer to the research question?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*O7BHELsmFCGpk9otGUSt6g.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>At the beginning of this article, I presented my research question. We came to the place when it is the time to form an answer based on achieved results.</p><blockquote>RQ: Are there significant differences between execution performance between various implementations of the same benchmark in Kotlin and Java using Java Runtime Environment?</blockquote><p>From the execution time perspective, the maximum difference between the highest and lowest median elapsed time can vary from 6.7% in favor of Java implementation <em>Binary Trees </em>benchmark), to 1.2% in favor of Kotlin-converted implementation <em>Fannkuch Redux</em> benchmark). <strong>There is no benchmark where the Kotlin-idiomatic implementation achieves the best median execution time</strong>. Java code reaches the best time median in four out of six benchmarks, the remaining benchmarks performed best for the Kotlin-converted code.</p><p><strong>Memory consumption comparison appeared the lowest in the Java implementation in four out of six benchmarks. Also, the next two of them were for Kotlin-converted code</strong>. The best memory consumption results for both implementations do not overlap with the best execution time results for those codes. Memory management can reach very diverse values for languages in different benchmarks. Java implementation achieves better memory usage even by 13% in <em>Fannkuch Redux</em>, but on the other hand, Kotlin-converted reaches 9.7% improvement in <em>Binary Trees</em>, compared to the Java results.</p><p>The CPU load measurement results show that there is no significant distinction in load management on cores between these two languages. All of the benchmark implementations achieve very similar results with the difference on the error level.</p><h3>What&#39;s next?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*RHn5-8FKzY5UYz8qKGrB2Q.png" /><figcaption><em>Icon made by Darius Dan from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>That is it for dynamic metrics. I am not a statistics and data analysis expert so there are probably tons of conclusions which I did not present but they are hidden inside those results. If anyone is interested — I would love to see anyone showing me more analysis based on my <a href="https://github.com/bardss/javakotlinbenchmarks/tree/master/measurement_results">data</a>.</p><p>Also, if you have found any errors in my comparison — wrong implementations, median evaluation and so on — hit me up in the comments section, <a href="https://twitter.com/JakubAniola">Twitter</a> or <a href="https://kotlinlang.org/community/">official Kotlin slack</a> (Jakub Aniola).</p><p>In the next part, I am going to present the methodology and results of “Java vs Kotlin” static analysis. I think that next time we should look at the differences between these two languages from a different perspective. The JVM bytecode perspective.</p><p>Link to <a href="https://medium.com/@bards95/java-vs-kotlin-part-2-bytecode-42b2154f6ae0">Java vs. Kotlin — Part 2: Bytecode</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2592820ce80" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rsq-technologies/comparative-evaluation-of-selected-constructs-in-java-and-kotlin-part-1-dynamic-metrics-2592820ce80">Java vs. Kotlin — Part 1: Performance</a> was originally published in <a href="https://medium.com/rsq-technologies">RSQ Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java vs. Kotlin — Part 2: Bytecode]]></title>
            <link>https://medium.com/rsq-technologies/java-vs-kotlin-part-2-bytecode-42b2154f6ae0?source=rss----312588f2ae19---4</link>
            <guid isPermaLink="false">https://medium.com/p/42b2154f6ae0</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Jakub Anioła]]></dc:creator>
            <pubDate>Wed, 29 Jan 2020 14:01:11 GMT</pubDate>
            <atom:updated>2020-01-29T14:01:13.085Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LiM2Sgb9SeDA-d9S6oGevQ.jpeg" /></figure><h3>Java vs. Kotlin — Part 2: Bytecode</h3><p><a href="https://medium.com/@bards95/comparative-evaluation-of-selected-constructs-in-java-and-kotlin-part-1-dynamic-metrics-2592820ce80">Previous part</a> started with the introduction on how I have come up with the idea of comparing Java and Kotlin. As mentioned previously, that experiment and analysis were part of my master&#39;s degree thesis at Poznan University of Technology. Also, as an everyday Android developer in RSQ Technologies and a big fan of these two JVM languages, I wanted to answer one of the most common question which can be asked by JVM developers -</p><blockquote>What language is better performance-wise— Java or Kotlin?</blockquote><p>Of course, there is one and the only answer to that question —<em> it depends</em>. No one likes this statement, so I’ve decided to conduct the experiment which may help understand the performance differences between these two languages.</p><p>Performance-linked results and conclusions were presented in part one. Now it is time to look at the bytecode static analysis results. I wanted to find the reason why there are differences in execution time, memory usage and CPU load. Mostly if you want to understand something better in JVM language and find a reason for something — you need to do some geekery with JVM bytecode. So that is exactly what I am going to do — the static analysis of Kotlin and Java generated bytecode.</p><h3>Research question</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*e6GyZ5jVNXyHJCI-QdIS8g.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>As in the previous part, in the beginning, I want to present to you my research question (which is pretty short this time):</p><blockquote>What are the differences in generated bytecode produced by both language compilers?</blockquote><p>In general, I wanted to get some knowledge about the JVM bytecode produced by Java and Kotlin implementations. I assumed that the distinction between those languages might help with dynamic results understanding. Before the experiment, I knew only that Kotlin treats the objects differently (would not let initialize variables with primitive types) and does some work for a programmer (generating getters and setters). But this was it, I did not have any deeper knowledge on JVM bytecode generation. I hoped that this analysis would not only help me understand the differences in both languages but also broaden my knowledge in that area.</p><h3>Reminders</h3><p>In this section, I want to remind you of the experiment&#39;s basic information — benchmark selection, implementations, and languages version. If you need some more information, it is probably already presented in the <a href="https://medium.com/@bards95/comparative-evaluation-of-selected-constructs-in-java-and-kotlin-part-1-dynamic-metrics-2592820ce80">previous part</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*gK1Sj62-ZYDvr7WjA2jXsA.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p><strong>Benchmark selection</strong></p><p>Presented benchmarks are part of <a href="https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html">The Computer Language Benchmark Game</a>. The whole suite consists of <a href="https://benchmarksgame-team.pages.debian.net/benchmarksgame/description/nbody.html">10 different problems and algorithm solutions</a> which are implemented in various languages to compare the performance results. Not all of the benchmarks were included in this experiment, they were selected based on the two factors:</p><ol><li>best Java implementation taken from CLBG repository has to be convertible to Kotlin language</li><li>the programs must manipulate on as diverse as possible data</li></ol><p>The table below is presenting the final list of used benchmarks with information about most manipulated data.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2F28e6596b90&amp;dntp=1&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2F28e6596b90&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="394" frameborder="0" scrolling="no"><a href="https://medium.com/media/57ffcc3a90b75cc370b390e94949cb7f/href">https://medium.com/media/57ffcc3a90b75cc370b390e94949cb7f/href</a></iframe><p><strong>Implementations</strong></p><p>Analyzed implementations were divided into three groups:</p><ol><li>Java (taken from the official CLBG benchmark webpage)</li><li>Kotlin-converted (generated using Jetbrains <em>Java to Kotlin converter</em>)</li><li>Kotlin-idiomatic (based on Kotlin-converted version with introduced changes recommended by <a href="https://kotlinlang.org/docs/reference/idioms.html">Idioms</a>, <a href="https://kotlinlang.org/docs/reference/coding-conventions.html">Coding Conventions</a>, and IDEA default code inspections)</li></ol><p>If you are interested in more implementation details, check out the <a href="https://github.com/bardss/javakotlinbenchmarks">Java vs Kotlin comparison repository.</a></p><p><strong>Languages version</strong></p><p>Just as a reminder, I wanted to present you a table showing versions of languages used in the experiment. Both languages used the newest available version at the time.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2F66ca070c32&amp;dntp=1&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2F66ca070c32&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="173" frameborder="0" scrolling="no"><a href="https://medium.com/media/990de33f7d7208fc48685d09c43915d1/href">https://medium.com/media/990de33f7d7208fc48685d09c43915d1/href</a></iframe><p><strong>Remarks</strong></p><ul><li>Languages and their versions change in time. Results presented in this article might not be valid in the future when new versions will be released</li></ul><h3>Tool</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*07xNQJ_YR6ZrgClvM6h_dA.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>Bytecode analysis is based on the <a href="https://github.com/AdoptOpenJDK/jitwatch/wiki/JarScan"><em>JarScan</em></a><em> </em>tool. Mentioned program is part of the <a href="https://github.com/AdoptOpenJDK/jitwatch"><em>JITWatch</em></a> system, which statically analyses jar files and counts the bytes in each method’s bytecode. After jar files scan, it produces CSV format reports. Those<em> .csv </em>summaries are used to process and produce final bytecode analysis results.</p><p>With <em>JarScan</em> there is a possibility to define what package in jar file should be analyzed. Thanks to that option, there is no possibility that the result will be affected by the packages and classes from Java or Kotlin standard library.</p><p>If you are interested in trying out the tool, I recommend to check out the article <a href="https://www.chrisnewland.com/statistical-analysis-of-core-libs-bytecode-using-jarscan-403">“Statistical Analysis of Core Libs Bytecode using JarScan”</a> by Chris Newland. It helped me with the basic understanding and running JarScan scripts.</p><h3>Static metrics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*1-P0OHv76r9fxUjsUzg9RQ.png" /><figcaption><em>Icon made by srip from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p><strong>Instruction count</strong><br>Using the mentioned tool enables a user to gather the number of occurrences of each bytecode instruction in the selected jar file. With that information, there is a possibility to define differences in bytecode generation between multiple implementations and JVM-based languages.<br>Using information about each instruction can help with analyzing other collected data.</p><p><strong>Allocation count</strong><br>Another method from <em>JarScan</em> enables a user to produce the list of allocated types for each kind of allocation instruction. <br>Counted allocation instructions are <em>new, newarray, anewarray, multianewarray</em>.<br>In the final report, each row contains three values — instruction, type, and count.</p><p><strong>Method sizes</strong><br>The last method used in bytecode analysis is called <em>methodSizeHisto</em>. It produces <em>.csv</em> file with two information in the row — method bytecode size and their count.<br>Output results can be used to draw <em>.jar</em> file method bytecode size histograms, which may help with in-depth performance issues analysis.</p><h3>Results</h3><p>Full list of results for each benchmark is available in the <a href="https://github.com/bardss/javakotlinbenchmarks">project repository</a>.</p><p><strong>Instruction count<br></strong>The table below is presenting five of the most frequently occurring instructions in each benchmark and each implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Ngz_87pezadfU8bpocu-g.png" /><figcaption>Table 3: <strong>Instructions</strong> count results</figcaption></figure><p><strong>Allocation count<br></strong>Table 4 presents the most frequently allocated classes in each benchmark and each implementation. The list skips allocations with less than two occurrences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ngen1bWuvo8DgFtU7eCe1w.png" /><figcaption>Table 4: <strong>Allocation</strong> count results</figcaption></figure><p><strong>Method sizes<br></strong>The Figure below presents the method size histograms for each benchmark and each implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W_r6SByNARtELXO6EUXTnQ.png" /><figcaption>Table 5: <strong>Method size </strong>histograms</figcaption></figure><h3>Conclusions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uWyUyVP1b-_uc-dV9sdByQ.png" /></figure><p><strong>The above charts show that for five out of six cases, Kotlin produces more statements and creates more allocations. </strong>Java generated bytecode has more statements and allocations only in one benchmark, namely <em>Fannkuch Redux</em>. Based on that, we can assume that JVM compiler produces fewer allocations and shorter bytecode while compiling the Java code instead of Kotlin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZCYX2mSgQWYC2fyLSJUB1w.png" /></figure><p>Kotlin allocation total count may have been slightly overstated due to the additional static main method which would invoke method from inside of benchmark class. With all of that, every Kotlin generated bytecode has two additional allocations. This solution may not impact the dynamic metrics, but the outcome is visible in static analysis results.</p><p>Method size histograms presented in the previous section, show us the count of every method size in the bytecode file. In this case, Kotlin seems to produce extreme values more often. Kotlin-idiomatic code has the highest method sizes in three benchmarks <em>Fasta</em>, <em>Mandelbrot</em>, <em>Binary Trees</em>, while the Kotlin-converted code has the largest method sizes in the remaining benchmarks — <em>N-Body,</em> <em>Fannkuch Redux</em>, <em>Spectral Norm</em>.</p><p>Method size count analysis also shows that Kotlin code tends to have a mostly greater amount of smaller methods than Java. Results show that only Kotlin-idiomatic and converted implementations produce more than five methods of the same size. <a href="https://www.chrisnewland.com/more-bytecode-geekery-with-jarscan-404">Chris Newland in his article</a> presents results of the JVM bytecode method size experiment that may help with understanding that exception. He concludes that most of the 5 bytes long methods are getters. <br>The results of this experiment allow us to conclude that the increased amount of five bytes long methods is probably connected with Kotlin automatic generation of getters and setters for the class fields.</p><p><strong>The impact, which the allocation count and instruction count may have on dynamic metrics like execution time and memory consumption, is not clear and easily noticeable.</strong> We cannot draw direct conclusions based on the given data. Trends visible on bar charts created from bytecode static analysis results do not reflect trends on the charts created from the execution time median and memory usage median.</p><p>It is possible that those bytecode differences between implementations which may impact the performance are cleared by the JIT compiler. A number of optimizations are introduced in runtime by the JIT compiler to handle the inefficient bytecode instructions and structure. There are multiple processes in JIT, which may help with handling unnecessary bytecode instructions and allocations. One of the phases in JIT is <em>inlining</em>, the process by which smaller methods are merged, or inlined into the place of their callers.</p><h3>And again… what’s the answer to the research question?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*O7BHELsmFCGpk9otGUSt6g.png" /><figcaption><em>Icon made by Freepik from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p><strong>By looking at the results obtained from static bytecode instructions analysis, we can say that Java code overall, produces shorter bytecode.</strong> Java implementation had the least number of total instructions count in five out of six benchmarks. In one particular case, the analysis showed that compiler generated even 57.3% fewer instructions in the Java code than in the corresponding Kotlin-idiomatic code.</p><p>The same as in the case of the previous metric, Java implementation also seems to produce the least allocations within JVM bytecode. A higher number of allocations in Java occurs only in <em>Fannkuch Redux</em> implementation bytecode.</p><p>The last examined metric was the size of bytecode methods. The experiment outcome showed that Kotlin code tends to generate more outermost method size values. Kotlin bytecode files in all the cases produced the largest method and also the highest amount of small-sized methods.</p><p><strong>Based on achieved results, we cannot draw unambiguous conclusions saying that the total number of statements, the total number of allocations or more extreme bytecode method sizes significantly impact the runtime performance. </strong>There is no clear trend in bytecode analysis results which undoubtedly reflects on dynamic metrics.</p><h3>That’s it!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*-USqlHLMZfGtU9HuaXxm2A.png" /><figcaption><em>Icon made by surang from </em><a href="http://www.flaticon.com/"><em>www.flaticon.com</em></a></figcaption></figure><p>Thanks for reading! These two articles summarize more than a year of my work on the master thesis experiment — methodology, results, and conclusions drawn on them. I am really happy if it was interesting for you, shared information was valuable for your work or just motivated you to do some more geekery with JVM understanding.</p><p>It is important to say — that analysis (both on performance and JVM bytecode) is not the complete source of the truth about the differences between these two languages. It is just one step that might help with understanding those distinctions. It is always good to get some more data and knowledge about that area!</p><p>And again, if you found any errors or just want to share your thoughts and opinions on my work — reach out to me in the comments section, <a href="https://twitter.com/JakubAniola">Twitter</a> or <a href="https://kotlinlang.org/community/">official Kotlin slack</a> (Jakub Aniola).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42b2154f6ae0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rsq-technologies/java-vs-kotlin-part-2-bytecode-42b2154f6ae0">Java vs. Kotlin — Part 2: Bytecode</a> was originally published in <a href="https://medium.com/rsq-technologies">RSQ Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thoughts after two years as an Android Developer]]></title>
            <link>https://medium.com/rsq-technologies/thoughts-after-two-years-as-an-android-developer-d90a27ed00a7?source=rss----312588f2ae19---4</link>
            <guid isPermaLink="false">https://medium.com/p/d90a27ed00a7</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Jakub Anioła]]></dc:creator>
            <pubDate>Wed, 29 Jan 2020 13:53:36 GMT</pubDate>
            <atom:updated>2020-01-29T13:53:36.631Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2z-EQS4UugKKN21BzgEtZg.jpeg" /><figcaption>That’s me at local programming meetup (Photo: Merixstudio)</figcaption></figure><p>Two years ago I have started my journey with Android programming. I was a bachelor’s degree student at the time, looking for the programming language that I could learn in order to get an internship. I tried a little bit of frontend but I have quickly figured it out that it wasn’t really my thing.</p><p>So why did I choose Android? Because I found tutorials on Udacity which were super nicely prepared. They were free, easy to get into and fun as hell. It was the first time tutorials gave me so much fun. I wanted to check out more and more. Two months after setting upon the path of mobile development I have started an internship at RSQ Technologies.</p><p>Yeah, so it is two years later and I’m still an Android Developer at RSQ. I love Android and the dev community more than I did at the beginning of my journey. On this anniversary I have some thoughts that I wanted to share with people who are just starting with native mobile development. Some of them might be obvious for most of you, but they probably weren’t when you started.</p><h4>1. Always check what&#39;s new in Android environment/community</h4><p>This is the best thing you can do when becoming a programmer. If you jump into the river, you have to go with the flow. It is always valuable to check out what new library releases or new articles which highlight Android parts you never heard of. Even if you don’t need them right now or in the nearest future, you will probably remember them and will recall when a similar problem or need will occur.</p><p>It has happened to me multiple times. I have read an article, bookmarked it or shared with friends and then left it without using any of the ideas presented. But I cannot count how many times when I wanted to implement some idea for animation or unit testing, I came back to them after some time while I was looking for a solution or widening horizons on some stuff.</p><p>In our RSQ team, we started a Friday education routine. Each team member is presenting one article which he found interesting this week and then we are discussing if they are valuable for the project or just give us new ideas for future solutions. Thanks to these systematic meetings we are always up to date with all the Android actual trends.</p><p>Where to start?</p><ul><li><a href="https://androidweekly.net/">Android Weekly</a></li><li><a href="https://www.reddit.com/r/androiddev/">reddit.com/r/androiddev/</a></li><li><a href="https://fragmentedpodcast.com/">Fragmented — An Android Developer Podcast</a></li><li><a href="https://www.youtube.com/channel/UCMEmNnHT69aZuaOrE-dF6ug">Android Dialogs</a></li></ul><h4>2. Avoid using external libraries whenever possible</h4><p>This is probably the thing which not everyone will agree with. Too many times this story repeated in the projects that I was working on— we are producing Minimal Viable Product (MVP) of some feature and found library that looked perfectly fitting the case. This resulted in difficulties whenever we had to upgrade something or introduce some not obvious visual changes, we could see that we have reached the limit of the library’s possibilities.</p><p>Sometimes this may apply to the case when you are adding Floating Action Menu and then try to add some fancy shadow which may not be possible. In another case, you may use some cool external library for your Model View Presenter (MVP) architecture, but after some time you will be converting a project to Kotlin and not everything will work as it should with null safety and annotations.</p><h4>3. Introduce an Architecture to your every project, no matter the size</h4><p>When I was taking part in some beginner online courses for Android, no one was talking about applying any architecture to the project. I’m aware that we should not introduce fresh developers into Android with Model View Intent (MVI) project structure. We may start with splitting code into small parts divided into two files where we work on visual parts and data processing/server connection.</p><p>It is important because every maintained project comes very quickly to the moment when adding everything to the Activity causes zero readability what at the end causes bugs. Converting your project afterwards from no architecture to some architecture gives you and your team a vast amount of work.</p><h4>4. Test your code as soon as possible</h4><p>This may be obvious for people who have been in the community for some time already, but it was not that obvious for me at the beginning. It may be not that clear also for the people who are working for the companies that have never introduced testing to longly maintained products.</p><p>What can I say to the people who are not testing their code? It is not that confusing and hard as it seems to be. You do not have to jump into the testing train with all testing stack and use all of the possibilities like Espresso, Robolectric, JUnit 5, mockk/Mockito. You can always start with just some basic unit tests for your utils package, without mocking data and checking views. A small number of tests is better than no tests at all.</p><h4>5. Connect your repository to CI as soon as possible</h4><p>This point may be even more surprising than the previous one for some of you. Let’s say that I am just doing first small Hello World projects and you tell me that I should connect it with CI? Yes, do it, please!</p><p>If you are going to search the Internet for information about continuous integration you will probably read that you should connect also continuous delivery and continuous deployment. Do not worry about that just yet. Start at the basic level and get to know the whys and hows.</p><p>When I started writing my bachelor’s degree project, I have checked some Android articles and one of them contained information about CircleCI. <a href="https://academy.realm.io/posts/android-developer-tools-libraries-thanksgiving-2017/">The article</a> was saying that there is a new version of it, it is for free and no server is needed. I cannot describe how surprised I was when one hour after reading this article my projects CI was up and running — building and unit testing an app after every Git push.</p><h4>6. Code reviews are super helpful</h4><p>This may not be within the reach of every junior developer, but it is one of the best things that can happen to the programmer. No one is writing perfect code, especially when he/she is in hurry or just wants to get rid of ridiculous task. It is always good to check your code twice, even when it is just a oneliner.</p><p>Your code reviewer doesn’t have to be a senior programmer, even people who are juniors can point you to a better solution.</p><p>Of course, remember to triple check yourself to not waste your colleagues time! There are a lot of defects you can detect on your own just by checking yourself multiple times.</p><h4>7. Kotlin for the win</h4><p>Google made a big announcement at Google I/O 2017 saying that Kotlin is going to be the new official language for Android Development. All of us in our team knew about Kotlin before, but that was the moment when we have finally realized, that we really should try it out. In our case, it was probably a little bit easier, because our backend team has converted fully from Java to Kotlin a few months earlier, so we had always someone to ask for advice.</p><p>Kotlin gives you a huge amount of cool features, like:</p><ul><li>null safety</li><li>lambdas (out of the box, without external libraries)</li><li>awesome higher order functions</li><li>interoperability</li></ul><p>(and much, much more, but that&#39;s not the goal of this article)</p><p>Now moving to Kotlin is easier than ever with help of Android Studio converter, very good Kotlin documentation and tons of talks about it. There is no reason to clutch to Java 7.</p><h4>8. You don’t have to always introduce all of the newest ideas</h4><p>Don’t blame yourself if your codebase does not include Dagger/Koin dependency injection, Android Architecture Components, and RxKotlin and any other newest technologies. Everything will work itself into your projects over time. Maybe your project is just okay with MVP and parts of RxJava. Understanding all of these libraries and concepts is always helpful when you are looking for the best solution, but it is not necessary at the beginning. There‘s always going to be something new that is very hyped at the moment and everyone are talking about it.</p><p>You have to always learn about new solutions, but you don’t have to adapt everything to your projects.</p><h4>9. Sometimes visual part is harder to code than reactive programming</h4><p>That was one of the biggest pain points for me while working as an Android developer. I have just coded first lines of networking with reactive programming (Retrofit + RxJava) but then I almost lost the fight with the system while trying to add a shadow to the Floating Action Menu. Remember that sometimes the task might appear trivial or easier than others, it is not always your fault. It is just Android visuals.</p><h4>10. Attend your local Android meetups (also international if possible)</h4><p>This point is somehow connected to the first one. It is all about communication with the community, sharing your experiences and gaining as much knowledge as possible from such events. Some talks are less interesting than others, but you can always get familiar with new ideas. You can talk about them and sneak your question for someone with broader knowledge.</p><p>Besides this, you can always check out the best talks from Android/Kotlin events on YouTube:</p><ul><li><a href="https://www.youtube.com/watch?v=NRUmRtCv0co&amp;list=PLdb5m83JnoaBqMWF-qqhZY_01SNEhG5Qs">droidcon 2018 New York</a></li><li><a href="https://www.youtube.com/watch?v=MVdhRfe7Ww8&amp;list=PLQ176FUIyIUbVvFMqDc2jhxS-t562uytr">KotlinConf 2018 Amsterdam</a></li><li><a href="https://www.youtube.com/watch?v=Hzv5-R9XLTc&amp;list=PLWz5rJ2EKKc9Gq6FEnSXClhYkWAStbwlC">Android and Google Play at Google I/O 2018</a></li></ul><p>All of the things I mentioned above, I discovered at different moments during my 2 years of Android Development. Most of them seem unattainable at the beginning, but remember — you don’t have to implement them all at once with all the features in every project. You can always just check them out and try to do the minimal plan.</p><p>I hope that these thoughts are going to just make new developers less scared of checking out new things and more open for sharing their views with others.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d90a27ed00a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rsq-technologies/thoughts-after-two-years-as-an-android-developer-d90a27ed00a7">Thoughts after two years as an Android Developer</a> was originally published in <a href="https://medium.com/rsq-technologies">RSQ Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>