Throw Less at the Problem
A few weeks ago, I was on a call with one of my mentees and he was creating a plan for a consultancy project he was working on. They were having issues with pages taking more than 30s.
Principal Architect at @VidaLung, MSc Computer Science and Nun-db maintainer
A few weeks ago, I was on a call with one of my mentees and he was creating a plan for a consultancy project he was working on. They were having issues with pages taking more than 30s.
In software Naming things is hard, and a pattern is giving a problem a name, I love the quote from the book, “A Pattern Language” “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.” Christopher Alexander.
The people!
It depends! I don’t think we are welcome in Big Cities any more in Coffee shops but there are alternatives.
I particularly don’t like using the code coverage as a metric to drive the tests I write. Nevertheless, there is a lot of value in knowing what parts of your system are covered by tests or not.
Last week, I was surprised by an email from Andy Pavlo (Associate Professor with Indefinite Tenure in Databaseology in the Computer Science Department at Carnegie Mellon University) asking me for an SVG logo and what is the official name of NunDB because he had included it in the Database of Databases. I responded to the email 9 minutes later and in a few more minutes. It was a mix of joy and pride.
For those who do not follow Bodybuilding, last Saturday, we had the Final Classic Physics for Arnold Ohio, among the competitors there was a Brazilian called Ramon dino that was the favorite for the title this year because he won last year. Not only that, but Ramon is known to have one of the most favorable genetics in history, and everyone is sure that he would win.
When I see projects like gpt-pilot, I can’t help but think they will accelerate the pace at which we produce systems today.
I first heard about this book from a famous YouTuber, whose content I love to watch. The book, recently published by him, seemed like an interesting read for the beginning of the year.
No one is born a software engineer; that title still needs to be fully understood, yet software engineering is still being defined, and we are still trying out methods that may be called engineering one day. Nevertheless, this post is for those who want to become Software Engineers.
Welcome to my yearly post about how to become a better developer; here, I share what I have learned in my last 16 years working as a Software Engineer and what I do to make myself more productive in my full-time job as a Principal Architect in a fast-growing American Startup, running my own SaaS business serving over 6k users monthly, teaching in-person Data Structures at the FasF Faculty (in Brazil) and working on my Open Source project Nun-db in my free time, I have to learn how to do things efficiently and that is what I share in this post yearly.
I was writing my annual post about how to become a better developer, and I wanted to add a topic about dealing with latency and how to test latency problems in local and dev environments. When I found a bug in Nun-db where, under high latency, two servers could be in the same cluster and consider themselves the primary.
Remotely controlling medical imaging visualization enables many use cases; for example, in education, the professor can ask all students to open the same study and manipulate the image from their computers at the lab, and all students can see it reflected immediately on their screens. Or, for example, in collaboration between two doctors while analyzing a patient case.
We have recently taken an important step towards pushing Nun-db into mainstream use cases. Now, assigning multiple users to a single database and defining different permission levels for each is possible. In this tutorial, we will walk you through the process of creating two different users, one to be used by the front end of your application and one to be used by the back end.
The book Efficient Linux at the Command Line was a relieving reading. I was already sold on the idea of the command line, and when I heard about this book, it took my attention immediately; I read the book without any hope of learning anything new, but hoping I could learn at least one new trick. I learned things that significantly improved my productivity, including the CDPATH, and now I cannot imagine how I lived so long without it.
My number one source of stress about running a SaaS business is outages, I mentioned this in a past post, but even when working on other companies, that problem can still hit us, and that is when you are on call. Being on call means you are available for the organization to act if an outage happens, and you will work on getting the system back to a working state.
In my case, the match was faster, with a median of 114.70 ns
, while the Hashmap had a median of 123.43 ns
. Nevertheless, I decided to move on with my Hashmap implementation. If you want to understand a bit more about my experiment, let’s dive a bit deeper.
The initial focus on Nun-db was to be fast and easy to use, then we moved to make it infinitely scalable and to deal with data conflicts as a first-class citizen, bringing even a few offline capabilities. Now it is time to think a bit about Security; up to this point, it has not been the focus. Security will probably drive the next six months of updates to Nun-db core, and the goal is to make it more suitable for production apps out of my control. While I will be writing examples of how to use Nun-db, my goal is to secure the database.
This book was a recommendation from a very senior close friend, which is why I started reading it. At the beginning of the book, I was in the middle of implementing distributed tracing for the customer I was consulting for, and it gave me rich and practical information on the implementation, such as the information I might like to store on the traces and the drawbacks from tracing all or sampling requests.
This tutorial will demonstrate how to implement NunDB in a Trello-like application, making it a durable and offline-capable database. In this tutorial, we’ll explore how NunDB can be used to create a real-time collaborative app with conflict resolution capabilities. As the major goal of the project is to show how to deal with conflicts in NunDB, we will not try to auto-merge the models.
Mob Programming is a technique to get all the team to work on a project at the same time. I Mean all developers, QA, PM and others, everyone working in the same screen with a single keyboard.
A few weeks ago, I delivered one extremely challenging project, and now I am using the energy to write this post that I have been postponing forever. If you want to grow as an engineer, you must take on challenging and most likely to fail projects.
“We are rushing too much, we will miss many details, this will not end up well”. These were my words to the director on a project we were rushing to deliver. The odd part is that in times like that, working 10 hours a day, on weekends late at night and earlier in the morning. You may try to predict what will go wrong, but I guarantee you won’t be able to cover all details needed when running that much.
Conflict resolution is now, is a first-class citizen of NunDB, and in this post, I will show how to explore the new capabilities and features.
This book has been recommended to me many times, yet I never wanted to read it because I was already sold out on the idea of waking up earlier. I have been waking up at 5 am for at least four years now since I started my master’s degree while working on a fast-growing startup and had a much bigger load than I could handle. So I decided to read to book to rest a bit from a few complicated and slow technical books I am reading. I did learn a few lessons from the book that made the reading worth it.
2022 was the year to change directions on NunDB. After driving some adoption in 2021, I decided to shift NunDB to be leaderless (Not depend on a single primary node to operate) to be more aligned with my goals of a never-down service. That cost us a lot of time invested in research and coding. Nevertheless, it was a fantastic year with lots of internal improvements, consolidation, and learning.
In 2008 when I started working in what would become my SaaS company, one of the major concerns of my customers was if E-belle (my product) would work offline. The Internet was not great in brazil, and mobile networks were slow and expensive, making them not trust they would have their data when needed. I did many unsuccessfully POCs to make that a reality and needed to come up with many alternatives to convince my customers it would be safe to use a pure web product.
This review comes a little late. I mentioned this book in the post Secrets for becoming a better developer in 2022. Yet I could not live without writing down this review. This book was a great surprise.
A few days ago, I was promoted to Principal Software Engineer, it has been a while since I decided to get that title, so I decided to briefly describe my path for that in this blog post. If you are considering becoming a principal soon or moving to management as a side track, this post is for you. This is a more personal post, if you are looking for tips and tricks on becoming a better engineer. I recommend you to read my series of Secrets I use to become a better developer in 2019,or 2020 where you gonna find many of them. If you want to read more about my career, hang around.
Many people recommended me this book, yet it took me a long time to read it because I was already convinced that good habits are the way to win in life. I thought it would be a waste of time. I only decided to read because I was procrastinating to finish other more complex books and wanted something easier to read. What a great surprise this book was, I learned so much from it.
Argo workflow is an excellent tool for orchestrating load tests.
If you are here for the first time, I don’t usually write this kind of post, but it was pretty hard to find a simple code to fold a HasMap in rust.
When I started Nun-db, I intended it to be an in-memory database for several reasons. For obvious reasons, I eventually needed to snapshot it to the database to disk. At that time, I decided not to spend too much time thinking ho how the data would be on disk. Therefore, I decided to use a serialization lib and move on with my coding with the more important stuff at the time. I used the lib bincode
that did a good job at the time and took less than 2 hours to implement. I knew the time to write my own serialization structure and disk storage would come eventually. Well, that time is now.
I don’t write about my company very often. I work only about 4 hours a week on it, so I don’t have much to share. This Sunday, as I was reviewing the annual metrics for my SaaS, I felt like sharing the one metric I like the most.
Burnout is common in our field [1] [2] [3]. If you work with programming for long enough, I am sure you already experiment some level of burnout yourself. So the question is, how not to burnout working on hard problems?
This is the first book I abandoned and decided to put out an review. Why? Because the subject matters to me yet, the practical tips do not apply to my current situation.
In 2020 I wrote a post titled “Are you working remotely? You should be ready to hit the road at any time”, at that time I knew little about what was to come and this pandemic made me rethink lots of stuff I use to do for remote work. Remote work is so ordinary that it is no longer cool, but the subject remains.
I believe every developer knows this in their heart, yet sometimes we still ignore it. I procrastinated with one flaky test for a long time in my project Nun-db.
This is a controversial book. They claim to be an “Engineering Approach,” but the text is full of opinions and personal tips based on the author’s experience, yet I liked the reading and how the authors structured it. But if you don’t like opinions and prefer a more scientific approach, this is probably not a book for you.
This is the story behind the fix of one race condition in Nun-db. In this post, I went over the process to find the race condition by eliminating two initial theories and finally identifying the root cause, fixing it, and validating the fix. If you only want to see the results go straight to 3. Third and correct theory: Are nodes acknowledging messages before they are registered as pending?
In this blog post, I document the decision to create a command called Debug
to Nun-db. As we scale on usage and features, more complex problems are showing up, and it is about time to start adding features that will help manage Nun-db as Database administrators. If you unintentionally got to this post and want to read more about Nun-db, go to Github repository will be much richer information about the Database. The rest of this post will be focused on people familiar with Nun-db code.
This was an excellent year for Nun-db; at first, I thought it would take me a lot of time to get some adoption and bring external users to use it, but it was super quick.
Working in Public is an excellent book, in my opinion, but I am unsure who I would recommend reading blindly. If you are doing open source, I am sure it will be a great source of inspiration and information. It would also be an excellent reference for people out of open-source to learn how we operate in the software industry since it is hard to explain why super-smart people work thousands of hours for free to give the result of their work for free work well to everyone.
In this post, I will show my thought process to get the Nun-db Prometheus exporter from idea to POC to repository to the final Grafana chart. I have used Prometheus for a long time, but I never took the time to understand how the exporters work in deep. So it seemed the obvious choice when I started to look for an alternative to improving Nun-db observability. Observability is a must-have for infrastructure components like Nun-db, and I want to make sure we will monitor what we need to make it successful.
Testing is essential for developing good software. It is hard to keep speed and quality on software development without having a great test suite. I particularly like all levels of tests, and I think they are all vital, from the unit test, integration, to end-to-end tests. Each will run faster or slower than the other and cover a more significant part of the stack.
The book was a great surprise. I found this book on a list on the Ali Abdaal as books to read in 2021. The title got my attention right away as I am notes addicted, and since Ali was recommending it, I decided to give it a try.
Every year I like share what I have learned. I will do my best not to repeat myself and be as practical as possible with this annual post. Last year I shared a post where I talked about the following subjects.
Staff Engineer Leadership Beyond the Management is the first book I read in years that a friend did not recommend. It initially got my attention because of the title in an auto recommendation from amazon. I decided to buy it as soon as I see it included an interview with Damian Schenkelman (I met him some years ago at an event in Brazil, and he seemed to be a great engineer, in the worst case, I would get some updates about his career).
I started Nun-db to be a real-time database of one product I was building. One of the goals for that product was never to be down.
In this tutorial, we will show how to add Nun-db to an already existent react/redux app. This project is a copy and paste of https://github.com/reduxjs/redux/tree/master/examples/todomvc + adding Nun-db as a database that makes it real-time and durable.
Overall I think the book is direct and practical. I felt like reading a programming language book with lots of “Howtos,” except that it is about management and business. The 4th Chapter, The people’s content, got my attention especially. It does build an exciting framework to find the right people. The author highlights a few characteristics that seem to identify great professionals, to list the ones that got my attention, “
The book was by far the most useful, inside a full book I read in the last year or so. It may be because I am have been working on Nun-db (a real-time database), but I think I would have liked it just as much in the past as well. First of all, the book has been recommended to me by a friend that the opinion I respect a lot (A Ph.D. in Computer Science), the title immediately caught my attention and I have been reading it since the day I put it on my kindle.
I have been working on Nun-db as a side project for over two years. Finally, in June 2020, I got it running as the unique real-time database for my main application. In the post, I shared that milestone. Since then, a couple of other applications have been starting using Nun-db, e.g., a chatbot, a real-time visitor for my blog, a house price scraper, a tic tac toe multiplayer, etc.
NunDB is an in-memory database that means we store all the data mainly in memory for speed (this helps keep NunDb fast). The obvious drawback is that if you are hosting your own NunDb and you have a server restart or need to stop it for any reason, you may lose what is in memory.
Last year, I started working as one of the tech leaders on a performance optimization project for one of my employer’s customers. At first, the team started using a regular Kanban process, so an engineer would pick some part of the code to optimize and work on until we felt good about the improvement. To me, it felt not to be the right approach to the problems we were trying to solve.
One of the features I like the most about Google Analytics is the real-time user track. Randomly during my day, I visit the real-time analytics of all products I run to see how many people my work is impacting at that time. It gives me the energy to see my work affecting other people. On the other hand, there are some drawn backs of using google analytics, to name a few:
The book Atomic Habits is a classic and a consensus among productivity and self-improvement actors (Youtubers, influences, writers, etc.). It did not introduce any new profound concept I have never seen in some other source. On the other hand, the author outstandingly exposes the ideas behind acquiring new habits. The idea of driving your habits in the direction of the future version of what you want to become is not evident in other books, and it proves to be a good idea.
A group of friends and I maintain a telegram group to talk about investing. A few years ago, we developed a chatbot to search for some stock prices once we post the stock’s name. The bot is quite simple and makes it fun since you don’t need to google or any other platform to see the price of the stock you want to check (Check out the image one of me getting the price of bitcoin).
Adopting Elixir: From Concept to Production is an excellent book about adopting new technologies. I would recommend it to anyone who plans to migrate a legacy system to any new technology, not only Elixir, manly the initial character that contains extensive insides about approaching the migration.
It has been a year since I open-sourced NunDB. That happened when https://www.teknisa.com invited me to give a talk about real-time processing. At that time, I worked on NunDB for over six months, and I thought it would be an excellent opportunity to announce the project. It was called “Freira-DB” back then, and the goal of this post is to update the NunDB and what has happened during this one year.
I have been working as a remote developer fulltime, for the last five years. Part-time/freelancing for at least ten years, over this time, I have collected several tips and tricks on how to become better at it and how to succeed and deliver results under this environment. I am writing this post to share some of these tricks, while this is a brief list. I am always testing these things. I thought it would be useful to do this one and periodically create a new one to share some updates.
I needed a realtime database for two personal projects I was working, a time tracker (not public yet ) and http://ebelle.vilarika.com.br, the natural decision would be to use something like Firebase, but I was looking for a light open-source alternative turns out I did not found one as simple as I wished, so I decided to build one. My needs were simple, I need my frontend to be updated whenever the data change in the backend (And I do not want to implement a new WebSocket for each of my application). Here I will not give many details about how I build NunDB. You can read it [not public yet], but I will focus on how I went to production with it for my project Ebelle.
I have recently been working on and delivering some projects using pure react and react + redux, and it seemed like something was missing that would make working with them more reliable. Early last year, I started learning new front-end architectures using react to a POC for one of my customers. I came across the combination react + redux + redux-saga, which felt pretty healthy to me as the right solution for lots of problems I had faced in recent projects. Since then, I have wanted to try the combination in a real-world project to see if it scales or not. The opportunity came early this year when I needed to create a new mobile UI for one of my personal SAS solutions, so I decided to give it a shot. After developing the first set of features, I found myself doing a lot of repetitive work that delivered few new features or improvements.
One of the most significant advantages of working remotely is choosing how and where you work. That is what makes a big difference from a person working in an office. On the other hand, sometimes, you feel you have no focus or unproductive working on your home-office. The simple fact to go somewhere else will make you be much more productive and get your attention back. That happens because novelty produces dopamine, and dopamine increases focus.
I have been working remotely full time the last 2 years, since I join Tenfold (https://www.tenfold.com/), almost at the same time I was starting to work toward a master’s degree in Computer Since(You can see some info about my research here). Those are two demanding activities I have to deal with on a daily bases. To achieve my goals on both I have been testing myself on all the ways possible, on how to be more productive in these last two year, and this is the first of a group of articles about what I have learned an tested and what has worked or not.