<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://humanrefactor.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://humanrefactor.com/" rel="alternate" type="text/html" /><updated>2026-04-28T18:40:20+00:00</updated><id>https://humanrefactor.com/feed.xml</id><title type="html">HumanRefactor</title><subtitle>Improving software and the human who writes it.</subtitle><entry><title type="html">Refactoring with images</title><link href="https://humanrefactor.com/2023/05/08/refactoring-with-images.html" rel="alternate" type="text/html" title="Refactoring with images" /><published>2023-05-08T00:00:00+00:00</published><updated>2023-05-08T00:00:00+00:00</updated><id>https://humanrefactor.com/2023/05/08/refactoring-with-images</id><content type="html" xml:base="https://humanrefactor.com/2023/05/08/refactoring-with-images.html"><![CDATA[<p>That’s probably a misleading name. Not sure what to call this process but perhaps someone can suggest something better.</p>

<p>I’ve long been taking screen shots of software refactorings. For those new to that concept, these are small improvements we make to software code that don’t change the behaviour. It still works in the same way, it’s just easier to understand and easier to update. Why bother? The more often we work with the software, the better our return on investment. ROI? Definitely ROI except the investment is time and not money. Well time is money…(let’s avoid that rabbit hole). 1</p>

<p>I’ve tried this with a video before but I found people were always asking questions along the way so I kept stopping the video to explain what was going on at a given step, what my coding partner and I were thinking about and what was driving our approach.</p>

<p>I’ll try demonstrating refactoring again, this time with images. I’ll put minimal dialog in and hopefully the images speak for themselves.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.52.07-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.52.07-pm.png" alt="" /></a></p>

<p>Here’s our starting point. This is a little program I use with friends that loads an image from disk. There’s another program that does fun stuff to the image then saves it onto the disk. I’ll be posting more about the whole program later, for today let’s just focus on this part and a small (they should all be small) refactoring</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.52.33-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.52.33-pm.png" alt="" /></a></p>

<p>To start we’re going to inline a small helper method called load_image.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.52.47-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.52.47-pm.png" alt="" /></a></p>

<p>So now we can see two methods that are <strong><em>similar but not the same</em></strong>. Let’s rearrange this methods so the similar ones are right beside each other. A small step like this seems unnecessary but if you think about our goal being clarity, this step makes sense.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.53.03-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.53.03-pm.png" alt="" /></a></p>

<p>It’s now easier to see the similarities and the differences between these two methods.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.53.49-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.53.49-pm.png" alt="" /></a></p>

<p>But these methods are <strong><em>similar but not the same</em></strong>. Let’s do what we can to make them more the same. Let’s introduce a variable called path in each of them. “Hang on a minute!” some of you might be saying to yourselves or out loud in a coffee shop surrounding by strangers. Yes, I just introduced duplication. If you remember to me discussing EPIC (Examine, Prepare, Implement, Clear), the Prepare phase often involves taking one step backwards. Up until now we’ve been making things worse some might argue. Don’t panic2, just give me a few more minutes and the code will be improved.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.55.05-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.55.05-pm.png" alt="" /></a></p>

<p>Now when we <strong><em>extract method</em></strong> our friendly IDE PyCharm locates the now duplicate code. Thanks PyCharm! I am in no way affiliated with JetBrains but I do think they make a good IDE.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.55.59-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.55.59-pm.png" alt="" /></a></p>

<p>I skipped the rearranging step. Remember it’s nice to see the duplication together to helps us figure out how to remove it. Now the path variable seems a bit useless so since it’s not helping, let’s inline it in both methods.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.56.45-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.56.45-pm.png" alt="" /></a></p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-1.57.49-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-1.57.49-pm.png" alt="" /></a></p>

<p>That name seems a bit confusing now so let’s rename it to load_initial_image. That, at least, explains what it does.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/screenshot-2023-05-08-at-2.53.47-pm.png"><img src="../../../assets/images/screenshot-2023-05-08-at-2.53.47-pm.png" alt="" /></a></p>

<p>And there we go. We can make a few improvements still but when we’re refactoring we really want to focus on what’s blocking us from moving forward. It’s easy to get distracted and it becomes a lot of fun to refactor but you need to stay focused. Making small changes at a time really help.</p>

<p>I feel like I need to mention the obvious that nothing in here has to do with personal health or well being. Or does it? Perhaps you can draw parallels to making small improvements instead of giant steps.</p>

<p>Do you like refactoring with images? Have a better name for it? Let me know.</p>

<p>1. <a href="https://en.wikipedia.org/wiki/Rabbit_hole">https://en.wikipedia.org/wiki/Rabbit_hole</a></p>

