~mrlee/www.kamelasa.dev

df87c28002dfe257425736065d3fa6f6b2847b7d — Lee Machin 11 months ago 23067d7
Add new post about microservices
M .gitignore => .gitignore +1 -3
@@ 1,4 1,2 @@
.stack-work
_cache
# Local Netlify folder
.netlify
\ No newline at end of file
_cache
\ No newline at end of file

A .netlify/state.json => .netlify/state.json +3 -0
@@ 0,0 1,3 @@
{
	"siteId": "de11ab72-be03-49af-841b-8d4b290697cc"
}
\ No newline at end of file

D _site/about.html => _site/about.html +0 -54
@@ 1,54 0,0 @@
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>mrlee.dev - About</title>

    <link rel="stylesheet" href="./css/terminal.min.css" />
    <link rel="stylesheet" href="./css/main.css" />
    <link rel="stylesheet" href="./css/syntax.css">
</head>

<body class="terminal">
    <div class="container">
        <div class="terminal-nav">
            <header class="terminal-logo">
                <div class="logo terminal-prompt">
                    <a class="no-style" href="./">mrlee.dev</a>
                    <span>special topics in calamity software dev</span>
                </div>
            </header>
            <nav class="terminal-menu">
                <ul vocab="https://schema.org/" typeof="BreadcrumbList">
                    <li><a href="https://cv.mrlee.dev" style="display: none">Hire me</a></li>
                    <li><a href="https://github.com/mrleedev/">Github</a></li>
                </ul>
            </nav>
        </div>
    </div>

    <main class="container">
        <p>Nullam imperdiet sodales orci vitae molestie. Nunc quam orci, pharetra a rhoncus vitae, eleifend id felis. Suspendisse potenti. Etiam vitae urna orci. Quisque pellentesque dignissim felis, egestas tempus urna luctus vitae. In hac habitasse platea dictumst. Morbi fringilla mattis odio, et mattis tellus accumsan vitae.</p>
<ol type="1">
<li>Amamus Unicode 碁</li>
<li>Interdum nex magna.</li>
</ol>
<p>Vivamus eget mauris sit amet nulla laoreet lobortis. Nulla in diam elementum risus convallis commodo. Cras vehicula varius dui vitae facilisis. Proin elementum libero eget leo aliquet quis euismod orci vestibulum. Duis rhoncus lorem consequat tellus vestibulum aliquam. Quisque orci orci, malesuada porta blandit et, interdum nec magna.</p>
    </main>

    <footer class="container">
        <header>
            <p class="modeline inverse-video">
                -UUU:----F1&nbsp;&nbsp;About&nbsp;&nbsp;&nbsp;&nbsp;Bot L100%&nbsp;&nbsp;Git:master&nbsp;&nbsp;(HTML+)
                ----------
            </p>
        </header>
    </footer>

</body>

</html>
\ No newline at end of file

M _site/archive/index.html => _site/archive/index.html +9 -0
@@ 40,6 40,15 @@
            <td class="file-permission">-rw-r--r--</td>
            <td class="user">mrlee</td>
            <td class="group">www</td>
            <td class="size">8772</td>
            <td class="date">July 21, 2020</td>
            <td><a href="../programming/do-you-really-need-those-microservices">Do you really need those microservices?</a></td>
        </tr>
        
        <tr>
            <td class="file-permission">-rw-r--r--</td>
            <td class="user">mrlee</td>
            <td class="group">www</td>
            <td class="size">11753</td>
            <td class="date">July 20, 2020</td>
            <td><a href="../personal/a-decade-of-work">A decade of work</a></td>

A _site/atom.xml => _site/atom.xml +287 -0
@@ 0,0 1,287 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>mrlee.dev</title>
    <link href="https://www.mrlee.dev/atom.xml" rel="self" />
    <link href="https://www.mrlee.dev" />
    <id>https://www.mrlee.dev/atom.xml</id>
    <author>
        <name>Lee Machin</name>
        <email>www@mrlee.dev</email>
    </author>
    <updated>2020-07-21T00:00:00Z</updated>
    <entry>
    <title>Do you really need those microservices?</title>
    <link href="https://www.mrlee.dev/programming/do-you-really-need-those-microservices" />
    <id>https://www.mrlee.dev/programming/do-you-really-need-those-microservices</id>
    <published>2020-07-21T00:00:00Z</published>
    <updated>2020-07-21T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">Do you really need those microservices?</h2>
        <span class="ert">~4 min. read</span>
    </header>

    <section>
        <p>I’ve been through half a dozen rounds of interviewing over the past couple of months, with different companies. Naturally, when you say you’ve had experience working with microservices, you’re practically begging the question. What do you think about them?</p>
<p>I’m not really for-or-against them, and in fact I find it a little strange and frustrating when it’s expected that you take a side in favour of having a nuanced opinion. The idea of being pro-microservice and anti-monolith, for example, is utterly absurd. It’s never really voiced that way, but it’s often easy to detect the absolutist stance masquerading as a balanced opinion. Even the title of this post falls victim to that, as the question presented is quite clearly loaded.</p>
<p>Anyway, I love being asked this question because after a good five years of working with distributed systems orchestrated by Kubernetes, almost entirely in the form of ‘migrating away from the monolith’, I’ve had plenty of time to formulate and adapt my thinking around it.</p>
<p>First and foremost, I believe the main benefit of a business switching to microservices is the manifestation of Conway’s Law<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> in practice. Prior to making the switch in architecture, the business most likely decided on an organisational structure that exchanges large, difficult to manage teams for a distributed collection of smaller, self-sufficient, self-empowered teams. More often than not these follow a squad and chapter model, otherwise reduced to ‘the Spotify model’, and a hierarchy of cross-functional teams is established. Once that structure is put in place and people are shuffled around a bit, the question of ownership in a mixed-responsibility, mixed-domain codebase becomes apparent. Microservices are thus the solution to a perceived conflict between squads and they shift a lot of that conflict from the teams themselves, to the channels in-between them.</p>
<p>Under no circumstance is the technical implication of such a change considered, particularly in older codebases for which this change would introduce a significant level of disruption. The organisational benefits of distributing teams and workload are substantial, but the drawbacks of distributing <em>code</em> are similarly worthy of consideration too, and it often becomes a gateway to extra complexity as once-simple tasks find themselves spread apart over various network calls and machines.</p>
<p>I don’t consider this a dealbreaker, but in my experience I’ve always felt like there’s a step missing between the singular, monolithic codebase and the highly distributed microservice architecture. There’s a hell of a lot you can do in that singular codebase, in terms of taking smaller steps towards a service-oriented architecture, or a domain-driven one.</p>
<p>In those situations, you are investing primarily in the work required to understand the different domains in your codebase and how they speak to each other, with much lower risk than fundamentally changing your infrastructure as well as your architecture. In Ruby, you can abstract code into gems and provide solid, public APIs that other parts of the code can use. In Java you have modules and packages. Every language you care to use has the concept of packaging code into bundles or libraries that can be shared as a dependency.</p>
<p>Adopting this workflow introduces much lower risk because, in the event of failure, you can easily adjust your expectations around the domains and how they communicate and fix them in a singular release. It may not be perfect, but if you refactor enough of your code in SOA<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>/DDD<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a> style then you’ll have a much easier time turning those domains into proper microservices further down the line.</p>
<p>This is where a microservice architecture truly shines. If you have clear, well bounded domains, and you’ve developed solid API contracts as well as standards for versioning, logging, etc to allow for centralised aggregation of useful resources (for debugging or auditing, for example), and if the team in charge of the domain can essentially treat that service as a full-blown product with documentation, support, and its own priorities and backlog, then that is where the power of that infrastructure comes into play.</p>
<p>Another amazing usecase for this architecture is when you have strong regulatory requirements to sequester and protect personally identifying information. This could involve PCI compliance as a financial business, HIPAA as an American medical firm, or GDPR for a whole host of privacy concerns across the EU and the UK. Network access can be controlled much more easily than different modules or functions in your singular codebase, and the risk of a low-importance feature being compromised to access the critical resources in that case is far too high.</p>
<p>I believe that’s a lot easier to do when you start early, but if you come to it late then you fall into an easy trap: how do you migrate your stuff into new services while also maintaining your existing codebase, along with all the features that you’re still expected to deliver? You can’t stop the world to rewrite all of the code, so there’s a possibility that you enter a refactoring spiral as your service plays cat and mouse with the monolith. This is infinitely more difficult when migrating a codebase written in a dynamic language, as automated refactoring is nowhere near as easy without a solid type-system to back it up.</p>
<p>If I was to offer anybody advice about how to make all of this happen successfully, I’d say to stop thinking in terms of the existing monolith, and instead look at what individual products you could separate or extract, or even spin-off into their own businesses if the idea was unique enough to sell individually. And don’t jump to solutions like Kubernetes until you’re dealing with enough of these services that your existing deployment setup is too hard to manage.</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Conway%27s_law" class="uri">https://en.wikipedia.org/wiki/Conway%27s_law</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Service-oriented_architecture" class="uri">https://en.wikipedia.org/wiki/Service-oriented_architecture</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Domain-driven_design" class="uri">https://en.wikipedia.org/wiki/Domain-driven_design</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></summary>
</entry>
<entry>
    <title>A decade of work</title>
    <link href="https://www.mrlee.dev/personal/a-decade-of-work" />
    <id>https://www.mrlee.dev/personal/a-decade-of-work</id>
    <published>2020-07-20T00:00:00Z</published>
    <updated>2020-07-20T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">A decade of work</h2>
        <span class="ert">~7 min. read</span>
    </header>

    <section>
        <p>I first ‘got into’ programming back in 2003, or 2004. I can’t remember the exact time, but it was at the point where Geocities and AngelFire were still a thing, as was Myspace. The in-thing was to host your own phpBB forum and, much like people will do with forks on github, branch off existing communities into your own ad-riddled alternative. I remember being involved in a few and, actually, a small number of them turned out to be quite successful.</p>
