<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Primal Skill Blog - Programming, Business, Growth]]></title><description><![CDATA[Blogging website of Primal Skill featuring real-world programming tutorials, outsourcing, business-related advice, and other quality content for software developers.]]></description><link>https://primalskill.blog</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 15:56:10 GMT</lastBuildDate><atom:link href="https://primalskill.blog/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How and What to Log in a Program]]></title><description><![CDATA[This blog post is about the DOs and DON'Ts of code logging I picked up along the way in my coding career.
This is a quick list, a "cheat sheet" if you will, which I will expand on down below.

DO log your program output to stderr. This is meant for b...]]></description><link>https://primalskill.blog/how-and-what-to-log-in-a-program</link><guid isPermaLink="true">https://primalskill.blog/how-and-what-to-log-in-a-program</guid><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[software development]]></category><category><![CDATA[logging]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 22 Oct 2024 21:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1697892527133/9e2a67da-557b-46d8-b71a-08a72df9a2ee.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This blog post is about the DOs and DON'Ts of code logging I picked up along the way in my coding career.</p>
<p>This is a quick list, a "cheat sheet" if you will, which I will expand on down below.</p>
<ul>
<li><p>DO log your program output to <code>stderr</code>. This is meant for both errors and diagnostics, logs are classified as "diagnostic messages of a program".</p>
</li>
<li><p>DO ensure the only place you're logging your program output to is <code>stderr</code>, not a file, a DB, or a third-party service.</p>
</li>
<li><p>DO adhere to structured logs. JSON is the go-to format for a majority, but if you're working with simple logs, <a target="_blank" href="https://brandur.org/logfmt">logfmt</a> works fine too.</p>
</li>
<li><p>DO play around with log levels. The default level should be set to <code>INFO</code> in production and <code>DEBUG</code> in development.</p>
</li>
<li><p>DO NOT log sensitive details such as PII data - stick to using IDs (e.g. user ID).</p>
</li>
<li><p>DO NOT log and handle an error simultaneously.</p>
</li>
</ul>
<h2 id="heading-the-deep-dive">The Deep Dive</h2>
<h3 id="heading-logging-to-stderr">Logging to stderr</h3>
<p>No matter the log level, it should be streamed to <code>stderr</code>. From the docs on <code>stderr</code> it reads like this:</p>
<blockquote>
<p>Under normal circumstances every UNIX program has three streams opened for it when it starts up, one for input, one for output, and one for printing diagnostic or error messages.</p>
</blockquote>
<p>Logs are diagnostics and are not necessarily meant to be consumed by the end user of the program.</p>
<p>Keep in mind that many production systems do not adhere to this original POSIX standard though, and it's fine as long as the output stream is consistent.</p>
<h3 id="heading-log-to-stderr-and-nowhere-else">Log to stderr and nowhere else</h3>
<p>It's not the job of your program to log to a file, to a database, or to a 3rd party service. You will be making your program more complex if you do.</p>
<p>Of course, there are exceptions, when for example logging to the standard streams is not possible.</p>
<p>In all other cases, let other tools handle that for you, such as a log scraper that will send the logs to a Grafana, Loki, Datadog, etc.</p>
<h3 id="heading-adhere-to-structured-logging">Adhere to structured logging</h3>
<p>Structured logs are way easier to process by other machines than by humans, and this is the point exactly.</p>
<p>You don't need to drill down into every log line separately, but to have an aggregate overview of the logs that your program is emitting based on which you can make meaningful decisions.</p>
<p>Use JSON because it is widely used. I haven't encountered a log management service that doesn't support JSON, but if you like other formats, like XML or logfmt, then use those as long as you are consistent. Pick one format and adhere to it.</p>
<h3 id="heading-log-levels">Log levels</h3>
<p>This is a tricky one. Every developer has an opinion on which log levels should be used.</p>
<p>I personally found that most programs do not need more than three levels which are <code>INFO</code>, <code>ERROR</code>, and <code>DEBUG</code>. Not even <code>DEBUG</code> is necessary in most cases.</p>
<p><strong>So let me explain these levels:</strong></p>
<ul>
<li><p><code>DEBUG</code>: This should be default in development, this level is only enabled in production as a last resort, if everything else fails, which is also a good opportunity to improve on log messages. Usually, metrics and development events are logged on this level.</p>
</li>
<li><p><code>INFO</code>: Represents normal operation with sufficient metadata like, "user_id added record into DB", but not as exhaustive as <code>DEBUG</code>. Anything that helps you pinpoint the execution flow of your program.</p>
</li>
<li><p><code>ERROR</code>: Usually, indicates an error that cannot be recovered from, e.g. "cannot insert data into the db", and with enough metadata that you can reconstruct the error when debugging.</p>
</li>
</ul>
<p><strong>You don't need these log levels:</strong></p>
<ul>
<li><p><code>WARNING</code>: these are basically <code>INFO</code> logs with a label attached to it. They are definitely not <code>ERROR</code> logs, but it's something that you should keep an eye on, e.g. "database query took 3 seconds", above the threshold considered normal. It could signal a lot of things out of the ordinary.</p>
</li>
<li><p><code>NOTICE</code>, <code>FATAL</code>, <code>ALERT</code>, <code>CRITICAL</code>, etc.: are all just semantics of either <code>INFO</code> or <code>ERROR</code> where a label would suffice, e.g. "<code>INFO</code> alert message alert=true".</p>
</li>
</ul>
<h3 id="heading-do-not-log-sensitive-data">Do not log sensitive data</h3>
<p>I can't state the obvious. Not one system is 100% hackproof.</p>
<p>Logging sensitive data such as names and OMG, passwords is creating yet another attack vector.</p>
<p>The best way to filter out sensitive data is to have an <a target="_blank" href="https://en.wikipedia.org/wiki/Extract,_transform,_load">ETL (Extract-Transform-Load)</a> function execute on the log messages before it is written to the destination stream.</p>
<h3 id="heading-do-not-handle-errors-and-log-them-too">Do not handle errors and log them too</h3>
<p>Logging an error means you handled it. You either handle the error or log it if it's an unrecoverable error.</p>
<p>For example, if a database insert fails, the code could retry the query like two more times, that's handling it. If the insert fails every time, the code should log that so somebody can inspect it later on.</p>
<p>If you handle the error (e.g. retry the insert query) and log it too, that log line will be meaningless to whoever is analyzing the logs, because ultimately it wasn't an error that the program couldn't recover from.</p>
<h2 id="heading-the-art-of-writing-good-logs">The art of writing good logs</h2>
<p>Answering a few questions each time you wish to write a log line in your code is a good way to think about whether it's worth writing that log or not.</p>
<ol>
<li><p><strong>Can the event be reproduced from the logs?</strong> If the event, be it a warning or an error, cannot be reproduced just from the logs it's not worth logging. For example, "<em>cannot update table</em>". Which table? Where in the code? What data was used?</p>
</li>
<li><p><strong>Are the logs rich with enough metadata to understand what happened?</strong> This is why structured logging is so important, that you can attach metadata to each log. Example of a bad log: "<em>fetching data from URL failed</em>", but doesn't include which URL, nor what request variables were sent.</p>
</li>
<li><p><strong>Can multiple log lines be correlated?</strong> This is most prevalent in Web API services where multiple requests could be happening at the same time, making the log lines intertwined with each other. It is a good practice to attach a so-called "request_id" to individual logs so that you can track down and correlate these logs later on.</p>
</li>
<li><p><strong>Is the error clear just by reading the error logs?</strong> The example above, "<em>cannot update table</em>", while it is a simple message, it's not clear. It does not help in any way, it can even be considered noise. A better message would be "<em>cannot update table user_photos: user does not have access to group</em>" with metadata such as <code>group_id: 123</code> and <code>user_id: 456</code>.</p>
</li>
<li><p><strong>Is it clear from the log when and where the event occurred?</strong> A program execution can take many code paths that could result in the same error. For example, multiple functions can update the same database table. Do you know which code section resulted in an error and do you know when the error occurred? Save a timestamp and the "file:line" location with every log, like: "<em>cannot update table user_photos</em>" metadata <code>t=1697880685</code> and <code>user_group_photos.php:38</code> or separate it like <code>filename=user_group_photos.php</code>, <code>line=38</code>.</p>
</li>
</ol>
<h2 id="heading-individual-log-lines-vs-wide-events">Individual log lines vs wide events</h2>
<p>There has always been a debate on whether log lines or wide events are a better choice.</p>
<p>Every function follows an execution path. The question is do you emit multiple logs along this path or one big one at the end of the execution?</p>
<p>In my experience, generally, individual log lines find their utility in CLI applications, where the execution path is small and clear enough, while web projects or request/response-based applications prefer wide events, enriched with metadata added throughout the execution path resulting in a single log line emitted at the end of the execution path.</p>
<h2 id="heading-takeaway">Takeaway</h2>
<p>It's not just about jotting down what your program is up to but analyzing it so you can make clear decisions about what to improve in your code.</p>
<p><strong>After all, what is a log good for if nobody reads it?</strong></p>
<hr />
<p>Photo credits: <a target="_blank" href="https://www.pexels.com/@njeromin/">Niklas Jeromin</a></p>
]]></content:encoded></item><item><title><![CDATA[Software Specification Fallacies]]></title><description><![CDATA[Over the years, I have read numerous poorly written specs. Don't get me wrong, writing good specs is hard and it's more of an art form than anything else.
The three main "themes" of bad specs I saw over the years, that come up repeatedly are the foll...]]></description><link>https://primalskill.blog/software-specification-fallacies</link><guid isPermaLink="true">https://primalskill.blog/software-specification-fallacies</guid><category><![CDATA[learning]]></category><category><![CDATA[software development]]></category><category><![CDATA[coding]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Mon, 19 Aug 2024 04:47:47 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1723901731448/fd326031-d5c2-45c3-b659-3796a93e4688.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Over the years, I have read numerous poorly written specs. Don't get me wrong, writing good specs is hard and it's more of an art form than anything else.</p>
<p>The three main "themes" of bad specs I saw over the years, that come up repeatedly are the following.</p>
<p><strong>Simplifying specs too much</strong></p>
<p>This is more of the failure to address corner cases and potential pitfalls. The issue is mainly about glossing over complex scenarios or failing to consider the full scope of the feature or the project itself.</p>
<p>For example, specs that state "set up the database engine" without detailing the specific requirements, configs, or integrations needed can result in an implementation that doesn't meet the project's goals.</p>
<p>More often than not a problem solution is indeed simple, but sometimes complex problems require complex solutions and careful scoping.</p>
<p><strong>It's just CRUD</strong></p>
<p>No, it's NOT just CRUD. Stating this is diminishing the problem solution and oversimplifying the complexities involved in creating software. While CRUD operations are fundamental, they often require careful consideration of various factors such as data validation, security, concurrency, and performance.</p>
<p>There is always more to the problem than just simply stating that "It's just CRUD".</p>
<p><strong>The rest are details</strong></p>
<p>Focusing on the main solution is always the right thing to do but glossing over important details because it's not part of the main solution is a huge mistake. Even if those details are not part of the original problem, they need to be explored before scoping out the solution that the problem requires.</p>
<p>Software projects deal with a high level of complexity and unpredictability. Every module almost always depends on other modules and each of these modules is inherently more abstract than we think it is.</p>
<p>Building software is hard.</p>
<hr />
<p>Cover photo by <a target="_blank" href="https://pixabay.com/users/mrillustration-33605684/">Mrillustration</a></p>
]]></content:encoded></item><item><title><![CDATA[Technologies Change]]></title><description><![CDATA[I still remember dabbling with my father's first computer in the mid-90s when I was around 7 or 8 years old. Back then, the computer "unit" took up the space of a small desk, and the big CRT monitor was placed on top of the unit.
My very first intera...]]></description><link>https://primalskill.blog/technologies-change</link><guid isPermaLink="true">https://primalskill.blog/technologies-change</guid><category><![CDATA[learning]]></category><category><![CDATA[software development]]></category><category><![CDATA[Programming Tips]]></category><category><![CDATA[Programming Blogs]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Sun, 23 Jun 2024 10:55:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1719140012728/80527334-21f9-4fa7-9778-2478bbe9845f.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I still remember dabbling with my father's first computer in the mid-90s when I was around 7 or 8 years old. Back then, the computer "unit" took up the space of a small desk, and the big CRT monitor was placed on top of the unit.</p>
<p>My very first interaction with programming was when I opened a random exe file, saw a bunch of weird characters in the editor, and started editing it. To my surprise, the file didn't run anymore, so I edited more and more characters until, at one point, when I executed the file in the CLI, it turned the prompt green.</p>
<p>That was the magic moment for me. After that point, I wanted nothing more than to sit in front of that IBM 80286 all day long and figure out what made that prompt switch to green; and then I discovered DOS BASIC.</p>
<p>Fast forward to the early 2000s, I discovered web development with HTML4, CSS, JavaScript, and PHP v3. This journey continued until around 2010 when Node.js was released. In 2007 I founded my software development company, and then around 2015-ish, I had a client project requirement to be done in ReactJS on the front-end and Go on the back-end; and the rest is history.</p>
<p>Along the way, I used almost all major programming languages in some form or another, either professionally or just as a hobby, ranging from C and Pascal in high school to Ruby, ASP, C#, modern PHP, Java, and the list could go on.</p>
<p>My point is that in all these years, the technologies have changed radically, but more importantly, what remained constant were the <a target="_blank" href="https://primalskill.blog/10-books-every-programmer-should-read">general programming principles I learned on my journey.</a></p>
<p>I wasn't using the same technologies in the 2010s as I was in the 2000s, and I'm not using the same tech now as I was a decade ago. If I had focused only on the technology, I would probably still be stuck in BASIC.</p>
<p><strong>I tell every developer I work with, to learn the general programming principles and they will be fine for the rest of their life.</strong></p>
<p>If you learn technologies instead of programming, you will become obsolete when (and not IF) that technology falls out of trend or is replaced by some AI automation.</p>
<p>A decade ago my tech stack looked totally different than today and in the next ten years it will look radically different I'm 100% sure of it.</p>
<hr />
<p><em>Cover photo by</em> <a target="_blank" href="https://pixabay.com/users/seowoo_lee-21601663/"><em>seowoo_lee</em></a></p>
]]></content:encoded></item><item><title><![CDATA[It’s Okay to Use Utils]]></title><description><![CDATA[Everyone probably heard at some point in their career that "Util packages are bad", "Don't use util modules!", or "Utils are an anti-pattern".
The problem with these statements is that they are living on the "extremes"; and extremes in programming ar...]]></description><link>https://primalskill.blog/its-okay-to-use-utils</link><guid isPermaLink="true">https://primalskill.blog/its-okay-to-use-utils</guid><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[learning]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 18 Jun 2024 04:52:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1718188204136/aa5c5483-059f-4fbf-a57d-aa790f935e64.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Everyone probably heard at some point in their career that "<em>Util packages are bad</em>", "<em>Don't use util modules!</em>", or "<em>Utils are an anti-pattern</em>".</p>
<p>The problem with these statements is that they are living on the "extremes"; and extremes in programming are the real anti-pattern.</p>
<p>When senior developers talk about utils being bad they refer to util packages <strong>that are global to the project.</strong> Code that is accessible from everywhere in the code base, can lead to code organizational issues, maintaining or refactoring this code is hard.</p>
<p><strong>Project-level</strong> util packages resolve concepts that are too broad for the project. What code do you put inside these packages? String manipulation functions? File handling helpers? Parsing request variables? The list could go on.</p>
<p><strong>Package-level</strong> utils, on the other hand, are perfectly fine to write, for example, having some entities/models/structs that describe a product and the util functions that parse or manipulate the name of the product.</p>
<p>Ideally, these utils shouldn't be used outside the package where they were defined, but other internal packages could use these to parse a product's name.</p>
<p>So yes, utility functions are useful if their scope is well defined.</p>
<hr />
<p><em>Cover photo by</em> <a target="_blank" href="https://pixabay.com/users/piro4d-2707530/"><em>PIRO4D</em></a></p>
]]></content:encoded></item><item><title><![CDATA[Opinions After 20 Years of Software Development]]></title><description><![CDATA[Inspired by other articles I've read about various developers' opinions on software.
These opinions formed along the way in my career that I wouldn't always agree with in the past, but that is called learning.
So here's my list in no particular order...]]></description><link>https://primalskill.blog/opinions-after-20-years-of-software-development</link><guid isPermaLink="true">https://primalskill.blog/opinions-after-20-years-of-software-development</guid><category><![CDATA[Learning Journey]]></category><category><![CDATA[software development]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Software Engineering]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Wed, 12 Jun 2024 10:35:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1718187834266/d80d5f9e-3a9c-4500-b40a-34b051586b8c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Inspired by other articles I've read about various developers' opinions on software.</p>
<p>These opinions formed along the way in my career that I wouldn't always agree with in the past, but that is called learning.</p>
<p>So here's my list in no particular order:</p>
<ul>
<li><p><strong>Have an open mind but also strong opinions</strong>: People gather into tribes/camps on everything, like tabs vs. spaces, <a target="_blank" href="https://primalskill.blog/a-brief-history-of-javascript-frameworks">JS vs. TS</a>, etc. Having an open mind to new things is essential, but also strong opinions on things you know it's working, otherwise you will just drift with the flow.</p>
</li>
<li><p><strong>There are no terrible programming languages</strong>: They were created to solve problems, if you haven't faced that problem it doesn't automatically mean they are bad, it's just not the right one for your particular problem.</p>
</li>
<li><p><strong>No such thing as right or wrong software:</strong> only <a target="_blank" href="https://primalskill.blog/wins-and-trade-offs-in-software">more or less fitting</a> to the problem context.</p>
</li>
<li><p><strong>Context switching does more damage than it seems</strong>: Let developers develop. If you constantly interrupt them they will be much less performant. This includes setting up calls for every insignificant problem just to have a "face-to-face". 90% of things could be an e-mail or a Slack message.</p>
</li>
<li><p><strong>Clients will lose focus on the bigger picture:</strong> If the project is complex, there will come a time when those client calls are just <a target="_blank" href="https://primalskill.blog/bikeshedding-in-software-engineering-teams">bikeshedding</a> that will waste everybody's time.</p>
</li>
<li><p><strong>Not everything is about work:</strong> even if you love what you do, you must set up a healthy work-life balance. I love what I do with a passion, but I rarely do work stuff after 5 PM.</p>
</li>
<li><p><a target="_blank" href="https://primalskill.blog/technologies-change"><strong>Technologies change</strong></a>: I tell every dev I work with, to learn the general programming principles and they will be fine for the rest of their life. If you learn technologies instead of programming you will become obsolete when, and not if, that technology falls out of trend. 10 years ago my tech. stack looked totally different than today and in the next 10 years, I'm sure it will look radically different.</p>
</li>
<li><p><strong>No FOMO:</strong> It's nice to play with new technologies, but <a target="_blank" href="https://primalskill.blog/how-to-keep-up-to-date-with-web-development">don't base your career on FOMO</a>, like AI is the shiny new thing now, I do use it, and I play around with it, but I'm not jumping in head-first replacing my tech stack and approach to programming.</p>
</li>
<li><p><strong>Cross the bridge when you get there:</strong> Don't write code toward inexistent scenarios. "What ifs" will miss the deadline every time.</p>
</li>
<li><p><strong>Code is the by-product of programming:</strong> Software development is so much more than writing code, learn the other aspects of it. This is why metrics like LoC are useless and an anti-pattern. In my experience, writing code is 20% of the overall work that needs to be done.</p>
</li>
<li><p><strong>It's human nature to be lazy:</strong> A task will always fill out the time that is assigned to it. Lazy programming and coding practices should be nipped in the bud early on with a rather firm stance.</p>
</li>
<li><p><strong>Becoming bored is the leading cause of leaving a company:</strong> when there's no end-sight to a task or a feature communications break down and boredom settles in. At first, devs. will go on auto-pilot and then switch jobs.</p>
</li>
<li><p><strong>Boring and simple is always the right answer:</strong> I would rather <a target="_blank" href="https://primalskill.blog/on-writing-good-code">work with boring and simple technologies</a> or projects than the new shiny things that don't get the job done or projects that will fade out of relevance very quickly.</p>
</li>
<li><p><strong>Tooling is important:</strong> Good tools that help you and other devs are important. If it's complicated to set up, nobody will use it.</p>
</li>
<li><p><strong>The more communication "choke points" the worse is the result:</strong> If you can talk directly to somebody then do it. The more people in the communication chain the more problems and misunderstandings. It's like the game of Telephone.</p>
</li>
<li><p><strong>It's a fine balance when asking for help:</strong> What I want to hear from a dev is that they exhausted every possible avenue and can't move ahead, and only then ask for help. <a target="_blank" href="https://primalskill.blog/the-curse-of-software-knowledge">It's a fine balance because devs could shy away very quickly from asking for help</a> but also it's not productive to hold their hands on every minuscule thing.</p>
</li>
<li><p><strong>Bet on the human:</strong> Treat devs as humans and not "resources" and it will pay off in the long run.</p>
</li>
<li><p><strong>Technical interviews are almost useless:</strong> Nobody can assess technical skills in this industry by doing 1 - 2 rounds of interviews. You could only have "some" idea. I would rather hire the individual with a paid internship for a couple of months to see if they are a good team fit, and this is also true from the developer's perspective. If the expectations are set upfront it's a win-win for everybody and there are no hard feelings if things don't align.</p>
</li>
<li><p><strong>Processes are not important at the beginning:</strong> only when you grow bigger do they become essential.</p>
</li>
<li><p><strong>Junior devs will not be productive right away:</strong> Depending on the onboarding processes, junior devs will need a couple of weeks to a few months before they can become productive on a project or team.</p>
</li>
<li><p><strong>The world is built on open source:</strong> and it's <a target="_blank" href="https://primalskill.blog/the-hamster-wheel-of-tech">hanging by a thin thread</a>, that if breaks, will burn down this whole circus.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[A Quick One About CSS Viewport Sizes]]></title><description><![CDATA[I can still remember to this day when I wrote my very first web page on a computer that had a CRT monitor with a resolution of 640x480 pixels. This was around the late 90s or early 2000s.
Back then everything had a "responsive" design even though tha...]]></description><link>https://primalskill.blog/a-quick-one-about-css-viewport-sizes</link><guid isPermaLink="true">https://primalskill.blog/a-quick-one-about-css-viewport-sizes</guid><category><![CDATA[CSS]]></category><category><![CDATA[Web Design]]></category><category><![CDATA[Design]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 11 Jun 2024 05:23:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1717243599450/1d4c9d9d-9718-41ea-840d-86681e128d33.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I can still remember to this day when I wrote my very first web page on a computer that had a <a target="_blank" href="https://en.wikipedia.org/wiki/Cathode-ray_tube">CRT monitor</a> with a resolution of 640x480 pixels. This was around the late 90s or early 2000s.</p>
<p>Back then everything had a "responsive" design even though that word was foreign to web developers. We just assumed that if people have 640px widths or 800px widths others most likely have smaller or larger resolution sizes.</p>
<p>Today, we somewhat come full circle with responsive design, though it's not just about pixel width, oh it's much much more. There are so many variables to take into account that I honestly lost track of it all. Display sizes come in all shapes and forms ranging from 320px width up to 5120px wide or more, not to mention pixel density multipliers, <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#art_direction">image art direction</a>, and so on...</p>
<p>I see a lot of web designers adjusting their design to make it look good only on a handful of pixel widths like the most popular ones being 768px, 1024px, 1280px, ... where they should create web designs that work on all resolutions.</p>
<p>Progressive enhancement should be core to web design as well, targeting the smallest screen size and working your way up to larger sizes, be it using CSS <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries">media queries</a>, <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries">containers</a>, <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox">flexbox</a>, or <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid">CSS grids</a>.</p>
<p><strong>Disregard popular resolutions, because I can resize my browser window to 628x1317. Does the design look good on it? The answer should always be yes.</strong></p>
<hr />
<p><em>Cover photo by</em><a target="_blank" href="https://pixabay.com/users/pexels-2286921/"><em>Pexels</em></a></p>
]]></content:encoded></item><item><title><![CDATA[On Writing Good Code]]></title><description><![CDATA[Over the years I have realized that delivered code is light-years better than beautiful but useless code. This of course is not to belittle the "code artists" I look up to who have the mental capability to deliver "JIT code" that is also clean, beaut...]]></description><link>https://primalskill.blog/on-writing-good-code</link><guid isPermaLink="true">https://primalskill.blog/on-writing-good-code</guid><category><![CDATA[Beginner Developers]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Sat, 01 Jun 2024 10:02:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1717236106863/cad8c441-431b-4d3a-acbd-d147bc42d7f0.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Over the years I have realized that delivered code is light-years better than beautiful but useless code. This of course is not to belittle the "code artists" I look up to who have the mental capability to deliver "JIT code" that is also clean, beautiful, and reads like a good novel.</p>
<p>So what about the <em>rest of us</em>? What can we do to make our code just that tiny bit better for our future selves and colleagues who will maintain it?</p>
<p>I have gathered a few principles, North Stars if you will, to guide me along this journey, and the first is that:</p>
<blockquote>
<p>Programs must be written for people to read, and only incidentally for machines to execute. -- <a target="_blank" href="https://en.wikipedia.org/wiki/Hal_Abelson">Hal Abelson</a></p>
</blockquote>
<p>Even though code will ultimately be interpreted and executed by machines, the code base itself should always be written with humans first in mind.</p>
<p>I have never successfully got my way around in a code base that wasn't readable and the <a target="_blank" href="https://primalskill.blog/wins-and-trade-offs-in-software">code architecture could easily be reasoned about</a>. There's something beautiful when reading well-written code, the execution path flows in our mind like well-composed music.</p>
<blockquote>
<p>A long descriptive name is better than a short enigmatic name. A long descriptive name is better than a long descriptive comment. -- <a target="_blank" href="https://en.wikipedia.org/wiki/Robert_C._Martin">Robert C. Martin</a></p>
</blockquote>
<p>There are always two camps of people when we're talking about software, and the idea above is no exception. In the past developers and mentors always told new programmers to have small variable names, functions, and constants.</p>
<p>This, like everything else, in programming is nuanced and can be interpreted in multiple ways. Yes, when variables don't have any meaningful underlying logic behind them and are ephemeral such as a counter variable in a loop, by all means, should have short names.</p>
<p>Anything else should instantly let the reader know what it is about, a function called <code>UpdateProductStatusCode</code> is leaps and bounds better than a function called <code>updProd</code> or <code>upd_prod_st</code> .</p>
<p>Also, the second part of the quote <em>A long descriptive name is better than a long descriptive comment</em> refers to the fact that if a developer has to write a long comment to explain what a function or code block is about is usually a "code smell" to refactor the code. Explaining complex code flows is still encouraged though, I like writing long comments to explain what a function <em>does</em> if the execution path is complicated.</p>
<blockquote>
<p>Code is read more than it is written. -- Daniel Roy Greenfeld</p>
</blockquote>
<p>I've written more about this concept in this <a target="_blank" href="https://primalskill.blog/code-is-read-more-than-it-is-written">blog post here</a>.</p>
<p>This quote underlines the idea that the majority of developers' time is spent understanding code and only incidentally spending time writing code. I could argue that writing code is just a <em>side effect</em> of thinking deeply about a solution to a very specific software problem.</p>
<blockquote>
<p>Don't comment bad code, rewrite it. -- <a target="_blank" href="https://en.wikipedia.org/wiki/Brian_Kernighan">Brian Kernighan</a></p>
</blockquote>
<p>Commenting a badly written piece of code is lazy, but not everybody has the luxury of time to refactor code often, but nonetheless, everybody should strive for it.</p>
<p>Production code is inherently messy and always in need of refactoring, commenting, and explaining why a poorly written function does what it does is always encouraged in my opinion when you don't have the necessary resources to improve it.</p>
<blockquote>
<p>In programming, boring and simple is always better than smart and complex. -- <a target="_blank" href="https://en.wikipedia.org/wiki/Rob_Pike">Rob Pike</a></p>
</blockquote>
<p>A straightforward and simple solution is always preferable because it is easier to understand, maintain, and debug. Simple code is more accessible to other developers who may need to work on it in the future, reducing the likelihood of introducing bugs or errors.</p>
<p>Complex solutions, while they might seem clever or efficient, can introduce unnecessary complications, making the code harder to read or build on top of. Complex code can become a maintenance burden, as it needs more time to understand.</p>
<p>I will always choose the <a target="_blank" href="https://primalskill.blog/its-probably-fine">simple, boring, and battle-tested tech.</a> over the latest and newest shiny thing as I mentioned at the beginning of this article that delivered code is better than beautiful code that misses the deadline.</p>
<hr />
<p>Cover photo by <a target="_blank" href="https://pixabay.com/users/ronymichaud-647623/">ronymichaud</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Code Is Read More Than It Is Written]]></title><description><![CDATA[The title of this article is a quote from Daniel Roy Greenfeld.
It underlines the idea that a majority of a programmer's time is spent understanding the code, instead of actually writing it. When developers write code they also update a "living docum...]]></description><link>https://primalskill.blog/code-is-read-more-than-it-is-written</link><guid isPermaLink="true">https://primalskill.blog/code-is-read-more-than-it-is-written</guid><category><![CDATA[learn coding]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 27 Feb 2024 07:00:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1704366155853/05ac6dab-5294-4239-9eed-f4c4ca3c9c0b.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The title of this article is a quote from Daniel Roy Greenfeld.</p>
<p>It underlines the idea that a majority of a programmer's time is spent understanding the code, instead of actually writing it. When developers write code they also update a "living documentation" of the project that other developers will have to read and understand.</p>
<p><strong>In a typical project the code "read vs write" ratio is 7:1.</strong> Code is read seven times more than it is written. It's logical, if you think about it because usually a piece of code block is written once and then read much more.</p>
<p>Quality code is not only functional but is also easily readable. Always write easy-to-understand code even if nobody will ever read it because most likely a few months from now YOU will be the one who has to read and understand it again.</p>
<p>Remember:</p>
<blockquote>
<p>Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live. -- <a target="_blank" href="https://wiki.c2.com/?CodeForTheMaintainer">Code for the Maintainer</a></p>
</blockquote>
<hr />
<p>Cover photo by <a target="_blank" href="https://www.pexels.com/@rostislav/">Rostislav Uzunov</a></p>
]]></content:encoded></item><item><title><![CDATA[Rolling Forward]]></title><description><![CDATA[One strategy I have never seen reliably done is rolling software updates backward.
Rolling back code in my experience is much harder to do, so why bother with it?
Do you have a bug in production? Roll out a hotfix. Having a new feature that wasn't su...]]></description><link>https://primalskill.blog/rolling-forward</link><guid isPermaLink="true">https://primalskill.blog/rolling-forward</guid><category><![CDATA[learning]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Git]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 13 Feb 2024 07:00:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1704205851210/47dfd7be-118b-4ccc-a668-7f44247deec4.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>One strategy I have never seen reliably done is rolling software updates <strong>backward.</strong></p>
<p>Rolling back code in my experience is much harder to do, so why bother with it?</p>
<p>Do you have a bug in production? Roll out a hotfix. Having a new feature that wasn't supposed to be exposed to the users? Roll out an update that disables that feature. <strong>In other words, roll forward.</strong></p>
<p>Rolling code backward is hard if you work in a team and a lot of new updates are merged into the main branch, rolling your code back would most likely create inconsistencies and conflicts. It's much easier to create the fix and move forward with updates.</p>
<hr />
<p>There is a distinction between <strong>code under version control</strong> and <strong>code deployed in production</strong>.</p>
<p>Code under version control is not necessarily deployed into production but code in prod. <strong>should almost always be rolled back <em>temporarily</em></strong> if you have a serious bug in the code that's blocking users from using your software.</p>
<p>One way of temporarily rolling back production code is to have multiple versions "readily available". In web development that means keeping the most up-to-date version and one version before it.</p>
<p>For smaller projects, this is achievable by not overwriting deployed code in production, but having multiple versions in separate folders and a symlink pointing to the version you want. The symlinked folder is the one that the web server has access to.</p>
<p>Switching versions this way is as easy as changing where the symlink points to.</p>
<p>In the meantime having a hotfix that's "rolled forward" in version control and deploying that when it is ready.</p>
<hr />
<p>Cover photo by <a target="_blank" href="https://www.pexels.com/@soner-arkan-277045183/">Soner Arkan</a></p>
]]></content:encoded></item><item><title><![CDATA[Wins and Trade-Offs in Software]]></title><description><![CDATA[Repeat after me:

No such thing as perfect software.

Software is never truly finished. It's always in a state of constant change and evolution. From improving efficiency, security updates, and enhancing user experience, to fixing inevitable bugs, it...]]></description><link>https://primalskill.blog/wins-and-trade-offs-in-software</link><guid isPermaLink="true">https://primalskill.blog/wins-and-trade-offs-in-software</guid><category><![CDATA[Learning Journey]]></category><category><![CDATA[software development]]></category><category><![CDATA[project management]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 30 Jan 2024 07:00:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1704364600331/897f3fe3-6121-4908-93ea-a9e3a8fcdbc6.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Repeat after me:</strong></p>
<blockquote>
<p><a target="_blank" href="https://primalskill.blog/the-hamster-wheel-of-tech"><strong>No such thing as perfect software.</strong></a></p>
</blockquote>
<p>Software is never truly <em>finished</em>. It's always in a state of constant change and evolution. From improving efficiency, security updates, and enhancing user experience, to fixing inevitable bugs, it never stops changing.</p>
<p>This constant change is not without its challenges though.</p>
<p><strong>Picking the "right" software architecture, for example, is like picking the right battles and then managing the trade-offs.</strong> It can almost always be improved mainly because business requirements and specs change.</p>
<p>People always bring up examples trying to reason about software development that everybody can relate to. Examples such as, software is like building a car because everybody can understand what a car is. First, building the wheels, then the engine, and chassis, and finally putting it all together.</p>
<p>But software is not at all built like a car because people know <strong>exactly</strong> how a car should look and how it should work while in software development there's always a big unknown.</p>
<p>When thinking about a software project and developing it, there are always some elements that were never built before and it's always unique to that particular software project; I'm not talking about implementing a login screen for example but the overall project and how all the various elements should work together.</p>
<p><strong>Developing a feature to work in a particular way is not a guarantee that's how users will use it or if they will use it at all.</strong> It's like building a car to be driven on the road, but users would like to fly with it.</p>
<blockquote>
<p>The most important property of a program is whether it accomplishes the intention of its user -- Charles Antony Richard Hoare</p>
</blockquote>
<p>There's a saying among software developers that in the first iteration of developing a feature you learn about the problem, then in the second iteration you implement the solution, and in the third iteration you improve its performance.</p>
<p>This is why sometimes you <em>"win"</em> by implementing a particular feature and that feature is well aligned with user requirements, and sometimes that feature implementation turns out to be a <em>"trade-off"</em> between expectation and reality that eventually must be aligned to move forward.</p>
]]></content:encoded></item><item><title><![CDATA[It's Probably Fine]]></title><description><![CDATA[Have you ever asked yourself why you (or your team) use a specific technology? I find that lately, fewer and fewer people ask this question which is sad.
For more than a decade now, my approach toward new technology has been to ask this question. Do ...]]></description><link>https://primalskill.blog/its-probably-fine</link><guid isPermaLink="true">https://primalskill.blog/its-probably-fine</guid><category><![CDATA[learning]]></category><category><![CDATA[software development]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 16 Jan 2024 07:00:53 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1704204276461/d374795c-ced8-4a75-b0ac-f7598179daaa.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Have you ever asked yourself why you (or your team) use a specific technology? I find that lately, fewer and fewer people ask this question which is sad.</p>
<p>For more than a decade now, my approach toward new technology has been to ask this question. <strong>Do I have use for it or it's just FOMO?</strong></p>
<p>In most cases, the "tried and tested" tech. stack is just fine, also has the upside that I don't have to learn, or find out the quirks and best practices of this new technology, be it a JavaScript framework, a different database, or even a new programming language, <em>especially if I don't need it</em>.</p>
<p>This, of course, doesn't mean that I don't learn about new technologies. I do, all the time, <a target="_blank" href="https://primalskill.blog/how-to-keep-up-to-date-with-web-development">but first I just wait</a>.</p>
<p>Wait for the community's feedback on it, wait to see if it will squeeze itself into my timeline again and again because if that tech is that groundbreaking and important I will hear about it eventually.</p>
<p>I also like to play with new tech. like <a target="_blank" href="https://ziglang.org/">Zig</a> or <a target="_blank" href="https://bun.sh/">Bun</a>. But it stops right there, on the playground. Maybe, if I can devote enough time, I'll implement a <a target="_blank" href="https://hillchart.dev/">small project</a> with new technologies just to see how it plays with my current understanding of things and what new concepts could I learn by using it.</p>
<p>It's fine to use the tried and tested, in my experience, 99.9% of the projects I came across don't need complex distributed microservices for example, or 30-step CI pipelines.</p>
<p>It's fine because it's reliable, it's battle-tested, and exhaustively scrutinized by others. The lack of scrutinization is one of the major problems with current software development IMO.</p>
<p>Furthermore, established technologies usually have a larger community supporting them, which means a larger resource pool of problem-solving guidelines, tutorials, and solutions.</p>
<p>But here's the kicker: it's not really about the tech., it's about the project. It's easy to get caught up in the flash and excitement of what's new and shiny. But remember tech. is a tool. It’s there to get the job done. Often, the 'old reliables' can do that job just as well, if not better.</p>
<p>Without being afraid to be ridiculed for using the "old and boring", choose the boring but stable instead of the new that doesn't pay the bills.</p>
<hr />
<p><em>Cover photo by</em> <a target="_blank" href="https://pixabay.com/users/satyaprem-6578610/"><em>SatyaPrem</em></a></p>
]]></content:encoded></item><item><title><![CDATA[The Curse Of Software Knowledge]]></title><description><![CDATA[Wikipedia - Curse of knowledge:

The curse of knowledge is a cognitive bias that occurs when an individual, who is communicating with others, assumes that others have information that is only available to themselves, assuming they all share a backgro...]]></description><link>https://primalskill.blog/the-curse-of-software-knowledge</link><guid isPermaLink="true">https://primalskill.blog/the-curse-of-software-knowledge</guid><category><![CDATA[learning]]></category><category><![CDATA[software development]]></category><category><![CDATA[Developer]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 02 Jan 2024 06:00:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1704030390293/2fc531e5-9b50-4e6b-bcf9-b2580929d030.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a target="_blank" href="https://en.wikipedia.org/wiki/Curse_of_knowledge">Wikipedia - Curse of knowledge</a>:</p>
<blockquote>
<p>The <strong>curse of knowledge</strong> is a cognitive bias that occurs when an individual, who is communicating with others, assumes that others have information that is only available to themselves, assuming they all share a background and understanding.</p>
</blockquote>
<p>To be more specific, the "curse of knowledge" in software development manifests in teams where team members assume that others have the same background, context, or understanding of software coding problems as they do.</p>
<p>It also manifests in senior software developers when they fail to remember what it was like to be a beginner learning the basics and often forget to convey the problem solution in a more approachable and simple way.</p>
<p><strong>Software developers' knowledge and experience can sometimes act as a <em>curse</em>, leading to a disconnect between them and less experienced programmers.</strong></p>
<p>For instance, while designing a user interface, a developer might assume that users will know how to use it because the developer is already familiar with the UI disregarding the learning curve that it would take for somebody who is a first-time user.</p>
<p>Similarly, during the development of a new feature, there can be miscommunications because of an assumed understanding of how the feature should work.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1704029937403/7779ee81-4454-44a0-ad6c-fdfdaad8ef4c.png" alt class="image--center mx-auto" /></p>
<p><strong>Overcoming this "curse" requires conscious effort and an awareness of this cognitive bias.</strong></p>
<p>The senior members of the team need to be mindful of the varying skill levels and experiences within the team. It's essential to cultivate a culture of open communication where team members feel comfortable expressing when they don't understand something and asking for clarifications without the fear of being judged as inadequate or inferior.</p>
<p>For example, pairing senior developers with less experienced ones encourages continuous learning and helps onboarding new developers much more easily into a complex project.</p>
<p>In this environment, junior developers can gain insights from their more experienced colleagues' practical applications and consequently avoid potential misunderstandings. It's about creating an atmosphere where everyone acknowledges that everyone else might not be on the same page, fostering patience, and understanding to bridge the knowledge gap.</p>
<p><strong>Don't be afraid to ask for help and never say no to people asking for help.</strong></p>
<hr />
<p>Cover image by <a target="_blank" href="https://pixabay.com/users/diggeo-305964/">diggeo</a></p>
]]></content:encoded></item><item><title><![CDATA[A Brief History of JavaScript Frameworks]]></title><description><![CDATA[This article is inspired by Fireship's short video on web development.
https://www.youtube.com/shorts/aXcuz6fn8_w
 

JavaScript, The Programming Language

To start the article let me give you a very brief history lesson on JavaScript to understand wh...]]></description><link>https://primalskill.blog/a-brief-history-of-javascript-frameworks</link><guid isPermaLink="true">https://primalskill.blog/a-brief-history-of-javascript-frameworks</guid><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[javascript framework]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Wed, 27 Dec 2023 19:04:25 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1703701393601/47bf1e79-4f12-495d-bbd2-a05a1e208e94.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>This article is inspired by Fireship's short video on web development.</em></p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/shorts/aXcuz6fn8_w">https://www.youtube.com/shorts/aXcuz6fn8_w</a></div>
<p> </p>
<hr />
<h2 id="heading-javascript-the-programming-language">JavaScript, The Programming Language</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703689098469/6929c32f-300d-4d96-ac61-b3d638893260.jpeg" alt class="image--center mx-auto" /></p>
<p><em>To start the article let me give you a very brief history lesson on JavaScript to understand why modern front-end development looks the way it does.</em></p>
<p>Netscape Communications Corporation, initially known as Mosaic Communications Corporation, was a pioneering American technology company that developed the first widely-used web browser, Netscape Navigator.</p>
<p>In 1995, Netscape hired Brendan Eich with the goal of embedding the <em>Scheme</em> programming language into its Netscape Navigator.</p>
<p>However, within just 10 days of his hiring, Eich had <em>allegedly</em> created a new programming language, initially named <em>Mocha</em>, later renamed <em>LiveScript</em>, and finally called <em>JavaScript</em>.</p>
<p>Contrary to what the name suggests, <em>JavaScript</em> has little to do with the <em>Java</em> programming language. The naming decision was more of a marketing strategy since Java was gaining popularity at that time. In the late 1990s, Netscape attempted to standardize JavaScript through <a target="_blank" href="https://ecma-international.org/">Ecma International</a>, leading to the creation of the <a target="_blank" href="https://ecma-international.org/publications-and-standards/standards/ecma-262/">ECMAScript standard</a>.</p>
<p>Despite the ups and downs in JavaScript's history, including its battle with Microsoft during the <em>browser wars</em>, more on that below, it has stood the test of time and is now one of the most popular programming languages in the world.</p>
<p>Meanwhile, Netscape was acquired by AOL in 1999 and that was that, the product was discontinued in 2008.</p>
<h2 id="heading-the-great-browser-wars">The Great Browser Wars</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703686655455/dca7800e-1034-43f3-a788-b36dc5cb2dde.gif" alt class="image--center mx-auto" /></p>
<p>To understand what mess created that we tried to fix with more mess that we call modern front-end development we have to revert time all the way back to the mid-90s/early 2000s.</p>
<p>You see, back in the early 2000s there wasn't much choice regarding browser flavors. You either used Netscape / Firefox or Microsoft Internet Explorer (IE), the former having the majority of market share in the high 90%.</p>
<p>Safari and macOS (originally called Mac OS X) were just a blip on the radar no developer was taking seriously. I don't remember Safari having more than 0.5% market share in the early 2000s.</p>
<p>Microsoft in the Gates &amp; Ballmer era, but especially in the Gates era, was "very competitive" to say the least, and by "very competitive" I mean they simply annihilated any and all competition.</p>
<p>The Web wasn't any different in Microsoft's eyes. Browsers weren't different from other commercial products, users had to <strong>buy</strong> <strong>these applications</strong> and install them on their PC.</p>
<p>Microsoft wanted ALL the market share, so what they did was simply ship their browser, IE, with Windows as the default browser, so when users <em>"opened the Internet"</em> it was IE shining back in their faces.</p>
<p>As a response, Netscape tried to bundle their browser with other software that mainly ISPs provided to their customers, but Microsoft, being a behemoth, pulled the rug under their feet by requiring all 3rd party applications to be bundled with IE instead, making it a "required component for network access on Windows".</p>
<p>Then they did whatever they were feeling like with the scripting languages in IE disregarding any standards other vendors were trying to come up with. It was either Microsoft's way or the highway, they simply did not care about web standards.</p>
<p>If it were for Microsoft, we would all be using IE and VBScript today (even if I consider VBscript to be a more capable scripting language than JS back in the day).</p>
<p>Oh, and they also reverse-engineered Netscape Navigator's scripting language that was JavaScript and called it <em>JScript</em>.</p>
<p>In the end, Microsoft was found guilty of monopolizing the Web browser market and the verdict was that OS and browser must be two separate things and end users must be given the choice of using whatever browser they wanted.</p>
<p>Between VBScript, JScript, and JavaScript, the latter won out simply because developers could use a single scripting language to develop for multiple browsers, but there was a time when a web page would use half-baked JavaScript and VBScript code intermingled in a large HTML mess.</p>
<p><em>Note: There were also many other scripting languages like PerlScript or ASP. Much like what WebAssembly is trying to solve today so developers can use any programming language on the client side and still be performant and cross-browser compatible.</em></p>
<h2 id="heading-jquery-was-born">jQuery Was Born</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703680658224/f0ec99bb-e6ec-46ce-9971-9725f259996e.jpeg" alt class="image--center mx-auto" /></p>
<p>In the early 2000s, the Web was truly a wild-wild west place. There were many competing standards, and vendors still discovering how to "program" for the Web.</p>
<p><strong>If today's front-end development can be described as complex, back in the day it was chaotic and there weren't many online tutorials to turn to for help.</strong></p>
<p>Because of this, jQuery was created. Its original purpose was to expose a unified, cross-browser compatible API to the developers. You see, before jQuery if, for example, you wanted to listen to JS events you had to program it for at least two different "standards", if not more, to be cross-browser compatible.</p>
<p>The code below is a tiny glimpse into the nightmare called web development circa 2005.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">myEvent</span>(<span class="hljs-params"></span>) </span>{
  alert(<span class="hljs-string">'click event'</span>);
}