<p>2. <a href="https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%27s_Guide_to_the_Galaxy#Don't_Panic">https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%27s_Guide_to_the_Galaxy#Don’t_Panic</a></p>]]></content><author><name></name></author><category term="agile" /><category term="code" /><category term="refactoring" /><category term="software-development" /><summary type="html"><![CDATA[That’s probably a misleading name. Not sure what to call this process but perhaps someone can suggest something better.]]></summary></entry><entry><title type="html">Repetition</title><link href="https://humanrefactor.com/practice/2023/05/04/repetition.html" rel="alternate" type="text/html" title="Repetition" /><published>2023-05-04T00:00:00+00:00</published><updated>2023-05-04T00:00:00+00:00</updated><id>https://humanrefactor.com/practice/2023/05/04/repetition</id><content type="html" xml:base="https://humanrefactor.com/practice/2023/05/04/repetition.html"><![CDATA[<p>This is one of the most common words we hear in both software development and physical fitness. “Get your reps in!” said many coaches to me growing up.</p>

<p>Repetitions are key to learning new things. Repeating things over and over strengthens neural pathways. The word practicing, which is coupled with improvement, involves repeating concepts under controlled conditions.</p>

<p>In software development, however, repetition is frowned upon. If we have multiple ways of determining an answer, it causes problems when we inevitably have to update our solution. What if we miss one of the methods? What if they don’t all work the same way? Our common term is to keep your code DRY which stands for “Don’t Repeat Yourself”.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/pexels-digital-buggu-374563.jpg"><img src="../../../assets/images/pexels-digital-buggu-374563.jpg" alt="Photo by Digital Buggu: https://www.pexels.com/photo/computer-screen-screengrab-374563/" /></a></p>

<p>Sometimes repetition might exist in the code but not be as obvious to spot. Talking to clients I often say that the code is “Similar but not the same”. Our next steps are then to make the code the same so we can remove the duplication. This is one of many ways repetition or duplication can live inside our code.</p>

<p>Recently I found a new form of repetition in my code. I had two parts of a program that performed many of the same tasks. At first, I thought I needed to move the common code to a central location to remove the duplication. However, after I began working on it, a new idea emerged. Did the second part even need to duplicate these processes? Was there another, simpler way to solve the problem that removed the need to duplicate behaviour?</p>

<p><strong>Humans by nature seems to make things more complicated. We should strive for simplicity.</strong></p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2023/05/pexels-dominika-roseclay-14947280.jpg"><img src="../../../assets/images/pexels-dominika-roseclay-14947280.jpg" alt="Photo by Dominika Roseclay: https://www.pexels.com/photo/close-up-of-a-flower-14947280/" /></a></p>

<p>A simpler solution had revealed itself. My software friends often remind me to “Do the simplest thing that could possibly work”. Perhaps I need to add this to my list of “things to consider while coding”. Ron Jeffries and others have written more about this rule: https://ronjeffries.com/xprog/articles/practices/pracsimplest/</p>

<p>Coming back to improvement, repetition is key principal. Practicing regularly can develop a habit. Good software teams have the habit of regularly practicing solving simple solutions in different ways.</p>

<p>Repetition is all around us. We love repeating a good story.</p>

<p>Repetition is also a key component of music composition. If you’ve ever hummed or whistled a tune, it’s probably a part that is repeated. Repetition also exists in writing, architecture, manufacturing and in nature. It’s everywhere!</p>

<p><strong>“We keep repeating the same mistake until we figure out the solution.” ~Tim Ottinger</strong></p>

<p>So repetition isn’t a good or bad thing. It is a pattern and it’s something that you can learn from if you pay attention to it. Do we need all these repeating meetings? Do we keep repeating instructions? Do I need to push for one more rep? Take a look at how repetition exists in your life. Do you want to change it?</p>]]></content><author><name></name></author><category term="practice" /><category term="self-improvement" /><summary type="html"><![CDATA[This is one of the most common words we hear in both software development and physical fitness. “Get your reps in!” said many coaches to me growing up.]]></summary></entry><entry><title type="html">Getting back up</title><link href="https://humanrefactor.com/2021/04/28/getting-back-up.html" rel="alternate" type="text/html" title="Getting back up" /><published>2021-04-28T00:00:00+00:00</published><updated>2021-04-28T00:00:00+00:00</updated><id>https://humanrefactor.com/2021/04/28/getting-back-up</id><content type="html" xml:base="https://humanrefactor.com/2021/04/28/getting-back-up.html"><![CDATA[<blockquote>
  <p>“Do not judge me by my successes, judge me by how many times I fell down and got back up again.”</p>

  <p><strong>Nelson Mandela</strong></p>
