<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Primal Skill</title>
    <description>The latest articles on DEV Community by Primal Skill (@primalskill).</description>
    <link>https://dev.to/primalskill</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F2707%2F8b2c3fb3-0a96-4c48-9b8c-b9be54814724.png</url>
      <title>DEV Community: Primal Skill</title>
      <link>https://dev.to/primalskill</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/primalskill"/>
    <language>en</language>
    <item>
      <title>Technologies Change</title>
      <dc:creator>George</dc:creator>
      <pubDate>Sun, 23 Jun 2024 11:00:05 +0000</pubDate>
      <link>https://dev.to/primalskill/technologies-change-5hk</link>
      <guid>https://dev.to/primalskill/technologies-change-5hk</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;My point is that in all these years, the technologies have changed radically, but more importantly, what remained constant were the &lt;a href="https://primalskill.blog/10-books-every-programmer-should-read"&gt;general programming principles I learned on my journey&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I tell every developer I work with, to learn the general programming principles and they will be fine for the rest of their life.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;




&lt;p&gt;Cover photo by &lt;a href="https://pixabay.com/users/seowoo_lee-21601663/"&gt;seowoo_lee&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>learning</category>
      <category>softwaredevelopment</category>
      <category>beginners</category>
    </item>
    <item>
      <title>On Writing Good Code</title>
      <dc:creator>George</dc:creator>
      <pubDate>Sat, 01 Jun 2024 12:39:21 +0000</pubDate>
      <link>https://dev.to/primalskill/on-writing-good-code-3p3f</link>
      <guid>https://dev.to/primalskill/on-writing-good-code-3p3f</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;So what about the rest of us? What can we do to make our code just that tiny bit better for our future selves and colleagues who will maintain it?&lt;/p&gt;

&lt;p&gt;I have gathered a few principles, North Stars if you will, to guide me along this journey, and the first is that:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Programs must be written for people to read, and only incidentally for machines to execute. -- Hal Abelson&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Even though code will ultimately be interpreted and executed by machines, the code base itself should always be written with humans first in mind.&lt;/p&gt;

&lt;p&gt;I have never successfully got my way around in a code base that wasn't readable and the &lt;a href="https://primalskill.blog/wins-and-trade-offs-in-software"&gt;code architecture could easily be reasoned about&lt;/a&gt;. There's something beautiful when reading well-written code, the execution path flows in our mind like well-composed music.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A long descriptive name is better than a short enigmatic name. A long descriptive name is better than a long descriptive comment. -- Robert C. Martin&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Anything else should instantly let the reader know what it is about, a function called &lt;code&gt;UpdateProductStatusCode&lt;/code&gt; is leaps and bounds better than a function called &lt;code&gt;updProd&lt;/code&gt; or &lt;code&gt;upd_prod_st&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Also, the second part of the quote A long descriptive name is better than a long descriptive comment 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 does if the execution path is complicated.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Code is read more than it is written. -- Daniel Roy Greenfeld&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I've written more about this concept in this &lt;a href="https://primalskill.blog/code-is-read-more-than-it-is-written"&gt;blog post here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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 side effect of thinking deeply about a solution to a very specific software problem.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don't comment bad code, rewrite it. -- Brian Kernighan&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In programming, boring and simple is always better than smart and complex. -- Rob Pike&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;I will always choose the &lt;a href="https://primalskill.blog/its-probably-fine"&gt;simple, boring, and battle-tested tech.&lt;/a&gt; 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.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>architecture</category>
      <category>programming</category>
    </item>
    <item>
      <title>About Logging</title>
      <dc:creator>George</dc:creator>
      <pubDate>Sat, 21 Oct 2023 15:51:11 +0000</pubDate>
      <link>https://dev.to/primalskill/about-logging-1b2p</link>
      <guid>https://dev.to/primalskill/about-logging-1b2p</guid>
      <description>&lt;p&gt;This blog post will be about the DOs and DON'Ts of code logging I picked up along the way in my coding career.&lt;/p&gt;

&lt;p&gt;I don't have to emphasize the importance of logging, if you think that logging is not important at all, you should stop reading now. 😀&lt;/p&gt;

&lt;h2&gt;
  
  
  First off, the DOs and DON'Ts
&lt;/h2&gt;

&lt;p&gt;This is a quick list, a "cheat sheet" if you will, which I will expand on down below.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DO log your program output to &lt;code&gt;stderr&lt;/code&gt;. This is meant for both errors and diagnostics, logs are classified as "diagnostic messages of a program".&lt;/li&gt;
&lt;li&gt;DO ensure the only place you're logging your program output to is &lt;code&gt;stderr&lt;/code&gt;, not a file, a DB, or a third-party service.&lt;/li&gt;
&lt;li&gt;DO adhere to structured logs. JSON is the go-to format for a majority, but if you're working with simple logs, &lt;a href="https://brandur.org/logfmt"&gt;logfmt&lt;/a&gt; works fine too.&lt;/li&gt;
&lt;li&gt;DO play around with log levels. The default level should be set to &lt;code&gt;INFO&lt;/code&gt; in production and &lt;code&gt;DEBUG&lt;/code&gt; in development.&lt;/li&gt;
&lt;li&gt;DO NOT log sensitive details such as PII data - stick to using IDs (e.g. user ID).&lt;/li&gt;
&lt;li&gt;DO NOT log and handle an error simultaneously.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Logging to stderr
&lt;/h3&gt;

&lt;p&gt;No matter the log level, it should be streamed to &lt;code&gt;stderr&lt;/code&gt;. From the docs on &lt;code&gt;stderr&lt;/code&gt; it reads like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Logs are diagnostics and are not necessarily meant to be consumed by the end user of the program.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Log to stderr and nowhere else
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Of course, there are exceptions, when for example logging to the standard streams is not possible.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adhere to structured logging
&lt;/h3&gt;

&lt;p&gt;Structured logs are way easier to process by other machines than by humans, and this is the point exactly.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Log levels
&lt;/h3&gt;

&lt;p&gt;This is a tricky one. Every developer has an opinion on which log levels should be used.&lt;/p&gt;

&lt;p&gt;I personally found that most programs do not need more than three levels which are &lt;code&gt;INFO&lt;/code&gt;, &lt;code&gt;ERROR&lt;/code&gt;, and &lt;code&gt;DEBUG&lt;/code&gt;. Not even &lt;code&gt;DEBUG&lt;/code&gt; is necessary in most cases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So let me explain these levels:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;DEBUG&lt;/code&gt;: 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.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;INFO&lt;/code&gt;: Represents normal operation with sufficient metadata like, "user_id added record into DB", but not as exhaustive as DEBUG. Anything that helps you pinpoint the execution flow of your program.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ERROR&lt;/code&gt;: 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.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;You don't need these log levels:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;WARNING&lt;/code&gt;: these are basically INFO logs with a label attached to it. They are definitely not ERROR 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.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;NOTICE&lt;/code&gt;, &lt;code&gt;FATAL&lt;/code&gt;, &lt;code&gt;ALERT&lt;/code&gt;, &lt;code&gt;CRITICAL&lt;/code&gt;, etc.: are all just semantics of either INFO or ERROR where a label would suffice, e.g. "INFO alert message alert=true".&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Do not log sensitive data
&lt;/h3&gt;

&lt;p&gt;I can't state the obvious. Not one system is 100% hackproof.&lt;/p&gt;

&lt;p&gt;Logging sensitive data such as names and OMG, passwords is creating yet another attack vector.&lt;/p&gt;

&lt;p&gt;The best way to filter out sensitive data is to have an &lt;a href="https://en.wikipedia.org/wiki/Extract,_transform,_load"&gt;ETL (Extract-Transform-Load)&lt;/a&gt; function execute on the log messages before it is written to the destination stream.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do not handle errors and log them too
&lt;/h3&gt;

&lt;p&gt;Logging an error means you handled it. You either handle the error or log it if it's an unrecoverable error.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The art of writing good logs
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Can the event be reproduced from the logs?&lt;/strong&gt; If the event, be it a warning or an error, cannot be reproduced just from the logs it's not worth logging. For example, "cannot update table". Which table? Where in the code? What data was used?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Are the logs rich with enough metadata to understand what happened?&lt;/strong&gt; This is why structured logging is so important, that you can attach metadata to each log. Example of a bad log: "fetching data from URL failed", but doesn't include which URL, nor what request variables were sent. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can multiple log lines be correlated?&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is the error clear just by reading the error logs?&lt;/strong&gt; The example above, "cannot update table", 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 "cannot update table user_photos: user does not have access to group" with metadata such as &lt;code&gt;group_id: 123&lt;/code&gt; and &lt;code&gt;user_id: 456&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is it clear from the log when and where the event occurred?&lt;/strong&gt; 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: "cannot update table user_photos" metadata &lt;code&gt;t=1697880685&lt;/code&gt; and &lt;code&gt;user_group_photos.php:38&lt;/code&gt; or separate it like &lt;code&gt;filename=user_group_photos.php&lt;/code&gt;, &lt;code&gt;line=38&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Individual log lines vs wide events
&lt;/h2&gt;

&lt;p&gt;There has always been a debate on whether log lines or wide events are a better choice.&lt;/p&gt;

&lt;p&gt;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?&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

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

&lt;p&gt;There you have it. My thoughts on the "art and science" of logging.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After all, what is a log good for if nobody reads it?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Software Outsourcing Part 2: Myths and Truths</title>
      <dc:creator>George</dc:creator>
      <pubDate>Fri, 04 Aug 2023 06:52:06 +0000</pubDate>
      <link>https://dev.to/primalskill/software-outsourcing-part-2-myths-and-truths-3gph</link>
      <guid>https://dev.to/primalskill/software-outsourcing-part-2-myths-and-truths-3gph</guid>
      <description>

