Posts

Showing posts from February, 2024

Your Code Is Only as Good as the Next Person Can Read It

Many years ago, I was tasked with delivering a unique software product. As was often the case when my services were enlisted, I was working on something that had never been done before. Without diving too deeply into the technical specifics, this was around the time I first encountered the amazing Objective-C programming language and the Model-View-Controller (MVC) pattern widely used in iOS development. I had also recently revisited Java, and most of the engineers on my team had a strong Java background. The technology we needed to use for this project was ECMAScript 5, or the old JavaScript. While I was already quite proficient in this language, my team was skeptical. "Is it really a programming language? Isn't it just a scripting language? Is it Turing complete?" they would ask. To accommodate my Java-savvy team, I undertook the challenge of transforming JavaScript into something it was never intended to be: an object-oriented language. Inspired by the se...

Real Food for Beginners

In this post, I'll teach you how to cook real food. Simple food, but not fast food. A delicious favorite from the Brazilian cuisine, "Beans with Rice". Only in my spiced-up, pragmatic variation. What you'll need: - Beans (one can of pre-cooked beans - you can also cook them yourself, but you'll need a pressure cooker for that); - Garlic (one or two cloves); - Onion (a small one is enough); - Rice (one cup); - Salt (two teaspoons); - Water (two cups). Optional: - Potatoes (one or two, depending on their size); - Season (any toasted and ground herb will do); - Soy Sauce (one tablespoon); - Tomato paste (one tablespoon). Preparation: - Bring the water to the boil, less than half a liter will do; - Start peeling the garlic, the onion and the (optional) potato, you can cut a tip from each side with the knife, so that it's easier, but please be precise and don't waste good ingredients. Chop the garlic and slice the onion and the potato. The smaller the bet...

Discipline Is Everything

Don't get me wrong: motivation is overrated. What you need is discipline. That's the ultimate tool for shaping a habit. It's the blacksmith of your iron-cast character. Motivation is frail. One day you feel like you have a limitless source of energy and you can get anything done. The next day you might have had a bad night's sleep and you can't tap on that magic bliss anymore. Either way, you should just grind it, whatever it is that you're doing. Whether you're having a good day or a bad day, trust me, it can get much worse when you reach tomorrow and you realize you did not put the work you should have done the day before. So you better stay true to your objectives. The tomorrow you will thank you for that. Set your goals, make a plan to achieve them and stick to it. There are really no shortcuts. Whatever may seem like a shortcut is just a distraction, a path to somewhere else, and not your original goal. It will only make you waste your time...

Not Living on Borrowed Time

A bit over a decade from now I thought I was done for. It started with a strong episode of migraine combined with vertigo that rendered me useless for a couple hours. I was working in a very toxic environment at the time and I thought it was just accumulated stress, but even though it might have been a key factor for the crisis, I decided, with a bit of incentive from my wife, to further investigate for some more underlying reasons for the problem. After visiting many specialists and doing several exams, I finally arrived at a neurologist who suggested I should see a cardiologist, and there I went. Apparently, I was born with a condition called Patent Foramen Ovale (PFO), which is basically an opening between the two upper heart chambers. It is very common, one in four people can have it. The problem is that because of this condition, blood clots can travel through the heart to the brains, causing an ischemic stroke, which was in the end found to be the cause for my sympt...

Firefox for the Win

I've recently tested a few interesting browsers. After using Safari exclusively for a long time, I saw myself forced to break free from the Apple ecosystem. Not because it's not good, mind you. It's great, actually. It just works. The problem is that I've found myself using some other devices where Safari will not run, and that would mean not having access to my bookmarks and passwords, basically the two quintessential lists that anyone with a digital life needs. I've tried Vivaldi, for example. Their offering is quite interesting. It's engine is based on Chromium, meaning it has reasonable compatibility with the current web technologies. It's feature rich, with some very interesting stuff, like combining tabs. I use separate windows for that, but the fact they put some care into understanding the role tabs have in personal workflows pleased me. And they also have their own free email service and social network. I was a bit skeptical of again re...