<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Simon Mannes</title>
    <description>The latest articles on DEV Community by Simon Mannes (@simon_mannes).</description>
    <link>https://dev.to/simon_mannes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F403429%2F0c69233b-6211-4e00-9d3b-53ec8ae07fd7.jpeg</url>
      <title>DEV Community: Simon Mannes</title>
      <link>https://dev.to/simon_mannes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/simon_mannes"/>
    <language>en</language>
    <item>
      <title>10 Great Questions To Ask To Become Familiar With a Huge Codebase</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Fri, 14 Jan 2022 00:00:00 +0000</pubDate>
      <link>https://dev.to/simon_mannes/10-great-questions-to-ask-to-become-familiar-with-a-huge-codebase-2da7</link>
      <guid>https://dev.to/simon_mannes/10-great-questions-to-ask-to-become-familiar-with-a-huge-codebase-2da7</guid>
      <description>&lt;p&gt;You've made it.&lt;/p&gt;

&lt;p&gt;You got through the interview process, and now you’re part of a new team.&lt;/p&gt;

&lt;p&gt;But as you get access to the repository, you’re overwhelmed. It’s huge. And full of stuff you know nothing about. So. Much. Unfamiliar. Code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ask Questions
&lt;/h2&gt;

&lt;p&gt;Your mentor, colleague, or lead dev has created a meeting to walk you through the code base. Here are some questions to get the most out of that time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the &lt;strong&gt;goals&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;“What are the goals of this project?”&lt;/li&gt;
&lt;li&gt;“What does this software do?”&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Learn about the &lt;strong&gt;history&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;“When did this project start?”&lt;/li&gt;
&lt;li&gt;“Who started it and how big was the team at first?”&lt;/li&gt;
&lt;li&gt;“How many people have worked on this over the last few years?”&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Get to know the &lt;strong&gt;architecture&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;“Which technologies do you use?” Go through dependencies, e.g. in package.json.&lt;/li&gt;
&lt;li&gt;“Did you do any major refactorings recently, or are you currently doing a major refactor?”&lt;/li&gt;
&lt;li&gt;“Which architectural concepts do you follow? What should I read up on?”&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Find out more about their &lt;strong&gt;processes&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;“What is your process regarding pull requests?”&lt;/li&gt;
&lt;li&gt;“Can you walk me through your release process?”&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Apart from that, someone should take you on a tour through the codebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your First Task
&lt;/h2&gt;

&lt;p&gt;Your first task should be &lt;strong&gt;small and easy to start with&lt;/strong&gt;, because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You’ll need to get everything running locally&lt;/li&gt;
&lt;li&gt;You’ll get familiar with the processes from assigning a task to merging a pull request&lt;/li&gt;
&lt;li&gt;You won’t need to get too much into the code base&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it. Now you’re ready for your first big task.&lt;/p&gt;

&lt;h2&gt;
  
  
  3 Tips For Your First 3 Weeks
&lt;/h2&gt;

&lt;p&gt;Three tips for your first few weeks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do tasks and ask questions.&lt;/li&gt;
&lt;li&gt;Pair program whenever possible.&lt;/li&gt;
&lt;li&gt;Let the team know how the onboarding experience was. Point to outdated documentation or unclear parts of the codebase.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>career</category>
    </item>
    <item>
      <title>Have a “Why Conversation” With Your Side-Projects</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Tue, 26 Oct 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/simon_mannes/have-a-why-conversation-with-your-side-projects-2foi</link>
      <guid>https://dev.to/simon_mannes/have-a-why-conversation-with-your-side-projects-2foi</guid>
      <description>&lt;p&gt;Taking a break from something allows you to see it more clearly.&lt;/p&gt;

&lt;p&gt;It's the same with code, projects, and people.&lt;/p&gt;

&lt;p&gt;If you return to a piece of software you have written 6 months ago, you'll think "how could I ever write this?" You'd do it differently now because you have practiced and learned.&lt;/p&gt;

&lt;p&gt;Being away over the weekend makes me appreciate my wife even more when I'm back home.&lt;/p&gt;

&lt;p&gt;And taking a break from a project is a great way to reassess the direction you're taking.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I did a summer break from &lt;a href="https://mannes.tech/blog/"&gt;my programming blog&lt;/a&gt; to reflect where I want it to go.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;These are the questions I asked myself to find a new perspective on my blog during my summer-break from it.&lt;/p&gt;

&lt;p&gt;You can use them on your own side-projects.&lt;/p&gt;

&lt;p&gt;They work because you aren't doing side-projects for their own sake. You always have some goal with them, even if it's just "learning Flutter".&lt;/p&gt;

&lt;h2&gt;
  
  
  The Strategy: What × Whyⁿ × How
&lt;/h2&gt;

&lt;p&gt;Basically, we need to find the deepest layer of "why", and then find a better solution for this why.&lt;/p&gt;

&lt;p&gt;This is the general strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What am I actually doing here currently?&lt;/li&gt;
&lt;li&gt;Why am I doing this? What am I trying to achieve? What were my goals when I started this?&lt;/li&gt;
&lt;li&gt;Why are these goals important? Why might they not be important?&lt;/li&gt;
&lt;li&gt;How can I achieve the desired result?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using The Strategy On My Blog
&lt;/h2&gt;

&lt;p&gt;I don't want this to just be a boring lecture, so let's dive right into how I applied this to my blog.&lt;/p&gt;

&lt;h3&gt;
  
  
  What exactly am I doing currently regarding my blog?
&lt;/h3&gt;

&lt;p&gt;Before the summer pause, I did 1 article every week, and 1 newsletter every two weeks.&lt;/p&gt;

&lt;p&gt;The articles were from a variety of categories. In some, I shared &lt;a href="https://mannes.tech/side-project-productivity/"&gt;my experiences as a software engineer&lt;/a&gt; or &lt;a href="https://mannes.tech/small-pieces/"&gt;wrote about best practices&lt;/a&gt;. In others, I went deep into one technology, like &lt;a href="https://mannes.tech/gridsome-tutorial/"&gt;my Gridsome framework series&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are my goals with this blog?
&lt;/h3&gt;

&lt;p&gt;Now, we need to find out the first layer of "why". The surface-level goals of this project.&lt;/p&gt;

&lt;p&gt;From the top of my head, I have three goals with this blog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give something back to the dev-community&lt;/li&gt;
&lt;li&gt;Get onto the radar of potential freelancing clients&lt;/li&gt;
&lt;li&gt;Be googleable&lt;/li&gt;
&lt;li&gt;Practice writing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why are these goals important? Why might they not be important?
&lt;/h3&gt;

&lt;p&gt;My whys for these surface-level goals:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Goal "Give something back to the dev-community"&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why:

&lt;ul&gt;
&lt;li&gt;As a developer I use so much open-source stuff every day. Programming languages, libraries, frameworks, documentation, articles…. Everything created by other people, most often in their free time. This feels like I should give something back, too.&lt;/li&gt;
&lt;li&gt;And that is important to me because I don't want to profit one-sidedly from something, that's not who I want to be.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Why not:

&lt;ul&gt;
&lt;li&gt;It's time-consuming and sometimes tiring.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Get onto the radar of potential freelancing clients&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why:

&lt;ul&gt;
&lt;li&gt;Blogs are one of many ways to be found by potential clients. If you write a lot about a certain topic, hold conference talks about it, and write a book or two, people view you as an authority on that subject. That's a great way to get clients.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Why not:

&lt;ul&gt;
&lt;li&gt;With typical project lengths of 3-12 months, I don't need that many clients. I already have a good network and receive many project inquiries every month.&lt;/li&gt;
&lt;li&gt;I also don't want to be a freelancer for the rest of my life. It's only one small step in my multi-year plan towards freedom.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Be googleable&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why:

&lt;ul&gt;
&lt;li&gt;It's cool.&lt;/li&gt;
&lt;li&gt;It plays into the point above: being found by potential clients.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Why not:

&lt;ul&gt;
&lt;li&gt;I'm not sure how much I value privacy. Once stuff is on the internet, you can't remove it.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practice writing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why:

&lt;ul&gt;
&lt;li&gt;Writing is a very important and valuable skill as a developer, even more so if you work remotely.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Why not:

&lt;ul&gt;
&lt;li&gt;I already practiced this a lot with my blogs and newsletters.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How can I fulfill these goals?
&lt;/h3&gt;

&lt;p&gt;Last, we need to think about minimum viable solutions to achieve the goals from above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give something back to the dev-community

&lt;ul&gt;
&lt;li&gt;One possibility here would be to only share deeper insights and experiences in longer articles.&lt;/li&gt;
&lt;li&gt;I could also donate to OS projects so other people can spend more time improving the tooling I use every day.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Come onto the radar for potential freelancing client

&lt;ul&gt;
&lt;li&gt;This point is valid, but I think it's unnecessary to think about getting more (or better) clients at the moment. I don't plan on staying a freelancer for long, so I think 2-4 clients at standard market rates could be enough.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Be googleable

&lt;ul&gt;
&lt;li&gt;A LinkedIn profile, a Twitter profile or a business-card-like website are enough for this.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Practice writing

&lt;ul&gt;
&lt;li&gt;I already write a lot apart from this blog, e.g. NM newsletters.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So three of my four goals are no longer as relevant as before, and there are different ways to achieve the first one.&lt;/p&gt;

&lt;p&gt;This gets me to the conclusions I took from this after-break exercise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Changes to this blog
&lt;/h2&gt;

&lt;p&gt;I only want to publish when I have to say something.&lt;/p&gt;

&lt;p&gt;I know that &lt;a href="https://austinkleon.com/2020/12/10/quantity-leads-to-quality-the-origin-of-a-parable/"&gt;quantity leads to quality&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But with over 185 pieces of content published on the web in the last 20 months, over 90 on this blog alone, I've done pretty well on the quantity side of things.&lt;/p&gt;

&lt;p&gt;I really enjoy writing for and working on my second blog, &lt;a href="https://www.nerdfulmind.com/"&gt;Nerdful Mind&lt;/a&gt;. But I rarely enjoy writing for mannes.tech.&lt;/p&gt;

&lt;p&gt;So, because of the why-investigation above, I'm conducting an experiment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only write about things I have fresh in my head (easy to write about), or topics I enjoy writing about (that are still relevant to this blog)&lt;/li&gt;
&lt;li&gt;Publish at least once a month&lt;/li&gt;
&lt;li&gt;Email this blog's list once a month&lt;/li&gt;
&lt;li&gt;Write at one specific time slot every week and only write more if I want to&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This experiment will run until February next year to collect enough data.&lt;/p&gt;