</blockquote>

<p>It’s been a long time since I wrote on this blog. It started off as not thinking the idea was good enough or on topic enough. I was judging myself a lot. The end result is that I stopped writing.</p>

<p>Years later now, something has changed. I was in a discussion with someone about motivation and goals which led to discussion with others about motivation and goals and finally to thoughts about my own motivation and goals.</p>

<p>A story I have often retold is of an American greco roman wrestler who wanted to be the best in the world. He put a picture of his top competition, the number one wrestler at the time, in his locker. His opponent was literally “in his face” everyday when he went to workout and practice.</p>

<p>I thought about things I’ve wanted to do for a long time but have not been putting in the effort. I haven’t been giving them a serious chance of success, for a lot of reasons. Excuses have had enough air time already so I’m going to skip them.</p>

<p>The first thing I thought of was to get down to 95kg (~210lbs). I’ll be one of the first to talk about not getting caught up with weight but to focus more on fitness, percentage body fat, and how you look and feel. The number is more symbolic than a metric. Also related to health was to improve my cardio and start exercising three mornings a week. I have been eating well some of the time and not so well at other times.</p>

<p>I was asked after telling the wrestling story “Why don’t you put the number 210 where you can see it”. This sounded like a great idea and easy to do. On my laptop there is now a sticky note that reads 210, and on the fridge there is a sticky note that reads 210. I want to remind myself that I have goals that I want to accomplish and they are important to me. Each time I see the number, I think about all things I want to accomplish.</p>

<figure>

[![](../../../assets/images/weight_trend.png)](https://humanrefactor.wordpress.com/wp-content/uploads/2021/04/weight_trend.png)

<figcaption>

Note: Weight can fluctuate day to day given how much water we have in our system.

</figcaption>

</figure>

<p>It starts with one change.</p>

<p>I started eating better. No snacks in the evenings. More water. I’ve started working out again. Small improvements at a time. Improvement isn’t linear either, it looks something like this image.</p>

<p>It’s not much but it’s a start. And sometimes starting is the hardest thing to do.</p>

<p>With this article, I will have also started blogging again. It’s wonderful if people get any value out of it. What I’ve learned though is that I get value out of writing and that’s a new thing. As I continue to write, I am going to expand my topics into technical ideas and thoughts. Those ideas are often what I want to share.</p>

<p>I started this blog with a quote from Nelson Mandela. In no way have my struggles been comparable to his. His words though inspire me. We are surrounded by so many challenges in this world. Many people are being struck down by others, by sickness, or by ignorance. If you take a step forward in improving yourself, I ask that you also consider how you can improve someone else’s life. It’s doesn’t have to be a big thing. Just start.</p>

<p>Remember sometimes starting is the hardest thing to do. The second step is often easier.</p>]]></content><author><name></name></author><category term="health" /><category term="self-improvement" /><summary type="html"><![CDATA[“Do not judge me by my successes, judge me by how many times I fell down and got back up again.” Nelson Mandela]]></summary></entry><entry><title type="html">Patterns build good habits</title><link href="https://humanrefactor.com/diet/exercise/focus/goals/2018/08/21/patterns-build-good-habits.html" rel="alternate" type="text/html" title="Patterns build good habits" /><published>2018-08-21T00:00:00+00:00</published><updated>2018-08-21T00:00:00+00:00</updated><id>https://humanrefactor.com/diet/exercise/focus/goals/2018/08/21/patterns-build-good-habits</id><content type="html" xml:base="https://humanrefactor.com/diet/exercise/focus/goals/2018/08/21/patterns-build-good-habits.html"><![CDATA[<h1 id="introduction">Introduction</h1>

<p>People want to improve their lives. They want to improve their code. We start new things and end up giving up on them. We start new diets and eventually stop following them. We learn new ways to do things, try them for a bit and go back to our old ways. Why do we do this? In one word: <em>Inertia</em>.</p>

<h1 id="inertia">Inertia</h1>

<p>We inherently don’t want to change. It’s easier and more comfortable to do the same thing everyday. Even if we are unhappy, even if it drives us crazy, we have a built in desire to maintain the daily motions we go through.</p>

<h1 id="habits">Habits</h1>

<p>We all know people with great habits. Oh so and so, she jogs every other day, or he takes his bike to work or she writes tests for all her code. How did they get there? How do these people establish these good habits in their lives? Habits that we wish we had.</p>

<h1 id="patterns">Patterns</h1>

<p>The trick is that these people have patterns that they follow. They make these positive activities part of their routines. They repeat these patterns until they become habits. It sounds simple doesn’t it? So what goes wrong?</p>

<h1 id="obstacles">Obstacles</h1>

