4 min read

Tech Snippets #7

Welcome to the next round of Tech Snippets 🥭


Why You Should Never Use MongoDB

Although this article is from 2013, and can best considered old in a fast moving environment as ours, but I still think it is a super good read. After the No-SQL hype happened a few years ago, with MongoDB one of the most known, many teams started adopting it. I myself fall the hype that time, and worked with MongoDB in a few projects in the last years. And I totally agree with Sarah Mei's opinion, it was always the wrong decision.

I would always recommend to use PostgreSQL, it is a battle tested open-source SQL database existing for over 35 years, still in active development and having a great ecosystem in all languages. Also it is super extendable, it can be a time series database, a graph database, be used for geospatial data and JSON is supported natively.

MongoDB and other No-SQL databases have their use-cases, but really think it through before you make the decision to use it. Besides all the advantages that are advertised, the disadvantages are often not emphasized enough. Also a lot of advantages probably not apply to your use-case, like does your application really need to have a cluster of databases? Or some advantages never apply to you, because your data can be structured easily and using PostgreSQL you e.g. don't need to care about data being stored in different structured versions as you have migrations that ensures this for you, for free.

Why You Should Never Use MongoDB
Disclaimer: I do not build database engines. I build web applications. I run 4-6 different projects every year, so I build a lot of web applications. I see apps with different requirements and diff…

The world's smallest PNG

In this article Evan Hahn on one hand explains the 4 different sections (signature, metadata, pixel data and end of image) a PNG image is made up of. For every section he explains what it is used for. But on the other hand he also explores for each section what the minimal data is, that needs to be included to make it a valid PNG image. Resulting in the smallest possible PNG image.

Spoiler

The smallest PNG file is 67 bytes. It’s a single black pixel. To see how it looks check out the article ⬛

The world’s smallest PNG
It takes 67 bytes to make one black pixel. How does it work?

What is a File Format?

Now that you have learned what the smallest png image looks like and how it is created. You can dig a bit deeper and have a more "philosopy" look at what a file format actually is.

In this video LiveOverflow explores this technical question and discusses what a file format is, and provides a different view on it.

What is a File Format?
Let’s explore what a file format is, and provide a different view on it. We dive into polyglots, file format research and the impact on security.Funky File F…

Extra: Warum die Cloud dein Startup substanziell gefährden kann (bis zu 1000x teurer) – Paul Müller, Ex-CTO & Mitgründer Adjust [German Podcast]

The title basically translates to: Why the cloud can substantially jeopardize your startup (up to 1000x more expensive).

It is basically a 50 minute rant about the Cloud. But the three key takeaways I remember are:

  • The Cloud is expensive and charges things that are arbitrary. For example in the Cloud you pay for traffic volume, but on-premise you only pay for bandwidth and the amount of traffic basically does not matter. This results in optimizing for arbitrary Cloud costs and not real world limits.
  • Databases in the Cloud often use network attached disks, which makes read/writes 100-1000x times slower. Using bare metal with direct access to the SSD can improve your database speed significantly.
  • You don't need a cluster, you can easily have hardware with 1TB of RAM, 64 CPU cores and high-speed SSD disks.
Warum die Cloud dein Startup substanziell gefährden kann (bis zu 1000x teurer) – Paul Müller, Ex-CTO & Mitgründer Adjust
Cloud ist überall, Cloud ist der Standard. Doch Cloud ist unter Umständen deutlich zu teuer! Paul Müller, Mitgründer und CTO von Adjust (verkauft für 1 Milliarde Eu…

Thank you for reading and have a wonderful day ☀️