&lt;h2&gt;
  
  
  How you can check your side projects
&lt;/h2&gt;

&lt;p&gt;What are you working on that takes a lot of time?&lt;/p&gt;

&lt;p&gt;Do you know exactly why you're doing it? And why you're doing it the way you're doing it?&lt;/p&gt;

&lt;p&gt;To find out, ask yourself the questions from above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What exactly am I doing currently regarding X?&lt;/li&gt;
&lt;li&gt;What are my goals with X?&lt;/li&gt;
&lt;li&gt;Why are these goals important? Why might they not be important?&lt;/li&gt;
&lt;li&gt;How can I fulfill these goals (more efficiently)?&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;If you enjoyed this and want to do me a favor, follow me on twitter &lt;a href="https://twitter.com/simon_mannes"&gt;@simon_mannes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I also write a newsletter about mindfulness and personal growth for developers, check that you here: &lt;a href="https://nerdfulmind.com"&gt;https://nerdfulmind.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>development</category>
    </item>
    <item>
      <title>Why Am I So Bad At Coding?</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Wed, 01 Sep 2021 17:24:54 +0000</pubDate>
      <link>https://dev.to/simon_mannes/why-am-i-so-bad-at-coding-52fn</link>
      <guid>https://dev.to/simon_mannes/why-am-i-so-bad-at-coding-52fn</guid>
      <description>&lt;p&gt;You started developing software a long time ago, but you still feel like you're bad at coding.&lt;/p&gt;

&lt;p&gt;You're not alone.&lt;/p&gt;

&lt;p&gt;Many developers feel this way.&lt;/p&gt;

&lt;p&gt;But most devs are, per definition, around average. So you're likely a decent software developer.&lt;/p&gt;

&lt;p&gt;The reason you still feel like you're bad at coding is that you're falling into one of two categories:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. You're Having Impostor Syndrome
&lt;/h2&gt;

&lt;p&gt;People have talked about this before, but developers are prone to the &lt;strong&gt;impostor syndrome&lt;/strong&gt;. We feel like we've just gotten lucky in that test. The interviewer only posed challenges we practiced. &lt;/p&gt;

&lt;p&gt;And nobody has asked questions yet that could reveal us.&lt;/p&gt;

&lt;p&gt;Reveal that we don't know nearly as much as we should.&lt;/p&gt;

&lt;p&gt;It could blow up at any moment.&lt;/p&gt;

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

&lt;p&gt;It can feel like this because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We read blogs every day where rockstar developers from big-name companies write about all the crazy scalability challenges they solve and how they manage their 10'000-pod Kubernetes cluster.
Yes, this may all be the case. But it doesn't negate your own challenges.&lt;/li&gt;
&lt;li&gt;The pile of things to learn grows larger every day. And you can't be a good developer if you still need StackOverflow or editor autocomplete to know which braces you need for a switch-case statement, right? Right?
Wrong. You don't need to know everything.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A good developer isn't somebody who knows everything and always finds the perfect solution on the first try. A good developer is someone who solves challenges, big and small, one after the other. Together with their team or with the help of random people on the internet. With a better-than-random judgement of what might work.&lt;/p&gt;

&lt;p&gt;So if you have done a few projects and are working as a software engineer in a team, don't question your expertise. Just continue learning.&lt;/p&gt;

&lt;p&gt;Remember: a real impostor would never question if they were an impostor.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. You Don't Have Much Work Experience
&lt;/h2&gt;

&lt;p&gt;Maybe you're not yet working as a professional developer.&lt;/p&gt;

&lt;p&gt;Or you have just started a dev job.&lt;/p&gt;

&lt;p&gt;This can feel as if you'll never make it to the "professional developer" side.&lt;/p&gt;

&lt;p&gt;But remember this.&lt;/p&gt;

&lt;p&gt;You have learned to walk, to speak, and to write, and billions of people have learned that before you.&lt;/p&gt;

&lt;p&gt;And just as millions of people before you, you will learn to be a professional developer.&lt;/p&gt;

&lt;p&gt;It just takes practice.&lt;/p&gt;

&lt;p&gt;And practice.&lt;/p&gt;

&lt;p&gt;And more practice.&lt;/p&gt;

&lt;p&gt;Solving one challenge after the other.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, What To Do If You Feel Bad At Coding?
&lt;/h2&gt;

&lt;p&gt;If you are already a professional developer, I recommend you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check out &lt;a href="https://www.youtube.com/watch?v=l_Vqp1dPuPo"&gt;this RailsConf talk&lt;/a&gt;, which was one of the first talks around impostor syndrome for developers (money quote: "the funniest thing was my brain played this great trick on me: it told me I didn't have impostor syndrome bad enough to give a talk on impostor syndrome.")&lt;/li&gt;
&lt;li&gt;Make (and keep) a list of every project you have completed and every challenge you have overcome - be proud of them and keep them close for the next time you feel down&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're just starting out on software development, I recommend:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check out &lt;a href="https://twitter.com/DThompsonDev"&gt;Danny Thompson&lt;/a&gt; for motivation. He went from a job at a gas station to working for Google because he learned to code. And he is sharing his excitement with everyone else.&lt;/li&gt;
&lt;li&gt;Keep doing &lt;a href="https://mannes.tech/junior-project-ideas/"&gt;learning projects&lt;/a&gt;. Apply for and &lt;a href="https://github.com/yangshun/tech-interview-handbook"&gt;prepare for a coding interview&lt;/a&gt; when you have done 2-3 personal projects.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;If you liked this, you'll like my weekly newsletter even more! Each issue of &lt;a href="https://www.nerdfulmind.com/newsletter/"&gt;Nerdful Mind&lt;/a&gt; contains one mindful idea, three reading recommendations, and one mindfulness exercise.&lt;br&gt;
It's fueled by 7 years of software development and meditation experience, and will help you become a better sofware engineer and more content with what you do.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mindfulness</category>
      <category>productivity</category>
      <category>happiness</category>
      <category>mentalhealth</category>
    </item>
    <item>
      <title>10 Ideas How To Manage Stress As A Software Engineer</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Wed, 25 Aug 2021 09:05:25 +0000</pubDate>
      <link>https://dev.to/simon_mannes/10-ideas-how-to-manage-stress-as-a-software-engineer-37gj</link>
      <guid>https://dev.to/simon_mannes/10-ideas-how-to-manage-stress-as-a-software-engineer-37gj</guid>
      <description>&lt;p&gt;Developing software can be stressful.&lt;/p&gt;

&lt;p&gt;Deploying to production on a Friday evening, knowing the week isn’t over yet.&lt;/p&gt;

&lt;p&gt;That deadline for a feature next week, which you haven’t even started yet because there’s no way to extend this undocumented piece of horror without breaking something else.&lt;/p&gt;

&lt;p&gt;Or some outside party meddling with your project, changing directions and technologies all the time.&lt;/p&gt;

&lt;p&gt;Stress adds up. From different sources and over time.&lt;/p&gt;

&lt;p&gt;And you often have no control over outside influences.&lt;/p&gt;

&lt;p&gt;But you control how you respond.&lt;/p&gt;

&lt;p&gt;This list of ideas is about finding ways to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;keep your energy levels high&lt;/li&gt;
&lt;li&gt;reduce self-created stress&lt;/li&gt;
&lt;li&gt;free up your mental space&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So let’s dive right in!&lt;/p&gt;

&lt;h2&gt;
  
  
  ☕️ Take Breaks
&lt;/h2&gt;

&lt;p&gt;Even though it’s called a “Sprint” doesn’t mean you should sprint all the time.&lt;br&gt;
Breaks are important to maintain your energy.&lt;/p&gt;

&lt;p&gt;Take small breaks every day, larger breaks every week, and huge breaks every few months.&lt;/p&gt;

&lt;p&gt;A break doesn’t mean doing nothing.&lt;/p&gt;

&lt;p&gt;It’s better to find the right balance between active breaks (sport, social, creative) and passive breaks (books, TV, chill).&lt;/p&gt;

&lt;p&gt;There’s no one size fits all solution.&lt;/p&gt;

&lt;p&gt;Find a &lt;em&gt;balance&lt;/em&gt; that is right for you. Learn to recognize when you need a break. And learn to take a break when you need one.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Don’t Take Things Personally (Esp. Code Reviews And Feedback On Ideas)
&lt;/h2&gt;

&lt;p&gt;Feedback about code is just that: about the code.&lt;/p&gt;

&lt;p&gt;If someone criticizes your work, whether it’s code, a presentation, or an idea you have proposed, yes, that can hurt.&lt;/p&gt;

&lt;p&gt;But if you didn’t get personally attacked, all you received was feedback by someone who cares.&lt;/p&gt;

&lt;p&gt;Everyone in your project team (hopefully) has the project’s best interests in mind.&lt;/p&gt;

&lt;p&gt;So if you get lots of comments on your pull request, great!&lt;/p&gt;

&lt;p&gt;You’ve got an opportunity to improve.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎨 Have Hobbies Away From The Screen
&lt;/h2&gt;

&lt;p&gt;Much of our work happens in front of screens.&lt;/p&gt;

&lt;p&gt;Even more so when working remote.&lt;/p&gt;

&lt;p&gt;It’s not that sitting in front of a computer is stressful per se.&lt;/p&gt;

&lt;p&gt;But if a computer is everything you see all day, you’re missing variety for mind and body.&lt;/p&gt;

&lt;p&gt;It’s important to do things off-screen.&lt;/p&gt;

&lt;p&gt;So if you don’t already have a regular activity away from screens, try out new things until you find an activity you enjoy that doesn’t involve computers.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I struggled with this at the beginning of my career, but got much better. Simply through trying things out and finding something fun to stick with.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🏃‍♂️ Do Enough Sport
&lt;/h2&gt;

&lt;p&gt;If I don’t move enough, after a few days I feel tired and have little patience.&lt;/p&gt;

&lt;p&gt;Physical exercise is crucial to staying relaxed.&lt;/p&gt;

&lt;p&gt;Just as your mind benefits from a mixture of high and low cognitive load, it also benefits from demanding physical activity.&lt;/p&gt;

&lt;p&gt;Move a little every day and get your blood pumping a few times a week.&lt;/p&gt;

&lt;p&gt;Whether you’re running, biking, doing body-weight exercises, Yoga, or weight lifting doesn’t matter if you have no other fitness goals.&lt;/p&gt;