<p>What also existed back then was the ‘dotTk’ domain, which allowed you to point all kinds of things to it, typically from weird free hosts like 20M. Of course, they would be ad-riddled too. This was before the time that even popup blockers were mainstream, and most of the ads were, in retrospect, quite goofy. You could ‘spank the monkey’ or fire darts and stuff in weird ad-based minigames. While you could easily get scammed or end up with a virus that dialled into a premium hotline using your landline, they feel a lot more innocent than the kind of misleading crap you get today, which is sometimes difficult to distinguish from genuine content.</p>
<p>But, I digress, I’m not here to talk about advertising, social media, and the slow descent into madness of the modern internet, I’m here to talk about what it’s been like as a software developer (or engineer or whatever) over the past ten years of professional work with a good four or five on top as a newbie learning the ropes. This was the time when CSS was barely even standard, and building a website involved pirating a copy of Macromedia Dreamweaver (long since bought out by Adobe) and dragging layers of boxes around a window to get a layout you want. The HTML it would generate was truly awful and it was still common to do all of your layout with tables. It was generally easier to build for IE6 back then since the Mac didn’t enjoy the ubiquity it now does, and Firefox was still in its early-ish days. Javascript wasn’t really a thing back then, but DHTML<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> was all the rage and was what allowed you to put flaming cursors or snowflakes all over your page.</p>
<p>I fondly remember that day when I dared to look at the generated HTML from my own example sites, and decided to learn how to write things by hand instead. It was all HTML4 back then, with XHTML on the horizon which promised a bit more strictness. Before then, I’d browse through Albino Blacksheep<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> and it’s collection of funny things that we now call ‘memes’, only back then they were a lot more creative and unique and only occasionally memetic, as in the case of Joel Veitch/rathergood.com and his being commissioned to do a TV ad in his style<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a>.</p>
<p>Back on topic, before I drown in nostalgia. The reason I mention Albino Blacksheep is because I <em>still</em>, after all this time, remember one post the author made about how he built the site. He said he did it all in Notepad. <em>Notepad</em>! If you’re not aware, Notepad is a barebones text editor on Windows, not unlike TextEdit on Mac. I was fascinated because, to my 15/16-year old mind, that seemed like an impossible feat.</p>
<p>That was about the age that I went to sixth form, and I was lucky enough to get into one of the more prestiged colleges than most at my high school. It was just me and my best friend (also called Lee) basically, and we decided we wanted to go together. At the time I generally wasn’t thinking that programming would be a career for me, and my parents put a lot of pressure on me to get into ‘computing’ which for them meant computer repair so I could work for them for nothing whenever their stuff broke, which happened quite often. My dream back then was actually journalism and I did far better in English and classical literature than I did in IT (I got a D in my A-levels).</p>
<p>I essentially got into programming as a joke, because a friend in my new social circle wanted a website, or at least hinted at it. I can’t fully remember what was on the site, but I used part of my part-time income from Tesco to buy a .co.uk domain in his name and point it to a little HTML thing I made and hosted through the registrar’s free web hosting service. All I needed was an FTP client and a bit of dragging and dropping.</p>
<p>Before I even knew it I had ‘PHP4 for dummies’ and ‘MySQL for dummies’ on the desk under my weird bunk-bed setup, and I only found out about this stuff through faffing around with those phpBB forums and looking at the configs. I remember <em>why</em> I sought that out though: I had a different website and noticed that it always displayed the current time when you refreshed it. I searched for how to do it and found examples in PHP, mostly from the comments section that each page of PHP docs had. It was literally as simple as changing the file extension from <code>html</code> (or <code>htm</code>) to <code>php</code> and then adding <code>&lt;?php echo date(); ?&gt;</code> wherever you wanted it. Deploying it was a case of dragging and dropping through FTP as most of these shared hosts offered PHP by default.</p>
<p>That was literally my first line of dynamic code.</p>
<p>Skip ahead a few years, all the way to 2012 when I moved to London. I’d worked a PHP job full time before then but it was only at New Bamboo where I would find my form. They wrote everything in Ruby on Rails, and my experience in that was extremely minimal. Somehow I’d set up a redis server and had ruby communicating with it on my own hardware, but it didn’t do much and I couldn’t really figure out the code a few months after I wrote it. This required learning a lot of new things in terms of building application servers, and deploying code. Capistrano<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a> was the tool of choice in Ruby-land for deploying to a VPS and it was essentially a DSL over a bunch of shell scripts. In all honesty this DSL was great but were I not made to use it, I would be a lot more intimate with the power of SSH and tools like <code>scp</code>, and understanding the issue with things like forwarding your SSH agent because you pull from a private git repo on your server.</p>
<p>I won’t talk much about the code, although my years at New Bamboo were truly formative. One thing has stuck with me since then though, over the 8 years since I was told it. My boss at the time saw I was struggling with managing the expectations of the client I was working with, and I was trying too hard to do things alone and hoping for the best instead of reaching out for the help that was readily available. I must have only been about 5 months into the job at that point. My boss took me into our boardroom, the table of which doubled up as a pingpong table, asked if I was alright, and then said something I’ve never forgotten since:</p>
<p><em>“Being a great developer is about a lot more than writing great code.”</em></p>
<p>Of course, at the time I was ashamed for mucking up and felt embarrased, but I was being given a piece of advice that would, in hindsight, radically change the direction of my career. I since became fascinated with the role of a scrum master, and took on the position full time myself. And as I moved into different positions at different companies (like Typeform and Friday Pulse), I continually realised that my favourite thing about programming wasn’t just the raw challenge of solving a problem in code, but in the <em>people</em> side of it. I’m not talking about management per se, it’s more about what else you can do with a good amount of knowledge and a strong desire to mentor and encourage those around you so they too can boost themselves up.</p>
<p>That’s been an ongoing theme since mid-2015, even as I moved to Latvia and then eventually returned to London, and if anyone asks me what I consider to be great achievements when I interview, or have a conversation, I will always point to those people who I saw fluorish because they were given the time, space and effort to do so.</p>
<p>Now it’s 2020, and not much has changed except that I enjoy the programming side of things a lot more than I used to. You could say that those two sides of the coin have started to merge into one imperfect sphere. Language is all communication and, these days, I enjoy trying to solve problems in different languages just so I can learn how to communicate similar technical things better in terms that I’m more familiar with. The same as I enjoy learning spoken languages to empathise in the same way.</p>
<p>The world has changed <em>a lot</em> in all that time, and I now find myself in my thirties. Not once in my life did I ever think or believe I would be doing this kind of thing as a career, and I’ve grown to love it. If I were to tell my teenage self anything, knowing all of this… I would keep my mouth shut. He managed to figure it out just fine.</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Dynamic_HTML" class="uri">https://en.wikipedia.org/wiki/Dynamic_HTML</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://www.albinoblacksheep.com/archive/" class="uri">https://www.albinoblacksheep.com/archive/</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://www.youtube.com/watch?v=3AoNKGwBB74" class="uri">https://www.youtube.com/watch?v=3AoNKGwBB74</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn4" role="doc-endnote"><p><a href="https://capistranorb.com/" class="uri">https://capistranorb.com/</a><a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></summary>
</entry>
<entry>
    <title>Isolation, aloneness and loneliness</title>
    <link href="https://www.mrlee.dev/personal/isolation-aloneness-and-loneliness" />
    <id>https://www.mrlee.dev/personal/isolation-aloneness-and-loneliness</id>
    <published>2020-07-07T00:00:00Z</published>
    <updated>2020-07-07T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">Isolation, aloneness and loneliness</h2>
        <span class="ert">~4 min. read</span>
    </header>

    <section>
        <p>I don’t doubt that the COVID-19 situation this year has forced many of us to confront aspects of ourselves we were previously able to hide behind a mask. In some ways, this has been tragic and, unfortutely, traumatic as well. That isolatation has deprived partners from space away from their abusers at home, making a bad situation even worse for them. In other cases, it has made domestic violence much more apparent as people reveal an uglier side to themselves, frustrated by the prolonged contact. It’s truly devastating and it can be hard to comprehend the sort of horror that takes place in the home unless you’ve been unfortunate enough to suffer from it yourself. I suffered it myself, at the hands of my sister’s abusive boyfriend, and it was enough for me to contemplate life without any of my family in it. Took me a few years to follow up with that and come to terms with it, but I’m glad I did.</p>
<p>That’s not the full topic of this post, but I think it’s important to acknowledge that because we all-too-often see the idea of a ‘relationship’ being the solution to a problem: not wanting to be single, feeling lonely and unhappy, seeing other people in happy relationships, etc. In reality, this sort of ‘solution-based’ relationship puts the onus on the other partner to make you feel happy or loved; not yourself. And for every person who hates their single life, there will be at least one other person who hates their married, or committed life, and struggles to see their way out of it and back towards independence.</p>
<p>Now I’ve explained where I’m coming from, let’s move on.</p>
<hr />
<p>For a long time (up until the last few years) I’ve considered myself a lonely person, or a bit of a loner. It sounds like a label to identify by and, if I were to call myself a loner enough times, it surely would become an identity. What I really mean when I say it, though, is that I don’t feel like I have the capacity to provide myself the comfort, the fulfilment, the happiness, that I feel lacking in. There’s a psychological undercurrent to it of course, based on my childhood, but I’m ultimately disempowering myself and also signalling that I don’t really have that kind of positive feeling to give out either. There’s an absence of it and I’d like it if someone else shared some with me.</p>
<p>Don’t get me wrong, everyone needs love, support, acknowledgement, recognition… and there’s no harm in asking for a proper big hug or a shoulder to cry on when you really want one. If you’re not afraid of asking for that kind of support then more power to you; it’s a brave move to be so open with your vulnerability that way.</p>
<p>Eventually though, that continual desire to receive this energy from other people (as opposed to finding it within yourself somehow) is going to result in a self-fulfilling prophecy where you are convinced that you are lonely, or a loner, purely because you’ve taught yourself to believe that.</p>
<p>I have to say that I’m endlessly grateful to my closest, bestest friends for pointing out to me that it does’t really have to be that way, so it was about five years ago that I started learning the difference between <em>lonely</em>-ness and <em>alone</em>-ness (deliberate mis-spellings for emphasis).</p>
<p>I seriously enjoy being alone, and to understand the difference there was hugely empowering to me. It’s truly a liberating distinction that unlocks so many opportunities that were previously unavailable because of the expectation they had to be done ‘with someone’ or with a group. Maybe out of a desire to be romantic, or to share with someone, or just because society finds it weird if you don’t.</p>
<p>Most of the places I’ve travelled to for a holiday have been alone. A week in Croatia, a few days in Mykonos before my best friend turned up, a weekend in Istanbul and in Verona, etc. This of course necessitates dining alone, and it feels great to ask for a table for one and then watch the world go by with a nice meal and a good book, maybe sharing a few stories with the waiters and waitresses there. Beyond that, a trip to the cinema by yourself can be quite refreshing too. There’s not really a limit to it once you can stop worrying about what other people really really aren’t thinking about you.</p>
<p>The difference here is that there is a source of happiness and comfort in the aloneness, and it is self-sufficient. It doesn’t completely remove feelings of loneliness, as there can still be underlying reasons for that emotion, but in and of itself it can be hugely enriching, maturing, and enlightening.</p>
<hr />
<p>So how does this pertain to the lockdown period we’ve found ourselves in since March? I have to admit that I’ve felt pangs of loneliness every now and then, and I seriously miss the social chit-chat at the pub after work, or meeting up with close friends to chill out. At the same time, I’ve discovered enough in myself over recent years to give me plenty to engage with and enjoy while I’m alone at home. As much as I’d love to dip my feet in more social things, like the dating scene and such like, I still feel quite comfortable riding this out by myself until I’m comfortable that it’s safer for me to do so. It’s a great feeling to have.</p>
<p>That said, I do have to take care with how I feel about this because one aspect of depression is a tendency to disconnect and isolate, so some level of self-awareness is required to tell the difference between cutting myself off and hiding from the world, and just enjoying my own company.</p>
<p>I started off the post talking about relationships, and not in a positive way either. It’s taken me a long time to establish this mindset, and properly ingrain it into my thinking process, but it also feels great knowing this, understanding that using another person as a solution to loneliness–a relationship as a means to an end–isn’t really a good or balanced foundation to authentically build a connection from.</p>
<p>The lockdown has been a great way to cement that in place for me and when all is said and done, it will definitely have had an impact on how I enjoy life from here on out.</p>
<p>🕉</p>
<p><small>P.S. I promise I’ll write some programming related stuff soon :))</small></p>
    </section>
</article>]]></summary>
</entry>
<entry>
    <title>On Sharing Vulnerability</title>
    <link href="https://www.mrlee.dev/personal/on-sharing-vulnerability" />
    <id>https://www.mrlee.dev/personal/on-sharing-vulnerability</id>
    <published>2020-07-03T00:00:00Z</published>
    <updated>2020-07-03T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">On Sharing Vulnerability</h2>
        <span class="ert">~3 min. read</span>
    </header>

    <section>
        <p>One of the most wonderful things I’ve seen on the internet in recent years is our growing willingness to be vulnerable, together. I have to admit that this wasn’t really a ‘thing’ for me until I’d read Daring Greatly by Brene Brown<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>, as well as Rising Strong<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>. As far as self help books go, I don’t think I would actually categorise them as such.</p>
<p>Even LinkedIn these days is full of posts of people sharing their failures, admitting mistakes, dropping their egos, and being authentic with each other in favour of presenting a flawless persona. It’s a beautiful thing, to allow yourself to be yourself, your very human self, without the pressure of having to appear flawless.</p>
<p>For me, this extends a bit further although I appreciate that it’s something that has to be taken on balance, because there’s a difference between making mistakes and doing the same thing deliberately or with purpose. For example, when I record a video for Youtube, I’ll generally go for one take, without any editing beyond making sure the sound of my voice isn’t too quiet, or doesn’t blow your eardrums out. All of the vocal mistakes and mis-spoken words will remain, as will the pauses for thought.</p>
<p>As a software engineer, this happens a lot when writing code and architecting systems too. I suppose I’m a mix between a try-hard and a people-pleaser, so the bar I set for myself is miles higher than the expectations anyone else have, if they have any at all. In that situation, I’ve raised the stakes for myself so fucking high that even the slightest error can be heartbreaking. Thankfully I’ve brought that under control over the years, as I’ve grown older and wiser, but I still notice it in myself. It’s funny though, because through my training as a coach, and through my experience of co-founding and coaching at Rails Girls London, I am a lot more effective at guiding others through similar challenges than I am with applying them to myself.</p>
<p>As you might have guessed, it’s a lot easier to take care of others instead of taking care of yourself and, at least in the West, we’ve ended up with this bizarre, paradoxical mix of individualism and selflessness. You know, you own your success but others are responsible for your failures. It’s pretty toxic, but I digress.</p>
<p>I’m not sure what point I’m trying to make, except that I appreciate the injection of humanity into our disembodied communications over the internet. Being vulnerable isn’t just sharing your childhood trauma or doing a bit of emotional dumping, as valid as those are in some situations, but also drawing back the curtains in front of your heart and releasing some of that darkness into the light that others cast.</p>
<p>Ok, that’s a weird metaphor I know, I’m not even sure I like it :D but you know, it was the first thing that came into my mind and my experiences over the past five or six years have led me to confront my own shadow face to face. Light and dark kind of fits, so long as you don’t consider them good and bad. They are neither, just different.</p>
<p>To wrap this up, I recognise that a lot of people personally reach out to me and share their appreciation for me sharing my own vulnerability. For me, it’s almost normal, although it’s taken a while to figure out how to express it in a healthier way, while continuing to empower myself as opposed to retreating into those frankly shitty feelings and memories. At one time, I found it hard as well, but I had amazing support all the way along and I was never alone with it.</p>
<p>So, considering that we see ourselves becoming more distant as a result of the COVID situation, I encourage anyone who reads this to attempt a bold move into the uncomfortable and see how they might introduce their humanity into their internet persona. Share and share alike.</p>
<p>❤</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://www.amazon.co.uk/Daring-Greatly-Courage-Vulnerable-Transforms/dp/1592408419" class="uri">https://www.amazon.co.uk/Daring-Greatly-Courage-Vulnerable-Transforms/dp/1592408419</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://www.amazon.co.uk/Rising-Strong-Bren%C3%A9-Brown/dp/0091955033" class="uri">https://www.amazon.co.uk/Rising-Strong-Bren%C3%A9-Brown/dp/0091955033</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></summary>
</entry>
<entry>
    <title>Blogging in Haskell</title>
    <link href="https://www.mrlee.dev/programming/blogging-in-haskell" />
    <id>https://www.mrlee.dev/programming/blogging-in-haskell</id>
    <published>2020-06-27T00:00:00Z</published>
    <updated>2020-06-27T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">Blogging in Haskell</h2>
        <span class="ert">~4 min. read</span>
    </header>

    <section>
        <p>It’s taken me quite a while to settle on a particular look and feel for this blog. Rather than just having an outlet for writing, I wanted the creation of it to be a learning experience too. Hugo<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>, Gatsby<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> and Zola<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a>, with Netlify CMS<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a> as a fancy interface for writing posts on top of it all. Each attempt left me feeling less inspired than the last.</p>