&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://primalskill.blog/software-outsourcing-part-2-myths-and-truths"&gt;https://primalskill.blog/software-outsourcing-part-2-myths-and-truths&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For Part 1 see: &lt;a href="https://primalskill.blog/software-outsourcing-part-1-types-pros-and-cons"&gt;https://primalskill.blog/software-outsourcing-part-1-types-pros-and-cons&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Myth: The software product will be of lower quality
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;There's absolutely no basis for this claim, which is more likely an unfounded fear from managers looking into outsourcing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Myth: You can't get to market quickly by outsourcing the product
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Myth: Developers will steal your code and idea
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Most outsourcing companies, just like any other company, have robust legal frameworks in place, and they respect the intellectual property rights of their clients.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Myth: Language barrier of outsourcing teams
&lt;/h2&gt;

&lt;p&gt;It is a common myth that outsourcing software development to a team in another country will result in a significant language barrier.&lt;/p&gt;

&lt;p&gt;Many outsourcing companies, including my company, employ English as their primary business language and require their employees to be proficient in it.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Myth: Outsourcing will cut down costs
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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 that much.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Truth: Cultural differences in outsourcing
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;It's no secret that when outsourcing software development to another country, there will likely be some cultural differences to navigate.&lt;/p&gt;

&lt;p&gt;For example, a culture that values direct communication may clash with a more indirect communication style that prioritizes avoiding confrontation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Truth: Timezone differences of various teams
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;These differences can sometimes make communication and coordination more complicated, as team members may be working during different hours of the day.&lt;/p&gt;

&lt;p&gt;Despite these differences, many outsourcing companies are able to accommodate clients by adjusting work hours or scheduling meetings at mutually convenient times.&lt;/p&gt;

&lt;p&gt;Also, asynchronous communication tools and project management software can facilitate easy sharing of updates and progress.&lt;/p&gt;

&lt;p&gt;Planning is harder, this is true, but there are a boatload of tools to help overcome the differences and successful collaboration can be achieved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Truth: The talent pool is much larger
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Truth: Skills and costs are more optimized
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;For less money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turnkey solutions without micromanaging
&lt;/h2&gt;

&lt;p&gt;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".&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Freelances vs Outsourcing Companies
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>business</category>
      <category>learning</category>
      <category>management</category>
    </item>
    <item>
      <title>The Black Box of Software Development</title>
      <dc:creator>George</dc:creator>
      <pubDate>Sun, 18 Sep 2022 10:29:26 +0000</pubDate>
      <link>https://dev.to/primalskill/the-black-box-of-software-development-4eoh</link>
      <guid>https://dev.to/primalskill/the-black-box-of-software-development-4eoh</guid>
      <description>&lt;p&gt;&lt;strong&gt;Think of software development as a box.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, this box is transparent at the start, but as you develop the application this box will get darker and &lt;strong&gt;darker&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Initially, you can see inside the transparent box, you can see all the code bits and pieces that keep the box together.&lt;/p&gt;

&lt;p&gt;A new task was assigned to a developer who starts working on it right away putting the implemented code in the box. The box gets &lt;strong&gt;darker&lt;/strong&gt;. Then another bit of code by another developer is put inside the box and the box, yet again, gets &lt;strong&gt;darker&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Every new code from tasks, iterations, phases, or sprints, however you want to call it, will make this box ever so slightly darker up to the point when this box is &lt;strong&gt;completely black&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Developers can't see the contents of the black box, they don't know what's going on inside anymore. They have no idea what's keeping the box together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A team's job is not to let the box become completely black.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What prevents the box to be completely black?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It's well-defined specifications. It's good tests, be it unit tests, integration, or end-to-end. It's also sane task deadlines, and a well-spent time in and around development reviews. It's refactoring stale code.&lt;/p&gt;

&lt;p&gt;Finally, it's team energy of overcoming the hurdles of a complex project and creating a solid architectural base for this imaginary box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remember, good code is just a side-effect of all of the above.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Image credit: Thorn Yang on Pexels.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Stay tuned and if you liked this post, please share it and comment on it below.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Software Outsourcing: Types, Pros and Cons</title>
      <dc:creator>George</dc:creator>
      <pubDate>Mon, 17 Jan 2022 09:02:10 +0000</pubDate>
      <link>https://dev.to/primalskill/software-outsourcing-types-pros-and-cons-130h</link>
      <guid>https://dev.to/primalskill/software-outsourcing-types-pros-and-cons-130h</guid>
      <description>

&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://primalskill.blog/software-outsourcing-part-1-types-pros-and-cons"&gt;https://primalskill.blog/software-outsourcing-part-1-types-pros-and-cons&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;In 2004 I started working as a freelance software developer doing mostly outsourcing work for foreign clients. More than 17 years later I'm the founder of a software development company called &lt;a href="https://primalskill.com"&gt;Primal Skill&lt;/a&gt; with my partner having a dedicated team doing software outsourcing.&lt;/p&gt;

&lt;p&gt;Only now I just realized that I haven't addressed software outsourcing in a blog post, specifically what blockers our clients had when we first started working together.&lt;/p&gt;

&lt;p&gt;In this article, I will talk about what software outsourcing means, what types of outsourcing strategies are most common and what are the pros and cons of each.&lt;/p&gt;

&lt;p&gt;In part 2, I will dispel some of the myths and shed light on some of the truths of software development outsourcing I learned along the way.&lt;/p&gt;

&lt;p&gt;First, let's define what is software development outsourcing and let's look at the various forms of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Software Outsourcing?
&lt;/h2&gt;

&lt;p&gt;Simply put, software development outsourcing means the client delegates some or all software development processes to an outside party instead of keeping it in-house.&lt;/p&gt;

&lt;p&gt;It's up to the business to decide how much to keep in-house and how much, if not all, to outsource to various parties. A business can choose to outsource software development only, keeping design, maintenance, and system administration in-house.&lt;/p&gt;

&lt;p&gt;The primary purpose of outsourcing for most businesses is cutting down costs, which is somewhat a myth and we will see why is that later in part 2 of the article.&lt;/p&gt;

&lt;p&gt;Other reasons a business can choose to outsource are getting access to a larger and diversified pool of talent, scaling up the business, and/or covering other geographical locations.&lt;/p&gt;

&lt;p&gt;There are differences between outsourcing strategies mainly considering the outsourced work's location:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Off-shore outsourcing&lt;/strong&gt; means that the outsourced work is being executed in a different country, in a different time zone. For example, a US business outsources to a European company.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Near-shore outsourcing&lt;/strong&gt; means that outsourcing happens usually in a neighboring or close proximity country where the timezone is the same or a couple of hours different and the spoken language is usually the same. For example, a US business outsources work to Canada.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-shore outsourcing&lt;/strong&gt; is when the outsourced work remains within the borders of the country, timezone and language are the same as the clients. For example, a US business with HQ in Los Angeles outsources work to San Francisco or New York.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TmpqYMZN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5tw1esxuhk9lo2lxc52.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TmpqYMZN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5tw1esxuhk9lo2lxc52.png" alt="Off-shore, near-shore, on-shore" width="880" height="624"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Red: On-shore, yellow: near-shore, blue: off-shore&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Software Outsourcing
&lt;/h2&gt;

&lt;p&gt;There are countless ways of dissecting an outsourcing process by either the business or the development agency that does the outsourcing for the business.&lt;/p&gt;

&lt;p&gt;The most common are as follows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Outsourcing to Freelancers
&lt;/h3&gt;

&lt;p&gt;A business decides to outsource software development to one or more freelancers located in other countries and timezones. A freelancer is a sole developer who doesn't work for an agency nor has a team of experts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wdNOut5Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4h2g6dr4vkzhpq2134yi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wdNOut5Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4h2g6dr4vkzhpq2134yi.png" alt="Outsourcing to freelancers diagram" width="574" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This approach is the most cost-effective and easy to set up as there is a lot of supply of freelancers across the Globe.&lt;/p&gt;

&lt;p&gt;This strategy is beneficial if the client only wants part of his business outsourced, for example having one or more freelancers for developing the software and a couple of freelancers for maintaining the server architecture where the codebase will be hosted.&lt;/p&gt;

&lt;p&gt;A business can also employ a freelancer for highly specific work that needs to be developed and there are no in-house experts to tackle the problem.&lt;/p&gt;

&lt;p&gt;The downside of this strategy is that the client will have to manage the individual freelancers and play the part of the project manager or even an engineering lead which can be time-consuming.&lt;/p&gt;

&lt;p&gt;Many freelancers work with an hourly rate pricing model, and they are usually working on many different projects.&lt;/p&gt;

&lt;p&gt;If the outsourced work is not continuous hiring a freelancer can be the most optimal way of doing work, with a minimum dedicated hours agreement with the freelancer which the client can either fulfill or not.&lt;/p&gt;

&lt;p&gt;This pricing model is beneficial for both parties because the freelancer will have a continuous stream of revenue even if work is not filled out for that week or month, and also beneficial for the business that they can retain the same freelancer on a week-to-week or month-to-month basis.&lt;/p&gt;

&lt;h3&gt;
  
  
  Working With a Software Development Company
&lt;/h3&gt;

&lt;p&gt;This is the most popular form of doing software outsourcing and it is not limited to development. In this strategy the client contracts a software development agency, usually found in another part of the World, for developing and maintaining the software.&lt;/p&gt;

&lt;p&gt;How work is executed, is usually, dictated by the outsourcing company, which can decide to employ freelancers, set up a specific team of engineers, or even outsource the whole work to another company.&lt;/p&gt;

&lt;p&gt;What the outsourcing company can and can't do is stipulated in the contract and in non-disclosure agreements (NDAs) as well as national and international laws such as GDPR in Europe.&lt;/p&gt;

&lt;p&gt;Depending on how the work is set up, the outsourcing company can still decide to rotate individual team members in-house to better optimize their costs and the workflow without input from the client.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9g7YN6pE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5vk2ggdfl1haohsy2az.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9g7YN6pE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5vk2ggdfl1haohsy2az.png" alt="Outsourcing to a dev company diagram" width="880" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The client, in many cases, only communicates with a member from the outsourcing company, who in most cases is a project manager or an engineering team lead and is usually responsible for multiple projects that the outsourcing agency does.&lt;/p&gt;

&lt;p&gt;Depending on the outsourcing company services the processes a client can outsource can vary. Some outsourcing companies offer full-service solutions from project alignment to server maintenance while others only a limited but well-defined solutions.&lt;/p&gt;

