<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Leonardo Max Almeida</title>
    <description>The latest articles on Forem by Leonardo Max Almeida (@leonardo_maxalmeida_8e36).</description>
    <link>https://forem.com/leonardo_maxalmeida_8e36</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3736020%2F96138170-c9f1-4692-ac9f-ccc25f2ffaa1.jpg</url>
      <title>Forem: Leonardo Max Almeida</title>
      <link>https://forem.com/leonardo_maxalmeida_8e36</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/leonardo_maxalmeida_8e36"/>
    <language>en</language>
    <item>
      <title>404 with confused Travolta</title>
      <dc:creator>Leonardo Max Almeida</dc:creator>
      <pubDate>Thu, 16 Apr 2026 13:07:07 +0000</pubDate>
      <link>https://forem.com/leonardo_maxalmeida_8e36/404-with-confused-travolta-5eb4</link>
      <guid>https://forem.com/leonardo_maxalmeida_8e36/404-with-confused-travolta-5eb4</guid>
      <description>&lt;p&gt;Having fun with my 404 page by making confused Travolta look for the inexisting URL path. 😅. Try it out &lt;a href="https://leomax.fyi/anything-really" rel="noopener noreferrer"&gt;https://leomax.fyi/anything-really&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv98mjxzpoh4qimik63vt.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv98mjxzpoh4qimik63vt.gif" alt="404 with confused Travolta" width="760" height="749"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>sideprojects</category>
      <category>ux</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The hidden costs of additions to a system</title>
      <dc:creator>Leonardo Max Almeida</dc:creator>
      <pubDate>Fri, 30 Jan 2026 16:37:48 +0000</pubDate>
      <link>https://forem.com/leonardo_maxalmeida_8e36/the-hidden-costs-of-additions-to-a-system-1375</link>
      <guid>https://forem.com/leonardo_maxalmeida_8e36/the-hidden-costs-of-additions-to-a-system-1375</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;"The natural bias towards adding is strong and pervasive"&lt;br&gt;
–Alberto Brandolini, Event Storming&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Software engineers that were never exposed to the cost of their “additions” throughout their careers (in my experience, most developers who never worked at an early stage startup) will have a &lt;strong&gt;tendency towards adding complexity instead of reducing it (or at least maintaining it).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;They’ve never paid the price of maintaining those things they added because in bigger organizations they probably:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;moved teams more often, causing other people to pay the bill they created and/or;&lt;/li&gt;
&lt;li&gt;they had a Devops/Security/Finance team to offload part of this cost and/or;&lt;/li&gt;
&lt;li&gt;they were so focused on delivering tickets instead of value that they did not even realize that the work they are doing now is a consequence from their own decisions a couple of months back, and which could 100% be avoided.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Systemic thinking would allow them to see &lt;strong&gt;the impact of their additions not just in the short term but also in the long term, not just to the current technical system but to the overall people’s system that is the organization they are part of.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When doing a cost-benefit analysis of a given solution, you must take into account its hidden costs even if you are not the one paying it later on. Remember that as a value creator your goal is to save time and reduce stress to people around you.&lt;/p&gt;

&lt;p&gt;Example of &lt;strong&gt;additions with lots of hidden costs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a new database&lt;/li&gt;
&lt;li&gt;a new programming language&lt;/li&gt;
&lt;li&gt;a new framework&lt;/li&gt;
&lt;li&gt;a new pattern in the codebase&lt;/li&gt;
&lt;li&gt;a new external service&lt;/li&gt;
&lt;li&gt;a new server-to-server communication protocol (eg. REST, SOAP, GraphQL, gRPC) or pattern (eg. sync, event-driven)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the &lt;strong&gt;most neglected hidden costs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;higher onboarding cost of new team members&lt;/li&gt;
&lt;li&gt;higher context switching costs when working on that codebase or system&lt;/li&gt;
&lt;li&gt;higher surface area of things that can break&lt;/li&gt;
&lt;li&gt;higher surface area of things you need to monitor&lt;/li&gt;
&lt;li&gt;extra monitors you need to setup&lt;/li&gt;
&lt;li&gt;extra alerts you need to setup&lt;/li&gt;
&lt;li&gt;extra security patches and updates you need to be on top&lt;/li&gt;
&lt;li&gt;extra possible unknown-unknowns for your team that can cause outrages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you add all of those hidden costs up it will be clear to you that you’d need a REALLY strong reason for justifying that addition. That the reason should be based on the company goals and objectives for the long term, not just the optimal solution to the ticket at hand.&lt;/p&gt;