<p>Eventually I stumbled across Hakyll<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a> and, after finding a CSS ‘framework’ that gave the appearance of a terminal UI<a href="#fn6" class="footnote-ref" id="fnref6" role="doc-noteref"><sup>6</sup></a>, I felt like I had enough to get things off the ground.</p>
<p>The major appeal so far has been the immense ease of customisation. Hakyll itself isn’t a static site generator in the same sense that others are, and as a result it offers a layer of customisation that other generators generally defer to templating languages for.</p>
<p>The main difference is that you don’t pull down a <code>hakyll</code> binary and then throw a <code>yaml</code> file together in order to configure a few pre-defined properties; you’re instead given a basic implementation of a generator, using hakyll’s own library, and thus have complete control over routing, page generation, templating, and so on. This generally lives in a <code>site.hs</code> file and it’s not difficult to follow even for relative newbies to Haskell. The structure of everything else is entirely up to you.</p>
<p>Once you compile this file, you end up with a nice binary, e.g. <code>site</code>, and <em>that</em> is what you use to generate your site. It is beautiful in its elegance and I’m eager to see what I can add to this site while also learning some more Haskell at the same time.</p>
<p>As an example, on the home page, there is a <code>git log</code> output section. It’s fairly primitive, although I intend to build out the functionality a bit more. Writing the functionality was fairly effortless, with the help of some other authors on the net:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode haskell"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="kw">data</span> <span class="dt">GitLog</span> <span class="ot">=</span> <span class="dt">Hash</span> <span class="op">|</span> <span class="dt">Commit</span> <span class="op">|</span> <span class="dt">Full</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a>  <span class="kw">deriving</span> (<span class="dt">Eq</span>, <span class="dt">Read</span>)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="kw">instance</span> <span class="dt">Show</span> <span class="dt">GitLog</span> <span class="kw">where</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a>  <span class="fu">show</span> content <span class="ot">=</span> <span class="kw">case</span> content <span class="kw">of</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a>    <span class="dt">Hash</span>   <span class="ot">-&gt;</span> <span class="st">&quot;%h&quot;</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a>    <span class="dt">Commit</span> <span class="ot">-&gt;</span> <span class="st">&quot;%h: %s&quot;</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a>    <span class="dt">Full</span>   <span class="ot">-&gt;</span> <span class="st">&quot;%h: %s (%ai)&quot;</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true"></a></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true"></a><span class="ot">getGitLog ::</span> <span class="dt">GitLog</span> <span class="ot">-&gt;</span> <span class="dt">Integer</span> <span class="ot">-&gt;</span> <span class="dt">FilePath</span> <span class="ot">-&gt;</span> <span class="dt">IO</span> [<span class="dt">String</span>]</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true"></a>getGitLog content limit path <span class="ot">=</span> <span class="kw">do</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true"></a>  (status, stdout, _) <span class="ot">&lt;-</span> readProcessWithExitCode</span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true"></a>    <span class="st">&quot;git&quot;</span></span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true"></a>    [ <span class="st">&quot;log&quot;</span></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true"></a>    , <span class="st">&quot;--format=&quot;</span> <span class="op">++</span> <span class="fu">show</span> content</span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true"></a>    , <span class="st">&quot;--max-count=&quot;</span> <span class="op">++</span> <span class="fu">show</span> limit</span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true"></a>    , <span class="st">&quot;--&quot;</span></span>
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true"></a>    , path</span>
<span id="cb1-19"><a href="#cb1-19" aria-hidden="true"></a>    ]</span>
<span id="cb1-20"><a href="#cb1-20" aria-hidden="true"></a>    <span class="st">&quot;&quot;</span></span>
<span id="cb1-21"><a href="#cb1-21" aria-hidden="true"></a></span>
<span id="cb1-22"><a href="#cb1-22" aria-hidden="true"></a>  <span class="fu">return</span> <span class="op">$</span> <span class="kw">case</span> status <span class="kw">of</span></span>
<span id="cb1-23"><a href="#cb1-23" aria-hidden="true"></a>    <span class="dt">ExitSuccess</span> <span class="ot">-&gt;</span> splitOn <span class="st">&quot;\n&quot;</span> (trim stdout)</span>
<span id="cb1-24"><a href="#cb1-24" aria-hidden="true"></a>    _           <span class="ot">-&gt;</span> [<span class="st">&quot;&quot;</span>]</span>
<span id="cb1-25"><a href="#cb1-25" aria-hidden="true"></a>  <span class="kw">where</span> trim <span class="ot">=</span> dropWhileEnd <span class="fu">isSpace</span></span>
<span id="cb1-26"><a href="#cb1-26" aria-hidden="true"></a></span>
<span id="cb1-27"><a href="#cb1-27" aria-hidden="true"></a>logListField</span>
<span id="cb1-28"><a href="#cb1-28" aria-hidden="true"></a><span class="ot">  ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">GitLog</span> <span class="ot">-&gt;</span> <span class="dt">Integer</span> <span class="ot">-&gt;</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Context</span> <span class="dt">String</span></span>
<span id="cb1-29"><a href="#cb1-29" aria-hidden="true"></a>logListField pluralName singularName style limit path <span class="ot">=</span></span>
<span id="cb1-30"><a href="#cb1-30" aria-hidden="true"></a>  listField pluralName ctx <span class="op">$</span> unsafeCompiler <span class="op">$</span> <span class="kw">do</span></span>
<span id="cb1-31"><a href="#cb1-31" aria-hidden="true"></a>    logs <span class="ot">&lt;-</span> getGitLog style limit path</span>
<span id="cb1-32"><a href="#cb1-32" aria-hidden="true"></a>    <span class="fu">return</span> <span class="op">$</span> <span class="fu">map</span> logItem logs</span>
<span id="cb1-33"><a href="#cb1-33" aria-hidden="true"></a> <span class="kw">where</span></span>
<span id="cb1-34"><a href="#cb1-34" aria-hidden="true"></a>  ctx <span class="ot">=</span> field singularName (<span class="fu">return</span> <span class="op">.</span> <span class="fu">show</span> <span class="op">.</span> itemBody)</span>
<span id="cb1-35"><a href="#cb1-35" aria-hidden="true"></a>  logItem <span class="fu">log</span> <span class="ot">=</span> <span class="dt">Item</span> (fromString <span class="op">$</span> path <span class="op">++</span> <span class="st">&quot;/log/&quot;</span> <span class="op">++</span> <span class="fu">log</span>) <span class="fu">log</span></span></code></pre></div>
<p>The result of adding this code, and then inserting it into the template context, is that I have a new template variable that I can loop over, for each log item. The practical use is fairly limited, but I like it because it adds a certain flavour to the site. Later on I will try to use a parser combinator library to be able to present the different parts of the log with more control.</p>
<p>In any case, I’ve enjoyed playing around with Haskell in order to deploy this site, and I’m looking forward to seeing what else I can build with the language. It’s truly fascinating.</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://gohugo.io/" class="uri">https://gohugo.io/</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://www.gatsbyjs.org/" class="uri">https://www.gatsbyjs.org/</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://www.getzola.org/" class="uri">https://www.getzola.org/</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn4" role="doc-endnote"><p><a href="https://www.netlifycms.org/" class="uri">https://www.netlifycms.org/</a><a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn5" role="doc-endnote"><p><a href="https://jaspervdj.be/hakyll/" class="uri">https://jaspervdj.be/hakyll/</a><a href="#fnref5" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn6" role="doc-endnote"><p><a href="https://terminalcss.xyz/" class="uri">https://terminalcss.xyz/</a><a href="#fnref6" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></summary>
</entry>
<entry>
    <title>On working remotely</title>
    <link href="https://www.mrlee.dev/personal/on-working-remotely" />
    <id>https://www.mrlee.dev/personal/on-working-remotely</id>
    <published>2020-06-26T00:00:00Z</published>
    <updated>2020-06-26T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">On working remotely</h2>
        <span class="ert">~2 min. read</span>
    </header>

    <section>
        <p>I imagine that working from home for extended periods is quite new to a lot of people, thanks to the COVID-19 lockdown. I enjoyed a solid year of it back when I worked remotely from Latvia. For me, it was both liberating and isolating at the same time, and while I really loved this semi-digital-nomadic lifestyle at the start, it wasn’t long before I grew an appetite for collaborating in person again.</p>
<p>If you asked me then, I’d say working fully remote on a more-or-less permanent basis is amazing! If you ask me now, I’d say that on balance I appreciate the time spent at the office and I would choose to work from home less frequently as a result. Pretty much all of my friendships have been established through work, and have continued to grow after we find work elsewhere. There’s immense value in that.</p>
<p>I think your stance on this depends entirely on your preferred style of communication, as well as the social boundaries you maintain. There’s an assumption, for example, that introverted people must love being able to work without dealing with people at the office, and I’m sure many actually do. I’m an introvert myself (as in, I spend energy doing social things and recharge by being alone), and while I can certainly cope with the situation, it is not my ideal one.</p>
<p>For me, it’s a matter of language and connection. I can’t read body language on a Zoom call, and I find that exhausting because I intuitively understand less from a conversation as a result. I’m similarly a very tactile person and spoken words are no replacement for a good hug or a round of drinks at the pub, or any kind of group get together. They’re more difficult to organise when there isn’t a central location you can all travel from, so distance does matter in this sense.</p>
<p>What is perhaps most egregious is the creeping deharmonisation of your work, and your life. Maintaining a healthy boundary is not so easy if you have to use your bedroom as your office, as opposed to your employer’s office. Having the spare room for a dedicated work space is a massive improvement, but a privilege not many can enjoy when living in small flats or house shares.</p>
<p>I’m not exactly writing this to share potential solutions or alternatives; I just wanted to put my take on it out there while everyone is talking about remote revolutions or offices becoming irrelevant. I think they still do serve a purpose, even if their purpose or shape begins to adapt to the new reality, and I do look forward to the day when that physical kind of reconnection becomes more readily available again.</p>
    </section>
</article>]]></summary>
</entry>
<entry>
    <title>I am here</title>
    <link href="https://www.mrlee.dev/personal/i-am-here" />
    <id>https://www.mrlee.dev/personal/i-am-here</id>
    <published>2020-06-25T00:00:00Z</published>
    <updated>2020-06-25T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">I am here</h2>
        <span class="ert">~6 min. read</span>
    </header>

    <section>
        <p>I’ve been no stranger to depression and burnout. The former is more or less something I’ve grown to become friends with, as bizarre as it sounds. And as dark and troubling as those times have been, at their worst, they’re equally the reason where I find myself where I am now, having experienced all that I have. I wish Trump didn’t abuse the words ‘tremendous’ and ‘beautiful’ so much, because there can be great beauty in these harrowing experiences once you can look back on them and see how you’ve grown, changed, since.</p>
