<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Make on Andrew Khoury</title><link>https://www.drewkhoury.com/tags/make/</link><description>Recent content in Make on Andrew Khoury</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Copyright © 2021, Andrew Khoury; all rights reserved.</copyright><lastBuildDate>Sat, 28 Aug 2021 14:18:09 +0000</lastBuildDate><atom:link href="https://www.drewkhoury.com/tags/make/index.xml" rel="self" type="application/rss+xml"/><item><title>3 Musketeers for an epic Developer Experience</title><link>https://www.drewkhoury.com/post/gsd/3-musketeers-for-an-epic-developer-experience-8676ddaf33b2/</link><pubDate>Sat, 28 Aug 2021 14:18:09 +0000</pubDate><guid>https://www.drewkhoury.com/post/gsd/3-musketeers-for-an-epic-developer-experience-8676ddaf33b2/</guid><description>
&lt;p>We all want to reduce toil and improve the developer experience (when starting new applications or joining the team). Developers have had to invest significant time in creating production-ready pipelines when building new products and configuring their workstations when joining teams. Their workstations may not run all the same tests as their pipeline and thus they’re left with &lt;a href="https://www.linkedin.com/feed/hashtag/?keywords=slowfeedback&amp;amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A6835918781475246080">#slowfeedback&lt;/a> and an inconsistent experience.&lt;/p>
&lt;p>The larger the organization (ie Enterprise with 10’s-100’s of teams and applications) the worse the problem gets.&lt;/p>
&lt;p>GSD is built on the principle of reusability through a pattern called &lt;a href="https://3musketeers.io/">3 Musketeers&lt;/a> (test, build, and deploy your apps from anywhere, the same way). It gives consistency, control, and confidence to development teams.&lt;/p>
&lt;p>Docker is a key part of this pattern, but the use of &lt;code>docker&lt;/code>, &lt;code>docker-compose&lt;/code> and &lt;code>make&lt;/code> together really unlock the powers of consistency, control and confidence in your application build, test and deploy steps. The &lt;a href="https://3musketeers.io/docs/">3musketeers Docs&lt;/a> have some great examples of these patterns.&lt;/p>
&lt;p>Here's what the most simple usage looks like:&lt;/p>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*O8UwDvze7KXEDKLKgqevcw.jpeg" alt="">&lt;/p>
&lt;p>While the pattern itself is simple, the power (and benefit) comes from the widespread usage across your organization. Here’s what usage might look like:&lt;/p>
&lt;ul>
&lt;li>Agree on a standard interface for all pipeline actions (much like API’s have an agreed interface, all pipelines in the org use the same interface, ie `make build`, `make test`, `make deploy`)&lt;/li>
&lt;li>Keep the interface simple (avoid custom pipeline logic, one simple Makefile calls Compose, the container handles all the logic)&lt;/li>
&lt;li>Create docker containers for each pipeline step, make them stateless, reuse them where it makes sense&lt;/li>
&lt;/ul>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*hdKr28atovmEGFkBRaOIXA.jpeg" alt="">&lt;/p>
&lt;p>&lt;strong>Wins:&lt;/strong> Modern pipelines already support running steps in docker containers. This pattern extends portability across almost any pipeline tool or development workstation and runs the same way in every single environment. Pipeline steps can be tested independently and reused. This pattern makes it easy to go one step further and generate pipelines on-demand based on boilerplate starter templates. Oh yeah, and &lt;a href="https://www.linkedin.com/feed/hashtag/?keywords=fastfeedback&amp;amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A6835918781475246080">#fastfeedback&lt;/a> (we’re talking pre-commit).&lt;/p>
&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/3-musketeers-for-an-epic-developer-experience-8676ddaf33b2">3 Musketeers for an epic Developer Experience&lt;/a>.&lt;/p>
&lt;/div>
&lt;p>_&lt;/p></description></item><item><title>Optimizing for DX — The Developer Experience</title><link>https://www.drewkhoury.com/post/optimizing-for-dx-the-developer-experience-f37fe168642d/</link><pubDate>Sun, 19 Jan 2020 19:18:39 +0000</pubDate><guid>https://www.drewkhoury.com/post/optimizing-for-dx-the-developer-experience-f37fe168642d/</guid><description>
&lt;p>One thing I’m very much obssessed with is something I’m calling the Developer Experience (DX). I’m literally on a global &amp;amp; lifelong mission to optimize DX.&lt;/p>
&lt;p>&lt;em>Hint: Once you’re sold on the benefits of a great DX you can skip ahead to the “3 Steps for success” section&lt;/em>.&lt;/p>
&lt;p>&lt;strong>What is DX and why should you care?&lt;/strong>&lt;/p>
&lt;p>If you’re part of a team/organization that does development then you’re likely going to run into one or more of the following:&lt;/p>
&lt;ul>
&lt;li>Having to keep README’s up to date&lt;/li>
&lt;li>Building &amp;amp; testing your code&lt;/li>
&lt;li>Bringing new people onto the team &amp;amp; showing them how your code works&lt;/li>
&lt;li>Building pipelines &amp;amp; debugging them when they don’t behave&lt;/li>
&lt;li>Fixing your dev environment when it breaks&lt;/li>
&lt;li>Supporting that one person who wants to use &amp;lt;insert whatever OS the rest of the team isn’t using&amp;gt;&lt;/li>
&lt;li>Starting new projects and re-doing the basic building blocks to get started&lt;/li>
&lt;li>Trying to support 10 teams all working on their own software but all needing to be able to work closely together (and not re-invent the wheel)&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>My perfect world!&lt;/strong>&lt;/p>
&lt;p>In a perfect world the mundane parts of development would be simple:&lt;/p>
&lt;ul>
&lt;li>Creating a new project should be fast (I shouldn’t worry about any of the ‘boilerplate’ steps that would be the same between projects)&lt;/li>
&lt;li>&lt;em>As a consumer of code:&lt;/em> I shouldn’t have to worry about how code is built, tested &amp;amp; deployed&lt;/li>
&lt;li>&lt;em>As a developer of code:&lt;/em> I should be able to easily update how my code is built, tested &amp;amp; deployed without affecting other developers or build servers wanting to consume my code&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>If I have to talk to a developer, install some special software dependencies, read a confluence page or README.md, figure out how to get things working on my OS or spend more than 5 minutes getting your software built or a new project setup then you’ve failed to streamline the DX.&lt;/p>
&lt;/blockquote>
&lt;h3 id="3-steps-forsuccess">3 Steps for success&lt;/h3>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*o548VIWo3J7WLwRLwkumOw.jpeg" alt="">&lt;/p>
&lt;p>The’s a concept called 3 Musketeers which is really just an agreed pattern for standardization when building software. It’s most common form uses Make as a standard interface to Compose &amp;amp; Docker Containers but you can adapt the concept to suit your needs.&lt;/p>
&lt;p>&lt;a href="https://3musketeers.io/" title="https://3musketeers.io/">&lt;strong>3 Musketeers&lt;/strong>&lt;br>
_Test, build, and deploy your apps from anywhere, the same way. Get Started → Run the same commands no matter where you…_3musketeers.io&lt;/a>&lt;a href="https://3musketeers.io/">&lt;/a>&lt;/p>
&lt;p>The net result is a consistent experience that works the same on Windows, Mac &amp;amp; Linux. It’s portable across development machines, build servers and provides consistency that scales from 1 team to 100 teams.&lt;/p>
&lt;p>If you’re already using containers in your build server steps or as part of your development then you’re one step closer to a utopia of standardization!&lt;/p>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*l3oNIw1tkOSwS6IQOHK46g.jpeg" alt="">&lt;/p>
&lt;p>Containers, and the 3 Musketeers concept can be applied any time you need to simplify a process or some instructions. You can consider it “self-documenting”. A good way to check if you’re giving the best DX is to look at what you need to put in your README to explain your process.&lt;/p>
&lt;p>&lt;strong>No Musketeers&lt;/strong>&lt;/p>
&lt;p>Just &lt;figure it out>…&lt;/p>
&lt;blockquote>
&lt;p>Install node version 4 but definitely not version 3, and I have no idea about version 5. I’ve you’re on Windows then I can’t help you at all. There are also a few dependencies that you’ll need but I can’t remember what they were. The following 12 page document is incomplete and you’re about to waste half a day that you’ll never get back.&lt;/p>
&lt;/blockquote>
&lt;p>&lt;strong>1 Musketeer — Docker&lt;/strong>&lt;/p>
&lt;p>Just run the following docker command:&lt;/p>
&lt;blockquote>
&lt;p>docker run --rm -v foo:bar -v foo:bar -e FOO=BAR container bash -c ’echo hello world’&lt;/p>
&lt;/blockquote>
&lt;p>&lt;strong>2 Musketeers — Docker &amp;amp; Docker Compose&lt;/strong>&lt;/p>
&lt;p>Just run the following compose command:&lt;/p>
&lt;blockquote>
&lt;p>docker-compose run --rm alpine echo ‘foo’&lt;/p>
&lt;/blockquote>
&lt;p>&lt;strong>3 Musketeers — Docker, Docker Compose &amp;amp; Make&lt;/strong>&lt;/p>
&lt;p>Just run the following make command:&lt;/p>
&lt;blockquote>
&lt;p>make echo&lt;/p>
&lt;/blockquote>
&lt;p>And it’s as simple as that. Developers typically implement steps like “make build test validate deploy” but you can be as creative as you like and write the steps that make sense for you!&lt;/p>
&lt;h3 id="supercharge-your-development">Supercharge your development&lt;/h3>
&lt;p>Using an agreed pattern like 3 Musketeers is a great way to standardize among your teams. As the number of teams you have in your organization grows so too will the benefits. Humans (and those robot automation scripts) will be able to consume your repos more easily and that’s a great thing.&lt;/p>
&lt;blockquote>
&lt;p>But why stop there?&lt;/p>
&lt;/blockquote>
&lt;p>&lt;strong>What if we could template what a good project looks like and deliver that to development teams in a self-documenting and self-updating fashion?&lt;/strong>&lt;/p>
&lt;p>The most basic implementation of this would be writing a “hello world” application and asking your development copy/paste the code when starting new projects.&lt;/p>
&lt;p>But there’s a tool called &lt;a href="https://yeoman.io/">https://yeoman.io/&lt;/a> and it provides scaffolding for modern web apps. It’s another simple yet impressive concept executed well. What it provides is a templating mechanism with a really slick user-input feature and enough glue in-between to great that amazing DX we’re all chasing.&lt;/p>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*AIrnL4EBoI-duVrvk6MwAQ.jpeg" alt="">&lt;/p>
&lt;p>With yeoman development teams can setup and maintain examples of good software delivery with teams benefiting from the learnings of others. You can create a generator for just about anything, so the only thing left is your imagination!&lt;/p>
&lt;p>&lt;img src="https://cdn-images-1.medium.com/max/800/1*Hn7NJOWEPOC43mPSg6nn8A.png" alt="">&lt;/p>
&lt;p>Yeoman has it’s own generator to help you create your first generator (how meta, right?). The only thing missing for me was a reliable docker container to do some development in. I created a repo with a yeoman development container to make life easier. Hopefully you find it useful and make some steps to improve your own DX!&lt;/p>
&lt;p>&lt;a href="https://github.com/drewkhoury/devyo" title="https://github.com/drewkhoury/devyo">&lt;strong>drewkhoury/devyo&lt;/strong>&lt;br>
_yeoman container - for local development of yeoman generators - drewkhoury/devyo_github.com&lt;/a>&lt;a href="https://github.com/drewkhoury/devyo">&lt;/a>&lt;/p>
&lt;h3 id="want-more">Want more?&lt;/h3>
&lt;p>Presentation (PDF): &lt;a href="https://drewkhoury.files.wordpress.com/2020/04/optimizing-for-dx-in-a-cloud-native-world.pdf" title="Optimizing for DX in a Cloud Native world">Optimizing for DX in a Cloud Native world&lt;/a>&lt;br>
Presentation (Video): &lt;a href="https://www.youtube.com/watch?v=ZYlbNnaoseI">https://www.youtube.com/watch?v=ZYlbNnaoseI&lt;/a>&lt;/p>
&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/optimizing-for-dx-the-developer-experience-f37fe168642d">Optimizing for DX — The Developer Experience&lt;/a>.&lt;/p>
&lt;/div></description></item></channel></rss>