&lt;p&gt;Just do something.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧘‍♀️ Practice Mindfulness
&lt;/h2&gt;

&lt;p&gt;Mindfulness is a state you can practice.&lt;/p&gt;

&lt;p&gt;It has many benefits, among them: staying calmer, having a higher stress resistance, a lower default stress level, more patience, and more compassion.&lt;/p&gt;

&lt;p&gt;Take some time every day (or a few times a week) to meditate and do &lt;a href="https://dev.to/simon_mannes/7-mindfulness-exercises-developers-can-do-every-day-8pl"&gt;mindfulness exercises&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If physical exercises improve your physical health, mindfulness exercises improve your mental health.&lt;/p&gt;

&lt;h2&gt;
  
  
  ☑️ Keep Tasks On A To-Do List, Not In Your Mind
&lt;/h2&gt;

&lt;p&gt;Writing all to-dos down is one of the greatest methods for productivity and mental clarity I know.&lt;/p&gt;

&lt;p&gt;I can barely imagine my life before Todoist, and I cannot imagine my life before learning about &lt;a href="https://en.wikipedia.org/wiki/Getting_Things_Done"&gt;Getting Things Done (GTD)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While GTD has many rules, it’s ultimately a system to help you manage your life clearly and with confidence.&lt;/p&gt;

&lt;p&gt;I adapted GTD and continuously adapted it to my own preferences.&lt;/p&gt;

&lt;p&gt;Its most important lesson is to write every to-do you have &lt;em&gt;in&lt;/em&gt; your head down in one place &lt;em&gt;outside&lt;/em&gt; your head.&lt;/p&gt;

&lt;p&gt;Then prioritize and get to work.&lt;/p&gt;

&lt;h2&gt;
  
  
  😌 Don’t Be Hard On Yourself (For Not Making Progress Fast Enough)
&lt;/h2&gt;

&lt;p&gt;For some people (including me) this is difficult.&lt;/p&gt;

&lt;p&gt;We make plans for what we want to achieve this week, that weekend.&lt;/p&gt;

&lt;p&gt;During a workday, we imagine what we want to complete by the end of the day.&lt;/p&gt;

&lt;p&gt;Then we achieve &lt;em&gt;something&lt;/em&gt;, but not &lt;em&gt;everything&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;We feel bad.&lt;/p&gt;

&lt;p&gt;It helps me to remember that there’s &lt;em&gt;always&lt;/em&gt; more I could do.&lt;br&gt;
More tasks I could complete and more plans I could make.&lt;/p&gt;

&lt;p&gt;I had to learn to be content when I only finished my highest-priority task that day.&lt;/p&gt;

&lt;p&gt;And if I didn’t complete it, it was probably too big for one day, anyway.&lt;/p&gt;

&lt;p&gt;Don’t be hard on yourself. Be proud that you even did &lt;em&gt;anything&lt;/em&gt;. That already sets you apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤷‍♂️ Learn To Say “I don’t know, but I’ll find out and get back to you”
&lt;/h2&gt;

&lt;p&gt;Some people get defensive when you ask something they don’t know.&lt;br&gt;
They don’t want to admit they don’t know the answer.&lt;/p&gt;

&lt;p&gt;Exams in school work this way. But our lives don't.&lt;/p&gt;

&lt;p&gt;“I don’t know” and “I haven’t made an opinion on that” are perfectly valid answers.&lt;/p&gt;

&lt;p&gt;As long as, in a professional context, you add “but I’ll find out/think about it and come back to you.”&lt;/p&gt;

&lt;p&gt;You don't need to know everything on the spot and you're allowed to do research.&lt;/p&gt;

&lt;h2&gt;
  
  
  🙅‍♀️ Learn To Say No
&lt;/h2&gt;

&lt;p&gt;It’s easy to say yes.&lt;/p&gt;

&lt;p&gt;“Yes, I’d love to write that report.”&lt;br&gt;
“Yes, I’ll finish that feature by tomorrow.”&lt;/p&gt;

&lt;p&gt;But how often do you say yes and regret it afterwards?&lt;/p&gt;

&lt;p&gt;If you say &lt;em&gt;yes&lt;/em&gt; to something, you say no to all the other things you could have done in that time.&lt;/p&gt;

&lt;p&gt;If you say &lt;em&gt;yes&lt;/em&gt; to everything, your to-do list will grow to a point where looking at it will make you sick and you could never possibly complete everything without external help.&lt;/p&gt;

&lt;p&gt;It’s okay to say &lt;em&gt;“no”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And it’s okay to say, “Not now. Can I come back to you when I’ve got the time?”.&lt;/p&gt;

&lt;h2&gt;
  
  
  😎 Accept That You Can’t Know Everything And Sometimes Need Help
&lt;/h2&gt;

&lt;p&gt;Don’t feel embarrassed if you don’t know something.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Nobody knows everything&lt;/li&gt;
&lt;li&gt;Everyone started as a beginner&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you stress out because you don’t know everything you need for a given task, relax.&lt;br&gt;
You can just close this knowledge gap.&lt;/p&gt;

&lt;p&gt;Find out if the internet knows anything relevant.&lt;br&gt;
Read the documentation.&lt;br&gt;
Ask your colleagues.&lt;/p&gt;

&lt;p&gt;Good coworkers know this and give you the time and space to learn.&lt;/p&gt;

&lt;p&gt;Great coworkers challenge you and give you the support you need.&lt;/p&gt;

&lt;p&gt;Nowadays, there is so much more to learn than one human could ever learn in their lifetime.&lt;/p&gt;

&lt;p&gt;Take one step after the other, in a direction you find promising.&lt;/p&gt;

&lt;h2&gt;
  
  
  Take A Deep Breath
&lt;/h2&gt;

&lt;p&gt;Mindfulness helps me become a better software engineer.&lt;br&gt;
Practicing mindfulness is for the mind like physical exercise is for the body.&lt;br&gt;
For me, it improves clarity, focus, calmness and compassion.&lt;/p&gt;




&lt;p&gt;Interested in more mindfulness content for developers?&lt;/p&gt;

&lt;p&gt;⬇️ Subscribe to the weekly Nerdful Mind newsletter!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.nerdfulmind.com/newsletter/"&gt;Subscribe to Nerdful Mind&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I'm also on &lt;a href="https://twitter.com/simon_mannes"&gt;Twitter&lt;/a&gt; if that's your thing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mindfulness</category>
      <category>productivity</category>
      <category>happiness</category>
      <category>stress</category>
    </item>
    <item>
      <title>6 Rules of Mindful Productivity for Software Developers</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Fri, 20 Aug 2021 12:13:21 +0000</pubDate>
      <link>https://dev.to/simon_mannes/6-rules-of-mindful-productivity-for-software-developers-f1j</link>
      <guid>https://dev.to/simon_mannes/6-rules-of-mindful-productivity-for-software-developers-f1j</guid>
      <description>&lt;p&gt;There’s always something to do.&lt;/p&gt;

&lt;p&gt;In a typical project (and in life) there are always tasks you &lt;em&gt;need&lt;/em&gt; to do, and tasks you &lt;em&gt;could&lt;/em&gt; do. This can feel like you didn’t get anything done at the end of the day, even though you’re feeling tired.&lt;/p&gt;

&lt;p&gt;If you’re searching online, you can find plenty of productivity rules. Some rules are similar, while others are complete opposites!&lt;/p&gt;

&lt;p&gt;Mindful productivity is a way to work on what matters, focus on the present, and take breaks and time to recharge.&lt;/p&gt;

&lt;p&gt;Here are six rules of mindful productivity that work for me (a software developer).&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan Your Day
&lt;/h2&gt;

&lt;p&gt;If you don’t know what you want to accomplish at the beginning of the day, at the end of the day you will feel like you accomplished nothing.&lt;/p&gt;

&lt;p&gt;Always plan your day. Either in the morning or the evening before. The bare minimum is to look up which meetings you have, and to identify the most important task (MIT) that day.&lt;/p&gt;

&lt;p&gt;Your MIT is the task you can do today that has the most impact on your goals (or the project’s goals).&lt;/p&gt;

&lt;p&gt;For bonus points, you can schedule breaks and block focus time (see below).&lt;/p&gt;

&lt;h2&gt;
  
  
  Do Your MIT First
&lt;/h2&gt;

&lt;p&gt;This is where the planning plays in your hands.&lt;/p&gt;

&lt;p&gt;As hard as it seems, do your most important task first. &lt;a href="https://todoist.com/productivity-methods/eat-the-frog"&gt;Eat the frog&lt;/a&gt;. All other tasks are filler tasks that distract you from your MIT.&lt;/p&gt;

&lt;p&gt;I notice that when my MIT is really hard or not very well defined, I drift off to do other tasks and get distracted. Practicing mindfulness enables me to notice this more often. It helps to remind myself that this is indeed the most impactful task I could do right now. That it really brings me forward with my goals.&lt;/p&gt;

&lt;p&gt;If I continue to become distracted, it’s a sign that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  my task is not very well defined and that I need to plan it in more detail or break it up into smaller tasks&lt;/li&gt;
&lt;li&gt;  I need someone to help me with this&lt;/li&gt;
&lt;li&gt;  I need to take another look at my goals and if they are really important to me.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Breaking a task into smaller steps is the best way to “become unstuck” with a task.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn to be content when you only finish your MIT today.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Make Regular Breaks
&lt;/h2&gt;

&lt;p&gt;A colleague of me is so focused during his work that he forgets to drink water and stand up. He needs to force himself or set a timer to remember to care for himself.&lt;/p&gt;

&lt;p&gt;Even if you regularly stand up to get something to drink, or get up and stretch, we all benefit from more focused breaks. High-quality breaks with good timing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;High-quality breaks&lt;/strong&gt; help us care for our mind or body. Do something good for your body and get something to drink (preferably water), stretch, or shake yourself. Give your mind a break by looking out of the window, or doing a &lt;a href="https://dev.to/simon_mannes/7-mindfulness-exercises-developers-can-do-every-day-8pl"&gt;mindfulness exercise&lt;/a&gt; to bring your thoughts back to the present moment.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Well timed breaks&lt;/strong&gt; give you space when you really need it, not when you just want to avoid your task.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You know best how your current breaks are. Do you benefit from explicitly scheduling them? Or by picking a 1-minute “break-exercise” you do every break today? Do you need to focus not on doing more breaks but more &lt;strong&gt;intentional&lt;/strong&gt; breaks?&lt;/p&gt;

&lt;p&gt;Determine how you want to do your breaks and evaluate after a week. Then adapt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Block Uninterrupted Focus Time
&lt;/h2&gt;

