<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matthijs</title>
    <description>The latest articles on DEV Community by Matthijs (@matthijsschuurman).</description>
    <link>https://dev.to/matthijsschuurman</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1341598%2F01fff328-541c-490b-9845-77a65a92abbb.jpeg</url>
      <title>DEV Community: Matthijs</title>
      <link>https://dev.to/matthijsschuurman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/matthijsschuurman"/>
    <language>en</language>
    <item>
      <title>How to code like a boss?</title>
      <dc:creator>Matthijs</dc:creator>
      <pubDate>Mon, 17 Mar 2025 22:56:20 +0000</pubDate>
      <link>https://dev.to/matthijsschuurman/how-to-code-like-a-boss-2i8</link>
      <guid>https://dev.to/matthijsschuurman/how-to-code-like-a-boss-2i8</guid>
      <description>&lt;p&gt;Simple, &lt;strong&gt;allow yourself to code like a boss!&lt;/strong&gt; &lt;br&gt;
Honestly &lt;em&gt;you&lt;/em&gt; are the problem! Not the tools, not the language, not your boss, you are!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ok there is one exception to this, if you're stuck at your job, some of this may be out of your control. But is all other cases, you are in control!&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  TL;DR
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Get annoyed&lt;/strong&gt; and fix what pisses you off&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experiment&lt;/strong&gt; and learn what can be done better&lt;/li&gt;
&lt;li&gt;Get the &lt;strong&gt;right tools&lt;/strong&gt; and &lt;em&gt;use&lt;/em&gt; them&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;the language&lt;/strong&gt; as it's intended&lt;/li&gt;
&lt;li&gt;Does &lt;strong&gt;what others do&lt;/strong&gt; work for you?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make your boss work for you&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ok let's go!&lt;/p&gt;




&lt;h2&gt;
  
  
  Allow yourself to be pissed off!
&lt;/h2&gt;

&lt;p&gt;I recently had to start using Windows again... and boyo does it fucking suck! Windows 11 is the worst and I have been fuming on a daily basis by its sheer incompetence. And yes I &lt;em&gt;could&lt;/em&gt; consider them as minor annoyances and just accept them... but I won't... and nor should you! &lt;/p&gt;

&lt;p&gt;Allow yourself to be pissed off at software that doesn't do what you want it to, curse and scream at your monitor! And use that as an indication to ask: is it &lt;a href="https://en.wikipedia.org/wiki/User_error" rel="noopener noreferrer"&gt;PEBKAC&lt;/a&gt;? Or is the &lt;a href="https://www.microsoft.com/en-us/software-download/windows11" rel="noopener noreferrer"&gt;software just utter crap&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;Change what you can to get rid of annoyances because these are the core reasons why you're not coding like a boss yet.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If your Windows automagically switches your keyboard layout from UK to US or vice versa, remove the layout that pisses you off... or use &lt;a href="https://en.wikipedia.org/wiki/List_of_Unix_systems#Unix-like_operating_systems" rel="noopener noreferrer"&gt;not-windows&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;If your IDE is really slow, figure out why and uninstall the plugin that is sending all your data to &lt;code&gt;$bigbrother&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If your unit tests fail because someone made a change, sit down together and figure it out&lt;/li&gt;
&lt;li&gt;If your boss doesn't let you experiment to improve your skills/efficiency, find another boss&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And related, consider the ergonomics. Is your desk, chair, computer, laptop, screen, mouse and/or keyboard up to snuff?  If you wanna be good, you're gonna be doing this for a while so ensure your body is gonna hold up in the longrun.&lt;/p&gt;




&lt;h2&gt;
  
  
  Experiment
&lt;/h2&gt;

&lt;p&gt;Just because &lt;code&gt;you've always been doing it like that&lt;/code&gt; doesn't mean you have to keep doing it like that. As a matter of fact I really really... really fucking hate that mentality!&lt;/p&gt;

&lt;p&gt;So the other day I decided to do yet another new experiment: does &lt;a href="https://neovim.io" rel="noopener noreferrer"&gt;Neovim&lt;/a&gt; and &lt;a href="https://go.dev" rel="noopener noreferrer"&gt;Go&lt;/a&gt; make me more productive? Thanks &lt;a href="https://www.youtube.com/c/ThePrimeagen" rel="noopener noreferrer"&gt;@ThePrimeagen&lt;/a&gt; for giving me another hobby I could do without! Did I need to do this? Nope... not for my job at least... but did I want to do it: HELL YES! I love trying out new things to see if it can either help me improve my own skills or allow me to be more efficient... or inspire others!&lt;/p&gt;

&lt;p&gt;So what am I trying to prove? Are there better editors/IDEs out there and is there a language better suited for what I do? I do this shit on a regular basis, whether it's getting a &lt;a href="https://en.wikipedia.org/wiki/Ergonomic_keyboard#Split_key_clusters" rel="noopener noreferrer"&gt;different keyboard&lt;/a&gt;, trying a new &lt;a href="https://en.wikipedia.org/wiki/List_of_programming_languages_by_type" rel="noopener noreferrer"&gt;language&lt;/a&gt; or dicking around with &lt;a href="https://en.wikipedia.org/wiki/Ansible_(software)" rel="noopener noreferrer"&gt;automatic provisioning&lt;/a&gt;... I just want to get better. &lt;/p&gt;

&lt;p&gt;There are very few things more effective than experimenting because you fail continuously... &lt;code&gt;failure == good&lt;/code&gt;! It allows us to learn, the more you fail, the more you learn (assuming you accept your failures).&lt;/p&gt;




&lt;h2&gt;
  
  
  Choose the right editor/IDE
&lt;/h2&gt;

&lt;p&gt;Just because someone tells you &lt;a href="https://en.wikipedia.org/wiki/Visual_Studio_Code" rel="noopener noreferrer"&gt;VS code&lt;/a&gt; is great, doesn't mean that it is... or isn't. You need to find out for yourself what works and what doesn't. &lt;/p&gt;

&lt;p&gt;When I'm behind my desktop I don't want to let go of my keyboard because moving my arm 10cm to my mouse and back feel inefficient and potentially ergonomically problematic. So in this case I want to use an editor/IDE that allows me to do &lt;strong&gt;everything&lt;/strong&gt; with my keyboard. I've also extended this to my browser with &lt;a href="https://help.vivaldi.com/desktop/shortcuts/spatial-navigation/" rel="noopener noreferrer"&gt;spatial navigation&lt;/a&gt;. Then again if I'm on a Macbook I'm less bothered by this as the touchpad is so damn fantastic. That said in the end I still prefer a &lt;a href="https://www.zsa.io/voyager" rel="noopener noreferrer"&gt;split keyboard&lt;/a&gt; + no mouse when coding for more then an hour.&lt;/p&gt;