&lt;p&gt;As an extreme example, would you believe if I told you that you probably could have your current architecture at your current scale with just a server and postgres?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;”No way, I handle payment processing at a high scale and I need a queuing system.”&lt;/em&gt; Well, postgres natively supports that via tables storing payment events and consumers using &lt;code&gt;SELECT FOR UPDATE SKIP LOCKED&lt;/code&gt; semantics.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Okay, but I need Elasticsearch as a search engine for fuzzy text search.”&lt;/em&gt; Sure, but &lt;code&gt;pg_trgm&lt;/code&gt; gives you fuzzy and partial matching, ranking, and even stemming directly in SQL.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Hum… Ok, but for a specific part of the data structure we really need MongoDB for it’s flexible JSON documents.”&lt;/em&gt; Postgres has &lt;code&gt;JSONB&lt;/code&gt; that you can query nested structures, index them, and still join them with relational data.&lt;/p&gt;

&lt;p&gt;And the list goes on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;background jobs -&amp;gt; &lt;code&gt;jobs&lt;/code&gt; table + grab tasks with &lt;code&gt;FOR UPDATE SKIP LOCKED&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;recurring jobs → &lt;code&gt;pg_cron&lt;/code&gt; for native scheduling&lt;/li&gt;
&lt;li&gt;pub/sub → &lt;code&gt;LISTEN&lt;/code&gt; / &lt;code&gt;NOTIFY&lt;/code&gt; for lightweight real-time notifications
analytics → window functions, CTEs, and materialized views for reporting&lt;/li&gt;
&lt;li&gt;columnar storage → &lt;code&gt;cstore_fdw&lt;/code&gt; for analytical queries&lt;/li&gt;
&lt;li&gt;machine learning → &lt;code&gt;MADlib&lt;/code&gt; for in-database regressions and clustering&lt;/li&gt;
&lt;li&gt;ETL and pipelines → &lt;code&gt;http_fdw&lt;/code&gt; + &lt;code&gt;pg_cron&lt;/code&gt; for scheduled data ingestion and transformation&lt;/li&gt;
&lt;li&gt;caching layer → &lt;code&gt;UNLOGGED&lt;/code&gt; tables or materialized views as durable caches&lt;/li&gt;
&lt;li&gt;geospatial queries → &lt;code&gt;PostGIS&lt;/code&gt; for coordinates, distances, and shape operations&lt;/li&gt;
&lt;li&gt;vector search → &lt;code&gt;pgvector&lt;/code&gt; for embeddings and similarity search&lt;/li&gt;
&lt;li&gt;policy enforcement → Row-Level Security (RLS) for user-level access rules&lt;/li&gt;
&lt;li&gt;configuration store → versioned config tables with constraints and history&lt;/li&gt;
&lt;li&gt;auditing → triggers + &lt;code&gt;JSONB&lt;/code&gt; logs for a full change history&lt;/li&gt;
&lt;li&gt;REST API → &lt;code&gt;PostgREST&lt;/code&gt; automatically exposes CRUD endpoints&lt;/li&gt;
&lt;li&gt;GraphQL API → &lt;code&gt;Hasura&lt;/code&gt; for instant GraphQL on top of Postgres
file storage → &lt;code&gt;bytea&lt;/code&gt; or large objects for small to medium files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Again, this an extreme example and it doesn’t mean that keeping everything in postgres is going to be the right answer for all your use cases. I just added it here to show you what’s possible and to challenge you to think about this question on any given feature: &lt;strong&gt;“How can I achieve this business or technical objective by introducing the minimum amount of complexity, now and for the long run, for me and for my peers?”&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;This is a sample chapter/section from &lt;a href="https://leomax.fyi/book/" rel="noopener noreferrer"&gt;High Output Software Engineering&lt;/a&gt;.&lt;br&gt;
ps. also posted on my blog &lt;a href="https://leomax.fyi/blog/the-hidden-costs-of-additions-to-a-system/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>architecture</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