<p><img src="../../../assets/images/activity-adult-athlete-703009.jpg" alt="activity-adult-athlete-703009" /></p>

<p>Obstacles aren’t always obvious. Someone doesn’t step up and say “Hey you, stop going for a walk after supper!”. What happens is other routines. We have to drive kids somewhere or someone comes to visit. Maybe your friends invite you out. (There goes the diet plan).</p>

<blockquote>
  <p>The difference is that some people find a solution to the problem and others let the problem revert them to their old habit.</p>
</blockquote>

<h1 id="perseverance">Perseverance</h1>

<p>Your improvement will be challenged. Obstacles will appear. It will be easier to go back to your old way of doing things. This is where your will power is tested. Each success makes your will power stronger. Each failure leaves you right where you are or makes things even worse than they were.</p>

<h1 id="choice">Choice</h1>

<p>It comes down to choice. Do I get off this couch and walk? Do I invest a couple minutes refactoring this code? Do I have some more vegetables and skip dessert? Given a challenge, will I back down or will I stick to my plan for self improvement?</p>

<h1 id="system">System</h1>

<p><img src="../../../assets/images/ancient-architecture-art-925067.jpg" alt="ancient-architecture-art-925067" /></p>

<p>Over years of studying why people, including myself, won’t stick to their plans, I’ve discovered a system that helps keep me and others focused on improvement. It’s a step by step process that repeats itself.</p>

<ol>
  <li>
    <h4 id="examine---determine-a-change-that-can-be-made">Examine - Determine a change that can be made</h4>
  </li>
  <li>
    <h4 id="prepare---make-adjustments-to-allow-for-this-change">Prepare - Make adjustments to allow for this change</h4>
  </li>
  <li>
    <h4 id="implement---make-the-change">Implement - Make the change</h4>
  </li>
  <li>
    <h4 id="clear---restore-reduce-and-simplify-the-change">Clear - Restore, reduce and simplify the change</h4>
  </li>
</ol>

<h1 id="conclusion">Conclusion</h1>

<p>It’s easy to fall off the path of an improvement. It doesn’t matter what it is, we sometimes need help. This system can help you stay on track. Think to yourself, what stage am I at? Have I identified an improvement or an obstacle? Do I need to simplify things before I take the next step? I’m sharing this system with everyone I can to get their insights and learn how it is helping them. Give it a try and let me know what you think.</p>]]></content><author><name></name></author><category term="diet" /><category term="exercise" /><category term="focus" /><category term="goals" /><category term="habits" /><category term="patterns" /><category term="self-improvement" /><summary type="html"><![CDATA[Introduction]]></summary></entry><entry><title type="html">The Superhero Experiment</title><link href="https://humanrefactor.com/diet/2017/01/24/the-superhero-experiment.html" rel="alternate" type="text/html" title="The Superhero Experiment" /><published>2017-01-24T00:00:00+00:00</published><updated>2017-01-24T00:00:00+00:00</updated><id>https://humanrefactor.com/diet/2017/01/24/the-superhero-experiment</id><content type="html" xml:base="https://humanrefactor.com/diet/2017/01/24/the-superhero-experiment.html"><![CDATA[<p>In the spirit of learning and experimentation, I decided to HumanRefactor myself in a different way. In the past, I have dropped weight, slimmed up, increased endurance, increased speed and other things. What I hadn’t done before was get physically bigger.</p>

<p>Why would I want to put weight on and be bigger? When we compare this to software, it would be like stating “I want to have more lines of code!” That doesn’t seem logical. We might think though “I’d like to redesign this code base.” This is beyond what refactoring is. This is redesign territory.</p>

<p><img src="../../../assets/images/avengers_hulk.jpg" alt="avengers_hulk" /></p>

<p>Now, I wasn’t about to experiment with Gamma radiation but I was going to make serious changes to diet, exercise, sleep and my routine.</p>

<p>As I normally like to start things I needed a future goal. What better place to look then to superheroes. If you were ever a comic person then you probably still have a DC vs Marvel mindset. Personally, I’m a Marvel fan and one of my favourite heroes is Thor.</p>

<p>In the Marvel movies of recent years, Thor, the Norse God of Thunder, has been played by Chris<img src="../../../assets/images/thor-chris-h-avengers.jpg" alt="thor-chris-h-avengers" /> Hemsworth. If you don’t remember him from other movies, he wasn’t always this big. He is a surfer, and was in good shape before he got the role but he had to make big changes to become worth of lifting the mighty hammer Mjolner.</p>

<p>This seemed like a good blueprint for me to work from. Unlike, Chris, I wouldn’t be able to focus all my time on this activity so I knew my results may not be the same.</p>