&lt;p&gt;I've used a lot of different editors and IDEs and even the ones that sucked terribly have been a worthwhile experience. I'm not saying one is better than the other, I've always enjoyed coding and the tools were the enabler. But I have matured and with that realised what &lt;strong&gt;the enjoyment of coding is... the coding!&lt;/strong&gt; Anything around it is just an enabler and should STFU unless spoken to. &lt;/p&gt;

&lt;h3&gt;
  
  
  Automation is key
&lt;/h3&gt;

&lt;p&gt;Over the years I've convinced myself I've become a better coder. Regardless of whether that's true I've automated the hell out of my dev work so I can focus on coding (and yes, I do see &lt;a href="https://xkcd.com/1319/" rel="noopener noreferrer"&gt;the irony&lt;/a&gt;). If I press "save" on my code, within a second I know for a fact how good or bad my code is and whether I can push it up.&lt;/p&gt;

&lt;h4&gt;
  
  
  How?
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Syntax highlighting&lt;/strong&gt;, because duh!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linters &amp;amp; Formatters&lt;/strong&gt;, let your editor handle that shit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic test runners&lt;/strong&gt;, :w -&amp;gt; see unit &amp;amp; integration tests purrrr... for a second &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code coverage&lt;/strong&gt;, fuck the statistics, but seeing which lines aren't tested means you can make a split-second decision on whether to care &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LSPs&lt;/strong&gt;, instant feedback on your code is wonderful&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scripting&lt;/strong&gt;, Bash is wonderful and even though I was sceptical I'm starting to see the benefit of Lua in Neovim&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version control&lt;/strong&gt;, knowing what changed is half the battle, merging and rebasing is the other half&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI&lt;/strong&gt;, &lt;a href="https://github.com/features/copilot" rel="noopener noreferrer"&gt;Copilot&lt;/a&gt; and others are an enormous time saver, especially when you're doing more of the same. That said, with learning Go I've realised that, although a big help, I still yearn for the documentation to really understand how things work. In coding understanding &lt;em&gt;why&lt;/em&gt; something works makes you better, not copy/pasting a solution from stackoverflow (or having a LLM do it for you).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note that &lt;a href="https://en.wikipedia.org/wiki/Continuous_integration" rel="noopener noreferrer"&gt;CI&lt;/a&gt; is crucial in the next phase, whether in a pipeline or as a pre push hook,  ensure you run automated code &amp;amp; security scans, end to end tests, builds, rebase checks and any other automated check that could potentially prevent your PR from being merged&lt;/p&gt;

&lt;h3&gt;
  
  
  Use a proper OS
&lt;/h3&gt;

&lt;p&gt;I don't care what you use as long as it doesn't need a reboot every other fart and actually does the thing it needs to do when you want it to. I'm not saying install &lt;code&gt;$linux_distro&lt;/code&gt; or go buy a Macbook but consider this: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Every second wasted on twiddling your wiener because you have to wait on something, is a second not coding as a boss&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What's the best language?
&lt;/h2&gt;

&lt;p&gt;Well as per usual: it depends. Just don't think for a second your language is a Swiss Army knife. But... feel free to try it and fail because that is a valuable experience... again, assuming you acknowledge your failure.&lt;/p&gt;

&lt;p&gt;I've used quite a few languages, some I hated... some I hated even more... I even attempted to create my own at some point? Why? Because &lt;a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)" rel="noopener noreferrer"&gt;Bash&lt;/a&gt; is such a shit show I wanted something... less shit. It was called... KISS for obvious reasons. But I ended up abandoning the project when I bumped into &lt;a href="https://en.wikipedia.org/wiki/CoffeeScript" rel="noopener noreferrer"&gt;CoffeeScript&lt;/a&gt; as that was super close wrt syntax and package management. It just wasn't a Bash replacement, but who cares I had a new toy!&lt;/p&gt;

&lt;p&gt;And now I'm enjoying Go, because? I don't know it just feels right... everything I want to do just works as I expect it to. Kudos for Ken, Rob and Robert for really nailing it. But that just means it's a good language for me. I've fought with too many languages over the years and in the end it may mean you're not gonna be friends and that's ok. &lt;/p&gt;

&lt;p&gt;Back to lesson 2: experiment, try out a couple languages... build a side project in some language and figure out what you like and hate about the language. For example, I've always hated &lt;a href="https://en.wikipedia.org/wiki/Interface_(object-oriented_programming)" rel="noopener noreferrer"&gt;interfaces&lt;/a&gt;, they seemed... reversed... and guess what? Go flipped them around and they're amazing! Equally Bash as a language is wonderful... to a certain point... once you reach that point: stick everything in &lt;code&gt;/dev/null&lt;/code&gt; and walk away. I found out by experimenting with multiple languages why I didn't like them &lt;strong&gt;and&lt;/strong&gt; how and when they can be useful... and most importantly: fun to code in!&lt;/p&gt;




&lt;h2&gt;
  
  
  More brains == smarterer
&lt;/h2&gt;

&lt;p&gt;It doesn't matter how smart you are, the collective brain knows more. Talk to people, do pair programming, listen to senior engineers, listen to junior engineers, DevOps, QA and Database engineers. They will all have interesting stories and experiences that you can learn from. No point in falling into the same traps as they did... well actually, in some cases it is essential to fall flat on your face as some things can't be taught. &lt;/p&gt;

&lt;p&gt;You can learn a lot from other people and how they solved things and you should use that to push it to the next level, stand on the shoulders of giants and all that... but also try to understand what and why they did and not just accept that what they did is right. Really understanding the layer you're building on, helps you to build things better. &lt;/p&gt;

&lt;p&gt;The hardest thing is probably accepting that what you build is shit... whether it's someone else showing you the light or you come across some project that does what you're building but better, do a final commit &amp;amp; push and stop. But it was not a waste of time tho! You have learned a lot and you can use that in your next project... for which undoubtedly someone comes along to tell you it's shit, so you know... fuck other people's opinions!&lt;/p&gt;




&lt;h2&gt;
  
  
  Make your boss work for you
&lt;/h2&gt;