&lt;p&gt;In some cases, the client hires managers who are more aligned with the business and report directly to the client and outsource the rest. &lt;/p&gt;

&lt;p&gt;Software development companies have flexible pricing models, ranging from hourly rates to fixed prices models.&lt;/p&gt;

&lt;p&gt;For smaller projects, a fixed price model is more beneficial as it can optimize the costs upfront for the entire project or forecast the costs for a project phase.&lt;/p&gt;

&lt;p&gt;For larger projects, an hourly rate pricing model is better because it's harder to estimate the whole project scope upfront therefore the client pays for the work that's finished.&lt;/p&gt;

&lt;h3&gt;
  
  
  Outsourcing to an Agency With a Dedicated Team
&lt;/h3&gt;

&lt;p&gt;This approach is similar to outsourcing to a development company, the only difference is that the client is guaranteed a dedicated team assembled for the duration of the project. &lt;/p&gt;

&lt;p&gt;This team is solely responsible for developing the client's project and their time is carved out and locked down for that single project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lBPpH00M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8auswenwylgbmr8rf16u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lBPpH00M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8auswenwylgbmr8rf16u.png" alt="Outsourcing to a dedicated team within a dev company diagram" width="880" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The outsourcing agency, in this case too, can decide to rotate team members in-house, or have a contractual agreement that locks down the individual team members for the project.&lt;/p&gt;

&lt;p&gt;The client can directly communicate with individual team members, or have a dedicated project manager and/or engineering team lead.&lt;/p&gt;

&lt;p&gt;Depending on which parts of the project the client is outsourcing, this strategy usually offers a turnkey solution for the software project, including development, maintenance, platform administration, and on-call support team. It makes sense to the business to outsource all of it.&lt;/p&gt;

&lt;p&gt;The pricing model is similar to other strategies, having an hourly rate for the scoped out project phases, both parties can optimize work being done on their ends.&lt;/p&gt;

&lt;p&gt;The time-to-market with a dedicated team is also logically faster since the project phases are decided upon by the team and team members are not pulled away on other projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Outsourcing Team for Hire
&lt;/h3&gt;

&lt;p&gt;This method got more popular in recent years, where a client outsources the bulk of the development to a dedicated outsourcing team but hires the managers and tech lead (C-level managers) directly and keeps these people in-house.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--USzjTT_o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pihhq1zmgd21veuqnt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--USzjTT_o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pihhq1zmgd21veuqnt3.png" alt="Team for hire diagram" width="607" height="685"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The client has a contract with the outsourcing company but retains and works with the team directly through the in-house managers. The development company essentially leases out the team or a couple of engineers to the client.&lt;/p&gt;

&lt;p&gt;In this scenario, the managers hired by the client and the outsourcing engineers form the project team. The engineers report to the managers and the managers to the client and the development company handles the rest such as offering a space for the engineers, handling administrative costs, and so on. The engineers are still employed by the development company.&lt;/p&gt;

&lt;p&gt;This strategy is beneficial for the client because the development team can handle the administrative costs, local taxes, and engineer salaries, while the development company has a constant revenue stream without the headache of managing the team.&lt;/p&gt;

&lt;p&gt;It makes sense for large projects to use this method where the client wants to get a closer grip on the outsourced development process.&lt;/p&gt;

&lt;p&gt;The pricing model can vary, the parties can set up an hourly rate paid directly to the development company, a fixed rate for a specific project phase, or a hybrid model for various outsourced departments, e.g. development having hourly rate, devops team having fixed price.&lt;/p&gt;

&lt;h3&gt;
  
  
  Having One or More Outsourced Teams Directly Hired by the Client
&lt;/h3&gt;

&lt;p&gt;This approach entails that the client directly hires a team in a different country to cut down on costs, have a larger pool of talent with experts who are not available in the clients' country.&lt;/p&gt;

&lt;p&gt;This team is not employed by an outsourcing company, but by the client directly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kFoJeiOV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0jiiku3yjv0vonds9zi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kFoJeiOV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0jiiku3yjv0vonds9zi.png" alt="Directly hired by client team diagram" width="824" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the most expensive solution out of all the outsourcing strategies above because the client needs to factor in administrative costs, local taxes as well as team costs, but this solution offers the greatest control and flexibility to the software project that's being outsourced.&lt;/p&gt;

&lt;p&gt;The dedicated team can also be located in different countries, in different time zones, and speaking different languages which makes the logistics of this strategy more complex.&lt;/p&gt;

&lt;p&gt;This strategy is usually chosen by a business that either wants to offer their software to a specific market at a specific geographic location and has a dedicated team at that location to offer support for the software or wants to scale up the business more rapidly by having access to a greater pool of engineers.&lt;/p&gt;

&lt;p&gt;The approach is optimized for large, complex projects with a development run-down measured in years, where continuous development is being done and released to the public.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decentralized Teams Hired by the Client
&lt;/h3&gt;

&lt;p&gt;This strategy is similar to hiring teams directly by the client one exception being that these teams are spread across the Globe while a single dedicated team (like the previous strategy above) is present in a single location be it off-shore or near-shore.&lt;/p&gt;

&lt;p&gt;These teams can be composed of a variety of people freelance designers, devops engineers, managers, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R2XNuek9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k0jrmbxp8ihhfu6cwkgo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R2XNuek9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k0jrmbxp8ihhfu6cwkgo.png" alt="Decentralized teams diagram" width="700" height="921"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This approach makes sense if the client has an ongoing, long-term project built directly for the end-users or there are multiple variations of the software (e.g. different versions for different locations) or support is necessary on location across the World.&lt;/p&gt;

&lt;p&gt;Managers can be located on-shore (e.g. C-level managers), while other teams in mixed off-shore, near-shore or on-shore locations.&lt;/p&gt;

&lt;p&gt;The various teams can and should communicate directly with other teams to streamline the whole development workflow.&lt;/p&gt;

&lt;p&gt;Some of the teams can even be a 3rd party outsourcing company offering development support or dedicated freelancers hired to do a specific task that needs comprehensive expertise in that field (e.g. AI experts or data scientists).&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Outsourcing Strategy Is More Optimal for Your Project?
&lt;/h2&gt;

&lt;p&gt;To find out which outsourcing strategy is most beneficial for your project or if outsourcing is good for the project at all, first, you need to create a profile on the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Are You Technologically Proficient?
&lt;/h3&gt;

&lt;p&gt;A software project is wildly different from other non-technical projects. You need to understand the various parts and phases of a software project.&lt;/p&gt;

&lt;p&gt;We had clients who were great business strategists and project managers but lacked technological literacy. They tried to develop their project with freelancers at first but failed then approached a software development company (Us), understood the different strategies employed in a software project, and could create a better strategy for their business.&lt;/p&gt;

&lt;p&gt;If you have a software project but lack a deep insight into the development process it's better to outsource the whole project to a development company that will also manage the project for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Size of the Project
&lt;/h3&gt;

&lt;p&gt;If you have a small project and can't guarantee continuous work for a team, then your best bet will be freelancers.&lt;/p&gt;

&lt;p&gt;If the project size will increase over time, it can be passed to a team at a development company that offers proper management for the project offloading this work from your shoulders.&lt;/p&gt;

&lt;p&gt;Having an already developed project it will be harder to pass the whole project to a development team. In this case, the best strategy is to either hire freelancers to expand the development team or hire a dedicated team that can be onboarded to the project by your tech leads.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Supported Costs
&lt;/h3&gt;

&lt;p&gt;Failing to optimize costs can make or break a software project. Not realizing the true cost of development can result in chaos making a project deadline unmanageable.&lt;/p&gt;

&lt;p&gt;Having a good team who can break down the project phases and estimate them with somewhat good accuracy is essential. Remember an estimate is not a guarantee, therefore supporting overrun project costs needs to also be factored in.&lt;/p&gt;

&lt;p&gt;Having a dedicated team employed by you comes with additional administrative costs and/or local taxes (e.g. opening a company in the country, hiring company administrators, hiring accountants, etc).&lt;/p&gt;

&lt;p&gt;To quickly scale up your business the best strategy is to either hire freelancers in the short- to mid-term or outsource directly to a development company that has the necessary capacity to do this.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Team Availability
&lt;/h3&gt;

&lt;p&gt;The nature of the software project will dictate the urgency of development for it. A project where a future event needs to be met such as a web app created for an online conference going live on a fixed date is different from a project that implements new features without a strictly fixed deadline.&lt;/p&gt;

&lt;p&gt;Outsourcing teams can run behind a client's time by hours, availability is also determined if a team is dedicated to a project or not. If a team works on multiple outsourcing projects they need to factor in development time for your project's tasks.&lt;/p&gt;

&lt;p&gt;These tasks are not implemented immediately, but days or weeks after scoping it out.&lt;/p&gt;

&lt;p&gt;If emergency work has to be done on the project, like a serious bug fix or responding to market demand quickly, a freelancer or even an outsourcing team is not usually available at the exact moment.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Support and Maintenance
&lt;/h3&gt;

&lt;p&gt;Every software project will need support and maintenance at some point, the question is at which stage of the project's life cycle. &lt;/p&gt;

&lt;p&gt;These tasks can be outsourced further to a separate dedicated team that can offer support for customers either on-site or through a support call center.&lt;/p&gt;

&lt;p&gt;Development maintenance is usually done by the team who develops the project, but the on-call support and disaster recovery can be outsourced to a separate team that can guarantee 24/7 availability.&lt;/p&gt;