<p>My goal was to get to 220lbs and have 15% body fat. My technique was going to be a personal trainer, three days a week (one hour a day), and a serious increase in food intake.</p>

<p>At the start, I was 212lbs and about 17% body fat. My discussions with people taught me that measurements would be important as well as the numbers. A good reminder.</p>

<p>Body builders aim for 1g of protein for each pound of weight. <em>As a geek, I can’t help noting<img src="../../../assets/images/diesel-hot-choc.png" alt="diesel-hot-choc" /> that the ratio is partly metric (g) and partly imperial (lbs).</em> If you want to be bigger, you need to eat more. I also started eating six meals a day. This seems fine over 24 but when you think about it, you are sleeping for eight which leaves 16 hours to divide these meals. 16/6 = 2.66. You need to eat about every two and a half hours. This means eating when you’re not even hungry. Harder then it sounds. Also, the food needs to be efficient. You need to be aware of how much protein, carbs and fat you’re taking in.</p>

<p>Over the next couple months I jumped past 220lbs and up to 230lbs. I probably could have gone even further. My body fat % also jumped up to 22% as I learned a common problem with gaining and loosing weight. A lot of body builders bulk up muscle (and get fatter), and then cut the fat (and loose some muscle). Then repeat the cycle.</p>

<p><strong>This is a quick way to start disliking food.</strong> </p>

<p>Another thing that was happening was three visits to the gym under a specific program starts to change your shape. The idea is to damage your muscles and then repair them. The more you repeat this the bigger you get (generally). It is vital that the right nutrition is in your system to take advantage of this. If you want to learn why people take steroids, it’s not to make them lift more. It’s to heal their muscles quicker so they can get back to the gym and get in more workouts. The human body takes time to heal, the older we are the slower the process. There is a lot to this so I don’t want to trivialize it. It’s important to understand that rest time is when we grow, not while we are in the gym.  This brings us back to sleep.</p>

<p><strong>If you’re not sleeping, you’re not going to get bigger.</strong> </p>

<p>Now, I’m still on my workout program. So far I’ve learned even more about nutrition, how to lift weights properly (avoiding injury), and the commitment it takes to develop large muscles.</p>

<p>I’ll write about this and more in my upcoming blogs. If there’s a certain question you have, or something you’d like to know more about, let me know and I can focus on that!</p>

<p>Here’s my current superhero look (comic book Thor) from a ComicCon event in Ottawa, putting on a show with Captain America. Current weight is 225 lbs at 20% body fat.</p>

<p><img src="../../../assets/images/thor_captain_1.jpg" alt="thor_captain_1" /></p>]]></content><author><name></name></author><category term="diet" /><summary type="html"><![CDATA[In the spirit of learning and experimentation, I decided to HumanRefactor myself in a different way. In the past, I have dropped weight, slimmed up, increased endurance, increased speed and other things. What I hadn’t done before was get physically bigger.]]></summary></entry><entry><title type="html">Internal Change</title><link href="https://humanrefactor.com/2015/07/01/internal-change.html" rel="alternate" type="text/html" title="Internal Change" /><published>2015-07-01T00:00:00+00:00</published><updated>2015-07-01T00:00:00+00:00</updated><id>https://humanrefactor.com/2015/07/01/internal-change</id><content type="html" xml:base="https://humanrefactor.com/2015/07/01/internal-change.html"><![CDATA[<p>We all are faced with challenges from others. Everyone has expectations of what we <strong>should</strong> be. Often it is to satisfy their own needs. People want us to run faster, work harder, contribute more. Most of it focused on short term objectives, on what they can get out of today if only they could get more out of you.</p>

<blockquote>
  <p><strong>Every single day of your life, you are faced challenges.</strong></p>
</blockquote>

<p>[caption id=”attachment_607” align=”alignleft” width=”275”]<a href="https://humanrefactor.wordpress.com/wp-content/uploads/2015/07/youcandoit.jpeg"><img src="../../../assets/images/youcandoit.jpeg" alt="you can do it written in sand" /></a> You can do it![/caption]</p>

<p>There is another voice that challenges you. This is our inside voice. This voice says “I could go for a run” or “I could ride my bike today instead of driving”. This voice uses the word <strong>could</strong> because it sees the potential in you. I’ll talk about the difference between could and should in another article. Today, I want to talk about the decision point when we hear this request for improvement from our inner voice.</p>

<p>When we make excuses (I can’t do this because…), it rejects this positive spirit so it wants to speak up less and less. When we say “Yes I can” and take action it fans this inner flame so it grows stronger and stronger.</p>

<p>We often look at successful people and wonder how</p>

<p>they got to be so motivated. Look closer and you will see how alive and strong their inner voice has become.</p>