&lt;p&gt;Your boss has 1 job: &lt;em&gt;enable you to be as efficient as you can be&lt;/em&gt;. And contrary to popular belief this means your boss needs to &lt;strong&gt;invest&lt;/strong&gt; in you. Obviously there isn't a money tree growing in your company but investing a couple bucks can create an enormous efficiency gain. Consider your boss gives you a crappy chair, desk, laptop, mouse, keyboard and which saves the company $2000 one-off. You get a problem with your back and guess what, 1 month in and the company already wasted more than they saved because your productivity went down the drain. &lt;/p&gt;

&lt;p&gt;But &lt;strong&gt;you&lt;/strong&gt; are the one that needs to make your boss aware. You feel the physical pain and/or mental pain of the inefficiency, your boss doesn't. Your boss just doesn't understand why shit's taking so long. If you have great boss they'll regularly check-in to see how they can help you being an even better version of yourself, if you have a good boss they help you when you ask them and if you have a terrible boss they ignore everything you say. In the latter case, &lt;strong&gt;find another job&lt;/strong&gt;. In the former cases, understand what pains you (and your team) and help your boss enable you!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One of the guys in my former team kept harassing me to go to Slack because Teams was shite. And while I felt his pain as well, it was his tenacious attitude that convinced me to get budget and get it sorted. It was one of the best moves for him &lt;strong&gt;and&lt;/strong&gt; the rest of the team. &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Whether I'm coding like a boss or just feel that I do, it doesn't really matter. What matters is that you make the miles. You don't get good at something by staring at it or letting others/AI do the heavy lifting. If you want to be a boss, do the work! Try new things, stick with it for a couple years, learn, move on and rinse and repeat.&lt;/p&gt;

&lt;p&gt;And take your time! It's not gonna happen overnight and it's not gonna happen by itself. But above all: &lt;strong&gt;enjoy coding&lt;/strong&gt;! &lt;/p&gt;




&lt;h3&gt;
  
  
  My ever-growing list of editors
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://en.wikipedia.org/wiki/Norton_Commander" rel="noopener noreferrer"&gt;Norton Commander&lt;/a&gt; &amp;amp; &lt;a href="https://en.wikipedia.org/wiki/Personal_Editor" rel="noopener noreferrer"&gt;PE2&lt;/a&gt;&lt;/strong&gt;, thanks to my dad for having this setup back in the day as it helped my managing that shit ton of &lt;a href="https://en.wikipedia.org/wiki/Batch_file" rel="noopener noreferrer"&gt;BATch&lt;/a&gt; files when I was about 10... 

&lt;ul&gt;
&lt;li&gt;Fuck... I just realised I've been doing shell-scripting for 30+ years 🤦&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Notepad / Notepad2 / Notepad++&lt;/strong&gt;, this is fine... &lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Borland &lt;a href="https://en.wikipedia.org/wiki/C%2B%2BBuilder" rel="noopener noreferrer"&gt;C++&lt;/a&gt;&lt;/strong&gt;, it was really good back then... not sure how well it aged tho&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://en.wikipedia.org/wiki/Visual_Studio#6.0_(1998)" rel="noopener noreferrer"&gt;&lt;strong&gt;Visual Basic&lt;/strong&gt;&lt;/a&gt;, I can only remember a lot of buttons that didn't really work and you ended up doing it in code... in true micros~1 fashion&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Borland &lt;a href="https://en.wikipedia.org/wiki/Delphi_(software)" rel="noopener noreferrer"&gt;Delphi&lt;/a&gt; &amp;amp; &lt;a href="https://en.wikipedia.org/wiki/Borland_Kylix" rel="noopener noreferrer"&gt;Kylix&lt;/a&gt;&lt;/strong&gt;, I wasn't overly impressed but it did the job... Kylix (aka run Delphi in &lt;a href="https://www.winehq.org" rel="noopener noreferrer"&gt;wine&lt;/a&gt;) was terrible tho&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;&lt;a href="https://www.vim.org" rel="noopener noreferrer"&gt;Vim&lt;/a&gt;&lt;/strong&gt;, I've spend a lot of time in Vim and we go way back! Yet I did abandon it&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;&lt;a href="https://atom-editor.cc" rel="noopener noreferrer"&gt;Atom&lt;/a&gt; &amp;amp; &lt;a href="https://www.sublimetext.com" rel="noopener noreferrer"&gt;Sublime&lt;/a&gt;&lt;/strong&gt;, I wasn't happy with Vim, so you try things... good things... bad things... &lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;&lt;a href="https://en.wikipedia.org/wiki/Visual_Studio_Code" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt;&lt;/strong&gt;, This is what I settled on after Vim... why? It did things... a lot of things and unlike many other micros~1 products it did them well&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;&lt;a href="https://neovim.io" rel="noopener noreferrer"&gt;Neovim&lt;/a&gt;&lt;/strong&gt;, and here we are... back to Vim... or maybe I'm secretly longing for PE2?&lt;/li&gt;

&lt;/ul&gt;

</description>
      <category>kiss</category>
      <category>coding</category>
      <category>testing</category>
    </item>
    <item>
      <title>WTF even is Software Engineering?</title>
      <dc:creator>Matthijs</dc:creator>
      <pubDate>Wed, 24 Apr 2024 09:10:31 +0000</pubDate>
      <link>https://dev.to/matthijsschuurman/wtf-even-is-software-engineering-14n6</link>
      <guid>https://dev.to/matthijsschuurman/wtf-even-is-software-engineering-14n6</guid>
      <description>&lt;p&gt;While figuring out &lt;a href="https://dev.to/matthijsschuurman/why-is-coding-so-ridiculously-overcomplicated-489h"&gt;why coding is so overcomplicated&lt;/a&gt; it occurred to me that the majority of it isn't due to the coding itself. But rather the whole &lt;a href="https://en.wikipedia.org/wiki/Systems_development_life_cycle" rel="noopener noreferrer"&gt;SDLC&lt;/a&gt; is to blame. But what actually is that? And what should we be doing? And how do we keep it as simple as possible?&lt;/p&gt;

&lt;h2&gt;
  
  
  Waterfall
&lt;/h2&gt;