<p>I can tell when I start to grow burned out not because I feel more depressed, but because I start to try too hard or overcompensate for perceived failures. It’s the classic feeling of not being <em>enough</em>, and trying to pursue ever loftier goals as a way of becoming <em>more</em> enough. It inevitably ends in abject failure and if I was to ask anyone else around me while that was happening, they would quite rightly tell me that I am being too hard on myself and nobody is beating me up the way I am. The inner critic is strong in this one, and he doesn’t always want to admit or accept that he is totally enough as he is, and he should slow down and enjoy this eccentric life of his. I mean, we’re all eccentric in our own ways; it’s by no means an insult compared to an allegation of being <em>normal</em>.</p>
<p>It’s funny, really. Life for me really began in 2012 when I moved from my parents home in Bolton to my own rented room in London. It wasn’t glamourous in the slightest but the freedom and independence was well worth it. I’d joined an agency called New Bamboo that specialised in building software in Ruby on Rails, in an agile way, and their decision to hire me–a junior PHP engineer at the time with only a year of professional experience–basically changed my life. Even now, 8 years later, I don’t know anyone from there who looks back on that time unfavourably. In fact, we often lament how hard it is to find somewhere even remotely similar to them. The culture was one of a kind and I greatly matured through it, making some excellent friends who are still close-knit to this day.</p>
<p>Three years later, in 2015, and I found myself moving to Barcelona for a new job at what was then a tiny startup called Typeform, truly embracing this independence I’d established earlier in the decade. It was a fantastic place to work, with fantastic people from all walks of life, and that was before you got to the weekly beach volleyball, sailing, and the general way of life in that little corner of Spain. It was around this time that my mental health began to diminish further, so I sought out a psychotherapist who could continue the work the one I had in the UK started, and so I had an impartial output for the things I was going through.</p>
<p>You might notice I said ‘psychotherapist’ and not just ‘therapist’. In the UK I booked time with a private therapist who offered breathwork<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> as a way to dive into past trauma and help heal it, along side the usual talking and listening, and some mild CBT (Cognitive Behavioural Therapy)<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>. After some retreats in both Trakai, Lithuania and Lesvos, Greece, I moved on to something known as somatic experiencing<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a>. I’m aware that someone reading this might think “what on earth was this guy getting himself into?” or possibly be dismissive of these alternative aspects of therapy. I think that’s fine and I accept that it can seem unusual or strange to some, and they are certainly not all-healing panaceas like many alternative medicines are perceived to be: they can very easily cause more harm than good if you place your trust into the wrong hands. I think that is a major issue with many New Age therapies, when they offer simplistic solutions to difficult problems.</p>
<p>This kind of work continued for a couple of years until I decided I wanted a quieter life than what Barcelona had to offer. If you think that sounds utterly insane, because who would want to leave such a beautiful city? Well, I offer you the chance of working full-time for a week during Festa de Gracia, a week long festival in the village of Gracia that doesn’t start to wrap up until 4 or 5am each morning. Something that is immensely fun, and is an incredible display of Catalunya’s culture of celebration, wears a little thin when you desperately want to catch some proper shut-eye before work. So, I moved to Latvia, or Jurmala in Latvia more precisely, and enjoyed a solid year of working remotely besides the beautiful Baltic coast, which is genuinely a sight to behold.</p>
<p>In that time on the continent I travelled to more places, and experienced more new things, than I ever had before. Latvia itself was (and still is) utterly gorgeous. Meanwhile, I enjoyed visiting places as varied as Naxos, Istanbul, Croatia, Estonia, Lisbon, Verona, Vienna, and a few other places I struggle to remember. I was close to the epicentre of the Barcelona terror attack in 2017, and experienced the city in a much more sombre, mournful light. I was close to being in Ankara while Erdogan’s coup took place until I was encouraged to cancel the journey. I had a genuine thirst for adventure that was hugely facilitated by being able to work remotely.</p>
<p>Not long after that, I moved back to London. Partly due to redundancies in the (London based) startup I was working for out in Latvia, but also due to isolation and missing the people I loved back in London, feeling like I was ready to get closer to the action again. The focus on my health narrowed a little and this time I chose a therapist who specialised in complex PTSD<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a> and post-traumatic growth<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a>, and later one who dealt with relationship issues specifically (as a single man, there are still things in that area to explore).</p>
<p>I’m going to skip a head a bit because I do actually have a point here, besides being autobiographical. Those eight years so far have been almost consistently tinged with the hue of mental illness. We often use the colour blue to represent a low mood, but I’d really see it as a burning greyness…smouldering embers glowing in charred remains like a burned out log fire. Occasionally a new breath of life will bring the fire back to its original ferocity but, almost inevitably, you’ll run out of logs to keep it aflame. Thus starts the slow but necessary process of tending to yourself so that you can refuel that fire after a period of recovery.</p>
<p>That’s one hell of a tortured metaphor, but I think we all have our own individual take on what mental health means to us. That’s how I see my depression and it’s no coincidence that it ties quite well into burning out.</p>
<p>To bring this back to the start, I would not change a thing as my place in this moment is entirely a function of all that shit, and all that wonder, I’ve been through over the years, going right back to my birth and my childhood as an adopted, abused kid. All of the pain, both given and received, and the pleasure, have served a purpose and I appreciate those experiences as I would not think or feel the way I currently do were it not for them. I would not value empathy and compassion and inclusivity so massively. And rather than focussing so heavily on just how shitty some of those moments have been, the amazing memories that have come from my struggle through it all are equally incalculable.</p>
<p>This isn’t to say all my problems are solved, or I’m finished with my process. That’s <em>pure BS</em> as this stuff lasts an entire lifetime as you learn, grow and adapt to new situations. But the track record I have must be pretty good if I’m <em>here</em>, right?</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Breathwork" class="uri">https://en.wikipedia.org/wiki/Breathwork</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Cognitive_behavioral_therapy" class="uri">https://en.wikipedia.org/wiki/Cognitive_behavioral_therapy</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Somatic_experiencing" class="uri">https://en.wikipedia.org/wiki/Somatic_experiencing</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn4" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Complex_post-traumatic_stress_disorder" class="uri">https://en.wikipedia.org/wiki/Complex_post-traumatic_stress_disorder</a><a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn5" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Posttraumatic_growth" class="uri">https://en.wikipedia.org/wiki/Posttraumatic_growth</a><a href="#fnref5" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></summary>
</entry>

</feed>

D _site/contact.html => _site/contact.html +0 -49
@@ 1,49 0,0 @@
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>mrlee.dev - Contact</title>

    <link rel="stylesheet" href="./css/terminal.min.css" />
    <link rel="stylesheet" href="./css/main.css" />
    <link rel="stylesheet" href="./css/syntax.css">
</head>

<body class="terminal">
    <div class="container">
        <div class="terminal-nav">
            <header class="terminal-logo">
                <div class="logo terminal-prompt">
                    <a class="no-style" href="./">mrlee.dev</a>
                    <span>special topics in calamity software dev</span>
                </div>
            </header>
            <nav class="terminal-menu">
                <ul vocab="https://schema.org/" typeof="BreadcrumbList">
                    <li><a href="https://cv.mrlee.dev" style="display: none">Hire me</a></li>
                    <li><a href="https://github.com/mrleedev/">Github</a></li>
                </ul>
            </nav>
        </div>
    </div>

    <main class="container">
        <p>I live in a small hut in the mountains of Kumano Kodō on Kii Hantō and would not like to be contacted.</p>
    </main>

    <footer class="container">
        <header>
            <p class="modeline inverse-video">
                -UUU:----F1&nbsp;&nbsp;Contact&nbsp;&nbsp;&nbsp;&nbsp;Bot L100%&nbsp;&nbsp;Git:master&nbsp;&nbsp;(HTML+)
                ----------
            </p>
        </header>
    </footer>

</body>

</html>
\ No newline at end of file

M _site/index.html => _site/index.html +13 -4
@@ 40,6 40,15 @@
            <td class="file-permission">-rw-r--r--</td>
            <td class="user">mrlee</td>
            <td class="group">www</td>
            <td class="size">8772</td>
            <td class="date">July 21, 2020</td>
            <td><a href="./programming/do-you-really-need-those-microservices">Do you really need those microservices?</a></td>
        </tr>
        
        <tr>
            <td class="file-permission">-rw-r--r--</td>
            <td class="user">mrlee</td>
            <td class="group">www</td>
            <td class="size">11753</td>
            <td class="date">July 20, 2020</td>
            <td><a href="./personal/a-decade-of-work">A decade of work</a></td>


@@ 96,6 105,10 @@
<h1 class="prompt">&gt; <span class="type-in">git log --format=pretty | head -n 10</span></h1>
<ul>
    
    <li>"6bfbcfe: Add new post about microservices (2020-07-21 19:28:06 +0100)"</li>
    
    <li>"23067d7: Fix some weird sentence structure (2020-07-20 20:28:06 +0100)"</li>
    
    <li>"968ff5f: Add a new post (2020-07-20 19:06:37 +0100)"</li>
    
    <li>"000037b: Rebuild (2020-07-18 18:43:01 +0100)"</li>


@@ 112,10 125,6 @@
    
    <li>"dd22c6b: Add some footnote links (2020-07-03 21:13:49 +0100)"</li>
    
    <li>"f902d3a: Fix some typos (2020-07-03 21:09:07 +0100)"</li>
    
    <li>"082537d: Add new post about vulnerability (2020-07-03 21:03:08 +0100)"</li>
    
</ul>
    </main>


A _site/programming/do-you-really-need-those-microservices/index.html => _site/programming/do-you-really-need-those-microservices/index.html +77 -0
@@ 0,0 1,77 @@
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>mrlee.dev - Do you really need those microservices?</title>

    <link rel="stylesheet" href="../../css/terminal.min.css" />
    <link rel="stylesheet" href="../../css/main.css" />
    <link rel="stylesheet" href="../../css/syntax.css">
</head>

<body class="terminal">
    <div class="container">
        <div class="terminal-nav">
            <header class="terminal-logo">
                <div class="logo terminal-prompt">
                    <a class="no-style" href="../../">mrlee.dev</a>
                    <span>special topics in calamity software dev</span>
                </div>
            </header>
            <nav class="terminal-menu">
                <ul vocab="https://schema.org/" typeof="BreadcrumbList">
                    <li><a href="https://cv.mrlee.dev" style="display: none">Hire me</a></li>
                    <li><a href="https://github.com/mrleedev/">Github</a></li>
                </ul>
            </nav>
        </div>
    </div>

    <main class="container">
        <article>
    <header class="header inverse-video">
        <h2 class="title">Do you really need those microservices?</h2>
        <span class="ert">~4 min. read</span>
    </header>

    <section>
        <p>I’ve been through half a dozen rounds of interviewing over the past couple of months, with different companies. Naturally, when you say you’ve had experience working with microservices, you’re practically begging the question. What do you think about them?</p>
