<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[rebase]]></title><description><![CDATA[notes on the engineering craft, written, rewritten, occasionally squashed]]></description><link>https://brunokiafuka.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!11G0!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa017e0b-7f2a-4bee-8e1e-801794939583_1254x1254.png</url><title>rebase</title><link>https://brunokiafuka.substack.com</link></image><generator>Substack</generator><lastBuildDate>Wed, 17 Jun 2026 13:11:56 GMT</lastBuildDate><atom:link href="https://brunokiafuka.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Bruno Kiafuka]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[brunokiafuka@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[brunokiafuka@substack.com]]></itunes:email><itunes:name><![CDATA[Bruno Kiafuka]]></itunes:name></itunes:owner><itunes:author><![CDATA[Bruno Kiafuka]]></itunes:author><googleplay:owner><![CDATA[brunokiafuka@substack.com]]></googleplay:owner><googleplay:email><![CDATA[brunokiafuka@substack.com]]></googleplay:email><googleplay:author><![CDATA[Bruno Kiafuka]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[On Software complexity]]></title><description><![CDATA[Notes on Philosophy of Software Design]]></description><link>https://brunokiafuka.substack.com/p/on-software-complexity</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/on-software-complexity</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Sat, 09 May 2026 10:11:30 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/aa5373c5-dc87-4c06-b2fb-4b6d73d99422_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In A Philosophy of Software Design, <a href="https://github.com/johnousterhout">John Ousterhout</a> defines complexity as <em>anything in a software system that is hard to understand or modify</em>.</p><p>We often correlate large systems with complexity, but that is not always true. Small systems can also be deeply complex when simple changes require disproportionate effort or context. Complexity is ultimately perceived by the reader rather than the author.</p><p>As developers, our job is not to create code that only we can work comfortably with, but code that others can understand, extend, and operate safely over time.</p><p>Complex systems usually present themselves in three ways:</p><ol><li><p><strong>Change amplification:</strong> small tasks require touching many areas of the system.</p></li><li><p><strong>Cognitive load:</strong> too much context or domain knowledge is required to complete a task safely.</p></li><li><p><strong>Unknown unknowns:</strong> you can no longer predict how changes will affect the overall system.</p></li></ol><p>These symptoms are often caused by <em><strong>dependencies</strong></em> and <em><strong>obscurity</strong></em>. <em>Dependencies</em> increase coupling, which leads to change amplification and higher cognitive load. <em>Obscurity</em> hides intent and system behavior, creating uncertainty and making software harder to reason about.</p><div class="pullquote"><p>Complexity is also incremental.</p></div><p>As we build systems, complexity naturally accumulates over time. Systems rarely become unmanageable overnight. Instead, complexity grows gradually through shortcuts, inconsistent abstractions, layered workarounds, and local optimizations that ignore the broader design.</p><p>Reading this chapter contrasts nicely with <a href="https://worrydream.com/refs/Brooks_1986_-_No_Silver_Bullet.pdf">No Silver Bullet</a>. Some complexity is <em>inherent</em> to the problem domain itself, a tax we cannot fully eliminate. But <em>accidental</em> complexity is something we continuously introduce through poor boundaries, leaky abstractions, and inconsistent design decisions.</p><p>We should strive to make systems simpler by lifting common dependencies and making the system as obvious as possible without overwhelming implementations. Good APIs reduce this burden. Consumers should care about outputs and behavior, not internal orchestration or implementation details.</p><div class="pullquote"><p>Consistency also matters.</p><p><a href="https://github.com/colinta">Colin Gray</a> outlined in his talk on <strong><a href="https://www.youtube.com/watch?app=desktop&amp;v=zUI7FA4fOlg">default to Consistent</a></strong> that growing teams should strive to minimize decision fatigue. Every slice of the codebase slowly develops a new idea, abstraction, or implementation detail. Over time, systems stop feeling cohesive and become harder to reason about because engineers can no longer rely on predictable patterns.</p></div><p>Complexity compounds not only through bad code, but through fragmented design thinking.</p><p><strong>Now with AI, this becomes even more relevant.</strong></p><p>Reflecting on the current state of software engineering, as we use more and more generated code, we are slightly doing ourselves a disservice by spawning agents into already messy codebases and slowly increasing the complexity of our systems.</p><p>We are moving faster and building more things. Two things can be true at once:</p><ul><li><p>We are shipping faster.</p></li><li><p>We are increasing long-term system complexity.</p></li></ul><p>The more we rely on these tools uncontrollably, the more we hand over understanding of the system itself. Over time, the system becomes increasingly unknown to us and therefore harder to maintain.</p><p>In the near term, everything may appear to work as expected. But I foresee an increase in bad software (<em>and we are already seeing incidents that are becoming harder to patch, debug, and investigate</em>). As we use these tools more, we should scrutinize their output carefully and ensure we still understand the decisions and interactions within our own systems.</p><div class="pullquote"><p><em> AI will figure it out?</em></p></div><p>Maybe. But if the underlying system is already complex, AI may simply generate even more complexity on top of it, making the system even harder to reason about.</p><p>As outlined in my previous post, &#8220;<a href="https://brunokiafuka.substack.com/p/design-twice-ship-once">Design 2x and Ship Once</a>,&#8221; we should strive to gain enough domain knowledge before blindly trusting the tool. It is important to maintain a high-level understanding of what is being added and steer AI tools toward less complexity, not more.</p><p>The better we understand the domain, the better the results we will get. We spend fewer tokens fighting the system, make better architectural decisions, and maintain healthier software over time.</p><p>Less is still more.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://brunokiafuka.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">rebase is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Design twice, ship once!]]></title><description><![CDATA[Or: Think Twice, Code Once, two years later]]></description><link>https://brunokiafuka.substack.com/p/design-twice-ship-once</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/design-twice-ship-once</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Tue, 05 May 2026 10:39:16 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/376b3d79-9a6d-4773-a3d9-a552d0a406fb_1693x929.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Was scrolling HN the other day and stumbled on a post of mine from 2024, <a href="https://news.ycombinator.com/item?id=40090563">Think Twice, Code Once</a>. The thesis was simple: before you implement, gain context, draw your assumptions, stack rank them, then code.</p><p>Reading it back, I think the post still holds, but the part of it that actually matters has shifted.</p><p>The top comment on the HN thread pushed back nicely at the time:</p><blockquote><p><em>Anything worth coding is worth coding at least twice&#8230; writing the code is often the quickest way to understand which design questions you need to ask yourself.</em></p></blockquote><p>I read that two years ago and kind of disagreed. I read it now and think, yeah, that&#8217;s basically how I work whenever using Codex, Claude Code, whatever your flavor of AI tooling, code got <em>fast</em>. Prototyping two versions of a thing isn&#8217;t a luxury anymore, it&#8217;s almost the default.</p><p><strong>Code isn&#8217;t just output anymore. It&#8217;s part of the thinking.</strong></p><p>So does the old post still hold? Yes. Just not where I expected.</p><p></p><h3>The thinking didn&#8217;t go away, it moved up a layer</h3><p>Two years ago, the hard part was: <em>which abstraction, which data structure, which path do I commit to?</em>  That decision used to be expensive because implementing it was expensive. Today, you can spin up two prototypes in the time it took to write one, and the prototype tells you things the whiteboard never could. Honestly, the <em>whiteboarding-then-deciding</em> dance feels a bit overengineered now for a lot of problems.</p><p>But the part that <em>did</em> get harder is everything <strong>upstream</strong>:</p><ul><li><p>Should this thing exist?</p></li><li><p>What does <em>correct</em> even mean here?</p></li><li><p>What&#8217;s the actual user problem?</p></li><li><p>What assumption am I making silently that will bite me on day thirty?</p></li></ul><p>These questions don&#8217;t get easier with AI. If anything, they get harder, because <strong>the model</strong> <strong>will happily generate a beautiful implementation of the wrong thing</strong>. You end up with a clean abstraction around a workflow nobody actually needs, and you <em>feel</em> productive the whole time.</p><p></p><h3>Let the model grill you</h3><p>This is where Matt Pocock&#8217;s <a href="https://github.com/mattpocock/skills/tree/main/skills/productivity/grill-me">/grill-me skill</a> earns its keep. It flips the usual dynamic. Instead of you prompting the model for answers, the model interviews <em>you</em>, walking down the decision tree of your plan one question at a time. <em>Why this and not that? Why now? What happens if your assumption is wrong?</em> It keeps going, sometimes 20+ questions deep, recommending an answer to each so you can either nod along or push back. The output isn&#8217;t code, <em>it&#8217;s clarity about what you&#8217;re actually building</em>.</p><p>This reframes the earlier point. The most useful thing the model does isn&#8217;t always to generate, sometimes it&#8217;s to interrogate. The &#8220;ask why five times&#8221; idea from the original post, that one I&#8217;d actually crank up the volume on, not down. Tools like grill-me are how you do it without having to discipline yourself into it.</p><p></p><h4>Polished doesn&#8217;t mean correct</h4><p><strong>AI amplifies your thinking. It doesn&#8217;t fix it.</strong> It&#8217;s not a clean <code>f(x)&#8594;x</code> mapping where you put a prompt in and get a clean answer out. The output is shaped by everything you brought <em>and</em> everything you forgot to say. The question you didn&#8217;t ask. The constraint you didn&#8217;t mention. The assumption you made silently because it felt obvious.</p><p>Garbage in, polished garbage out. The polish is the dangerous part.</p><p></p><h3>The new shape</h3><p>So if I had to rewrite the old post for 2026, I think it&#8217;s something like:</p><div class="pullquote"><p><strong>Design twice. Question what you have. Ship once.</strong></p></div><p>Code is no longer the bottleneck, though it&#8217;s not exactly <em>free</em> either. <em>Knowing what&#8217;s worth building is the bottleneck.</em> And the only way I know to get there is still the boring one: sit with the problem, ask <em>why</em> a few more times than feels necessary, build a version, look at it, then ask again.</p><p>Two years ago I thought thinking was a step you did <em>before</em> code. Now I think it&#8217;s something you do <em>around</em> code: <strong>before it, during it, after it</strong>. The code is just one of the languages you think in now.</p><p><strong>Thinking didn&#8217;t get cheaper. Everything else did.</strong></p>]]></content:encoded></item><item><title><![CDATA[Token maxer, eventually]]></title><description><![CDATA[me and ai]]></description><link>https://brunokiafuka.substack.com/p/token-maxer-eventually</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/token-maxer-eventually</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Sun, 19 Apr 2026 10:11:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!U0Jp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Like many others, when AI started gaining popularity among developers I was one of the skeptics and almost refused to use it. I felt it was only good for generating boilerplate and correcting my grammar (<em>I cannot spell anymore :D</em>).</p><p>I didn&#8217;t like the HYPE, but internally I liked the tech behind it. Before that, in 2018, I worked as a student tutor and was exposed to researchers who were actively working on small models and machine learning for data search and object recognition.</p><h2>What changed?</h2><p>As time went by, around the end of 2025, I decided not to go against the wave and did my first vibe coding session. Of course, the result wasn&#8217;t amazing. Things were &#8220;<em>sloppy</em>&#8221; and didn&#8217;t feel polished enough for my liking.</p><p>But I was hooked on <a href="http://cursor.com/">Cursor&#8217;s</a> tab tab and started using it more and more, and slowly bought into the hype.</p><p>I could use different models, rubber duck on my implementations and ideas, prototype quickly, and discard code without feeling like &#8220;<em>but I&#8217;ve written so much</em>&#8221;. I could build things that would take months in days or weeks, sometimes hours.</p><p>Then <a href="https://opencode.ai/">OpenCode</a> came along, and I like the tools the <a href="https://anoma.ly/">Anomaly</a> folks work on. Guess I was trying to be a contrarian and use something no one else was using. Then I slowly migrated to it, not as a super user but just keeping things simple.</p><h2>And now?</h2><p><strong>Now I&#8217;m a token maxer &#128514;</strong>. I&#8217;ve embraced it, <em>and stopped trying to cross the world on a boat when everyone was on a plane</em>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U0Jp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U0Jp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!U0Jp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!U0Jp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!U0Jp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U0Jp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png" width="659" height="439.4842032967033" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:659,&quot;bytes&quot;:1378414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://brunokiafuka.substack.com/i/194673622?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U0Jp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!U0Jp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!U0Jp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!U0Jp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb68fca74-0f8b-4116-9ee5-ee6f248b326c_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>But I&#8217;m still a very opinionated user and I know how deceiving LLMs can be. I ran a test with a friend and it was evident that they just try to please you and do things to accommodate your desires.</p><p>But what changed? Why am I even writing this? The planning mode got me hooked for real for real.</p><p>It&#8217;s true that agents will generate an unmanageable number of LOC and deviate from the initial desired result, and I see folks have an unmanageable number of skills, rules, etc&#8230; the <code>.md</code> files that get outdated every day (don&#8217;t get me wrong, some are useful).</p><p>I decided to keep it simple and only hit build when I&#8217;m convinced and have a clear idea of what the desired outcome is. I would sometimes even generate some snippets to help me visualize, but spend most of the time prompting and thinking about what Good looks like, and even switch models during the process to get contrasting ideas. And yes, I still read docs, Stack Overflow, and google things in between, but the results are often good for what I&#8217;m looking for. Ofc I also gen slop, not always the desired result.</p><h2>How do I work now?</h2><p>It&#8217;s very similar to what I used to do before, but faster, as I don&#8217;t have to write things manually while I&#8217;m busy product thinking and reviewing outputs. Now I do:</p><ol><li><p><strong>Plan</strong>: gather all resources I need, analyze them, make sure they&#8217;re concise enough that if I gave this task to a fellow human or a non-super-powerful model, it would still work (accepting the slop caveat in some cases). Planning for the worst model, not the best one.</p></li><li><p><strong>Evaluate and iterate on the plan</strong>: reading &#128514;. That&#8217;s what I&#8217;m still honestly working on, because so much text is generated that I get the urge to hit next all the time. Reading helps here to understand the plan, which I often ensure includes snippets. Hm, my plans I put in a secret folder, and they aren&#8217;t the ones the LLM creates (<em><strong>those are pre-plan)</strong></em>. I generate full documentation planning each phase and iterate on them.</p></li><li><p><strong>Execution</strong>: this is when I go for a walk and let AI do its thing. But as I said, I let it do it in phases so it&#8217;s humanly reviewable, and I stage them.</p></li><li><p><strong>Review</strong>: this piece I now do on my own. With the changes staged, I review and correct until I&#8217;m happy to move to the next part.</p></li></ol><p>The above may seem not so productive, and some would say &#8220;<em>have rule X or skill Y do Z</em>&#8221;. I tried, they don&#8217;t work for me. I like keeping things simple and sometimes slowing down to ensure I&#8217;m doing the right thing, especially when I&#8217;m writing customer-facing code and I know someone depends on what I wrote or instructed the LLM to do. I do it as well to be sure I can still debug manually if needed, in case providers are down or just not doing things right. And ofc I do it to avoid generating the same annoying floating UI with rounded borders that has no style (I have style, so my slop should at least have some).</p><p>Overall, just keep things simple and easy, do more with less. It&#8217;s cheaper, and you can always get great results.</p><p>If you&#8217;re into AI harnesses (dunno what that means for real, just sounds cool, so I&#8217;m saying it too) <a href="https://shittycodingagent.ai/">pi</a> is a good example of less being more. Simple core, and it lets the user expand &#128517;.</p><p>Closing now: I sometimes vibe code, just generate code because it&#8217;s addictive and don&#8217;t follow any process, but these steps are for when I&#8217;m prototyping and all. Hm, and AI seems to be great with dev tools or productivity tools. They&#8217;re small in scope and have a very defined problem space. Now if you&#8217;re doing a SaaS and trusting AI alone, good luck. It&#8217;ll work, but your <code>.env </code>files will be out there :D.</p><p>Agentic code is fun. I&#8217;m now able to make some hard shit come to life easily. So if all those <code>.md</code> files are your thing, keep them, <em><strong>but the simpler, the better!</strong></em></p>]]></content:encoded></item><item><title><![CDATA[The Misunderstood DRY Principle: When Avoiding Duplication Becomes a Problem]]></title><description><![CDATA[Avoid the common pitfalls of the DRY (Don&#8217;t Repeat Yourself) principle in software development. Learn when eliminating duplication improves maintainability&#8212;and when it leads to complex, unmanageable code. &#128640; #CleanCode #SoftwareEngineering]]></description><link>https://brunokiafuka.substack.com/p/the-misunderstood-dry-principle-when</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/the-misunderstood-dry-principle-when</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Mon, 03 Feb 2025 11:48:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!S-on!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="native-audio-embed" data-component-name="AudioPlaceholder" data-attrs="{&quot;label&quot;:null,&quot;mediaUploadId&quot;:&quot;ff4ac809-9368-449b-9d66-c313fcfb4971&quot;,&quot;duration&quot;:433.52817,&quot;downloadable&quot;:false,&quot;isEditorNode&quot;:true}"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S-on!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S-on!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!S-on!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!S-on!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!S-on!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S-on!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png" width="516" height="344.11813186813185" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:516,&quot;bytes&quot;:1097927,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://brunokiafuka.substack.com/i/156280506?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!S-on!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!S-on!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!S-on!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!S-on!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a68c96-ecf2-411d-99e2-d935197c30eb_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I think it&#8217;s safe to say that <strong>DRY (Don&#8217;t Repeat Yourself)</strong> is one of the most misunderstood principles in software development. Too often, it&#8217;s used as an excuse to avoid applying the right design patterns or to force everything into a single function just to avoid writing similar logic in different places.</p><p>Having seen DRY overused in codebases of all sizes, I&#8217;ve started questioning why we default to writing functions/classes that do everything. At first glance, it might seem like a good idea, but as the codebase grows and new requirements emerge, things get messy. We end up with functions that have lengthy argument lists, complex conditionals, and a lack of clarity in what they actually do.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://brunokiafuka.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">BK's Essays is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h3>The Problem with Overusing DRY &#128078;</h3><p>&#8220;<em>But what&#8217;s wrong with avoiding repetition?</em>&#8221; you might ask. &#8220;<em>Aren&#8217;t we just reducing unnecessary duplication?</em>&#8221;</p><p>The issue is that DRY should be about<strong> eliminating actual redundancy</strong>, not forcing unrelated concerns into a single function. Let&#8217;s look at an example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z_g5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z_g5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png 424w, https://substackcdn.com/image/fetch/$s_!Z_g5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png 848w, https://substackcdn.com/image/fetch/$s_!Z_g5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png 1272w, https://substackcdn.com/image/fetch/$s_!Z_g5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z_g5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png" width="1456" height="715" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:715,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:404500,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Z_g5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png 424w, https://substackcdn.com/image/fetch/$s_!Z_g5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png 848w, https://substackcdn.com/image/fetch/$s_!Z_g5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png 1272w, https://substackcdn.com/image/fetch/$s_!Z_g5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cc908c-39bc-4fc8-8f0b-0e01e92359de_3680x1808.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>At first glance, this function might seem fine &#8212; it centralizes all the logic related to user actions. But on closer inspection, we&#8217;re doing more than we need to:</p><ol><li><p><strong>Unnecessary parameters</strong>: Not all actions require all parameters. For example, <code>apply_discount</code> requires <code>discount</code>, but <code>view_product</code> doesn&#8217;t.</p></li><li><p><strong>Difficult to maintain</strong>: As more action types are added, this function will keep growing, making it harder to test and modify.</p></li><li><p><strong>Error-prone</strong>: The more logic we cram into a single function, the more likely we introduce subtle bugs.</p></li></ol><div><hr></div><h3>The Right Way: Separating Concerns &#128077;</h3><p>A better approach is to separate each action into its own function. This might seem like more work initially, but it actually improves maintainability and clarity.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5ake!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5ake!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png 424w, https://substackcdn.com/image/fetch/$s_!5ake!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png 848w, https://substackcdn.com/image/fetch/$s_!5ake!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!5ake!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5ake!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png" width="1456" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:345968,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5ake!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png 424w, https://substackcdn.com/image/fetch/$s_!5ake!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png 848w, https://substackcdn.com/image/fetch/$s_!5ake!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!5ake!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7af3015-4be7-4f72-a52f-236cacbe6ebd_3680x1628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now, instead of passing an <code>$action_type</code> and unrelated arguments, we have:</p><ul><li><p>&#10004; Functions that take only the arguments they need</p></li><li><p>&#10004; Logic that is specific to a single concern</p></li><li><p>&#10004; Code that is easier to read, test, and maintain</p></li></ul><p>This approach aligns with the <strong>Single Responsibility Principle (SRP)</strong>, which states that a function, class, or module should have only <strong>one reason to change</strong>. Each function above now has a well-defined responsibility:</p><ul><li><p><code>purchase()</code> handles user purchases</p></li><li><p><code>applyDiscount()</code> ensures discounts are applied correctly</p></li><li><p><code>viewProduct()</code> logs when a user views a product</p></li></ul><p>By following SRP, we make the code more <strong>modular, maintainable, and easier to test</strong>. If new requirements arise&#8212;such as logging additional purchase details&#8212;we only need to modify the relevant function, without affecting unrelated logic.</p><div><hr></div><h3>When DRY Is Actually Useful &#128161;</h3><p>While the above example shows when not to use DRY, let&#8217;s look at when DRY actually improves the code.</p><p>Here&#8217;s an example where we&#8217;re repeating the same logic across multiple functions:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2w6T!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2w6T!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png 424w, https://substackcdn.com/image/fetch/$s_!2w6T!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png 848w, https://substackcdn.com/image/fetch/$s_!2w6T!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png 1272w, https://substackcdn.com/image/fetch/$s_!2w6T!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2w6T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png" width="1456" height="537" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/abb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:537,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:230850,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2w6T!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png 424w, https://substackcdn.com/image/fetch/$s_!2w6T!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png 848w, https://substackcdn.com/image/fetch/$s_!2w6T!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png 1272w, https://substackcdn.com/image/fetch/$s_!2w6T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabb403ff-06a6-4702-a7be-690ee1c99162_3680x1356.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can extract the shared multiplication logic into a reusable function:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VZj7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VZj7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png 424w, https://substackcdn.com/image/fetch/$s_!VZj7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png 848w, https://substackcdn.com/image/fetch/$s_!VZj7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png 1272w, https://substackcdn.com/image/fetch/$s_!VZj7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VZj7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png" width="1456" height="679" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:679,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:305033,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VZj7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png 424w, https://substackcdn.com/image/fetch/$s_!VZj7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png 848w, https://substackcdn.com/image/fetch/$s_!VZj7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png 1272w, https://substackcdn.com/image/fetch/$s_!VZj7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455abe86-e543-4f9d-bfd2-cd712966a726_3680x1716.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Why This Is a Good Use of DRY?</p><ul><li><p>&#10004; <strong>Extracts real duplication</strong> &#8211; The multiplication logic is shared, but each function still retains its own responsibility.</p></li><li><p>&#10004; <strong>Improves readability</strong> &#8211; The code remains clear without unnecessary conditionals or excessive arguments.</p></li><li><p>&#10004; <strong>Keeps maintainability high</strong> &#8211; If we ever need to modify multiplication (e.g., logging operations), we can do it in one place.</p></li></ul><div><hr></div><p><em><strong>DRY isn&#8217;t bad</strong></em>&#8212;<em>it&#8217;s a great principle when used correctly</em>. But if adding a new argument makes the function unpredictable or forces it to handle entirely different concerns, that&#8217;s a sign it should be separated.</p><p>Instead of blindly avoiding duplication, focus on keeping related logic together while separating concerns properly. This will lead to a codebase that is <strong>clear, testable, and easy to scale</strong>. And remember, DRY isn&#8217;t just about eliminating code duplication&#8212;it&#8217;s about reducing unnecessary redundancy, especially when the logic is shared, but still contextually distinct.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://brunokiafuka.substack.com/p/the-misunderstood-dry-principle-when?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading BK's Essays! This post is public, so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://brunokiafuka.substack.com/p/the-misunderstood-dry-principle-when?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://brunokiafuka.substack.com/p/the-misunderstood-dry-principle-when?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div>]]></content:encoded></item><item><title><![CDATA[Think twice, code once!]]></title><description><![CDATA[Think before you code]]></description><link>https://brunokiafuka.substack.com/p/think-twice-code-once</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/think-twice-code-once</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Fri, 19 Apr 2024 17:45:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!peXi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I review code from more junior developers or even tenured developers, I find a tendency to either overengineer or overcomplicate solutions. When I ask them to explain the rationale behind their implementation, I get an answer that feels like this was their first thought, and they implemented it without analysing why their approach is ideal.</p><p>I ran through the same issue for so long until I heard a quote that said &#8212;&nbsp;<em>&#8220;<strong>think twice, code once&#8221;</strong>,&nbsp;</em>&#8212; and I incorporated it into my process; given that I like to visualise my thoughts<em>.</em></p><div><hr></div><h3>The thinking process</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!peXi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!peXi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!peXi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!peXi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!peXi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!peXi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png" width="646" height="430.81456043956047" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:646,&quot;bytes&quot;:930099,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://brunokiafuka.substack.com/i/143590009?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!peXi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!peXi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!peXi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!peXi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35cc9ec2-1395-4d13-8bf5-36f9b44c09da_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><strong>To think, you have to write!</strong></p></div><p>Ideally, we should strive to produce maintainable and scalable solutions that are also easy to understand and test. Let&#8217;s say you have a task to add optimise a feature on a given app. At first glance, you may have an idea of what needs to be done and how, but then you decide to jump straight to implementation.</p><p>Going straight to implementation would be the best and fastest thing to do, assuming you have an idea of what needs to be done. Regardless of how much context I have on the feature, here is what I would do:</p><ol><li><p><strong>Gain context</strong></p></li></ol><p>Before doing any implementation, it is good to understand the context of why we are optimising the feature. This will enable you to define the impact of these changes.</p><p>You will&nbsp;<strong>retrieve all the requirements needed</strong>&nbsp;to implement your solution during this step. While understanding the context, ask yourself&nbsp;<strong>why five times</strong><em><strong>.&nbsp;</strong></em></p><p></p><ol start="2"><li><p><strong>Draw your assumptions</strong></p></li></ol><p>Based on the previous step, you will now be able to&nbsp;<strong>write down your assumptions</strong>&nbsp;about what needs to be done and how. Ideally, you should have&nbsp;<strong>at least two possible paths</strong>.</p><p>Limit the number of assumptions to avoid being distracted or losing focus. Based on your assumptions, you can now <strong>stack&nbsp;rank them</strong>&nbsp;and drawing the pros and cons of each and compromising whenever necessary.</p><p>This step should be iterative, and it should be repeated at least once!</p><p></p><ol start="3"><li><p><strong>Implement</strong></p></li></ol><p>Selecting one of the potential paths or solutions now becomes more effortless, given that you already know the pros and drawbacks of one compared to the other. The implementation process will be faster as you have defined what needs to be done and how.</p><div><hr></div><p>Overall, the message here is that before you code anything, you should spend some time thinking and writing down your thoughts. This will not only make you a better problem solver, but also help you become more aware of your decisions when crafting a solution.</p><p>As a bonus, I recommend you spend some time watching &#8212; <strong>Thinking Above the Code by Leslie Lamport</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><strong>.</strong></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://brunokiafuka.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">BK's Essays is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p><a href="https://www.youtube.com/watch?v=-4Yp3j_jk8Q&amp;ab_channel=MicrosoftResearch">YouTube &#8212; Leslie Lamport: Thinking Above the Code</a></p></div></div>]]></content:encoded></item><item><title><![CDATA[Track your growth]]></title><description><![CDATA[Getting into the habit of journaling your progress]]></description><link>https://brunokiafuka.substack.com/p/track-your-growth</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/track-your-growth</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Fri, 05 Apr 2024 19:56:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dtNA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The more I talked with different engineers in the industry, the more I realised that only a few track or document their growth. I also did not track<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> my learning, so I focused on learning as many tools as possible.</p><p>As time passed, and I engaged with more experienced engineers, it was clear that a common good trait was that they would do was to keep track of their process and daily/weekly wins.</p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dtNA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dtNA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!dtNA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!dtNA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!dtNA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dtNA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png" width="614" height="409.4739010989011" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:614,&quot;bytes&quot;:869763,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://brunokiafuka.substack.com/i/143276338?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dtNA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!dtNA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!dtNA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!dtNA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F422bf446-2270-4722-86ed-d60e8289c92a_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>Why track your progress?</h2><p>You may have different reasons why you want to write down your high/lowlights, and some would want to do it:</p><ul><li><p>To ensure that they are on top of their daily tasks</p></li><li><p>To write up reports</p></li><li><p>For discussions in 1:1 with managers</p></li></ul><p>Regardless of the reason, all the reasons above are still good reasons for you to at least get into the habit of tracking your progress. I personally started doing it more often to keep my manager informed and brainstorm ideas.</p><p>Initially, it seemed as if I was wasting my time, as I thought that not everything should be relevant to share or that I should always have very distinct learnings. Yet, when I revisited the older notes, I realised the growth and how much I was learning as time went by.</p><p>That boosted my confidence in the topics I am faced with on a daily basis and also improved my position in many discussions with other team members, as <strong>I didn't have to rely on my memory and talk from a good reference point<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a> .</strong> </p><p>Lastly, keeping track of my progress helps to ensure that I am well aware of my <strong>career goals and the opportunities for growth</strong>. </p><h2>What to track and when to do it?</h2><p>You may be asking now:</p><ul><li><p>What should I include in my journal?</p></li><li><p>In which frequency should I do it?</p></li></ul><p>There's no one-size-fits-all approach, as it all depends on you and your current scope. In my personal case, I keep a small notepad where I dump all my daily to-dos and expand my weekly journal from there.</p><p>I also schedule at least 45 minutes every Friday to write a more comprehensive note containing all the week's highs and lows. The topics I cover are:</p><ul><li><p><strong>Highlights:</strong>&nbsp;describing what went well, and this also includes learnings;</p></li><li><p><strong>Lowlights/Blockers:</strong>&nbsp;what are my current challenges and items that I may or may not need assistance with;</p></li><li><p><strong>Discussion points:</strong>&nbsp;this may not be applicable for everyone, but I use this to discuss the points I want to debate with my managers and other ICs<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a>&nbsp;on the team</p></li></ul><div><hr></div><p>Overall, journaling or writing up your daily/weekly/monthly updates is an excellent way to observe where you can improve and what you are already doing well.</p><p>I'd encourage you to create a small routine in which you can write, review, and retain this to help you become aware of where you are in your career and identify what's next.</p><p></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p><strong>Track:</strong>&nbsp;it will be used interchangeably to reference a journal or note.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p><strong><a href="https://www.amazon.co.uk/Pragmatic-Programmer-journey-mastery-Anniversary/dp/0135957052">The Pragmatic Engineer</a> &#8212; Topic 22: Engineering Daybooks</strong></p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p><strong>IC:</strong>&nbsp;Individual Contributor</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://brunokiafuka.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading BK's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p></div></div>]]></content:encoded></item><item><title><![CDATA[How do I solve complex problems?]]></title><description><![CDATA[Before writing a line of code (if the solution requires you to code), you will need to have a step-by-step approach that would help you&#8230;]]></description><link>https://brunokiafuka.substack.com/p/how-do-i-solve-complex-problems-728cdcefdedd</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/how-do-i-solve-complex-problems-728cdcefdedd</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Fri, 29 Apr 2022 09:50:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!sgms!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As time passed, I realized that software engineering is purely problem-solving. The ability to solve problems distinguishes good and great software developers.</p><p>Throughout the past months, I have been approached by friends in the industry asking what my problem-solving process is and how I seem to always know where to look when asked for help. So, I decided to write this article to share how I solve the different tasks or problems I have at hand.</p><p><strong>What is problem-solving?&#8202;</strong>&#8212;&#8202;You may ask; We can find various fancy definitions explaining what problem-solving actually implies. Some would define it as referring to psychology, computer science, cognitive science, or even logic, which is not wrong. Yet, in all different areas, it can be applied; it simply boils down to the <strong>ability of an individual or a group to solve given problems regardless of their complexity.</strong></p><blockquote><p><strong>Problem-solving</strong> consists of using generic or ad hoc methods in an orderly manner to find solutions to difficulties. (<a href="https://en.wikipedia.org/wiki/Problem_solving">Wikipedia</a>)</p></blockquote><h3>Solving a&nbsp;problem</h3><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sgms!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sgms!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!sgms!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!sgms!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!sgms!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sgms!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png" width="508" height="338.782967032967" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:508,&quot;bytes&quot;:1290618,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://brunokiafuka.substack.com/i/143783349?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sgms!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!sgms!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!sgms!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!sgms!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa73c1f9f-8e5d-4fcd-9a71-ef83559b1d98_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Most people approach problems differently; some use technique x, others technique y. Of course, some approaches are more efficient than others, but I don&#8217;t think there is a predefined method of solving a problem. I personally use a process that I have seen some of my favorite engineers use, proving to get the job done.</p><p>Enough talking; LOL; here is how I solve problems regardless of their complexity:</p><h3>1. Understand the&nbsp;problem</h3><p>Problems are like puzzles; we need first to see a complete picture before attempting to solve it. The first step to solving any problem is understanding what you are being asked to accomplish.</p><blockquote><p>&#128681; <em>&#8221;<strong>we cannot do anything without understanding.&#8221;</strong></em></p></blockquote><p>A common mistake that I would often make when assigned a task was to jump straight to my code editor and start writing the solution without knowing the final picture. Eventually, I would figure it out and solve the task, but I was very inefficient as I would ask the right questions late because I didn&#8217;t have a complete picture of what I was asked to do.</p><p>Clearly, before starting, we should seek to comprehend what is that we need to achieve; for this, we need to:</p><ul><li><p>Ask the right questions</p></li><li><p>Write down the problem as you understood</p></li><li><p>Validate your understanding of the problem</p></li></ul><h3>2. Break down into smaller&nbsp;chunks</h3><p>After learning what the problem we have at hand is, we now should be to divide it into smaller and achievable subtasks. Using the puzzle analogy, if you have a big puzzle, you clearly have a picture of how it will look like once you complete but to quickly solve it, ideally, you would group the pieces that fulfill a section into small chunks. The same should apply to any problem you are solving.</p><p>Before writing a line of code (if the solution requires you to code), you will need to have a step-by-step approach that would help you have a solution for your problem puzzle. This can be challenging, but you can break things down and have a clear path to your solution if you understand the problem.</p><p>To get better at this, you will need to practice writing down; this can be seen as you are writing pseudocode that solves your problem by listing all the steps and indicating checkpoints that should be met before moving forward to the next stage.</p><blockquote><p>&#128681; <em><strong>&#8220;Divide and conquer.&#8221;</strong></em></p></blockquote><h3>3. Relook the&nbsp;solution</h3><p>Like in a code review process, in this step, if I have someone else available, I usually ask for a second opinion on my assumptions so I see if the next person at least can understand what it is that I am solving. Yet if I don&#8217;t have a second pair of eyes, I simply reiterate each step as if it was a new problem to be 100% sure of the solution I have in mind.</p><p>As this is the last step, I usually take more time catching possible issues and going back to the drawing board to adjust my initial assumptions.</p><blockquote><p>&#128681; <em><strong>The aim is to &#8220;write twice and code once.&#8221;</strong></em></p></blockquote><p>Only after relooking at my chunks; I do start applying what I have written down, always keeping in mind that this is not the absolute solution and that it can constantly be improved.</p><p>After all, solving problems is a skill that requires time to be developed (I am still working towards improving myself to become a better problem solver). Yet, I realized that the more problems you solve, the better you will become at providing a solution to issues that come your way, regardless of their complexity.</p><p>This doesn&#8217;t only apply to the software engineering profession but to all others. We are all solving problems one way or the other, so we all should find a process that works to better solve the problems we encounter daily.</p><p>Let&#8217;s keep on hacking &#128578;.</p>]]></content:encoded></item><item><title><![CDATA[The best code is no code.]]></title><description><![CDATA[Keeping things simple and understanding them will allow us to test faster and get to know if our solution actually will solve the problem&#8230;]]></description><link>https://brunokiafuka.substack.com/p/the-best-code-is-no-code-9bfcb0ce7bd</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/the-best-code-is-no-code-9bfcb0ce7bd</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Mon, 02 Nov 2020 16:16:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9RCI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The best code is no code.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9RCI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9RCI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!9RCI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!9RCI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!9RCI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9RCI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png" width="558" height="372.12774725274727" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/afb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:558,&quot;bytes&quot;:1872773,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://brunokiafuka.substack.com/i/143783351?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9RCI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!9RCI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!9RCI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!9RCI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafb59566-e996-4d2f-abc1-7a5764656595_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Writing software solutions is a very exhaustive process and can get complicated when not thoroughly thought out.</p><p>Many of us (developers, software engineers, whatever you call yourself) tend to jump straight into building solutions before understanding &#8220;<em>the why</em>&#8221;, especially when we are very early in our careers.</p><blockquote><p>E.g: Person A has problem X. We jump on and just decide that we can solve this problem by using tool Y. After the time spent writting some code we eventually solve the problem &#127881;&nbsp;, but Person A reports back that it was not even the problem they were attempting to solve!</p></blockquote><p><strong>TL;DR</strong></p><p>After several discussions with a teammate, we both concluded that the best code is no code.</p><p>If there is a need for code, then it should be as simple as possible at first.</p><p>I know it may be asking yourself: how is it that the best code can be no code at all &#128517;? Let me explain what we mean by showing a few points:</p><h4>The problem doesn&#8217;t need a software solution; it needs a behavioral change.</h4><p>Before adding a new feature or building something new we need to ask ourselves the reason: <strong>why</strong>? &#8211; Without understanding the true reason we shouldn&#8217;t be writing any code at all. Sometimes (especially) when you build an entirely new product you will need to try to understand the core of that request.</p><p>During my university days, we studied Human-Computer Interface, and there I understood that we are building solutions for humans and humans will use these products, thus before changing the position of a button you will try to understand if there is a true need to make those changes.</p><h4>Your code is not always&nbsp;needed.</h4><p>This point talks back to the first one, imagine a scenario where you spend close to 2 hours trying and figure out how to solve a given problem that you think your code would solve, and then your code is never checked into production.</p><p>&#8220;Wasn&#8217;t my code good enough?&#8221; you may ask&#8202;&#8212;&#8202;but the reality can be that your code was never needed in the first place. The solution to the problem you were trying to solve had more to do with the way users were interacting with your solution. Thus we need to understand that when we are writing a piece of code, sometimes it will be deleted and forgotten like it never existed.</p><h4>You might be tricked by your product&nbsp;manager.</h4><p>Product managers or product owners (in some cases) are responsible for researching and understanding how users are interacting with a product, for this they conduct researches to understand the user needs and then write up the next set of features that should be built.</p><p>Your job as developers is to build those features, yet, we still need to try understanding further what is it that these features will be solving for.</p><p>I&#8217;ve been in situations where a new feature request seemed to be a great idea &#128161;, but after jumping into the code and connecting the dots I noticed that the code I was writing didn&#8217;t really solve the problem as it was instead potentially creating more problems for the final users.</p><p>The product manager can come up with a valid reason why they do need feature x to be built and we get paid to build it, but it is also apart of our job to access every single request before doing them.</p><blockquote><p>Have always the product in mind, your code is there to simplify its users&#8217; life. Seek to deeply understand what your are solving for.</p></blockquote><h3>You still have to&nbsp;code</h3><p>To sum up, the lesser you write code and the more you understand the why of things the better your solutions will end up being. But, when you code something ensure that you write your code in the simplest way possible avoiding overcomplicating your implementation.</p><p><em><strong>Keeping things simple and understanding them</strong></em> will allow us to test faster and get to know if our solution actually will solve the problem for the final user.</p><p>The best code is no code and the best solutions are the ones where your code is simplified and easy to extend.</p><p>Happy hacking!</p>]]></content:encoded></item><item><title><![CDATA[The checkbox Software Engineer]]></title><description><![CDATA[Firstly, I want to clarify that I don't consider myself a sound software engineer, even though I learned how to write computer programs in high school.]]></description><link>https://brunokiafuka.substack.com/p/the-checkbox-software-engineer-7172d6f00bcb</link><guid isPermaLink="false">https://brunokiafuka.substack.com/p/the-checkbox-software-engineer-7172d6f00bcb</guid><dc:creator><![CDATA[Bruno Kiafuka]]></dc:creator><pubDate>Wed, 08 Jul 2020 19:51:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!FJ1a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FJ1a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FJ1a!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!FJ1a!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!FJ1a!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!FJ1a!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FJ1a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png" width="670" height="446.82005494505495" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:670,&quot;bytes&quot;:1713256,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://brunokiafuka.substack.com/i/143783352?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FJ1a!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!FJ1a!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!FJ1a!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!FJ1a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d52b31b-70d7-4865-ae1e-07246c26763a_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Firstly, I want to clarify that I don't consider myself a sound software engineer, even though I learned how to write computer programs in high school. About three years ago, I landed my first job as a software engineer in a small start-up company in South Africa. That same year, people started calling me either software [engineer, developer, etc&#8230;] or whatever else. </p><p>As a result of working in a start-up that developed a solution for outside customers, I was expected to get things done. Although I moved jobs, the story remained the same. Eventually, I realized that my job was to get things done, and most of the time, I got them done quickly.</p><p>One day, in November of last year, I read an interesting article titled <a href="https://blog.pragmaticengineer.com/the-product-minded-engineer/">"The Product-Minded Software Engineer" by Gergely Orosz</a>. It drastically changed my way of viewing my job as a Software Engineer. In this blog post, the author stated many interesting points that I wish everyone who builds software would think about.</p><div><hr></div><h2>The Checkboxes</h2><p>But why the title, you may ask? The answer is that we all eventually become people who check boxes and mark them as done to secure our monthly income. This may apply to other jobs as well.</p><p>Most of the time, as an engineer, you will get called by your managers or team leaders, who will assign you a task, explain to you their expectations (most of which come from clients), and give you time to complete it. Then, you will say yes without asking the intent of the job. You will go and perform the task and wait for the next one, and the cycle repeats itself.</p><p>You may feel like you are growing because you completed 10x more tasks this week than the previous week, you got 100+ commits in a month, and you are done with your checklist. But you may not realize that you trapped yourself in an addictive cycle of ticking off boxes.</p><h3>The Problems</h3><p>After being there, I realized that checking the boxes alone was feeding my impostor syndrome more and more, as I was constantly in the mindset of "it is working, don't touch it, move to the next one." It was fun and exciting to always get kudos due to the number of tasks I was checking on my "to-do list." Yet, I found some problems with this:</p><p><em><strong>1. Doing things because they have to be done without understanding the reason for their existence</strong></em></p><p>All software engineers can relate. Many times, we are asked to change or add functionality to a system and just go and build, being unable to differentiate why it is needed vs. why I am building it. You might be building an unnecessary feature because the client or project owner said so, and in the end, you will be asked to remove it because it was not needed.</p><p><em><strong>2. Being a false solution provider</strong></em></p><p>Do software engineers know what their job means? Let's remember the job description. When you constantly tick off boxes, you will think that you are providing solutions, yet you are simply pleasing the asker.</p><p><em><strong>3. Building things that you don't understand</strong></em> </p><p>This one complements my first point. The overall beauty of any job is being able to provide solutions to a specific group of people, and it is sad sometimes to see that the solution providers don't take some time to understand what we are trying to solve, thinking that if it is done, it is done. The small boxes we tick off every day add up to a bigger one, which is our contribution to the outside world, and not knowing what you are solving for can lead to future failure.</p><p><em><strong>4. Poor solution</strong></em></p><p> You are ticking off things, but is the overall picture important? Many of us get called to meetings and are given the project scope, and then we get the feature list and start implementing. As the other points above state, small tasks add up to a bigger one; the feature list you get will add up to an entire software system, web app, you name it. </p><p>Yet you can deliver it on time and within scope, and everyone is clapping, etc.&#8230; forgetting that you don't know who you will build it for and if it is needed to use x approach instead of y approach. So you built a poor solution that you would also not prefer to use.</p><div><hr></div><p>In conclusion, I believe that all software engineers should know a bit of product mindset because everything has a lifecycle and needs to tell a story for those who will use your solutions. Ticking boxes alone may prevent you from understanding what you are doing. When we are assigned tasks or requests, we need to always be able to analyze and understand who we are solving for, why the solution is needed, and what it is that we are creating. If we aren't sure and unable to answer these questions, we are just ticking off boxes.</p><p>Software engineering is more than simply writing a nice feature. It is about user experience and constant solution creation. Everyone should do things only when they understand the intent of the request.</p><blockquote><p>I constantly say that building software is an art, and sound artists know what story they are trying to tell.</p></blockquote><p><em>Happy hacking!</em></p>]]></content:encoded></item></channel></rss>