<span class="hljs-keyword">if</span> (elem.addEventlistener) {
  elem.addEventListener(<span class="hljs-string">"click"</span>, myEvent, <span class="hljs-literal">false</span>);
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (elem.attachEvent) {
  elem.attachEvent(<span class="hljs-string">"onclick"</span>, myEvent);
}
</code></pre>
<p>jQuery's execution was really good. Having a solid and simple API ironing out cross-browser compatibility issues so the developers don't have to, furthermore pioneering targeting browser features instead of browser user agents was a game changer.</p>
<p>I remember first reading about jQuery on <a target="_blank" href="https://www.quirksmode.org/">QuirksMode</a> and was completely amazed at how simple was to work with. I only needed a single <code>script</code> tag and boom, there it was, all my problems fixed, with a single line.</p>
<p>It was an instant hit with web developers gaining mass adoption and driving a lot of modern web standards we love and use today. Let's not forget that jQuery still can be considered the <a target="_blank" href="https://w3techs.com/technologies/overview/javascript_library">most widely used JavaScript framework today</a> even though some say it's mostly thanks to WordPress.</p>
<p>After "fixing" browser JS compatibilities the next step in jQuery's evolution was its plugin system. For the core to remain small, jQuery implemented a plugin system so developers could ship other library code and still use the goodies from jQuery; and what developers mainly created were reusable UI widgets like the famous <a target="_blank" href="https://jqueryui.com/datepicker/">jQuery Datepicker</a>.</p>
<h2 id="heading-backbonejs-amp-angularjs-entered-the-chat">Backbone.js &amp; AngularJS Entered the Chat</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703687270902/2eea9371-f7d9-475d-86e3-741b56805d4d.png" alt class="image--center mx-auto" /></p>
<p>Backbone.js, released in 2010, was among the pioneers in bringing structure to client-side web applications and taking baby steps towards single-page applications (SPA).</p>
<p><strong>Some developers would argue that Backbone's more important role was kickstarting the philosophical shift towards front-end development.</strong></p>
<p>Not to take away the fame from the <a target="_blank" href="https://en.wikipedia.org/wiki/YUI_Library">YUI Library</a> which dabbled with the notion already.</p>
<p>Before Backbone.js websites were delivered by a server-side application pushing HTML and CSS to the client-side browser and "progressively" enhancing the UX with JavaScript, hence the term "<a target="_blank" href="https://developer.mozilla.org/en-US/docs/Glossary/Progressive_Enhancement">progressive enhancement</a>".</p>
<p>As websites became more interactive, this necessitated keeping a client-side data model in sync with the server-side model and the DOM. Backbone.js addressed this need with a design built around an MVC-like (Model View Controller) architecture, thus marking a significant milestone in component-based web development.</p>
<p><strong>AngularJS</strong>, on the other hand, is the brainchild of Google, first released in 2010, and subsequently, Angular 2+ from 2016 forward (collectively referred to as Angular), is not a library, unlike Backbone.js.</p>
<p>Angular is a full-fledged, "feature-rich" JavaScript framework. It introduced the concept of “directives” (later implemented by Vue), which provided an elegant mechanism to extend the HTML syntax, thus allowing developers to create their custom HTML elements and an important concept in component-based development.</p>
<p>With "directives", Angular enabled the creation of reusable components, a feature that would significantly enhance code maintainability and readability. So said the "marketing brochure".</p>
<p>Ultimately, both Backbone.js and Angular started important conversations in the web development community about creating more efficient, maintainable, and scalable client-side applications, and starting the component-based web development "madness".</p>
<h2 id="heading-transpiling-with-coffeescript">Transpiling With CoffeeScript</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703686874520/af8bbe16-b9bd-4604-9c44-f8203ba62158.jpeg" alt class="image--center mx-auto" /></p>
<p>CoffeeScript's role in the evolution of JS frameworks is mainly attributed to the concept of "transpiling", in other words, the concept of source-to-source compilation; and it <a target="_blank" href="https://news.ycombinator.com/item?id=1014080">was created by the same person</a> who created Backbone.js.</p>
<p><a target="_blank" href="https://news.ycombinator.com/item?id=2037801">CoffeeScript's</a> answer to developers who hated working with JS at this point and managing all the quirks and intricacies of the language is to create a new language altogether and then transform that language into JavaScript to be able to be used in browsers.</p>
<p>Beyond easier syntax, the advanced features of CoffeeScript, such as destructuring assignments, classes, and array comprehension, have significantly simplified the process of building web components and ultimately these features found their way back into modern JavaScript.</p>
<h2 id="heading-nodejs-js-goes-in-the-upside-down">Node.js, JS Goes in the Upside Down</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703690414005/dff65c1c-149d-4261-971d-01146257f19c.jpeg" alt class="image--center mx-auto" /></p>
<p>I think that Node.js was the fuel on the slow-burning fire that started the fast-paced development of client-side technologies and the adoption of the many modern JavaScript standards that we have today.</p>
<p>Prior to Node.js, JavaScript was essentially a client-side language used for adding interactivity to web pages. Web developers had little to work with in terms of tooling for JS development, mostly relying on web browsers for runtime execution, and often resorting to manual code minification and concatenation by using other server-side technologies.</p>
<p>The advent of Node.js brought JavaScript to the server-side, enabling developers to execute JavaScript outside the context of a browser.</p>
<p>Even though the original premise (and proof) of Node.js is that JavaScript can be used anywhere, promising a more streamlined web development workflow, optimize code, catch errors, and automate repetitive tasks by using the same programming language on both server- and client-side, in fact, it kickstarted the exact opposite trend. <em>After all, it's not Node's fault how people are using the technology.</em></p>
<p>Node.js provided a platform for developing such tools, resulting in a rich ecosystem of packages like Grunt, Gulp, Webpack, Babel, and others.</p>
<p><strong>Arguably the second biggest innovation coming out from Node.js was their adopted package manager, NPM, which drastically simplified the installation and distribution of JavaScript libraries and tools.</strong></p>
<h2 id="heading-react-amp-the-descent-into-tooling-madness">React &amp; the Descent Into Tooling Madness</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703687189994/c0297769-01a7-4722-9f44-7c28ca23e5a5.jpeg" alt class="image--center mx-auto" /></p>
<p><strong>Now, we have arrived in full SPA, interactive, rich-web, enhanced to the gills mode web app territory and I believe React needs no introduction.</strong></p>
<p>React, even though it didn't pioneer the complicated ecosystem we have around front-end development today, it sure influenced how we do things the <em>React way</em>™.</p>
<p>With the ever-more need to create highly interactive and performant web applications more and more tooling was created around module-based JavaScript code and the <a target="_blank" href="https://primalskill.blog/how-to-keep-up-to-date-with-web-development">FOMO</a> of tech engineering leads somewhat resulted in what we have today.</p>
<p>My first introduction to React was in 2014-2015 when my team was outsourcing for a Silicon Valley client where the tech leads were fully sold on the early React Flux Architecture.</p>
<p>I remember being adamantly against JSX echoing the larger web development community's voice: <em>"How could any sane developer embed HTML into JavaScript?!".</em></p>
<p>But there it was, HTML in JS, then CSS in JS, and then as with many things in web development <strong><em>you have to learn to love it</em></strong>. Managing the application state in the browser and then reacting to it is all the rage now.</p>
<p>React started and Vue continued the shift towards JavaScript-centric development by encouraging developers to write everything in JavaScript, including markup language and styles advocating "create once, use it anywhere" components, or at least that was the promise. React took it even further with React Native, the ambitious promise of using everything everywhere, including mobile, and writing it only once.</p>
<p>React also fueled the trend of this <a target="_blank" href="https://primalskill.blog/the-ikea-effect-in-software-development"><em>front-end feedback loop</em></a> where more and more tooling and JS modules are created every day to further improve or fix the downsides of major JS frameworks that everybody decided to use not questioning whether it made sense to use the way it was intended to be used.</p>
<p><em>Note: If you have an hour, go watch the</em> <a target="_blank" href="https://www.youtube.com/watch?v=8pDqJVdNa44"><em>React.js Documentary</em></a><em>. Yes, it's good filming and production.</em></p>
<h2 id="heading-typescript-amp-the-botched-type-surgery">TypeScript &amp; The Botched Type Surgery</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703687519092/96136433-d2d3-4495-b25e-07a39d5ee315.jpeg" alt class="image--center mx-auto" /></p>
<p>Just like CoffeeScript, TypeScript is a source-to-source programming language and not a JS framework, but plays a pivotal role in the evolution of these frameworks.</p>
<p>At least that's what Microsoft and many thousands of developers are advocating.</p>
<p><strong>Don't get me wrong, type safety in a programming language is paramount, but I'm not fully onboard with bolting types on top of a language where dynamic types are intended to be a feature and not a bug.</strong></p>
<p><em>In this regard, I agree with DHH on the</em> <a target="_blank" href="https://world.hey.com/dhh/turbo-8-is-dropping-typescript-70165c01"><em>false promises</em></a> <em>of TypeScript and why it makes sense</em> <a target="_blank" href="https://world.hey.com/dhh/open-source-hooliganism-and-the-typescript-meltdown-a474bfda"><em>not to use it in their products</em></a><em>.</em></p>
<p>Before TypeScript came into play, JavaScript was known for its difficulty to manage in large-scale projects, and not just mainly because of the lack of static types. However, the lack of static typing doesn't make the language better and it made debugging and maintaining code increasingly complex as a project grew in size.</p>
<p>TypeScript also offers powerful features like interfaces, enum types, and optional parameters that are absent in JavaScript but can be important to "taming the beast" in more complex JS projects.</p>
<p>Also, TypeScript provides developer tooling that enables more accurate autocompletion, refactoring capabilities, and more (also, autocompletion and lint rules can be set up and just use <a target="_blank" href="https://jsdoc.app/">JSDoc</a>).</p>
<p><strong>But TypeScript is essentially an additional layer on top of JavaScript, introducing a level of complexity and overhead that may not be required or suitable for every project or development team.</strong></p>
<p>Although TypeScript provides a wide range of enhancements, it comes at the cost of needing to learn an entirely new language with its syntax, rules, and best practices. Not to mention figuring out type rules that other JS frameworks have implemented. For smaller projects or teams, this may prove to be a significant deterrence.</p>
<p>TypeScript requires developers to annotate their variables, function returns, and arguments with their types. While this can make code easier to read and debug in large projects, it can slow down development. In other words, the very feature that makes TypeScript awesome in large-scale projects can turn into a horrible nightmare for smaller ones oftentimes reverting back to JavaScript is more productive.</p>
<p>At the end of the day what TypeScript did is to <a target="_blank" href="https://github.com/sirisian/ecmascript-types">start the conversation of having opt-in static types</a> in JS maturing the language, which is awesome.</p>
<h2 id="heading-sunshine-and-rainbows-with-svelte">Sunshine and Rainbows With Svelte</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703687952019/06304f29-4fb5-4952-aa77-e0548a386fc1.jpeg" alt class="image--center mx-auto" /></p>
<p>By now every front-end developer has had it with the JS ecosystem. This is where Svelte enters the picture.</p>
<p>One of the primary problems SvelteJS is trying to solve is the <a target="_blank" href="https://primalskill.blog/bikeshedding-in-software-engineering-teams">unnecessary bloating</a> that results from the usage of "traditional" frameworks, because by now React, Angular, and even Vue are considered "traditional" and conventional.</p>
<p>Another area that Svelte is trying to amend is the steep learning curve presented by other frameworks and libraries. While frameworks such as React or Angular offer great power and flexibility, they can be overwhelming for beginners due to their complexity. Svelte, in contrast, is developed to be much more intuitive and easy to grasp. With its simpler syntax and less boilerplate code, developers with only a basic understanding of HTML, CSS, and JavaScript can become proficient in using Svelte in a relatively short time.</p>
<p>Svelte can also be considered to be a programming language that compiles HTML-, CSS-, and JS-like code instead of a parser that parses regular HTML/CSS/JS.</p>
<p>If we think about Svelte as a programming language then the code we write is a separate language that happens to look like HTML, CSS, and JS, but it's not. This is why Svelte goes into <code>devDependencies</code> because we don't need any of Svelte's code in production in contrast with React and others.</p>
<p>Typically, with traditional JavaScript frameworks, the client's browser must load the entire JavaScript bundle, parse, compile, and execute it before the user can interact with the application. This process can be slow and negatively impact the user experience, particularly on mobile or slow networks. SvelteJS solves this problem by doing the heavy lifting during the build process.</p>
<p>Svelte, unlike React, is much more opinionated on how to do things which is not necessarily a bad thing. This is most notably can be seen in SvelteKit.</p>
<p>Also, Svelte is one of the major frameworks that started talking about the place of MPAs (multi-page applications) in client-side development. Before that MPAs were considered this antiquated development method that no developer would use, <strong>ever</strong> (wink, wink).</p>
<p>Still, Svelte tries to <a target="_blank" href="https://primalskill.blog/the-black-box-of-software-development">shine a beacon of hope</a> in the muddy waters of broken front-end development.</p>
<h2 id="heading-htmx-deployed-to-the-front">Htmx Deployed to the Front</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703688921901/de6285f7-faa0-448b-98f0-c166dac5b455.jpeg" alt class="image--center mx-auto" /></p>
<p>Okay, we are slowly coming full circle.</p>
<p>If you never heard of htmx I don't blame you. It's a relatively new JS framework (at least its modern iteration), more like a paradigm shift from modern front-end development.</p>
<p>While CoffeeScript, TypeScript, and Svelte all try to fix JavaScript by using something similar to JS, but only <em>the good parts</em>™ then converting the whole thing into JS, the creator of htmx wants to start from scratch by not using JS altogether.</p>
<p><em>Alright, the above paragraph is not a fact, but it's funny nonetheless.</em></p>
<p>Htmx essentially lets web developers access AJAX, CSS Transitions, WebSockets, JS Events, and SSEs (server-sent events) directly in HTML without needing to write JavaScript (okay, some JS). It introduces a new approach (okay, it's not entirely new) to enhancing web apps by seamlessly transforming static HTML into dynamic content.</p>
<p>Unlike other heavy JavaScript frameworks, htmx aims to shift the balance of responsibilities, taking a simpler approach to web development. By allowing developers to execute common dynamic UI interactions directly in HTML with its extensive attributes, or some would say directives, it significantly reduces the dependency on JavaScript.</p>
<p><strong>This reaffirms the principle of progressive enhancement in web development</strong>, where HTML and CSS handle the foundation and layout, while JavaScript is kept lightweight and used for added interactivity when needed.</p>
<p><strong>What's worse is that htmx is annoyingly simple.</strong> It's worse that we had to descend into slow madness to see the light at the end of the front-end development tunnel when there wasn't any tunnel nor pitch-black darkness because the techniques used by htmx were always there, invented by others decades ago.</p>
<p>Through the use of backend languages, developers are allowed to build and modify their applications and keep data and state on the backend where it should be, whilst keeping the UI dynamic and responsive on the frontend where it should be.</p>
<p>Ultimately this is a good thing because young developers will discover the true joys of front-end web development by not using modern JS frameworks at all, and this is not to say that React, Vue, Svelte, and Angular will vanish into thin air anytime soon. Baby steps.</p>
<p><strong>Full-stack devs are back baybieeee...</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1703699754678/fbc10988-fb89-4d7f-827d-4abf6a233816.jpeg" alt class="image--center mx-auto" /></p>
<hr />
<h2 id="heading-notable-exceptions">Notable Exceptions</h2>
<p>I know I skipped many notable web technologies such as Alpine, Astro, Babel, Bun, Dojo, EmberJS, Esbuild, ES6, ExtJS, Express, Gatsby, GraphQL, Jamstack, KnockoutJS, Lit, MeteorJS, MERN, MooTools, Next, Nuxt, Parcel, Polymer, Preact, PWAs, Remix, REST, RollupJS, Rome, Ruby on Rails, RxJS, SproutCore, Sass, Skypack, Snowpack, SolidJS, Stencil, Stylex, Vite, Vue, Zig, and others... that all contributed to modern front-end development in some shape or form.</p>
<p>The main reasons are that <strong><em>1)</em></strong> I can't cover everything, <strong><em>2)</em></strong> a lot of technologies have overlapping ideas, and finally <strong><em>3)</em></strong> I'm not that familiar with a lot of these technologies to have a sensible opinion about them.</p>
]]></content:encoded></item><item><title><![CDATA[Bikeshedding in Software Engineering Teams]]></title><description><![CDATA["What precisely is wrong with our current color scheme for the app's user interface? Should we change it to sharper hues or go minimalistic?"
Here's a question that can easily occupy most of your software team’s next brainstorming session. This pheno...]]></description><link>https://primalskill.blog/bikeshedding-in-software-engineering-teams</link><guid isPermaLink="true">https://primalskill.blog/bikeshedding-in-software-engineering-teams</guid><category><![CDATA[Programming Tips]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Sat, 30 Sep 2023 12:47:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1696077747879/079b559e-38e0-459d-a7e0-1e6142eb56ba.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>"What precisely is wrong with our current color scheme for the app's user interface? Should we change it to sharper hues or go minimalistic?"</em></p>
<p>Here's a question that can easily occupy most of your software team’s next brainstorming session. This phenomenon may be entirely foreign to some or deeply familiar to others – this is called "bikeshedding".</p>
<p>One thing I can almost guarantee you, once you learn what bikeshedding means you will see it everywhere.</p>
<h3 id="heading-bikeshedding-definition">Bikeshedding definition</h3>
<p>In 1957, <em>C. Northcote Parkinson</em> observed an ironic twist in administrative decision-making that <strong>arguably trivial matters often receive disproportionately high levels of attention and debate</strong>. In his example, a nuclear plant budget was approved without much ado while choosing materials for assembling an elementary bicycle shed incited extensive discussions.</p>
<p>Borrowing its roots from there, the term "bikeshedding", also called <em>Parkinson's Law of Triviality</em>, pervades modern software teams like wildfire. It refers to unwarranted fascination in discussing minor bugs or deciding on details like color palettes but disregarding other critical aspects such as application design and data architecture.</p>
<p>Basically, a lot of software engineers are concerned about how their project's directory structure looks or whether to use one IDE over the other rather than whether their application solves the actual problem it was created for in the first place.</p>
<h3 id="heading-why-do-we-fall-into-this-trap">Why do we fall into this "trap"?</h3>
<p>The reason is quite simple and relatable. It happens because it's human nature to gravitate towards simpler problems, where discussions are easy and everyone can have an opinion.</p>
<p>Picking a color scheme or logo design simply seems less daunting than solving complex algorithmic challenges or designing the structural architecture of a software product.</p>
<p>But the trap is that minor details become major distractions, stealing away our focus from critical problem-solving tasks that demand in-depth understanding and expertise. It ignites an avoidant culture pushing us to seek comfort in comprehensible topics rather than diving into intensive, high-impact issues requiring more effort and knowledge.</p>
<h3 id="heading-pitfalls-and-possible-solutions">Pitfalls and possible solutions</h3>
<p>When too much time and energy is spent on less important issues, bigger tasks can often get overlooked. This can lead to problems for the software project in various ways:</p>
<ol>
<li><p>Delivery timelines - spending countless hours debating trivialities have projects scrambling against shrinking deadlines.</p>
</li>
<li><p>Technical debt - ignoring more important problems in the project will amount to bigger backlogs and later cause slower systems and buggy solutions.</p>
</li>
<li><p>Talent churn rate - struggling sprints to fulfill meaningless targets will disappoint top-level engineers who will most likely move to workplaces where skills matter more than mindless discussions on trivial things.</p>
</li>
</ol>
<p>This is not to say that details don't matter, they do, a lot, but creating balance where a team isn't side-tracked by minor issues becomes crucial.</p>
<p>Defining the main goal, the overall "big picture" of the project, and making sure every team member understands it and does not lose sight of it will optimize the <em>critical development path</em> of the project.</p>
<p>Managers should always set the environment for the team, encouraging open-mindedness, and being willing to engage in subjects beyond one's comfort zones.</p>
<p>Finally, timeboxing should be important when discussing the details of a project. Setting finite time limits on topics will help curb spiraling discussions veering off-topic not just with team members but with the project clients too.</p>
<hr />
<p><strong>Other fun reads that inspired this article:</strong></p>
<ol>
<li><p><a target="_blank" href="https://bikeshed.org/">Poul-Henning Kamp's FreeBSD thread on "bikeshedding", who popularized the term</a>.</p>
</li>
<li><p><a target="_blank" href="https://www.goodreads.com/book/show/1448236.Parkinson_s_Law">Parkinson's Law by C. Northcote Parkinson</a></p>
</li>
</ol>
<hr />
<p><strong>Acknowledgments</strong></p>
<ul>
<li><em>Article Cover photo by</em> <a target="_blank" href="https://www.pexels.com/@alexfu/"><em>Alex Fu</em></a> <em>on Pexels.</em></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[How Photography Helped Me to Be a Better Software Engineer]]></title><description><![CDATA[In the world of software engineering, creativity, and problem-solving abilities play a significant role in achieving success.
As a self-titled "senior" software developer, I have found an unexpected source of inspiration and skill development in phot...]]></description><link>https://primalskill.blog/how-photography-helped-me-to-be-a-better-software-engineer</link><guid isPermaLink="true">https://primalskill.blog/how-photography-helped-me-to-be-a-better-software-engineer</guid><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Productivity]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Sun, 09 Jul 2023 08:52:44 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1688892705699/91b60a8e-387d-494b-b5d5-eeb05828bd4f.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the world of software engineering, creativity, and problem-solving abilities play a significant role in achieving success.</p>
<p>As a self-titled "senior" software developer, I have found an unexpected source of inspiration and skill development in photography. In this quick blog post, I will share how exploring the art of photography enhanced my abilities and contributed to my growth as a software engineer.</p>
<p>The intersection of my two passions, photography and software engineering, has granted me unique insights into both fields. As a hobby photographer, my creative drive blends seamlessly with the problem-solving nature of software engineering.</p>
<h2 id="heading-attention-to-detail">Attention to Detail</h2>
<p>One of the first notable advantages photography brought into my professional life is my enhanced attention to detail. As a photographer, every photograph requires careful examination of various elements, such as composition, lighting, and subject alignment. Similarly, in software development, paying attention to minute details is crucial to produce code that is efficient, scalable, and bug-free. The meticulousness gained through photography has allowed me to spot errors or potential issues much better in my code.</p>
<p>This meticulousness has facilitated efficient collaboration within development teams as I can swiftly identify and rectify issues. By consistently honing my attention to detail, I have reduced the chances of bugs slipping through the cracks, leading to a more robust and reliable codebase but that also slowed my development down quite a bit.</p>
<h2 id="heading-stimulating-creativity">Stimulating Creativity</h2>
<p>Photography is an art that encourages creativity and out-of-the-box thinking. In the pursuit of capturing visually appealing and emotionally engaging photographs, I have honed my imagination and embraced unconventional approaches. This has translated directly into my software development work, enabling me to come up with innovative solutions and generate fresh ideas to tackle complex problems. The composition principles employed in photography, such as the rule of thirds or leading lines, have even influenced my front-end design choices.</p>
<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text"><em>The "rule of thirds" is a simple compositional technique in photography where an image is divided into equal thirds both horizontally and vertically, then placing interesting elements on the photo at the intersection of these lines.</em></div>
</div>

<p>By incorporating these visual concepts, I have been able to create user interfaces that not only function well but also captivate users with their aesthetics.</p>
<h2 id="heading-improving-problem-solving-skills">Improving Problem-Solving Skills</h2>
<p>Photography often presents unexpected challenges that require quick decision-making and problem-solving skills. For instance, shooting in difficult lighting conditions or capturing fast-moving subjects can be quite demanding. Similarly, in software engineering, projects often encounter unexpected obstacles that need to be overcome promptly.</p>
<p>Thanks to my experience in photography, I am now more adept at rapidly assessing the situation, identifying potential solutions, and adapting my approach accordingly. This skill has proven to be invaluable when faced with urgent bug fixes or resolving critical issues during tight project deadlines.</p>
<p>The constant advancements in technology make adaptability a vital trait for any software engineer. Thanks to photography I can better adapt to various environments and quickly adjust my techniques based on changing conditions. Whether it is adapting to different lighting scenarios or experimenting with new equipment, I have learned to embrace change and apply similar adaptability to software development.</p>
<p>This flexibility allows me to adapt to evolving project requirements, scalability challenges, and changing technologies. It also encourages me to explore new programming languages, frameworks, and methodologies, ensuring I remain up-to-date and versatile in an ever-evolving industry.</p>
<p>I am much more flexible in changing my mind about various programming techniques or feedback from my team and much less set on rigid things because "<em>it was always done that way</em>".</p>
<h2 id="heading-simplicity-amp-deconstructing-elements">Simplicity &amp; Deconstructing Elements</h2>
<p>Programming, much like photography, requires a keen eye for simplicity. Over the years, I have learned that <em>simpler code is often superior to clever code</em> that may seem intricate or convoluted. Just as convoluted compositions fail to convey a clear message in photography, overly complex code decreases readability, maintainability, and team collaboration.</p>
<p>When capturing moments through the lens, the most impactful images often consist of a straightforward composition that leaves no ambiguity in the message being conveyed. Similarly, employing simpler code structures ensures easier debugging, efficient code reviews, and seamless knowledge transfer among team members. Emphasizing a straightforward approach enhances maintainability and reduces the likelihood of introducing bugs.</p>
<h2 id="heading-enhancing-communication">Enhancing Communication</h2>
<p>Photography, at its core, is a visual language that speaks to emotions and conveys messages without the need for words.</p>
<p>In photography, being able to convey a story or emotion through an image requires an understanding of visual language. Similarly, as a software engineer, being able to communicate complex technical concepts to colleagues or stakeholders is vital for successful project execution.</p>
<p>Through photography, I learned how to communicate visually, using images to evoke specific emotions or convey a specific message. I have applied this skill to software development by creating visual diagrams and flowcharts when explaining complicated algorithms or system architectures. This visual approach has significantly improved my ability to engage others and ensure shared understanding, resulting in better collaboration within cross-functional teams.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In my journey of becoming a software engineer, I have discovered that photography goes beyond being just a hobby or a creative outlet. Photography has enriched my professional life by sharpening my attention to detail, stimulating my creativity, enhancing problem-solving skills, improving communication, and fostering adaptability.</p>
<p>Keep experimenting with stuff as you don't know where inspiration might come from.</p>
<p>As a bonus, here are a few photographs that I made.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1688892246333/d133247f-2858-44f2-973e-cffdd9ee7661.jpeg" alt="Corvin's Castle in Transylvania" class="image--center mx-auto" /></p>
<p><em>Corvin's Castle in Transylvania, Romania.</em></p>
<hr />
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1688892380443/19bc1dc3-1a4b-4682-aa08-527bea76542e.jpeg" alt class="image--center mx-auto" /></p>
<p><em>Men fishing in a river.</em></p>
<hr />
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1688892423098/a4a43751-f309-4a05-895f-17e2617223f5.jpeg" alt class="image--center mx-auto" /></p>
<p><em>Men at work.</em></p>
<hr />
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1688892457474/22d93715-876e-43e5-a22c-fd5e7cc177a0.jpeg" alt class="image--center mx-auto" /></p>
<p><em>Studio work with a model.</em></p>
<hr />
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1688892501838/c62bee87-df3e-4961-bf7f-25363817075f.jpeg" alt class="image--center mx-auto" /></p>
<p><em>Studio work with a model.</em></p>
<hr />
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1688892523768/c1cfac26-f8f0-4013-b5ac-305a5b3a9012.jpeg" alt class="image--center mx-auto" /></p>
<p><em>Studio work with a model.</em></p>
<hr />
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1688892638828/b9c1e80d-58af-4ad8-bc6e-aa4a402cca89.jpeg" alt class="image--center mx-auto" /></p>
<p><em>My team's annual Christmas postcard session.</em></p>
]]></content:encoded></item><item><title><![CDATA[Software Outsourcing Part 2: Myths and Truths]]></title><description><![CDATA[To read Part 1 click here: Software Outsourcing Part 1: Types, Pros and Cons.

Many C-level managers tasked with finding cost optimizations within their organization have a fear of outsourcing companies because of their lack of knowledge about outsou...]]></description><link>https://primalskill.blog/software-outsourcing-part-2-myths-and-truths</link><guid isPermaLink="true">https://primalskill.blog/software-outsourcing-part-2-myths-and-truths</guid><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[business]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 27 Jun 2023 16:01:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/a53bWJk1sz0/upload/f6bbd265422edd03bf97a44401f9d08c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To read Part 1 click here: <a target="_blank" href="https://primalskill.blog/software-outsourcing-part-1-types-pros-and-cons">Software Outsourcing Part 1: Types, Pros and Cons</a>.</p>
<hr />
<p>Many C-level managers tasked with finding cost optimizations within their organization have a fear of outsourcing companies because of their lack of knowledge about outsourcing and hearing many "horror" stories about various companies.</p>
<p>In this article, I will shed light on some of the myths and truths about software outsourcing. Let's start with the myths first as these are the most compelling ones and the biggest blockers for any prospective client to jump on board.</p>
<h2 id="heading-myth-the-software-product-will-be-of-lower-quality">Myth: The software product will be of lower quality</h2>
<p>Software outsourcing companies ARE software development companies and the quality of code they produce can vary greatly. A US-based development team, which is usually not outsourcing, can produce code just as badly as a team from Bangladesh.</p>
<p>There's absolutely no basis for this claim, which is more likely an unfounded fear from managers looking into outsourcing.</p>
<h2 id="heading-myth-you-cant-get-to-market-quickly-by-outsourcing-the-product">Myth: You can't get to market quickly by outsourcing the product</h2>
<p>It's true that managing a remote team of any kind is more complex than an on-site dedicated one, but getting to market is not dependent on the outsourcing nature or the location of the team.</p>
<p>A well-built team comprised of expert developers can just as easily get a product to market as any other team, the key is to manage expectations correctly.</p>
<p>The perception that outsourcing cannot deliver a fast go-to-market process is a myth that stems from inadequate planning and communication, rather than the intrinsic nature of the outsourcing model.</p>
<p>Through the use of offshore development centers, outsourcing can provide round-the-clock development support, thereby shortening the development cycle, improving product quality, and accelerating time to market.</p>
<h2 id="heading-myth-developers-will-steal-your-code-and-idea">Myth: Developers will steal your code and idea</h2>
<p>The right to the codebase, just as any other asset of a company is dictated by the terms of NDA contracts and intellectual property rights.</p>
<p>Most outsourcing companies, just like any other company, have robust legal frameworks in place, and they respect the intellectual property rights of their clients.</p>
<p>Due diligence needs to be carried out though, background checks of the company, what kind of legal framework the country has for outsourcing where the company is registered.</p>
<p>BUT to build trust and establish a long-term partnership, a professional and well-reputed outsourcing provider relies heavily on its reputation, which means it will keep its clients' code and ideas completely confidential.</p>
<h2 id="heading-myth-language-barrier-of-outsourcing-teams">Myth: Language barrier of outsourcing teams</h2>
<p>It is a common myth that outsourcing software development to a team in another country will result in a significant language barrier.</p>
<p>Many outsourcing companies, including my company, employ English as their primary business language and require their employees to be proficient in it.</p>
<p>Teams also often have a dedicated project manager or team leader who acts as a liaison with the client and ensures effective communication cutting down the unnecessary "communication barriers" between many people.</p>
<h2 id="heading-myth-outsourcing-will-cut-down-costs">Myth: Outsourcing will cut down costs</h2>
<p>A huge misunderstanding most of our clients make is to think that outsourcing development is dirt cheap and soon realize that development is indeed like any other service, you get what you paid for.</p>
<p>Yes, outsourcing usually will cut down costs, but a key difference between a good outsourcing company and a bad one is that outsourcing to the good one won't cut down costs <strong>that much</strong>.</p>
<p>20 to 30 percent cost reduction is a fair and also optimistic price point every manager should look for and it could be enough for an organization to jump on the boat.</p>
<h2 id="heading-truth-cultural-differences-in-outsourcing">Truth: Cultural differences in outsourcing</h2>
<p>Cultural differences are an undeniable reality. Differences in work ethics, communication styles, and business practices can sometimes lead to misunderstandings and conflicts in the collaboration process.</p>
<p>It's no secret that when outsourcing software development to another country, there will likely be some cultural differences to navigate.</p>
<p>For example, a culture that values direct communication may clash with a more indirect communication style that prioritizes avoiding confrontation.</p>
<h2 id="heading-truth-timezone-differences-of-various-teams">Truth: Timezone differences of various teams</h2>
<p>As most people in the industry know, software outsourcing often involves timezone differences between client companies and their outsourcing partners, as well as other teams involved.</p>
<p>These differences can sometimes make communication and coordination more complicated, as team members may be working during different hours of the day.</p>
<p>Despite these differences, many outsourcing companies are able to accommodate clients by adjusting work hours or scheduling meetings at mutually convenient times.</p>
<p>Also, asynchronous communication tools and project management software can facilitate easy sharing of updates and progress.</p>
<p>Planning is harder, this is true, but there are a boatload of tools to help overcome the differences and successful collaboration can be achieved.</p>
<h2 id="heading-truth-the-talent-pool-is-much-larger">Truth: The talent pool is much larger</h2>
<p>One of the most significant advantages of software outsourcing is that it allows clients to tap into a talent pool much more extensive than what they could find locally.</p>
<p>This fact came to light with the early 2023 tech. layoffs. Most companies who laid off tech people did so to optimize their talent pool and most of them re-hired part of them in other locations.</p>
<p>Moreover, outsourcing companies often have highly specialized developers, whose skill sets might be hard to find locally. This opens up opportunities for clients to work with top-tier developers who can deliver high-quality work.</p>
<p>Also, this provides a competitive advantage as it allows businesses to scale their operations quickly and efficiently with access to a sizable pool of talent.</p>
<h2 id="heading-truth-skills-and-costs-are-more-optimized">Truth: Skills and costs are more optimized</h2>
<p>Deploying an external software development team can be an excellent way to optimize costs and resource management. These expert teams have the capacity to identify opportunities for cost reduction specific to their field and offer tailored solutions to meet the client's needs.</p>
<p>Outsourcing brings a wealth of experience with them when tackling diverse projects. This experience provides adaptability to unique project types and unexpected situations, something an in-house team might not be equipped to handle.</p>
<p>Team scalability is another advantage offered by outsourcing partners that businesses can use to their advantage. Quick resource scaling or reduction depending on project demands makes project management more agile and flexible.</p>
<p>Besides providing technical expertise, external teams commonly offer a vast range of other services that companies can benefit from, including project management, quality assurance, and efficient documentation processes. These can frequently contribute to reduced project times and increased quality, allowing businesses to maximize their returns.</p>
<p>For less money.</p>
<h2 id="heading-turnkey-solutions-without-micromanaging">Turnkey solutions without micromanaging</h2>
<p>Turnkey solutions are excellent options for businesses that prefer to deploy an external team to manage their technology needs without micromanaging. With turnkey solutions, businesses receive an all-encompassing solution, encompassing different technological areas that offer the convenience of having all technological matters centralized and managed by a single partner. With the caveat that businesses need to actively look for this because the sad reality is that most outsourcing companies are "coding sweatshops".</p>
<p>In the context of software outsourcing, businesses need to communicate the broader project goals and ensure that developers are aware of the strategic direction as well as the product needs and limitations. By involving developers in problem-solving discussions, businesses can benefit from the developer's skills while raising their understanding of the strategic needs of a project, which a "turnkey" solution could offer to the client.</p>
<h3 id="heading-freelances-vs-outsourcing-companies">Freelances vs Outsourcing Companies</h3>
<p>In software outsourcing, businesses have the option to outsource to freelancers or development agencies. While freelancers may lead to reduced costs, the main disadvantage is that clients may be directly responsible for managing the project and its various stages. In contrast, outsourcing to a development agency means that the client has a team to manage the project holistically and the agency is responsible for ensuring quality outcomes.</p>
<p>Outsourcing companies that offer a full package from design to development, production deployment and maintenance are advantageous as they offer a seamless system from beginning to end, ensuring that each stage of the process works together harmoniously.</p>
<p>Working with multiple outsourcing companies, however, can lead to communication challenges as each company may have different practices and methods. This can lead to defects, delays and a lower quality of work.</p>
<p>Breaking up the project by teams working in isolation can cause communication challenges between teams, which ultimately leads to delays and lower project quality. It's crucial for businesses to consider these issues when outsourcing.</p>
<p>In comparison, working with a company that can offer a full range of services from design to deployment and maintenance simplifies the process. By working with a single company, clients can reduce the challenges of fragmented communication and disjointed methods. A one-stop-shop solution provides accountability throughout the project's lifecycle, leading to timely completion, higher-quality outcome, and more predictable costs.</p>
<p>Additionally, post-deployment maintenance and support are more robust as the company has intellectual property rights and proprietary knowledge of the project, meaning any issues that arise after deployment can be handled efficiently.</p>
]]></content:encoded></item><item><title><![CDATA[How Do We Estimate Software Projects]]></title><description><![CDATA[I've been meaning to write something like this for a while now. We've been using a project estimate template for small to medium-sized project estimations that could benefit others.
Estimating the cost, timeline, and resources required for software p...]]></description><link>https://primalskill.blog/how-do-we-estimate-software-projects</link><guid isPermaLink="true">https://primalskill.blog/how-do-we-estimate-software-projects</guid><category><![CDATA[project management]]></category><category><![CDATA[beginner]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Sun, 25 Jun 2023 07:54:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/qWwpHwip31M/upload/d738733bd9ff80f3c08a7045391e978b.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've been meaning to write something like this for a while now. We've been using a project estimate template for small to medium-sized project estimations that could benefit others.</p>
<p>Estimating the cost, timeline, and resources required for software projects is a crucial aspect of project management. However, it is also one of the most challenging tasks.</p>
<p>Estimating a software project is like predicting the future; it is fraught with uncertainties, unknown variables, and shifting priorities. As a result, it can be challenging to provide accurate software project estimations and we don't bother trying to be 100% accurate. Being in the ballpark is always better than shooting it way off the field by trying to pinpoint the deadlines.</p>
<h3 id="heading-so-how-do-we-do-it"><strong>So how do we do it?</strong></h3>
<p>One possible solution to these challenges is the <strong><em>PERT algorithm</em></strong>, which stands for Program Evaluation and Review Technique. This algorithm enables project managers to create a range of possible outcomes by analyzing the critical path and calculating optimistic, pessimistic, and most likely estimates for each task. By weighing these estimates, project managers can arrive at a more accurate estimation.</p>
<p><strong><em>Standard deviation</em></strong> is another formula that we use that measures the variability of a set of data points and shows the amount of deviation from the mean. In the context of software project estimation, the standard deviation provides a way to understand the possible range of outcomes and assess the level of risk involved.</p>
<p><strong><em>The Monte Carlo simulation</em></strong> uses statistical modeling and simulation to generate a range of possible outcomes. This method involves running multiple simulations of a project using different inputs and parameters to determine the likelihood of various outcomes. The Monte Carlo simulation helps us identify that our assumptions are in the correct and acceptable range.</p>
<p>While the PERT algorithm, standard deviation, and Monte Carlo simulation are valuable tools for software project estimation, they do have limitations. These methods rely on historical data and assumptions, and they cannot account for unforeseeable events that may impact the project. This is why I suggest using it only for simpler project estimations.</p>
<p>Essentially, we estimate the effort it takes for a task to be implemented by using story points and estimating effort instead of duration. After that summing up the totals, calculating PERT and the standard deviation to give us the "estimative" story points for the project.</p>
<p>Finally, converting the story points to development hours, by knowing how much similar projects take on average, then running everything through 5000 Monte Carlo simulations to give us a ballpark estimate with <strong>68-95-99.7 rule</strong>-based confidence levels.</p>
<p>It sounds harder than it is. In the link below you'll find the Excel file that takes care of all of this, you just have to estimate the tasks using the story points. Have fun!</p>
<p>The template Excel file: <a target="_blank" href="https://docs.google.com/spreadsheets/d/1lnSv8lkyKOBc_t2Mps8cNtteNVOIQqRa/edit?usp=sharing&amp;ouid=102874901390146568205&amp;rtpof=true&amp;sd=true">Primal Skill Project Estimate Template</a></p>
<p><strong><em>Make sure you download the file and open it in Microsoft Excel for the formulas to function correctly.</em></strong></p>
]]></content:encoded></item><item><title><![CDATA[A Conversation with ChatGPT on Real-Time Comment Systems]]></title><description><![CDATA[On an upcoming client project, our software company needs to implement a real-time comment system as a module on the client's web project.
We were trying to figure out what technologies or services to use so we are not reinventing the wheel, and whil...]]></description><link>https://primalskill.blog/a-conversation-with-chatgpt-on-real-time-comment-systems</link><guid isPermaLink="true">https://primalskill.blog/a-conversation-with-chatgpt-on-real-time-comment-systems</guid><category><![CDATA[General Programming]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[Microservices]]></category><category><![CDATA[chatgpt]]></category><category><![CDATA[Programming Tips]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Mon, 20 Mar 2023 05:17:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1678989298934/7cf59f8c-9bfc-415c-8ce1-bc6befbe14be.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>On an upcoming client project, our software company needs to implement a real-time comment system as a module on the client's web project.</p>
<p>We were trying to figure out what technologies or services to use so we are not reinventing the wheel, and while Google gives us specific results one has to know what to query for.</p>
<p>So... we thought to ask the "AI". Here's the conversation with it sprinkled in our thought process too.</p>
<h3 id="heading-prompt-what-would-be-the-architecture-for-a-real-time-comment-system">Prompt: What would be the architecture for a real-time comment system?</h3>
<p>A real-time comment system can be built using several architectures, but the most popular ones are:</p>
<ol>
<li><p>Client-side rendering architecture: In this architecture, the front-end application is responsible for rendering the comments in real-time. Whenever a new comment is added, the front-end application sends a request to the server to retrieve the new comment, and then the comment is rendered on the web page. This architecture requires the use of technologies like WebSockets, AJAX, and JavaScript frameworks like React, Angular, or Vue.</p>
</li>
<li><p>Server-side rendering architecture: In this architecture, the server is responsible for rendering the comments in real-time. Whenever a new comment is added, the server sends the updated HTML to the client, which is then displayed on the web page. This architecture requires the use of technologies like Node.js, <a target="_blank" href="http://Socket.io">Socket.io</a>, and server-side templating engines like Pug or Handlebars.</p>
</li>
<li><p>Hybrid architecture: This architecture is a combination of client-side and server-side rendering. In this architecture, the server is responsible for rendering the comments initially, and then the client takes over the rendering process. Whenever a new comment is added, the server sends the updated HTML to the client, and then the client uses JavaScript to update the DOM in real-time. This architecture requires</p>
</li>
</ol>
<p><em>This wasn't a very helpful response but it gave ChatGPT a context of what we're looking for.</em></p>
<h3 id="heading-prompt-get-me-a-list-of-backend-tech-thats-used-for-building-realtime-comment-system">Prompt: Get me a list of backend tech that's used for building realtime comment system.</h3>
<p>There are several backend technologies that can be used to build a real-time comment system. Here are some of the most popular ones:</p>
<ol>
<li><p>Node.js: Node.js is a popular choice for building real-time web applications because of its event-driven architecture and support for WebSockets. It also has a large and active community that provides numerous libraries and frameworks for building real-time applications.</p>
</li>
<li><p>Ruby on Rails: Ruby on Rails is a popular web application framework that provides built-in support for WebSockets through the Action Cable library. It's easy to use and has a large and supportive community.</p>
</li>
<li><p>Django: Django is a popular Python web application framework that provides support for WebSockets through the Django Channels library. It's a mature and stable framework that's easy to learn and use.</p>
</li>
<li><p>Laravel: Laravel is a popular PHP web application framework that provides support for WebSockets through the Laravel Echo library. It's a modern and elegant framework that's easy to learn and use.</p>
</li>
<li><p>Firebase: Firebase is a backend-as-a-service platform that provides real-time data synchronization and messaging services. It's easy to use and provides a complete set of tools for building real-time applications.</p>
</li>
<li><p>Pusher: Pusher is a hosted service that provides real-time messaging.</p>
</li>
</ol>
<p><em>This response was more helpful, at least we have a list to choose from, but it's a mixed list like programming languages and messaging services thrown in the same place. So we singled out the "Pusher" service from the list as we felt this was the most relevant from the response.</em></p>
<h3 id="heading-prompt-show-me-more-like-what-pusher-does">Prompt: Show me more like what Pusher does.</h3>
<p>Sure! Here are some other real-time messaging and synchronization services similar to Pusher:</p>
<ol>
<li><p>PubNub: PubNub is a real-time messaging and synchronization platform that provides APIs and infrastructure for building real-time applications. It provides support for WebSockets, MQTT, and other communication protocols.</p>
</li>
<li><p>SocketCluster: SocketCluster is a scalable real-time messaging and synchronization platform that provides support for WebSockets and other communication protocols. It's built on top of Node.js and provides a flexible and customizable architecture.</p>
</li>
<li><p>Ably: Ably is a real-time messaging and synchronization platform that provides APIs and infrastructure for building real-time applications. It provides support for WebSockets, MQTT, and other communication protocols, and has a scalable and reliable architecture.</p>
</li>
<li><p>Syncano: Syncano is a backend-as-a-service platform that provides real-time data synchronization and messaging services. It provides support for WebSockets and other communication protocols, and has a flexible and customizable architecture.</p>
</li>
<li><p>Pushy: Pushy is a real-time messaging and synchronization platform that provides APIs and infrastructure for building real-time applications. It provides support for WebSockets and other communication protocols, and has a scalable and reliable architecture.</p>
</li>
</ol>
<p><em>Now we're getting somewhere. Let's see if there are open-source techs too!</em></p>
<h3 id="heading-prompt-the-same-list-but-with-open-source-technologies">Prompt: The same list but with open-source technologies.</h3>
<p>Sure, here are some open source real-time messaging and synchronization technologies that you can use to build a real-time comment system:</p>
<ol>
<li><p>Apache Kafka: Apache Kafka is a distributed streaming platform that provides support for real-time messaging and synchronization. It's a scalable and fault-tolerant technology that can handle high-volume data streams.</p>
</li>
<li><p>Apache Pulsar: Apache Pulsar is a distributed messaging and streaming platform that provides support for real-time messaging and synchronization. It's a scalable and flexible technology that can handle both streaming and batch data.</p>
</li>
<li><p>Mosquitto: Mosquitto is an open source MQTT broker that provides support for real-time messaging and synchronization. It's a lightweight and easy-to-use technology that's suitable for small to medium-sized projects.</p>
</li>
<li><p>SignalR: SignalR is an open source library for building real-time web applications. It provides support for WebSockets and other communication protocols, and has a simple and easy-to-use API.</p>
</li>
<li><p>Pushpin: Pushpin is an open source reverse proxy server that provides support for real-time messaging and synchronization. It's designed to handle high-volume traffic and can be used with any backend technology.</p>
</li>
</ol>
<p><em>We knew about these technologies but it's nice to see a succinct overview of them, especially an overview in the context of a "comment system" architecture.</em></p>
<h3 id="heading-prompt-whats-the-difference-between-kafka-and-pulsar-from-the-previous-list">Prompt: What's the difference between Kafka and pulsar from the previous list?</h3>
<p>Both Apache Kafka and Apache Pulsar are distributed messaging and streaming platforms that provide support for real-time messaging and synchronization. However, there are some differences between the two:</p>
<ol>
<li><p>Architecture: Kafka uses a broker-based architecture, where messages are sent to brokers and stored on disk, while Pulsar uses a brokerless architecture, where messages are stored in memory or offloaded to storage systems like Hadoop or S3.</p>
</li>
<li><p>Multi-tenancy: Pulsar provides better support for multi-tenancy, where multiple organizations or applications can share the same messaging system, while Kafka is designed to be used by a single organization or application.</p>
</li>
<li><p>Message retention: Pulsar provides better support for message retention, where messages can be retained for a longer period of time, while Kafka has some limitations on message retention.</p>
</li>
<li><p>Performance: Both Kafka and Pulsar are designed to handle high-volume, real-time data streams, but Pulsar provides better performance in some scenarios, especially when dealing with large-scale data.</p>
</li>
<li><p>Community: Both Kafka and Pulsar have large and active communities, but Kafka has been around longer and has a more established ecosystem of tools and integrations. Pulsar is a newer technology but is gaining popularity rapidly.</p>
</li>
</ol>
<h3 id="heading-prompt-give-me-more-comparisons">Prompt: Give me more comparisons</h3>
<p>Sure, here are some more comparisons between Kafka and Pulsar:</p>
<ol>
<li><p>Protocol support: Kafka supports only the Kafka protocol, while Pulsar supports multiple protocols, including Kafka, MQTT, and a custom protocol called Pulsar Native.</p>
</li>
<li><p>Security: Both Kafka and Pulsar provide support for security features like SSL and authentication, but Pulsar provides more fine-grained access control and authentication options.</p>
</li>
<li><p>Geo-replication: Pulsar provides built-in support for geo-replication, where data can be replicated across multiple data centers, while Kafka requires external tools and configurations to achieve the same.</p>
</li>
<li><p>Schema management: Pulsar provides built-in support for schema management, where data can be serialized and deserialized using a schema, while Kafka requires external tools for schema management.</p>
</li>
<li><p>Operational ease: Pulsar provides better operational ease, with features like automatic partition reassignment and easier configuration management, while Kafka requires more manual intervention for these tasks.</p>
</li>
<li><p>Commercial support: Both Kafka and Pulsar have commercial support offerings, but Kafka has a more established ecosystem of vendors and service providers. However, Pulsar is gaining popularity rapidly and is being adopted by several large organizations.</p>
</li>
</ol>
<p><em>Now we tried to use ChatGPT as a "software technology" consultant.</em></p>
<h3 id="heading-prompt-can-pulsar-be-used-with-grpc">Prompt: Can Pulsar be used with gRPC?</h3>
<p>Yes, Apache Pulsar can be used with gRPC (Google Remote Procedure Call), which is a high-performance open-source RPC framework. Pulsar provides a gRPC proxy that can be used to interface with Pulsar using the gRPC protocol.</p>
<p>The Pulsar gRPC proxy acts as a gateway between the gRPC client and the Pulsar broker, translating gRPC requests into Pulsar requests and vice versa. This allows gRPC clients to consume and produce messages from Pulsar topics using the gRPC protocol.</p>
<p>Using gRPC with Pulsar has several benefits, including high performance, low latency, and support for bidirectional streaming. It also provides a type-safe API and supports automatic code generation for client and server stubs.</p>
<p>To use Pulsar with gRPC, you will need to configure the Pulsar gRPC proxy and generate the gRPC client and server stubs using the appropriate tooling. Once this is done, you can use the gRPC API to interact with Pulsar topics and consume or produce messages.</p>
<h3 id="heading-prompt-what-are-the-downsides-of-using-pulsar-in-contrast-with-kafka">Prompt: What are the downsides of using Pulsar in contrast with Kafka?</h3>
<p>While Apache Pulsar is a promising distributed messaging and streaming platform, it also has some downsides compared to Apache Kafka. Here are some of the main downsides to consider:</p>
<ol>
<li><p>Maturity: While Pulsar has matured considerably since its first release, it is still a relatively new technology compared to Kafka. As a result, it may not have as many integrations, tools, and community support as Kafka.</p>
</li>
<li><p>Complexity: Pulsar's brokerless architecture and support for multiple protocols make it a more complex system to manage than Kafka, which has a simpler broker-based architecture. This can result in higher operational complexity and maintenance costs.</p>
</li>
<li><p>Learning Curve: Pulsar's advanced features and architecture can make it more challenging to learn and use than Kafka, which has a more straightforward design. This can make it more difficult to onboard new team members or integrate it into existing systems.</p>
</li>
<li><p>Performance: While Pulsar provides better performance in some scenarios, Kafka generally provides better performance overall, especially in high-throughput use cases.</p>
</li>
<li><p>Ecosystem: While Pulsar has a growing ecosystem of integrations and tools, it may not have as many options as Kafka, which has a large and mature ecosystem.</p>
</li>
<li><p>Compatibility: While Pulsar provides support for the Kafka protocol, not all Kafka clients and tools may be fully compatible with Pulsar. This can cause compatibility issues and additional development work to adapt existing Kafka-based systems to use Pulsar.</p>
<p> Ultimately, the choice between Kafka and Pulsar will depend on your specific use case and requirements. While Pulsar may have some downsides compared to Kafka, it also has several unique features and advantages that may make it a better choice for certain use cases. It's important to evaluate both technologies carefully and choose the one that best meets your needs.</p>
</li>
</ol>
<h3 id="heading-prompt-are-there-any-apache-pulsar-go-packages">Prompt: Are there any Apache Pulsar Go packages?</h3>
<p>Yes, Apache Pulsar has official Go packages that provide a client library for interacting with Pulsar. The Go client library is part of the official Pulsar client library and provides a simple and easy-to-use API for consuming and producing messages from Pulsar topics.</p>
<p>The Go client library supports all of the main Pulsar features, including message acknowledgments, batching, compression, and encryption. It also provides support for message filtering, which allows consumers to subscribe only to messages that match specific criteria.</p>
<p>The Go client library is actively maintained and has a growing community of contributors. It's also well-documented and provides comprehensive examples and tutorials to help developers get started quickly.</p>
<p>In addition to the official Go client library, there are also several third-party packages and tools available for working with Pulsar in Go, including libraries for working with the Pulsar proxy, CLI tools for managing Pulsar clusters, and more.</p>
<p><em>As we're mostly using Go as our backend technology, we asked it.</em></p>
<h3 id="heading-prompt-are-there-any-real-time-comment-system-implemented-using-apache-pulsar-or-apache-kafka-show-me-a-list">Prompt: Are there any real-time comment system implemented using Apache Pulsar or Apache Kafka? Show me a list.</h3>
<p>Certainly, here are some real-time comment systems that have been implemented using Apache Pulsar or Apache Kafka:</p>
<ol>
<li><p>Disqus: Disqus is a popular commenting system that uses Apache Kafka to power its real-time messaging and synchronization capabilities. It uses Kafka to process and deliver comment notifications to users in real-time.</p>
</li>
<li><p>Livefyre: Livefyre is a real-time commenting and social engagement platform that uses Apache Kafka for its real-time messaging and synchronization features. It uses Kafka to process and deliver comments, social media mentions, and other user-generated content in real-time.</p>
</li>
<li><p>Stream: Stream is a real-time activity feed and commenting platform that uses Apache Kafka to power its real-time messaging and synchronization capabilities. It uses Kafka to process and deliver user-generated content, including comments, likes, and shares.</p>
</li>
<li><p>Commento: Commento is a real-time commenting system that uses Apache Pulsar to power its real-time messaging and synchronization capabilities. It uses Pulsar to process and deliver comments in real-time and provides a simple and easy-to-use API for integrating with other systems.</p>
</li>
<li><p>Hyperledger Fabric: Hyperledger Fabric is an open-source blockchain platform that uses Apache Kafka for its real-time messaging and synchronization capabilities. It uses Kafka to process and deliver blockchain transaction data in real-time and provide a tamper-proof record of all transactions.</p>
</li>
</ol>
<p>These are just a few examples of real-time comment systems that use Apache Pulsar or Apache Kafka. Both technologies are well-suited to building real-time messaging and synchronization systems and are used by many organizations for a wide range of applications.</p>
<p><em>We love the history and context that's kept throughout this conversation, it feels more like a brainstorming session than just simply entering search queries.</em></p>
<h3 id="heading-prompt-whats-the-architecture-of-disqus-using-kafka">Prompt: What's the architecture of Disqus using Kafka?</h3>
<p>The architecture of Disqus using Kafka is a typical event-driven architecture, where events are generated and propagated by producers and consumed by consumers. Here's an overview of the architecture:</p>
<ol>
<li><p>Producers: Disqus uses Kafka producers to generate events related to comments, such as new comments, replies, likes, or flags. These events are sent to Kafka brokers for processing and delivery to consumers.</p>
</li>
<li><p>Kafka brokers: Kafka brokers are responsible for receiving and storing events produced by the producers. They also manage the distribution of events to the consumers based on their subscription preferences.</p>
</li>
<li><p>Consumers: Disqus uses Kafka consumers to consume events from Kafka brokers and process them in real-time. The consumers are responsible for processing the events and updating the relevant data structures, such as comment counts or user profiles.</p>
</li>
<li><p>Real-time notification system: Disqus uses a real-time notification system to deliver comment notifications to users in real-time. This system is powered by Kafka and is responsible for processing events related to comments and delivering them to users through various channels, such as email, push notifications, or in-app notifications.</p>
</li>
<li><p>Data storage: Disqus uses a combination of databases and caching systems to store comment data and user information. These systems are updated in real-time by the consumers and are used to serve comment threads and user profiles to users.</p>
</li>
</ol>
<p>Overall, the architecture of Disqus using Kafka is designed to provide a scalable and fault-tolerant real-time commenting system that can handle high traffic and deliver notifications to users in real-time.</p>
<h3 id="heading-prompt-what-about-commento">Prompt: What about Commento?</h3>
<p>The architecture of Commento using Apache Pulsar is centered around the Pulsar messaging system and is designed to provide a scalable and fault-tolerant real-time commenting system. Here's an overview of the architecture:</p>
<ol>
<li><p>Producers: Commento uses Pulsar producers to generate events related to comments, such as new comments, replies, likes, or flags. These events are sent to Pulsar brokers for processing and delivery to consumers.</p>
</li>
<li><p>Pulsar brokers: Pulsar brokers are responsible for receiving and storing events produced by the producers. They also manage the distribution of events to the consumers based on their subscription preferences.</p>
</li>
<li><p>Consumers: Commento uses Pulsar consumers to consume events from Pulsar brokers and process them in real-time. The consumers are responsible for processing the events and updating the relevant data structures, such as comment counts or user profiles.</p>
</li>
<li><p>Real-time notification system: Commento uses a real-time notification system to deliver comment notifications to users in real-time. This system is powered by Pulsar and is responsible for processing events related to comments and delivering them to users through various channels, such as email, push notifications, or in-app notifications.</p>
</li>
<li><p>Data storage: Commento uses a combination of databases and caching systems to store comment data and user information. These systems are updated in real-time by the consumers and are used to serve comment threads and user profiles to users.</p>
</li>
</ol>
<p>The Pulsar messaging system provides several benefits for Commento, including high availability, scalability, and fault tolerance. It also provides support for multi-tenancy, which allows Commento to serve multiple clients or organizations from a single Pulsar cluster. Overall, the architecture of Commento using Pulsar is designed to provide a modern, scalable, and real-time commenting system that can handle high traffic and deliver notifications to users in real-time.</p>
<p><em>... and that's about it.</em></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>ChatGPT is becoming a very powerful tool, now we know why Google is shook to its core when version 3.5 was released.</p>
<p>We are excited about what this technology will be capable of in the near future and bare in mind that this chat was processed by v3.5 and not version 4, which was recently released.</p>
]]></content:encoded></item><item><title><![CDATA[Falsehoods in Programming]]></title><description><![CDATA[Falsehoods in programming refer to commonly held beliefs or assumptions that are not true or only partially true. These falsehoods can lead to errors in coding, misinterpretation of data, and costly mistakes. In this blog post, we will explore some o...]]></description><link>https://primalskill.blog/falsehoods-in-programming</link><guid isPermaLink="true">https://primalskill.blog/falsehoods-in-programming</guid><category><![CDATA[Programming Blogs]]></category><category><![CDATA[development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Wed, 15 Mar 2023 19:26:22 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1678908207919/33aa440c-dd54-4ea2-af11-f31496893356.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Falsehoods in programming refer to commonly held beliefs or assumptions that are not true or only partially true. These falsehoods can lead to errors in coding, misinterpretation of data, and costly mistakes. In this blog post, we will explore some of the most common falsehoods in programming and how to avoid them.</p>
<p>Programming is a complex and ever-evolving field, and many assumptions and beliefs about programming can lead to errors and inaccuracies in code. Falsehoods about date and time, phone numbers, and web technologies are just a few examples of common misconceptions that can cause problems in programming. In this blog post, we will explore these and other falsehoods in programming and how to avoid them.</p>
<p>Falsehoods in programming are not limited to specific areas of development but can be found across various aspects of programming, from data types to security measures. These misconceptions can lead to costly mistakes and cause a detrimental impact on the functioning of programs. Therefore, it is crucial to be aware of these falsehoods and take the necessary steps to avoid them while writing code. Let's get into it.</p>
<h3 id="heading-names-are-unique">Names are unique</h3>
<p>One of the most common falsehoods in programming is that names are unique. This is not always true. Consider the following scenario: you are building a system that allows users to register with their email addresses. You might assume that email addresses are unique, but this is not always the case. People can have multiple email addresses or use different variations of their name. To avoid this mistake, you should use a unique identifier, such as a user ID, to identify users.</p>
<h3 id="heading-floating-point-numbers-are-precise">Floating-point numbers are precise</h3>
<p>Another common falsehood in programming is that floating-point numbers are precise. In reality, floating-point numbers have limited precision and can sometimes result in rounding errors. For example, when you add 0.1 and 0.2, the result should be 0.3, but in some programming languages, the result is actually 0.30000000000000004. To avoid this, you can use decimal or fixed-point numbers which are more precise.</p>
<h3 id="heading-there-is-one-true-way-to-do-it">There is one true way to do it</h3>
<p>Another common falsehood in programming is that there is only one true way to do things. In reality, there are often multiple ways to solve a problem, and the best solution depends on the context. For example, there are different algorithms for sorting data, and the best algorithm depends on the size and type of data. To avoid this mistake, you should consider different solutions and evaluate them based on performance, readability, and maintainability.</p>
<h3 id="heading-null-is-a-value">Null is a value</h3>
<p>Another common falsehood in programming is that null is a value. In reality, null represents the absence of a value. This can lead to errors when you assume that null is a valid value. For example, if you try to concatenate a null value with a string, you might get a null reference error. To avoid this mistake, you should always check for null values and handle them appropriately.</p>
<h3 id="heading-time-zones-are-constant">Time zones are constant</h3>
<p>Many programmers assume that time zones are constant and do not change. However, time zones can change due to various reasons such as daylight saving time, political changes, or natural disasters. For example, Samoa skipped a day in 2011 when it moved from the east side of the International Date Line to the west side, causing confusion for programmers who assumed that time zones are constant.</p>
<h3 id="heading-leap-years-occur-every-four-years">Leap years occur every four years</h3>
<p>Another common falsehood about date and time is that leap years occur every four years. In reality, leap years occur every four years except for years that are divisible by 100 but not by 400. This means that the year 2000 was a leap year, but the year 1900 was not. Failing to account for this can result in errors when calculating dates or durations.</p>
<h3 id="heading-time-is-always-linear">Time is always linear</h3>
<p>Time is not always linear, especially in cases where time synchronization is required. For example, when synchronizing multiple clocks over a network, there can be delays or inconsistencies that cause time to appear non-linear. This can lead to inconsistencies in the ordering of events or incorrect calculations of durations.</p>
<h3 id="heading-phone-numbers-always-have-a-fixed-length">Phone numbers always have a fixed length</h3>
<p>Many programmers assume that phone numbers always have a fixed length, but this is not true. Phone numbers can have different lengths, depending on the country or region. Additionally, some countries use different formats, such as including dashes or parentheses. Failing to account for this can result in errors when validating or formatting phone numbers.</p>
<h3 id="heading-phone-numbers-are-unique-identifiers">Phone numbers are unique identifiers</h3>
<p>Another common falsehood about phone numbers is that they are unique identifiers. While phone numbers are unique to a specific device or SIM card, they are not globally unique. For example, a person can have multiple phone numbers or use a different phone number when traveling. This can lead to errors when using phone numbers as identifiers or when verifying user identity.</p>
<h3 id="heading-phone-numbers-are-secure">Phone numbers are secure</h3>
<p>Many programmers assume that phone numbers are secure, but they can be easily intercepted or spoofed. For example, someone can use a fake caller ID or send a text message from a different number. Additionally, phone numbers can be used for social engineering attacks or phishing attempts. To avoid this, programmers should use additional verification methods, such as two-factor authentication or biometric identification.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Falsehoods in programming can lead to errors, security vulnerabilities, and performance issues that can have a detrimental impact on software development. From date and time to form validation, there are many misconceptions that programmers should be aware of to avoid these problems. By questioning assumptions, testing thoroughly, and staying up-to-date with best practices, programmers can write better code that is more accurate, efficient, and secure. It is essential to continually learn and improve as a programmer to avoid these common falsehoods and ensure the success of software development projects.</p>
<hr />
<p><em>This blog post was written entirely by ChatGPT v3.5 Turbo and it is a proof of concept that <s>good</s> okayish content is not hard to generate by machine learning.</em></p>
<p><em>Cover photo by Mo Eid on Pexels.</em></p>
]]></content:encoded></item><item><title><![CDATA[The IKEA Effect in Software Development]]></title><description><![CDATA[If you're thinking "The what of software what?" then read on.
So the IKEA effect is a cognitive bias where users place a disproportionately high value on stuff they fully or partially made... which makes sense, one can and should be proud of the thin...]]></description><link>https://primalskill.blog/the-ikea-effect-in-software-development</link><guid isPermaLink="true">https://primalskill.blog/the-ikea-effect-in-software-development</guid><category><![CDATA[Beginner Developers]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[Programming Blogs]]></category><dc:creator><![CDATA[George]]></dc:creator><pubDate>Tue, 06 Dec 2022 18:46:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1670352300375/AVr8hJX0e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong><em>If you're thinking "The what of software what?" then read on.</em></strong></p>
<p>So the IKEA effect is a cognitive bias where users place a disproportionately high value on stuff they fully or partially made... which makes sense, one can and should be proud of the things they made... unless it's s**.</p>
<p><strong>How does this translate into software engineering?</strong></p>
<p>It's simple really, software developers AND clients too, often tend to invest time, energy, and money into their projects even though there would be other much better alternatives.</p>
<p><strong>There are also multiple forms of the IKEA effect which I quickly list below:</strong></p>
<ol>
<li><p><em>Individual effect</em>: It manifests in a way where an individual will devote more resources to get that extra work out of the "experience", be it coding or other tasks.</p>
<p>For example, a software developer will devote more of his energy to getting that extra work into a piece of code where a 3rd party plugin could have done the job better.</p>
</li>
<li><p><em>Group effect</em>: This bias tends to spread among team members and companies too and it could manifest in multiple ways:</p>
<ol>
<li><p>A team could be biased toward creating everything in-house just to have complete control over the whole development process (which of course is a falsehood) wasting valuable resources in the process.</p>
</li>
<li><p>Also, a company could charge more for its product or service to offer that "DIY experience" for its end-users. This is actually what IKEA is doing, hence the name of this bias.</p>
</li>
</ol>
</li>
</ol>
<hr />
<p><strong>We could also take a look at how this bias unfolds from a client's perspective.</strong></p>
<ol>
<li><p>The sunk-cost fallacy: Where a client devotes more and more financial resources into their project, where a rewrite of the code-base (which often is a smaller effort to do) would have taken a less financial burden from the start.  </p>
<p>This is also happening because of a flawed view that a rewrite would result in resources lost, but in fact, oftentimes the opposite is true.  </p>
<p>A refactor of a code base doesn't necessarily mean starting from zero, especially in regards to know-how. Given that the same team is assigned the task of a rewrite, they already know where the pain points are in the project, hence the refactor.</p>
</li>
<li><p>Control over the project: Where a client wants to keep control of every aspect of the project and the development process because of the false image that this creates.</p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Not_invented_here">"Not invented here" (NIH)</a>... when the client refuses to use 3rd party modules in the project out of fear of security exploits, poorly vetted code, and the lack of control over it.</p>
</li>
</ol>
<hr />
<p><strong>How to avoid falling into this trap?</strong></p>
<p>First, just acknowledge that this effect exists and it's real and it will manifest in every individual. <em>Be aware of the IKEA effect</em> and always ask yourself: <em>Am I choosing this solution because I invested work in it and it's made by me or is it something else?</em></p>
<p><em>Work from the outside in</em>. When you're faced with a problem, explore it, and put in the effort of finding a solution, but don't just jump in head first into solving the problem. Create prototypes of code or tests to validate your idea before actually committing to it. This is also true with teams and this is why an MVP of a project could be very valuable early on in the development phase.</p>
<p><em>Prototype, validate, measure, rinse and repeat. Always.</em></p>
<hr />
<p>Cover image copyright (obviously): <a target="_blank" href="https://commons.wikimedia.org/wiki/File:Ikea-logo.png">https://commons.wikimedia.org/wiki/File:Ikea-logo.png</a></p>
]]></content:encoded></item></channel></rss>