<?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 Serigne Saalihou Mbacké Ndiaye on Medium]]></title>
        <description><![CDATA[Stories by Serigne Saalihou Mbacké Ndiaye on Medium]]></description>
        <link>https://medium.com/@saalihou?source=rss-4551fb0aabe6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Serigne Saalihou Mbacké Ndiaye on Medium</title>
            <link>https://medium.com/@saalihou?source=rss-4551fb0aabe6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:19:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saalihou/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[Abstraction in software (part 1)]]></title>
            <link>https://medium.com/@saalihou/abstraction-in-software-part-1-ac91d43eb5ed?source=rss-4551fb0aabe6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac91d43eb5ed</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Serigne Saalihou Mbacké Ndiaye]]></dc:creator>
            <pubDate>Tue, 14 Sep 2021 00:52:34 GMT</pubDate>
            <atom:updated>2021-09-14T00:52:34.152Z</atom:updated>
            <content:encoded><![CDATA[<p>A crucial element in any good software is good abstractions. Good abstractions play a crucial role in the success of a software project because it enables the following:</p><ul><li>Easy implementation of new features by building on existing abstractions</li><li>Less opportunity to introduce bugs because the abstractions stay relatively stable, only being supplemented with concrete implementations</li><li>Allows you to easily expand the team and its velocity without running into the infamous “too many chefs in the kitchen” problem</li></ul><p>So identifying the right abstractions in a software project is essential. And that is the reason why I decided to explore the concept of abstraction and truly understand it from every possible angle. This (hopefully) series of articles is destined to put my findings in writing.</p><p>The first thing I needed was to define the term abstraction, in the context of software engineering (not the broad term, nor the closely related mathematical term) and the two definitions that struck me the most were:</p><ul><li>Abstraction as a way of hiding complexity</li><li>Abstraction as a way of generalizing a concept</li></ul><p>These two definitions seem to be the steering wheel behind most abstraction efforts I’ve encountered so far. Every abstraction effort that has been done in software has always one or both of these purposes in mind. But what really struck me is that these two paths that one can take on his journey to the perfect abstraction of a software system can sometimes intertwine, sometimes diverge, sometimes follow completely opposite directions from each other. And in order to properly navigate these two roads, let’s try and identify the meaning behind each of these definitions.</p><h3>Abstract to hide complexity</h3><p>The first concept we learn in programming is that writing a program consists of giving a computer instructions, telling the processor what to do. Yet when we take any kind of computer hardware lessons we are told that in the end is all about moving bits around. But we rarely interact with those bits directly through our programming languages, we build on top of <strong>abstractions </strong>provided by the compiler of our programming language. The compiler itself builds on top of quite some abstractions. First the assembler which allows it to spit out assembly language level files instead of binary instructions, but also the operating system, which might be the best collection of abstractions we have had so far in our domain. But even the operating system relies on abstraction from drivers, but we’ll get into that later.</p><p>My point is the whole software industry as we know it today is built on top of abstraction layers. When I printf to the console, I have absolutely no clue how electricity is driven through to the LCD panel of my monitor to light up just the right pixels on my screen and display the information I want to show. And don’t even get me started on windowing systems.</p><p>So it is clear that hiding complexity through layers of abstraction is beneficial to the world and is a driving principle behind all software engineering efforts. But let’s get into the second kind of abstraction, the generalization kind.</p><h3>Abstraction to generalize a concept</h3><p>The easiest way for me to convey this kind of abstraction is through something we all know and love, data modelling. As Linus Torvalds put in the git mailing list in 2006:</p><blockquote>git actually has a simple design, with stable and reasonably well-documented data structures. In fact, I’m a huge proponent of designing your code around the data, rather than the other way around, and I think it’s one of the reasons git has been fairly successful</blockquote><p>Once we’ve gathered requirements as software engineers our first modeling efforts usually gravitate around the data model. The client just introduced a bunch of new information into our brains, real world concrete information. If you want to make your software system easy to write and maintain (and I’m not talking just about corrective maintenance, but sooner or later you’ll be asked features never before mentioned, that’s just the nature of software) you will need to distill down that information into the essential ideas and concepts that summarize it as much as possible. The right data abstraction will make your code linear, modular, easy to augment without breaking existing assumptions (and you will have to make a lot of assumptions when designing software). Refactoring existing code will be a breeze and at the end of the day, when inevitably your stakeholders want to decrease time to market by hiring additional developers, you can communicate the quintessential ideas behind the system easily to another developer. Expanding your development team becomes less of long pairing session nightmares and more of a walkthrough of the distilled concepts that you carefully mapped from the requirements to your design.</p><p>This obviously also applies to software structure abstractions not just data model abstractions. Standards and protocols are built on this principle (imagine having a completely different set of instructions to talk to hard disk drives from one manufacturer to another, thank God for AHCI). Software frameworks are built on this principle (getting the right frontend development abstractions is one of the reasons React is so popular, and getting the right abstractions for the different platforms is one of the reasons React Native is so popular).</p><p>The key word behind all this is <strong>the right abstractions</strong>. Because what is even worse than having no abstraction at all is having the wrong abstractions, as those will paint you into a corner and any effort to force the newly found ideas into those erroneous abstractions will simply exponentially increase the complexity of the software.</p><p>And that’s where the two kinds of abstraction meet to become one, to fight complexity. They both take different avenues but aim to end up at the same location, reducing complexity. One is simply <strong>abstracting away </strong>complexity by hiding it under a language that is closer to the ones our human brains are used to, the other <strong>abstracts heterogeneous behavior</strong> by providing a homogeneous interface and reduces the contact surface area between different software and hardware modules, the known things, to the absolute minimum in order to provide flexibility in the implementation.</p><p>When the two avenues are navigated properly the software ends up in a fairly maintainable state and adding new features feels like a natural extension of the system.</p><p>But when they are not navigated properly, the software ends up being torn between two opposites and either one purpose defeats the other or it becomes a never ending battle to keep both wheels on the road and usually ends up with the software toppling into the sand.</p><p>In the next article of this series we will look at concrete examples of good and bad abstractions we encounter everyday in the IT world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac91d43eb5ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Start-up Code Curve]]></title>
            <link>https://medium.com/@saalihou/the-start-up-code-curve-aa0cfdb3f265?source=rss-4551fb0aabe6------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa0cfdb3f265</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Serigne Saalihou Mbacké Ndiaye]]></dc:creator>
            <pubDate>Sun, 30 Dec 2018 19:48:57 GMT</pubDate>
            <atom:updated>2022-11-15T00:03:36.444Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve recently read the book “The Start-up J Curve” by Howard Love, that talks about the major steps a start-up goes through. Basically, in the book, Howard states that throughout its journey, a startup typically goes through the following steps:</p><ol><li>Create: the moment where you assemble your team and build for this awesome idea you have</li><li>Release: the first time your product hits the market</li><li>Morph: when you realise your product didn’t quite get the appraisal you were hoping for so you start “morphing” it into something that resonates more with the market</li><li>Model: after achieving a product market fit, you look for a profitable business model</li><li>Scale: expand your team, formalize your processes, expand your market</li><li>Harvest: cash out 💰</li></ol><p>I glanced at the commit count graph of our mobile app repository and noticed an interesting curve too. I call it (very shamelessly) “The Start-up Code Curve”. Here is what ours looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*1-VfOy4SidvzFGASdlhEjg.png" /><figcaption>A graph of the commit count of our mobile repository with prominent sections highlighted</figcaption></figure><p>So I tried to analyze the steps of that curve. It’s not a perfect model and certainly varies from startup to startup (depending on external factors you will experience, just like we did) but it’s a good pattern to compare your own curve to in order to gain more insights into what happened on the technical side of your startup in relation to that J curve. During each phase, I also try to give some technical advice that will help you get through that phase as well as some considerations you have to take into account if you want your software product to be robust down the line.</p><h3>Initial hype</h3><p>The first part of the graph you probably will notice is a steep curve that represents the initial hype you and your team experience when you start bringing your ideas to life. This is an exciting moment, especially for software engineers, who love building new things from scratch because it gives them the freedom to experiment without being entangled by “legacy” decisions. At the same time, this is where your new and disruptive idea is so appealing and the dream still so alive that all your engineers are just going at it without glancing at the clock. If you have ever been in this situation, you know how it feels.</p><p>During this phase, you will be making a lot of architectural decisions as well as tooling choices for your product. What architecture do we go with ? What database are we going to use ? What language are we going to use ? What framework are we going to build it with ? All these decisions are very important ones that will impact your ability to develop new features and the maintainability of your product overall. You want to be thoughtful of the advantages and shortcomings of every decision you take (and document them) as you take them. But you don’t want to spend an eternity comparing and deciding neither, since time will run out and the hype will die down (for your customers and investors at least) if you do not come out with some kind of first iteration fast enough.</p><p>One particularly decision we did not regret taking was to build our backend services using a service oriented architecture. I won’t go into the details of what SOA is, but the modularity we gained from taking such an approach gave us two benefits:</p><ol><li>We were able to take individual decisions about individual components of our software backend as we developed them, instead of thinking about everything at once when making those decisions. For example, we were able to go with a traditional relational database for our shopping service, but decided to adopt a graph database for our route search service that would give best route recommendations to our users for getting to a certain destination. That flexiblity made us less anxious when going with a technology simply because the decision affected a smaller piece of the overall software and was thus less impactful as well as easier to reason about.</li><li>Today, as we reconsider some of the design decisions we made back then due to the vision of the product inevitably shifting, we don’t have to suffer from a plague that affects a lot of startups, “rewrite everything”. We can simply redesign small components of our stack without having to redo it all over again. For example, our tracking service, responsible for gathering and storing positional data from our users has undergone a major overhaul over the last months as we completely redesigned the way we collect, validate and flush those positions from our users. But because it was small and self contained, we were able to bring in those mutations without changing other parts of our software, and it still worked!</li></ol><h3>Approaching deadline</h3><p>The next big mark on this graph is a huge bump towards the end of December 2017. Surprise surprise, this was our deadline! As a software team, you know that an approaching deadline usually means more and more sleepless nights trying to make sure that you can hit the goal you promised to your customers. This results in more frequent commits to your codebase.</p><p>But when under heavy pressure, we software engineers tend to make questionable decisions. We tend to lean towards “fast solutions” that are quick to implement but hard to maintain rather than “good solutions” that may take more time to implement but keep the project in a sane state as far as maintainability goes. As always, during this phase, you don’t want be on either of the extremes. You don’t want to outright write bad code just because it will help you hit the deadline faster as that usually means more bugs, a harder to understand codebase as well as the inability to develop new features down the line because you will be crippled by the those “fast solutions”. But you also don’t want to overengineer and try to find the perfect approach to every problem. You will find out that after the initial launch, your product will inevitably shift anyway, and whatever “perfect” solution you had will change. So you have to always ask yourself 2 questions. Is this going to be maintainable down the line ? Am I solving for a problem that did not even present itself yet ?</p><p>One particularly bad decision we took was to embed our bus position prediction logic into our tracking service initially. We did that because we were worried that spinning a whole new service at that point in time would have slowed us down initially as we ultimately would have to wire that service up into our infrastructure and it would very much depend on positions collected by our tracking service. Unfortunately adopting that “fast solution” of embedding it made it harder to evolve the tracking service down the line when we needed to and possibly made the business lose more time than it won from us taking that decision.</p><p>At some point, we were also presented with an opportunity to over engineer for a problem. We needed a way to visualize what was happening within our tracking system. What positions did it collect, which ones did it reject, which one did it recognize, validate and flush. At that time, instead of building an overly complex tool whose purpose was not even very clear at that point, we instead decided to simply rely on logs that the tracking system would produce as well as a visual database explorer. That exponentially reduced the time it took to have that “feature” and allowed us to better understand what our needs really were before going all out on designing the real tool.</p><h3>First bug fixes</h3><p>It is well known that no matter how much you test your software product, your end users will always find a way to break it! So be prepared. This phase usually happens right after your first release as users get their hands on your product and use them in very unexpected ways.</p><p>During this phase, you will want to address the bugs in the most efficient manner possible so they can be patched as fast as possible. Leaving bugs unpatched in your product can be a very frustrating experience for your customers and lead them to simply never adopt your product again. One thing you always want to have is a very systematic approach to bug report. Always get a template for bug reporting that forces whoever reports the bug to give your software engineering team as much information as possible to be able to solve it, from reproduction steps, environment under which the bug occurred, assumptions to be made etc. Not thoroughly documenting a bug only leads to it taking more time to be fixed, and time is not on your side once your product is out in the wild. You will also want to have a crashlytics tool by your side during this phase so that you can automatically gather as much information as possible from your users (stack traces, device, browser, time, logs, etc). Labelling your launch as a “beta” launch also helps in making your customers more patient and tolerant towards your product but that’s ultimately a business decision.</p><p>This phase will also strongly be affected by how “debuggable” your codebase is. Unfortunately by this time most of the decisions that affect the debuggability of your codebase have already been made in the first two phases. If your project is an entangled mess of spaghetti code, now is definitely not the time to rewrite it because you have customers and product owners shouting “fix bug pls” at you. Some practices you could have adopted and can still adopt in a certain way will help you during this phase.</p><p>Traceability is probably the most important characteristic that will help you here. When a bug is reported, the first (and often most difficult) step is to find out what in your codebase causes that particular bug to occur. And when you have millions of possible paths that a user action can lead through as well as different combination of states that your software can be in, you will start questioning your career choices. There are a bunch of good practices in software to get that traceability: error stacks, logs, simple and easy to follow code paths, single responsibility components, loosely coupled components, well defined interfaces, clearly defined boundaries, declarative approach, functional approach. One really good approach we took and are proud of on our mobile stack is taking a global state driven, one-way data flow, event based and functional approach to our UI. It’s a state management library that is called redux that is inspired from a pattern that some folks at Facebook coined Flux. Simply having the redux developer tools and seeing all the events that were dispatched during the lifecycle of the app as well as how they affected the global state, on top of having clearly defined rules on who can mutate that state and how they are allowed to mutate it, made every bug easy to track down, identify its source, and fix while making sure it did not affect some other unrelated feature.</p><p>Speaking about breaking unrelated features, this is also something you will dread, especially under two circonstances: your components are too strongly coupled and/or your software is not sufficiently covered by automated tests. So you will want to keep that in mind as you go through your software development journey.</p><h3>The wrap up</h3><p>These 3 phases of the startup code curve cover most of what will happen during your initial journey in the ecosystem as a software startup. From the initial idea to the first release, you will most likely encounter all the issues mentioned above and I hope that this article equipped you with some thoughts that will help you address them more efficiently and pragmatically. I will write a second part to this article that will cover the two following phases a startup typically goes through (the morphing phase, and the business model phase) and how they relate to your project on a technical level.</p><p>Thanks for making it this far, don’t forget to leave some claps if this article was of any help and definitely let me know what you think about all of this in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa0cfdb3f265" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>