<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rowan Powell on Medium]]></title>
        <description><![CDATA[Stories by Rowan Powell on Medium]]></description>
        <link>https://medium.com/@rpowell_61582?source=rss-4896aa565039------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DooyA3ue0kKR4sSscj2qWw.jpeg</url>
            <title>Stories by Rowan Powell on Medium</title>
            <link>https://medium.com/@rpowell_61582?source=rss-4896aa565039------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:21:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rpowell_61582/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[One bad test spoils the bunch]]></title>
            <link>https://engineering.dunelm.com/one-bad-test-spoils-the-bunch-5d9ece4b5b27?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d9ece4b5b27</guid>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[shift-left-testing]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Wed, 17 Jul 2024 14:23:39 GMT</pubDate>
            <atom:updated>2024-07-17T14:23:39.602Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="One yellow chair amongst many green chairs in a stadium" src="https://cdn-images-1.medium.com/max/1024/0*W_tdgTMRefchA_ec" /><figcaption>Photo by <a href="https://unsplash.com/@rgaleriacom?utm_source=medium&amp;utm_medium=referral">Ricardo Gomez Angel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Having a test suite can be incredibly helpful in software development, ensuring that future changes comply with our expected behaviour and that we don’t accidentally break part of our feature set with a seemingly innocuous change!</p><p>But just like how our software needs regular care and maintenance as it’s goals change, so does our test suite. Pruning tests that are no longer required as features get removed and updating test cases to accurately reflect the evolving software are a key part of this and thankfully tend to be a natural side effect of good code change proposal and review processes.</p><p>Code reviews don’t necessarily catch the more insidious problem that can occur within test suites: flakey tests. Much like how a flakey friend only turns up sometimes, a flakey test only accurately reports if the software passes the test <em>sometimes. </em>Not being able to trust if a test has give you the right answer is worse than useless and one bad test can quickly spoil the bunch.</p><p>If there’s a test you can’t trust, not only does the output get ignored (which defeats the point of having it in the first place) but it means if another test fails you start to doubt that one too. The result is often that the engineer trying to deploy their changes will re-run the test suite until they get the desired answer — as it’s much easier to assume the flakey test is a false-positive rather than their seemingly unrelated change has broken a feature.</p><p>As a result; your lead time skyrockets, your engineers become frustrated and your quality team loses confidence that the new releases are up to the desired standards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lkfb1zdGofbdBpBq" /><figcaption>Photo by <a href="https://unsplash.com/@thisisengineering?utm_source=medium&amp;utm_medium=referral">ThisisEngineering</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://www.epicweb.dev/be-smart-about-flaky-tests">Artem Zakharchenko</a> recommends you immediately set any flakey tests you find to be skipped and I’m inclined to agree with him. My gut reaction on reading his advice was “what if no one picks up the task to come back and fix it if I skip it!” but frankly, if there’s no enthusiasm to fix it then maybe the test was more trouble than it was worth in the first place.</p><p>Once skipped though, you’d be wise to set you or your team a task to actually analyse what the problem is with the test i.e. what’s causing it to give a false result intermittently.</p><p>In my experience most faulty tests are found near the top of the <a href="https://theqalead.com/topics/testing-pyramid/">testing pyramid</a> — end to end tests, UI tests and integration tests. It makes sense, they’re the tests that rely on the most software to be working correctly and test the complicated boundaries between services. As a result one of my first questions is “does this still need to be this high up the pyramid?”. If we can we answer the same questions about the software behaviour while moving it down the pyramid (Or outright removing it!) the resulting test suite is usually faster and more stable.</p><p>If we can’t justify moving it down the pyramid without losing test coverage or confidence it’s time to analyse it and work out why the results are inconsistent. There’s plenty of ways tests can get this way but some really common examples include;</p><ul><li>If your test is picking a ‘random’ user to run the test as you’re much better off using a known selection of users that actually cover all your edge cases</li><li>If you’re navigating a site, make sure you’re waiting for the UI elements to have finished loading or rendering their waiting states before trying to interact with them</li><li>If you’re calling other APIs, make sure they have sufficient timeouts to allow for slow services (where appropriate!)</li><li>If you need to use a product ID to run a test across multiple services, make sure you either set up that product specifically for your test or fetch a product that meets your test case as data can drift over time</li><li>If multiple tests rely on the same external data, make sure they’re not leaving it modified for the next test — even failures should clean up nicely after themselves</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IMe2rANNGdv647jP" /><figcaption>Photo by <a href="https://unsplash.com/@lunarts?utm_source=medium&amp;utm_medium=referral">Volodymyr Hryshchenko</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Finding which tests are flakey can be a bit tricky, especially if the false results are rare or require a specific combination of things to go wrong.</p><p>The easiest way to find the worst culprits tends to be simply asking the team which tests they know about being flakey and which suites they don’t feel confident about. If your team is quietly re-running test suites and pipelines when they fail, it’s important you encourage the team to handle flakey tests as they find them — following the steps I’ve outlined to skip and analyse the rotten test.</p><p>Making use of your DORA metrics can also help identify tests or pipelines that are flakey. If one segment of your lead time is unreasonably high it could very well indicate that a test suite is running multiple times to get a successful deployment.</p><p>In the same way it’s important to review our code and software to keep it useful and fit for purpose, we need to be doing the same to our test suites.</p><p>Tame excess test suites, prune flakey tests and keep the whole thing healthy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d9ece4b5b27" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/one-bad-test-spoils-the-bunch-5d9ece4b5b27">One bad test spoils the bunch</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Everything you should know about module federation 2]]></title>
            <link>https://engineering.dunelm.com/everything-you-should-know-about-module-federation-2-9a15d23049b2?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a15d23049b2</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[technology-news]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[module-federation]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Wed, 26 Jun 2024 08:41:38 GMT</pubDate>
            <atom:updated>2024-06-26T08:41:38.232Z</atom:updated>
            <content:encoded><![CDATA[<p>Last month module federation announced their <a href="https://module-federation.io/blog/announcement.html">version 2</a> and this week I got to attend an <a href="https://www.youtube.com/watch?v=ypNzsr08B6c">in depth seminar</a> by Zack Jackon at the MicroFrontEnds (MFEs) Conference 2024 on what exactly that means. So let’s break down the new advancements in the technology and how that’s going to shape your work with MFEs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wi8jSQQtKZS8LH1CPfZQ4A.png" /><figcaption>Typescript types are automatically brought in from remote modules</figcaption></figure><p>I’m a huge advocate for proper use of the <a href="https://medium.com/dunelm-tech/10-tips-for-your-ts-types-3805b2151d97">power of types</a> in code and one of my biggest pain points with microservices architecture and MFEs is the loss of typing certainty and while shared libraries can help avoid maintaining code in multiple places they still feel like an outdated approach sometimes. MF2 introduces <strong>remote type hints</strong> which dynamically pull in types from the remote modules and allow you to have the same type analysis experience you normally get with local modules. No additional plugins, just built in hot reloading of types. Making your workflow dramatically more streamlined — no more hunting around in files for the right type definition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*v6Tp_3Iwr1MzLNHM6pCaRQ.gif" /></figure><p>Understanding how code is imported from different modules can be a tricky thing to understand when joining an existing project but the new chrome dev tools plugin looks to be an absolute game changer. Easily visualise what’s being imported from each remote, see how the dependency graph builds out and see the shared modules at a glance. For onboarding new developers and understanding exactly how a complex network of micro front ends works together this will be such a huge quality of life feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kekM6dY8iBUXNtWkCadjzg.png" /><figcaption>Hot Module Reloading</figcaption></figure><p>Hot reload is one of the things that makes working with React a joy and makes the development iteration cycle super fast, but in the past that hasn’t quite translated to federated react modules. Now hot module reloading lets you work on projects transparently as if they weren’t even federated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTCW-XfjGQOlBab7nSKqdQ.png" /></figure><p>In his talk Zack also alludes to how you can do this against production, testing out local changes against a live environment without impacting any other developer! Module proxy lets you intercept the module that’s imported in much the same way you would intercept an HTTP request with Postman which has fascinating implications for testing out the fix for a bug in situ.</p><p>Be sure to check out all the latest changes on the <a href="https://module-federation.io/blog/announcement.html">module federation website</a> and try the new features out for yourself!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a15d23049b2" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/everything-you-should-know-about-module-federation-2-9a15d23049b2">Everything you should know about module federation 2</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to transition into a tech career]]></title>
            <link>https://engineering.dunelm.com/how-to-transition-into-a-tech-career-ffefd1f8215e?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffefd1f8215e</guid>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[career-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Wed, 19 Jun 2024 08:44:34 GMT</pubDate>
            <atom:updated>2024-06-19T08:44:34.781Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sUFWk_sqwrMu1BWA" /><figcaption>Photo by <a href="https://unsplash.com/@mapbox?utm_source=medium&amp;utm_medium=referral">Mapbox</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Moving your career into the tech industry can be one of the most exciting and simultaneously daunting journeys — endless doors are open to you if you can figure out how to find them.</p><p>The job postings and tutorials are frankly <em>drowning</em> in jargon, acronyms and the latest buzzwords. Picking which area you want to go into or what technology to learn feels like running full tilt through a forest with your eyes shut, you just have no idea what’s ahead of you for every given choice. By breaking down the journey we can make all of this into a simple set of steps to get you into your dream job in your dream industry — whether that’s a complete career shift or moving to an adjacent department within your current company.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XcJCYvYWaLY44FoX" /><figcaption>Photo by <a href="https://unsplash.com/@gcalebjones?utm_source=medium&amp;utm_medium=referral">Caleb Jones</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The first thing I recommend you do is get really honest with yourself about why you want to make the move. If you’re looking to make more money the tools and industries to pursue might be different than if you feel like you’ve capped out your current career track within your company, if you’re exhilarated by AI or game development that again will change which resources are the best use of your time. If you’re not sure yet and you just want to get your feet wet to find out if it suits you, that’s fine too!</p><blockquote>A friend of mine was a car mechanic, worked on lots of different cars over the years and watched them become more and more electronically controlled. He found tinkering with the electronic diagnostic and tuning tools more interesting. Now works in the IT QA department for a large car manufacturer.</blockquote><p>Do your research around the type of job you want to end up in and build up a short list of the skills and tools that appears frequently in the job description requirements.</p><ul><li>Technical management and leadership might require an understanding of Agile methodologies and software development lifecycles</li><li>QA and SDET roles might ask you to understand the types of bugs that can happen in software, automation frameworks like Jest or Playwright, or the <a href="https://theqalead.com/topics/testing-pyramid/">testing pyramid</a></li><li>Engineering roles will be looking for you to show your programming ability and understanding of the language the particular company uses</li><li>Specialist roles like cyber security will be interested to know if you’ve tried labs from security training websites <a href="https://medium.com/dunelm-tech/mission-impossible-qa-81fab6c6d43a">like the ones listed in my other article</a></li></ul><p>You won’t figure it all out overnight, but there’s vast communities for learning these technologies and getting yourself connected to other people who are on the same journey!</p><p>Mentorship and guidance can be huge for filling in those gaps in your knowledge, getting connected and having someone help push you along to achieve the things you dream of but can’t quite do alone. Depending on what kind of transition you’re intending to make, you’ll want to go about finding a mentor and bootcamps a bit differently.</p><blockquote>For me, I utilised the free code first girls courses as it allowed me to ‘try before I buy’ and the biggest advice I’d give about those 6 week courses is: don’t worry if you can’t keep up with everyone on the call. There will be others there who are also struggling. Ask the questions. No question is a dumb question.</blockquote><ul><li>Transitioning within a company can often be the easiest way to go about getting into tech, engineers or heads of department already know exactly what they’re looking for and helping you out is to the mutual benefit of the company — they might not always have the time or resources to help you out though</li><li>A close friend of mine has had great success contacting people on LinkedIn that already work in the role they want to get to and asking for a bit of their time, getting mentorship and insight right from the horse’s mouth</li><li>Large companies often have initiatives such as graduate schemes, bootcamps or working groups aimed at upskilling people to help tackle industry accessibility such as the <a href="https://aws-experience.com/emea/north/e/81f63/aws-inspiration-day">AWS events</a> aimed at a huge spectrum of skillsets</li><li>Groups like <a href="https://shecancode.io/">SheCanCode</a> and Pixelles work with companies like Dunelm to create opportunities to network with people in the industry and training on key skills like AWS!</li><li>Getting into the games industry in particular has the incredible <a href="https://www.limitbreak.co.uk/">LimitBreak</a> program where you can match up with me or another industry veteran to get tailored mentorship</li></ul><p>Your CV and portfolio can make or break your job applications, that’s no secret, but how do you even go about writing up a portfolio when it’s your first job in the industry?</p><blockquote>I found there were lots of transferable soft skills e.g. problem solving, logical thinking, adaptiveness etc. I had plenty of stumbles through the journey but ultimately if you are interested in something you will find a way to pick things up and have that willingness to learn</blockquote><p>When I’m reviewing portfolios the first thing I look for is a finished project, it doesn’t have to be complex at all but at least something taken from conception to completion. It shows dedication, ability and experience — but it also makes it really easy to gauge where you’re at and how you’re thinking about the problems in front of you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bZeCuR15V1iFLh6Z" /><figcaption>Photo by <a href="https://unsplash.com/@halacious?utm_source=medium&amp;utm_medium=referral">Hal Gatewood</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>By no means does this need to be an advanced project about <a href="https://engineering.dunelm.com/the-mirror-and-the-crystal-ball-harnessing-ais-potential-in-a-changing-world-e518107a302b">AI or LLMs</a> or anything like that, if anything being overly ambitious here will make it harder to separate you from the tools you used. Something simple but polished and complete will go a long way!</p><p>Try not to let yourself get stuck in ‘tutorial hell’ as one of my colleagues puts it — grinding away through tutorials will only get you so far, try out your skills outside of the structured tutorial and start trying to get your feet wet! This can be an anxiety-inducing phase of the transition for some people, but waiting for the ‘perfect time’ will mean you miss out on opportunities you didn’t realise you were already qualified for!</p><p>From there, do your best to keep your CV short and to the point. Highlight only your very best work and try to keep it down to just a page (I personally stick to the axiom that the quality of your portfolio is the lowest quality of the works in it).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_d_f5q5ad9_MA208" /><figcaption>Photo by <a href="https://unsplash.com/@uns__nstudio?utm_source=medium&amp;utm_medium=referral">Unseen Studio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When applying to jobs recruiters have their pros and cons but when you’re making an initial transition into an industry they can help secure you the vital feedback you need to be successful — It can be difficult if you don’t know what you’re doing “wrong”, particularly if you don’t even make it to the interview stage. You can also consider using job sites like HackaJob where the companies approach potential candidates unlike most job boards.</p><p>The tech industry is a bit unique in that sites like LinkedIn are huge for networking and job hunting — you’ll be surprised by the power of building up those connections and the ability to discover events and opportunities!</p><p>But the best advice I can give is to get moving. Don’t wait for the perfect time or until you feel like you’ve mastered everything — get stuck in and get started! The best time to plant the seeds of success was 10 years ago, the second best time is today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffefd1f8215e" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/how-to-transition-into-a-tech-career-ffefd1f8215e">How to transition into a tech career</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Tips for your TS Types]]></title>
            <link>https://engineering.dunelm.com/10-tips-for-your-ts-types-3805b2151d97?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/3805b2151d97</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Thu, 13 Jun 2024 07:42:48 GMT</pubDate>
            <atom:updated>2024-06-13T07:42:48.643Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I’m Rowan, a tech lead at Dunelm, writing stories about the intersection of Engineering, Automation and Psychology.</em></p><p>The major advantage of Typescript over Javascript is, of course, it’s typing. There’s some pretty powerful stuff available though, so for those of you who stick to the basics (and those who give up and put any so it’ll get on and compile), consider using some of these examples!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tekNHD6uXfqwkHKN7tS6Pg.jpeg" /></figure><p>Good use of typing makes it easy for other engineers to write code in your systems — using the right kinds of values and making the correct kinds of assumptions about what properties in your objects are populated!</p><p><strong>Optional</strong> lets you add fields that aren’t required, or might not be populated. This is really useful for creating flexible types, or types that implicitly warn the engineer to check if the field is actually populated.</p><pre>type ServerResponse = {<br>  data?: ServerData<br>  errorMessage? string<br>}<br>if (response.data != null) { /** do stuff */ }<br>const responseDataCode = response.data!.httpCode</pre><p><strong>Extends</strong> allows you to reuse types that already exist, giving them extra fields without needing to re-write the base type. Particularly useful if you think the base type will get changed later, you want a function to accept both the base type and your new varieties of type.</p><pre>type PurchaseOrder = {<br>  orderID: string<br>}<br>type DeliveryPurchaseOrder extends PurchaseOrder = {<br>  deliveryDate: Date<br>  deliveryAddress: string<br>}<br>type CollectionPurchaseOrder extends PurchaseOrder = {<br>  collectionStore: Store<br>  collectionCode: string<br>}</pre><p><strong>Limited Strings</strong> lets you have a simple string field type, but restrict what strings can be used which in some cases is a nicer version of enums.</p><pre>type HandlingUnit = {<br>  supplier: &quot;DHL&quot; | &quot;HDN&quot;<br>}</pre><p><strong>Maps</strong> are useful when you want a specific structure, but with any number of arbitrary keys</p><pre>type Stats = { [metric:string]:number }<br>const statsOutput: Stats = {}<br>statsOutput[&quot;MetricOne&quot;] = 2<br>statsOutput[&quot;MetricTwo&quot;] = 10</pre><p><strong>Partial</strong> and <strong>Omit</strong> allow you to effectively customise existing types, while staying consistent with them should they be modified later.</p><pre>type User = { token: string, name: string, address: string }<br>type UserWithoutToken = Omit&lt;User, &quot;token&quot;&gt;<br>/** Produces type<br>* { name: string, address: string }<br>*/<br>type UserWithOptionalFields = Partial&lt;User&gt;<br>/** Produces type<br>* { token?: string, name?: string, address?: string }<br>*/</pre><p><strong>Type Predicates</strong> allow you to inform the type checker which type a value is, without trying to work around the type system with patterns like as any as MyType</p><pre>function isCollectionOrder(order: PurchaseOrder): order is CollectionPurchaseOrder {<br>  return (order as CollectionPurchaseOrder).collectionCode !== undefined;<br>}<br>if(isCollectionOrder(orderToProcess)) {<br>  textCollectionCode(user, orderToProcess.collectionCode)<br>}</pre><p><strong>Generic Types</strong> enable you to create <em>really</em> flexible types, when you have a common pattern and don’t want to restrict what type is used as the target of that pattern, for example if the type has a list member, but you don’t want to write out every possible version of what that list type might be</p><pre>type Manager&lt;U extends User&gt; = {<br>  managementUser: U<br>  directReports: U[]<br>}</pre><p><strong>Readonly</strong> lets you to lock down a type and avoid it being mutated, particularly useful if the value in question that is a copy of a state or config which mutating won’t have the desired effect</p><pre>type ReadonlyConfig = Readonly&lt;Config&gt;<br>const myConfig: ReadonlyConfig<br>config.serverRAM = 1028 // can&#39;t be done</pre><p><strong>Inline array typing </strong>can be useful sometimes when defining a larger type and we want to define a member as an array of a certain structure, without defining a separate type for it. Though often it’s worth splitting it into it’s own type, just for maintainability.</p><pre>type CheckoutPreferences = {<br>  previousCharityDonation: number<br>  preferredPaymentMethod: PaymentMethods.VISA<br>  deliveryAddresses: {<br>    buildingNumber: number<br>    postcode: string<br>  }[]<br>} </pre><p><strong>Unknown </strong>typing is a niche option. While I generally strongly discourage the use of the any type, which essentially side steps the typing system all together, the unknown type can be useful to avoid making assumptions and accesses on an object without a well defined type.</p><p>So next time you find yourself trying to maintain types across multiple files, or reaching for any — try out some of these and see if you can solve your problem a more efficient way!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3805b2151d97" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/10-tips-for-your-ts-types-3805b2151d97">10 Tips for your TS Types</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is your SEO as good as mine?]]></title>
            <link>https://engineering.dunelm.com/is-your-seo-as-good-as-mine-ba2286fae319?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba2286fae319</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[website-design]]></category>
            <category><![CDATA[seo]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Wed, 05 Jun 2024 20:11:26 GMT</pubDate>
            <atom:updated>2024-06-06T08:59:38.412Z</atom:updated>
            <content:encoded><![CDATA[<p>For a website, organic foot traffic is king. While marketing efforts earn their returns, nothing can ever beat search engines recommending us as the first place to check for what the customer is after essentially for free!</p><p>To this end, every developer behind every website is fighting tooth and nail to claim those top spots on the front page of the search results for searches relevant to them. Every single spot you can climb up yields a <a href="https://backlinko.com/google-ctr-stats">better click through rate</a> (CTR is the number of users that click the link after seeing it). Clicks equal money and the drop off is <em>harsh</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n0Go_qc6VOh1fVg0wZ0Oyw.png" /><figcaption>Graph showing a steep decline in clicks as page rank decreases from <a href="https://backlinko.com/google-ctr-stats">https://backlinko.com/google-ctr-stats</a></figcaption></figure><p>To optimise for search engines and generate the maximum organic page views for the company you want the search result to be exactly what the user was looking for, so the search engine needs to be able to easily identify what’s on your page and communicate that back to the user.</p><h3>Semantic HTML</h3><p>I spoke in depth before about how Semantic HTML can help improve SEO by making your site easier to understand but it bears repeating! The foundation of everything else you’re doing for your site starts with using the right HTML for the job. If you’re finding yourself kitbashing everything out of divs and css it’s time to have a scroll through the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element">staggering number of supported HTML elements</a> out there.</p><h3>Server Side Rendering</h3><p>Server Side Rendering can be a key tool in making sure all the right content is rendered for the crawler up front, though admittedly not one easily switched to once you’ve committed to client side rendering. If your pricing, delivery time or stock is dynamic based on who and where your user is, the last thing you want is for google to be reporting the wrong thing to customers on the results page. Having everything calculated and ready to render before the crawler gets it’s hands on the HTML helps make sure your search result entry is exactly how you want it.</p><h3>Canonical Pages</h3><p>If your website has multiple urls for what are essentially the same product, such an alternate colour, web crawlers may well consolidate them and only show one as the “Canonical” page for the product. You may also know of cases that won’t be obvious to a web crawler (Such as legal T&amp;Cs shared across multiple pages or domains) and benefit from declaring one of those the Canonical result for search engines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekUawxDYB2ZcDcNyePSgFw.png" /><figcaption>The same product might have different urls to differentiate colours or other properties</figcaption></figure><p>You can use tags to inform web crawlers what you intend to have as the canonical page, by adding a &lt;link/&gt; element into the &lt;head/&gt; element on your near-identical pages, all pointing to the canonical page.</p><pre>&lt;link rel=&quot;canonical&quot; href=&quot;https://example.com/preferred-url-here/&quot; /&gt;</pre><h3>Robots.txt &amp; User Agent Management</h3><p>In it’s most basic form, the robots.txt file can help web crawlers search your site more efficiently by disallowing them from indexing the content of certain pages (Such as a 404 page that wouldn’t make for a useful search result for you <em>or</em> the search engine) or avoiding the crawlers trying to load large media files that wouldn’t be useful in understanding the site (Such as the audio file for a podcast that wouldn’t change much about how the search engine shows the search result to the user).</p><p>More advanced usage can help direct the different types of crawlers that exist prioritise the web pages that best suit their niche. The googlebot-news webcrawler for example will likely get you a better page ranking and CTR for announcements and blog articles than product pages or FAQs. Conversely, storebot-google will harvest <a href="https://support.google.com/merchants/answer/13294660?hl=en-GB">all of the product related data</a> and use that to optimise what it shows to a user, so while a product discovery page might have great SEO on it’s own, the product details page will likely draw attention from this specific crawler and you can optimise accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P6bSfLBQVbJjsISypyM0aQ.png" /><figcaption>Optimising for news or shopping web crawlers can improve results on those sub pages</figcaption></figure><h3>Schema Markup / Microdata</h3><p>To really optimise for shopping web crawlers, you’ll want to make sure you’re serving up all of the meta data about a product that you can. It’s no secret that customers are going to be more interested in your search result if they can see everything they need to make a decision without clicking through to the site.</p><p>Schema markup (also known as microdata) doesn’t necessarily bring our page higher up the results, but it does help google enrich the results and make our site more appealing and boosting the CTR — which was one of the key outcomes we were going after from climbing the rankings in the first place. The preferred way of doing this is via JSON-LD markup:</p><pre>&lt;script type=&quot;application/ld+json&quot;&gt;<br>{<br>&quot;@context&quot;: &quot;http://schema.org&quot;,<br>&quot;@type&quot;: &quot;Article&quot;,<br>&quot;headline&quot;: &quot;My First Article&quot;,<br>&quot;author&quot;: {<br>&quot;@type&quot;: &quot;Person&quot;,<br>&quot;name&quot;: &quot;John Doe&quot;<br>},<br>&quot;datePublished&quot;: &quot;2023-11-11&quot;,<br>&quot;image&quot;: &quot;image.jpg&quot;<br>}<br>&lt;/script&gt;</pre><p>You can also get the same result with pure HTML, but it’s a more verbose approach and not as popular. You can follow <a href="https://www.semrush.com/blog/schema-markup/#1--go-to-google%E2%80%99s">this guide</a> on how to check the state of your markup as google understands it and how to go about fleshing out that information for web crawlers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SE8Pkx3d2rN0S9L37UcB2A.png" /><figcaption>Ratings, Directions, Opening Times and other SERP features make Dunelm more appealing</figcaption></figure><p>Google supports <a href="https://developers.google.com/search/docs/appearance/structured-data/search-gallery">a dizzying array</a> of SERP features from this schema data, including maps, frequently asked questions, opening times, reviews and more. The shop web crawler also tries to go through your entire checkout flow; from the product details page, to the basket page and into the checkout page! It catalogues all relevant data from this process and uses that to inform it’s SERP so make sure it can find <a href="https://support.google.com/merchants/answer/13294660?hl=en-GB#What_information_does_Google_extract">everything it’s looking for</a>, to provide the best experience for customers searching for your products.</p><h3>Page Performance</h3><p>Page performance is not only vital for user experience and reducing the bounce rate once users actually enter your site, but serves as a tie breaker and when in doubt most search engines will prioritise websites that have great performance and will be a better experience for the users they are serving. I’ve written up a nice long post about <a href="https://medium.com/dunelm-tech/fast-as-light-the-dunelm-website-baadd77117ac">what to be on the lookout for</a>.</p><h3>Conclusion</h3><p>The best way to optimise how you perform on search engines is to make it really easy for search engines to identify what’s on your site with semantic HTML and schema markup, followed up by great page performance and user accessibility — a one two punch that’ll make your products a knockout.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba2286fae319" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/is-your-seo-as-good-as-mine-ba2286fae319">Is your SEO as good as mine?</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimising SEO & User Experience by using Web Accessibility tools]]></title>
            <link>https://engineering.dunelm.com/optimising-seo-user-experience-by-using-web-accessibility-tools-c6ef78ed4b96?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6ef78ed4b96</guid>
            <category><![CDATA[diversity-and-inclusion]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[accessibility]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Fri, 31 May 2024 07:41:50 GMT</pubDate>
            <atom:updated>2024-05-31T07:41:50.797Z</atom:updated>
            <content:encoded><![CDATA[<p>There are few things as frustrating as realising something was designed for everyone but you. If you’ve ever stared forlornly at the cookies on the top shelf at the shop and debated scaling the shelves before you get caught or tried to push open a door with your hip without dropping your entire Starbucks order, you’ll know that sometimes the smallest bits of inconsiderate design can ruin your day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*9QMFJ5GNQynf2dsv6Mqeng.png" /><figcaption>Google Lighthouse score of 94% for dunelm.com</figcaption></figure><p>The web and Dunelm.com in particular are no different, they work best when everyone can use it with as little extra effort as possible. To that end, we push for accessibility and ease of use across the whole technology department and make it a core part of our quality assurance process. Designing for everyone has the added benefit of designing for search engines — clearly communicating what everything on the website does helps push our pages up the search rankings and win out on tie breakers!</p><p>One of the earliest accessibility design issues people learn to recognise is colour contrasting. We’ve all had someone in your meeting brings up a set of slides they got a <em>little too enthusiastic with</em> and you’re squinting at the screen trying to work out what on earth it says. Black &amp; white is the standard for a very good reason, but it does limit designs a bit.</p><p>Warning and error dialogues, marketing imagery and other facets of our website push us to use a range of colours to improve user engagement and experience but we should be careful to keep the content as legible as possible by aiming for a 3:1 contrast ratio. Designing for our visually impaired users yields benefits to everyone using the site!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LX3KkJpSHHc5AQiW_NIJlw.png" /><figcaption>White and black are almost always effective go-to colours</figcaption></figure><p>The colours of the text being used are just the beginning though, the font is also critically important! While the font being used communicates a lot to the reader about how to feel about the content they’re reading (is it serious? lighthearted? is the product <em>elegant</em> or <strong>robust</strong>?), it also has a substantial effect on how easy it is to read.</p><p><a href="https://opendyslexic.org/">Open Dyslexic</a> is one of the fonts available that try to make it easier to differentiate the different characters and while it’s available as a <a href="https://chromewebstore.google.com/detail/opendyslexic-for-chrome/cdnapgfjopgaggbmfgbiinmmbdcglnam?hl=en&amp;pli=1">chrome plugin</a> that does mean it relies on being known about and opted into, rather than accessible by default. Originally I was also very excited about Bionic Reading, but research so far <a href="https://blog.readwise.io/bionic-reading-results/">seems unimpressed</a> with its results.</p><p>While we’re talking text, make sure all of your images have alt text descriptions that are as useful as possible! Not <em>only</em> is it helpful for visually impaired users, but it improves SEO and provides a backstop if the image content doesn’t load correctly.</p><p>Focusing elements is something the majority of internet users probably do by clicking on elements (buttons, inputs etc), but when you don’t have (or can’t use) the cursor then good autofocus and tab focusing are <em>essential</em>. Bad tab indexing can lead to users not being able to reach important parts of the page or even getting their focus trapped in a loop and not being able to get back out. You can help guide how your tab journey flows by making use of the ‘tab index’ property on your HTML elements, though keep in mind Safari doesn’t support this by default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKDdFZnOOZciq3_AIUTKmA.jpeg" /></figure><p>Usage of the web is simply smoother with good focus design, autofocusing into username input fields, refocusing on form fields that didn’t pass validation and so on. Part of our test process is to navigate through new web pages we design using just the keyboard and discuss not just <em>can</em> you get around, but does the route tab focusing take you make the most sense to the end user.</p><p>Talking of buttons and input fields, don’t reinvent the wheel! It can be tempting sometimes to add an onClick listener to a nicely styled div or link instead of using a &lt;button/&gt; but this takes away useful context about the content of your page from SEO page crawlers and screen readers.</p><p>Landmark HTML elements also help aid the overall understanding and navigation of your website, even if they go unseen compared to good colour contrast and responsive web design. Header, Footer, Nav, Section, Aside and <a href="https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/HTML5.html">so on</a> improve the SEO and page reader accessibility by giving them more context about the structure of your website, enabling them to find the content they want faster. There are <a href="https://accessibilityinsights.io/">plenty of plugins</a> to help you assess the state of your website’s HTML landmarks more easily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O-2Lkm7tjEz9Qi46-ivfGg.png" /><figcaption>The order of tab accessible elements on the landing page of dunelm.com</figcaption></figure><p>The ability to see and review how tab navigation works on your pages makes testing easier and regression tests more practical. Automated collection of meta data such as if an image is decorative versus meaningful helps you review your tagging at speed.</p><p>It will also quickly make it obvious to you if your pages are in need of <a href="https://www.w3.org/WAI/WCAG21/Understanding/bypass-blocks.html">bypass blocks</a> — the ability to skip past content that’s heavily repeated across your website such as navigation or header elements. Repetitive elements are annoying enough when tabbing around, but with a screen reader describing it all it’s frankly tiring and your customers will leave in a hurry!</p><p>ARIA properties can also be a huge part of accessibility and can also make your html more maintainable in turn. A great example is a close button on a popover dialog — they are often denoted by an icon or image of an ‘X’ which has great <a href="https://design4users.com/ux-design-types-of-affordances-in-user-interfaces/">affordance</a> for most users, but communicates very little to those using screen readers or braille screens.</p><p>We <em>could</em> replace the icon with the text ‘Close’ <em>or</em> we can utilise aria labels to give context and descriptions to elements that otherwise wouldn’t have them. By default, a button’s accessible name is the content between the opening and closing <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button">&lt;button&gt;</a>tags, an image&#39;s accessible name is the content of its <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#alt">alt</a> attribute, and a form input&#39;s accessible name is the content of the associated <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label">&lt;label&gt;</a> element. If these don’t properly describe what the content is, or what it does, the aria-label or aria-describedby can help inform the accessibility tools on how to describe the elements.</p><p>Similarly ARIA tags aria-busy can help us communicate the state of parts of the UI, so that if they are undergoing change (such as when loading) we don’t overwhelm the user with updates and instead keep the communication to what’s important to them about our website. You can find a full list of ARIA tags <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes">here</a>.</p><p>Making accessibility testing more accessible helps everyone create a better web experience for … everyone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6ef78ed4b96" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/optimising-seo-user-experience-by-using-web-accessibility-tools-c6ef78ed4b96">Optimising SEO &amp; User Experience by using Web Accessibility tools</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speculative Execution]]></title>
            <link>https://engineering.dunelm.com/speculative-execution-0e0f56e061b9?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e0f56e061b9</guid>
            <category><![CDATA[planning]]></category>
            <category><![CDATA[ways-of-working]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Wed, 01 May 2024 11:35:39 GMT</pubDate>
            <atom:updated>2024-05-01T11:35:39.294Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I’m Rowan, a tech lead at Dunelm, writing stories about the intersection of Engineering, Automation and Psychology.</em></p><p>Part of my role as a Tech Lead is to help decide what can or should be the team’s next focus based on the dependencies we have on other teams for features as well as our own capacity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNT2HyFVTrDhWOgdy_R13w.jpeg" /></figure><p>If you’ve ever been in a work planning session you’ve inevitably heard “Well we need team X for that, but they can’t help us until next month” or “Jane Doe will let us know if we need solution A or B on monday” and people conclude they need to awkwardly sit on their hands for a bit. This feels pretty bad for everyone involved, the engineers want to get coding and the delivery lead looks on mournfully at their project roadmap as the deadlines get pushed back and lower priority work is picked up instead.</p><p>I was watching a video about the <a href="https://www.youtube.com/watch?v=YRohz9VO1YY">meltdown and spectre</a> exploits and it reminded me of the hardware level optimisation used to avoid bottlenecks — a technique called speculative execution. Speculative execution works by reading ahead in the upcoming code and performing the outcome tasks based on an assumption about a decision.</p><p>In the example below if we usually pass the index check and can safely fetch the data from the array, it’s not unreasonable to fetch the output and have it ready while we wait on the potentially more time consuming decision to be officially made.</p><pre>function getListItem(index: int) {<br>  if (index &lt; list.length){ return list[index] }<br>  else { throw new Error(&quot;Out of bounds exception&quot;) }<br>}</pre><p>Of course, if we’re wrong this time we end up doing work that’s not needed and have to throw it away for no benefit. On average though, predictions we’re confident about can speed up our CPU and execute work faster with less idle downtime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C_fgbB78OB5Ot8ikTJ489w.jpeg" /></figure><p>Engineers and managers reading this, you probably use this technique without even realising it. Whether it gets called “Future Proofing”, “Working to specification”, “Feature flagged” or even “MVP” it’s not uncommon to do work that isn’t technically needed just yet, or avoid adding the extra bells and whistles if you think you know what the answer is going to be.</p><p>This technique lets teams spend more time on high priority tasks and features can ship as soon as official decisions (be they financial, legal or based on user feedback) get made which can be key for hitting key dates like big sales days. Naturally though, this approach should be taken with a little bit of caution — nobody likes doing work only to find it never ships. If work gets discarded on a regular basis lower priority work that could have been done gets missed and the team will get demotivated as they feel their work doesn’t matter.</p><p>It’s important to clarify here, not all work that doesn’t ship is a waste! Experiments that answer questions like “Is this a better/faster approach” or “How do users feel about us making this change” might tell us to keep the status quo and not ship new code, which is a good thing! Innovations and experiments with new technology can also yield advancements in personal or team capability that will impact later shipments.</p><p>So keep in mind the answer to “will we be asked to do this task?” actually has three answers; yes, no and we’re not certain. Being uncertain is fine! When certainty strikes though, consider doing (or not doing) work speculatively!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e0f56e061b9" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/speculative-execution-0e0f56e061b9">Speculative Execution</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Those aren’t mine officer!]]></title>
            <link>https://engineering.dunelm.com/those-arent-mine-officer-06ab5e2d0b2a?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/06ab5e2d0b2a</guid>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Wed, 24 Apr 2024 08:35:01 GMT</pubDate>
            <atom:updated>2024-04-24T08:35:01.076Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UiEJpln3h9x6KwD7SIpc7Q.jpeg" /></figure><p>Trust is a huge part of the internet and the way we work. Huge companies and organisations like Microsoft and Facebook have built up trust over the years by consistently shipping products that have been proven safe to use. What if that trust could be stolen?</p><p>GitHub allows you to host files in repositories, normally the source code for a project but also output files like executables. Given these are uploaded by privileged users and contributors it’s generally assumed you can trust the contents. However GitHub also allows you to upload images or files on comments and tickets to help developers understand the problem.</p><p>This is where the problem gets interesting. When you upload files for a comment GitHub generates a URL for it, which understandably includes the name of the repository it was uploaded for. If malicious files were uploaded this way it might be a problem, one which could be fixed with comment approval and moderation (or just a different URL structure). It gets worse though, because you don’t need to actually post the comment. Just attaching it to a draft comment uploads the file at the URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bBv0kmGXguiLsOMbbue9NA.jpeg" /></figure><p><a href="https://www.bleepingcomputer.com/news/security/github-comments-abused-to-push-malware-via-microsoft-repo-urls/">BleepingComputer</a> wrote up an article on Saturday (20th of april 2024) about McAfee’s report for a new malware distributed through what seemed to be a legitimate Microsoft file, part of the widely used STL (C++ Standard Library) project. By adding the file to a comment on the repo, the attackers produced a URL that appeared to be a regular file</p><pre>https://github[.]com/microsoft/STL/files/14432565/Cheater.Pro.1.6.0.zip</pre><p>which few people would question — the host is legitimate, the organisation is Microsoft and the library is a widely used and trusted one.</p><p>As the exploit gains media attention and impacts customers as big as Microsoft, I’m sure GitHub will quickly patch this out one way or another, but it’s still pretty daunting to know it’s possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06ab5e2d0b2a" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/those-arent-mine-officer-06ab5e2d0b2a">Those aren’t mine officer!</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘XZ Utils’ Linux Backdoor Exploit Discovered]]></title>
            <link>https://engineering.dunelm.com/xz-utils-linux-backdoor-exploit-discovered-1175c7d3a829?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/1175c7d3a829</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[technology-news]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Wed, 17 Apr 2024 07:28:47 GMT</pubDate>
            <atom:updated>2024-04-17T07:28:47.970Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I’m Rowan, a tech lead at Dunelm, writing stories about the intersection of Engineering, Automation and Psychology.</em></p><p>Unlike my last <a href="https://medium.com/dunelm-tech/hacker-highlight-david-creeks-93a76da44b11">hacker highlights article</a> this one is legit — unlike the code that was identified in XZ Utils over the weekend thanks primarily to Andres Freund, a developer at Microsoft. It does use a stunningly similar attack pattern though so let’s break it down!</p><p>I’m going to run through the exploit assuming you have just a little understanding of how software and operating systems are compiled, if you have a bit more expertise feel free to <a href="https://gist.github.com/thesamesam/223949d5a074ebc3dce9ee78baad9e27">check out the detailed breakdown here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*10w1Rl085BACdXf0xvUDqA.jpeg" /></figure><h3>What is XZ Utils?</h3><p>XZ Utils is a compression library used in Unix operating systems, which is present in virtually all distributions of the software. Unix is the basis behind many open source operating systems an alternative to Windows and IOS, such as Linux and Ubuntu.</p><p>XZ Utils provides critical functions for compressing and decompressing data which in the age of the internet is a fundamentally vital service. XZ Utils also supports the legacy .lzma format, making this code a must have in many cases.</p><h3>Attack Path</h3><p>Eerily similar to the approach taken in my fake article, a small code library and even test files were targeted in the hopes that they would be taken along for the ride and the harmful code would end up included in a widely distributed piece of software — allowing them access to a huge attack surface.</p><p>The malicious actors worked to add their exploit to a very low level library called XZ Utils. Due to it supporting the .lzma format, this gets included with a core operating system software library liblzma.</p><p>lilblzma is then used in the bootup process Systemd for many Linux distributions such as Debian. Once these are loaded together, a chain of exploits lets the imported code modify how the sshd process of OpenSSH behaves — a key part of how computers securely talk to each other over the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*RNTZNhz5kNlQVMZKxyU57w.jpeg" /></figure><p>SSH works like many security protocols by having a known public ‘key’ to encrypt (lock) the message which can then only be decrypted (unlocked) again by using the private key.</p><p>If a public key is not signed with your own private key (i.e. if you’ve not vouched for the trustworthiness of the key yourself) it can be verified by using a technique called “key fingerprinting”. This involves obtaining a unique identifier of the public key, called a “fingerprint”, and comparing it to a known, verified fingerprint to determine if it should be trusted.</p><p>When verifying an SSH public key, if the public key matches a certain fingerprint function, the key contents are decrypted using a pre-shared key before the public key is actually verified. The decrypted contents are then passed <em>directly</em> to operating system. The goal here was to modify the SSH RSA key verification code, to create a route for followup attacks to gain access to the machine running the affected operating system.</p><p>IFUNC is a tool within the glibc library that’s usually used legitimately to <a href="https://softwareengineering.stackexchange.com/questions/401110/difference-between-direct-and-indirect-function-calls">indirectly call functions</a> as part of the runtime behaviour in the operating system, but in this case it’s used to hook into part of the SSH code so that a special payload encoded into fake XZ Utils test files runs as actual code, allowing the attacker’s key to effectively act as a skeleton key for any system running the corrupt code.</p><h3>Getting the code in there</h3><blockquote><strong>“This might be the best executed supply chain attack we’ve seen described in the open, and it’s a nightmare scenario: malicious, competent, authorised upstream in a widely used library,” — Filippo Valsorda</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XjVrNv7NjZuEdXdAwtZ0lA.jpeg" /></figure><p>Social engineering is almost always the straw that breaks the security camel’s back and it certainly contributed here.</p><p>In 2022 JiaT75 submitted a patch via the XZ Utils mailing list for the library and as if primed to turn the screws, a user called Jigar Kumar (Who hadn’t been involved before) leapt in to argue that that Lasse Collin, who had been the longtime maintainer of XZ Utils, hadn’t been updating the software often or fast enough.</p><p>Kumar, with the support of Dennis Ens and several other people (who had also never been contributing), pushed Collin to bring on an additional developer to maintain the project — JiaT75.</p><p>JiaT75, also known as Jia Tan, began to get steadily more involved with the project and making contributions. This also meant using their involvement to quietly remove safeguards around the software now they were a trusted user.</p><p>Jia changed the contact information on oss-fuzz away from Collin’s to his own, so that when exploits were detected Jia would be the one notified — innocuous enough if he was trying to be the main contributor and defender of the library. Jia also requested that oss-fuzz disable the aforementioned IFUNC function during testing, which meant that the change they planned to add wouldn’t flag up in the system.</p><p>In Febuary 2024 Jia put together the final pieces to bring together this exploit and had trusted members of the community push for Ubuntu, Debian and Red Hat Linux to use the latest updates in their distributions of the operating systems.</p><p>There’s more about Jia and the timeline <a href="https://boehs.org/node/everything-i-know-about-the-xz-backdoor">here</a>.</p><h3>Discovery</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6Trdd1zITgmASTMNWAUeA.jpeg" /></figure><p>A developer at Microsoft, Andres Freund, noticed his SSH logins were consuming too many CPU cycles and were generating errors with <a href="https://arstechnica.com/security/2024/04/what-we-know-about-the-xz-utils-backdoor-that-almost-infected-the-world/link">valgrind</a>, a utility for monitoring computer memory. Suspicious, he began to investigate.</p><p>He eventually discovered the problems were the result of updates that had been made to XZ Utils, they were doing more than they were supposed to be. On Friday, Freund took to the Open Source Security List to inform the community that his digging had discovered that the updates were the result of someone intentionally planting a backdoor in the compression software. Over the weekend the security community was set ablaze as people began to comb through everything Jia and the related users had touched.</p><p>Thomas Roccia, a researcher at Microsoft, <a href="https://infosec.exchange/@fr0gger/112189232773640259">published</a> a graphic on Mastodon that helps visualize the sprawling extent of Jia and his coconspirator’s efforts and detail how they almost put an eyewateringly powerful exploit into one of the most used pieces of software in the world, which I have left at the bottom to help summarise.</p><h3>Takeaways</h3><ul><li>Everything, no matter how small, can be a vector for attacks and exploits</li><li>Take code reviews seriously, they’re our first line of defence</li><li>Wherever possible, avoid single points of failure for maintenance and reviews</li><li>Anything too big or too low level for humans to easily parse should be treated as suspicious</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HN-FXbM0Hzl4ZFP8Us_BTw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1175c7d3a829" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/xz-utils-linux-backdoor-exploit-discovered-1175c7d3a829">‘XZ Utils’ Linux Backdoor Exploit Discovered</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Being an ally means work]]></title>
            <link>https://engineering.dunelm.com/being-an-ally-means-work-5e97e44cc854?source=rss-4896aa565039------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e97e44cc854</guid>
            <category><![CDATA[activism]]></category>
            <category><![CDATA[allyship]]></category>
            <category><![CDATA[women]]></category>
            <category><![CDATA[women-in-stem]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <dc:creator><![CDATA[Rowan Powell]]></dc:creator>
            <pubDate>Wed, 27 Mar 2024 11:08:05 GMT</pubDate>
            <atom:updated>2024-03-27T11:08:05.984Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I’m Rowan, a tech lead at Dunelm, writing stories about the intersection of Engineering, Automation and Psychology.</em></p><p>I think it’s the easiest thing in the world to be an ally on international women’s day. Like a post. Turn up to the panels. Clap at the right times in the town hall meetings.</p><p>Don’t get me wrong, these things all help in their small way, but they don’t make the kind of impact I’m really after and by tomorrow most people will have forgotten the events of the day and gone right back to the status quo. If I want to see change in my industry, in my lifetime, it needs to be a year round effort that feels like it really does something.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VM3yT67bOjtwv37Q1Am7-w.jpeg" /></figure><p>I’ve talked a lot about how you should be up front and vocal about issues and diversity where you can, but when women and minorities step forward for themselves, take a step back. Move out of the way and enable them take the lead on hackathons, workshops and other initiatives. Instead put your energy into supporting the admin work that goes into organising these events, help push the people in your department to turn up and take part and highlight their efforts to the people and companies around you.</p><p>Strive to be the type of person to actively call for transparency reporting within your organisation and be the one to share news and opportunities to help in your communications channels. When engineers in my department suggest a hackathon to get women interested in transitioning into tech, I offered to take on the manual labour and logistics of cataloging and coordinating signups. Something which I could quietly do to help make sure they could deliver on <em>their</em><strong><em> </em></strong>vision for an inclusivity effort, without taking away from the people involved.</p><p>If there’s no initiatives within your company or department that you want to put your weight behind, consider joining me in getting involved with some independent organisations that meet people where they’re at to make a real difference and help get people into the industry:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-PxxBrGIDA7UgFktId4Pw.jpeg" /></figure><p><a href="http://limitbreak.co.uk/">Limit Break</a> is an incredible organisation that targets exactly the types of people that are underrepresented in our industry, taking direct action to connect them with people who have been in their shoes and can help them navigate breaking into the industry. Over six months, you commit to mentoring and guiding someone through leveling up their career and I’d like to think the time I spent with my mentee made a real difference to their time at Unity.</p><p>While you’re only committed to mentoring one person at a time, it also gives you the opportunity to hear from the people directly effected and how the systemic biases present themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OeOCB9yDo_9NOU8soNYWxg.png" /></figure><p><a href="https://pixelles.ca/">Pixelles</a> is another organisation that helps empower women in games via workshops, mentoring, socials and talks both in person and online. The group being based in Montreal doesn’t mean you can’t contribute — I’ve stayed up late into the evening before to sit on a panel and pay it forward with the knowledge I’ve gained over the years.</p><p>They’ve worked with huge tech companies like AWS (which is how I initially got involved), so if you don’t have the time to help out directly consider bringing it forward as a candidate to others in your company to collaborate with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWUStlpb3xH0qKu9CKX3Sw.jpeg" /></figure><p>Keep your ear to the ground in your workplace, try to stay consistently involved year round and look for initiatives to support. Actively call out jokes and attitudes you won’t tolerate and feed back how you feel about representation within your team and department to upper management. No single snowflake thinks that they’ll have much impact, but together we can bring about an avalanche of change within the tech industry.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e97e44cc854" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/being-an-ally-means-work-5e97e44cc854">Being an ally means work</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>