&lt;p&gt;All these variables need to be factored in before you decide to outsource the software project.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hope you liked part 1 of this article. In part 2 I will tackle the myths and truths of software outsourcing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Stay tuned and if you liked this post, please share it and comment on it below.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>business</category>
      <category>learning</category>
      <category>management</category>
    </item>
    <item>
      <title>Do you read the license of an open-source package you're using?</title>
      <dc:creator>George</dc:creator>
      <pubDate>Wed, 12 Jan 2022 11:41:25 +0000</pubDate>
      <link>https://dev.to/primalskill/do-you-read-the-license-of-an-open-source-package-youre-using-7a4</link>
      <guid>https://dev.to/primalskill/do-you-read-the-license-of-an-open-source-package-youre-using-7a4</guid>
      <description>&lt;p&gt;Open-source doesn't necessarily mean it's free to use in all cases. Do you read licenses?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>3 Tales of Tricky Statistics</title>
      <dc:creator>George</dc:creator>
      <pubDate>Tue, 01 Jun 2021 14:05:35 +0000</pubDate>
      <link>https://dev.to/primalskill/3-tales-of-tricky-statistics-3dgp</link>
      <guid>https://dev.to/primalskill/3-tales-of-tricky-statistics-3dgp</guid>
      <description>&lt;p&gt;Statistics can often be misleading, here's an example. Take the number of billionaires in ten countries:&lt;/p&gt;

&lt;p&gt;💰 United States - 585&lt;br&gt;
💰 China - 476&lt;br&gt;
💰 India - 131&lt;br&gt;
💰 Germany - 114&lt;br&gt;
💰 Russia - 98&lt;br&gt;
💰 Hong Kong - 67&lt;br&gt;
💰 Canada - 64&lt;br&gt;
💰 United Kingdom - 54&lt;br&gt;
💰 Brazil - 43&lt;br&gt;
💰 Italy - 42&lt;/p&gt;

&lt;p&gt;From this list, we can safely say that the US is clearly leading here, or can we? This number is not showing reality because the underlying comparison, billionaires to nr. of people is different in each country.&lt;/p&gt;

&lt;p&gt;Normalizing the basis to compare to, let's say, per million people would be a much better metric because every country on the list above has at least a million citizens.&lt;/p&gt;

&lt;p&gt;The list below shows this:&lt;/p&gt;

&lt;p&gt;👉 Hong Kong ~8.93&lt;br&gt;
👉 Canada ~1.70&lt;br&gt;
👉 US ~1.6&lt;br&gt;
👉 Germany ~1.37&lt;br&gt;
👉 United Kingdom ~0.81&lt;br&gt;
👉 Italy ~0.69&lt;br&gt;
👉 Russia ~0.67&lt;br&gt;
👉 China ~0.3&lt;br&gt;
👉 Brazil ~0.19&lt;br&gt;
👉 India ~0.09&lt;/p&gt;

&lt;p&gt;This list shows a totally different picture. We compared two dimensions normalizing one to the other and calculated the average.&lt;/p&gt;



&lt;p&gt;Another case where averaging can be misleading is employee salaries and the national or company-wide average, which is not a very accurate metric simply because if we take five employees in a company with the following salaries: &lt;/p&gt;

&lt;p&gt;👶 Employee 1 - 5,000.00 USD / month&lt;br&gt;
👶 Employee 2 - 5,500.00 USD / month&lt;br&gt;
👶 Employee 3 - 6,000.00 USD / month&lt;br&gt;
👶 Employee 4 - 12,000.00 USD / month&lt;br&gt;
👶 Employee 5 - 14,000.00 USD / month&lt;/p&gt;

&lt;p&gt;On average we could say that an employee has 8,500.00 USD / month. Employee 1 wouldn't agree.&lt;/p&gt;

&lt;p&gt;A better metric would be the median salary, which is considered a more neutral measure and it's 6,000.00 USD / month.&lt;/p&gt;

&lt;p&gt;So, next time you interview for a job and the HR person says "Oh yeah, our employees get around X amount of USD per month" you should ask if it's on average or median? 😁&lt;/p&gt;



&lt;p&gt;A wonderfully elegant yet horrible metric is lines of code in a codebase. It's wonderful because it's straightforward, it's a number everybody can understand, one project has 100.000 LoC another project has 20.000 LoC, therefore, the former is bigger than the latter.&lt;/p&gt;

&lt;p&gt;Yet it's a horrible metric because managers often use it to measure developer productivity.&lt;/p&gt;

&lt;p&gt;Why is that? Well, a program can be written in an infinite amount of ways, one developer can write a function in 5 lines another can write it in 25 lines. Which is better?&lt;/p&gt;

&lt;p&gt;Also, the process of writing code differs from let's say writing this blog post. A developer can write 1000 lines of code, deleting 300, and modifying the rest to be under 500 LoC.&lt;/p&gt;

&lt;p&gt;Or, one project can adhere to one type of coding style another to a different one, for example, the same exact code can be written in four different ways:&lt;/p&gt;

&lt;p&gt;Ten lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using lines of code as a blanket statistic to measure productivity is horrible but if a manager uses this metric, by logic, the developer who wrote it in ten lines is the most productive.&lt;/p&gt;

&lt;p&gt;Developer productivity is a really complex metric, there's no single truth, but we can employ a variety of other strategies such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The number of bugs QA caught after a feature was implemented.&lt;/li&gt;
&lt;li&gt;Effort of feature vs. time of development.&lt;/li&gt;
&lt;li&gt;Time and effort of peer reviews.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the end, WTF/minute is a better metric than LoC. 🙃&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PQ18LXRi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqbehnv8h17gy1dr79tv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PQ18LXRi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqbehnv8h17gy1dr79tv.jpeg" alt="WTFs/minute"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Cover photo by &lt;a href="https://twitter.com/charlesdeluvio"&gt;charlesdeluvio&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://primalskill.blog/3-tales-of-tricky-statistics"&gt;https://primalskill.blog/3-tales-of-tricky-statistics&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Please comment and consider sharing this article; and if you have any questions you can contact me here in the comments or on &lt;a href="https://twitter.com/feketegy"&gt;Twitter&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>software</category>
      <category>statistics</category>
      <category>analytics</category>
    </item>
    <item>
      <title>How to Keep Up to Date with Web Development</title>
      <dc:creator>George</dc:creator>
      <pubDate>Tue, 12 Jan 2021 10:38:21 +0000</pubDate>
      <link>https://dev.to/primalskill/how-to-keep-up-to-date-with-web-development-495n</link>
      <guid>https://dev.to/primalskill/how-to-keep-up-to-date-with-web-development-495n</guid>
      <description>

&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://primalskill.blog/how-to-keep-up-to-date-with-web-development"&gt;https://primalskill.blog/how-to-keep-up-to-date-with-web-development&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Approaching this behemoth of an industry called web development can be overwhelming at times, everybody had that feeling of missing out on web development, especially the chaos that's happening in the &lt;em&gt;front-end world&lt;/em&gt;...&lt;/p&gt;

&lt;p&gt;...But just like any other problem, you break it down into smaller pieces. Think of the areas in web development you're lacking knowledge, then look for resources to fill that gap.&lt;/p&gt;

&lt;p&gt;You also need to &lt;em&gt;practice learning&lt;/em&gt; to be more proficient in it. Have a really good understanding of the basic programming principles first, that drive web development.&lt;/p&gt;

&lt;p&gt;Focus on the fundamentals if you think you're lacking knowledge in that area, then build on top of that the new techniques and strategies that interest you.&lt;/p&gt;

&lt;p&gt;There's too much noise on the Internet as it is, especially in tech, you need to focus on &lt;em&gt;extracting the signal&lt;/em&gt; from the noise. By focusing on the programming principles you're building on top of a solid foundation because programming principles rarely change, it gets re-invented. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Object-oriented_programming"&gt;OOP&lt;/a&gt; is not new, &lt;a href="https://en.wikipedia.org/wiki/Functional_programming"&gt;functional programming&lt;/a&gt; isn't either, &lt;a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"&gt;MVC&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself"&gt;DRY&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/KISS_principle"&gt;KISS&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Single-responsibility_principle"&gt;SRP&lt;/a&gt; were all invented in the 70s and 80s.&lt;/p&gt;

&lt;p&gt;With experience, you'll realize that a solid foundation is key, and the major difference between most web development programming languages is just the syntax only.&lt;/p&gt;

&lt;p&gt;You’ll need to have a very narrow set of problems that only a specific programming language can solve, in other cases it truly is just a matter of preference, community adoption and the available resources you have on hand.&lt;/p&gt;

&lt;p&gt;If you want to know more about good programming principles, check out my blog post on the &lt;a href="https://primalskill.blog/10-books-every-programmer-should-read"&gt;10 books every programmer should read&lt;/a&gt; where I cover books presenting these programming principles.&lt;/p&gt;

&lt;p&gt;The bottom line is you need to love web development, love programming, then learning will be easy, but if you're a &lt;em&gt;9 to 5&lt;/em&gt; programmer, not really interested in software, then you're going to have a hard time leveling up to be a better programmer.&lt;/p&gt;

&lt;p&gt;This doesn’t mean that you shouldn’t have a life outside work, on the contrary, work-life balance is really important.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You need to invest time and energy every week to learn something new.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Old is New Again
&lt;/h2&gt;

&lt;p&gt;There's no such thing as the wrong approach in web development, it's more like the wrong solution to that set of problems you're trying to solve, and showing off your new programming techniques is usually the wrong solution for the problem. 😃&lt;/p&gt;

&lt;p&gt;It's perfectly okay &lt;strong&gt;NOT&lt;/strong&gt; to use the latest and greatest packages, modules, or techniques in your codebase, changing it out every day because something newer and shinier was released is almost always the wrong approach.&lt;/p&gt;

&lt;p&gt;It's a much better strategy to use tried and battle-tested code instead, especially because of the dynamic nature of software development.&lt;/p&gt;

&lt;p&gt;It's also a fallacy that not using the newest programming language or the latest framework you'll be doing a disservice to your project. You can solve 99% of the problems with any programming language. &lt;/p&gt;

&lt;h2&gt;
  
  
  Cut out 90% of the news
&lt;/h2&gt;

&lt;p&gt;Get off social media, stop procrastinating, and cut out any distractions while you're working. Practice async, passive information gathering, meaning, not to jump on a new video, blog, or podcast instantly, instead save it for later and keep a schedule for learning new things.&lt;/p&gt;

&lt;p&gt;You can organize your streams and feed with a note-taking app, and keep a &lt;em&gt;log&lt;/em&gt; of what you've learned on a weekly basis.&lt;/p&gt;