&lt;p&gt;Does Slack impact your productivity? Or Teams?&lt;/p&gt;

&lt;p&gt;How often do you check your email inbox?&lt;/p&gt;

&lt;p&gt;Every &lt;em&gt;bling&lt;/em&gt; calls for your attention and costs you a few minutes of productive, focused work. The constant stream of messages also increases stress. (See &lt;a href="https://www.wired.co.uk/article/slack-ruining-work"&gt;this article&lt;/a&gt; for more info.)&lt;/p&gt;

&lt;p&gt;There are two types of work, &lt;strong&gt;deep work&lt;/strong&gt; and &lt;strong&gt;shallow work&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Deep work&lt;/strong&gt; is what only you can do. The work that you need focus and time for. Programming, for example.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Shallow work&lt;/strong&gt; is answering your emails, messaging coworkers on Slack, and most administrative work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both are necessary. But both also need a different kind of focus. While most shallow work tasks only take a few minutes of your time, deep work requires hours of focused attention.&lt;/p&gt;

&lt;p&gt;Take advantage of this by blocking uninterrupted time for focused deep work. When planning your day, block time, ideally 1-3 one hour blocks. At the beginning of those blocks, disable all notifications and set yourself to “busy” or “absent” in your chat applications. Close your email client.&lt;/p&gt;

&lt;p&gt;Enjoy this quiet and focused block of time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do Your Tasks Mindfully
&lt;/h2&gt;

&lt;p&gt;Mindfulness means keeping a moment-to-moment awareness of your thoughts, bodily feelings and your surroundings, without judging anything.&lt;/p&gt;

&lt;p&gt;When you do your tasks mindfully, your focus is on that task alone. It’s okay when your thoughts drift. But as soon as you notice that your mind has wandered, return to your task at hand.&lt;/p&gt;

&lt;p&gt;Mindful working also means no multi-tasking and no &lt;a href="https://americanexpress.io/yak-shaving/"&gt;yak-shaving&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Learn to notice when you’re doing multiple things simultaneously, and when you keep changing the task you’re working on.&lt;/p&gt;

&lt;p&gt;Notice this. Let it go. And return to what you wanted to do originally.&lt;/p&gt;

&lt;h2&gt;
  
  
  End Your Workday on Time
&lt;/h2&gt;

&lt;p&gt;Recharging is important.&lt;/p&gt;

&lt;p&gt;We heavily use our brains, and your brain needs time to recharge.&lt;/p&gt;

&lt;p&gt;Especially as a software engineer, I don’t believe that we’re productive for 8+ hours every day. I do most of my best work in 2-4 hours. The rest is administrative work, helping co-workers, planning, and documentation.&lt;/p&gt;

&lt;p&gt;Every profession uses their brain and their body differently, and every individual too! I believe that knowledge workers can achieve most of their results in much less than 40 hours.&lt;/p&gt;

&lt;p&gt;So whatever your working hours, end your workday on time and go do something else. Use your time off to recharge, read, learn, do sports, cook, care for your family, or whatever else is important to you.&lt;/p&gt;

&lt;p&gt;You know best if that’s something you already do, or if you should focus more on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Develop Your Own Productivity System
&lt;/h2&gt;

&lt;p&gt;These rules are not hard-written. They are what works for me (and some other people). There exists no “holy grail” of productivity systems that works for everyone.&lt;/p&gt;

&lt;p&gt;Try these methods out. Search online for more.&lt;/p&gt;

&lt;p&gt;Find out what works for you. Some methods will feel better than others.&lt;/p&gt;

&lt;p&gt;For personal productivity, it’s important to get the basics right:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Sleep enough:&lt;/strong&gt; most people need around 8 hours of sleep every night.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Eat balanced:&lt;/strong&gt; try to diversify your diet. Include some fresh vegetables and legumes. There are no hard rules, just eat balanced and not too much.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Exercise:&lt;/strong&gt; find some sport or physical activity you &lt;strong&gt;enjoy&lt;/strong&gt;. You don’t need to start running ultramarathons, but get your body moving and your blood pumping from time to time. 2-3 times a week is plenty.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many people want to slap productivity hacks onto broken basics.&lt;/p&gt;

&lt;p&gt;Get the basics right. Then find out what works.&lt;/p&gt;




&lt;p&gt;Interested in more mindfulness for developers? Check out my weekly newsletter &lt;a href="https://www.nerdfulmind.com/newsletter/"&gt;Nerdful Mind&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I'm also on &lt;a href="https://twitter.com/simon_mannes"&gt;Twitter&lt;/a&gt; if that's your thing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mindfulness</category>
      <category>productivity</category>
      <category>happiness</category>
      <category>mentalhealth</category>
    </item>
    <item>
      <title>Writing Code In Small Pieces - Vertical vs Horizontal Development</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Sun, 27 Jun 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/simon_mannes/writing-code-in-small-pieces-vertical-vs-horizontal-development-472m</link>
      <guid>https://dev.to/simon_mannes/writing-code-in-small-pieces-vertical-vs-horizontal-development-472m</guid>
      <description>&lt;p&gt;There are many ways you can write your code.&lt;/p&gt;

&lt;p&gt;We have best practices and linters, opinionated frameworks and architecture patterns.&lt;/p&gt;

&lt;p&gt;The very big and very small decisions. Stuff you decide on the team-level.&lt;/p&gt;

&lt;p&gt;Then there's a middle ground. That's what happens while you implement a larger feature or a smaller service by yourself.&lt;/p&gt;

&lt;p&gt;The result is what your team sees. But the process is how you develop that code.&lt;/p&gt;

&lt;p&gt;Everyone has their own way of writing code, and I believe we can learn from each other if we share our internal processes more.&lt;/p&gt;

&lt;p&gt;Some definitions to start:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Vertical development&lt;/em&gt; means you make a fully, end-to-end working solution first (however few features it has) and then extend it.
Example: you set up a full Node.js Express server, then add a route to it, and then test everything together.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Horizontal development&lt;/em&gt; means you make one piece of the software work and then add another "layer".
Example: You write the functionality for the "business logic" first, test it with a unit test, and then integrate it into a web server. This can also be done in a test-driven way.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This seems like a fuzzy distinction, but with a larger example it'll make more sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing a Tic-Tac-Toe Game
&lt;/h2&gt;

&lt;p&gt;You can find the rules of the game here: &lt;a href="https://ccd-school.de/en/coding-dojo/application-katas/tic-tac-toe/"&gt;https://ccd-school.de/en/coding-dojo/application-katas/tic-tac-toe/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In summary, we're developing a terminal program that displays a Tic-Tac-Toe game in text form.&lt;br&gt;
This program expects three inputs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A coordinate like &lt;code&gt;A0&lt;/code&gt; or &lt;code&gt;B2&lt;/code&gt; for the player to place their symbol&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;next&lt;/code&gt;, which starts a new game&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;exit&lt;/code&gt;, which exits the program&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After starting up, it automatically sets up a new game for the player.&lt;/p&gt;

&lt;p&gt;When the player makes a move, the game AI directly makes the opponent's move (which can be as dumb or smart as we want).&lt;/p&gt;

&lt;p&gt;Let's look at how we can implement this horizontally or vertically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vertical implementation plan
&lt;/h2&gt;

&lt;p&gt;Going vertical, our goal is to get a program running with a terminal loop. We want to start it; it asks for input; on enter it prints new text and asks for new input. Ideally, the text is our initial Tic-Tac-Toe field.&lt;/p&gt;

&lt;p&gt;Development now would go as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You start researching how you can get a CLI with a terminal loop running&lt;/li&gt;
&lt;li&gt;You implement it, showing the same output regardless of input&lt;/li&gt;
&lt;li&gt;You test it manually&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you got this working, you can add state management, handling of keywords like &lt;code&gt;new&lt;/code&gt; and field names like &lt;code&gt;B1&lt;/code&gt;, add input validation, and so on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Horizontal development plan
&lt;/h2&gt;

&lt;p&gt;When developing horizontally, we start with the "business logic".&lt;br&gt;
I'd use a test-driven approach and develop a class that manages our whole game state, takes inputs, and outputs the game text for the console.&lt;/p&gt;

