20 random bookmarks

stuff me collect

2025-08-17

246.

Выразительные тесты без testify/assert

antonz.ru/do-not-testify

2025-06-16

Reposted 236.

Wiki - BetterThanJson

wiki.alopex.li/BetterThanJson

2025-02-25

Reposted 206.

Red Blob Games: Hexagonal Grids

www.redblobgames.com/grids/hexagons

Amit's guide to math, algorithms, and code for hexagonal grids in games

2024-12-09

189.

Tiger Style

github.com/tigerbeetle/tigerbeetle/blob/a43f2205f5335cb8f56d6e8bfcc6b2d99a4fc4a4/docs/TIGER_STYLE.md

Our design goals are safety, performance, and developer experience. In that order.

Contrary to popular belief, simplicity is also not the first attempt but the hardest revision

code, like steel, is less expensive to change while it's hot.

Safety

NASA's Power of Ten — Rules for Developing Safety Critical Code

  • Use only very simple, explicit control flow for clarity.

  • Put a limit on everything. Fail Fast

  • Assertions detect programmer errors. The only correct way to handle corrupt code is to crash.

  • Assertions are a safety net, not a substitute for human understanding.

    • Build a precise mental model of the code first.

    • encode your understanding in the form of assertions,

    • write the code and comments to explain and justify the mental model to your reviewer,

    • and use VOPR as the final line of defense, to find bugs in your and reviewer's understanding of code.

  • No memory may be dynamically allocated (or freed and reallocated) after initialization.

  • Declare variables at the smallest possible scope, and minimize the number of variables in scope.

  • Good function shape is often the inverse of an hourglass: a few parameters, a simple return type, and a lot of meaty logic between the braces.

  • Centralize control flow. When splitting a large function, try to keep all switch/if statements in the "parent" function, and move non-branchy logic fragments to helper functions.

  • Centralize state manipulation. Let the parent function keep all relevant state in local variables, and use helpers to compute what needs to change, rather than applying the change directly.