&lt;p&gt;Back in the day we used to do &lt;a href="https://en.wikipedia.org/wiki/Waterfall_model" rel="noopener noreferrer"&gt;waterfall&lt;/a&gt;, which has its pro's and cons... The projects we used to run were quite ok, at least we managed to meet the deadline with all required features and the quality was good enough. Now I'm not here to promote waterfall (although &lt;a href="https://en.wikipedia.org/wiki/Iguazu_Falls" rel="noopener noreferrer"&gt;Iguazu&lt;/a&gt; is absolutely stunning) but it does nicely illustrate what is needed for software engineering:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntmlvnjh3aisspvazthk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntmlvnjh3aisspvazthk.png" alt="Waterfall timeline" width="800" height="224"&gt;&lt;/a&gt; Why is this relevant? Whatever your methodology, spend the fucking time! Don't skimp on analysis, design, dev, QA or ops... it will bite you in the arse!&lt;/p&gt;

&lt;h2&gt;
  
  
  Agile
&lt;/h2&gt;

&lt;p&gt;Now fortunately we moved to a more iterative approach where we can evaluate what we've built more frequently. As said, you still need to spend the time but the big difference is that it's a lot more intertwined. Especially QA, deploy and run have become an integral part of the cycle... and honestly it's fucking awesome! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyib6aad2an5ch9hatvok.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyib6aad2an5ch9hatvok.png" alt="Agile timeline" width="800" height="216"&gt;&lt;/a&gt; This is an indication of how it could look... it kinda implies &lt;a href="https://en.wikipedia.org/wiki/Scrum_(software_development)#Sprint" rel="noopener noreferrer"&gt;Sprints&lt;/a&gt; but a more &lt;a href="https://en.wikipedia.org/wiki/Kanban" rel="noopener noreferrer"&gt;Kanban&lt;/a&gt; style approach would work equally well. Most importantly ensure everyone is involved on a continuous basis...&lt;/p&gt;

&lt;h3&gt;
  
  
  Team work
&lt;/h3&gt;

&lt;p&gt;For me the best part about agile (aside from it being called &lt;a href="https://en.wikipedia.org/wiki/Agile_software_development" rel="noopener noreferrer"&gt;ASD&lt;/a&gt;) is that it forces you to work as a team. Everybody has to be communicating with each other otherwise it's not gonna fly. I can't stress this enough: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PO, Architecture, Dev, UX, QA &amp;amp; DevOps all need to be fully aligned!&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any meeting you have on a feature, from conception to deployment, make sure everybody is in it. And for the love of god, take the time to discus... assumption &lt;em&gt;is&lt;/em&gt; the mother of all fuck-ups. Even if you think everything is clear, it isn't!&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;I like &lt;a href="https://en.wikipedia.org/wiki/Requirements_analysis" rel="noopener noreferrer"&gt;requirements analysis&lt;/a&gt; as a means to determine &lt;strong&gt;what&lt;/strong&gt; is needed as it ignores the question of &lt;strong&gt;how&lt;/strong&gt; something gets implemented. Don't let a PO come up with a solution, that's what UX, Software &amp;amp; DevOps engineers are for. Sorry PO's, no it's not your job... by all means raise suggestions and examples of how things can be solved but leave it to the team to come up with the &lt;strong&gt;how&lt;/strong&gt; and jointly validate it meets the requirements.&lt;/p&gt;

&lt;p&gt;Also please ignore the customers' cries that "it has to work like this otherwise it's useless" because that ruins the product... think about all the other customers and really distill what the underlying problem is... &lt;strong&gt;what&lt;/strong&gt; is required? &lt;/p&gt;

&lt;h2&gt;
  
  
  Reporting
&lt;/h2&gt;

&lt;p&gt;And the first requirement to consider is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As a &lt;strong&gt;Product Owner&lt;/strong&gt;, I &lt;strong&gt;must&lt;/strong&gt; receive &lt;strong&gt;usage information&lt;/strong&gt; for feature X, so that I can validate  &lt;strong&gt;it's useful&lt;/strong&gt; to our customers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Normally we leave this till the very last moment and consequently don't implement it... but please please please do this first, you want to prove something is useful or not... cuz if it isn't... BIN IT! There's nothing worse than useless crap in your product... not only is it cumbersome for your users but it also has to be &lt;a href="https://dev.to/matthijsschuurman/why-is-coding-so-ridiculously-overcomplicated-489h#fluidity"&gt;maintained&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;This may very well be the most important piece to allow the whole thing to work... but it deserves a whole separate post... or even a series... or rather go get a proper architect and consider what is needed for your organisation, cuz there is no one-size-fits-all.&lt;/p&gt;

&lt;p&gt;That said, there are some pointers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Like software your &lt;strong&gt;architecture should be flexible&lt;/strong&gt;... it's a balancing act between solid guidelines and change to facilitate the ever changing requirements&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reducing dependencies&lt;/strong&gt; and &lt;strong&gt;compartmentalization&lt;/strong&gt; helps to create a more sustainable environment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hire an architect&lt;/strong&gt;, someone who knows its shit and actually has time to solve things in the long term... when you build a house you don't just throw builders at it, there is a structure&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  DevOps
&lt;/h2&gt;

&lt;p&gt;You'll eventually need to be able to enable a feature in production, but there are a whole host of things that need to be sorted before that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logging for &lt;strong&gt;monitoring&lt;/strong&gt; &amp;amp; &lt;strong&gt;incident management&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Like reporting this is always considered last, don't make that mistake!&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Automatic &lt;strong&gt;provisioning&lt;/strong&gt; of your infrastructure 

&lt;ul&gt;
&lt;li&gt;Doesn't matter whether you do cloud or on premise, automate it&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;DX&lt;/strong&gt;... Developer eXperience is a thing

&lt;ul&gt;
&lt;li&gt;Enable your developers to focus on their core task&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Automatic &lt;strong&gt;validation&lt;/strong&gt; of code

&lt;ul&gt;
&lt;li&gt;Code scans, QA, linting, the whole nine yards&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Automatic &lt;strong&gt;deployment&lt;/strong&gt; to various environments

&lt;ul&gt;
&lt;li&gt;If you need to manually login, you're doing it wrong&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Feature flags for manual &lt;strong&gt;enabling of features&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;This is your actual go-live, not the deployment to production&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;In case this isn't clear yet, DevOps is the fundamental backbone of everything the teams does, not just ops. The more you can automate the better... There's a reason we're moving to &lt;a href="https://platformengineering.org/blog/what-is-platform-engineering" rel="noopener noreferrer"&gt;Platform engineering&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Less_is_more" rel="noopener noreferrer"&gt;Less is more&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/KISS_principle" rel="noopener noreferrer"&gt;KISS&lt;/a&gt;... we as users already got too much shit being thrown at us, we don't need more. So keep the UX as simple as possible, distill till you nailed it. &lt;/p&gt;