&lt;p&gt;Development plan:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a unit test that instantiates a class called &lt;code&gt;TicTacToeEngine&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Implement an empty class &lt;code&gt;TicTacToeEngine&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a unit test that calls a method called &lt;code&gt;toString()&lt;/code&gt; on a new instance and expects the empty game state string&lt;/li&gt;
&lt;li&gt;Implement the &lt;code&gt;toString()&lt;/code&gt; override&lt;/li&gt;
&lt;li&gt;Create a unit test to call a &lt;code&gt;makeMove()&lt;/code&gt; method with an allowed enum (e.g. &lt;code&gt;Moves.A0&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Implement the &lt;code&gt;makeMove()&lt;/code&gt; method to pass the test&lt;/li&gt;
&lt;li&gt;Create a unit test that checks calls &lt;code&gt;makeMove()&lt;/code&gt; and then &lt;code&gt;toString()&lt;/code&gt; and expects an updated state string&lt;/li&gt;
&lt;li&gt;… and so on until we meet the specification from above&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can also create unit tests for invalid inputs, e.g. making the move "A0" two times in a row should throw an error. At one point, you should also write tests to expect an AI move (two changes) after making a player move.&lt;/p&gt;

&lt;p&gt;When you got a fully working game engine, it is time to wrap it into a terminal app that instantiates a game on start (and on the &lt;code&gt;new&lt;/code&gt; keyword), listens for input and calls the &lt;code&gt;makeMove&lt;/code&gt; method with correct enums, outputs the state to console, and so on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why choose one development method over the other?
&lt;/h2&gt;

&lt;p&gt;There are benefits to getting a fully working application as fast as possible. And there are benefits to having a small, tested, and reliable component ready for integration.&lt;/p&gt;

&lt;p&gt;It comes down to preference and situation.&lt;/p&gt;

&lt;p&gt;Horizontal development is only possible for small "horizons".&lt;/p&gt;

&lt;p&gt;I prefer to start vertically by making "something" work, so I know where the different application parts interact and how the internal APIs look like. Then, if it makes sense (i.e. I have a well-defined component like a Tic-Tac-To engine), I go horizontally and implement one component fully.&lt;/p&gt;




&lt;p&gt;🙏 &lt;a href="https://twitter.com/simon_mannes"&gt;&lt;em&gt;Follow me on Twitter @simon_mannes&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
    <item>
      <title>How To Fix Merge Conflicts in yarn.lock and package-lock.json</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Sun, 30 May 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/simon_mannes/how-to-fix-merge-conflicts-in-yarn-lock-and-package-lock-json-1ffj</link>
      <guid>https://dev.to/simon_mannes/how-to-fix-merge-conflicts-in-yarn-lock-and-package-lock-json-1ffj</guid>
      <description>&lt;p&gt;Merge conflicts happen.&lt;/p&gt;

&lt;p&gt;With lock files, this can happen if you have different packages (or package versions) installed than in the branch you want to merge.&lt;/p&gt;

&lt;p&gt;Fixing the &lt;code&gt;package.json&lt;/code&gt; definition may take some work, but in difficult cases you can work together with the colleague who made the changes in the other branch.&lt;/p&gt;

&lt;p&gt;But the &lt;code&gt;yarn.lock&lt;/code&gt;file (or &lt;code&gt;package-json.log&lt;/code&gt;)? Oh my..&lt;/p&gt;

&lt;p&gt;It's so long and may have dozens of conflicts for every single conflict in &lt;code&gt;package.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The thing is.. You don't need to fix those merge conflicts yourself.&lt;/p&gt;

&lt;p&gt;It is a file that's generated. Not written by a human.&lt;/p&gt;

&lt;p&gt;Fixing merge conflicts there is a simple three-step process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1.&lt;/span&gt;
&lt;span class="nb"&gt;rm &lt;/span&gt;yarn.lock

&lt;span class="c"&gt;# 2.&lt;/span&gt;
yarn

&lt;span class="c"&gt;# 3. &lt;/span&gt;
git add yarn.lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Replace &lt;code&gt;yarn.lock&lt;/code&gt; with &lt;code&gt;package-lock.json&lt;/code&gt; if you're using npm.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Make your developer life simpler. Don't edit machine-generated files by hand. Simply regenerate them.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>6 Mindful Ideas to Be More Content As a Developer</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Sun, 02 May 2021 14:56:26 +0000</pubDate>
      <link>https://dev.to/simon_mannes/6-mindful-ideas-to-be-more-content-as-a-developer-22fp</link>
      <guid>https://dev.to/simon_mannes/6-mindful-ideas-to-be-more-content-as-a-developer-22fp</guid>
      <description>&lt;p&gt;What makes you content?&lt;/p&gt;

&lt;p&gt;Life is so full of distractions and endless to-do lists, it's easy to forget what it's all about.&lt;/p&gt;

&lt;p&gt;For me, the goal is not to be happy, but content.&lt;/p&gt;

&lt;p&gt;You can be happy or sad. Both are part of our lives.&lt;/p&gt;

&lt;p&gt;Contentment lies deeper within us. We can be happy and content or sad, but content. Both are ok.&lt;/p&gt;

&lt;p&gt;Being content is often not about getting what you want (there are infinitely many things to want), but recognizing and appreciating what you already have.&lt;/p&gt;

&lt;p&gt;Here are 6 mindful ideas that help me stay calm, clear, and content.&lt;/p&gt;

&lt;p&gt;I hope they help you, too.&lt;/p&gt;




&lt;h2&gt;
  
  
  Take It Slow And Steady
&lt;/h2&gt;

&lt;p&gt;There are infinitely many things to do.&lt;/p&gt;

&lt;p&gt;Many tasks seem to take you closer to your goals.&lt;/p&gt;

&lt;p&gt;But what does really matter? How do you spend your time best?&lt;/p&gt;

&lt;p&gt;It doesn't matter how many tasks you complete. What matters is their impact.&lt;/p&gt;

&lt;p&gt;Don't rush through your tasks. Ask yourself which ones really matter and how they contribute to your goals.&lt;/p&gt;

&lt;p&gt;Time spent planning your day is time well spent.&lt;/p&gt;

&lt;p&gt;Slowing down means to do fewer things overall, but more things that matter. To be less distracted and more conscious. Maintaining awareness and truly enjoying what you are doing.&lt;/p&gt;

&lt;p&gt;You don’t need to hurry.&lt;/p&gt;

&lt;p&gt;Just take one step at a time. And take your time to enjoy the journey.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I've written about taking it slow in issues &lt;a href="https://www.nerdfulmind.com/issues/slowing-down-nerdful-mind-22-252999/"&gt;Slowing Down – Nerdful Mind #22&lt;/a&gt; and &lt;a href="https://www.nerdfulmind.com/issues/slow-and-steady-nerdful-mind-36-277656/"&gt;Slow and Steady – Nerdful Mind #36&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Be Compassionate With Others And Yourself
&lt;/h2&gt;

&lt;p&gt;What is compassion?&lt;/p&gt;

&lt;p&gt;Compassion is the feeling you get when others or yourself are in physical, mental, or emotional pain, and you get the motivation to ease that pain.&lt;/p&gt;

&lt;p&gt;In meditation, we practice compassion with ourselves. We practice to let go of judging our own thoughts and feelings. We learn how we struggle and recognize that other people struggle in similar ways.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“It is said that we can't attain enlightenment, let alone feel contentment and joy, without seeing who we are and what we do, without seeing our patterns and our habits. This is called maitri – developing loving-kindness and an unconditional friendship with ourselves.” ― Pema Chödrön, When Things Fall Apart&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Kindness towards others and kindness towards yourself are the same thing.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I've written about compassion in issues &lt;a href="https://www.nerdfulmind.com/issues/compassion-and-awareness-nerdful-mind-12-236591/"&gt;Compassion and Awareness – Nerdful Mind #12&lt;/a&gt; and &lt;a href="https://www.nerdfulmind.com/issues/what-is-compassion-nerdful-mind-63-354688/"&gt;What Is Compassion? – Nerdful Mind #63&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Stay In The Present And Rest In Awareness
&lt;/h2&gt;

&lt;p&gt;So many things call for our attention.&lt;/p&gt;

&lt;p&gt;Social media, email notifications, coworkers on Slack, background noise. Memories of the past and fears of the future. Rather than doing one thing with focus, we're constantly switching from one thing to the next, and the next.&lt;/p&gt;

&lt;p&gt;What is awareness, and why is awareness important?&lt;/p&gt;

&lt;p&gt;Awareness is not the same as attention. When you focus on something, you give it your undivided attention. It fully absorbs you. Awareness means being aware of the context.&lt;/p&gt;

&lt;p&gt;Awareness allows us to step back and see our thoughts as what they are: words and images in our minds. Our thoughts are not the truth. They may or may not be important. This is up to you to decide.&lt;/p&gt;

&lt;p&gt;The psychological term for this is “cognitive defusion”.&lt;br&gt;
Stepping back from the content of our thoughts, instead of getting caught up in them. Letting thoughts go instead of holding on to them.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Let us not look back in anger, nor forward in fear, but around in awareness.” James Thurber&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can practice awareness everywhere, anytime. Not only during meditation but also when walking, writing code, or cooking dinner.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I've written about staying present in issues &lt;a href="https://www.nerdfulmind.com/issues/mindful-throughout-the-day-nerdful-mind-32-268051/"&gt;Mindful Throughout The Day – Nerdful Mind #32&lt;/a&gt; and &lt;a href="https://www.nerdfulmind.com/issues/awareness-vs-attention-nerdful-mind-13-237408/"&gt;Awareness vs. Attention – Nerdful Mind #13&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Simplify Your Life
&lt;/h2&gt;

&lt;p&gt;There's so much fuzz around simplicity.&lt;/p&gt;

&lt;p&gt;But why?&lt;/p&gt;

&lt;p&gt;Simplicity means less complexity. Fewer things to understand and fewer items to maintain. Fewer decisions to make and fewer distractions from the current moment. Ultimately, more peace of mind.&lt;/p&gt;

&lt;p&gt;Simplicity means not only to get rid of things you don't need.&lt;br&gt;
It means to remove the nonessential stuff in every area of your life and to focus on what matters most to you.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Simplicity boils down to two steps: Identify the essential. Eliminate the rest” – &lt;a href="https://zenhabits.net/"&gt;Leo Babauta&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;I've written about simplifying your life in issues &lt;a href="https://www.nerdfulmind.com/issues/simple-or-complex-nerdful-mind-9-230465/"&gt;Simple Or Complex? – Nerdful Mind #9&lt;/a&gt;, &lt;a href="https://www.nerdfulmind.com/issues/simplicity-in-personal-life-nerdful-mind-10-230541/"&gt;Simplicity In Personal Life – Nerdful Mind #10&lt;/a&gt; and &lt;a href="https://www.nerdfulmind.com/issues/simplicity-in-working-life-nerdful-mind-11-230542/"&gt;Simplicity In Working Life – Nerdful Mind #11&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Be Playful And Stay Curious
&lt;/h2&gt;

&lt;p&gt;Imagine you're going on vacation.&lt;/p&gt;

&lt;p&gt;It's the first time you see this new place. Nothing is familiar. Everything is new. You're going for a walk, look around, and see the beauty that surrounds you.&lt;/p&gt;

&lt;p&gt;When applied to any activity, we call this &lt;strong&gt;a beginner's mind&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Too often in life, we have a novel experience, enjoy it for a few days, and then it wears off.&lt;/p&gt;

&lt;p&gt;In mindfulness, playfulness and curiosity create space to learn.&lt;/p&gt;

&lt;p&gt;And in life, they open your eyes to the everyday beauty that surrounds us.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I've written about playfulness and curiosity in issues &lt;a href="https://www.nerdfulmind.com/issues/playfulness-and-curiosity-nerdful-mind-42-277663/"&gt;Playfulness And Curiosity – Nerdful Mind #42&lt;/a&gt; and &lt;a href="https://www.nerdfulmind.com/issues/being-curious-nerdful-mind-62-354685/"&gt;Being Curious – Nerdful Mind #62&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Accept Yourself And Others
&lt;/h2&gt;

&lt;p&gt;What is acceptance?&lt;/p&gt;

&lt;p&gt;For me, it's not passive resignation. It means to recognize reality and find ways to work with it. When something is now how you want it to be, &lt;strong&gt;acceptance helps you to stop complaining and start acting&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Yes, you sometimes feel you're not doing enough. Not making enough progress. Not being kind enough, not calling your parents enough, not being good enough at your job.&lt;/p&gt;

&lt;p&gt;But you are enough. There's no point in beating yourself up over how you are. There &lt;em&gt;is a point&lt;/em&gt; in recognizing what you want to change and finding a path to your goals.&lt;/p&gt;

&lt;p&gt;The same with other people. You can't force other people to bend to your will. Accept that everyone has had different experiences, a different personality, different values, and different opinions.&lt;/p&gt;

&lt;p&gt;Accept that other people don't see the world like you.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you don't need to agree on a topic, why fight?
Exchange your viewpoints and let it be if you can't agree.&lt;/li&gt;
&lt;li&gt;If it's a topic you need to agree on, embrace the different views and try to understand them.
Always assume best intentions.
When you don't get to a shared point of understanding, try to find a solution that is compatible with all positions.&lt;/li&gt;
&lt;li&gt;If you feel disregarded or hurt, say it.
It's okay to go if you don't see another option to improve the situation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Accept the way it is. Find out where this feeling of tension comes from. Let it go. Identify what you can control and what you can't. And find a viable path towards your goals.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I've written about acceptance in issues &lt;a href="https://www.nerdfulmind.com/issues/you-are-enough-nerdful-mind-41-277662/"&gt;You Are Enough – Nerdful Mind #41&lt;/a&gt;, &lt;a href="https://www.nerdfulmind.com/issues/leave-or-accept-nerdful-mind-34-270420/"&gt;Leave Or Accept – Nerdful Mind #34&lt;/a&gt;, &lt;a href="https://www.nerdfulmind.com/issues/accept-yourself-and-others-nerdful-mind-33-268052/"&gt;Accept Yourself And Others - Nerdful Mind #33&lt;/a&gt;, and &lt;a href="https://www.nerdfulmind.com/issues/acceptance-nerdful-mind-30-266487/"&gt;Acceptance - Nerdful Mind #30&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Also Helpful: Quick Mindfulness Exercises
&lt;/h2&gt;

&lt;p&gt;Mindfulness is a skill.&lt;/p&gt;

&lt;p&gt;It means maintaining a gentle moment-to-moment awareness of your thoughts, bodily sensations, and surroundings, without judging anything.&lt;/p&gt;

&lt;p&gt;And like every skill, mindfulness relies on practice.&lt;br&gt;
Apart from meditation and meditative activities like Yoga, martial arts, and dancing, you can do small mindfulness exercises many times a day.&lt;/p&gt;

&lt;p&gt;👉 Check out &lt;a href="https://www.nerdfulmind.com/7-mindfulness-exercises-for-developers/"&gt;7 mindfulness exercises developers can do every day&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you liked this, consider subscribing to &lt;a href="https://www.nerdfulmind.com/newsletter/"&gt;Nerdful Mind&lt;/a&gt;, my weekly newsletter about mindfulness for developers.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>mindfulness</category>
      <category>mentalhealth</category>
    </item>
    <item>
      <title>3 Ideas How to Use Whiteboards for Software Development</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Sun, 28 Mar 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/simon_mannes/3-ideas-how-to-use-whiteboards-for-software-development-4a5</link>
      <guid>https://dev.to/simon_mannes/3-ideas-how-to-use-whiteboards-for-software-development-4a5</guid>
      <description>&lt;p&gt;When I'm programming, I'm often making notes or scribble on paper or a whiteboard.&lt;/p&gt;

&lt;p&gt;It helps me explore and keep track of my options.&lt;/p&gt;

&lt;p&gt;For small or big architectural decisions (which we're making all the time), it's hard to keep all options to implement something and their pros and contras in mind.&lt;/p&gt;

&lt;p&gt;Here are 3 effective ways you can use a whiteboard (analog or digital, or just a piece of paper) to improve your software engineering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A mind map of options&lt;/strong&gt; you have to implement something. If there are multiple ways to implement a more complex part of your application, you can use a classic mind map. Write your problem in the middle. Then add your solutions around it. Then add pros and contras. Having all known options and their implications visible makes the decision and the discovery of new options much easier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A user journey&lt;/strong&gt; with concrete steps. You can either write down the specific steps you want a user to take or sketch out the ui and annotate it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An UML diagram&lt;/strong&gt;, e.g. to keep track of event flows. The three UML diagram types I use most often are &lt;a href="https://www.lucidchart.com/pages/uml-activity-diagram"&gt;activity diagrams&lt;/a&gt; (to understand what happens when, in which order, and under which conditions), &lt;a href="https://www.lucidchart.com/pages/uml-sequence-diagram"&gt;sequence diagrams&lt;/a&gt; (to keep track of the order of events, messages, and calls), and &lt;a href="https://en.wikipedia.org/wiki/System_context_diagram"&gt;context diagrams&lt;/a&gt; (to get clear on who uses some software or is affected by it, and in which ways).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://twitter.com/@simon_mannes"&gt;&lt;em&gt;Follow me on Twitter @simon_mannes&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>3 Quick Tips to Convert Types In JavaScript</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Sun, 14 Mar 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/simon_mannes/3-quick-tips-to-convert-types-in-javascript-2cnb</link>
      <guid>https://dev.to/simon_mannes/3-quick-tips-to-convert-types-in-javascript-2cnb</guid>
      <description>&lt;p&gt;JavaScript has 6 primitive data types.&lt;/p&gt;

&lt;p&gt;They are string, number, boolean, null, undefined, and symbol.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What's a symbol you ask? ECMAScript 2015 introduced them. They are a way to create globally unique values/identifiers with descriptions. &lt;a href="https://hacks.mozilla.org/2015/06/es6-in-depth-symbols/"&gt;This article&lt;/a&gt; does a great job explaining them.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;And then there are objects. We will talk about them in another article.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here are 3 quick tips for converting data to one specific primitive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Boolean conversion.&lt;/strong&gt; All JS values are truthy, except &lt;code&gt;""&lt;/code&gt;, &lt;code&gt;null&lt;/code&gt;, &lt;code&gt;undefined&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt;, and &lt;code&gt;false&lt;/code&gt;.
You can explicitly convert values to a boolean by using &lt;code&gt;!!&lt;/code&gt;.
&lt;code&gt;!!0 === false &amp;amp;&amp;amp; !!NaN === false &amp;amp;&amp;amp; !!"" === false&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;String conversion.&lt;/strong&gt; Convert any primitive value to a string by adding an empty string.
&lt;code&gt;null + "" === "null"&lt;/code&gt;.
Since ES6 you can also use template strings for this: &lt;code&gt;`${null}` === "null"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Number conversion.&lt;/strong&gt; The primitive values string, null, and boolean can be converted to numbers with &lt;code&gt;+&lt;/code&gt;.
&lt;code&gt;+null === 0 &amp;amp;&amp;amp; +true === 1 &amp;amp;&amp;amp; +false === 0 &amp;amp;&amp;amp; +'0' === 0 &amp;amp;&amp;amp; +'100' === 100&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also use the global methods &lt;code&gt;String()&lt;/code&gt;, &lt;code&gt;Number()&lt;/code&gt;, and &lt;code&gt;Boolean()&lt;/code&gt;.&lt;br&gt;
They make your conversion explicit and readable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/@simon_mannes"&gt;&lt;em&gt;Follow me on Twitter @simon_mannes&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>node</category>
    </item>
    <item>
      <title>Terraform for Fullstack Developers</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Fri, 19 Feb 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/simon_mannes/terraform-for-fullstack-developers-keg</link>
      <guid>https://dev.to/simon_mannes/terraform-for-fullstack-developers-keg</guid>
      <description>&lt;p&gt;The more complex your infrastructure the more can go wrong.&lt;/p&gt;

&lt;p&gt;Three important error sources are cloud provider outages, application errors, and human errors.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The level of resilience means the type and amount of failures with which a service still fulfills its purpose.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How to Improve Your Application Resilience
&lt;/h2&gt;

&lt;p&gt;Here's how we can improve our own service resilience in response to each error class:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloud provider outages&lt;/strong&gt; are when services your application architecture relies on fail, like the &lt;a href="https://aws.amazon.com/de/message/41926/"&gt;Amazon S3 outage&lt;/a&gt; or the &lt;a href="https://www.zdnet.com/article/microsofts-azure-ad-authentication-outage-what-went-wrong/"&gt;Azure AD outage&lt;/a&gt;. But it's not just whole services that go down. Your database server or application server might also fail. &lt;strong&gt;You can improve resilience against these failures by working on your application architecture.&lt;/strong&gt; This encompasses many small things such as request retries or database reconnections, and also bigger improvements such as using multiple availability zones or a multi-cloud setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application errors&lt;/strong&gt; are probably the best-known errors, and preventing them (or handling them appropriately) is part of your standard work as a full stack developer. &lt;strong&gt;Counter measures include most code-improvements&lt;/strong&gt; such as proper error handling, request retries, using a linter, handling edge-cases and always checking for null-values.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human errors&lt;/strong&gt; can be devastating, and they a common reason for widespread outages like the AWS S3 outage above. &lt;strong&gt;Guarding your application against them is harder, but some counter-measures exist.&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Improve the way you work. Use code reviews. Pair program critical stuff.&lt;/li&gt;
&lt;li&gt;Automatically validate application configuration (the environment variables or config files) upon application startup.&lt;/li&gt;
&lt;li&gt;Automate your infrastructure setup and changes. Keep your infrastructure as code. This makes it easy to review and to keep in sync with your application needs.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last point is where Terraform comes into play.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Terraform?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; is a declarative tool for infrastructure as code (IaC). It's written in Go and developed with Open Source by &lt;a href="https://www.hashicorp.com/"&gt;Hashicorp&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This allows you to &lt;strong&gt;keep track of your infrastructure and configuration in a repository&lt;/strong&gt;, to review it, and to spin everything up whenever you need it.&lt;/p&gt;

&lt;p&gt;What I like about Terraform is that it is declarative. This means you write how the infrastructure should look like, not which changes you want.&lt;/p&gt;

&lt;p&gt;The basic Terraform workflow is the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Write&lt;/strong&gt; - Describe your infrastructure in the terraform configuration language&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan&lt;/strong&gt; - Get a preview of all planned changes from terraform&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apply&lt;/strong&gt; - let Terraform apply all changes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How does this look in a real-world architecture?&lt;/p&gt;

&lt;h2&gt;
  
  
  A Real-World Workflow
&lt;/h2&gt;

&lt;p&gt;A real-world workflow can look like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The terraform configuration lives in a repository separate to our application code (we have a multi-repo Microservices architecture)&lt;/li&gt;
&lt;li&gt;Terraform's state lives in Azure Blob Storage (this allows for easy locking of that state when in use, which terraform automatically does)&lt;/li&gt;
&lt;li&gt;When we need to change something with the infrastructure, someone on the team creates a branch with the infrastructure changes. This person makes sure that the terraform plan command shows a reasonable plan. They then create a pull request.&lt;/li&gt;
&lt;li&gt;Someone reviews that PR. When everything looks good, the PR is merged and the repository's deploy pipeline creates a plan with the changes. This plan must be approved by a team member before it will be applied to our infrastructure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's look into the three steps write, plan, and apply.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparing The Tutorial
&lt;/h2&gt;

&lt;p&gt;We're going to release &lt;a href="https://github.com/heroku/node-js-getting-started/releases/tag/1"&gt;an official Node.js example&lt;/a&gt; application to Heroku.&lt;/p&gt;

&lt;p&gt;We begin by installing terraform. Check the &lt;a href="https://www.terraform.io/downloads.html"&gt;terraform downloads&lt;/a&gt;, or use &lt;code&gt;brew install terraform&lt;/code&gt; if you're on macOS.&lt;/p&gt;

&lt;p&gt;After installing you should be able to run &lt;code&gt;terraform -v&lt;/code&gt; and get a result like &lt;code&gt;Terraform v0.14.7&lt;/code&gt;. If the terraform command is not available, restart your terminal and check your &lt;code&gt;PATH&lt;/code&gt; environment variable.&lt;/p&gt;

&lt;p&gt;Additionally, you'll need the following Heroku credentials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your Heroku account's email address&lt;/li&gt;
&lt;li&gt;Your Heroku API key, which you can find in your Heroku account settings&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Write - How The Terraform Configuration Language Works
&lt;/h2&gt;

&lt;p&gt;For our goal of creating a Heroku deployment with Terraform we need two terraform files.&lt;/p&gt;

&lt;p&gt;One file that describes our variables (called &lt;code&gt;variables.tf&lt;/code&gt;), and the &lt;code&gt;main.tf&lt;/code&gt; file where we describe all resources we need.&lt;/p&gt;

&lt;p&gt;Let's look at the &lt;code&gt;variables.tf&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;variable &lt;span class="s2"&gt;"heroku_email"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;type&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; string
  default &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"simon@mannes.tech"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

variable &lt;span class="s2"&gt;"heroku_api_key"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;type&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; string
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is how we define &lt;a href="https://www.terraform.io/docs/language/values/variables.html"&gt;variables in terraform&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To set values for these variables, set the corresponding environment variables: &lt;code&gt;TF_VAR_heroku_email&lt;/code&gt;and &lt;code&gt;TF_VAR_heroku_api_key&lt;/code&gt;.&lt;br&gt;
Envivonment variables for Terraforn need to be prefixed with &lt;code&gt;TF_VAR_&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you don't set the environment variables, Terraform will ask you for their values when you run &lt;code&gt;terraform apply&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now let's look at the &lt;code&gt;main.tf&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Enable the heroku provider&lt;/span&gt;
terraform &lt;span class="o"&gt;{&lt;/span&gt;
  required_providers &lt;span class="o"&gt;{&lt;/span&gt;
    heroku &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="nb"&gt;source&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"heroku/heroku"&lt;/span&gt;
      version &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"~&amp;gt; 3.2"&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Configure the Heroku provider&lt;/span&gt;
provider &lt;span class="s2"&gt;"heroku"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  email   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"simon"&lt;/span&gt;
  api_key &lt;span class="o"&gt;=&lt;/span&gt; var.heroku_api_key
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Create the app&lt;/span&gt;
resource &lt;span class="s2"&gt;"heroku_app"&lt;/span&gt; &lt;span class="s2"&gt;"simple_app"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  name   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"node-example-mannes-tech"&lt;/span&gt;
  region &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"eu"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Create a heroku build&lt;/span&gt;
resource &lt;span class="s2"&gt;"heroku_build"&lt;/span&gt; &lt;span class="s2"&gt;"simple_app"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  app        &lt;span class="o"&gt;=&lt;/span&gt; heroku_app.simple_app.id

  &lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;# This app uses a community buildpack, set it in `buildpacks` above.&lt;/span&gt;
    url     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://github.com/heroku/node-js-getting-started/archive/1.tar.gz"&lt;/span&gt;
    version &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Launch the app's web process by scaling-up&lt;/span&gt;
resource &lt;span class="s2"&gt;"heroku_formation"&lt;/span&gt; &lt;span class="s2"&gt;"simple_app"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  app        &lt;span class="o"&gt;=&lt;/span&gt; heroku_app.simple_app.id
  &lt;span class="nb"&gt;type&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"web"&lt;/span&gt;
  quantity   &lt;span class="o"&gt;=&lt;/span&gt; 1
  size       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Free"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first we need to enable the &lt;code&gt;heroku&lt;/code&gt; provider (&lt;a href="https://www.terraform.io/docs/language/providers/requirements.html"&gt;provider requirements documentation&lt;/a&gt;).&lt;br&gt;
This is necessary because the &lt;code&gt;heroku&lt;/code&gt; provider is not part of the &lt;code&gt;hashicorp&lt;/code&gt; namespace, but the &lt;code&gt;heroku&lt;/code&gt; namespace.&lt;/p&gt;

&lt;p&gt;After that we initialize the provider (&lt;code&gt;provider "heroku" {&lt;/code&gt;) with &lt;code&gt;email&lt;/code&gt; and &lt;code&gt;api_key&lt;/code&gt;.&lt;br&gt;
The way to reference variables in terraform is by &lt;code&gt;var.variable_name&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then follow three Heroku-specific blocks.&lt;br&gt;
The resources you need will depend on your project, and the available resource definitions vary with your Terraform provider.&lt;/p&gt;

&lt;p&gt;For deploying our app, we first create the app, then create a Heroku build, and finally tell Heroku to spin up one free web dyno for that app.&lt;/p&gt;

&lt;p&gt;Terraform automatically detects the dependencies between our resources when we reference one resource within another.&lt;br&gt;
If you don't reference a resource but still need to wait for it, you can use the &lt;code&gt;depends_on&lt;/code&gt; property to tell Terraform to wait.&lt;/p&gt;
&lt;h2&gt;
  
  
  Plan - Init and Plan Before You Apply
&lt;/h2&gt;

&lt;p&gt;Before we run &lt;code&gt;terraform plan&lt;/code&gt; we must initiate terraform, to install all configure providers.&lt;/p&gt;

&lt;p&gt;Start with the command &lt;code&gt;terraform init&lt;/code&gt;, which should give an output like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;$ terraform init

Initializing the backend...

Initializing provider plugins...
&lt;span class="p"&gt;-&lt;/span&gt; Finding heroku/heroku versions matching "~&amp;gt; 3.2"...
&lt;span class="p"&gt;-&lt;/span&gt; Installing heroku/heroku v3.2.0...
terra- Installed heroku/heroku v3.2.0 (signed by a HashiCorp partner, key ID 49ACC74D80C7B012)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;init&lt;/code&gt; command creates a local directory (&lt;code&gt;.terraform&lt;/code&gt;) with the used providers, as well as a local terraform lock file (&lt;code&gt;.terraform.lock.hcl&lt;/code&gt;). the lock file makes sure that no two terraform apply commands mess with each other.&lt;br&gt;
In an automated CI/CD environment you would put the state and the lock into a blob storage of the cloud provider of your choice.&lt;/p&gt;

&lt;p&gt;Now is the time to run &lt;code&gt;terraform plan&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;terraform plan

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
&lt;span class="p"&gt;  +&lt;/span&gt; create

Terraform will perform the following actions:

  # heroku_app.simple_app will be created
&lt;span class="p"&gt;  +&lt;/span&gt; resource "heroku_app" "simple_app" {
&lt;span class="p"&gt;      +&lt;/span&gt; acm                   = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; all_config_vars       = (sensitive value)
&lt;span class="p"&gt;      +&lt;/span&gt; buildpacks            = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; config_vars           = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; git_url               = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; heroku_hostname       = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; id                    = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; internal_routing      = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; name                  = "node-example-mannes-tech"
&lt;span class="p"&gt;      +&lt;/span&gt; region                = "eu"
&lt;span class="p"&gt;      +&lt;/span&gt; sensitive_config_vars = (sensitive value)
&lt;span class="p"&gt;      +&lt;/span&gt; stack                 = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; uuid                  = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; web_url               = (known after apply)
    }

  # heroku_build.simple_app will be created
&lt;span class="p"&gt;  +&lt;/span&gt; resource "heroku_build" "simple_app" {
&lt;span class="p"&gt;      +&lt;/span&gt; app               = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; buildpacks        = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; id                = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; local_checksum    = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; output_stream_url = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; release_id        = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; slug_id           = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; source            = {
&lt;span class="p"&gt;          +&lt;/span&gt; "url"     = "https://github.com/heroku/node-js-getting-started/archive/1.tar.gz"
&lt;span class="p"&gt;          +&lt;/span&gt; "version" = "1"
        }
&lt;span class="p"&gt;      +&lt;/span&gt; stack             = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; status            = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; user              = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; uuid              = (known after apply)
    }

  # heroku_formation.simple_app will be created
&lt;span class="p"&gt;  +&lt;/span&gt; resource "heroku_formation" "simple_app" {
&lt;span class="p"&gt;      +&lt;/span&gt; app      = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; id       = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; quantity = 1
&lt;span class="p"&gt;      +&lt;/span&gt; size     = "Free"
&lt;span class="p"&gt;      +&lt;/span&gt; type     = "web"
    }

Plan: 3 to add, 0 to change, 0 to destroy.
&lt;span class="p"&gt;
-----------------------------------------------------------------------------
&lt;/span&gt;
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our duty is now to look at the changes terraform plans to make, and determine if that sounds reasonable and is what we want.&lt;/p&gt;

&lt;p&gt;You can specify an &lt;code&gt;-out&lt;/code&gt; parameter like terraform proposes to store the plan and run that exact plan later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Apply - Make Your Plan Reality
&lt;/h2&gt;

&lt;p&gt;After checking the plan, it's finally time to run &lt;code&gt;terraform apply&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;terraform apply

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
&lt;span class="p"&gt;  +&lt;/span&gt; create

Terraform will perform the following actions:

  # heroku_app.simple_app will be created
&lt;span class="p"&gt;  +&lt;/span&gt; resource "heroku_app" "simple_app" {
&lt;span class="p"&gt;      +&lt;/span&gt; acm                   = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; all_config_vars       = (sensitive value)
&lt;span class="p"&gt;      +&lt;/span&gt; buildpacks            = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; config_vars           = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; git_url               = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; heroku_hostname       = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; id                    = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; internal_routing      = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; name                  = "node-example-mannes-tech"
&lt;span class="p"&gt;      +&lt;/span&gt; region                = "eu"
&lt;span class="p"&gt;      +&lt;/span&gt; sensitive_config_vars = (sensitive value)
&lt;span class="p"&gt;      +&lt;/span&gt; stack                 = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; uuid                  = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; web_url               = (known after apply)
    }

  # heroku_build.simple_app will be created
&lt;span class="p"&gt;  +&lt;/span&gt; resource "heroku_build" "simple_app" {
&lt;span class="p"&gt;      +&lt;/span&gt; app               = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; buildpacks        = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; id                = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; local_checksum    = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; output_stream_url = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; release_id        = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; slug_id           = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; source            = {
&lt;span class="p"&gt;          +&lt;/span&gt; "url"     = "https://github.com/heroku/node-js-getting-started/archive/1.tar.gz"
&lt;span class="p"&gt;          +&lt;/span&gt; "version" = "1"
        }
&lt;span class="p"&gt;      +&lt;/span&gt; stack             = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; status            = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; user              = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; uuid              = (known after apply)
    }

  # heroku_formation.simple_app will be created
&lt;span class="p"&gt;  +&lt;/span&gt; resource "heroku_formation" "simple_app" {
&lt;span class="p"&gt;      +&lt;/span&gt; app      = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; id       = (known after apply)
&lt;span class="p"&gt;      +&lt;/span&gt; quantity = 1
&lt;span class="p"&gt;      +&lt;/span&gt; size     = "Free"
&lt;span class="p"&gt;      +&lt;/span&gt; type     = "web"
    }

Plan: 3 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

heroku_app.simple_app: Creating...
heroku_app.simple_app: Creation complete after 7s [id=node-example-mannes-tech]
heroku_build.simple_app: Creating...
heroku_build.simple_app: Still creating... [10s elapsed]
heroku_build.simple_app: Still creating... [20s elapsed]
heroku_build.simple_app: Creation complete after 27s [id=fe559e8a-0210-40b8-1111-aaaaaaaaaaaa]
heroku_formation.simple_app: Creating...
heroku_formation.simple_app: Creation complete after 1s [id=a472a2a0-26dd-49c5-1111-bbbbbbbbbbbb]

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After generating a plan, terraform asks us to accept it.&lt;br&gt;
When running Terraform in CI/CD you can tell Terraform to always accept changes and to use a pre-generated plan.&lt;/p&gt;

&lt;p&gt;When the command finishes, you'll have a &lt;code&gt;terraform.tfstate&lt;/code&gt; file with the current terraform state. If you open it you can find the URL for your newly deployed Heroku app.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you make changes to your infrastructure, like adding more apps or databases, or increasing dyno sizes/numbers, you update your &lt;code&gt;*.tf&lt;/code&gt; files and then run &lt;code&gt;terraform init&lt;/code&gt;, &lt;code&gt;terraform plan&lt;/code&gt;, and &lt;code&gt;terraform apply&lt;/code&gt; again.&lt;/p&gt;

&lt;p&gt;In real-world projects you will probably automate this process with your CI/CD infrastructure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Next Steps - Should You Use Terraform?
&lt;/h2&gt;

&lt;p&gt;Terraform is just a tool.&lt;/p&gt;

&lt;p&gt;So, when is Terraform the right tool? Here are some reasonable use-cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your infrastructure is more complex than simple web server + database&lt;/li&gt;
&lt;li&gt;You use, e.g., a microservices architecture on Kubernetes together with various cloud services&lt;/li&gt;
&lt;li&gt;You need to spin up your infrastructure multiple times, e.g. for multiple customers&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Additional Resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.terraform.io/docs/index.html"&gt;Terraform documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/browse/providers"&gt;Registry of Terraform providers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ozbillwang/terraform-best-practices"&gt;Terraform best practices (short)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.terraform-best-practices.com/"&gt;Terraform best practices (long)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🙏 &lt;a href="https://twitter.com/simon_mannes"&gt;&lt;em&gt;Follow me on Twitter @simon_mannes&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>devops</category>
      <category>terraform</category>
      <category>iac</category>
    </item>
    <item>
      <title>Why This Software Developer Practices Mindfulness</title>
      <dc:creator>Simon Mannes</dc:creator>
      <pubDate>Wed, 10 Feb 2021 11:24:19 +0000</pubDate>
      <link>https://dev.to/simon_mannes/why-this-software-developer-practices-mindfulness-1mkh</link>
      <guid>https://dev.to/simon_mannes/why-this-software-developer-practices-mindfulness-1mkh</guid>
      <description>&lt;p&gt;Sometimes it's hard to think.&lt;/p&gt;

&lt;p&gt;You're stressed because you can't find the cause of bug #476.&lt;br&gt;
Your mind is a fuzzy cloud because it's thursday evening and you've already had 3 exhaustingly productive hours today.&lt;/p&gt;

&lt;p&gt;I know how you feel. Most developers have been there.&lt;/p&gt;

&lt;p&gt;Practicing mindfulness can't prevent such situations.&lt;br&gt;
But it can make you feel more at ease.&lt;/p&gt;

&lt;p&gt;I started meditating years ago because it helped me deal with personal issues.&lt;br&gt;
I kept going because it was giving me so much more than calm. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I started for the calm, and stayed for the contentment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me explain how practicing mindfulness makes my life richer, and how it helps me now with my career as a software developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Less Stress and Anxiety
&lt;/h2&gt;

&lt;p&gt;Mindfulness is being aware of your thoughts, feelings, and bodily sensations, without judgement.&lt;br&gt;
You practice to see them clearly, and let them go.&lt;/p&gt;

&lt;p&gt;I became aware of my own thoughts and feelings much sooner. This is immensely helpful when you have self-doubts or &lt;a href="https://www.verywellmind.com/how-to-cope-with-fomo-4174664"&gt;FOMO&lt;/a&gt;, feel stressed or anxious, or have impostor-syndrome.&lt;br&gt;
You notice these feelings sooner, and let them go. Minimizing the time they distress you.&lt;/p&gt;

&lt;h2&gt;
  
  
  More High-Quality Focus
&lt;/h2&gt;

&lt;p&gt;Noticing my thoughts has another benefit: noticing when I get distracted.&lt;/p&gt;

&lt;p&gt;As software developers, we benefit tremendously from &lt;a href="https://www.nerdfulmind.com/6-rules-mindful-productivity-developers/"&gt;focused deep work&lt;/a&gt;.&lt;br&gt;
Yes, when you're in the flow it's hard to become distracted.&lt;br&gt;
But what about those 30 minutes between two meetings which you could use?&lt;/p&gt;

&lt;p&gt;Mindfulness allows me to gently place my focus on the task at hand, without feeling stressed about it.&lt;/p&gt;

&lt;p&gt;Also, when I notice I'm getting distracted more often than usual, it's an indication for me that there may be something improve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Did I get enough sleep? Enough fresh air? Did I drink enough water?&lt;/li&gt;
&lt;li&gt;  Is the task well-defined? Do I know exactly which next step to take?&lt;/li&gt;
&lt;li&gt;  Is my environment helping me focus? Is it too cold or too loud?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Learning to observe your state of mind helps you to notice sooner when you become stuck, and allows you to improve your situation.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Empathy
&lt;/h2&gt;

&lt;p&gt;Programming is a social activity.&lt;br&gt;
Not only because we mostly build software in teams, together with other people.&lt;br&gt;
But also because all software, in some way or the other, is for people.&lt;br&gt;
This quote sums it up perfectly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Engineering is not the art of building devices; it’s the art of fixing problems. Devices are a means, not an end. Fixing problems means first of all understanding them — and since the whole purpose of the things we do is to fix problems in the outside world, problems involving people, that means that understanding people, and the ways in which they will interact with your system, is fundamental to every step of building a system. – &lt;a href="https://medium.com/@yonatanzunger/so-about-this-googlers-manifesto-1e3773ed1788"&gt;Yonatan Zunger&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you practice being mindful, you learn about your own mind.&lt;br&gt;
And you notice that all humans have the same feelings.&lt;br&gt;
The same stress, anxiety, fear, contentment, or joy.&lt;br&gt;
When you practice seeing your own mind clearly, you also practice to see other people as who they are.&lt;br&gt;
To value them and their experiences.&lt;br&gt;
You practice to be kind, humble, and curious.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mindfulness Leads to a Higher Quality of Life
&lt;/h2&gt;

&lt;p&gt;All in all, mindfulness gives me a higher quality of life.&lt;br&gt;
Over the last few years it helped (and still helps) me to reduce negative feelings, improve my focused attention, and deepen my empathy.&lt;/p&gt;

&lt;p&gt;The practice itself has a positive, calming effect that lasts for hours. &lt;/p&gt;

&lt;p&gt;And I get to know better the person closest to me: myself.&lt;br&gt;
My fears, desires, and the behavior of my mind.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When we get too caught up in the busyness of the world, we lose connection with one another – and ourselves. — Jack Kornfield&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you want to start practicing mindfulness, I recommend you to try out meditation. Give &lt;a href="https://www.headspace.com/"&gt;Headspace&lt;/a&gt; (or another meditation app) a try. Or try out live courses (online or in-person, when that's a good idea again).&lt;/p&gt;

&lt;p&gt;But even if you don't want to start with sitting meditation, you can try out one of the many &lt;a href="https://www.nerdfulmind.com/7-mindfulness-exercises-for-developers/"&gt;small mindfulness exercises&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Meditation is one possible mindfulness practice.&lt;br&gt;
And there are many other ways to practice mindfulness, such as painting, journaling, dancing, or practicing martial arts.&lt;br&gt;
Meditation itself can also take many different forms.&lt;br&gt;
There is “classical” breathing meditation, walking meditation, visualization, mindfulness meditation, loving-kindness meditation  ...&lt;/p&gt;

&lt;p&gt;Meditation is a great way, but not the only one.&lt;br&gt;
It doesn't matter how you start your journey.&lt;/p&gt;

&lt;p&gt;Just start.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Liked this article? Check out my weekly newsletter about mindfulness for developers, &lt;a href="https://www.nerdfulmind.com"&gt;Nerdful Mind&lt;/a&gt;. You'll get one idea, one mindfulness exercise, and three reading recommendations every Sunday.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mindfulness</category>
      <category>anxiety</category>
      <category>stress</category>
      <category>focus</category>
    </item>
  </channel>
</rss>
