<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>software development on Andrew Khoury</title><link>https://www.drewkhoury.com/tags/software-development/</link><description>Recent content in software development on Andrew Khoury</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Copyright © 2021, Andrew Khoury; all rights reserved.</copyright><lastBuildDate>Thu, 11 Nov 2021 19:22:11 +0000</lastBuildDate><atom:link href="https://www.drewkhoury.com/tags/software-development/index.xml" rel="self" type="application/rss+xml"/><item><title>How to implement Good Software Delivery in 30 seconds</title><link>https://www.drewkhoury.com/post/gsd/how-to-implement-good-software-delivery-in-30-seconds-72d13ad4a296/</link><pubDate>Thu, 11 Nov 2021 19:22:11 +0000</pubDate><guid>https://www.drewkhoury.com/post/gsd/how-to-implement-good-software-delivery-in-30-seconds-72d13ad4a296/</guid><description>
&lt;p>Good Software Delivery (GSD) is the term we use for the set of practices that help deliver, well, &lt;em>good&lt;/em> software. There’s a focus on short feedback loops, a consistent developer experience, with more time spent delivering and less time spent on chores like workstation setup and debug.&lt;/p>
&lt;p>For context, I’ve previously written the following blogs that explain a lot of the “why” you’d want to implement the app I’m about to demo:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://medium.com/@drew.khoury/how-cloud-transformation-at-scale-can-enable-good-software-delivery-4a6645d4c570">GSD&lt;/a> &amp;amp; &lt;a href="https://medium.com/@drew.khoury/good-software-delivery-trust-and-verify-ced74fa04b39">Trust and Verify&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://medium.com/@drew.khoury/optimizing-for-dx-the-developer-experience-f37fe168642d">Developer Experience&lt;/a> &amp;amp; &lt;a href="https://medium.com/@drew.khoury/3-musketeers-for-an-epic-developer-experience-8676ddaf33b2">3 Musketeers&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="assumptions">Assumptions&lt;/h3>
&lt;p>Before we dive in I want to share my assumptions and expectations. This blog/demo is &lt;strong>aimed at developers&lt;/strong>, who are also familiar with pipelines, local development environments, and tools like docker.&lt;/p>
&lt;p>While you can clone the repo and run the commands quickly (even with zero knowledge or experience in the underlying Golang app), it will take you longer than 30 seconds to read this blog, and even longer to look through the repo’s &lt;a href="https://github.com/contino/gsd-hello-world/blob/master/README.md">README.md&lt;/a> and code in the repo to see what’s happening when you type each command. I’ve tried to add as much detail and context for those that’d like to deep dive, both in this blog and in the repo itself.&lt;/p>
&lt;p>The purpose isn’t to copy and paste what you see here into production, but I do hope I’m able to demonstrate some ways of setting up your repo and local development environment in a way that could save you and your team time for your next product!&lt;/p>
&lt;h3 id="what-well-do-in-thisdemo">What we’ll do in this demo&lt;/h3>
&lt;p>In this post, I wanted to share a hands-on implementation of some of these concepts that you can try for yourself. We’ll be using a hello-world app written in Golang, and by the end of the demo I’m hoping:&lt;/p>
&lt;ul>
&lt;li>You’ll see how wrapping our pipeline in 3 Musketeers can greatly reduce the amount of toil spent getting a new project started (thus the 30 seconds claim for this simple app)&lt;/li>
&lt;li>You’ll see that you can adapt the concepts in this demo to just about any app (Java, .Net etc) — More complex apps may take longer to compile, but no extra effort should be required in terms of desktop setup (toil)&lt;/li>
&lt;li>You’ll be able to extend the logic for other pipeline tasks like testing or security&lt;/li>
&lt;/ul>
&lt;p>If this demo takes you longer than 30 seconds to run this demo, I suspect:&lt;/p>
&lt;ul>
&lt;li>We need to get you a better Internet connection (most of the 30 seconds for me is spent downloading the initial Golang image on an empty docker cache)&lt;/li>
&lt;li>We need to help you with the base requirements that this blog assumes you already have (&lt;code>make&lt;/code>,&lt;code>docker&lt;/code>and &lt;code>docker-compose&lt;/code>)&lt;/li>
&lt;/ul>
&lt;p>In any case, &lt;a href="https://www.linkedin.com/in/drewkhoury/">reach out&lt;/a> on LinkedIn if you have suggestions to improve this demo, or set up a &lt;a href="https://calendly.com/drew-khoury">virtual meeting with me&lt;/a> if you’d like a 1:1 workshop/chat!&lt;/p>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*Yh9siTLfQhrFtMsQoo-OHw.gif" alt="">&lt;/p>
&lt;h3 id="the-demo-build-and-run-a-go-app-in-30seconds">The demo (build and run a Go app in 30 seconds)&lt;/h3>
&lt;blockquote>
&lt;p>&lt;em>At a minimum, you’ll need&lt;/em> &lt;code>_make_&lt;/code>&lt;em>,&lt;/em> &lt;code>_docker_&lt;/code> &lt;em>and&lt;/em> &lt;code>_docker-compose_&lt;/code> &lt;em>on your workstation. See&lt;/em> &lt;a href="https://github.com/contino/gsd-hello-world#requirements">&lt;em>requirements&lt;/em>&lt;/a> &lt;em>for more info or continue on if you’ve already got these.&lt;/em>&lt;/p>
&lt;/blockquote>
&lt;p>Not sure about running this demo on your computer? Never fear! You can use this online environment from the safety of your browser: &lt;a href="https://www.katacoda.com/drewkhoury/courses/good-software-delivery/hello-world-golang">GSD HelloWorld katacoda&lt;/a> (repo will already be cloned in this environment, with required software ready to go)&lt;/p>
&lt;script src="//katacoda.com/embed.js">&lt;/script>
&lt;div id="katacoda-scenario-1"
data-katacoda-id="drewkhoury/courses/good-software-delivery/hello-world-golang"
data-katacoda-color="004d7f"
style="height: 850px; padding-top: 0px;">&lt;/div>
&lt;p>You can see all of my Katacoda courses at &lt;a href="https://www.katacoda.com/drewkhoury/">https://www.katacoda.com/drewkhoury/&lt;/a>.&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Clone the repo:&lt;/strong> Start by cloning the &lt;a href="https://github.com/contino/gsd-hello-world">GSD HelloWorld&lt;/a> repo:&lt;/li>
&lt;/ol>
&lt;p>&lt;code>git clone git@github.com:contino/gsd-hello-world.git &amp;amp;&amp;amp; cd gsd-hello-world&lt;/code>&lt;/p>
&lt;p>&lt;strong>2. Build the app:&lt;/strong> Once you have the codebase, build the app using:&lt;/p>
&lt;p>&lt;code>make build&lt;/code>&lt;/p>
&lt;p>This step will create a build artifact (in our case, a docker image) by doing the following:&lt;/p>
&lt;ul>
&lt;li>downloads the appropriate docker image onto your workstation&lt;/li>
&lt;li>copies the source for our app into the image&lt;/li>
&lt;li>builds the application in the image&lt;/li>
&lt;li>configures the port/cmd to be used at runtime&lt;/li>
&lt;/ul>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*UdL5jdUgFWi7fn2UzbUhIQ.png" alt="">&lt;/p>
&lt;p>&lt;strong>3. Run the app:&lt;/strong> Now that you have your build artifact handy, you can run the application locally with:&lt;/p>
&lt;p>&lt;code>make run&lt;/code>&lt;/p>
&lt;p>This step will run/deploy the artifact on your workstation by doing the following:&lt;/p>
&lt;ul>
&lt;li>uses docker to create a container based on the image from the &lt;code>build&lt;/code> step&lt;/li>
&lt;li>exposes port 8080 locally&lt;/li>
&lt;li>the docker image runs the cmd &lt;code>./main&lt;/code> which starts the application for us&lt;/li>
&lt;/ul>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/1200/1*aJcA5Mkd3nh8EFJJ2ZjMNw.png" alt="">&lt;/p>
&lt;p>That’s it, you’re running the GSD HelloWorld application written in Golang and containerized so that it can quickly be deployed in Docker.&lt;/p>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/1200/1*9ePbn1rS0h-RprW2M7s-Og.png" alt="">&lt;/p>
&lt;p>&lt;strong>Bonus:&lt;/strong> You can run &lt;code>make test&lt;/code> to execute the test suite (note this may legitimately fail if it doesn’t meet the testing threshold), and&lt;code>make down&lt;/code> to clean up once you’re done.&lt;/p>
&lt;p>The beauty of this model is in its simplicity. We’re using &lt;code>make&lt;/code> as the interface and we’re running all the tasks in containers to ensure consistency. It’s easy enough to peak under the hood to see what either of those tools is doing, and this runs just as easily on your workstation as it does on your CI tool of choice.&lt;/p>
&lt;h3 id="digging-into-thecode">Digging into the code&lt;/h3>
&lt;p>To keep this section brief I’m going to assume some prior knowledge around development, docker, and make.&lt;/p>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*-WosNzXumx9wbyGbgpcIlA.png" alt="">&lt;/p>
&lt;blockquote>
&lt;p>What if I want to make my own changes or do something similar in my own repo?&lt;/p>
&lt;/blockquote>
&lt;p>For the curious: Checkout the &lt;code>Makefile&lt;/code>, &lt;code>docker-compose.yml&lt;/code> and &lt;code>Dockerfile&lt;/code> in the repo. These drive our pipeline and app build etc, and while they abstract the complexity away from day-to-day usage, they’re intended to be developer-friendly in terms of understanding exactly what each step is doing.&lt;/p>
&lt;p>&lt;strong>Building the app:&lt;/strong> For example &lt;code>make build&lt;/code> is what builds our application, and in the &lt;code>Makefile&lt;/code> you’ll see it does the following:&lt;/p>
&lt;p>&lt;code>docker build -t ${FULL_TAG} .&lt;/code>&lt;/p>
&lt;p>&lt;strong>Replacing the app:&lt;/strong> If you wanted to replace our Golang application with your own Java application, you’d drop in your own &lt;code>Dockerfile&lt;/code> , replace the &lt;code>/src&lt;/code>, and leave everything else as-is. The beauty is that any developer using the repo still runs &lt;code>make build&lt;/code> and they don’t need to worry about Go vs Java dependencies (or in theory even know that you completely rewrote the application) — it just works™.&lt;/p>
&lt;blockquote>
&lt;p>Note: This repo is a testing ground for GSD practices — simple but powerful ways to supercharge your development.&lt;/p>
&lt;/blockquote>
&lt;p>If you’d like to see what else you can do, have a look at the rest of the &lt;a href="https://github.com/contino/gsd-hello-world">https://github.com/contino/gsd-hello-world&lt;/a> — we have plenty for you to explore.&lt;/p>
&lt;ul>
&lt;li>&lt;code>build&lt;/code>, &lt;code>test&lt;/code> and &lt;code>run&lt;/code> actions are driven by a simple &lt;code>Makefile&lt;/code> — with underlying execution via docker containers&lt;/li>
&lt;li>Build badge in &lt;a href="https://github.com/contino/gsd-hello-world/blob/master/README.md">README.md&lt;/a>&lt;/li>
&lt;li>Repo Visualization in &lt;a href="https://github.com/contino/gsd-hello-world/blob/master/README.md">README.md&lt;/a>&lt;/li>
&lt;li>Sonar quality, reliability, and security badges in &lt;a href="https://github.com/contino/gsd-hello-world/blob/master/README.md">README.md&lt;/a>&lt;/li>
&lt;li>Golang security in-pipeline&lt;/li>
&lt;li>Local tests via &lt;code>make test&lt;/code>&lt;/li>
&lt;li>Artifact storage via Github Packages&lt;/li>
&lt;li>Github Actions&lt;/li>
&lt;li>Deployment to k8s in GCP&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Further reading:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://medium.com/@drew.khoury/how-cloud-transformation-at-scale-can-enable-good-software-delivery-4a6645d4c570">GSD&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://medium.com/@drew.khoury/good-software-delivery-trust-and-verify-ced74fa04b39">Trust and Verify&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://medium.com/@drew.khoury/optimizing-for-dx-the-developer-experience-f37fe168642d">Developer Experience&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://medium.com/@drew.khoury/3-musketeers-for-an-epic-developer-experience-8676ddaf33b2">3 Musketeers&lt;/a> and &lt;a href="https://3musketeers.io/">https://3musketeers.io/&lt;/a>&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>May your software be good, and your delivery be continuous — drew&lt;/p>
&lt;/blockquote>
&lt;div class="notices info">
&lt;div class="label">Info&lt;/div>
&lt;p>Also posted on medium as &lt;a href="https://medium.com/@drew.khoury/how-to-implement-good-software-delivery-in-30-seconds-72d13ad4a296?source=friends_link&amp;amp;sk=bd2774e9b1cd9f5a4a293aa290cb657e">How to implement Good Software Delivery in 30 seconds&lt;/a>.&lt;/p>
&lt;/div></description></item><item><title>The cost of failure is education</title><link>https://www.drewkhoury.com/post/the-cost-of-failure-is-education-5efd9f1a1bd0/</link><pubDate>Tue, 12 Feb 2019 09:40:54 +0000</pubDate><guid>https://www.drewkhoury.com/post/the-cost-of-failure-is-education-5efd9f1a1bd0/</guid><description>
&lt;p>wow, so cool.&lt;/p>
&lt;p>If you’ve ever been responsible for software running in production, you should already be well aware of failure. But it’s not only traditional “operations” roles that are affected by failure.&lt;/p>
&lt;p>Consider some of the changes we’ve seen in IT in the last decade:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>2003: SRE -&lt;/strong> Site Reliability Engineer, a discipline created at Google that incorporates aspects of software engineering and applies them to IT operations problems.&lt;/li>
&lt;li>&lt;strong>2006: AWS EC2 -&lt;/strong> The birth of the cloud “Amazon Elastic Compute Cloud (EC2)” which made Infrastructure-as-a-Service available to developers around the globe via APIs. It paved the way for CloudNative, Serverless, PaaS and the hundreds of services we have available to us today.&lt;/li>
&lt;li>&lt;strong>2009: DevOps -&lt;/strong> The combination of software development (Dev) with information technology operations (Ops)”.&lt;/li>
&lt;/ul>
&lt;p>It’s clear there have been changes in the people and teams who need to be involved in running software for customers. At the same time there have been significant changes to how we build, test and deploy software.&lt;/p>
&lt;p>Culture is a common topic that comes up when we talk about things like DevOps, Lean Software Development, and SRE but what do we mean when we say culture? Do we just give developers pizza and beer until they produce good software and hope they don’t leave for another company offering gourmet pizza and craft beer?&lt;/p>
&lt;h3 id="origins-of-lean-in-manufacturing">Origins of lean in manufacturing&lt;/h3>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/0*MF6UDNS45Mc66Wb6" alt="">&lt;/p>
&lt;p>To understand the origins that paved the way for DevOps, SRE, and the “Culture/Transformation” we’re hearing so much about in IT we need to go back, back to 1990 and back to car manufacturing. Consider the following quote from &lt;a href="https://en.wikipedia.org/wiki/Lean_manufacturing">https://en.wikipedia.org/wiki/Lean_manufacturing&lt;/a>&lt;/p>
&lt;blockquote>
&lt;p>Lean manufacturing makes obvious what adds value, by reducing everything else (which is not adding value). This management philosophy is derived mostly from the Toyota Production System (TPS) and identified as “lean” only in the 1990s&lt;/p>
&lt;/blockquote>
&lt;p>&lt;strong>Steps to achieve lean systems&lt;/strong>&lt;/p>
&lt;p>The following steps should be implemented to create the ideal lean manufacturing system:&lt;/p>
&lt;ul>
&lt;li>Design a &lt;strong>simple&lt;/strong> manufacturing system&lt;/li>
&lt;li>Recognise that there is &lt;strong>always room for improvement&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Continuously improve&lt;/strong> the lean manufacturing system design&lt;/li>
&lt;/ul>
&lt;p>Sound familiar? These themes are present in Lean, Agile and DevOps.&lt;/p>
&lt;p>&lt;strong>The andon cord — Game-changing rope&lt;/strong>&lt;/p>
&lt;p>Back in the early days of the Toyota Production System (TPS), Toyota implemented many unique tools and processes. The Andon Cord was born, and while it was just a rope it was the most powerful rope you’ve ever seen.&lt;/p>
&lt;p>Anyone had the right to pull the cord at any time and pulling it would instantly stop all work on the assembly line. The technology behind this wasn’t revolutionary, but the thinking, culture and trust behind this system is something we can learn from today. The “Safety Culture” around this process was reinforced when the team leader arrived at the workstation, thanking the team member who pulled the Cord.&lt;/p>
&lt;blockquote>
&lt;p>The team member did not, and never would be, in a position of feeling fear or retribution for stopping the production line&lt;/p>
&lt;/blockquote>
&lt;p>Toyota has so much to teach us about working together an respecting each other. Even if the team leader knew a better answer, Toyota principally felt that a solution from the team member was a better outcome.&lt;/p>
&lt;h3 id="postmortums--lean-software-development">Postmortums &amp;amp; lean software development&lt;/h3>
&lt;p>Leaving cars behind and getting back to software, Mary and Tom Poppendeick’s work on Lean Software development in the early 2000s paved the way for the sort of thinking coming out of Google (SRE), and one great example of that is &lt;a href="https://landing.google.com/sre/sre-book/chapters/postmortem-culture/">postmortem culture&lt;/a>.&lt;/p>
&lt;blockquote>
&lt;p>Writing a postmortem is not punishment — it is a learning opportunity for the entire company.&lt;/p>
&lt;/blockquote>
&lt;p>As an IT professional with a decade of experience I’ve seen how the culture of the company can significantly impact how people, teams and the organisation grow and improve. The great opportunity that exists when failure happens is learning. The companies and teams that truely believe this are the ones that will continuously improve, both their software and their culture.&lt;/p>
&lt;hr>
&lt;div class="notices info">
&lt;div class="label">Info&lt;/div>
&lt;p>Also posted on medium as &lt;a href="https://medium.com/@drew.khoury/the-cost-of-failure-is-education-5efd9f1a1bd0">The cost of failure is education&lt;/a>.&lt;/p>
&lt;/div></description></item></channel></rss>