<p>I’m not really for-or-against them, and in fact I find it a little strange and frustrating when it’s expected that you take a side in favour of having a nuanced opinion. The idea of being pro-microservice and anti-monolith, for example, is utterly absurd. It’s never really voiced that way, but it’s often easy to detect the absolutist stance masquerading as a balanced opinion. Even the title of this post falls victim to that, as the question presented is quite clearly loaded.</p>
<p>Anyway, I love being asked this question because after a good five years of working with distributed systems orchestrated by Kubernetes, almost entirely in the form of ‘migrating away from the monolith’, I’ve had plenty of time to formulate and adapt my thinking around it.</p>
<p>First and foremost, I believe the main benefit of a business switching to microservices is the manifestation of Conway’s Law<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> in practice. Prior to making the switch in architecture, the business most likely decided on an organisational structure that exchanges large, difficult to manage teams for a distributed collection of smaller, self-sufficient, self-empowered teams. More often than not these follow a squad and chapter model, otherwise reduced to ‘the Spotify model’, and a hierarchy of cross-functional teams is established. Once that structure is put in place and people are shuffled around a bit, the question of ownership in a mixed-responsibility, mixed-domain codebase becomes apparent. Microservices are thus the solution to a perceived conflict between squads and they shift a lot of that conflict from the teams themselves, to the channels in-between them.</p>
<p>Under no circumstance is the technical implication of such a change considered, particularly in older codebases for which this change would introduce a significant level of disruption. The organisational benefits of distributing teams and workload are substantial, but the drawbacks of distributing <em>code</em> are similarly worthy of consideration too, and it often becomes a gateway to extra complexity as once-simple tasks find themselves spread apart over various network calls and machines.</p>
<p>I don’t consider this a dealbreaker, but in my experience I’ve always felt like there’s a step missing between the singular, monolithic codebase and the highly distributed microservice architecture. There’s a hell of a lot you can do in that singular codebase, in terms of taking smaller steps towards a service-oriented architecture, or a domain-driven one.</p>
<p>In those situations, you are investing primarily in the work required to understand the different domains in your codebase and how they speak to each other, with much lower risk than fundamentally changing your infrastructure as well as your architecture. In Ruby, you can abstract code into gems and provide solid, public APIs that other parts of the code can use. In Java you have modules and packages. Every language you care to use has the concept of packaging code into bundles or libraries that can be shared as a dependency.</p>
<p>Adopting this workflow introduces much lower risk because, in the event of failure, you can easily adjust your expectations around the domains and how they communicate and fix them in a singular release. It may not be perfect, but if you refactor enough of your code in SOA<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>/DDD<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a> style then you’ll have a much easier time turning those domains into proper microservices further down the line.</p>
<p>This is where a microservice architecture truly shines. If you have clear, well bounded domains, and you’ve developed solid API contracts as well as standards for versioning, logging, etc to allow for centralised aggregation of useful resources (for debugging or auditing, for example), and if the team in charge of the domain can essentially treat that service as a full-blown product with documentation, support, and its own priorities and backlog, then that is where the power of that infrastructure comes into play.</p>
<p>Another amazing usecase for this architecture is when you have strong regulatory requirements to sequester and protect personally identifying information. This could involve PCI compliance as a financial business, HIPAA as an American medical firm, or GDPR for a whole host of privacy concerns across the EU and the UK. Network access can be controlled much more easily than different modules or functions in your singular codebase, and the risk of a low-importance feature being compromised to access the critical resources in that case is far too high.</p>
<p>I believe that’s a lot easier to do when you start early, but if you come to it late then you fall into an easy trap: how do you migrate your stuff into new services while also maintaining your existing codebase, along with all the features that you’re still expected to deliver? You can’t stop the world to rewrite all of the code, so there’s a possibility that you enter a refactoring spiral as your service plays cat and mouse with the monolith. This is infinitely more difficult when migrating a codebase written in a dynamic language, as automated refactoring is nowhere near as easy without a solid type-system to back it up.</p>
<p>If I was to offer anybody advice about how to make all of this happen successfully, I’d say to stop thinking in terms of the existing monolith, and instead look at what individual products you could separate or extract, or even spin-off into their own businesses if the idea was unique enough to sell individually. And don’t jump to solutions like Kubernetes until you’re dealing with enough of these services that your existing deployment setup is too hard to manage.</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Conway%27s_law" class="uri">https://en.wikipedia.org/wiki/Conway%27s_law</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Service-oriented_architecture" class="uri">https://en.wikipedia.org/wiki/Service-oriented_architecture</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Domain-driven_design" class="uri">https://en.wikipedia.org/wiki/Domain-driven_design</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>
    </main>

    <footer class="container">
        <header>
            <p class="modeline inverse-video">
                -UUU:----F1&nbsp;&nbsp;Do you really need those microservices?&nbsp;&nbsp;&nbsp;&nbsp;Bot L100%&nbsp;&nbsp;Git:master&nbsp;&nbsp;(HTML+)
                ----------
            </p>
        </header>
    </footer>

</body>

</html>
\ No newline at end of file

A _site/rss.xml => _site/rss.xml +287 -0
@@ 0,0 1,287 @@
<?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>mrlee.dev</title>
        <link>https://www.mrlee.dev</link>
        <description><![CDATA[Special topics in calamity software dev]]></description>
        <atom:link href="https://www.mrlee.dev/rss.xml" rel="self"
                   type="application/rss+xml" />
        <lastBuildDate>Tue, 21 Jul 2020 00:00:00 UT</lastBuildDate>
        <item>
    <title>Do you really need those microservices?</title>
    <link>https://www.mrlee.dev/programming/do-you-really-need-those-microservices</link>
    <description><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">Do you really need those microservices?</h2>
        <span class="ert">~4 min. read</span>
    </header>

    <section>
        <p>I’ve been through half a dozen rounds of interviewing over the past couple of months, with different companies. Naturally, when you say you’ve had experience working with microservices, you’re practically begging the question. What do you think about them?</p>
<p>I’m not really for-or-against them, and in fact I find it a little strange and frustrating when it’s expected that you take a side in favour of having a nuanced opinion. The idea of being pro-microservice and anti-monolith, for example, is utterly absurd. It’s never really voiced that way, but it’s often easy to detect the absolutist stance masquerading as a balanced opinion. Even the title of this post falls victim to that, as the question presented is quite clearly loaded.</p>
<p>Anyway, I love being asked this question because after a good five years of working with distributed systems orchestrated by Kubernetes, almost entirely in the form of ‘migrating away from the monolith’, I’ve had plenty of time to formulate and adapt my thinking around it.</p>
<p>First and foremost, I believe the main benefit of a business switching to microservices is the manifestation of Conway’s Law<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> in practice. Prior to making the switch in architecture, the business most likely decided on an organisational structure that exchanges large, difficult to manage teams for a distributed collection of smaller, self-sufficient, self-empowered teams. More often than not these follow a squad and chapter model, otherwise reduced to ‘the Spotify model’, and a hierarchy of cross-functional teams is established. Once that structure is put in place and people are shuffled around a bit, the question of ownership in a mixed-responsibility, mixed-domain codebase becomes apparent. Microservices are thus the solution to a perceived conflict between squads and they shift a lot of that conflict from the teams themselves, to the channels in-between them.</p>
<p>Under no circumstance is the technical implication of such a change considered, particularly in older codebases for which this change would introduce a significant level of disruption. The organisational benefits of distributing teams and workload are substantial, but the drawbacks of distributing <em>code</em> are similarly worthy of consideration too, and it often becomes a gateway to extra complexity as once-simple tasks find themselves spread apart over various network calls and machines.</p>
<p>I don’t consider this a dealbreaker, but in my experience I’ve always felt like there’s a step missing between the singular, monolithic codebase and the highly distributed microservice architecture. There’s a hell of a lot you can do in that singular codebase, in terms of taking smaller steps towards a service-oriented architecture, or a domain-driven one.</p>
<p>In those situations, you are investing primarily in the work required to understand the different domains in your codebase and how they speak to each other, with much lower risk than fundamentally changing your infrastructure as well as your architecture. In Ruby, you can abstract code into gems and provide solid, public APIs that other parts of the code can use. In Java you have modules and packages. Every language you care to use has the concept of packaging code into bundles or libraries that can be shared as a dependency.</p>
<p>Adopting this workflow introduces much lower risk because, in the event of failure, you can easily adjust your expectations around the domains and how they communicate and fix them in a singular release. It may not be perfect, but if you refactor enough of your code in SOA<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>/DDD<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a> style then you’ll have a much easier time turning those domains into proper microservices further down the line.</p>
<p>This is where a microservice architecture truly shines. If you have clear, well bounded domains, and you’ve developed solid API contracts as well as standards for versioning, logging, etc to allow for centralised aggregation of useful resources (for debugging or auditing, for example), and if the team in charge of the domain can essentially treat that service as a full-blown product with documentation, support, and its own priorities and backlog, then that is where the power of that infrastructure comes into play.</p>
<p>Another amazing usecase for this architecture is when you have strong regulatory requirements to sequester and protect personally identifying information. This could involve PCI compliance as a financial business, HIPAA as an American medical firm, or GDPR for a whole host of privacy concerns across the EU and the UK. Network access can be controlled much more easily than different modules or functions in your singular codebase, and the risk of a low-importance feature being compromised to access the critical resources in that case is far too high.</p>
<p>I believe that’s a lot easier to do when you start early, but if you come to it late then you fall into an easy trap: how do you migrate your stuff into new services while also maintaining your existing codebase, along with all the features that you’re still expected to deliver? You can’t stop the world to rewrite all of the code, so there’s a possibility that you enter a refactoring spiral as your service plays cat and mouse with the monolith. This is infinitely more difficult when migrating a codebase written in a dynamic language, as automated refactoring is nowhere near as easy without a solid type-system to back it up.</p>
<p>If I was to offer anybody advice about how to make all of this happen successfully, I’d say to stop thinking in terms of the existing monolith, and instead look at what individual products you could separate or extract, or even spin-off into their own businesses if the idea was unique enough to sell individually. And don’t jump to solutions like Kubernetes until you’re dealing with enough of these services that your existing deployment setup is too hard to manage.</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Conway%27s_law" class="uri">https://en.wikipedia.org/wiki/Conway%27s_law</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Service-oriented_architecture" class="uri">https://en.wikipedia.org/wiki/Service-oriented_architecture</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Domain-driven_design" class="uri">https://en.wikipedia.org/wiki/Domain-driven_design</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></description>
    <pubDate>Tue, 21 Jul 2020 00:00:00 UT</pubDate>
    <guid>https://www.mrlee.dev/programming/do-you-really-need-those-microservices</guid>
    <dc:creator>Lee Machin</dc:creator>
</item>
<item>
    <title>A decade of work</title>
    <link>https://www.mrlee.dev/personal/a-decade-of-work</link>
    <description><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">A decade of work</h2>
        <span class="ert">~7 min. read</span>
    </header>

    <section>
        <p>I first ‘got into’ programming back in 2003, or 2004. I can’t remember the exact time, but it was at the point where Geocities and AngelFire were still a thing, as was Myspace. The in-thing was to host your own phpBB forum and, much like people will do with forks on github, branch off existing communities into your own ad-riddled alternative. I remember being involved in a few and, actually, a small number of them turned out to be quite successful.</p>
<p>What also existed back then was the ‘dotTk’ domain, which allowed you to point all kinds of things to it, typically from weird free hosts like 20M. Of course, they would be ad-riddled too. This was before the time that even popup blockers were mainstream, and most of the ads were, in retrospect, quite goofy. You could ‘spank the monkey’ or fire darts and stuff in weird ad-based minigames. While you could easily get scammed or end up with a virus that dialled into a premium hotline using your landline, they feel a lot more innocent than the kind of misleading crap you get today, which is sometimes difficult to distinguish from genuine content.</p>
<p>But, I digress, I’m not here to talk about advertising, social media, and the slow descent into madness of the modern internet, I’m here to talk about what it’s been like as a software developer (or engineer or whatever) over the past ten years of professional work with a good four or five on top as a newbie learning the ropes. This was the time when CSS was barely even standard, and building a website involved pirating a copy of Macromedia Dreamweaver (long since bought out by Adobe) and dragging layers of boxes around a window to get a layout you want. The HTML it would generate was truly awful and it was still common to do all of your layout with tables. It was generally easier to build for IE6 back then since the Mac didn’t enjoy the ubiquity it now does, and Firefox was still in its early-ish days. Javascript wasn’t really a thing back then, but DHTML<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> was all the rage and was what allowed you to put flaming cursors or snowflakes all over your page.</p>
<p>I fondly remember that day when I dared to look at the generated HTML from my own example sites, and decided to learn how to write things by hand instead. It was all HTML4 back then, with XHTML on the horizon which promised a bit more strictness. Before then, I’d browse through Albino Blacksheep<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> and it’s collection of funny things that we now call ‘memes’, only back then they were a lot more creative and unique and only occasionally memetic, as in the case of Joel Veitch/rathergood.com and his being commissioned to do a TV ad in his style<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a>.</p>
<p>Back on topic, before I drown in nostalgia. The reason I mention Albino Blacksheep is because I <em>still</em>, after all this time, remember one post the author made about how he built the site. He said he did it all in Notepad. <em>Notepad</em>! If you’re not aware, Notepad is a barebones text editor on Windows, not unlike TextEdit on Mac. I was fascinated because, to my 15/16-year old mind, that seemed like an impossible feat.</p>
<p>That was about the age that I went to sixth form, and I was lucky enough to get into one of the more prestiged colleges than most at my high school. It was just me and my best friend (also called Lee) basically, and we decided we wanted to go together. At the time I generally wasn’t thinking that programming would be a career for me, and my parents put a lot of pressure on me to get into ‘computing’ which for them meant computer repair so I could work for them for nothing whenever their stuff broke, which happened quite often. My dream back then was actually journalism and I did far better in English and classical literature than I did in IT (I got a D in my A-levels).</p>
<p>I essentially got into programming as a joke, because a friend in my new social circle wanted a website, or at least hinted at it. I can’t fully remember what was on the site, but I used part of my part-time income from Tesco to buy a .co.uk domain in his name and point it to a little HTML thing I made and hosted through the registrar’s free web hosting service. All I needed was an FTP client and a bit of dragging and dropping.</p>
<p>Before I even knew it I had ‘PHP4 for dummies’ and ‘MySQL for dummies’ on the desk under my weird bunk-bed setup, and I only found out about this stuff through faffing around with those phpBB forums and looking at the configs. I remember <em>why</em> I sought that out though: I had a different website and noticed that it always displayed the current time when you refreshed it. I searched for how to do it and found examples in PHP, mostly from the comments section that each page of PHP docs had. It was literally as simple as changing the file extension from <code>html</code> (or <code>htm</code>) to <code>php</code> and then adding <code>&lt;?php echo date(); ?&gt;</code> wherever you wanted it. Deploying it was a case of dragging and dropping through FTP as most of these shared hosts offered PHP by default.</p>
<p>That was literally my first line of dynamic code.</p>
<p>Skip ahead a few years, all the way to 2012 when I moved to London. I’d worked a PHP job full time before then but it was only at New Bamboo where I would find my form. They wrote everything in Ruby on Rails, and my experience in that was extremely minimal. Somehow I’d set up a redis server and had ruby communicating with it on my own hardware, but it didn’t do much and I couldn’t really figure out the code a few months after I wrote it. This required learning a lot of new things in terms of building application servers, and deploying code. Capistrano<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a> was the tool of choice in Ruby-land for deploying to a VPS and it was essentially a DSL over a bunch of shell scripts. In all honesty this DSL was great but were I not made to use it, I would be a lot more intimate with the power of SSH and tools like <code>scp</code>, and understanding the issue with things like forwarding your SSH agent because you pull from a private git repo on your server.</p>
<p>I won’t talk much about the code, although my years at New Bamboo were truly formative. One thing has stuck with me since then though, over the 8 years since I was told it. My boss at the time saw I was struggling with managing the expectations of the client I was working with, and I was trying too hard to do things alone and hoping for the best instead of reaching out for the help that was readily available. I must have only been about 5 months into the job at that point. My boss took me into our boardroom, the table of which doubled up as a pingpong table, asked if I was alright, and then said something I’ve never forgotten since:</p>
<p><em>“Being a great developer is about a lot more than writing great code.”</em></p>
<p>Of course, at the time I was ashamed for mucking up and felt embarrased, but I was being given a piece of advice that would, in hindsight, radically change the direction of my career. I since became fascinated with the role of a scrum master, and took on the position full time myself. And as I moved into different positions at different companies (like Typeform and Friday Pulse), I continually realised that my favourite thing about programming wasn’t just the raw challenge of solving a problem in code, but in the <em>people</em> side of it. I’m not talking about management per se, it’s more about what else you can do with a good amount of knowledge and a strong desire to mentor and encourage those around you so they too can boost themselves up.</p>
<p>That’s been an ongoing theme since mid-2015, even as I moved to Latvia and then eventually returned to London, and if anyone asks me what I consider to be great achievements when I interview, or have a conversation, I will always point to those people who I saw fluorish because they were given the time, space and effort to do so.</p>
<p>Now it’s 2020, and not much has changed except that I enjoy the programming side of things a lot more than I used to. You could say that those two sides of the coin have started to merge into one imperfect sphere. Language is all communication and, these days, I enjoy trying to solve problems in different languages just so I can learn how to communicate similar technical things better in terms that I’m more familiar with. The same as I enjoy learning spoken languages to empathise in the same way.</p>
<p>The world has changed <em>a lot</em> in all that time, and I now find myself in my thirties. Not once in my life did I ever think or believe I would be doing this kind of thing as a career, and I’ve grown to love it. If I were to tell my teenage self anything, knowing all of this… I would keep my mouth shut. He managed to figure it out just fine.</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Dynamic_HTML" class="uri">https://en.wikipedia.org/wiki/Dynamic_HTML</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://www.albinoblacksheep.com/archive/" class="uri">https://www.albinoblacksheep.com/archive/</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://www.youtube.com/watch?v=3AoNKGwBB74" class="uri">https://www.youtube.com/watch?v=3AoNKGwBB74</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn4" role="doc-endnote"><p><a href="https://capistranorb.com/" class="uri">https://capistranorb.com/</a><a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></description>
    <pubDate>Mon, 20 Jul 2020 00:00:00 UT</pubDate>
    <guid>https://www.mrlee.dev/personal/a-decade-of-work</guid>
    <dc:creator>Lee Machin</dc:creator>