<p>You will be faced with a challenging decision today. It might be to go running. I invite you to put your running shoes on and walk to the corner. See how you feel then. Taking the first step is the hardest and if we can start down a path, it’s easier to continue.</p>

<p>If we can build up a cadence of saying yes to our own improvement, we gather momentum, we gather an inertia of will positive will power. Challenge yourself to find a way to make it work. You can do stretches anywhere, take the stairs, swap dessert for a healthier treat, carry something for a neighbour, or spend a few minutes meditating. You can do it. You can make that small change that you want to. It is within your reach.</p>

<p>HumanRefactoring is about small, incremental improvements to your life. I believe you can make one today. What do you believe?</p>]]></content><author><name></name></author><summary type="html"><![CDATA[We all are faced with challenges from others. Everyone has expectations of what we should be. Often it is to satisfy their own needs. People want us to run faster, work harder, contribute more. Most of it focused on short term objectives, on what they can get out of today if only they could get more out of you.]]></summary></entry><entry><title type="html">The Right Stuff</title><link href="https://humanrefactor.com/2015/03/30/the-right-stuff.html" rel="alternate" type="text/html" title="The Right Stuff" /><published>2015-03-30T00:00:00+00:00</published><updated>2015-03-30T00:00:00+00:00</updated><id>https://humanrefactor.com/2015/03/30/the-right-stuff</id><content type="html" xml:base="https://humanrefactor.com/2015/03/30/the-right-stuff.html"><![CDATA[<p>I always talk about eating better to help take better care of yourself. I love reading blogs and books on these subjects. One big reason is that I’m always asking myself if I’m eating the right stuff.</p>

<p>The latest book I’ve been reading is from biohacker <a href="https://www.bulletproofexec.com/" title="Dave Asprey">Dave Asprey</a> who has got me into putting grass-fed butter, tea and MCT oil into a blender. It sounds weird but it’s fantastic. I also add in some local honey as well. Dave has a recipe for Bullet Proof Coffee that you can read about on his site.</p>

<p>A big problem in making this delicious and nutritious drink is in getting grass fed butter. After some great advice at a local farmers market, I found <a href="http://www.rollingmeadowdairy.com/" title="Rolling Meadow Dairy">Rolling Meadows</a> at Whole Foods. I’m not big on promoting brands but this company has a mission that I can really get behind. They’re making milk and butter from grass fed cows available in Canada. Why is this a big issue? People making milk focus on volume and people selling beef focus on volume. This is why hormones and corn are used to raise cattle. We should be focusing on the quality of the product. Grass fed from start to finish does this for cattle.</p>

<p>In software development, we also focus on volume too where we should be focusing on quality. We used to measure the caliber of a developer by the number of lines of code written in a day. Today I am often quite happy if we find a way to reduce the amount of code and still deliver what the customer wants. Even more important, I’ve realized that the number of lines isn’t relevant. What is important is that your code works, is readable and is updatable. That’s what refactoring is all about.</p>

<p>The next time you are putting something into your body or into your code, make sure it’s the right stuff.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[I always talk about eating better to help take better care of yourself. I love reading blogs and books on these subjects. One big reason is that I’m always asking myself if I’m eating the right stuff.]]></summary></entry><entry><title type="html">20,000 steps away from the sea</title><link href="https://humanrefactor.com/diet/exercise/2014/11/20/20000-steps-away-from-the-sea.html" rel="alternate" type="text/html" title="20,000 steps away from the sea" /><published>2014-11-20T00:00:00+00:00</published><updated>2014-11-20T00:00:00+00:00</updated><id>https://humanrefactor.com/diet/exercise/2014/11/20/20000-steps-away-from-the-sea</id><content type="html" xml:base="https://humanrefactor.com/diet/exercise/2014/11/20/20000-steps-away-from-the-sea.html"><![CDATA[<p>Recently I travelled to England and Germany to speak at Agile Testing Days 2014. It was a wonderful conference and the trip gave me a chance to do a lot of walking to see a lot of sites.</p>

<p><a href="https://humanrefactor.wordpress.com/wp-content/uploads/2014/11/moto360.jpg"><img src="../../../assets/images/moto360.jpg" alt="moto360" /></a>I was wearing my new Moto 360 which among many other things keeps tracks of how many steps you take.</p>

<p>The default goal (similar with other pedometers) is 10,000 steps. This didn’t seem like much but I never seemed to get over 8,000. That changed in Europe. Walking around London and then Berlin and Potsdam Germany put me over 20,000 steps several times during the week.</p>

<p>For me and many of my colleagues, we spend a lot of time away from home staying in hotels and eating in restaurants. This makes it difficult to keep up with our exercise routines and eat a healthy diet.</p>