&lt;p&gt;You can use apps like &lt;a href="https://feedly.com/"&gt;Feedly&lt;/a&gt;, created for this purpose, to filter the information overload you're being bombarded with daily. They even use an AI assistant that will learn from your habits and will filter out news for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start your own blog
&lt;/h2&gt;

&lt;p&gt;If you want to really get neck-deep in a subject you want to learn, I think, the best way to do it is to write about it. You'll be &lt;em&gt;forced&lt;/em&gt; to research the topic in-depth filling the gaps in your knowledge in the process.&lt;/p&gt;

&lt;p&gt;Starting a blog is not complicated anymore, with services like &lt;a href="https://hashnode.com/"&gt;Hashnode&lt;/a&gt; or &lt;a href="https://dev.to/"&gt;DEV&lt;/a&gt; it's 5 minutes to create your own blog and start writing.&lt;/p&gt;

&lt;p&gt;The benefit of creating a blog on such services is that you will also get a huge audience from the get-go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other Tips
&lt;/h2&gt;

&lt;p&gt;*&lt;em&gt;Read source code: *&lt;/em&gt; most beginner developers I've met just don't read other developers source code at all. Why? Reading source code should be thought in schools 😁, it's one of the most fundamental things you should do if you're in software development.&lt;/p&gt;

&lt;p&gt;Ask yourself this: Do you know what's inside &lt;code&gt;node_modules&lt;/code&gt;? Do you know what code a module or package contains? &lt;/p&gt;

&lt;p&gt;You can learn awesome techniques, simply by, reading other developer's code, and more importantly, you can &lt;strong&gt;vet&lt;/strong&gt; that code for security exploits, maybe even fix it and create PRs, it's a win-win.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Share and discuss:&lt;/strong&gt; news, tutorials, and techniques with your friends in tech or your co-workers. It's very important to get feedback on your ideas, programming techniques, and the like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get active on forums:&lt;/strong&gt; it may be counterintuitive, and I personally, don't like to follow a bunch of people on social media, because it usually adds noise to my daily work, but by following a narrow set of topics on Reddit or Twitter can be okay.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get familiar with Github:&lt;/strong&gt; look at what's &lt;a href="https://github.com/trending"&gt;trending on the website&lt;/a&gt;, watch releases for repositories you're interested in, or popular repos, just to stay up to date on what direction the industry is pulling right now.&lt;/p&gt;

&lt;p&gt;You can also follow &lt;a href="https://github.com/topics"&gt;topics&lt;/a&gt; which gives you an overview of repository and user activities related to that topic, such as &lt;a href="https://github.com/topics/data-structures"&gt;data structures&lt;/a&gt; or &lt;a href="https://github.com/topics/docker"&gt;Docker&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;It's important to &lt;em&gt;learn how to learn&lt;/em&gt; new things, but also to find the &lt;em&gt;signal in the noise&lt;/em&gt;. Here are a couple of resources, that you could use to stay up-to-date with the new info.&lt;/p&gt;

&lt;h3&gt;
  
  
  Blogs
&lt;/h3&gt;

&lt;p&gt;Find information hubs on the topics you're interested in. Blogs are a great resource for that, subscribe to influential authors' feed, remember RSS? Google tried to kill it, but it's coming back! 😊&lt;/p&gt;

&lt;p&gt;Follow tech information &lt;em&gt;hubs&lt;/em&gt;, but be vary, the content on these websites can be overwhelming and of lower quality unless it’s a curated feed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://hashnode.com/"&gt;Hashnode&lt;/a&gt; - is a good place to find articles organized by topics (e.g. tags), just follow a couple of tags that you're interested in.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/"&gt;Dev.to&lt;/a&gt; - same as Hashnode, subscribe to topics of interest and you'll get a timeline with posts from those topics.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://daily.dev/"&gt;Daily.dev&lt;/a&gt; - a website where you'll get daily curated programming news.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://hackernoon.com/"&gt;Hackernoon&lt;/a&gt; - another curated news website including everything tech and software.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dzone.com/"&gt;DZone&lt;/a&gt; - a massive news website giving you the highlights and trends in tech.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.linkedin.com/"&gt;LinkedIn&lt;/a&gt; - as surprising as it sounds, there is a lot of really good content on the website. You can join tech groups or follow hashtags. It evolved a lot in recent years.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Newsletters
&lt;/h3&gt;

&lt;p&gt;Newsletters are an awesome way to get tech-related content that's curated by other developers. Getting a weekly e-mail overview on web development is almost guaranteed that it keeps you in the loop.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://javascriptweekly.com/"&gt;JavaScript Weekly&lt;/a&gt; - a newsletter of JavaScript articles, news and cool projects.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.tldrnewsletter.com/"&gt;TLDR&lt;/a&gt; - byte sized news for busy techies.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ponyfoo.com/weekly"&gt;Pony Foo Weekly&lt;/a&gt; - really good, curated, weekly news on web development.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://frontendfoc.us/"&gt;Frontend Focus&lt;/a&gt; - a once-weekly roundup of the best front-end news, articles, and tutorials. HTML, CSS, WebGL, Canvas, browser tech, and more.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://react.statuscode.com/"&gt;React Status&lt;/a&gt; - a weekly roundup of the latest React and React Native links and tutorials.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://changelog.com/weekly"&gt;Changelog Weekly&lt;/a&gt; - an editorialized take on this week in open source and software development.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Podcasts
&lt;/h3&gt;

&lt;p&gt;Podcasts are a great resource where experts give their opinion on web development, it's great if you can listen to it in the background while you're working. If you like podcasts you can subscribe to these ones:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://syntax.fm/"&gt;Syntax FM&lt;/a&gt; - specifically created for web developers.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://stackoverflow.blog/podcast/"&gt;Stack Overflow Podcast&lt;/a&gt; - gives you the news in tech right now.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://changelog.com/podcasts"&gt;Changelog Podcasts&lt;/a&gt; - a collection of podcasts on various tech topics, such as JavaScript, Startups, AI, Go, Brain Science.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.codepen.io/radio/"&gt;Codepen Radio&lt;/a&gt; - did you knew Codepen has a podcast? 😊&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://fullstackradio.com/"&gt;Full Stack Radio&lt;/a&gt; - a podcast for web developers interested in creating great software.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://frontendhappyhour.com/"&gt;Front End Happy Hour&lt;/a&gt; - thoughtful discussions on front-end web development.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://shoptalkshow.com/"&gt;ShopTalk Show&lt;/a&gt; - web design and development-related discussions.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://devmode.fm/"&gt;Devmode.fm&lt;/a&gt; - podcast dedicated to modern web development.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  YouTube
&lt;/h3&gt;

&lt;p&gt;If you want to watch videos instead of reading or listening to podcasts, check out these channels on YouTube. I like to subscribe to smaller upcoming channels, I find that they give more hands-on information than the bigger channels, can't relate to devs working at companies with thousands of co-workers, they have a very specific set of problems they're solving.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/channel/UCFbNIlppjAuEX4znoulh0Cw"&gt;Web Dev Simplified&lt;/a&gt; - quality videos on web development, mostly front-end JavaScript, React, and more.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/channel/UClb90NQQcskPUGDIXsQEz5Q"&gt;Dev Ed&lt;/a&gt; - fun videos on web development, design, tools, etc.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/user/jherr2006/featured"&gt;Jack Herrington&lt;/a&gt; - full-stack web development videos.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/channel/UCsBjURrPoezykLs9EqgamOA"&gt;Fireship&lt;/a&gt; - coding tutorials related to web development.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/user/TechGuyWeb"&gt;Traversy Media&lt;/a&gt; - programming tutorial videos.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/c/learncodeacademy/featured"&gt;LearnCode.academy&lt;/a&gt; - 100% free web development tutorials, web site design tutorials and more.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/c/RealToughCandy/featured"&gt;RealThoughCandy&lt;/a&gt; - Real-world, hands-on web development tutorials, tips &amp;amp; tricks.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/channel/UCDCHcqyeQgJ-jVSd6VJkbCw"&gt;codeSTACKr&lt;/a&gt; - web development tutorials in HTML, CSS, JavaScript, Python, and PHP.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/user/Computerphile/featured"&gt;Computerphile&lt;/a&gt; - videos on all things related to computers.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw"&gt;Google Developers&lt;/a&gt; - up to date news on Chrome and software development at Google.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Educational Websites
&lt;/h3&gt;

&lt;p&gt;Educational websites are also a great way to level up on web development. You can look at the trending or &lt;em&gt;what's hot&lt;/em&gt; sections on these websites to get the best courses on the topics you're interested in.&lt;/p&gt;

&lt;p&gt;Even though these services are not free, it's worth the investment, because you'll get a reviewed, well-thought-out video course covering the topic from A to Z.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://udemy.com/"&gt;Udemy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.coursera.org/"&gt;Coursera&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.codecademy.com/"&gt;Codecademy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.khanacademy.org/"&gt;Khan Academy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.skillshare.com/"&gt;SkillShare&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Books
&lt;/h3&gt;

&lt;p&gt;Books can offer great value if you want to either learn new web development techniques or just simply staying up to date with the industry.&lt;/p&gt;

&lt;p&gt;Look for best sellers on Amazon or Goodreads, and check out my blog post on the &lt;a href="https://primalskill.blog/10-books-every-programmer-should-read"&gt;10 books every programmer should read&lt;/a&gt;. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Best-Sellers-Books-Web-Development-Design/zgbs/books/3510/ref=zg_bs_nav_b_2_5"&gt;Amazon Best Sellers on Web Development &amp;amp; Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/Best-Sellers-Books-Computers-Technology/zgbs/books/5/ref=zg_bs_nav_b_1_b"&gt;Amazon Best Sellers on Computer &amp;amp; Technology&lt;/a&gt; - root category for best sellers related to computer and technology in general.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/shelf/show/web-development"&gt;Goodreads Web Development Books&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.goodreads.com/list/tag/web-development"&gt;Goodreads Web Development Lists&lt;/a&gt; - lists put together by other software engineers.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Remember, fight the urge of &lt;a href="https://en.wikipedia.org/wiki/Fear_of_missing_out"&gt;FOMO&lt;/a&gt;!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Also, please &lt;strong&gt;comment and consider sharing this article&lt;/strong&gt;; and if you have any questions you can contact me here in the comments or on &lt;a href="https://twitter.com/feketegy"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>architecture</category>
      <category>development</category>
      <category>software</category>
    </item>
    <item>
      <title>10 Books Every Programmer Should Read</title>
      <dc:creator>George</dc:creator>
      <pubDate>Fri, 08 Jan 2021 13:01:35 +0000</pubDate>
      <link>https://dev.to/primalskill/how-to-create-flexible-javascript-apis-with-functional-options-62m</link>
      <guid>https://dev.to/primalskill/how-to-create-flexible-javascript-apis-with-functional-options-62m</guid>
      <description>