&lt;p&gt;Also from a technical/architectural perspective try to keep it as simple as possible. Design it so it's easy to implement and have as few dependencies as possible. This does however imply an architecture that facilitates compartmentalization so features don't bleed over into one another. &lt;/p&gt;

&lt;p&gt;There's a lot more to be said about design but that's defo a topic for another day!&lt;/p&gt;

&lt;h2&gt;
  
  
  Coding &amp;amp; Validation
&lt;/h2&gt;

&lt;p&gt;These 2 things have become so intertwined (at least in my twisted mind) that I think we shouldn't be considering them as separate disciplines. When you've built a brick wall, you don't just walk away... you check whether it's according to spec. Do the same with the code.&lt;/p&gt;

&lt;p&gt;I'm still not sure what the best approach is when it comes to validation but a substantial part involves the dev... or inversely the QA engineer is also to a large extent a dev. That person may not per se write the unit tests but it makes sense to have tests written in the same way so they can be created, used and improved together. Keep in mind that tests are a ridiculously valuable part of development, it can make your life so much easier!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But&lt;/strong&gt; don't make the mistake of assuming Dev &amp;amp; QA are the same person! They have a distinctly different focus and you don't want to have devs grade their own homework. &lt;/p&gt;

&lt;h2&gt;
  
  
  So how do we KISS?
&lt;/h2&gt;

&lt;p&gt;You will need to do all this, however begin as simple as possible and build from there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define &amp;amp; implement a &lt;strong&gt;base architecture&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Spend time on this please and ask for help&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Define how you &lt;strong&gt;analyse &amp;amp; design feature with the team&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Tickets, whiteboards, design tools, tech specs, whatever floats your boat as long as it's clear to the whole team&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Define your &lt;strong&gt;reporting requirements&lt;/strong&gt; and implement basics&lt;/li&gt;

&lt;li&gt;Setup basic &lt;strong&gt;automations for coding &amp;amp; validation&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Simple things like checking in your &lt;code&gt;.vscode&lt;/code&gt; directory is already super useful&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Setup basic automatic &lt;strong&gt;infrastructure provisioning&lt;/strong&gt; &amp;amp; &lt;strong&gt;deployment scripts&lt;/strong&gt;
&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Stick to the basics, don't make it too big... just make sure you at least start.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rinse and repeat
&lt;/h3&gt;

&lt;p&gt;Use frequent &lt;a href="https://en.wikipedia.org/wiki/Retrospective#Software_development" rel="noopener noreferrer"&gt;retrospectives&lt;/a&gt; to adjust course and do bigger sessions every couple months to look at the fundamentals.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Continuously evaluate&lt;/strong&gt; how well you're doing &lt;/li&gt;
&lt;li&gt;Find &lt;strong&gt;standardisation&lt;/strong&gt; opportunities in everything you do (design, coding, QA, DevOps, architecture, everything!)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate&lt;/strong&gt; the fuck out of your SDLC&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>sdlc</category>
      <category>kiss</category>
    </item>
    <item>
      <title>Nasty ass code</title>
      <dc:creator>Matthijs</dc:creator>
      <pubDate>Sun, 24 Mar 2024 10:53:21 +0000</pubDate>
      <link>https://dev.to/matthijsschuurman/nasty-ass-code-4afo</link>
      <guid>https://dev.to/matthijsschuurman/nasty-ass-code-4afo</guid>
      <description>&lt;p&gt;So I was trying to come up with a way to speed up the initial start time of &lt;a href="https://github.com/MatthijsSchuurman/pipeliner/" rel="noopener noreferrer"&gt;Pipeliner&lt;/a&gt;... and I did it! But it is one of the most &lt;a href="https://github.com/MatthijsSchuurman/pipeliner/commit/6fc394eb187670b7aa48e5d59f19924e5bcf49fb#diff-e8cf6f663d4e84acf7fa6d143d0f92d36cce92443e1483762f5e29490e4db7e6" rel="noopener noreferrer"&gt;nasty ass pieces of code&lt;/a&gt; I've written in a long time... and here is why :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;But first a little bit of background. The project is intended to simplify things (like all code we write I guess :)) and as per my &lt;a href="https://dev.to/matthijsschuurman/why-is-coding-so-ridiculously-overcomplicated-489h"&gt;previous post&lt;/a&gt; I like to &lt;a href="https://en.wikipedia.org/wiki/KISS_principle" rel="noopener noreferrer"&gt;KISS&lt;/a&gt;. So instead of having to deal with dependencies I wanted Pipeliner to auto include the relevant files. &lt;/p&gt;

&lt;p&gt;The initial setup was a bit of a blunt instrument, but it worked. It would simply include all .sh files using the &lt;code&gt;source&lt;/code&gt; command and all functions were available. Naturally the code base grew and this method would also take longer and longer. To the point where it took 1 whole damn second to start a script! ARE YOU KIDDING ME?! 1 WHOLE SECOND? UNFUCKINGACCEPTABLE!!!&lt;/p&gt;

&lt;p&gt;So I &lt;em&gt;had to&lt;/em&gt; come up with something new... which I did... and it's nasty... very nasty!&lt;/p&gt;

&lt;h2&gt;
  
  
  The "code"
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