</item>
<item>
    <title>Isolation, aloneness and loneliness</title>
    <link>https://www.mrlee.dev/personal/isolation-aloneness-and-loneliness</link>
    <description><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">Isolation, aloneness and loneliness</h2>
        <span class="ert">~4 min. read</span>
    </header>

    <section>
        <p>I don’t doubt that the COVID-19 situation this year has forced many of us to confront aspects of ourselves we were previously able to hide behind a mask. In some ways, this has been tragic and, unfortutely, traumatic as well. That isolatation has deprived partners from space away from their abusers at home, making a bad situation even worse for them. In other cases, it has made domestic violence much more apparent as people reveal an uglier side to themselves, frustrated by the prolonged contact. It’s truly devastating and it can be hard to comprehend the sort of horror that takes place in the home unless you’ve been unfortunate enough to suffer from it yourself. I suffered it myself, at the hands of my sister’s abusive boyfriend, and it was enough for me to contemplate life without any of my family in it. Took me a few years to follow up with that and come to terms with it, but I’m glad I did.</p>
<p>That’s not the full topic of this post, but I think it’s important to acknowledge that because we all-too-often see the idea of a ‘relationship’ being the solution to a problem: not wanting to be single, feeling lonely and unhappy, seeing other people in happy relationships, etc. In reality, this sort of ‘solution-based’ relationship puts the onus on the other partner to make you feel happy or loved; not yourself. And for every person who hates their single life, there will be at least one other person who hates their married, or committed life, and struggles to see their way out of it and back towards independence.</p>
<p>Now I’ve explained where I’m coming from, let’s move on.</p>
<hr />
<p>For a long time (up until the last few years) I’ve considered myself a lonely person, or a bit of a loner. It sounds like a label to identify by and, if I were to call myself a loner enough times, it surely would become an identity. What I really mean when I say it, though, is that I don’t feel like I have the capacity to provide myself the comfort, the fulfilment, the happiness, that I feel lacking in. There’s a psychological undercurrent to it of course, based on my childhood, but I’m ultimately disempowering myself and also signalling that I don’t really have that kind of positive feeling to give out either. There’s an absence of it and I’d like it if someone else shared some with me.</p>
<p>Don’t get me wrong, everyone needs love, support, acknowledgement, recognition… and there’s no harm in asking for a proper big hug or a shoulder to cry on when you really want one. If you’re not afraid of asking for that kind of support then more power to you; it’s a brave move to be so open with your vulnerability that way.</p>
<p>Eventually though, that continual desire to receive this energy from other people (as opposed to finding it within yourself somehow) is going to result in a self-fulfilling prophecy where you are convinced that you are lonely, or a loner, purely because you’ve taught yourself to believe that.</p>
<p>I have to say that I’m endlessly grateful to my closest, bestest friends for pointing out to me that it does’t really have to be that way, so it was about five years ago that I started learning the difference between <em>lonely</em>-ness and <em>alone</em>-ness (deliberate mis-spellings for emphasis).</p>
<p>I seriously enjoy being alone, and to understand the difference there was hugely empowering to me. It’s truly a liberating distinction that unlocks so many opportunities that were previously unavailable because of the expectation they had to be done ‘with someone’ or with a group. Maybe out of a desire to be romantic, or to share with someone, or just because society finds it weird if you don’t.</p>
<p>Most of the places I’ve travelled to for a holiday have been alone. A week in Croatia, a few days in Mykonos before my best friend turned up, a weekend in Istanbul and in Verona, etc. This of course necessitates dining alone, and it feels great to ask for a table for one and then watch the world go by with a nice meal and a good book, maybe sharing a few stories with the waiters and waitresses there. Beyond that, a trip to the cinema by yourself can be quite refreshing too. There’s not really a limit to it once you can stop worrying about what other people really really aren’t thinking about you.</p>
<p>The difference here is that there is a source of happiness and comfort in the aloneness, and it is self-sufficient. It doesn’t completely remove feelings of loneliness, as there can still be underlying reasons for that emotion, but in and of itself it can be hugely enriching, maturing, and enlightening.</p>
<hr />
<p>So how does this pertain to the lockdown period we’ve found ourselves in since March? I have to admit that I’ve felt pangs of loneliness every now and then, and I seriously miss the social chit-chat at the pub after work, or meeting up with close friends to chill out. At the same time, I’ve discovered enough in myself over recent years to give me plenty to engage with and enjoy while I’m alone at home. As much as I’d love to dip my feet in more social things, like the dating scene and such like, I still feel quite comfortable riding this out by myself until I’m comfortable that it’s safer for me to do so. It’s a great feeling to have.</p>
<p>That said, I do have to take care with how I feel about this because one aspect of depression is a tendency to disconnect and isolate, so some level of self-awareness is required to tell the difference between cutting myself off and hiding from the world, and just enjoying my own company.</p>
<p>I started off the post talking about relationships, and not in a positive way either. It’s taken me a long time to establish this mindset, and properly ingrain it into my thinking process, but it also feels great knowing this, understanding that using another person as a solution to loneliness–a relationship as a means to an end–isn’t really a good or balanced foundation to authentically build a connection from.</p>
<p>The lockdown has been a great way to cement that in place for me and when all is said and done, it will definitely have had an impact on how I enjoy life from here on out.</p>
<p>🕉</p>
<p><small>P.S. I promise I’ll write some programming related stuff soon :))</small></p>
    </section>
</article>]]></description>
    <pubDate>Tue, 07 Jul 2020 00:00:00 UT</pubDate>
    <guid>https://www.mrlee.dev/personal/isolation-aloneness-and-loneliness</guid>
    <dc:creator>Lee Machin</dc:creator>
</item>
<item>
    <title>On Sharing Vulnerability</title>
    <link>https://www.mrlee.dev/personal/on-sharing-vulnerability</link>
    <description><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">On Sharing Vulnerability</h2>
        <span class="ert">~3 min. read</span>
    </header>

    <section>
        <p>One of the most wonderful things I’ve seen on the internet in recent years is our growing willingness to be vulnerable, together. I have to admit that this wasn’t really a ‘thing’ for me until I’d read Daring Greatly by Brene Brown<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>, as well as Rising Strong<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>. As far as self help books go, I don’t think I would actually categorise them as such.</p>
<p>Even LinkedIn these days is full of posts of people sharing their failures, admitting mistakes, dropping their egos, and being authentic with each other in favour of presenting a flawless persona. It’s a beautiful thing, to allow yourself to be yourself, your very human self, without the pressure of having to appear flawless.</p>
<p>For me, this extends a bit further although I appreciate that it’s something that has to be taken on balance, because there’s a difference between making mistakes and doing the same thing deliberately or with purpose. For example, when I record a video for Youtube, I’ll generally go for one take, without any editing beyond making sure the sound of my voice isn’t too quiet, or doesn’t blow your eardrums out. All of the vocal mistakes and mis-spoken words will remain, as will the pauses for thought.</p>
<p>As a software engineer, this happens a lot when writing code and architecting systems too. I suppose I’m a mix between a try-hard and a people-pleaser, so the bar I set for myself is miles higher than the expectations anyone else have, if they have any at all. In that situation, I’ve raised the stakes for myself so fucking high that even the slightest error can be heartbreaking. Thankfully I’ve brought that under control over the years, as I’ve grown older and wiser, but I still notice it in myself. It’s funny though, because through my training as a coach, and through my experience of co-founding and coaching at Rails Girls London, I am a lot more effective at guiding others through similar challenges than I am with applying them to myself.</p>
<p>As you might have guessed, it’s a lot easier to take care of others instead of taking care of yourself and, at least in the West, we’ve ended up with this bizarre, paradoxical mix of individualism and selflessness. You know, you own your success but others are responsible for your failures. It’s pretty toxic, but I digress.</p>
<p>I’m not sure what point I’m trying to make, except that I appreciate the injection of humanity into our disembodied communications over the internet. Being vulnerable isn’t just sharing your childhood trauma or doing a bit of emotional dumping, as valid as those are in some situations, but also drawing back the curtains in front of your heart and releasing some of that darkness into the light that others cast.</p>
<p>Ok, that’s a weird metaphor I know, I’m not even sure I like it :D but you know, it was the first thing that came into my mind and my experiences over the past five or six years have led me to confront my own shadow face to face. Light and dark kind of fits, so long as you don’t consider them good and bad. They are neither, just different.</p>
<p>To wrap this up, I recognise that a lot of people personally reach out to me and share their appreciation for me sharing my own vulnerability. For me, it’s almost normal, although it’s taken a while to figure out how to express it in a healthier way, while continuing to empower myself as opposed to retreating into those frankly shitty feelings and memories. At one time, I found it hard as well, but I had amazing support all the way along and I was never alone with it.</p>
<p>So, considering that we see ourselves becoming more distant as a result of the COVID situation, I encourage anyone who reads this to attempt a bold move into the uncomfortable and see how they might introduce their humanity into their internet persona. Share and share alike.</p>
<p>❤</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://www.amazon.co.uk/Daring-Greatly-Courage-Vulnerable-Transforms/dp/1592408419" class="uri">https://www.amazon.co.uk/Daring-Greatly-Courage-Vulnerable-Transforms/dp/1592408419</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://www.amazon.co.uk/Rising-Strong-Bren%C3%A9-Brown/dp/0091955033" class="uri">https://www.amazon.co.uk/Rising-Strong-Bren%C3%A9-Brown/dp/0091955033</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></description>
    <pubDate>Fri, 03 Jul 2020 00:00:00 UT</pubDate>
    <guid>https://www.mrlee.dev/personal/on-sharing-vulnerability</guid>
    <dc:creator>Lee Machin</dc:creator>