&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://primalskill.blog/10-books-every-programmer-should-read"&gt;https://primalskill.blog/10-books-every-programmer-should-read&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Due to the dynamic nature of software development, we as programmers can be sometimes overwhelmed by the sheer amount of information we're being bombarded with on a daily basis.&lt;/p&gt;

&lt;p&gt;Even though we can take programming to a multitude of avenues there still are some &lt;em&gt;"general truths"&lt;/em&gt; in programming that every developer should learn and practice.&lt;/p&gt;

&lt;p&gt;The following list of books covers a wide range of areas in programming (and not just) that, practiced, can be implemented in a multitude of programming languages.&lt;/p&gt;

&lt;h3&gt;
  
  
  0. Mythical Man-Month: Essays on Software Engineering
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--znZ_SfrF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ygqr8pcoq4skh3x1dbkk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--znZ_SfrF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ygqr8pcoq4skh3x1dbkk.jpg" alt="Mythical Man-Month Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Frederick P. Brooks Jr.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3hPsAlq"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a timeless classic on the software development management process. It is a must-read, not just for programmers, but all the people working in this industry, including clients.&lt;/p&gt;

&lt;p&gt;This book shattered the myth of putting more people on a project will be finished more quickly. It is absolutely false, you simply can't finish a project more quickly by simply using more developers, in fact, the opposite will be true.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Pragmatic Programmer: Your Journey to Mastery
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--95CgmX56--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ui9ntn5x78rmb51pt5kx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--95CgmX56--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ui9ntn5x78rmb51pt5kx.jpg" alt="The Pragmatic Programmer Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Authors: Andrew Hunt, David Thomas&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3s9BcIi"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This book should be on the shelf of every beginner software developer, even though most of the ideas presented in the book are sort of &lt;em&gt;"common sense"&lt;/em&gt; for most programmers, it still helps to reiterate these ideas.&lt;/p&gt;

&lt;p&gt;It's one of the best non-technical software development books, it presents ideas such as taking ownership of our code, fighting code rot, applying the "broken window" theory to software, and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Art of Computer Programming
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DZewAf3N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gg2khgzaly7pqdvs30gt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DZewAf3N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gg2khgzaly7pqdvs30gt.jpg" alt="The Art of Computer Programming Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Donald Knuth&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3rW42f0"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another classic, and possibly the most influential book in computer science. Donald Knuth truly raises software development to an art form.&lt;/p&gt;

&lt;p&gt;The Art of Computer Programming is a collection of books covering everything a developer should know about computer programming, starting from how math applies to computers, algorithms, floating-point calculations, data structures, and much much more.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Algorithms
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yWxLtNDX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a46atzqifyil9iegvktn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yWxLtNDX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a46atzqifyil9iegvktn.jpg" alt="Algorithms Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Jeff Erickson&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3nqAwe4"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just like blood running through our veins, algorithms are the lifeblood of computer programs.&lt;/p&gt;

&lt;p&gt;The author presents this complex topic in a clear and simple manner, it covers techniques most other books on the same topic ignore. If you want to master this field, going back to basics is sometimes necessary.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Seven Languages in Seven Weeks: A Pragmatic Guide to Learning Programming Languages
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h2Kq7zNK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/blmllw0fy8i8nxwp9q2d.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2Kq7zNK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/blmllw0fy8i8nxwp9q2d.jpg" alt="Seven Languages in Seven Weeks Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Bruce Tate&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3s0LJ8j"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Pragmatic Programmer book above in the list recommends learning a new programming language every year, to be truly dedicated to the craft. The author of this book demonstrates as the title suggests, seven programming languages in seven weeks.&lt;/p&gt;

&lt;p&gt;It achieves to broaden the reader's perspective of programming by striking correlations between the different programming languages, showing the reader the pros and cons of each.&lt;/p&gt;

&lt;p&gt;The languages presented in this book are Clojure, Haskell, Io, Prolog, Scala, Erlang, and Ruby.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Refactoring: Improving the Design of Existing Code, 2nd Edition
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TVokC53W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qe4s8ithr6uvocpo5xna.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TVokC53W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qe4s8ithr6uvocpo5xna.jpg" alt="Refactoring Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Martin Fowler&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/2LreEBE"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Business expectations and project features sometimes change, dependencies are always being updated, and inevitably code rot happens.&lt;/p&gt;

&lt;p&gt;Refactoring code should be part of every development process, it's inevitable after a while and that's just the reality of programming. The author shows us clear strategies we can take on our codebase, presents the principles of refactoring, how to recognize code smells, and much more. &lt;/p&gt;

&lt;h3&gt;
  
  
  6. Code Complete: A Practical Handbook of Software Construction, 2nd Edition
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z8o9uHci--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/br8ljbo42sojb6zsi8a0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z8o9uHci--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/br8ljbo42sojb6zsi8a0.jpg" alt="Code Complete Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Steve McConnell&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3rZwhJO"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Talking about code smells, this book takes it to another level. You can find every type of bad practice and &lt;em&gt;"what not to do"&lt;/em&gt; in this book, and more importantly &lt;em&gt;"how to do it right"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This book focuses on the process of software construction and everything relating to it like software architecture and design decisions, debugging, testing, code smells, and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Clean Code: A Handbook of Agile Software Craftsmanship
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uv-4vezn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/opqbug6cv7slww4hlyy9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uv-4vezn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/opqbug6cv7slww4hlyy9.jpg" alt="Clean Code Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Robert C. Martin&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3pVpIpW"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This book is widely popular in the software developer community, and it's for a good reason. The author, also known as Uncle Bob, shows us that the practice of writing code is a very complicated process.&lt;/p&gt;

&lt;p&gt;Writing good code is truly an art, this book presents clear and concise strategies a programmer should take to &lt;em&gt;"get to the next level"&lt;/em&gt;, methods such as, how good OOP principles look like in action, classes are not just containers for procedural code, there's a reason behind every design pattern, and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Domain-Driven Design: Tackling Complexity in the Heart of Software
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mmy-XOSd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6s4hxysykhp4gnp7eh4u.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mmy-XOSd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6s4hxysykhp4gnp7eh4u.jpg" alt="Domain-Driven Design Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Eric Evans&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3rYzRnt"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to take the practice of designing good software to a whole other level, this book is for you.&lt;/p&gt;

&lt;p&gt;The author focuses on the topic of domain modeling, how to actually implement those models, normalizing the domain across all parts of the project, having a clear cut line between various entities, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Why We Sleep: Unlocking the Power of Sleep and Dreams
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--agIXtwM1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2lmavjrzxznuec2tb25m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--agIXtwM1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2lmavjrzxznuec2tb25m.jpg" alt="Why We Sleep Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Matthew Walker, PhD&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3950kqW"&gt;Get it here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to do a favor for your personal health then read this book. It's one of the more eye-opening books you can read and it's worth every second of your time.&lt;/p&gt;

&lt;p&gt;This book manages to change the general idea of living a healthy life. In the past, the priority was diet, exercise, and sleep. Today this order changed to diet, sleep, exercise, thanks to this book.&lt;/p&gt;

&lt;p&gt;We, as humans, not just programmers, should put our health as the number one priority.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bonus: The Phoenix Project
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KMdUHLOe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hvqjbiih1cvutxjl26mg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KMdUHLOe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hvqjbiih1cvutxjl26mg.jpg" alt="The Phoenix Project Cover"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Author: Gene Kim&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3q2GpQj"&gt;Get it here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An entertaining read on the concepts, the struggles, and the problems of DevOps. The characters in the book are fictionalized, but their doings are oh so real for system administrators living it on a daily basis.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>architecture</category>
      <category>development</category>
      <category>software</category>
    </item>
    <item>
      <title>How to Create Flexible JavaScript APIs with Functional Options</title>
      <dc:creator>George</dc:creator>
      <pubDate>Mon, 04 Jan 2021 12:22:37 +0000</pubDate>
      <link>https://dev.to/primalskill/how-to-create-flexible-javascript-apis-with-functional-options-2pec</link>
      <guid>https://dev.to/primalskill/how-to-create-flexible-javascript-apis-with-functional-options-2pec</guid>
      <description>

&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://primalskill.blog/how-to-create-flexible-javascript-apis-with-functional-options"&gt;https://primalskill.blog/how-to-create-flexible-javascript-apis-with-functional-options&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The methods presented in this article were popularized by Dave Cheney, Rob Pike, and Márk Sági-Kazár. This article presents how to adapt these methods to JavaScript.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Functional Options is a term used in the Go developer community and was created to explicitly describe and set an API's configuration options.&lt;/p&gt;

&lt;p&gt;Go is a statically typed programming language, while pure JavaScript is not, therefore not every functional options method can be converted to JavaScript, nonetheless, it still offers a good way of defining an application API configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Traditional way of passing arguments
&lt;/h2&gt;

&lt;p&gt;Let's look at the "traditional" way of setting up default configuration options for a method. Say we develop a conference meet application and we have the following function for creating a new meet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;startDateTime&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;startDateTime&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We initialize the function above like so.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Meeting&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From a developer perspective, it's not really obvious what arguments the function expects without looking at the function's signature. Also, this is a trivial example, but if the function has complex initialization arguments, not just JavaScript primitives, it falls short very quickly.&lt;/p&gt;