<p>Eating healthy in Europe turned out to be very simple. Every place I ate had healthy options and food was fantastic. At one place, all their beef was from one local farm and it was delicious. They also served the best pumpkin soup I’ve ever had in my life.</p>

<p>I was shocked at how good all the food tasted. If you’ve been to Europe, you know what I mean. If you’re a foodie, you owe it to yourself to go. Healthy food. Check.</p>

<p>Exercising while travelling can be difficult. Most chain hotels have a small exercising room and some have pools. I try to at least once a week hit the gym or the pool. Another thing you can do in your hotel is to take the stairs. It’s one of those small things that can really make a difference if you do it regularly. If you do yoga, it’s something you can do in your hotel room.</p>

<p>While I was in Europe my hotel didn’t have a pool or a gym. Luckily, a bit of site seeing helped me set new personal bests on my pedometer. I also felt great with all that walking.</p>

<blockquote>
  <p>A 15 minute walk can change your life.</p>
</blockquote>

<p>I’d love to hear some of your tricks for staying healthy while you’re away from home.</p>]]></content><author><name></name></author><category term="diet" /><category term="exercise" /><category term="europe" /><category term="food" /><category term="moto-360" /><category term="pedometer" /><category term="potsdam-germany" /><category term="walking" /><summary type="html"><![CDATA[Recently I travelled to England and Germany to speak at Agile Testing Days 2014. It was a wonderful conference and the trip gave me a chance to do a lot of walking to see a lot of sites.]]></summary></entry><entry><title type="html">Take a hike</title><link href="https://humanrefactor.com/2014/04/22/take-a-hike.html" rel="alternate" type="text/html" title="Take a hike" /><published>2014-04-22T00:00:00+00:00</published><updated>2014-04-22T00:00:00+00:00</updated><id>https://humanrefactor.com/2014/04/22/take-a-hike</id><content type="html" xml:base="https://humanrefactor.com/2014/04/22/take-a-hike.html"><![CDATA[<p>No really, take a hike.<a href="http://humanrefactor.wordpress.com/wp-content/uploads/2014/04/hiking1.jpeg"><img src="../../../assets/images/hiking1.jpeg" alt="Image" /></a></p>

<p>It’s great exercise, you’re out in the fresh air and spending some time with nature. What you might not associate with hiking is software development but that’s one way I explain Test Driven Development (TDD) to people.</p>

<p>Imagine a sole developer running full speed through the forest. You would say “Look how fast that developer is going, that’s great. He/She is going get where he/she is going in no time!” There are a few issues with this.</p>

<p>To begin with, a big problem is that the developer isn’t sure where they are going, just a general direction. The final destination is often a moving target. Their great speed may cause them to miss their mark and have to back track, searching for the destination, trying to get to it from their current location which may now be very difficult.</p>

<p>Secondly,  running in the forest can be a dangerous activity. There are roots, and rocks and slippery moss and branches, and probably some wildlife. Running in this environment is not a safe thing to do. It’s not safe for the developer and it’s not safe for their customer. Sudden surprises can cause serious problems.</p>

<p>Finally, forests are places where you can get lost. Especially if you’re unfamiliar with your surroundings. You should bring a friend or even better, a whole team (Please read up on pair programming if you haven’t heard of it). Working in a team you can find a better way through the forest.</p>

<p>When I teach TDD, I talk about a different kind of development. </p>

<p>Imagine two developers in the forest. One is looking at the ground, finding a good way past the current obstacle and the second is looking at a compass. The second one has just confirmed the direction they need to go and advises the first one. They move forward to the next obstacle being ready to change direction if required. They check their direction with the compass again and move forward again heading towards their mark. Their progress is steady, careful and safe. They can continue working like this for a long period of time. If anything unexpected happens, they can support each other. These are agile developers.</p>]]></content><author><name></name></author><category term="hiking" /><category term="mindset" /><category term="pair-programming" /><category term="tdd" /><category term="test-driven-development" /><summary type="html"><![CDATA[No really, take a hike.]]></summary></entry><entry><title type="html">Garbage in, garbage out.</title><link href="https://humanrefactor.com/diet/focus/goals/happiness/2014/03/31/garbage-in-garbage-out.html" rel="alternate" type="text/html" title="Garbage in, garbage out." /><published>2014-03-31T00:00:00+00:00</published><updated>2014-03-31T00:00:00+00:00</updated><id>https://humanrefactor.com/diet/focus/goals/happiness/2014/03/31/garbage-in-garbage-out</id><content type="html" xml:base="https://humanrefactor.com/diet/focus/goals/happiness/2014/03/31/garbage-in-garbage-out.html"><![CDATA[<p>One of the first catch phrases I heard when learning to program was <a href="http://en.wikipedia.org/wiki/Garbage_in,_garbage_out" title="Garbage In, Garbage Out">“Garbage in, garbage out”.</a> This refers in computer science to the fact that <a href="http://humanrefactor.wordpress.com/wp-content/uploads/2014/03/burger_prepared.jpg"><img src="../../../assets/images/burger_prepared.jpg" alt="grass fed beef" /></a>computers will often accept incorrect and even incomprehensible data and produce undesired, often meaningless output.</p>