</item>
<item>
    <title>Blogging in Haskell</title>
    <link>https://www.mrlee.dev/programming/blogging-in-haskell</link>
    <description><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">Blogging in Haskell</h2>
        <span class="ert">~4 min. read</span>
    </header>

    <section>
        <p>It’s taken me quite a while to settle on a particular look and feel for this blog. Rather than just having an outlet for writing, I wanted the creation of it to be a learning experience too. Hugo<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>, Gatsby<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> and Zola<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a>, with Netlify CMS<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a> as a fancy interface for writing posts on top of it all. Each attempt left me feeling less inspired than the last.</p>
<p>Eventually I stumbled across Hakyll<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a> and, after finding a CSS ‘framework’ that gave the appearance of a terminal UI<a href="#fn6" class="footnote-ref" id="fnref6" role="doc-noteref"><sup>6</sup></a>, I felt like I had enough to get things off the ground.</p>
<p>The major appeal so far has been the immense ease of customisation. Hakyll itself isn’t a static site generator in the same sense that others are, and as a result it offers a layer of customisation that other generators generally defer to templating languages for.</p>
<p>The main difference is that you don’t pull down a <code>hakyll</code> binary and then throw a <code>yaml</code> file together in order to configure a few pre-defined properties; you’re instead given a basic implementation of a generator, using hakyll’s own library, and thus have complete control over routing, page generation, templating, and so on. This generally lives in a <code>site.hs</code> file and it’s not difficult to follow even for relative newbies to Haskell. The structure of everything else is entirely up to you.</p>
<p>Once you compile this file, you end up with a nice binary, e.g. <code>site</code>, and <em>that</em> is what you use to generate your site. It is beautiful in its elegance and I’m eager to see what I can add to this site while also learning some more Haskell at the same time.</p>
<p>As an example, on the home page, there is a <code>git log</code> output section. It’s fairly primitive, although I intend to build out the functionality a bit more. Writing the functionality was fairly effortless, with the help of some other authors on the net:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode haskell"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="kw">data</span> <span class="dt">GitLog</span> <span class="ot">=</span> <span class="dt">Hash</span> <span class="op">|</span> <span class="dt">Commit</span> <span class="op">|</span> <span class="dt">Full</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a>  <span class="kw">deriving</span> (<span class="dt">Eq</span>, <span class="dt">Read</span>)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><span class="kw">instance</span> <span class="dt">Show</span> <span class="dt">GitLog</span> <span class="kw">where</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a>  <span class="fu">show</span> content <span class="ot">=</span> <span class="kw">case</span> content <span class="kw">of</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a>    <span class="dt">Hash</span>   <span class="ot">-&gt;</span> <span class="st">&quot;%h&quot;</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a>    <span class="dt">Commit</span> <span class="ot">-&gt;</span> <span class="st">&quot;%h: %s&quot;</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a>    <span class="dt">Full</span>   <span class="ot">-&gt;</span> <span class="st">&quot;%h: %s (%ai)&quot;</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true"></a></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true"></a><span class="ot">getGitLog ::</span> <span class="dt">GitLog</span> <span class="ot">-&gt;</span> <span class="dt">Integer</span> <span class="ot">-&gt;</span> <span class="dt">FilePath</span> <span class="ot">-&gt;</span> <span class="dt">IO</span> [<span class="dt">String</span>]</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true"></a>getGitLog content limit path <span class="ot">=</span> <span class="kw">do</span></span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true"></a>  (status, stdout, _) <span class="ot">&lt;-</span> readProcessWithExitCode</span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true"></a>    <span class="st">&quot;git&quot;</span></span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true"></a>    [ <span class="st">&quot;log&quot;</span></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true"></a>    , <span class="st">&quot;--format=&quot;</span> <span class="op">++</span> <span class="fu">show</span> content</span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true"></a>    , <span class="st">&quot;--max-count=&quot;</span> <span class="op">++</span> <span class="fu">show</span> limit</span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true"></a>    , <span class="st">&quot;--&quot;</span></span>
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true"></a>    , path</span>
<span id="cb1-19"><a href="#cb1-19" aria-hidden="true"></a>    ]</span>
<span id="cb1-20"><a href="#cb1-20" aria-hidden="true"></a>    <span class="st">&quot;&quot;</span></span>
<span id="cb1-21"><a href="#cb1-21" aria-hidden="true"></a></span>
<span id="cb1-22"><a href="#cb1-22" aria-hidden="true"></a>  <span class="fu">return</span> <span class="op">$</span> <span class="kw">case</span> status <span class="kw">of</span></span>
<span id="cb1-23"><a href="#cb1-23" aria-hidden="true"></a>    <span class="dt">ExitSuccess</span> <span class="ot">-&gt;</span> splitOn <span class="st">&quot;\n&quot;</span> (trim stdout)</span>
<span id="cb1-24"><a href="#cb1-24" aria-hidden="true"></a>    _           <span class="ot">-&gt;</span> [<span class="st">&quot;&quot;</span>]</span>
<span id="cb1-25"><a href="#cb1-25" aria-hidden="true"></a>  <span class="kw">where</span> trim <span class="ot">=</span> dropWhileEnd <span class="fu">isSpace</span></span>
<span id="cb1-26"><a href="#cb1-26" aria-hidden="true"></a></span>
<span id="cb1-27"><a href="#cb1-27" aria-hidden="true"></a>logListField</span>
<span id="cb1-28"><a href="#cb1-28" aria-hidden="true"></a><span class="ot">  ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">GitLog</span> <span class="ot">-&gt;</span> <span class="dt">Integer</span> <span class="ot">-&gt;</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Context</span> <span class="dt">String</span></span>
<span id="cb1-29"><a href="#cb1-29" aria-hidden="true"></a>logListField pluralName singularName style limit path <span class="ot">=</span></span>
<span id="cb1-30"><a href="#cb1-30" aria-hidden="true"></a>  listField pluralName ctx <span class="op">$</span> unsafeCompiler <span class="op">$</span> <span class="kw">do</span></span>
<span id="cb1-31"><a href="#cb1-31" aria-hidden="true"></a>    logs <span class="ot">&lt;-</span> getGitLog style limit path</span>
<span id="cb1-32"><a href="#cb1-32" aria-hidden="true"></a>    <span class="fu">return</span> <span class="op">$</span> <span class="fu">map</span> logItem logs</span>
<span id="cb1-33"><a href="#cb1-33" aria-hidden="true"></a> <span class="kw">where</span></span>
<span id="cb1-34"><a href="#cb1-34" aria-hidden="true"></a>  ctx <span class="ot">=</span> field singularName (<span class="fu">return</span> <span class="op">.</span> <span class="fu">show</span> <span class="op">.</span> itemBody)</span>
<span id="cb1-35"><a href="#cb1-35" aria-hidden="true"></a>  logItem <span class="fu">log</span> <span class="ot">=</span> <span class="dt">Item</span> (fromString <span class="op">$</span> path <span class="op">++</span> <span class="st">&quot;/log/&quot;</span> <span class="op">++</span> <span class="fu">log</span>) <span class="fu">log</span></span></code></pre></div>
<p>The result of adding this code, and then inserting it into the template context, is that I have a new template variable that I can loop over, for each log item. The practical use is fairly limited, but I like it because it adds a certain flavour to the site. Later on I will try to use a parser combinator library to be able to present the different parts of the log with more control.</p>
<p>In any case, I’ve enjoyed playing around with Haskell in order to deploy this site, and I’m looking forward to seeing what else I can build with the language. It’s truly fascinating.</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://gohugo.io/" class="uri">https://gohugo.io/</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://www.gatsbyjs.org/" class="uri">https://www.gatsbyjs.org/</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://www.getzola.org/" class="uri">https://www.getzola.org/</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn4" role="doc-endnote"><p><a href="https://www.netlifycms.org/" class="uri">https://www.netlifycms.org/</a><a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn5" role="doc-endnote"><p><a href="https://jaspervdj.be/hakyll/" class="uri">https://jaspervdj.be/hakyll/</a><a href="#fnref5" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn6" role="doc-endnote"><p><a href="https://terminalcss.xyz/" class="uri">https://terminalcss.xyz/</a><a href="#fnref6" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></description>
    <pubDate>Sat, 27 Jun 2020 00:00:00 UT</pubDate>
    <guid>https://www.mrlee.dev/programming/blogging-in-haskell</guid>
    <dc:creator>Lee Machin</dc:creator>
</item>
<item>
    <title>On working remotely</title>
    <link>https://www.mrlee.dev/personal/on-working-remotely</link>
    <description><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">On working remotely</h2>
        <span class="ert">~2 min. read</span>
    </header>

    <section>
        <p>I imagine that working from home for extended periods is quite new to a lot of people, thanks to the COVID-19 lockdown. I enjoyed a solid year of it back when I worked remotely from Latvia. For me, it was both liberating and isolating at the same time, and while I really loved this semi-digital-nomadic lifestyle at the start, it wasn’t long before I grew an appetite for collaborating in person again.</p>
<p>If you asked me then, I’d say working fully remote on a more-or-less permanent basis is amazing! If you ask me now, I’d say that on balance I appreciate the time spent at the office and I would choose to work from home less frequently as a result. Pretty much all of my friendships have been established through work, and have continued to grow after we find work elsewhere. There’s immense value in that.</p>
<p>I think your stance on this depends entirely on your preferred style of communication, as well as the social boundaries you maintain. There’s an assumption, for example, that introverted people must love being able to work without dealing with people at the office, and I’m sure many actually do. I’m an introvert myself (as in, I spend energy doing social things and recharge by being alone), and while I can certainly cope with the situation, it is not my ideal one.</p>
<p>For me, it’s a matter of language and connection. I can’t read body language on a Zoom call, and I find that exhausting because I intuitively understand less from a conversation as a result. I’m similarly a very tactile person and spoken words are no replacement for a good hug or a round of drinks at the pub, or any kind of group get together. They’re more difficult to organise when there isn’t a central location you can all travel from, so distance does matter in this sense.</p>
<p>What is perhaps most egregious is the creeping deharmonisation of your work, and your life. Maintaining a healthy boundary is not so easy if you have to use your bedroom as your office, as opposed to your employer’s office. Having the spare room for a dedicated work space is a massive improvement, but a privilege not many can enjoy when living in small flats or house shares.</p>
<p>I’m not exactly writing this to share potential solutions or alternatives; I just wanted to put my take on it out there while everyone is talking about remote revolutions or offices becoming irrelevant. I think they still do serve a purpose, even if their purpose or shape begins to adapt to the new reality, and I do look forward to the day when that physical kind of reconnection becomes more readily available again.</p>
    </section>
</article>]]></description>
    <pubDate>Fri, 26 Jun 2020 00:00:00 UT</pubDate>
    <guid>https://www.mrlee.dev/personal/on-working-remotely</guid>
    <dc:creator>Lee Machin</dc:creator>