&lt;p&gt;Not to mention that it makes our function inflexible for modification, adding a new argument would mean we need to modify all the &lt;code&gt;CreateMeet()&lt;/code&gt; function calls in our code, or worse, we easily introduce backward-incompatible changes in our JavaScript module.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing an object literal
&lt;/h2&gt;

&lt;p&gt;Thinking about the problem differently, we could modify the function signature and use an &lt;code&gt;options&lt;/code&gt; object literal to pass our options to the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;startDateTime&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This fails horribly because if we pass an object other than what &lt;code&gt;CreateMeet&lt;/code&gt; expects or if we’re not passing anything at all. Without proper validation, executing the function will throw an error. &lt;/p&gt;

&lt;p&gt;One fix we could do is to define some sensible defaults and merge our &lt;code&gt;options&lt;/code&gt; with the default options.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;defaultOptions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;No Name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;startDateTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;defaultOptions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again, without validating &lt;code&gt;options&lt;/code&gt; we could merge a totally unrelated object literal with &lt;code&gt;defaultOptions&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Nonetheless, it is a good way of making sure the passed &lt;code&gt;options&lt;/code&gt; argument contains all the properties that the function might need and &lt;strong&gt;this solution is enough most of the time&lt;/strong&gt;, but it's not the &lt;code&gt;CreateMeet&lt;/code&gt; function's job to make sure the options are correct.&lt;/p&gt;

&lt;p&gt;Another problem with the solution above is that it's not very reusable in a complex application, where the options are maybe defined in other parts of the code, consider how we would execute this function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;My Meet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;startDateTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2021&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This type of configuration initialization falls short if we have many configuration options that our function does not necessarily care about, and if we want to validate for correct values too; or if we want to define required options.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing in variables and object literals
&lt;/h2&gt;

&lt;p&gt;One could argue we could write something like this where the &lt;code&gt;name&lt;/code&gt; is explicitly defined...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...but then we circled back to our original problem where every function argument was explicitly defined making it inflexible for future modifications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing in variadic variables
&lt;/h2&gt;

&lt;p&gt;An alternative solution we could implement is using variadic function arguments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this approach, &lt;code&gt;...options&lt;/code&gt; becomes an array of JavaScript primitive types, but we would still need to validate each individual option item in the array to make sure the correct option is passed to our function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing in variadic functions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Variadic function arguments to the rescue!&lt;/strong&gt; In this solution we could just pass in functions for &lt;code&gt;...options&lt;/code&gt; and to make sure that we only accept functions as arguments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;opt&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the function above if the &lt;code&gt;...options&lt;/code&gt; item is not of type function it will continue to iterate to the next item. &lt;/p&gt;

&lt;p&gt;Okay, but what's the purpose of this? Well, we could pass in our specific options literal to the option functions that are passed as arguments which in turn validate and modify our options literal, and removing this concern from our &lt;code&gt;CreateMeet&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;Consider the following option function that would be passed to &lt;code&gt;CreateMeet&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what's happening here? The &lt;code&gt;Name&lt;/code&gt; is an "option function" which, in turn, returns a function accepting our options literal from &lt;code&gt;CreateMeet&lt;/code&gt;. Let's modify &lt;code&gt;CreateMeet&lt;/code&gt; to understand it more clearly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;startDateTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;opt&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Executing &lt;code&gt;CreateMeet&lt;/code&gt; would look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;My Meet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Passing in &lt;code&gt;Name&lt;/code&gt; as an argument, which, remember, returns a function, and this returned function from &lt;code&gt;Name&lt;/code&gt; would be executed in &lt;code&gt;CreateMeet&lt;/code&gt; with &lt;code&gt;opt(config)&lt;/code&gt; where &lt;code&gt;config&lt;/code&gt; is our configuration object literal that we actually care about.&lt;/p&gt;

&lt;p&gt;Let's define a &lt;code&gt;startDateTime&lt;/code&gt; function option to better understand this method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;StartDateTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;minute&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// We don't care about defining seconds and milliseconds so we pass 0 to new Date()&lt;/span&gt;
    &lt;span class="c1"&gt;// In JS month starts at 0, but we would like to define 1 - 12 (January through December), this is why we subtract 1.&lt;/span&gt;
    &lt;span class="c1"&gt;// Also, proper validation is in order, this is just a simple example&lt;/span&gt;
    &lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;startDateTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;minute&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Passing in these function arguments to &lt;code&gt;CreateMeet&lt;/code&gt; would look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;My Meet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;StartDateTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2021&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes our function much more readable to other developers, we instantly know that &lt;code&gt;CreateMeet&lt;/code&gt; is executed by defining a &lt;code&gt;Name&lt;/code&gt; and &lt;code&gt;StartDateTime&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Furthermore, we could extract the initialization of the options altogether from &lt;code&gt;CreateMeet&lt;/code&gt; into a separate function such as this, which not necessarily need to be exported.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;setupConfig&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;startDateTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;opt&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, &lt;code&gt;CreateMeet&lt;/code&gt; would only execute code that it cares about.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;setupConfig&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;// do something with config&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Extending CreateMeet
&lt;/h2&gt;

&lt;p&gt;Extending our &lt;code&gt;CreateMeet&lt;/code&gt; function becomes trivial with this approach.&lt;/p&gt;

&lt;p&gt;Let's say we want to add another option to our function, but still want to ensure backward compatibility. We want to add the option of allowing only specific users, from a list, in the meet, thus executing &lt;code&gt;CreateMeet&lt;/code&gt; will handle this scenario correctly.&lt;/p&gt;

&lt;p&gt;Our &lt;code&gt;AllowedUsers&lt;/code&gt; function option could look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;AllowedUsers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userList&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;allowedUsers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userList&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Passing in this new option function is as easy as adding a new argument to &lt;code&gt;CreateMeet&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;My&lt;/span&gt; &lt;span class="nx"&gt;Meet&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;StartDateTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2021&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;AllowedUsers&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;john&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;jane&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep in mind that the public API of our function hasn't changed, the previous examples work the same way with or without &lt;code&gt;AllowedUsers&lt;/code&gt; being passed to &lt;code&gt;CreateMeet&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We can go as far as to add different methods to manipulate the same option, in this example, &lt;code&gt;AllowedUsers&lt;/code&gt; only accepts a user list and then overwrites the configuration with that list.&lt;/p&gt;

&lt;p&gt;Let's say, down the road, in a future version of our application, we'll want to add a function that accepts a single user name only. In this case, we could write a new function like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;AllowedUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;allowedUsers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Executing &lt;code&gt;CreateMeet&lt;/code&gt; works as expected, end users can use either &lt;code&gt;AllowedUsers&lt;/code&gt; &lt;em&gt;(plural)&lt;/em&gt; to pass in a user list or &lt;code&gt;AllowedUser&lt;/code&gt; &lt;em&gt;(singular)&lt;/em&gt; to append a user name to an existing list.&lt;/p&gt;

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

&lt;p&gt;We, as developers, should be very aware of how the public-facing API of our code is being consumed by other users.&lt;/p&gt;

&lt;p&gt;This technique helps to keep this API flexible enough for future modifications and it's just another technique in the arsenal of a developer.&lt;/p&gt;

&lt;p&gt;Should you use it every time? Probably not, in most cases passing a configuration object literal is enough, but if you have complex configuration setups, want greater flexibility, and also extracting the configuration setup from functions that don't care about it, then this approach is a good fit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I hope you enjoyed this article, please comment and consider sharing it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have any questions you can contact me here in the comments or on &lt;a href="https://twitter.com/feketegy"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Below you'll find the full example presented in this article as well as a Codepen demo.&lt;/p&gt;




&lt;h3&gt;
  
  
  Full Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;StartDateTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;minute&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;startDateTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;minute&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;AllowedUsers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userList&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;allowedUsers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userList&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;AllowedUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;allowedUsers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;setupConfig&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;startDateTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;allowedUsers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;opt&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;opt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;setupConfig&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;// do something with config&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;My Meet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;StartDateTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2021&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Private Meet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;StartDateTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;AllowedUsers&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;john&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;jane&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;CreateMeet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;One-on-one Meet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;StartDateTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2021&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;AllowedUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;kevin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Codepen Example
&lt;/h3&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/feketegy/embed/BaLrLBZ?height=600&amp;amp;default-tab=js,console&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>node</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Mistakes Were Made [Part 2]</title>
      <dc:creator>George</dc:creator>
      <pubDate>Sat, 02 Jan 2021 09:34:42 +0000</pubDate>
      <link>https://dev.to/primalskill/mistakes-were-made-part-2-43d4</link>
      <guid>https://dev.to/primalskill/mistakes-were-made-part-2-43d4</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy7t24hgtef8whl2mvcye.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy7t24hgtef8whl2mvcye.jpg" alt="This is fine meme"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://primalskill.blog/mistakes-were-made-part-2" rel="noopener noreferrer"&gt;primalskill.blog/mistakes-were-made-part-2&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;If you haven't read the &lt;a href="https://dev.to/primalskill/mistakes-were-made-part-1-350b"&gt;first part of this article&lt;/a&gt; please open it in a new tab and read that first.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://dev.to/primalskill/mistakes-were-made-part-1-350b"&gt;Mistakes Were Made [Part 1]&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Continuing with the second part of this article series, let's look at what mistakes to avoid on the application level.&lt;/p&gt;

&lt;h2&gt;
  
  
  Application Level Mistakes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkmteirc9dynu3qj43snl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkmteirc9dynu3qj43snl.jpg" alt="Kermit the frog holding an android phone blue screen of death"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Not using version control
&lt;/h3&gt;

&lt;p&gt;Even if you are a sole developer, you should really learn and use version control like Git or Mercurial.&lt;/p&gt;

&lt;p&gt;To put it simply, if you're editing more than one file, you should version the code.&lt;/p&gt;

&lt;p&gt;A decentralized version control system such as &lt;a href="https://git-scm.com" rel="noopener noreferrer"&gt;Git&lt;/a&gt; has the benefit of making your codebase highly available and has a clear history of file changes which you can reverse, among many many others.&lt;/p&gt;

