Aleksandr Denisyuk (@denisyukphp) profile picture

PHP Developer

Brest, Belarus
Joined May 2009
Aleksandr Denisyuk retweeted
PHP 8.6 adds two tiny types with outsized impact: a SortDirection enum and Time\Duration. 150+ incompatible SortDirection enums exist on GitHub. PHP itself measures time 6 different ways. A shared vocabulary fixes both. @TimWolla explains 👇 thephp.foundation/blog/2026/…
1
17
1
115
9,629
Aleksandr Denisyuk retweeted
Ever nodded along when someone mentioned TCP handshakes or DNS lookups, without really knowing how they work? Then this is for you. A visual quick reference for 14 internet protocols, with a built-in packet inspector. protocol-explorer-alpha.verc…
71
1,480
157
10,343
982,148
Aleksandr Denisyuk retweeted
6
191
2
1,586
56,661
Aleksandr Denisyuk retweeted
TODO: Periodic share of cpu.land Done! ✅
37
362
11,827
4 RAG indexing strategies, explained visually:
3
34
2
165
7,169
Aleksandr Denisyuk retweeted
Datatype : une variable font OpenType qui transforme des expressions texte en graphiques inline — barres, sparklines, camemberts. Sans JS, sans image, juste de la typographie et des ligatures. franktisellano.github.io/dat…
2
7
1
26
3,178
Aleksandr Denisyuk retweeted
Polling vs Long Polling vs Webhooks vs SSE Four ways to get updates from a server. Each one makes a different tradeoff between simplicity, efficiency, and real-time delivery. Here's how they compare: - Polling: The client sends a request every few seconds asking "anything new?" The server responds immediately, whether or not there's new data. Most of those requests come back empty, wasting client and server resources. For use cases like an order status page where a small delay is acceptable, polling is the simplest option to implement. - Long Polling: The client sends a request, and the server keeps the HTTP connection open until new data is available or a timeout occurs. This means fewer empty responses compared to regular polling. Some chat applications used this pattern to deliver messages closer to real-time communication. - Server-Sent Events (SSE): The client opens a persistent HTTP connection, and the server streams events through it as they're generated. It is one-way, lightweight, and built on plain HTTP. Many AI responses that appear token by token are delivered through SSE, streaming each chunk over a single open connection. - Webhooks: Instead of the client asking for updates, the service sends an HTTP POST to a pre-registered callback URL whenever a specific event occurs. Stripe uses this for payment confirmations. GitHub uses it for push events. The client never polls or holds a connection open, it just waits for the server to call. Many systems don't rely on a single pattern. You may use polling for order status, SSE for streaming AI responses, and webhooks for payment confirmations.
13
101
5
512
69,578
Aleksandr Denisyuk retweeted
I think this is the best post I've ever made.
Quantization can make an LLM 4x smaller and 2x faster, with barely any quality loss. But what *is* it? @samwhoo crafted a beautiful interactive essay explaining it from first principles, aimed at coders, not mathematicians. ngrok.com/blog/quantization
81
349
31
4,515
624,901
Aleksandr Denisyuk retweeted
This is the best Visual Explanation of how LLMs actually work
30
533
15
2,984
216,471
Aleksandr Denisyuk retweeted
Event-Driven Architecture
45
269
8,941
Aleksandr Denisyuk retweeted
In one system design interview, I used Kafka. In one system design interview, I used Redis. In one system design interview, I used S3. In ALL system design interviews, I used databases. Databases are the backbone of every design, no matter the scale, stack, or domain. If you understand how data is stored, queried, indexed, replicated, and partitioned, you already understand 70% of system design. Don’t get distracted by every new shiny component; queues, caches, and orchestrators come and go. But databases are forever. Relational, NoSQL, time-series, vector, the patterns evolve, but the principles stay the same: - Read and write paths - Indexing and caching - Transactions and isolation - Replication and partitioning Master how data flows, and you’ll see how every other part of the system connects. Learn databases deeply. Everything else is just optimization.
15
47
331
17,952
Aleksandr Denisyuk retweeted
I've been collecting interface designs for 15+ years. every gesture, tool, menu that made me stop and think “wait how does this work”, “why does this matter?”, but also “who are the giants upon whom we build?” Now i want to publish it: “Interface Lineage”.
56
324
18
3,771
141,271
Aleksandr Denisyuk retweeted
this is why i never worry about competition.
89
2,010
83
12,354
651,687
Aleksandr Denisyuk retweeted
next experiment in @GoogleAIStudio - an organic, procedural graph visualizing the movies as a growing ecosystem. you can navigate through films (●), directors (▲), and actors (■), expanding subtrees with every click to discover hidden creative branches. everything is powered by Gemini and TMBD APIs. was fun to build this one.
11
38
2
412
22,927
Aleksandr Denisyuk retweeted
UUIDv4 vs UUIDv7 vs ULID, in practice: 1. UUIDv4: pure random. Great uniqueness. Terrible for DB indexes. Inserts scatter, B-tree bloats, cache misses. p99 gets weird at scale. 2. UUIDv7: time-ordered + random. Keeps “globally unique” but inserts are mostly sequential. Works nice with Postgres/MySQL primary keys. 3. ULID: also time-ordered, human-friendly, sortable as string. Good choice if you need lexicographic order in logs or URLs. Watch clock skew if you generate on many nodes. In Production: default to UUIDv7 for primary keys. Use ULID when you want sortable strings. Avoid v4 for hot indexed tables.
Do not use UUID as your primary key by default, use BIGINT identity for OLTP (smaller indexes, faster joins) and add UUID only when you need cross-system uniqueness. Do not use OFFSET pagination on big tables, use keyset pagination (WHERE id > last_id ORDER BY id LIMIT n) with a stable index. Do not use SELECT * in hot paths, use narrow selects (only columns you need) + cover with the right index. Do not use COUNT(*) on a giant table for UX counters, use approx counts / cached counters / rollups depending on accuracy needs. Do not use JSONB for everything, use proper relational columns for fields you filter/sort on, keep JSONB for truly flexible metadata. Do not use EAV schemas (“key/value tables”) for core entities, use normal forms + migrations (EAV becomes un-indexable pain). Do not use “one index per query” guesswork, use EXPLAIN (ANALYZE, BUFFERS) and index what your workload actually does. Do not use big multi-table joins for dashboards, use ETL/CDC into OLAP (ClickHouse/Druid/BigQuery) and query there. Do not use sync writes to multiple DBs, use outbox pattern + CDC so data movement is replayable and consistent. Do not use triggers for business logic, use application-level writes (triggers become invisible dependencies and debugging hell). Do not use serializable isolation everywhere, use the lowest isolation that meets correctness + explicit locks only where needed. Do not use long transactions, use short transactions (long txns = bloat, locks, vacuum issues, replica lag). Do not use “DB is slow, add replicas” first, use query shaping + indexes + connection pool sanity + caching (in that order). Do not use “just increase max_connections”, use pooling (PgBouncer) + right-sized pools (too many connections kills throughput). Do not use hot partitions / single shard keys, use evenly distributed keys or composite sharding to avoid hotspots. Do not use ad-hoc migrations in prod, use online migration patterns (expand/contract, backfills, dual writes when needed). Do not use no backups because “we have replicas”, use tested restores + PITR (a replica is not a backup). Do not use “we’ll clean it later” retention, use TTL/partition drop for time-series and audit logs (deletes don’t scale). Do not use indexing without considering writes, use the minimum indexes that hit your p95 (each index is a write tax). Do not use text search via LIKE '%foo%', use proper search (Postgres GIN/tsvector) or a search engine when ranking matters. Do not use cache as truth, use DB as source of truth and caches as derived state with invalidation strategy.
20
83
1
838
100,190
Aleksandr Denisyuk retweeted
Diagrams are becoming my primary way of reasoning about code with Agents. And I didn't find anything there that I'm happy to look at all day long. Mermaid as a format is amazing - so we built something beautiful on top of it. It's called Beautiful Mermaid agents.craft.do/mermaid
113
273
53
3,356
406,864
Aleksandr Denisyuk retweeted
B-tree database lookups are way slower without a memory cache in place + a good replacement policy for OLTP. MySQL uses a segmented LRU whereas Postgres uses a clock-sweep algorithm. Both good choices for different reasons.
9
109
5
1,200
51,923
Aleksandr Denisyuk retweeted
Replying to @GrousARK
4
2
19
4,957
Aleksandr Denisyuk retweeted
SQLite vs PostgreSQL Performance & Comparison (2026)
36
134
11
1,349
141,655
Aleksandr Denisyuk retweeted
StackOverflow всё График ежемесячно заданных новых вопросов достиг дна. Запущенный в 2008 году сайт, где люди искали друг у друга совета по тому, как исправить баги в коде и решить задачи, в своё время был главным ресурсом для разработчиков. Но сейчас ежемесячный объём новых постов упал практически до нуля teapawt.org/samwhoo/status/2007590… Все скажут: «Понятно, у живых людей больше никто совета не спрашивает. Чёртовы нейросети, угробили проект!» Это если вы сами никогда не пробовали спрашивать совета у других программистов в интернете, особенно в русскоязычном: — Надо гуглить, прежде чем спрашивать. — Это решается элементарно, но я не буду тратить на это своё время. И моё любимое: на вопрос «Как сделать X и Y?» отвечать «А зачем?» По графику видно, что снижение востребованности StackOverflow пошло задолго до запуска даже ChatGPT 3.5. И как любит полушутя повторять бывший глава Google Эрик Шмидт, сегодня наконец-то доступны программисты, которые на самом деле делают то, о чём ты их просишь.
StackOverflow graph of questions asked per month. Holy shit.
69
25
6
562
75,418