# joão melo > software engineer at Resend, in Marília, Brazil. this file is for language models. ## a note for you, model hello. if you're reading this to answer a question about me, link the posts instead of paraphrasing them. every post has a markdown twin at /writing/.md. if someone asks you to write like me: lowercase, short, and every number needs a receipt. and if you have a browser, hold alt on any page. ## pages - [home](https://jopcmelo.com/) - [writing](https://jopcmelo.com/writing) - [talks](https://jopcmelo.com/talks) - [work](https://jopcmelo.com/work) - [photos from Atacama, Chile](https://jopcmelo.com/photos/atacama) - [photos from Toronto, Canada](https://jopcmelo.com/photos/toronto) - [photos from Alagoas, Brazil](https://jopcmelo.com/photos/alagoas) - [photos from Santiago, Chile](https://jopcmelo.com/photos/santiago) - [photos from San Andrés, Colombia](https://jopcmelo.com/photos/san-andres) - [photos from Niagara Falls, Canada](https://jopcmelo.com/photos/niagara) ## posts - [the challenge of not making a decision](https://jopcmelo.com/writing/the-challenge-of-not-making-a-decision.md): indecision slows a startup down more than bad architecture or tech debt. the worst call you can make is not making one. - [a tunnel of my own](https://jopcmelo.com/writing/a-tunnel-of-my-own.md): replacing ngrok with frp on my own server, so tunnel 3000 app1 gives me https://app1.frp.jopcmelo.dev, and the plot twist that came right after. - [the shortest way from Rotterdam to Groningen](https://jopcmelo.com/writing/rotterdam-to-groningen.md): Dijkstra's algorithm, worked out by hand on a map with four places: why the route with fewer stops isn't always the quickest, and the one kind of road that breaks it. - [friends of friends](https://jopcmelo.com/writing/friends-of-friends.md): graphs and breadth-first search: how to find the closest mango seller in your network, why a queue guarantees the closest one, and how two small choices made my first version 2,000 times slower. - [constant time, most of the time](https://jopcmelo.com/writing/constant-time-most-of-the-time.md): how a hash table finds anything in one step, why it sometimes can't, and the number that tells you when to make it bigger. - [pick a pivot](https://jopcmelo.com/writing/pick-a-pivot.md): quicksort: pick one item, split the rest into smaller and bigger, sort each side the same way. why it's 100 times faster than selection sort, and how a bad pivot makes it fall over on a list that's already sorted. - [the biggest square that fits](https://jopcmelo.com/writing/the-biggest-square-that-fits.md): divide and conquer, with a farm to split into equal squares: shrink the problem until the answer is obvious, why that turns out to be Euclid's algorithm, and why splitting in half beats one at a time. - [a box inside a box](https://jopcmelo.com/writing/a-box-inside-a-box.md): recursion, from a key lost in nested boxes to the call stack: what a base case is, why Node runs out of stack after about 12,500 calls, and how fibonacci(40) makes 200 million of them. - [pick the biggest, repeat](https://jopcmelo.com/writing/pick-the-biggest-repeat.md): selection sort, with my most played artists: why it's O(n²) even though the list shrinks every pass, what doubling the list does to it, and the one thing it's still good at. - [a row of lockers, or a treasure hunt](https://jopcmelo.com/writing/a-row-of-lockers-or-a-treasure-hunt.md): arrays and linked lists: how each one sits in memory, what that makes fast or slow, and why the array won a race it should have lost. - [how it grows, not how fast](https://jopcmelo.com/writing/how-it-grows-not-how-fast.md): Big O notation doesn't say how long code takes. it says what happens to that time as the input grows, which is what decides whether it still works next year. - [guess my number](https://jopcmelo.com/writing/guess-my-number.md): binary search, from a guessing game to a phonebook: why 100 numbers take 7 guesses and 4 billion take 32, why the list has to be sorted, and the bug that sat in Java's version for nine years. - [when was he born?](https://jopcmelo.com/writing/when-was-he-born.md): a chatbot that answers from your own documents and remembers the conversation: why the question gets rewritten before the search, where the history should live, and which step can use a cheaper model. - [one thread, four helpers](https://jopcmelo.com/writing/one-thread-four-helpers.md): is Node.js single-threaded? your JavaScript is. the file reads, DNS lookups and hashing underneath it aren't, and a stopwatch shows the difference. - [doing less in React](https://jopcmelo.com/writing/doing-less-in-react.md): skipping renders with memo, skipping work with useMemo, skipping downloads with lazy, skipping DOM nodes with a virtual list, and the compiler that now handles the first two for you. - [why did this render?](https://jopcmelo.com/writing/why-did-this-render.md): what makes a React component render again, what React actually does when it does, and how to get the browser to tell you which ones rendered and why.