Developer Experience

  • Add units or qualifiers to variable names, and put the units or qualifiers last, sorted by descending significance. latency_ms_max rather than max_latency_ms.

  • Callbacks go last in the list of parameters.

  • Order matters for readability (even if it doesn't affect semantics). On the first read, a file is read top-down, so put important things near the top. The main function goes first.

  • Don't overload names with multiple meanings that are context-dependent.

2024-11-14

173.

Testcontainers - Unit tests with real dependencies

testcontainers.com

Testcontainers is an open source library for providing throwaway, lightweight instances of databases, message brokers, web browsers, or just about anything that can run in a Docker container.

172.

Все, что вы не хотели знать про Юникод, но придется

blo.gepar.do/v0/unicode.html

СЛОЖНО, СЛОЖНО, ВСЕ ОЧЕНЬ СЛОЖНО, КРАЙНЕ ЗАПУТАНО И ЧРЕЗВЫЧАЙНО НЕИНТУИТИВНО
ВАВИЛОНСКАЯ БАШНЯ БЫЛА ОШИБКОЙ
КОМПЬЮТЕРЫ ТОЖЕ
ААААААА, ПОЧЕМУ ЭТО ВСЕ ВООБЩЕ СУЩЕСТВУЕТ
ЧЕЛОВЕЧЕСТВО СОЗДАЛО МОНСТРА, КОТОРОГО НЕ ПОНИМАЕТ 99.99% ЛЮДЕЙ, НО ТЕМ НЕ МЕНЕЕ, ПОВСЕМЕСТНО ИСПОЛЬЗУЕТ
КТО-НИБУДЬ, ПЕРЕВЕДИТЕ ВСЕ ЯЗЫКИ МИРА НА ОБЫЧНУЮ ЛАТИНИЦУ БЕЗ ДОПОЛНИТЕЛЬНЫХ ЗНАЧКОВ И ЗАКОПАЙТЕ ВСЮ ЭТУ СЛОЖНОСТЬ
ĄÄÃÂÅĂÁÀ!!!¡!ꜝ‼İ

2024-11-05

169.

Монитор для чувствительных глаз — алгоритм подбора и один параметр, о котором Вы уже скорее всего забыли

habr.com/ru/articles/855812

2024-10-14

159.

Cognitive load

minds.md/zakirullin/cognitive

The best components are those that provide powerful functionality yet have simple interface.

Do not add layers of abstractions for the sake of an architecture. Add them whenever you need an extension point that is justified for practical reasons.

2024-08-09

Reposted 146.

Metamorphosis

garden.bouncepaw.com/hypha/metamorphosis

Баунс читает Кафку.

Would you love me if I became a worm?, somebody could ask. I would respond that no, I don't in fact love you, for you are a worm.

Indeed I find humans more valuable.

2024-07-26

143.

The UNIX Pipe Card Game

punkx.org/unix-pipe-game

This is a card game for teaching kids how to combine unix commands through pipes.

2024-07-02

Reposted 118.

Oatmeal - Blogroll

eli.li/blogroll
113.

Some tips/opinions about self-hosting

hacktivis.me/articles/self-hosting
  • make it for yourself first

  • automate the backups; prefer to edit locally and push

  • avoid SBCs (ie. RaspberryPi) and prefer PCs

  • you don't have to let everyone in

2024-06-27

101.

Essays · Gwern.net

gwern.net/index

Very cool wiki design with backlinks, links preview etc

Personal website of Gwern Branwen (writer, self-experimenter, and programmer): topics: psychology, statistics, technology, deep learning, anime

2024-06-18

92.

DreamBerd: perfect programming language

github.com/TodePond/DreamBerd

perfect programming language.

Best programming language of all time

2024-05-07

68.

GitHub does dotfiles

dotfiles.github.io

Your unofficial guide to dotfiles on GitHub.

Reposted 67.

The creepy sound of online trackers

axbom.com/the-creepy-sound-of-online-trackers

I can't get the noise out of my head. People who watch the video express awe and disgust. And that is why Dutch software developer Bert Hubert's experiment is so powerful. It doesn't really uncover something that we shouldn't already know. Something we often choose to ignore. The brilliance is

65.

Stirling-PDF

github.com/Stirling-Tools/Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files - Stirling-Tools/Stirling-PDF

2024-03-15

39.

Notes Against Note-Taking Systems

sashachapin.substack.com/p/notes-against-note-taking-systems

Kind of controversial take on note taking systems. I can relate though, because i was lost in a burden of creating perfect knowledge management system for a long time without creating any knowledge. Simplest approach with commonplace notebook is what working for me now.
Comments are also useful.

Getting lost in your knowledge management system is a fantastic way to avoid creating things.
Most heart-stopping writing comes from synthesizing the previously unarticulated in the moment. Rather than reaching for your database, try channeling what’s in the air at this very second. These read/write errors are what we call originality.
Leonardo da Vinci kept all of his notes in one big book. If he liked something he put it down. This is known as a commonplace book, and it is about how detailed your note-taking system should be unless you plan on thinking more elaborately than Leonardo da Vinci.
Shun the useless adoption of the aesthetic of the useful. When something can be like work or like play, never make it work.

2024-03-13

27.

Personal Goals Have to Happen Now

www.raptitude.com/2023/11/personal-goals-have-to-happen-now

Personal goals are generally expected to happen later.
The reason it’s hard to get going on personal goals is that you’re already using all of your time. No matter who you are, you’re already using all 24 hours, every day, for something. Because this will always be true, goals that happen at all must happen now, while you still don’t yet have time.
Basically, you learn to work in small, uniform parcels of time. They’re short, timer-bound, and unwaveringly focused on a particular outcome. Most importantly, they can fit into real life, as it already is.

2024-03-12

15.

MyMind - something like betula and pinterest with AI

mymind.com

you can save stuff and it will auto label it. single page with all links, quotes, etc. smart search, tags