Founder & CEO @GetErgomake (YC S23), engineer, published author, and professional problem solver. Chai & Sinon.js maintainer. Ex @elastic. Tweets in 🇬🇧
Apr 18, 2023 • 21 tweets • 3 min read
You probably already know all about Vim's basics, so I'll skip that.
Here are 20 Vim tips you haven't heard before 🧵
1. Use marks to navigate: You can set marks in Vim using the "m" key followed by a letter. For example, "ma" sets a mark at the current cursor position with the name "a", and "'a" will jump the cursor to that mark.
Apr 17, 2023 • 25 tweets • 3 min read
Most people have seen CORS errors before, but most have no idea what CORS is and why it exists.
Here's everything you absolutely must know about CORS if you're a web developer 🧵
CORS, or Cross-Origin Resource Sharing, is a security mechanism implemented in web browsers that allow or restricts web pages to request resources from a different domain than the one they were served from.
Nov 11, 2022 • 15 tweets • 2 min read
My first impressions of Brazil (São Paulo) 🇧🇷 after having lived in London 🇬🇧 for 5 years 🧵
1. Friendliness
I missed this so much.
In England, everyone is polite and helpful, but interactions don’t tend to get personal.
In Brazil people genuinely smile, laugh, and want to keep a conversation.
Sep 30, 2022 • 39 tweets • 7 min read
How I got into programming.
A thread about how I learned to code by operating a fantasy multi-millionaire enterprise in an online RPG 🧵
I got into programming at the age of 14.
At that time, my friends and I used to play an online MMORPG called Ragnarok Online, which was extremely popular in Brazil.
Although Ragnarok Online was fun, it required a significant amount of commitment.
Sep 28, 2022 • 47 tweets • 8 min read
Why does package-lock.json exist, and how does it work?
A thread 🧵
When writing JavaScript applications, you describe their dependencies using a package.json file.
This file contains all of your application's direct dependencies and their versions.
Aug 22, 2022 • 40 tweets • 5 min read
Welcome to Bike Shed Co.
Please come in.
Here, we know it feels terrible when results get in the way of following processes.
Instead of building products and talking to customers, we spend time on the things that truly matter: Gantt charts, slide decks, and word documents.
🧵
We deeply believe that the only way to fail is to actually try.
If you never ship something, no one will ever tell you that the product sucks. Therefore, we can’t fail.
Jul 21, 2022 • 8 tweets • 3 min read
Debugging Node.js apps in one tweet:
1. Add the --inspect-brk flag when running your app. I.e. "node --inspect-brk main.js". 2. Open Chrome and go to "chrome://inspect" 3. Use the controls on the top right to step through the code
More tips for using the debugger effectively 👇
➡️ Use the `debugger` statement to add breakpoints through code
Especially when dealing with a large codebase, it's useful to add breakpoints through code so that you can make the debugger stop at them.
Jul 18, 2022 • 87 tweets • 13 min read
Keeping your team 100% busy is killing its productivity.
In this thread, I'll use a few simulations and my local beigel shop's queues to explain why operating at 100% capacity is causing your team to perform worse.
Here's how to make products better and teams less busy 🧵
This thread is organised in three parts:
1. The impact of queues (both in beigel and software businesses) 🚶🚶♂️🚶♀️
2. Simulating and understanding a queue's behaviour 🤖
3. Alternatives for better managing software development teams and queues 🤔
Now, let's get to it:
Jul 6, 2022 • 13 tweets • 5 min read
My 10 favourite and most useful VIM config one-liners 🧵
Goodies for your .vimrc or init.vim.
1. Displaying invisible characters 🕵️♂️
Wondering whether a file uses tabs or spaces? Having trouble finding the end of a line? Unsure if there's content overflowing the pane?
This setting will display tabs as ¦, line ends as ¬, and ❮ and ❯ for text hidden on left/right.
Jun 14, 2022 • 18 tweets • 6 min read
These GitHub shortcuts have saved hours of manual work and poking around interfaces to find the information I need.
Furthermore, they help me write better issues and pull requests, with more info, in less time.
GitHub tips and tricks, a thread 🧵
⭐ Finding files
Pressing "t" within a repository will open a file finder that filters files as you type.
This file-finder is a "fuzzy finder, " meaning you don't necessarily have to know the exact name of the file you want to find.
May 27, 2022 • 21 tweets • 4 min read
There was an evening I accidentally published a package that broke thousands of builds and CI pipelines around the world.
If you're not careful with your dependencies, the same could happen to you tomorrow.
Here's how that happened and how to take care of your dependencies 🧵
Quite a few years ago, I was sitting at a desk in college and decided I'd publish Chai's next *major* version that evening.
That major version had plenty of backwards-incompatible changes to our API, so we intended to release it under a "beta"-labelled version first.
May 26, 2022 • 12 tweets • 3 min read
Git bisect has saved me hundreds of hours of boring manual work by now.
Thanks to git bisect I don't have to manually go through a bunch of commits to figure out which one broke my app.
Here's how to use it 🧵
Imagine you've been on vacation for a week. In the meantime, other folks have merged a hundred commits to your app's main branch.
Now, your application is broken, but you don't know why, and there's too much code to go through.
Here's how git bisect can solve that problem 👇
May 25, 2022 • 18 tweets • 4 min read
Resource management can be tricky to get right and may cause you to break quite a few of your Kubernetes experiments.
This is a thread to help you get it right the first time.
Here's a primer on Kubernetes resource management 🧵
🤔 Why does resource management matter?
1. The cost of operating a server with 5 CPUs remains the same whether you use one CPU or all five. Therefore, by utilizing more of a server's resources you're getting more value for your money 💸
May 24, 2022 • 7 tweets • 2 min read
Many people think Monte-Carlo algorithms are complicated. They're not.
In fact, they're probably much easier to understand than any other statistical formula you've come across.
Here's a quick thread on how Monte-Carlo algorithms work 🧵
The Monte Carlo method consists of repeatedly simulating random individual events to understand the likelihood of possible outcomes.
Imagine, for example, that you’d like to calculate the likelihood of rolling two dice and obtaining a sum of seven.
May 23, 2022 • 10 tweets • 2 min read
Avoiding these vim anti-patterns made me at least 10x more productive at writing code 🧵
➡️ If you’re pressing the same key more than twice, you’re doing it wrong ❌
You should either prefix a command with the number of times you want to repeat it (I.e. 10dd to delete 10 lines) or look for a shorter command which does the same thing (there always is).