<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dani Morillas on Medium]]></title>
        <description><![CDATA[Stories by Dani Morillas on Medium]]></description>
        <link>https://medium.com/@morillas?source=rss-2e6aac941df3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qe4zq4kd1h27hOvsgtCzPA.jpeg</url>
            <title>Stories by Dani Morillas on Medium</title>
            <link>https://medium.com/@morillas?source=rss-2e6aac941df3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:49:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@morillas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The End of the Trilogy: AI Vocabulary Explained]]></title>
            <link>https://morillas.medium.com/the-end-of-the-trilogy-ai-vocabulary-explained-c5993122fe45?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5993122fe45</guid>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 13:26:55 GMT</pubDate>
            <atom:updated>2025-11-04T13:26:55.501Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6xRB23XSeo1y6tFwJ64Fw.png" /></figure><p>In this final chapter of the trilogy of posts “How to develop a vector database” I thought it would be a good idea to explain some vocabulary that I used in the previous two posts but I didn’t explain.</p><p>If you are a newbie in AI, like I am, you might have been reading the posts thinking “What is this?”, “and this?”, “What the heck does this mean?” and probably didn’t fully understand everything. So let me give a bit of the missing context here that the previous posts needed but I didn’t add it to avoid<strong> </strong>making the posts too long.</p><p>You could even say this post is a kind of prequel for the trilogy.</p><p>But first things first… a <strong>DISCLAIMER</strong>… as I’ve said several times, I’m a newbie in the topic. I’m learning AI as you might also be learning. I’m also not a data scientist, statistician, data engineer, AI engineer… Therefore, don’t expect very detailed explanations. Just an overview to understand the concept. If you need deeper knowledge this is not the place.</p><p>So, there we go…</p><p><strong>vector:</strong> on a general level a vector is a list of elements, in the context of AI a vector is a list of numbers. For instance: [0, 0.1, 0.3482, -0.86]</p><p><strong>embedding:</strong> An embedding is basically a vector of numbers, but with a very specific connotation in the context of AI. It’s a vector that represents a meaning and a context for an element: a word, sentence, image, video, … Elements with similar meanings will have very similar embeddings, that means, vectors of numbers. For instance the vector for the word <em>football</em>, would be similar to <em>tennis</em>, but different to <em>ufo</em>.</p><p>To get an embedding usually you need to go through a process and each provider or library generates embeddings differently for the same element. Even the amount of numbers in the vector might differ. So be sure to use always the same provider / library to generate all of your embeddings.</p><p><strong>vector database:</strong> It’s just a database that stores embeddings / vectors. The main aim of this database is to store the embeddings so later they can be used to search for the closest elements, using specific algorithms.</p><p>For instance, let’s say we want to search for all the close elements to the word <em>donkey</em>. We would have many elements with their embeddings in the vector database, we would calculate the embedding for the word <em>donkey</em> and, once we have it, we would search in the database for the closest embeddings to that one.</p><p><a href="https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world"><strong>HNSW</strong></a><strong> (Hierarchical Navigable Small World):</strong> It’s an algorithm used to quickly find the “nearest neighbours” in a simplified way. In the most simple scenario we would go through every single element in the database and we would calculate if the given embedding is close to the element embedding. But, as you can imagine, this works for small datasets but doesn’t scale to large ones. That’s when algorithms like HNSW come into play.</p><p>What HNSW does is to create a graph where each node is one of the elements in the DB. Every time you add a new element, it’s added to the graph and connected to some “nearby” neighbours, keeping the distance between them. To search, you start at the top layer and follow connections down until you reach the best matches.</p><p>It belongs to a family of algorithms known as ANN (Approximate Nearest Neighbour) because they don’t return the exact nearest neighbours, but an approximation, meaning there’s always a small margin of error.</p><p>For small datasets using brute force is the best approach because you get the exact closest neighbours, but it doesn’t scale. ANN algorithms scale better but you get an approximate solution. Everything comes with a price ¯\_(ツ)_/¯</p><p><strong>cosine similarity: </strong>This is one of the most known algorithms to calculate, given two vectors, how close they are between them. It calculates the cosine of the angle between the two vectors. The larger the cosine (closer to 1), the more similar they are.</p><p><strong>euclidian distance:</strong> It’s another of the most known algorithms to calculate the distance between two vectors. The aim is the same as cosine similarity but using a different formula. In the case of the euclidian distance what it does is to calculate the straight-line distance (difference) between two points. Since we have two vectors the final number is calculated according to the distance between every single point in the vectors. The smaller the final number, the closer the vectors are.</p><p><strong>RAG:</strong> or Retrieval-Augmented Generation. We all know how much an LLM can fail and how can’t always be trusted. So RAG comes to the rescue! This is the name which is given to the process of getting some needed information from your own database (images, PDF files, relational database, no SQL database, a text file,…), use it to build the prompt and send it to the LLM, giving it more context to get a more trustworthy response.</p><p>I hope I’m not missing any of the vocabulary I used and didn’t clarify properly. As any good prequel, I hope it gave the right context to understand all but, always, later in time :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5993122fe45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LoVe DB: a local vector database for Flutter]]></title>
            <link>https://morillas.medium.com/love-db-a-local-vector-database-for-flutter-28bebb65c220?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/28bebb65c220</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 12:55:38 GMT</pubDate>
            <atom:updated>2025-10-07T12:55:38.137Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7TcoIAdQb1xKaRCCHZqrog.png" /></figure><p>When I was implementing the <a href="https://medium.com/@morillas/how-to-develop-a-local-vector-database-ab0a9e4c23a4">custom-local vector database</a> for <a href="https://lemoni.studio/dasperfekt/">Das Perfekt</a>, I thought: “<em>What the heck! Why not implementing a proper local database now that I’m in the mood?</em>”.</p><p>So I started investigating how to implement an actual vector database for Flutter, initially just to store texts.</p><p>But before starting the implementation, I first had to figure out two things:</p><ol><li>The actual database where the information would be stored. My previous “precarious” implementation used a json object, but I wasn’t sure that was the best way.</li><li>A better way to determine the closest elements to the query vector. Iterating through all the elements in the DB was not the most efficient and scalable approach.</li></ol><p>And I ended up implementing <strong>LoVe DB, </strong>a local vector database for Flutter. Why <strong>LoVe DB</strong>? You might be wondering… or might be not… or maybe you already figured it out… or maybe I’m the only one who always likes to know the reason for the names… But, yes, we all know that love is the most powerful feeling in the world and also because it’s the acronym for <strong>Lo</strong>cal <strong>Ve</strong>ctor <strong>D</strong>ata<strong>B</strong>ase ¯\_(ツ)_/¯</p><h3>The database</h3><p>For the database, I ended up deciding to use <a href="https://sqlite.org/index.html">sqlite</a> (specifically, the Flutter version <a href="https://pub.dev/packages/sqflite">sqflite</a>)</p><p>I considered using a document-based database, but in the end sqlite is a very well-known, lightweight database that has its own local version for Flutter.</p><h3>The search algorithm</h3><p>For the vector search algorithm I did a bit of research and I found a well-known algorithm called <a href="https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world">HNSW</a> (Hierarchical Navigable Small World)<strong> </strong>which is used by all (or most) the known vector databases in the market today.</p><p>Again, I’m not a statistician, a mathematician, or a scientist, so I’m not the best person to explain this, but I’ll try to explain it as if I were a five year old.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/0*v3DC4N3RTQcirHvY" /></figure><p>TLDR; This algorithm is a way to quickly find “nearest neighbours” in big datasets. What it does is to create a graph where each node is one of the elements. Every time you add a new element, it’s added to the graph and connected to some “nearby” neighbours, keeping the distance between them. To search, you start at the top layer and follow connections down until you reach the best matches.</p><p>It belongs to a family of algorithms known as ANN (Approximate Nearest Neighbour) because they never return the exact closest neighbours, but rather an approximate set. Which means that there is always a margin of error.</p><p>Well, getting to the point. Since I found this and saw that there is an implementation of a <a href="https://pub.dev/packages/local_hnsw">local hnsw index for flutter</a>, I went for it.</p><h3>The implementation</h3><p>The API allows to create a collection, which either creates or opens (depending on whether it already exists) a database and table in sqlite:</p><pre>final db = LoVeDB(  <br>  dimension: 1536, // The dimension of your vector embeddings  <br>  metric: Metric.cosine, // Optional. By default: Metric.cosine  <br>  mode: SearchMode.hnsw, // Optional. By default: SearchMode.hnsw  <br>);</pre><p>where you specify three parameters:</p><ol><li>The dimension of the vectors.</li><li>The search metric: cosine or euclidean.</li><li>The search mode: bruteForce or hnsw (being <em>brute force</em> the method I explained in the last post, and <em>hnsw</em> what I just explained above)</li></ol><p>Once you have the database instance you can create a collection:</p><pre>final myCollection = await db.collection(&#39;my_documents&#39;);</pre><p>and with <strong>myCollection</strong> you can start operating with the database:</p><pre>Future&lt;List&lt;Document&gt;&gt; find({required List&lt;double&gt; vector, int limit = 10});<br><br>Future&lt;void&gt; insert({required String id, required List&lt;double&gt; vector, required String text, Map&lt;String, dynamic&gt;? metadata});<br><br>Future&lt;void&gt; delete({required String id});<br><br>Future&lt;Document?&gt; get({required String id});</pre><p><strong>insert:</strong> guess what? it inserts a new element into the database! For the insertion, it requires an id, the vector, the text and an optional map with metadata you want to insert together with this element. In case of using hnsw, it also inserts the vector into the graph.</p><p>The vector is stored in sqlite as BLOB. The hsnw stores the graph in memory and is rebuilt every time LoVe database is instantiated.</p><pre>final id = &quot;document_id&quot;;<br>final vector = [0.1, 0.2, ...];<br>final text = &quot;This is a sample document.&quot;;  <br>final metadata = {&quot;author&quot;: &quot;John Doe&quot;, &quot;category&quot;: &quot;Flutter&quot;};<br><br>await myCollection.insert(<br>  id: id,<br>  vector: vector,  <br>  text: text,  <br>  metadata: metadata,  <br>);</pre><p><strong>delete</strong>: yes! it deletes the element from the database and the graph in case of using hnsw.</p><p><strong>get:</strong> returns the element, but only the document information: id, text and metadata (not the vector)</p><p><strong>find</strong>: this implementation depends on the search mode to use. When using SearchMode.bruteForce<em> </em>it gets all the documents from the database and makes the search (depending on the metric to use) to get the closest neighbours. When using SearchMode.hnsw<em> </em>it makes the corresponding search in the the hnsw graph. The find method accepts a limit parameter where you can specify how many ‘closest’ elements to return, it defaults to 10.</p><pre>final queryVector = [0.9, 0.8, ...];  <br>final results = await myCollection.find(  <br>  vector: queryVector,  <br>  limit: 5,<br>);<br><br>for (final doc in results) {  <br>  print(&#39;Found document: ${doc.text} with ID ${doc.id}&#39;);  <br>}</pre><h3>Next steps</h3><p>This is the first implementation but I have some possible next steps and improvements which I don’t know if I’ll have time to do :)</p><ul><li><strong>update / upsert</strong>: As you can see, this implementation only allows to insert new elements, but not updates. What happens if you want to update the metadata? Well right now you only can delete the id and insert it again with the new information. It’s not that difficult, but it would be awesome to be able to <em>update </em>or have an <em>upsert.</em></li><li><strong>other types of objects.</strong> This only supports inserting <em>text</em> to the vector database, but I’m not sure how useful could be to add images or audios or videos… It’s a mobile application, so probably not that useful, but… ¯\_(ツ)_/¯</li><li>Publish it to <a href="https://pub.dev/">pub.dev</a></li></ul><h3>Thank you for arriving to this point!</h3><p>This post is only an <em>appetizer</em> of the implementation. If you are curious to see the code you can check it out here: <a href="https://github.com/dmorillas/love_db.git">https://github.com/dmorillas/love_db.git</a></p><p>I’d love to hear your feedback, and I’ll be happy to receive contributions!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28bebb65c220" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to develop a local “vector database”]]></title>
            <link>https://morillas.medium.com/how-to-develop-a-local-vector-database-ab0a9e4c23a4?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab0a9e4c23a4</guid>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[embedding]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Wed, 10 Sep 2025 08:16:48 GMT</pubDate>
            <atom:updated>2025-09-10T08:42:04.062Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8q8FIuVtsK-A4NdD30auxA.png" /></figure><p>While working on <a href="https://lemoni.studio/dasperfekt/">Das Perfekt</a> (one of my personal projects), I thought that having information in a vector database would help me with one of the features. I have a list of the 500 most common German verbs, and I wanted to get a list of the most related verbs to a given input verb.</p><p>My idea was to have a extremely simple RAG (Retrieval-augmented generation) flow:<br>1. Pick a verb.<br>2. Get a list of the most related verbs to that one.<br>3. Send a request to an LLM with those selected verbs.</p><p>Since it’s a small project I didn’t want to use any server / cloud based vector database because that would add some complexity to the project that, at this point, is not necessary. So I discarded straight away options like Qdrant, Weaviate,…</p><p>It was a very extremely simple use case and I wanted to use something local. On top of that, I wanted the embedding information precomputed, since I already know the verbs I want to use. I don’t need to add new information to the vector database.</p><p>In the end I decided to do my custom implementation. Why not? It’s pretty simple what I wanted to do and with that I could learn a bit more about embeddings, vector databases,… in a simplified, somewhat unrealistic way :)</p><p>After implementing the solution and testing how it works I wanted to share what I ended up doing.</p><p>First I created a script in Python that loads the current list of verbs, gets the embedding for each one of them and creates a final json with all the embeddings.</p><p><em>Wait, but what’s an embedding? Basically it’s a long list of numbers that represents the meaning and context of a word, sentence, image, video,… Entities with similar meanings will have similar numerical lists.</em></p><pre>import json<br>from dotenv import load_dotenv<br>from openai import OpenAI<br><br>load_dotenv()<br>client = OpenAI()<br><br>def get_embedding(text: str):<br>    response = client.embeddings.create(<br>        model=&quot;text-embedding-3-small&quot;,<br>        input=text<br>    )<br><br>    return response.data[0].embedding<br><br>if __name__ == &#39;__main__&#39;:<br>    input_path = &#39;verbs.json&#39;<br>    output_path = &#39;verb_embeddings.json&#39;<br><br>    with open(input_path, &#39;r&#39;) as f:<br>        verbs = json.load(f)<br><br>    verbs = [verb[&#39;infinitive&#39;] for verb in verbs]<br>    embeddings = {}<br><br>    for verb in verbs:<br>        embeddings[verb]= get_embedding(verb)<br><br>    with open(output_path, &quot;w&quot;, encoding=&quot;utf-8&quot;) as file:<br>        total = len(embeddings)<br>        file.write(&quot;{\n&quot;)<br><br>        for i, (verb, vector) in enumerate(embeddings.items()):<br>            key = json.dumps(verb, ensure_ascii=False)<br>            val = json.dumps(vector, ensure_ascii=False, separators=(&quot;, &quot;, &quot;: &quot;))<br>            comma = &quot;,&quot; if i &lt; total - 1 else &quot;&quot;<br>            file.write(f&quot;  {key}: {val}{comma}\n&quot;)<br><br>        file.write(&quot;}\n&quot;)</pre><p>Yes, I know, there is no error handling implemented but it’s a controlled environment.</p><p>Yes, I also know I could have done a final <strong>json.dumps</strong> with the object <strong>embeddings,</strong> but in my tiny obsession to keep each entry on one line, I ended up writing it this way.</p><p>The resulting JSON after executing this script looks like this:</p><pre>{<br>  &quot;abbiegen&quot;: [-0.008947839960455894, 0.03468969464302063, ...],<br>  &quot;abbrechen&quot;: [-0.03173336014151573, 0.049813415855169296, ...],<br>  &quot;abfahren&quot;: [-0.02796095423400402, 0.03436387702822685, ...],<br>  ...<br>}</pre><p>Cool! I already have the precomputed information I wanted. I have a json that contains all the verbs with the corresponding embedding for each of them. Let’s continue the party! Use this information to get the list of most related verbs.</p><p>Doing some research I could find out that one way to do what I wanted to do is something called <strong>cosine similarity</strong>. I was never good at these math topics and I’m not the right person to explain this algorithm below, so I’ll keep it at the level of “explain as if I were five” :) This algorithm takes two vectors and calculates a number which is a factor of how near are both vectors between them.</p><p>Here the code of the algorithm.</p><pre>double _cosineSimilarity(List&lt;double&gt; vec1, List&lt;double&gt; vec2) {<br>  double dotProduct = 0.0;<br>  double magnitude1 = 0.0;<br>  double magnitude2 = 0.0;<br><br>  for (int i = 0; i &lt; vec1.length; i++) {<br>    dotProduct += vec1[i] * vec2[i];<br>    magnitude1 += vec1[i] * vec1[i];<br>    magnitude2 += vec2[i] * vec2[i];<br>  }<br><br>  magnitude1 = sqrt(magnitude1);<br>  magnitude2 = sqrt(magnitude2);<br><br>  if (magnitude1 == 0.0 || magnitude2 == 0.0) return 0.0;<br><br>  return dotProduct / (magnitude1 * magnitude2);<br>}</pre><p>That is the key part, the rest of the implementation is very straightforward.</p><ol><li>Take the given verb and calculate the embedding. This can be done by using again an external service or, as in my case, by using the precomputed embedding.</li><li>For each of the verbs calculate its cosine similarity with the input verb.</li><li>Order the resulting data in descending order.</li><li>Take the first ’n’ elements.</li></ol><p>With these steps you get the ’n’ most related verbs to the input verb and all is ready to build the final prompt and send it to the LLM in use.</p><p>P.S. 1 — Yes, I know this is not the most efficient solution, specially storing the embeddings in a JSON object and go through all of them to get the cosine similarity. However for this use case and the small and limited amount of elements I think it’s good enough.</p><p>P.S. 2 — I found some possible libraries that would also provide a local vector database. Some extension to SQLite (but I haven’t found a binding for Dart/Flutter), <a href="https://pub.dev/packages/dvdb">DVDB</a> (which basically does the same I’m doing) or <a href="https://objectbox.io/vector-database-for-ondevice-ai/">Objectbox</a> (which I haven’t tested yet)</p><p>P.S. 3 — I’m open to feedback and suggestions for improvements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab0a9e4c23a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The order of the factors does alter the outcome when hiring?]]></title>
            <link>https://morillas.medium.com/the-order-of-the-factors-does-alter-the-outcome-when-hiring-6f0294ac9352?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f0294ac9352</guid>
            <category><![CDATA[hiring-process]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Mon, 08 Sep 2025 09:15:30 GMT</pubDate>
            <atom:updated>2025-09-08T09:15:30.091Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mpoppCQTh3M0BrxNSkrdJw.png" /><figcaption><a href="https://www.pexels.com/photo/pots-and-funnels-hanging-from-the-ceiling-12293588/">Photo</a> by Lucia Barreiros Silva</figcaption></figure><p>I’ve been lately very active looking for a new job and you know what that means, going through hiring processes and doing interviews every now and then.</p><p>Among the hiring processes I’ve gone through, I’ve seen mainly three types:</p><p>1. You start talking with the hiring manager of the team you would join.<br>2. You begin with a technical interview with a person.<br>3. You start with a technical test “leetcode”-type with no human interaction.</p><p>What we could simplify into two categories:</p><p>1. Processes that start with a culture / behavioural filter.<br>2. Processes that start with a technical filter.</p><p>Although you end up doing the same, this has made me wonder if the outcome at the end is the same, or if it matters the possible difference.</p><p>When the process starts with a culture/behavioural interview, what I see is that first they want to filter all those who don’t fit in their culture or values. It doesn’t matter if you are a good developer or if you have expertise in the tech stack… what matters most is who you are as a person.</p><p>On the other hand, if the process begins with a technical interview or test what I see is that they give more importance to your hard skills. First they want to keep the good developers before evaluation who you are as a person.</p><p>Of course, in the end, both filters are applied and you are supposed to have at the end the best engineers who are good candidates for your team and company.</p><p>But does it make a difference the order of the filter?</p><p>I believe the order sends a clear message about what the company values most.</p><p>Starting with a culture / behavioural interview means that people come first. First you want to have the right people on board, no matter the skills. Starting with technical test means that skills are the top priority more that who the candidate is as a person.</p><p>And I believe that this order is important.</p><p>What do you think? Do you have the same experience?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f0294ac9352" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is really impostor syndrome a bad thing? or even a thing?]]></title>
            <link>https://morillas.medium.com/is-really-impostor-syndrome-a-bad-thing-or-even-a-thing-98df8f845efb?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/98df8f845efb</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[impostor-syndrome]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Fri, 16 Sep 2022 13:00:00 GMT</pubDate>
            <atom:updated>2022-09-16T13:00:00.892Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TXCZ6CXDcTo5yB8ujUj6eA.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/ryanmcguire-123690/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=362183">Ryan McGuire</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=362183">Pixabay</a></figcaption></figure><p>I barely remember the last time I didn’t have impostor syndrome. The last time I felt I was an impostor, doing something I was not meant to do and I didn’t have the aptitudes to do it.</p><p>If I look back in my career I remember when I joined <a href="http://king.com/">King</a> in 2012 as Senior Backend Engineer. First time in my career I was considered a backend. I was always surrounded by extraordinary backends, all of them better than me and always of the feeling of catching up. That is the first memory I have of the sensation I was an impostor.</p><p>I have more years of experience before that 2012, but my memory barely remembers the feelings I had. Before joining King I was managing a team for almost 7 years and I’m pretty sure many times I had the sensation that I had no idea what I was doing. But I was young. When one is young doesn’t care that much of many things. So, I’m pretty sure I never felt I was an impostor, although being more unexperienced and junior.</p><p>Well, going back to King. I learnt a lot from my colleagues, from all of them and I never stopped learning. I felt many times I didn’t belong there.</p><p>Then in 2019 I left King to work at <a href="https://www.carepay.com/">Carepay</a>. I joined, again, as Senior Backend Engineer. There it was the first time I worked with microservices. The first time I worked with Spring. The first time I worked with AWS. The first time I worked… There were a lot of new things for me. Things that I saw my backend colleagues were skilled and I had no idea.</p><p>I read a lot of articles about all these new technologies for me. I did several online courses about AWS. And even with that, I always was catching up with my colleagues. Did I really belong there? Was I really as senior as they thought I was? I felt I didn’t belong there. Not at least at the level my backend colleagues had and I was expected to have.</p><p>Then? Then in 2021 I left Carepay to join <a href="http://etermax.com/">Etermax</a> in Berlin. What did I find there? A company with a very strong TDD and DDD culture. I had experience with TDD but my exposure with DDD was only theoretical. I had read about DDD but never used it. It was also the first company were I didn’t work with Java. First with C# and then with Kotlin. And more AWS… I guess you can already imagine what comes next :)</p><p>And now, since the beginning this 2022 I’m at <a href="https://pnkfrg.com/">PnkFrg</a>. We are a startup recently created. I’m the only backend and there is no infrastructure or backend in place. Do you guess what that means? Yes, that right now everything is on my shoulders.</p><p><em>Ok, Dani, that’s enough, don’t you think? Stop with this shit and stop crying</em></p><p>Yes, you are right, but all this was needed to my final point. I’ve thought a lot of times about this. About this feeling of the impostor syndrome. If it’s a problem, if that’s something we should spend time worrying about. If we should make a thing about it.</p><p>After giving a lot of thoughts I’ve come to realise that every time I’ve had this feeling it was because I was doing something I never did before or I had colleagues “better” than me (and we could discuss that “better”)</p><p>It was always a situation of learning. Thanks to my dear colleagues and friends at King I learnt a lot of TDD, clean code… Thanks to being at Carepay I learned about AWS. Thanks to being at Etermax I learned about DDD. Thanks to being at PnkFrg… well, I’m learning about everything.</p><p>Every time, every single time I felt an impostor in reality I was becoming a better professional. I was improving my skills and I was able to do my work better that before.</p><p>When once I felt I was out of place, now I can explain TDD or clean code to others. When once I felt I didn’t belong, now I can deploy a Docker image in AWS. When once I felt I was a failure, now I can design the micro service architecture for my current project and company.</p><p>So, yes, now I’m able to realise that every time I feel an impostor it is probably because I’m learning something completely new that will make out of me a better person and profesional.</p><p>I’d rather think of it as <a href="https://morillas.medium.com/the-eternal-junior-developer-syndrome-6f598edc203a?source=your_stories_page-------------------------------------">The eternal Junior Developer syndrome</a> because it is the feeling that I’m always learning.</p><p>A toast for more years of impostor syndrome! 🥂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98df8f845efb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Estimate or not estimate, that is the question]]></title>
            <link>https://morillas.medium.com/estimate-or-not-estimate-that-is-the-question-c2ab04e1cfb8?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2ab04e1cfb8</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Thu, 14 Jul 2022 10:14:50 GMT</pubDate>
            <atom:updated>2022-07-14T10:14:50.194Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*CEF87BQyCFLT_y-brue_4A.jpeg" /><figcaption>T-shirts by <a href="https://www.flickr.com/photos/ncaranti/4081722824/in/photostream/">Niccolò Caranti</a></figcaption></figure><p>Before 2012 all my experience with estimation was in days. Not that I gained all my experience in a matter of days but that we estimated our tasks in how many days it would take to us to finish them.</p><p>I had to estimate in time all the work my team had to do, put it all beautifully in a Microsoft Project document and that was it. We already knew when the tasks were going to be finished and everyone was happy. Easy, right?</p><p>Of course not, you might have already guessed. Priorities changed, some projects were cancelled, some new projects or tasks were coming in… and all the estimation work was fucked up and had to be redone… to find ourselves in the same situation weeks / months later… new tasks, new priorities, new estimation, new beautiful Gantt graph. It was completely useless but management wanted to see it because it made them happy. Who was I to deny their happiness?</p><p>Then in 2012 I started working in a new company…</p><p>“We are not going to use Waterfall! Waterfall is dead! We are going to use Agile and Scrum!” Yes!</p><p>“We are going to work in iterations. Long term planning stays in the past. Only plan for each iteration, evaluate and pivot or change the product accordingly” Oh, niiice…</p><p>“Estimation in days is dead. It is completely useless!” Great!</p><p>“We are going to estimate in t-shirt sizes” Wait, what?!?!?</p><p>I won’t lie, it took us by surprise to the whole team. Too abstract, too difficult to understand. We struggled a lot since we didn’t know how to relate a t-shirt size to a task. Yes, we understood how to relate them to our bodys but to a task? What information would bring us? Was it useful?</p><p>We struggled but since the team was completely new working in a new project we wanted to experiment. We are here to play! So we tried the t-shirt sizes but also Fibonacci sequence, we tried poker cards… We tried several options until, somehow, we managed to make it work, but not with t-shirts. We managed to learn how to estimate tasks with an abstract concept. In complexity but not in days. We had our meetings to estimate, our disagreements in the numbers and our discussions to understand why we had that disparity in estimation. We made it work, somehow.</p><p>Then I moved to another project where we didn’t estimate at all. And it worked smoothly. We didn’t need to estimate. Everything was perfect.</p><p>And then I moved to another project where we didn’t estimate at all and it also worked like a dream. Planning, iterations, prioritisation… Everything worked without estimation. And then another project. And another…</p><p>And then one day I ended up in another team which was newly formed to work in a new project. And we started estimating again… We had our refinement meetings where we discussed about what to develop in that task, dependencies, requirements… and estimation. Again, individual estimations, negotiation, disagreements, discussions to reach a point of agreement, final agreement and final estimation… which led us to the planning. It was the perfect setup. Estimation worked better than not estimating.</p><p>But then, again, afterwards I ended up in a different team and project were we didn’t estimate.</p><p>Ok, I’ll stop counting, I think it’s enough to start seeing my point. How is it possible that sometimes estimating (not in days) worked but also not estimating worked?</p><p>There are people who are strong advocates of estimating. They don’t accept a project without estimating the stories even if it is in hat sizes who nobody understands. I’ve also found people who are strong advocates of not estimating at all, thinking that is completely useless and a waste of time making the team spending their precious time in shouting S and Ms and XLs in a meeting…</p><p>How is it possible that I’ve seen working both ways?</p><p>Well, this is what I’ve seen based on my experience. I repeat what I’ve said: <strong>based on my experience</strong>.</p><p>Seen retrospectively I can see that those projects where estimating worked was because either we were a new team where we didn’t know each other and / or the team was formed mainly by junior people. Those projects where estimating was not needed were with very mature and senior people and teams. Either because we already knew each other and worked together for a long time or because the team was formed mainly by senior people.</p><p>In the first case, the team barely knew its capacity and how to interact. How many tasks could they take per iteration? how much a task would cost and how to define what the task was about? Those estimations helped the team to realize all that. The mere task of estimating was forcing and bringing a conversation that otherwise would have been difficult to happen. If I say that for me that task is an 8 but you say it’s a 2 there is something there that fails. I see more complexity that you see and we are forced to talk and discuss where the divergence is. Find the point where we both agree what that task consists of: definition, requirements, acceptance criteria, dependencies… The usefulness of the estimation was not the final number we agreed on. It was the conversation that happened before reaching that point.</p><p>In the second teams I was part of, a team made of mainly seniors and / or people who already knew each other these conversation happened more naturally. When defining the task these conversations were already happening and it was easier that when the task was included in the iteration the main topics were already clear. This type of team already knew its capacity and it was easier to define what it could be done during a sprint and what not.</p><p>No, this team was not perfect and mistakes happen all the time and bad plannings always happen. But there was a better understanding and communication (even with the imperfections that always exist)</p><p>So, again, based on my experience, I’ve seen that estimation with the time is probably useless to estimate. To evaluate how much effort or time a task is going to take. We’ll almost always fail on that. But it helped a lot in creating some conversations that were not happening otherwise. Especially in new teams where all the members were new and had to go through the experience of learning how to work together. Once reached that point I can be on the team of “estimation is not needed and most of the times is a waste of time”</p><p>Are there other ways to generate that kind of conversations within the team? Of course, I’m pretty sure and each team should find their own ways. In these teams, estimation was the way that worked.</p><p>Final disclaimer: I have always worked in final product teams. I understand that in teams of different nature, like developing internal products, the reality can be completely different.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2ab04e1cfb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The data dictatorship era]]></title>
            <link>https://morillas.medium.com/the-data-dictatorship-era-11f72a486544?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/11f72a486544</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Wed, 19 May 2021 10:36:44 GMT</pubDate>
            <atom:updated>2021-05-19T10:36:44.390Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vu-flek0h-XBSh-r" /><figcaption>Photo by <a href="https://www.pexels.com/@negativespace?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Negative Space</a> from <a href="https://www.pexels.com/photo/blue-and-green-pie-chart-97080/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>Big Data. Business Intelligence. Data Mining. Data Science. Data Engineering. Data Analytics.</p><p>Data, data, data… It’s all about data. We live in the era of data.</p><p>Any application or game needs to collect tons of data. And some of these will be used to analyse our users, their behaviour and take decisions.</p><p>Do we want to know if the user is engaged with our product? Let’s create some metrics to analyse the retention. Which of them? All of them! The ’n’ day retention metrics.</p><p>Is our product successful? I don’t know, let’s take a look at the DAU. And the DARPU? Also at it!</p><p>Is it our app good enough? No idea, let’s take a look at the conversion rate!</p><p>Before you get angry with me, let me be clear. I believe in data. Thanks to living in the era of data we are not blind anymore. We can know if our application is successful, if our users like our product, if they browse through the different screens and steps as we expected to do or test several versions of the same feature via an AB Tests and with data analyse which one is the most successful.</p><p>And, thanks to that, we can react quicker and better than before. We have now more information that development teams would have ever dreamed 20 years ago.</p><p>We can see what our users are doing. We can offer better products thanks to data and we can offer more value to the users. Why that? Yes, because we have data, tons of data. Trillions of rows in a database!</p><p>But, some times, as a software engineer I wonder if we don’t pay too much attention to data. I’m pretty sure that my data scientists colleagues would think differently, but aren’t we giving too much importance to data? Could data kill innovation and creativity and introduce too much rationale? Are we in a data dictatorship era?</p><p>Many experts say that our brain works in two different modes. On one side we have the fast system, the emotional mode. We don’t think too much with this mode and it allows us to take more risks. Of course, if we let this mode win always we could risk too much or we could get pissed off with everybody pretty soon. On the other side we have the more rationale side. It uses more information, takes less risks and it is more conservative. It needs data. But if we use it too much we wouldn’t take many decisions or they would be too slow.</p><p>I think we could compare the use of data with these two systems. In the dinosaur era, when we developed products without data we were more like this emotional side. We had to follow our instincts (and also knowledge, of course). Take more risks and try to figure out what the user would expect, what we wanted to offer and, perhaps, find a point in the middle.</p><p>Now, with this amount of data we tend many times to be on the other side, the rationale. Many decisions are taken based on the data. If we know the data, we know how to react and what the user wants. If we don’t know the data yet, we wait for it to know which decisions need to made.</p><p>Sometimes, even, a product or a feature is killed because the data is not good enough. Even if the product or feature has been recently launched. It is launched, the first incoming data is not good, it is killed. “<em>Are we really going to kill the product?</em>”, “<em>Indeed, we have analysed the data and it’s not good</em>”, “<em>But, we just launched”, “We know, but the data is not good. It is not what we expected. It doesn’t fit our expectations, our minimums.”, “Won’t we give it a second opportunity? try something new or different?”. “Nope”</em></p><p>I have the feeling that many companies/teams are becoming more conservative due to the data.</p><p>What do you think?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11f72a486544" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On being Senior Engineer]]></title>
            <link>https://morillas.medium.com/on-being-senior-engineer-2d78ae7dead5?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d78ae7dead5</guid>
            <category><![CDATA[career-development]]></category>
            <category><![CDATA[engineering-management]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Mon, 01 Mar 2021 14:16:58 GMT</pubDate>
            <atom:updated>2021-03-01T14:16:58.669Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Good afternoon Dani. Thank you for you interest in our company and your dedicated time. Your profile is very interesting and we liked it … bla bla bla … but we are in the search of a Senior Engineer. You don’t have experience in X and Y and be productive from day one. You don’t have this senior profile we are looking for.</em></p><p>I received this message (or someone similar, I don’t remember the exact words) more than one year ago, after going through an interviewing process.</p><p>It hurt me receiving this message.</p><p>First, because we don’t like to feel rejected. Our ego, some times as big as the Empire State Building in NY, feels in pain, even for just a microsecond. We prefer to get accepted and be the ones who reject the offer. Right?</p><p>Second, because I was interested in the company. I liked what they did (music industry) and the product they developed. I wanted to be part of it. Maybe it was a big shit but, initially, I was interested. They knew how to sell it :)</p><p>And third, because I couldn’t understand that a company could reject a candidate for not knowing a tool. That they would consider that the candidate was not senior enough for not knowing a tool.</p><p>They recognised my years of experience. They recognised the projects I had been working. The recognised my experience in Java. However, they didn’t want to follow because I didn’t have experience with Spring Boot…</p><p>This made me think and reflect about what I thought (and still think) what a Senior Engineer or Developer must be. Which are the traits and attributes that someone should have to be a Senior Developer… not Señor Developer, which is something different… (sorry, as a Spaniard I had to make this pretty awful joke)</p><p>Should it be defined by their experience in some specific tool? Or a programming language?</p><p>This is what I think what doesn’t define what a Senior Engineer is (disclaimer: this is my opinion and I might be wrong or biased):</p><ul><li>First thing one might think is: years of experience. Well, I’m not that sure about that. Of course someone with 15 years of experience will most likely be more senior than another one with 2. But years of experience don’t make you senior. Years ago I had in my team two colleagues, one of which had a couple years of experience while the other one had about 10. If I ask you which one was the senior, which one would you tell me? Maybe the response is clear. Although… it’s also probably that you think this question is tricky. You got me! How smart you are… The person with 10 years of experience barely had autonomy. Didn’t take any decisions, didn’t contribute to the team and was always waiting for being said what to do. However, the other developer, with way less years of experience was totally the opposite. It’s clear that personality plays an important role as well, but also that the developer with 10 years of experience was not behaving like a senior.</li><li>I don’t think either that the senior is the person who knows everything, who has the answers to everything, who masters a technology or knows everything about a programming language. Some kind of an almighty God of technology. The fact that a developer is the best one in X or Z doesn’t make them to be a senior, but to be an expert in X or Z.</li></ul><p>Then, if a Senior is not the developer who has longer experience or the great expert in a technology, what is a Senior Engineer? Or at least, what I think… (disclaimer: again, this is my opinion which can be wrong or biased)</p><ul><li>It should be an expert in solving and finding problems, no matter the technology. Might not have all the answers to the problems but for sure will know with whom to talk or to whom to ask. Also knows where and how to find the needed answers (well, yes, Google and StackOverflow, you got me!) in the team and in the company. The experience usually creates some kind of new sense that makes you guess which path to take, where to search, where to begin to investigate or debug an issue, who to talk to…</li><li>Won’t be the big expert in all the technologies, but will have all the tools to evaluate if a technology is what it is needed. And by “have all the tools” I also mean “know to whom ask and speak to get more information”. Because, remember, a senior it’s not a know-it-all person.</li><li>Without being a Business person or a Product Owner or a Producer or… whatever it’s called in your company, a senior is also involved in the different stages of the product development: requirements taking, decisions, design, implementation, testing,… having a minimum knowledge of the product and the sector. Why? Because, in the end, the senior will need to evaluate how to implement something, have the overall image of the product and code, being able to balance the short and long term… and all this is easier when you have knowledge of the product and sector. Believe me, I’ve been there, when you struggle with understanding the product or sector you can struggle with the rest.</li><li>Taking part of processes. A senior is very common also to be seen involved in the processes of the team and the project. Proposing improvements and changes, detecting stories and tasks that are not in the backlog, participate in code conventions and best practices… Well, a long list of scenarios. That doesn’t mean that the senior will be present in any improvement in the processes of the team. No, take it easy, they are not members of the X-Men. But they have the qualities to do it, the experience to propose it and the proactivity to put it in practice.</li><li>Communication, that is another important skill. They don’t need to be Storytellers or being able to give a 20 minutes presentation at TED fascinating the whole audience, but the senior must be able to communicate the progress of the project, being in contact with other engineers in the team, as soon as a problem arises communicate to the whole team. They would also keep a line of communication with other roles like designers, product owners, artists… in order to sync and align the work and the pending progress. And, even beyond this, being able to keep the communication open with other possible teams in case of having dependencies.</li><li>Doing boring stuff. This is something funny, I’ve seen juniors and mid-level developers proposing themselves to work on tasks beyond their capacities. And don’t take me wrong, I think that is amazing, that is a great way to grow and learn. On the contrary, many seniors doing what is considered boring stuff. Refactors, small bugs, ugly bugs, infrastructure tasks, configuration,… Stuff someone else don’t like to do. Probably because they don’t always look to improve themselves but to improve the project and the team (one more time, there’ll be exceptions and will depend on personalities)</li><li>Capacity of mentorship with more junior engineers. Helping them in the grow process, learning, on-boarding and integration in the team, technologies, processes… Being helpful and a guide to them.</li></ul><p>And many other things I’m surely forgetting.</p><p>In summary, what makes the difference in an engineer to become senior are the <em>soft skills</em>. That means, all the not so technical skills.</p><p>I’ve worked in teams where non Senior Engineers weren’t that different to Senior in terms of technical skills and expertise. They could tackle the same kind of tasks and complexity, but they lacked all these skills that allow to go beyond your tasks.</p><p>A while ago, I had in my team a person who wanted really strong to become a Senior Engineer but he didn’t get it. He never understood why, because he considered he was technically at the same level of the Seniors in the team. He compared himself with all of them and he saw he was at the same level. And he was right, but that wasn’t the problem. He was good and he had experience at his speciality. However, one hardly saw him participate in decisions taking, barely nobody thought of him as a person to go in case of doubts, his communication with the rest of the team was rare and most of the time he was always waiting for the tasks to be told… He lacked initiative and autonomy. Nevertheless, when he had something to do he did it well and with quality.</p><p>I think that a senior is a person that grows horizontally more than vertically (and I don’t mean only body volume :) )</p><p>And you, what do you think being a Senior means?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d78ae7dead5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Stonehenge to the beach]]></title>
            <link>https://morillas.medium.com/from-stonehenge-to-the-beach-cdcf2f8b4089?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdcf2f8b4089</guid>
            <category><![CDATA[monolithic-architecture]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Wed, 03 Feb 2021 11:28:52 GMT</pubDate>
            <atom:updated>2021-02-03T11:28:52.751Z</atom:updated>
            <content:encoded><![CDATA[<p>I had read a lot and discussed about microservices. Articles, blog posts, some video, Christmas conversations with my grandma… But it wasn’t until the end of 2019 that I could start working on it and experience on my own with this architecture.</p><p>I moved from a monolithic-architecture-based company to a microservices-architecture-based company. From a code more similar to Stonehenge to another more similar to the sand of the beach.</p><p>After one year working in this microservice based architecture, I wanted to summarize most of the pros and cons I’ve found out while learning in working in a development environment like that.</p><p>Don’t expect any kind of rational order.</p><p>Let’s go!</p><p><strong>PRO: more modularity.</strong></p><p>Are you familiarised with the ‘S’ letter in <a href="https://en.wikipedia.org/wiki/SOLID">SOLID</a> principles?</p><p>Microservices help to think in the single responsibility of modules. It leads to a tendency to think in how to divide the software in separate and independent modules which each one has its own responsibility.</p><p>Yes, ok, even with microservices you can mess it up. Without a doubt.</p><p>Yes, I know, you can end up having a monolithic microservice. Of course. Isn’t it funny?</p><p>But you won’t deny that it helps in having this mentality of having each module a single responsibility. Then, it’s a matter of good intentions not ending up in creeping the scope of the microservice.</p><p><strong>CONS: Intertwined dependencies.</strong></p><p>The relationships between services becomes a bit more complicated.</p><p>When I used to live with my parents everything was easier with them. I could see them every day and talk to them very often. When I left my parent’s home it became a bit more complicated since we all had to allocate some time to meet. Now that I don’t even live in the same country is even more difficult.</p><p>With services happen something similar. In a monolithic architecture all the code is in the same house. Any communication between services is local. However, when we split two services into different microservices we create some friction and we need to start taking into account cases we didn’t care before. What if the other service is temporary down? Or there have been some changes in the API?</p><p><strong>CONS: alignment between teams.</strong></p><p>Related with the above, another point is that it is needed more alignment between teams. I don’t mean that in a monolithic architecture is not needed. Nothing further from reality. Alignment is always very welcomed, but more alignment is needed.</p><p>If in a monolithic architecture several teams are responsible for its maintenance and one of them creates a breaking change, the other teams will realise very quickly. If the team creating the breaking change doesn’t notice before.</p><p>However, what happens in a microservice architecture if one team creates a breaking change in the API and deploys without notifying? Well, in the worse case scenario this could end up in a silent bug going to production. Something I’m pretty sure you don’t want to experience.</p><p><strong>PRO: Independence in the pipeline and the deployment.</strong></p><ul><li><em>Hey, we need to deploy a new feature.</em></li><li><em>Oh, sorry, wait. The pipeline is broken and we are working on fixing it.</em></li><li><em>Ok. You know when it’s going to be fixed. We need to do this deployment it’s a bug fix.</em></li><li><em>Don’t know, we’ve changed the way the pipeline works and it’s broken.</em></li><li><em>Oh, shit. It’s important to deploy this bugfix!</em></li><li><em>Ops, sorry. We’ll let you know when the pipeline is fixed so you can deploy.</em></li></ul><p>Does this scenario above sound familiar to you?</p><ul><li><em>We are going to deploy the new feature.</em></li><li><em>No, you can’t. QA team is testing the latest version which contains a critical change and all the deployments are frozen until further notice.</em></li><li><em>But, but,… if that feature is not even related with ours!!</em></li></ul><p>Or this one?</p><p>How many times have you been blocked due to changes or problems in the pipeline or some deployment issues due to some other part of the code or feature or service which is not related at all with the feature you are working on?</p><p>With microservices each service has its own pipelines, and flows, and deployment times and rules and it doesn’t depend on other incomplete features. If you want to have a different pipeline you can. If you want to deploy you can and no other service should block you (shit happens some times) and your team will have enough independence to choose the pipelines and flows and processes and deployment times.</p><p>Of course, that doesn’t mean you’ll become blocking free. But at least for the services which are under your control, you’d block yourself.</p><p><strong>CONS: split up of a service is painful.</strong></p><p>I’ve been in situations where we had to split up a service into several microservices.</p><p>Buuuuut, wait. Wasn’t this the promise land where everything is nice and beautiful? Well, sometimes shit happens. A microservice starts to not fit the single responsibility and becomes big. Or there are some changes in the scope. New features coming… There are several reasons that could lead to this separation into several microservices. Something hardly you’ll need to face in a monolithic architecture.</p><p>Then, at that moment problems can arise.</p><p>Some coordination with other teams and product owners to align when to deploy the new service/s, data migration from the old to the new service, dependencies between classes, between entities…</p><p>It can become really painful and ugly.</p><p><strong>PRO: technology diversity.</strong></p><p>You are going to start to develop a new feature for the product in you monolithic architecture. You think that, for this new feature you would need to use a relational database. But, I have bad news for you, because the current software uses a non-relational database. And same for the programming language. And same for any technology that might diverge depending on the needs.</p><p>Sure, sometimes there are workarounds and ways to solve this problem. But you are already tight to the tech stack already decided. It can end up being a hassle.</p><p>With microservices this problem doesn’t exist. Each microservice has its own needs, with its own decisions and its own tech stack.</p><p>You prefer to use a JSON objects DB for your new database? go on. You prefer to use C#? Sure! No problem! In the end, what matters is that the communication between them works as expected and there is no friction. What exists behind the curtains of the API is not a problem and technology diversity can exist deciding at any moment which is the best option to use for a given microservice.</p><p><strong>CONS: Entity dependencies.</strong></p><p>If you work with a relational DB you know it’s common to have scenarios where (don’t worry, I won’t talk about Users and Books…) table A has a relationship to table B, and also to table C and, perhaps, table B has it to table D.</p><p>If you have microservices, each microservice will have its own DB with, of course, its own tables. All separated from the other microservices and the other DBs and tables.</p><p>And now imagine that, for domain business reasons, table A is in one microservice, table B and D in a different one and table C to a third one. Funny…</p><p>Now imagine some funnier scenario. You have a service which has started growing to a point that you consider that needs to be split up in different microservices. And you need to move around tables. Tables which have relationships between them. Can you imagine the party?</p><p>In a monolithic architecture there is no problem. There is one DB, with all the tables in the same place and the FKs between them.</p><p>But in a microservice architecture? How to manage these relationships? What happens if an entity in a DB needs to be removed and has relations with entities in another DB?</p><p>Thins turns a bit more complex and one needs to be more aware when designing the architecture and defining the logic.</p><p>Then, is it better to have a microservice architecture or not? I think it is. It helps to make separate and independent services with independent teams with separate responsibilities and separate decisions.</p><p>Of course, always when it makes sense in your product and you are aware of the risks. And try to avoid a situation where multiple services are created and you end up with a microservice to generate random numbers. It doesn’t makes sense. Or probably it does? Who knows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdcf2f8b4089" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pull Requests]]></title>
            <link>https://morillas.medium.com/pull-requests-61616c9df082?source=rss-2e6aac941df3------2</link>
            <guid isPermaLink="false">https://medium.com/p/61616c9df082</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[pull-request]]></category>
            <dc:creator><![CDATA[Dani Morillas]]></dc:creator>
            <pubDate>Fri, 13 Nov 2020 11:06:25 GMT</pubDate>
            <atom:updated>2021-01-18T14:04:25.985Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VUC3e-HwZKxU_rkkeEoHlQ.jpeg" /></figure><p>Some times it comes in the shape of a notification, but many other as a harmless direct Slack message:</p><ul><li><em>Hey Dani! Good morning.</em></li><li><em>Hey, good morning, how are you doing?</em></li><li><em>All good, and you?</em></li><li><em>All good too, thanks.</em></li><li><em>I’d like to ask you if you could review a PR I just created…</em></li><li><em>Sure! No problem. As soon as I have time I’ll take a look…</em></li></ul><p>How naïve… Time?</p><p>You go to the PR and find 72 changed files, with 1298 added lines of code and 872 deleted!</p><p>Time? What I need is to take some days off to review your PR!!</p><p>Not so long ago I received another one that had… wait for it… 255 changed files!! I don’t remember how many lines but… 255 files!!</p><p>And the last one… It came accompanied with a very concise sentence: “<em>Please, help review this PR</em>”, and the link. Easy-peasy. I open the PR and …… 🥁 🥁 🥁…… 5825 new lines!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*MEN44d_RTo4JfpyS.gif" /></figure><p>But… really?</p><p>I’d need to borrow a whole new life to review that!</p><p>Although there are some developers who are against having Pull Requests I still think we can get benefits from them… I’m still of the opinion that PR are a useful tool we can get benefit from it… Of course, when we use it properly.</p><p>If you send me a PR as long as the British encyclopedia. If <em>Don Quixote</em> is a fairy tale compared to the PR, then probably it’s not that useful.</p><p>I understand that sometimes it will be unavoidable. You rename a class, a package, method or extracts part of a class to a new one or bumps a library to a new version that creates a breaking change… I understand this kind of changes might generate tenths of changes in the project. Changes that might affect many many files and lines.</p><p>But that’s not the problem. Because this might usually generate easy changes easy to review.</p><p>The problem is when you create a PR to review that you have been working on them since you were a child. And “<em>since I’m working on this, I’m going to refactor that” </em>or “<em>This other card is related to this one, I’m going to work on both in the same PR</em>”, or…</p><p>Do you know what happens when one needs to review such a long PR?</p><p>One is not completely focused on the PR and loses the track of it very easily. A colleague comes by to ask you something and distracts you and when you come back to the PR you don’t know where you were looking at. If you want to understand all the changes and the context you must jump among hundreds of lines to follow the thread of the code. Then another colleague comes by and ask you if you want to take a coffee. You go because you need to take a breath but when you go back to you lovely PR you are completely lost. Then you go home (because you have a life beyond this PR) but the next day you lost the track. You get married, you have kids… until one day you get tired of that PR that you are losing the track continuously and think: “<em>You no what? Fuck it, I’m going to approve it and see what happens. If something goes wrong we’ll fix it later on in another PR. I don’t care</em>”</p><p>If we want that a PR is effective and adds value to the development process it must be not so long. It must allow the reviewers to understand it, review it without much extra effort and easy to follow the new code. If we create a monster and we use one PR because “<em>Since I’m with this I’m going to do that refactor”</em>, “<em>I’m going to implement this task it was still left”, “I’m going to include my Degree Final Project”,</em> it loses the value of a PR<em>.</em></p><p>Probably you are doing more job that you are supposed. Probably the task or story is not well broken down.</p><p>Because when I have one of those cases in front of me I start to consider that probably <strong>trunk-based development</strong> philosophy is not a bad option.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61616c9df082" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>