<p>People will drive miles away to get gas from a preferred station for their car. However, when we need a snack we grab the most convenient, often more expensive, usually unhealthy choice of ‘food’.  Surely we don’t think more of our cars then we do of our own bodies?</p>

<p>All our bodies have to work with is what we put into them. How can we eat better? In software development we often ask ourselves how we can code better. One of the best solutions is to right tests before you right the code. This is a practice from eXtreme Programming called Test Driven Development or known more commonly by it’s abbreviation TDD.</p>

<p>TDD teaches us to first write a small failing test. Secondly we do the minimum to make the test pass. Thirdly we refactor, which involves removing duplication and organizing the code. This third step gives us an opportunity to reflect on our approach to passing the tests. We then repeat the process continually until we are satisfied.</p>

<blockquote>
  <p><strong>If we feed ourselves with less then ideal food we will not perform to our maximum potential.</strong></p>
</blockquote>

<p>One important part of improving our code is to make small, sustainable changes, not large changes. Large changes can create instability, something that is very much undesired in software and in our bodies.</p>

<p>I’m going to write a very simple test that involves one of the most famous snacks of all time, the hamburger. Yes, I am writing about a hamburger. It might not be what you think as my hamburger has already been through a few ‘improvements’. For example, I don’t eat bread with my hamburger and am very happy to see that many restaurants are now offering a leaf of lettuce on either side to substitute for the bun. My burgers are also full of spinach and onions and no fillers like bread crumbs.</p>

<p>Ok. I need a new test that will improve my hamburger. My main concerns are nutrition and taste.</p>

<p>The name for the test is test_is_burger_made_with_grass_fed_beef<a href="http://humanrefactor.wordpress.com/wp-content/uploads/2014/03/ground_beef.jpg"><img src="../../../assets/images/ground_beef.jpg" alt="grass fed" /></a></p>

<p>Kind of a funny name when you think about it. If the world made sense the test should be called test_is_burger_not_made_with_corn_or_soy_or_something_else_that_cows_dont_normally_eat but we will go with the current standard so there is no confusion. FYI, corn is fed to cows to fatten them up so they can sell for more money (increased weight). It marbles the meat which people associate to better taste. I disagree. Grass fed beef tastes better and is much better for you. Please do not take my word for it. Go and buy some grass fed beef or even do a taste test. (hmmm…future article on A/B testing?).</p>

<p>Back to our Food TDD. We have our new test which fails since the ground beef I have is not grass fed. Yeah, failing test!</p>

<p>Second step, I find a store and buy some grass fed beef for my burger. I don’t eat burgers very often so I don’t mind paying a bit more for them. It makes the treat even more enjoyable and special. Then I make the burgers and eat them. I have two burgers since they are so good.</p>

<p>Finally, TDD tells us to refactor. In cooking I look at any wasted steps or ways to improve the process. I find one. I made a critically error. I actually wrote three steps at once. I also wrote these tests:</p>

<p>does_burger_topping_include_red_swiss_chard and does_burger_topping_include_goat_cheese</p>

<p>My burger tasted great but the goat cheese didn’t quite work and I’m not sure about the red swiss chard which looked great but was over powered by the goat cheese. I’ll have to make them again and this time just make one change at a time to see if it improves the recipe. To focus on grass fed burger, it tasted amazing and I feel good knowing I put better quality food into my system.</p>

<p>This is a very simple concept but if you want to improve your code or yourself you need to reduce your feedback cycles so you can learn whether a change is making things better or not. Each of these changes need to be done with quality. Anything done poorly will have poor results.</p>

<p>If “Garbage in, garbage out” happens then let’s do what we can for both our bodies and our code and put quality into everything we do.</p>]]></content><author><name></name></author><category term="diet" /><category term="focus" /><category term="goals" /><category term="happiness" /><summary type="html"><![CDATA[One of the first catch phrases I heard when learning to program was “Garbage in, garbage out”. This refers in computer science to the fact that computers will often accept incorrect and even incomprehensible data and produce undesired, often meaningless output.]]></summary></entry></feed>