Today I am turning 40 years old. Which, while not exactly great, is better than the alternative, so kudos to me for still being alive! đ
I am a pretty lucky person. I was born in one of the best, richest countries of the world. I feel safe, I have a good job, I am pretty healthy and I have a lovely family. But, for the past couple of months leading up to this milestone, I have spent a lot of time reflecting on life and failing to fall asleep due to the existential dread of having already used up half of my time , and Iâve been thinking about writing this post for a while now.
So, without further ado, hereâs my version of the â40 things Iâve learnt over my 40 yearsâ trope. Itâs definitely too long, and I fear it is a bit cheesy and clichĂ©, but Iâve tried to be honest and I hope youâll enjoy this.
Life Link to heading
By far the most important one: be decent. This means a lot of things: be respectful, try to do the right thing, put some care and effort in your work, be kind to strangers, call your parents. But, honestly, you donât need me to explain what it means. We all know what the decent thing to do is, and we all sometimes falter by slacking off, being rude, or ignoring some problem you saw and thinking âsomeone else will fix itâ. The important thing is not to be perfect, but to be honest with yourself, recognizing when you should have done more, and trying to improve. You only have one life. It might not be amazing, but it shouldnât suck. If it really does, do something to change it. Donât obsess over things you canât change. Social media are, at best, a waste of time. At worst, a tool of political manipulation and misinformation. Avoid them and pick up a book, a TV show, a movie, a video game, a text editor and compiler, a pet, whatever. The past is the past. Learn from it, but move on. Admit when you fuck up. This is something that I almost never see anyone do, sadly. When someone makes a mistake, they immediately start to explain why that happened, why the situation was complex, why it took longer than expected, etc. Just be straightforward: âI didnât think about that and I should have; sorry. Thatâs on meâ. Itâs so refreshing to hear and makes everything simpler if someone actually has the guts to admit a mistake. Remember that everyone struggles and has their own problems. Be nice. Though some people really are assholes. They arenât worth your time. Also, no matter how nice you are, some people will just not like you, no matter what. It happens. Keep trying to be polite, and donât lose sleep on it. There will always be people smarter, kinder, better, fitter, more successful than you. Donât compare yourself to others; compare yourself to your past self. (This is a difficult one.) Exercise. Barring tragedies, you will get old, and youâll be glad you still have strength and flexibility. The world is not as bad as you think it is. Whatever you write on the internet, whichever picture you post, stays on the internet forever. Err on the side of being discreet. If every week youâre spending half of the standup complaining about the same stuff, maybe you should search for another job. Or, at least, learn to suffer in silence. Please. Treat your job like what it is: a financial relationship between you and your employer, where you do work and you get money. Thatâs it. You might have a great relationship with your colleagues, you might be solving cool problems, your boss might love you, and you might be a superstar at your company. But your company will eventually be bought, go through a hard time, or just decide it needs to remove 10% headcount because thatâs what everyone else is doing. At that point, HR will look at you just through the lens of an Excel spreadsheet, where employees are marked costs, and someone you never met will not care about how many nights you have sacrificed for the good of some projects. Be loyal to people, not companies. Companies have one objective: maximize shareholder value. Not treat you, a customer or employee, fairly, or to give you a good product. Act accordingly. The day you become a parent your priorities in life shift completely. Your kidâs wellbeing and happiness is really the only important thing. Nothing can prepare you for the joy and love you will feel by becoming a parent. Nothing can prepare you for the frustration and exhaustion you will feel by becoming a parent. But, luckily, the love and happiness win - and itâs not even close. â€ïž
Programming Link to heading
Iâve been writing code for well over thirty years by now, and I like to think that I know one thing or two about it. So, hereâs some advice:
Real engineers ship. Code without tests is useless. Automated tests arenât enough, but they are the very bare minimum. This is a bit controversial, but I personally believe that tests need to be upheld to the same quality standard as the production code. The only exception is that, in tests, trading some duplication for readability is very much worth it. You want to be able to read a test method from start to end and, at the very least, understand what it is testing. Once upon a time, people wasted a ton of time debating code styles. Modern languages ship with an opinionated formatter, but thereâs at least one such tool available for every language nowadays. Adopt it and stop wasting time on things that donât matter. Use a CI. It should run tests, check the linter and the formatting. You shouldnât be able to deploy anything that hasnât been built by the CI, and conversely, you should deploy the exact same artifact on all environments without modifying it. Never ship binaries built on your machine! Write simple code. Donât be clever, donât use the most esoteric features of your language, donât rely on a very weird and cool functional programming library that no one in your team knows. Slightly long but simple is better than short and clever. Writing simple, straightforward code is hard, but so worthwhile when youâll have to mantain it. A good name is often better than a comment. âŠbut comments can be very useful. A comment should explain why youâre doing something: what youâre doing should be obvious from the code, but sometimes why you are doing something in one place rather than another, or why you are doing something at all, is worth explaining. And, in that case, put it in a comment, not in the Jira ticket or PR description. It should live as close as possible to the code, to minimize the risk of drift. One PR should do one thing. If, while implementing a feature, you find a bug, please open a separate PR for that. Gitâs interactive rebase is great for that. Stacked PRs are super useful, though the tooling isnât yet great in my experience. Jujutsu is also a very interesting tool that takes ârewriting the historyâ to an extreme. Please oh please do write at least a minimal description of your PRs. Yes, even if the details are all in the Jira ticket. Please. On non-emergency days, reviewing PRs should be treated as the highest priority task. Your colleagues are waiting on you. Donât you hate waiting for three days for a review? Doing side projects is highly rewarding - one of mine literally led me to a more interesting job, that also pays me a good deal more. It takes a lot of time and effort, and most days I actually do not want to write code after work. But itâs worth trying to find the energy to do some project here and there - you will learn so much! Limit the amount of things you want to learn from a single side project - if you want to learn, say, Rust, donât try to learn at the same time how to write a compiler or LLM agent or ray tracer. It will be much harder. Practice writing - I highly recommend blogging, but you do you. In the LLM age, being able to communicate clearly and to express technical information in English has become the superstar skill, so get practicing. Take notes - the more, the better. They will come in handy. Consider using a dictation tool; LLM-based ones are really good, even with my weird Italian accent. TextMate, Sublime, Atom, VS Code⊠editors come and go. Vim and Emacs are still there. I picked up Vim 25 or so years ago, and I still use it today. Learn the tools you use every day well. In particular, learn git . You should have really understood the difference between merge and rebase, know how to do an interactive rebase, what bisect is. The Pro git book is great and free. Choose boring technologies.
The controversial stuff Link to heading
And now, for some flames! đ„
... continue reading