&lt;p&gt;The de-facto code hosting service is &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;Github&lt;/a&gt;, but you can also use &lt;a href="https://about.gitlab.com/" rel="noopener noreferrer"&gt;Gitlab&lt;/a&gt; or &lt;a href="https://bitbucket.org/product" rel="noopener noreferrer"&gt;Bitbucket&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lazy commit messages
&lt;/h3&gt;

&lt;p&gt;If you work in a team and use version control (see the mistake above) it's essential to work on improving collaboration and communication at every step of the development process.&lt;/p&gt;

&lt;p&gt;One of the mistakes I see new developers (or new to the team) make is using version control as their own personal code repo disregarding other team members that need to use the same repo and understand each other's code and especially code changes.&lt;/p&gt;

&lt;p&gt;These are the commits I'm regularly seeing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fon7hhzxpno4o3rsmtxbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fon7hhzxpno4o3rsmtxbf.png" alt="Commit messages"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These kinds of commit messages don't tell other team members what has really changed. Team members need to go look at the file changes costing development time and resources, and it doesn't promote good collaboration or reviews either.&lt;/p&gt;

&lt;p&gt;Always try to think before you commit, amend commits together if necessary and the changes are related. &lt;/p&gt;

&lt;p&gt;Creating good code takes practice, these resources should help writing good commit messages.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/" rel="noopener noreferrer"&gt;How to Write Good Commit Messages: A Practical Git Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/erlang/otp/wiki/Writing-good-commit-messages" rel="noopener noreferrer"&gt;Writing good commit messages&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Not writing tests
&lt;/h3&gt;

&lt;p&gt;No time for tests, right? Putting the benefits of writing tests in another perspective is that it actually saves development time in the long term. &lt;/p&gt;

&lt;p&gt;It may look like that writing tests would take a lot of time, which is somewhat true, but you gain that &lt;em&gt;"lost"&lt;/em&gt; time by introducing fewer bugs that take NO time to fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Writing tests should definitely be factored into the project estimate&lt;/strong&gt; and project managers should be educated on the benefits of tests.&lt;/p&gt;

&lt;p&gt;There are different types of testing strategies, the most popular being &lt;a href="https://en.wikipedia.org/wiki/Unit_testing" rel="noopener noreferrer"&gt;unit testing&lt;/a&gt;. Other testing type include &lt;a href="https://en.wikipedia.org/wiki/Functional_testing" rel="noopener noreferrer"&gt;functional testing&lt;/a&gt;, end-to-end (E2E) testing or &lt;a href="https://en.wikipedia.org/wiki/Integration_testing" rel="noopener noreferrer"&gt;integration testing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Developers often hung up on naming conventions, &lt;em&gt;"what do you call it unit or integration? No! functional tests"&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;While every type of testing strategy has its pros and cons, my programming experience tells me, and this may be an unpopular opinion, that it really doesn't matter what you call it, unit, integration, functional, or whatever as long as you write &lt;strong&gt;some tests&lt;/strong&gt; at least for the critical parts of your code. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One can write awesome integration tests and useless unit tests and vice-versa.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Not deciding on a unified coding style and standard
&lt;/h3&gt;

&lt;p&gt;No, coding styles are not just about tabs vs spaces.&lt;/p&gt;

&lt;p&gt;Working in a team comes with awesome benefits and few sacrifices too, one being a coding style that you may not like.&lt;/p&gt;

&lt;p&gt;Using a coding style is important for code longevity and manageability, a new team member can easily be introduced to a project if there is an already well-established style of how things are done.&lt;/p&gt;

&lt;p&gt;If you don't know where to start it's best to look at how others do it, no need to re-invent the wheel 😊&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://google.github.io/styleguide/" rel="noopener noreferrer"&gt;Google Style Guide&lt;/a&gt; - includes guides from C++ to JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/airbnb/javascript" rel="noopener noreferrer"&gt;AirBnB Style Guide&lt;/a&gt; - goes in-depth on JavaScript coding styles&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://styleguide.github.com/" rel="noopener noreferrer"&gt;Github Style Guide&lt;/a&gt; - from branding, design to Ruby and JavaScript guides&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.php-fig.org/psr/psr-12/" rel="noopener noreferrer"&gt;PHP-FIG Coding Standards&lt;/a&gt; - PHP-FIG has a wide range of coding style and &lt;a href="https://www.php-fig.org/psr/" rel="noopener noreferrer"&gt;other PHP coding standards&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Coding_conventions" rel="noopener noreferrer"&gt;Coding Conventions&lt;/a&gt; - a wide array of styles for different programming languages&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;IDE tools to help you &lt;strong&gt;keep&lt;/strong&gt; your promise to coding standards:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://eslint.org/" rel="noopener noreferrer"&gt;ESLint&lt;/a&gt; - helping fix problems in JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://validator.w3.org/" rel="noopener noreferrer"&gt;W3C Validator&lt;/a&gt; - validating HTML/CSS code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://prettier.io/" rel="noopener noreferrer"&gt;Prettier&lt;/a&gt; - an opinionated formatter for front-end code&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cowboy coding
&lt;/h3&gt;

&lt;p&gt;Just look at the code below...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nv"&gt;$info&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'Docs'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/prev/&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?=&lt;/span&gt; &lt;span class="nf"&gt;alphaID&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$args&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'Docs'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?=&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="s"&gt;?en"&lt;/span&gt;
    &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"max-width: 100%; max-height: 100%"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;br&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'Domain'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'example.com'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/js/jquery-2.2.3.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/javascript"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;load&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;printLoad&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="s1"&gt;'Type'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Doc'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'Action'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Print'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'Relevant'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$info&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'UUID'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...is this how you want to be remembered? Because if another developer sees this code I'm sure they think of murdering the author.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Cowboy_coding" rel="noopener noreferrer"&gt;Cowboy-coding&lt;/a&gt; or &lt;a href="https://en.wikipedia.org/wiki/Spaghetti_code" rel="noopener noreferrer"&gt;spaghetti code&lt;/a&gt; refers to the erratic nature of developers writing code, disregarding coding styles &lt;em&gt;("Let's just add this line here...")&lt;/em&gt;, development environments &lt;em&gt;("Let's just add this line here on PRODUCTION...")&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The process of writing code is only around 10% of the &lt;strong&gt;process of programming&lt;/strong&gt; the other 90% consists of thinking solutions for solving problems, scheduling tasks, architectural decisions, code review, and audits.&lt;/p&gt;

&lt;p&gt;Every developer has to have a management framework in place in which they work and well-defined processes on what to do in different scenarios.&lt;/p&gt;

&lt;p&gt;So why do developers do this? Mainly, because of managerial pressures, experience and yes, laziness too, plays a role.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developers need to learn not to act on the first impulse they have for a specific programming problem&lt;/strong&gt; but take 10 minutes to really think about the solution they came up with and how well it fits into the overall project structure.&lt;/p&gt;

&lt;p&gt;Regarding managerial pressures, I'm sorry to say this, but it's 100% the fault of bad managers. I have yet to meet a client who wants a feature &lt;em&gt;right now&lt;/em&gt; disregarding any project management decision that needs to come before you write a single character of code. &lt;/p&gt;

&lt;h3&gt;
  
  
  Not updating dependencies
&lt;/h3&gt;

&lt;p&gt;Already mentioned in the "Missing maintenance" section of the article, a regular update cycle should be performed on a weekly, bi-weekly, or at least every month.&lt;/p&gt;

&lt;p&gt;Front-end development is highly dynamic, popular JavaScript modules (but not limited to) are updated daily and often introducing breaking changes. This is why it's recommended to update the dependencies regularly.&lt;/p&gt;

&lt;p&gt;Updating regularly also has the benefit of reducing bugs and security holes.  Use the latest package versions whenever possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Not using defensive programming
&lt;/h3&gt;

&lt;p&gt;In software development there's this term called &lt;em&gt;"defensive programming"&lt;/em&gt; which states, according to &lt;a href="https://en.wikipedia.org/wiki/Defensive_programming" rel="noopener noreferrer"&gt;Wikipedia&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Defensive programming is a form of defensive design intended to ensure the continuing function of a piece of software under unforeseen circumstances. Defensive programming practices are often used where high availability, safety, or security is needed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It simply states that developers should always create programs that can handle unforeseen scenarios, such as 3rd party services going offline, network requests taking too long, and so on.&lt;/p&gt;

&lt;p&gt;What if a web application relies on a 3rd party API service like Twilio which goes offline, would this web application be able to cope with that error?&lt;/p&gt;

&lt;p&gt;What if a request takes too long for some reason, would the application just hang or handle the long-running request by implementing a request timeout and returning an error?&lt;/p&gt;

&lt;p&gt;If the API returns an error, does the front-end code retries the request or just simply give up showing either an error or not showing anything at all?&lt;/p&gt;

&lt;p&gt;These are easy questions with complicated answers and even more complex implementations. Regardless, software developers should always practice defensive programming whenever possible to improve their code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Not going through a checklist before deployment
&lt;/h3&gt;

&lt;p&gt;Developers often forget to check their code before deployment resulting in bugs and immediate fixes, and re-deployments. 😅&lt;/p&gt;

&lt;p&gt;In my opinion, this task should be automated with CI/CD, but that's not always possible or makes sense for small projects so it's best to do it manually.&lt;/p&gt;

&lt;p&gt;There are two awesome resources I always use for API and front-end code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/shieldfy/API-Security-Checklist" rel="noopener noreferrer"&gt;API Security Checklist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://frontendchecklist.io/" rel="noopener noreferrer"&gt;The Front-End Checklist&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Software development is a highly dynamic field of work, constantly evolving and inventing new ways of creating software applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://catalins.tech/why-you-do-not-have-to-be-a-super-developer" rel="noopener noreferrer"&gt;You don't have to be a super developer&lt;/a&gt; to be a good developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A good developer is consistent first and hard-working second.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These methods presented above are mainly coming from experience. I made the mistakes and wrote them down so you can learn from them and make new mistakes, but not these ones. 😁&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I hope you enjoyed this article, please comment and consider sharing it; and if you have any questions you can contact me here in the comments or on &lt;a href="https://twitter.com/feketegy" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
