Stories

Every story exists in English and in Portuguese. Most have a figure you can play with.

14 stories

  1. 7 min

    Prompt injection is our generation’s XSS

    There is no textContent for a model: what XSS and XSRF teach about prompt injection, and why the defense moves from input to privilege.

    InteractiveAIBackendFrontend

  2. 7 min

    We’re bad intuitive statisticians. So are LLMs.

    Monty Hall, a hostel in Foz do Iguaçu, and what temperature and top-p really do to an LLM’s next token.

    InteractiveAIFundamentals

  3. 8 min

    0.1 + 0.2 and someone’s salary

    Why money is never a float: IEEE 754 bits, payroll drift and rate rounding, shown one payslip at a time.

    InteractiveBackendFundamentals

  4. 6 min

    Tokens are compression: what Shannon explains about your AI bill

    Shannon entropy, tokenizers and your AI bill: type any text and watch information, tokens and cost move together.

    InteractiveAIFundamentals

  5. 6 min

    From Q-learning to LLM agents

    From a Q-learning maze to LLM agents in production: in an agent, the reward is the design.

    InteractiveAI

  6. 7 min

    Running code on other people’s sites

    One tracking pixel, three sites, and what it takes to run your code as a guest on someone else’s website.

    InteractiveFrontendBackend

  7. 5 min

    Progressive enhancement for AI-generated UI

    Progressive enhancement for AI-generated UI: ship the core without the model and feature-detect the AI layer.

    InteractiveAIFrontend

  8. 8 min

    Why I wrote my own renderer

    bradom: six rendering strategies written from scratch, from innerHTML to Virtual DOM and tagged templates, to make one tooling choice.

    InteractiveFrontendFundamentals

  9. 4 min

    The Northeast and the Brasileirão

    Northeastern clubs in the Brasileirão: 44,006 km of travel for Fortaleza against 11,992 for São Paulo clubs in 2023.

    InteractiveOff the code

  10. 4 min

    Fibonacci of 10¹⁸ in 84 multiplications

    Fibonacci of 10^18 in 84 matrix multiplications: linear recurrences in logarithmic time.

    InteractiveICPCFundamentals

  11. 4 min

    How many swaps until it is sorted?

    Counting inversions with Bubblesort and Mergesort, and why the same count compares two rankings.

    InteractiveICPCFundamentals

  12. 5 min

    Counting without enumerating

    Digit dynamic programming and the tight flag: counting numbers with a digit property without enumerating them.

    InteractiveICPCFundamentals

  13. 3 min

    Cut it into √n pieces

    Square-root decomposition for range queries, from my first talk at the first Code Camp IFPB/ACM.

    InteractiveICPCFundamentals

  14. 3 min

    Brasileirão 2023, the most titles on the pitch

    The 2023 Brasileirão started with 65 national titles on the pitch, the most in the points era since 2003.

    InteractiveOff the code