</item>
<item>
    <title>I am here</title>
    <link>https://www.mrlee.dev/personal/i-am-here</link>
    <description><![CDATA[<article>
    <header class="header inverse-video">
        <h2 class="title">I am here</h2>
        <span class="ert">~6 min. read</span>
    </header>

    <section>
        <p>I’ve been no stranger to depression and burnout. The former is more or less something I’ve grown to become friends with, as bizarre as it sounds. And as dark and troubling as those times have been, at their worst, they’re equally the reason where I find myself where I am now, having experienced all that I have. I wish Trump didn’t abuse the words ‘tremendous’ and ‘beautiful’ so much, because there can be great beauty in these harrowing experiences once you can look back on them and see how you’ve grown, changed, since.</p>
<p>I can tell when I start to grow burned out not because I feel more depressed, but because I start to try too hard or overcompensate for perceived failures. It’s the classic feeling of not being <em>enough</em>, and trying to pursue ever loftier goals as a way of becoming <em>more</em> enough. It inevitably ends in abject failure and if I was to ask anyone else around me while that was happening, they would quite rightly tell me that I am being too hard on myself and nobody is beating me up the way I am. The inner critic is strong in this one, and he doesn’t always want to admit or accept that he is totally enough as he is, and he should slow down and enjoy this eccentric life of his. I mean, we’re all eccentric in our own ways; it’s by no means an insult compared to an allegation of being <em>normal</em>.</p>
<p>It’s funny, really. Life for me really began in 2012 when I moved from my parents home in Bolton to my own rented room in London. It wasn’t glamourous in the slightest but the freedom and independence was well worth it. I’d joined an agency called New Bamboo that specialised in building software in Ruby on Rails, in an agile way, and their decision to hire me–a junior PHP engineer at the time with only a year of professional experience–basically changed my life. Even now, 8 years later, I don’t know anyone from there who looks back on that time unfavourably. In fact, we often lament how hard it is to find somewhere even remotely similar to them. The culture was one of a kind and I greatly matured through it, making some excellent friends who are still close-knit to this day.</p>
<p>Three years later, in 2015, and I found myself moving to Barcelona for a new job at what was then a tiny startup called Typeform, truly embracing this independence I’d established earlier in the decade. It was a fantastic place to work, with fantastic people from all walks of life, and that was before you got to the weekly beach volleyball, sailing, and the general way of life in that little corner of Spain. It was around this time that my mental health began to diminish further, so I sought out a psychotherapist who could continue the work the one I had in the UK started, and so I had an impartial output for the things I was going through.</p>
<p>You might notice I said ‘psychotherapist’ and not just ‘therapist’. In the UK I booked time with a private therapist who offered breathwork<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> as a way to dive into past trauma and help heal it, along side the usual talking and listening, and some mild CBT (Cognitive Behavioural Therapy)<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a>. After some retreats in both Trakai, Lithuania and Lesvos, Greece, I moved on to something known as somatic experiencing<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a>. I’m aware that someone reading this might think “what on earth was this guy getting himself into?” or possibly be dismissive of these alternative aspects of therapy. I think that’s fine and I accept that it can seem unusual or strange to some, and they are certainly not all-healing panaceas like many alternative medicines are perceived to be: they can very easily cause more harm than good if you place your trust into the wrong hands. I think that is a major issue with many New Age therapies, when they offer simplistic solutions to difficult problems.</p>
<p>This kind of work continued for a couple of years until I decided I wanted a quieter life than what Barcelona had to offer. If you think that sounds utterly insane, because who would want to leave such a beautiful city? Well, I offer you the chance of working full-time for a week during Festa de Gracia, a week long festival in the village of Gracia that doesn’t start to wrap up until 4 or 5am each morning. Something that is immensely fun, and is an incredible display of Catalunya’s culture of celebration, wears a little thin when you desperately want to catch some proper shut-eye before work. So, I moved to Latvia, or Jurmala in Latvia more precisely, and enjoyed a solid year of working remotely besides the beautiful Baltic coast, which is genuinely a sight to behold.</p>
<p>In that time on the continent I travelled to more places, and experienced more new things, than I ever had before. Latvia itself was (and still is) utterly gorgeous. Meanwhile, I enjoyed visiting places as varied as Naxos, Istanbul, Croatia, Estonia, Lisbon, Verona, Vienna, and a few other places I struggle to remember. I was close to the epicentre of the Barcelona terror attack in 2017, and experienced the city in a much more sombre, mournful light. I was close to being in Ankara while Erdogan’s coup took place until I was encouraged to cancel the journey. I had a genuine thirst for adventure that was hugely facilitated by being able to work remotely.</p>
<p>Not long after that, I moved back to London. Partly due to redundancies in the (London based) startup I was working for out in Latvia, but also due to isolation and missing the people I loved back in London, feeling like I was ready to get closer to the action again. The focus on my health narrowed a little and this time I chose a therapist who specialised in complex PTSD<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a> and post-traumatic growth<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a>, and later one who dealt with relationship issues specifically (as a single man, there are still things in that area to explore).</p>
<p>I’m going to skip a head a bit because I do actually have a point here, besides being autobiographical. Those eight years so far have been almost consistently tinged with the hue of mental illness. We often use the colour blue to represent a low mood, but I’d really see it as a burning greyness…smouldering embers glowing in charred remains like a burned out log fire. Occasionally a new breath of life will bring the fire back to its original ferocity but, almost inevitably, you’ll run out of logs to keep it aflame. Thus starts the slow but necessary process of tending to yourself so that you can refuel that fire after a period of recovery.</p>
<p>That’s one hell of a tortured metaphor, but I think we all have our own individual take on what mental health means to us. That’s how I see my depression and it’s no coincidence that it ties quite well into burning out.</p>
<p>To bring this back to the start, I would not change a thing as my place in this moment is entirely a function of all that shit, and all that wonder, I’ve been through over the years, going right back to my birth and my childhood as an adopted, abused kid. All of the pain, both given and received, and the pleasure, have served a purpose and I appreciate those experiences as I would not think or feel the way I currently do were it not for them. I would not value empathy and compassion and inclusivity so massively. And rather than focussing so heavily on just how shitty some of those moments have been, the amazing memories that have come from my struggle through it all are equally incalculable.</p>
<p>This isn’t to say all my problems are solved, or I’m finished with my process. That’s <em>pure BS</em> as this stuff lasts an entire lifetime as you learn, grow and adapt to new situations. But the track record I have must be pretty good if I’m <em>here</em>, right?</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Breathwork" class="uri">https://en.wikipedia.org/wiki/Breathwork</a><a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Cognitive_behavioral_therapy" class="uri">https://en.wikipedia.org/wiki/Cognitive_behavioral_therapy</a><a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Somatic_experiencing" class="uri">https://en.wikipedia.org/wiki/Somatic_experiencing</a><a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn4" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Complex_post-traumatic_stress_disorder" class="uri">https://en.wikipedia.org/wiki/Complex_post-traumatic_stress_disorder</a><a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn5" role="doc-endnote"><p><a href="https://en.wikipedia.org/wiki/Posttraumatic_growth" class="uri">https://en.wikipedia.org/wiki/Posttraumatic_growth</a><a href="#fnref5" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
    </section>
</article>]]></description>
    <pubDate>Thu, 25 Jun 2020 00:00:00 UT</pubDate>
    <guid>https://www.mrlee.dev/personal/i-am-here</guid>
    <dc:creator>Lee Machin</dc:creator>
</item>

    </channel>
</rss>

D contact.markdown => contact.markdown +0 -6
@@ 1,6 0,0 @@
---
title: Contact
---

I live in a small hut in the mountains of Kumano Kodō on Kii Hantō and would not
like to be contacted.

A posts/do-you-really-need-those-microservices.md => posts/do-you-really-need-those-microservices.md +34 -0
@@ 0,0 1,34 @@
---
title: Do you really need those microservices?
date: 2020-07-21
category: programming
status: published
---

I've been through half a dozen rounds of interviewing over the past couple of months, with different companies. Naturally, when you say you've had experience working with microservices, you're practically begging the question. What do you think about them?

I'm not really for-or-against them, and in fact I find it a little strange and frustrating when it's expected that you take a side in favour of having a nuanced opinion. The idea of being pro-microservice and anti-monolith, for example, is utterly absurd. It's never really voiced that way, but it's often easy to detect the absolutist stance masquerading as a balanced opinion. Even the title of this post falls victim to that, as the question presented is quite clearly loaded.

Anyway, I love being asked this question because after a good five years of working with distributed systems orchestrated by Kubernetes, almost entirely in the form of 'migrating away from the monolith', I've had plenty of time to formulate and adapt my thinking around it.

First and foremost, I believe the main benefit of a business switching to microservices is the manifestation of Conway's Law[^1] in practice. Prior to making the switch in architecture, the business most likely decided on an organisational structure that exchanges large, difficult to manage teams for a distributed collection of smaller, self-sufficient, self-empowered teams. More often than not these follow a squad and chapter model, otherwise reduced to 'the Spotify model', and a hierarchy of cross-functional teams is established. Once that structure is put in place and people are shuffled around a bit, the question of ownership in a mixed-responsibility, mixed-domain codebase becomes apparent. Microservices are thus the solution to a perceived conflict between squads and they shift a lot of that conflict from the teams themselves, to the channels in-between them.

Under no circumstance is the technical implication of such a change considered, particularly in older codebases for which this change would introduce a significant level of disruption. The organisational benefits of distributing teams and workload are substantial, but the drawbacks of distributing _code_ are similarly worthy of consideration too, and it often becomes a gateway to extra complexity as once-simple tasks find themselves spread apart over various network calls and machines.

I don't consider this a dealbreaker, but in my experience I've always felt like there's a step missing between the singular, monolithic codebase and the highly distributed microservice architecture. There's a hell of a lot you can do in that singular codebase, in terms of taking smaller steps towards a service-oriented architecture, or a domain-driven one. 

In those situations, you are investing primarily in the work required to understand the different domains in your codebase and how they speak to each other, with much lower risk than fundamentally changing your infrastructure as well as your architecture. In Ruby, you can abstract code into gems and provide solid, public APIs that other parts of the code can use. In Java you have modules and packages. Every language you care to use has the concept of packaging code into bundles or libraries that can be shared as a dependency.

Adopting this workflow introduces much lower risk because, in the event of failure, you can easily adjust your expectations around the domains and how they communicate and fix them in a singular release. It may not be perfect, but if you refactor enough of your code in SOA[^2]/DDD[^3] style then you'll have a much easier time turning those domains into proper microservices further down the line.

This is where a microservice architecture truly shines. If you have clear, well bounded domains, and you've developed solid API contracts as well as standards for versioning, logging, etc to allow for centralised aggregation of useful resources (for debugging or auditing, for example), and if the team in charge of the domain can essentially treat that service as a full-blown product with documentation, support, and its own priorities and backlog, then that is where the power of that infrastructure comes into play.

Another amazing usecase for this architecture is when you have strong regulatory requirements to sequester and protect personally identifying information. This could involve PCI compliance as a financial business, HIPAA as an American medical firm, or GDPR for a whole host of privacy concerns across the EU and the UK. Network access can be controlled much more easily than different modules or functions in your singular codebase, and the risk of a low-importance feature being compromised to access the critical resources in that case is far too high.

I believe that's a lot easier to do when you start early, but if you come to it late then you fall into an easy trap: how do you migrate your stuff into new services while also maintaining your existing codebase, along with all the features that you're still expected to deliver? You can't stop the world to rewrite all of the code, so there's a possibility that you enter a refactoring spiral as your service plays cat and mouse with the monolith. This is infinitely more difficult when migrating a codebase written in a dynamic language, as automated refactoring is nowhere near as easy without a solid type-system to back it up.

If I was to offer anybody advice about how to make all of this happen successfully, I'd say to stop thinking in terms of the existing monolith, and instead look at what individual products you could separate or extract, or even spin-off into their own businesses if the idea was unique enough to sell individually. And don't jump to solutions like Kubernetes until you're dealing with enough of these services that your existing deployment setup is too hard to manage.

[^1]: <https://en.wikipedia.org/wiki/Conway%27s_law>
[^2]: <https://en.wikipedia.org/wiki/Service-oriented_architecture>
[^3]: <https://en.wikipedia.org/wiki/Domain-driven_design>
\ No newline at end of file

M site.hs => site.hs +38 -10
@@ 100,10 100,36 @@ logListField pluralName singularName style limit path =

--------------------------------------------------------------------------------

type FeedRenderer
  =  FeedConfiguration
  -> Context String
  -> [Item String]
  -> Compiler (Item String)

feedConfiguration :: FeedConfiguration
feedConfiguration = FeedConfiguration
  { feedTitle       = "mrlee.dev"
  , feedDescription = "Special topics in calamity software dev"
  , feedAuthorName  = "Lee Machin"
  , feedAuthorEmail = "www@mrlee.dev"
  , feedRoot        = "https://www.mrlee.dev"
  }

feedCtx :: Context String
feedCtx = postCtx <> bodyField "description"

feedCompiler renderer =
  renderer feedConfiguration feedCtx
    =<< fmap (take 10)
    .   recentFirst
    =<< loadAllSnapshots "posts/*" "content"

--------------------------------------------------------------------------------

postCtx :: Context String
postCtx =
  field "size" (return . show . length . itemBody)
    <> ertField "ert" "posts-content"
    <> ertField "ert" "prerendered-content"
    <> dateField "date" "%B %e, %Y"
    <> dropIndexHtml "url"
    <> defaultContext


@@ 127,13 153,6 @@ main = do
      route idRoute
      compile compressCssCompiler

    match (fromList ["about.rst", "contact.markdown"]) $ do
      route $ setExtension "html"
      compile
        $   pandocCompiler
        >>= loadAndApplyTemplate "templates/default.html" defaultContext
        >>= relativizeUrls

    matchMetadata
        "posts/**"
        (\m -> isDevelopment || lookupString "status" m == Just "published")


@@ 146,11 165,20 @@ main = do
            `composeRoutes` appendIndex
          compile
            $   pandocCompiler
            >>= saveSnapshot "posts-content"
            >>= loadAndApplyTemplate "templates/post.html"    postCtx
            >>= saveSnapshot "prerendered-content"
            >>= loadAndApplyTemplate "templates/post.html" postCtx
            >>= saveSnapshot "content"
            >>= loadAndApplyTemplate "templates/default.html" postCtx
            >>= relativizeUrls

    create ["atom.xml"] $ do
      route idRoute
      compile $ feedCompiler renderAtom

    create ["rss.xml"] $ do
      route idRoute
      compile $ feedCompiler renderRss

    create ["archive/index.html"] $ do
      route idRoute
      compile $ do