This was a famous Microsoft interview question back in the day - given a linked list, detect a cycle in it.
The cheapest way is to send TWO pointers through the list, one stepping one node, the other stepping two nodes per move.
If there are any cycles eventually the fast pointer "catches up" to the slow pointer, and they equal.
Docker Compose has finally shipped native support for init containers, e.g. running DB migrations or similar one-off tasks.
Somewhat similar to k8s, they’re ephemeral containers that must exit successfully before the service containers start. They’re defined as pre_start hooks in the Compose file.
I shipped something very similar a few months ago for Uncloud designed as pre_deploy hooks.
There is no fundamental difference, only a few parameters differ. But Uncloud is a multi-host orchestrator where "deploy" is a distinct first-class operation so I believe the pre_deploy naming more clearly describes the intent to run something before the service rollout kicks in.
We may still adopt the new pre_start spec eventually, for example, to specify a container-lifecycle hook that runs before starting every service replica, not only once per service deploy.
In 1986 an American programmer published the first article ever written about Windows programming. Two years later he published the book that taught the world how to write software for the operating system that would go on to run 90 percent of the computers on Earth. The phrase "look it up in Petzold" became shorthand among developers for three decades.
He is 73 years old, lives in a small town in upstate New York, and published a second edition of his most famous work two years ago.
His name is Charles Petzold.
Here is the story, because the person who taught two generations how to build software for the most widely used operating system in history has almost no public profile in the modern tech world.
Charles was born in 1953 in New Brunswick, New Jersey. He earned a Master of Science in Mathematics from Stevens Institute of Technology in 1975. In the early 1970s, before personal computers existed as a consumer product, he built a computer from scratch using a Z-80 processor and wired it to control a music synthesizer. He was programming machines before most people had ever seen one.
In the mid-1980s he began writing programs and technical articles for Microsoft Systems Journal. In 1986 he published what is recognized as the first article on Windows programming ever written. He served as a contributing editor at the journal from 1985 to 2000.
In 1988 Microsoft Press published Programming Windows. The book did something nobody else had done. It took the Windows API, a sprawling, undocumented, and deeply intimidating interface for building graphical software, and explained it from first principles with working C code. Every example compiled. Every explanation built on the last. The book assumed you knew C and nothing else.
It became the bible for Windows development. Six editions followed, tracking the evolution of Windows from 3.0 to 3.1 to 95 to 98 to XP to 8. The fifth edition alone ran to 1,479 pages. Generations of professional programmers learned their craft from this single book. "Look it up in Petzold" became the standard response in developer forums, in offices, and in computer science departments when anyone asked how to do something in Windows.
Microsoft named him a Windows Pioneer, one of only seven people to ever receive the award. He won the Microsoft Most Valuable Professional designation. He became the reference that the reference books referenced.
Then in 1999 he published Code: The Hidden Language of Computer Hardware and Software.
Code is a different kind of book. It starts with flashlights and Morse code and Braille. It builds, layer by layer, from relay switches to logic gates to flip-flops to registers to a working CPU. By the end of the book you understand how a computer works at the hardware level without needing an engineering degree. The writing is patient, clear, and free of jargon.
The idea for Code came to him in 1987 while writing a column called "PC Tutor." It took him twelve years to write. It became one of the most beloved technical books ever published. Scott Hanselman, a Partner Program Director at Microsoft, called it "the first book about programming that spoke to me" and said it taught him "how many unseen layers there are between the computer systems that we as users look at every day and the magical silicon rocks that we infused with lightning and taught to think."
In August 2022 Charles published the second edition of Code from his home in Roscoe, New York. He expanded the book, added new chapters, and built an interactive companion website at https://t.co/LGicky9iiv with animated circuit diagrams he made himself. He was 69 years old.
Between Programming Windows and Code he published over a dozen other books. Programming Windows Phone 7. The Annotated Turing, a guided tour through Alan Turing's 1936 paper on computability. Creating Mobile Apps with Xamarin.Forms. 3D Programming for Windows. Programming in the Key of C#. He worked at Xamarin from 2014 to 2018.
His personal website at charlespetzold .com is a flat page. His blog posts are written in plain HTML. There is no marketing copy. There is no newsletter. There is no podcast.
A mathematician from New Jersey taught the world how to program the most important operating system in history, then wrote the book that explained how computers actually work.
He is still writing from a small town in upstate New York.
the sieve of Eratosthenes can find every prime up to about 8 million using just 1MB of memory
one bit represents one number and the inner loop marks composites with bit operations
the same idea shows up in prime generation tools and when choosing hash table sizes
Bob Nystrom built a working garbage collector in C and published it for free in 2013
most people who know Crafting Interpreters have never seen it because it is a separate article not part of the book
it implements a complete mark and sweep collector in around 200 lines of C
the same basic idea powered early versions of Lua
in 1983 a Lucasfilm engineer discovered you can legally interleave a switch and a do-while in C
it's called Duff's Device. it still compiles and technically valid C
Tom Duff's own words: "it amazes me that after 10 years of writing C there are still corners I haven't fully explored."
nginx's memory allocator is basically a pointer that only moves forward
it has no free lists, avoids fragmentation, and keeps per allocation overhead
memory is carved out of a big block as requests come in
when the request finishes the entire pool is released at once
this is the allocator used in nginx/src/core/ngx_palloc.c
Дайте угадаю, это потому что ебучие AI агенты, на ебучей винде, будучи обученными на stackoverflow, раз за разом пытались использовать coreutils команды, терпели неудачи, жгли токены, чтоб понять, что они находятся на ебучей винде и нужно использовать те powershell/cmd команды, которые ни один человек в мире не знает, ибо они никому не нужны?
Me aburrí e hice un mini emulador x86 + PE + NT + WinAPI (Kernel32, MSVCRT, NTDLL, User32) en Rust, para compilarlo en WASM por lo cual puedo "correr" un .exe en el navegador:
At the end of high school and during my first year at university, Windows was already mature... but I still didn’t adopt it for development.
I was so focused building my own GUI under DOS, called VMAWin, using Borland Pascal.
(see it here in SVGA 800x600)
#retrocomputing
The terrifying answer is:
Everywhere you forgot existed.
Deleting production data rarely means:
true erasure.
Especially in modern distributed systems.
Even if you delete:
primary database
backups
logs
data may still exist in:
replication nodes
WAL/binlogs
snapshots
cloud block storage
filesystem journals
object storage versioning
SIEM pipelines
analytics warehouses
CDN caches
email exports
monitoring systems
employee laptops
debug dumps
third-party integrations
disaster recovery regions
and sometimes even:
RAM snapshots
forensic disk remnants
cold archival storage
Deep Systems Reality
Modern infrastructure is designed for:
durability and recoverability
which means data tends to replicate aggressively.
A single database write may propagate into:
replicas
Kafka streams
Elasticsearch indexes
backups
audit systems
observability pipelines
BI systems
Deleting one copy means almost nothing.
The Real Interview Insight
This question is testing whether you understand:
Data lifecycle complexity
in distributed systems.
Most junior engineers think:
“DELETE means gone.”
Senior engineers know:
Deletion is usually logical, not physical.
For example:
DELETE FROM users;
may only:
mark rows reusable
leave pages intact
preserve WAL entries
retain snapshots
until:
compaction
vacuuming
garbage collection
storage overwrite
occurs later.
Why Courts Still Recover Data
Because enterprise systems intentionally preserve:
compliance records
audit trails
immutable archives
retention snapshots
And cloud providers often maintain:
redundant storage layers
delayed deletion windows
version histories
Even if engineers believe:
“it’s deleted.”
Real-World Engineering Lesson
At scale:
Data deletion is one of the hardest problems in computing.
Much harder than storage.
Because modern systems optimize for:
recovery
replication
resiliency
forensic traceability
not perfect erasure.
That’s why regulations like:
GDPR
HIPAA
SOC2
make “right to deletion” operationally difficult.
Senior Backend Perspective
This question is fundamentally about understanding:
distributed persistence
forensic recoverability
storage internals
compliance architecture
immutable infrastructure
The deeper truth is:
In distributed systems, data naturally wants to survive.