Files_Pre_Import_Classes&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="nv"&gt;files&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;Files_Get_Class_Files&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;file &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$files&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nv"&gt;functions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"^ *[A-Za-z0-9_]&lt;/span&gt;&lt;span class="se"&gt;\+&lt;/span&gt;&lt;span class="s2"&gt; *( *) *{*"&lt;/span&gt; &lt;span class="nv"&gt;$file&lt;/span&gt; | &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s2"&gt;"s/ *&lt;/span&gt;&lt;span class="se"&gt;\(&lt;/span&gt;&lt;span class="s2"&gt; *&lt;/span&gt;&lt;span class="se"&gt;\)&lt;/span&gt;&lt;span class="s2"&gt; *&lt;/span&gt;&lt;span class="se"&gt;\{&lt;/span&gt;&lt;span class="s2"&gt;.*//"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for function in&lt;/span&gt; &lt;span class="nv"&gt;$functions&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
      if &lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt; &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="nv"&gt;$function&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /dev/null 2&amp;gt;&amp;amp;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt; &lt;span class="c"&gt;#function/command already defined&lt;/span&gt;
        &lt;span class="k"&gt;continue
      fi

      &lt;/span&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$function&lt;/span&gt;&lt;span class="s2"&gt;() { source &lt;/span&gt;&lt;span class="nv"&gt;$file&lt;/span&gt;&lt;span class="s2"&gt;; &lt;/span&gt;&lt;span class="nv"&gt;$function&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="se"&gt;\"\$&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;; }"&lt;/span&gt;
    &lt;span class="k"&gt;done
  done&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Line 1: #!/bin/bash
&lt;/h3&gt;

&lt;p&gt;Well it doesn't get any nastier than this now does it? &lt;a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)" rel="noopener noreferrer"&gt;Bash&lt;/a&gt; (or at least &lt;a href="https://en.wikipedia.org/wiki/Bourne_shell" rel="noopener noreferrer"&gt;sh&lt;/a&gt;) is one of the oldest, if not the oldest, scripting languages around. If there were ever a red flag to stop doing what you're doing then this is absolutely it. This shit was conceived in the late 70s... hardly anyone reading this was bourne back then!&lt;/p&gt;

&lt;p&gt;Although interestingly shell scripting is still around and is probably growing in popularity because of all the DevOps/Platform/provisioning shit we're doing. So how bad could it be... &lt;em&gt;insert dumpster fire meme here&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Line 6: grep... AND sed
&lt;/h3&gt;

&lt;p&gt;I love &lt;a href="https://en.wikipedia.org/wiki/Regular_expression" rel="noopener noreferrer"&gt;regex&lt;/a&gt;... if there was ever one brilliant way to simplify and at the same time ridiculously overcomplicate your code: REGEX FTFW! It is so elegant yet so terrifying... that I try to infect as many people as possible with them. Honestly they're soo much fun!&lt;/p&gt;

&lt;p&gt;But here's the most troublesome part about them... the dialects. Most typically use &lt;a href="https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions" rel="noopener noreferrer"&gt;PCRE&lt;/a&gt;, but not &lt;a href="https://man7.org/linux/man-pages/man1/grep.1.html" rel="noopener noreferrer"&gt;grep&lt;/a&gt;... or &lt;a href="https://man7.org/linux/man-pages/man1/sed.1.html" rel="noopener noreferrer"&gt;sed&lt;/a&gt;. Well at least not by default and even if you could convince them... don't expect it to work on MacOS and Ubuntu. So yeah lets stick with it being all over the place.&lt;/p&gt;

&lt;h3&gt;
  
  
  Line 7: for function in
&lt;/h3&gt;

&lt;p&gt;Yeah lets loop through a list of functions... if you see this kinda code, run the hell away! There are very few usecases to deal with classes, functions and/or variables in a dynamic way. And you know what's coming next...&lt;/p&gt;

&lt;h3&gt;
  
  
  Line 12: evil
&lt;/h3&gt;

&lt;p&gt;Often misspelled as &lt;code&gt;eval&lt;/code&gt;, the &lt;code&gt;evil&lt;/code&gt; command is the Devil... on a bad day... when just kicked in the nuts. Any time you think you need &lt;code&gt;evil&lt;/code&gt;, throw yourself off the highest building in the vicinity... it'll likely end better than continuing whatever ridiculous thing you were doing.&lt;/p&gt;

&lt;p&gt;Why is &lt;code&gt;evil&lt;/code&gt; such a bad idea you ask? It allows you to do things the language isn't designed to do... so don't fucking do it! Honestly don't use it! I can't repeat it enough, you shouldn't need it... And if you do, you're probably trying to do something you shouldn't be doing it the first place.&lt;/p&gt;

&lt;p&gt;The big problem with it is that it has an enormous potential for unintended side effects... and nasty ass security holes! When you use &lt;code&gt;evil&lt;/code&gt; you want to do something dynamic, so you'll have at least 1 variable in there... you &lt;strong&gt;must&lt;/strong&gt; ensure the values are "sane", i.e. &lt;em&gt;do NOT trust user input&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;Imagine my regex's above are a bit brittle (which is quite likely since grep+sed suck balls), what if I defined a function like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;NastyAssFunction&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-Rf&lt;/span&gt; / &lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The only thing that prevents this from wiping your harddrive is the &lt;code&gt;.*&lt;/code&gt; at the end of the sed statement. And yes, this is an invitation to come up with a way to break this code because I'm not 100% convinced the code is solid.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what does it do?
&lt;/h2&gt;

&lt;p&gt;Honestly this is the best part :) For each function definition it finds (in any .sh file) it dynamically predefines a function that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;imports the relevant .sh file

&lt;ul&gt;
&lt;li&gt;which in turn will overwrite all predefined functions with their real definition&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;call the same function again with the same arguments so it executes using the real function definition&lt;/li&gt;

&lt;li&gt;any subsequent calls to the function will use the real definition going forward&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;There is so much potential for failure, it's insane. For starters a &lt;a href="https://en.wikipedia.org/wiki/Recursion" rel="noopener noreferrer"&gt;function calling itself&lt;/a&gt; is likely to cause havoc just for the sake of it being recursive. And yes the first version did in fact royally fuck things up and ended up in an endless loop :) TBH I'm actually surprised it even works, depending on how the language implements imports &amp;amp; recursion it's likely that something like &lt;a href="https://en.wikipedia.org/wiki/Node.js" rel="noopener noreferrer"&gt;node&lt;/a&gt; would just keep calling the predefined one... assuming it's even possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In order to make things simple we often need to resort to complicated mechanisms. Although this particular implementation can potentially be made less terrible, the problem it's trying to solve is a difficult one. And you could argue that a dev should just handle it, but why? Why should we be bothered with mundane repetitive tasks like dependency management? We can automate this shit... or at least we should be able to... &lt;/p&gt;

&lt;p&gt;The big question is: should we be sticking nasty ass code in our code base? I can guarantee that someone (likely me) is gonna run into issues with this. So is it worth the hassle or should we &lt;a href="https://en.wikipedia.org/wiki/KISS_principle" rel="noopener noreferrer"&gt;KISS&lt;/a&gt;? Or why doesn't whatever language simply handle this for us? If I use some namespace can't it just figure out where it comes from and auto include the relevant dependencies at compile time?&lt;/p&gt;

&lt;p&gt;And for the record: I'm still considering whether to leave the code in or not...&lt;/p&gt;

</description>
      <category>coding</category>
      <category>bash</category>
      <category>kiss</category>
    </item>
    <item>
      <title>Why is coding so ridiculously overcomplicated?</title>
      <dc:creator>Matthijs</dc:creator>
      <pubDate>Mon, 11 Mar 2024 10:14:44 +0000</pubDate>
      <link>https://dev.to/matthijsschuurman/why-is-coding-so-ridiculously-overcomplicated-489h</link>
      <guid>https://dev.to/matthijsschuurman/why-is-coding-so-ridiculously-overcomplicated-489h</guid>
      <description>&lt;p&gt;Don't get me wrong, it's not &lt;em&gt;difficult&lt;/em&gt;... it's just way more fucking complex than it should be.&lt;/p&gt;

&lt;p&gt;I'm coding some &lt;a href="https://github.com/MatthijsSchuurman/pipeliner" rel="noopener noreferrer"&gt;framework&lt;/a&gt; atm and decided to do it &lt;em&gt;the right way&lt;/em&gt;... you know picking a &lt;a href="https://en.wikipedia.org/wiki/List_of_programming_languages" rel="noopener noreferrer"&gt;language&lt;/a&gt; (and version...), choosing the right &lt;a href="https://en.wikipedia.org/wiki/Programming_paradigm" rel="noopener noreferrer"&gt;paradigm&lt;/a&gt;, doing &lt;a href="https://en.wikipedia.org/wiki/Test-driven_development" rel="noopener noreferrer"&gt;TDD&lt;/a&gt;, creating &lt;a href="https://en.wikipedia.org/wiki/CI/CD" rel="noopener noreferrer"&gt;CI/CD&lt;/a&gt; pipelines that trigger automatically when you raise a PR but can also be ran locally (oh and of course setting up github/azdo/bitbucket/whatever), choosing a &lt;a href="https://en.wikipedia.org/wiki/Software_license" rel="noopener noreferrer"&gt;license&lt;/a&gt; and prolly a whole lot more that I don't even realise. The only thing I didn't bother with (yet...) is &lt;a href="https://github.com/infertux/bashcov" rel="noopener noreferrer"&gt;code coverage&lt;/a&gt;. And all that before writing a single line of code.&lt;/p&gt;

&lt;p&gt;And then totally unrelated I wrote the following script:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ vim ~/bin/aur&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

git pull

makepkg &lt;span class="nt"&gt;-i&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And kept thinking how elegant and readable this is... and how I could royally fuck it up if I would do &lt;em&gt;the right way&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Disclaimer
&lt;/h3&gt;

&lt;p&gt;Just to be clear, this post has no point whatsoever. It merely raises a whole bunch of questions and maybe some solutions... or rather asks the reader (yeah that's you) to come up with solutions and hopefully share them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we do all this?
&lt;/h2&gt;

&lt;p&gt;Honestly software engineering (aka coding) is an complete intertwined shit-show, which is so easy to dive into (&lt;a href="https://en.wikipedia.org/wiki/%22Hello,_World!%22_program" rel="noopener noreferrer"&gt;Hello, World!&lt;/a&gt;) that everybody think they can do it... and consequently think they know better. So much so that people that never wrote a line of code are &lt;a href="https://leewaterman.com/dont-make-squirrel-burgers/" rel="noopener noreferrer"&gt;telling devs how to do their job&lt;/a&gt;. Which is probably the first hint at why we setup such an elaborate maze of tools, practices and processes...&lt;/p&gt;

&lt;h3&gt;
  
  
  Accountability
&lt;/h3&gt;

&lt;p&gt;If something breaks, it's the dev's fault... not the PO for writing up a half-arsed feature or QA for not testing that 1 in a million scenario that he/she didn't have time for... or the CEO that doesn't want to spend more on their bread and butter.&lt;/p&gt;

&lt;p&gt;Yeah that's right, software is your &lt;a href="https://en.wikipedia.org/wiki/Unique_selling_proposition" rel="noopener noreferrer"&gt;USP&lt;/a&gt; these days! The only way your gonna have an edge over your competition (in most businesses anyway) is to have the right tools and if those tools don't exist, you'll need to create them. You can have the best product/service in the world but if you don't have the software to back it up, your competitors will overtake you in an instance. That said, wouldn't it be nice if we could do it cheaper? Or at least smarter, cuz otherwise so could the competition...&lt;/p&gt;

&lt;p&gt;Anyway, we're all accountable for the software we create, but we also need to be able to &lt;em&gt;be&lt;/em&gt; accountable for it. So how can we be accountable for something ever-evolving and so complex that we can't even begin to understand what can possibly go wrong?&lt;/p&gt;

&lt;p&gt;Over the years we came up with a whole bunch of things (&lt;a href="https://en.wikipedia.org/wiki/Agile_software_development" rel="noopener noreferrer"&gt;ASD&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/CI/CD" rel="noopener noreferrer"&gt;CI/CD&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Domain-driven_design" rel="noopener noreferrer"&gt;DDD&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Functional_programming" rel="noopener noreferrer"&gt;FP&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Extreme_programming" rel="noopener noreferrer"&gt;XP&lt;/a&gt; and the list goes on and on) in an attempt to solve the problems we faced. But what actually are those problems? And why do these solutions also create an equal amount of new problems? And why is there so much crap that I need to understand to write 1 line of code?&lt;/p&gt;

&lt;h3&gt;
  
  
  Fluidity
&lt;/h3&gt;

&lt;p&gt;Probably the biggest problem that people generally tend to miss is the &lt;em&gt;fluidity&lt;/em&gt; of software. When you build a (physical) house, it's pretty much fixed once it's done. You wouldn't decide the next day to add a swimming pool to the top-floor... and if you did, there would be at least 20 people telling you that, although awesome... it's a stupid fucking idea. In software however, the consequence of putting in a swimming pool isn't that it's gonna collapse and kill everyone in the building. It will weaken the foundation a bit but hey what's another bit of &lt;em&gt;technical debt&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;A fundamental part of this however is the ever-evolving nature of software. It's never finished and it never goes in the bin. Once a line of code is committed, it will likely stay there for the coming 10 years. And the problem with that is you didn't consider how that big-ass pool is gonna affect it, as no-one told you about the pool... or even considered it. As a matter of fact that 1 line of code may inspire someone to suggest that, if we can do this... we can also build a pool, right? What we create is often the inspiration for the next thing, potentially taking it in a completely new direction. But is the &lt;em&gt;foundation&lt;/em&gt; strong enough for this?&lt;/p&gt;

&lt;p&gt;And there is also the matter of all the legacy crap we keep carrying around. How do we ensure that that keeps working as expected? Cuz even though we wanna bolt new shiny things on top of it we can't loose those old (formerly shiny) things. Back in the day coding was a lot more like building a house, we'd do it once and a year later we'd build an improved version of it, having ample time to &lt;em&gt;validate&lt;/em&gt; the old crap... not anymore.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resilience
&lt;/h3&gt;

&lt;p&gt;Although related to the fluidity in an architectural sense (how well does it cater for change?), resilience in software also relates to how well it runs. We expect software to always work but develop it in the narrowest possible conditions... "it works on my machine". And that's partly why a dev will always say it &lt;em&gt;should&lt;/em&gt; work. It's so complex that dropping the exact same code on another machine typically will fail spectacularly!&lt;/p&gt;

&lt;p&gt;So how is it that we created something so complex that we can't even predict whether it will work, let alone how well. Which is pretty impressive as everything we do is at the end of the day a very binary choice. But why than can't we deliver on the expectation that it always works, regardless of the conditions?&lt;/p&gt;

&lt;p&gt;We need ensure all prerequisites are exactly met and otherwise it simply won't work. Tools like &lt;a href="https://en.wikipedia.org/wiki/Docker_(software)" rel="noopener noreferrer"&gt;Docker&lt;/a&gt; will help us with that but there's still an endless amount of variables that we don't control... or even consider. &lt;a href="https://en.wikipedia.org/wiki/Chaos_engineering" rel="noopener noreferrer"&gt;Chaos engineering&lt;/a&gt; is one approach of making things more resilient but that's a requires a pretty hefty investment. Also it assume your software works, but what does that really mean? That it runs on your machine / prod cluster given the exact right circumstances? What if I want to run it on a new test cluster? How much shit would I need to setup before I even can start throwing a simian army at it?  &lt;/p&gt;

&lt;h3&gt;
  
  
  Scale
&lt;/h3&gt;

&lt;p&gt;If you write a quick little bash script like the &lt;a href="https://aur.archlinux.org" rel="noopener noreferrer"&gt;AUR&lt;/a&gt; building example in the intro you can afford to ditch all the best practices. Or at least it's relatively safe to assume it's not gonna get extended or used anywhere else or by anyone else. But the bigger the stakes the more important such factors start to become. Lets say you want to provide a AUR building &lt;a href="https://en.wikipedia.org/wiki/Software_as_a_service" rel="noopener noreferrer"&gt;SAAS&lt;/a&gt; platform, that piece of code at the top is probably gonna be in there somewhere... but you might also wanna consider a &lt;a href="https://en.wikipedia.org/wiki/Microservices" rel="noopener noreferrer"&gt;microservices architecture&lt;/a&gt;... among 20000 other things.&lt;/p&gt;

&lt;p&gt;It so depends on what you're end goal is on how "well" your code should be written. And the terrible truth is that half of the time we're figuring out the end goal along the way. So how can we make a proper judgement of how solid our code needs to be? Especially with a PO breathing down your neck who wants to get the feature out asap... and then bitches 2 weeks later that the next feature is taking too long cuz you need to clean up the mess of the first feature. So how can we write &lt;em&gt;good enough&lt;/em&gt; code that don't have to rewrite/bin 2 weeks later? Or should we be writing throw-away code? And if so is there an architecture that actually facilitates this? And would the business even accept that? It is at the end of the day our &lt;a href="https://en.wikipedia.org/wiki/Intellectual_property" rel="noopener noreferrer"&gt;IP&lt;/a&gt;, right?&lt;/p&gt;

&lt;h3&gt;
  
  
  Security
&lt;/h3&gt;

&lt;p&gt;Another important (and royally underestimated) reason why such an overcomplicated mess of crap is needed, is &lt;em&gt;security&lt;/em&gt;. We put locks on our doors to prevent unauthenticated and/or unauthorised people from coming in and additionally we also create secure briefcases to carry important information from A to B... and figure out how to deal with lock pickers and continuously monitor if our building is still up-to-date with (literally) today's standards. Or at least we should. &lt;/p&gt;

&lt;p&gt;So how do you write secure code? How do you ensure your dependencies are secure (remember &lt;a href="https://en.wikipedia.org/wiki/Log4Shell" rel="noopener noreferrer"&gt;log4j&lt;/a&gt;?)? The long and short of it is: you can't... at best you can write software that takes more effort to break than the value gained if someone would break in. In other words the bigger the pot of gold your software is protecting the better security you need.&lt;/p&gt;

&lt;p&gt;But half of the time people don't even know that the code they're writing is full of holes. And you can't really blame them as it's such a vast and complicated topic that fully understanding, in addition to all the other crap you need to know, is nearly impossible. So how do we create secure code then? Without having know every last little best practice or implement code scanners (and understanding and dealing with the results)... Or should we just deal with it in relation to the scale? i.e. initially the pot of gold is pretty small so who cares? But it would be so nice if it could be secure by default... like resilient by default...&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So lets wrap this up for now. Normally you'd put some nice lessons learned here but there are none... other than coding being overly complex... but we kinda knew that when we started. &lt;/p&gt;

&lt;p&gt;Here are a bunch of questions that I think we should consider... and that I might consider in future writings: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How can we be fully &lt;strong&gt;accountable&lt;/strong&gt; for what we build?

&lt;ul&gt;
&lt;li&gt;In other words how do we create control over what we build?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;How do we deal with the &lt;strong&gt;ever-evolving nature&lt;/strong&gt; of software?

&lt;ul&gt;
&lt;li&gt;How do we stay in control over what we've built and what is still to come?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Do we just start building and &lt;strong&gt;scale&lt;/strong&gt; when needed?

&lt;ul&gt;
&lt;li&gt;Or can we easily build for scale? &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;How can we build &lt;strong&gt;secure enough&lt;/strong&gt; software?

&lt;ul&gt;
&lt;li&gt;Or can we make it 100% secure by default?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Should we be proud of the vast amount of crap we created in the last 70+ years?

&lt;ul&gt;
&lt;li&gt;And how do we condense all this in 1 person's mind and expect them to create wonders?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Lastly, what if we had a greenfield? How would we deal with these problems? Could we do something radically different?&lt;/p&gt;

</description>
      <category>coding</category>
      <category>testing</category>
      <category>devops</category>
      <category>kiss</category>
    </item>
  </channel>
</rss>
