The Unintended Consequences of Misguided Incentives | January 04 2026, 13:30

About KPIs. In English, there’s a concept called perverse incentive, “a harmful stimulus.” It occurs when you try to quash evil, but the methods become the perfect fertilizer for it. There’s a saying, “When a measure becomes a target, it ceases to be a good measure” (Marilyn Strathern based on Goodhart’s Law).

A classic example is the “Cobra Effect.” In colonial India, the British decided to reduce the snake population and offered a reward for every head. The plan seemed as reliable as a Swiss watch until Indians began breeding cobras on farms for the “harvest.” When the authorities realized they were being duped and cancelled the payments, the farmers simply released the now-useless snakes into the wild. As a result, there were many more cobras than before the program started 🙂

In a similar way, the French in Hanoi battled rats by paying money for severed tails. The city became overrun with lively yet tailless rats: the Vietnamese cut off the “currency” and released the creatures to breed further, to not lose a stable income.

In the 19th century, archaeologists searching for dinosaur bones and ancient fossils paid locals for every piece found. As a result, resourceful diggers intentionally shattered whole, priceless skeletons into small pieces to earn more by submitting them separately. Science wept, but the KPI for “number of finds” soared. A similar tragedy occurred with the Dead Sea Scrolls: Bedouins cut the found scrolls into small pieces to sell each fragment separately.

In the USA, this malady struck infrastructure. When building the Transcontinental Railroad, the government paid Union Pacific subsidies for every mile laid. In Nebraska, engineers, in a single corrupt impulse, drew a huge loop—the Oxbow Route. The extra 9 miles of detour made no sense for logistics but brought the builders hundreds of thousands of dollars “out of thin air.”

But if the “loop” in Nebraska was just theft, then the mistakes of U.S. Secretary of Defense Robert McNamara were a tragedy. An aficionado of numbers and mathematical models, he tried to manage the Vietnam War like a Ford assembly line.

When General Edward Lansdale timidly noted that McNamara’s formulas lacked the variable “the spirit and will of the Vietnamese people,” the secretary noted it in pencil in his notebook. And then erased it. He said that if something cannot be measured, it’s unimportant. The main metric became the body count. Officers onsite, eager to curry favor, began labeling everyone indiscriminately as “enemies,” painting an illusion of imminent victory in Washington, while the actual situation spiraled into the abyss.

In science, there’s a radical principle similar to Occam’s Razor— “Newton’s Flaming Laser Sword” (also known as “Alder’s Razor”). Its essence: if something cannot be tested by experiment (or measurement), it’s not even worthy of discussion.

It sounds reasonable for physics, but in life, it’s a direct path to what sociologist Daniel Yankelovich called the degradation of perception. He described this as a descent through four steps:

1. First, we measure only what is easy to measure.

2. Then we ignore what is difficult to measure or requires qualitative assessment.

3. The third step—we decide that what cannot be measured is not so important.

4. And the final step—we declare that what cannot be measured actually does not exist.

And at that moment, we become blind. We view the world through the keyhole of metrics, while in the room behind the door, cobras are bred, dinosaur bones are broken, and wars are lost.

Exploring ASML’s Advanced Chip-Making Equipment with Veritasium | January 02 2026, 00:47

Veritasium released a very cool report yesterday from ASML about the equipment used to print chips for your little phones, cameras, and laptops.

For those who aren’t familiar with the process. First, a monocrystal is grown from ultra-pure silicon and cut into thin wafers, then multiple layers of thin dielectrics, conductors, and semiconductors are repeatedly applied to the wafer surface, each time shaping the necessary areas using photolithography, etching, and ion doping, eventually creating billions of transistors and connecting metallic paths; finally, the wafer is tested, cut into individual crystals, and packaged into casings, making them into finished microchips.

This process had a limitation – the width of the paths and the distance to the next one are limited by the wavelength of the light used, and reducing it is difficult because there’s nothing to focus such a beam with – lenses simply absorb/reflect everything. In EUV lithography (extreme ultraviolet), the wavelength is 13.5 nm. This is virtually soft X-ray radiation.

The video explains details about the ASML machine costing 400 million dollars. Instead of refracting lenses, highly complex systems of reflecting mirrors are used. These mirrors are the smoothest surfaces ever created by humanity. If the mirror of this machine were enlarged to the size of the Earth, the largest bump on it would not be thicker than a playing card. To enable the mirrors to reflect X-rays, up to 76 alternating layers of tungsten and carbon, each less than a nanometer thick, are applied. All this is done by Zeiss. In addition, this mirror has a controlled curvature—it is constantly adjusted by robots with precision up to picoradians. The precision of the mirror control is so high that if a laser were mounted on it, directed at the Moon, the system could choose on which exact side of a 10-cent coin lying on the moon’s surface to hit with the beam.

But. We don’t have a “light bulb” that emits light in the EUV range.

To generate this light, a laser “shoots” at a droplet of molten tin the size of a white blood cell, traveling at 250 km/h. The first pulse flattens the droplet into a disc, the second and third turn this “disc” into plasma – and all this occurs within just 20 microseconds. When hit by the laser, the droplet heats up to 220,000 Kelvin — approximately 40 times hotter than the surface of the Sun. This plasma emits that very necessary light. And it does so 50,000 times a second. They say it’s been brought up to 100,000. Imagine, at a hundred thousand laser shots per second, it never misses a single one. All this happens in a deep vacuum. To clean the mirrors from tin particles, the chamber is constantly blown with hydrogen at a speed of 360 km/h — faster than a Category 5 hurricane. This process is described by the same formula (Taylor-von Neumann) that describes a nuclear explosion or supernova explosion.

The machine layers the chip with an error margin of no more than five atoms, while the matrix swings back and forth with an overload of 20G.

A single High-NA machine is transported in 250 containers on 25 trucks and seven Boeing 747 aircraft.

Link to the video – in the comments. Or search on YouTube on the channel veritasium.

Designing 3D Volleyball Training Tools on the Fly | January 01 2026, 21:21

What I did on the plane to/from vacation and sometimes in between: 3D visualization and editing volleyball schemes for Nadya (she’s a coach). This court in the attached image freely rotates, players can be placed on it, and the ball and player paths are shown – all in 3D.

The ball’s trajectory is calculated so that it does not cross the net when moving from A to B (Bezier formula). Players can take several poses – right now there are hastily made poses for serve, attack, block, pass/receive. Interestingly, in the code: I had to write a bit of “volleyball brains”. The system itself calculates the ball’s trajectory through Bezier curves so that it always passes over the net. Moreover, the height of the launch depends on the type of action: for an attack, the ball “launches” from a higher point than for a pass. I also added auto-rotation: the 3D model itself turns its face to where, according to the scheme, it needs to pass or run.

The longest and most difficult task was creating the 3D model of a female volleyball player. To generate a realistic volleyball player, I used the tripo3D service. It gave me a model in a neutral pose (for free). Theoretically, you can then use Blender and the Rigify plugin to attach an armature to it and move its arms and legs, which would recalculate the model.

However, in reality, this approach does not work well: the AI-generated model contains a large number of geometric errors, which the renderer forgives but Rigify does not. They can be roughly divided into two types — incorrect polygon normals and issues with non-manifold geometry, which are significantly more challenging to fix. Inside the body, there may be “floating” clusters of polygons or intersecting surfaces. When Rigify tries to calculate weights (which bone affects which part of the skin), this internal noise confuses the algorithm, and as a result, the weights are distributed chaotically (for example, moving the arm might start pulling the mesh on the stomach). Plus, the model is slightly asymmetrical.

Non-manifold is a geometry error where the topology of an object ceases to be correct in terms of a three-dimensional body: edges may belong to more than two polygons, polygons may only touch at vertices or edges without a common volume, and “hanging” surfaces or zero thickness may appear inside the model. Such geometry formally does not describe a closed volume, causing problems with rigging and deformations. Moreover, the model needs to be simplified because millions of polygons are not needed for rendering in real-time in a browser.

I fixed these using MashLab, additionally refining by hand (“with a file”). In the end, the model turns out slightly different from the original almost everywhere. The original model had “skin” in the form of textures – the face, shirt, and shorts had to be colored. How to transfer all this to a simplified model? For that, there’s a special operation in Blender called Baking. This also involves some tricks. In the end, it didn’t transfer perfectly, but perfection isn’t necessary yet.

Next, we attach the armature to the “joints”, and after about three hours of figuring out why everything does not work as it should, it finally worked. I made four poses, and now each circle (player) can be told which pose it is in.

I’ll also need to make dynamic changes to the uniform colors – that shouldn’t be difficult. There’s also an idea to transfer poses from photographs – this is more complicated, but generally feasible. Using MediaPipe/AlphaPose, you can detect key points in 2D, then some models like HMR/HybrIK can “lift” flat coordinates into 3D space, outputting relative joint rotation angles. The resulting data can be attempted to be projected onto a Rigify skeleton. Since the proportions of the generated volleyball player and the person in the photo may not match, that’s exactly why Inverse Kinematics (IK) is used. This part is quite complex, but overall it’s not strictly necessary – just interesting to figure out and make something functional.

Video in the comments

From Freezer to Fridge: A DIY Cooling Hack | December 19 2025, 00:56

Today I sold a refrigerator. It has a story. The essence of it is that it’s not a refrigerator, although it looks like one. It’s a freezer. And it freezes on average to minus 18 degrees. I bought it second-hand, thinking it was a refrigerator. The buyer also came today thinking it was a refrigerator.

And here I realize that minus 18 degrees is not at all what I need.

Well, I am a Solution Architect. I didn’t want to dig into it, I just drove to Lowe’s and bought a simple blinker. It turns on and off according to schedule whatever is plugged into it. I stuck a radio thermometer inside (I had one) and adjusted the blinking frequency (20 minutes) so that the internal temperature was on average +4 degrees Celsius. The radio thermometer showed that the temperature fluctuations were very small – nominally plus or minus 0.5 degrees from +4, even less. And so it worked for me for some months until I realized that I just didn’t need it.

Sold it today with the adapter. It’s gone to the people.

Exploring the “Christmas Tree” in Oil & Gas | December 18 2025, 18:34

Oh, how many wonderful discoveries the spirit of enlightenment brings…

it turns out, Christmas tree in the oil & gas industry is a wellhead equipment. I am testing this search for work

Decoding the Beast: Migrating from Excel to Code | December 17 2025, 18:56

We’ve all encountered it — the “Main Excel Spreadsheet Managing the Business.” The very one B2B companies use to calculate million dollar quotes. It has 12 tabs, 1000+ nested formulas, and zero documentation. For ten years, it had “quick fixes” slapped on and constants hidden away. It’s no longer just a file, but a living organism that no one fully understands except for the guy who quit years ago. That’s how puzzled I was. Moreover, there was uncertainty whether even half of the formulas were needed, or if they were vestiges of the past.

Typical cell:

=IF($D11=$D10,””, IF(ISNUMBER( INDEX(Data!$T$10:$U$17,

MATCH(TabCalc!$F11,Data!$T$10:$T$17,0),2)),

INDEX(Data!$T$10:$U$17, MATCH(TabCalc!$F11,Data!$T$10:$T$17,0),2),

INDEX(TabProd!$C$8:$U$112,TabCalc!$D11,I$1)))

I was tasked with transferring this logic into code so that it was all computed by software. The Excel file seemed to have everything it needed, but in reality — it was a complicated black box. 1069 formulas.

The challenge was in how to translate a thousand interdependent formulas into clean code without losing any edge cases.

Here’s what I ended up doing.

Instead of rewriting everything from scratch at once with uncertain prospects of bug proliferation, I used a strategy of lazy computations and mocks.

I built a structure on Groovy that mimicked Excel’s behavior. Each computation (from a cell) I defined as a function that executed only when it was called. And the functions were a multidimensional dictionary.

I started from the end of the computation graph: from results to inputs. If a formula depended on something I hadn’t yet written, I “mocked” it in the code, simply substituting the value from the Excel sheet.

Bit by bit I replaced these mocks with real logic. Comparing the output of my code to the Excel at each step, I could clearly see where my logic diverged.

In other words, I moved from the result to the input data. At each step, it was clear which mocks needed to be turned into code, and I could compare version +1 with version -1 — the result had to match. As soon as all mocks were replaced with calls — the task was done.

The real “secret ingredient” was the dynamic nature of Groovy for creating a multidimensional map of functions. Instead of static variables, I used a deeply nested structure, where each “leaf” was a closure. This allowed access to any part of the table — be it an input parameter, a config constant, or a complex intermediate result — through a simple, unified syntax, and some components were dynamic.

Here’s an example:

conf[“group”] = { x -> [“a”, “b”, “c”] }

conf[“group”]().each {

calculate[“Group”][“Subgroup”][it][“TotalQuantity”] =

{

x -> calculate[“Group”][“Subgroup”][it][“Someparameter”]() * conf[“someConstant”]()

}

}

Using dynamic keys and closures, I could iterate through product groups or data sets. Since these were dynamic functions, not stored values, the entire system worked like a living graph of dependencies.

Testing was possible right from the start of transferring the formulas. The charm was that you were kind of addressing a cell through syntax like calculate[“Totals”][“A”](), but in reality, you were launching an entire tree of calculations at that moment. And this was incredibly convenient for debugging.

In two weeks, the “Black Box” was transformed into a transparent, modular library with clear logic, which produced exactly the same result as the original table.

P.S. Of course, all the data in all the screenshots are thoroughly obfuscated, or rather, written from scratch for this text.

Decoding Complex Queries: A Transformative Approach to Search Functionality | December 17 2025, 03:25

Oh, I just solved a really cool problem. It’s tricky to explain though. But I’ll try.

So, the client has 10 search websites. They all use one index but throw different queries at it. To what the user enters, a very long and complex query is added, generated by a module on Sitecore. It includes template and page IDs that need to be included or excluded. Ultimately, it’s impossible to understand what’s going on there. There could be ten opening brackets and some randomly closing ones, but it worked with Coveo. Reformatting helped, but not much.

And each site has its own version of this. Meanwhile, the same IDs appear periodically. I first tried to manually figure this out, but it was a nightmare. Nothing helped. There are also nested conditions. For example, “exclude this template” not globally, but only if that field equals one.

Here’s what I did:

I wrote a script that parses this textual “mess” into an abstract syntax tree (AST). This allowed to turn an unreadable string into a structured JSON object, where it’s clear: here’s AND, there’s OR, and here — a specific condition.

Then I turned these conditions into Boolean algebra formulas. Using the SymPy library, I “fed” these formulas to simplification algorithms. Mathematics itself eliminated duplicates, collapsed excessive nesting, and removed conditions that are logically absorbed by others. As a result, the “trees” became flat and understandable.

In the attachment — the original tree and the simplified one.

To be sure that I didn’t break anything during simplification, I wrote a test generator. It takes the simplified logic, puts it back into a working curl, and checks whether the number of found documents (totalCount) matches the original request. The numbers matched — meaning, the logic is preserved 100%.

Having simplified and standardized structures for each site in hand, I built a comparison matrix. The script analyzed them and highlighted Common Core — conditions that are guaranteed to be required (or prohibited) on all sites without exception, and Specifics — unique “tails” that distinguish one site from another.

In the attached screenshot: REQ means that the condition is guaranteed to be met for any document that goes through this request. NOT — definitely not met. OPT — the condition is present in the request, but it’s not strict by itself. It only works in conjunction with something else. “.” — the condition is not mentioned in the request at all.

For 3 sites it responds instantly, for 10 it takes about 30 minutes.

And of course, all data in all screenshots are thoroughly obfuscated.

Stages of Understanding Scientific Papers | December 10 2025, 19:38

As I periodically read scientific papers on my topic, I will try to articulate the levels of understanding the truth.

Level 0: “Read Later Folder” Downloaded the PDF, the title sounds genius, the abstract seems like the solution to all my problems. The file is forever buried in the ~/Downloads/Papers/ToRead folder.

Level 1: “Sumerian Cuneiform” Don’t understand anything at all. Random symbols, the Greek alphabet is over. “Orthogonal extrapolation of cognitive entropy within a quasi-stationary discourse inevitably induces a bifurcation of transcendental synergism.” Such materials really lower self-esteem. Most often from this level, you either fall back to zero, or gradually move to the second level.

Level 2: “Illusion of Competence” The Abstract is clear, the Introduction reads like a good detective story. But as soon as the main section starts, the text turns into a pumpkin. I can’t paraphrase it in my own words, only in general phrases: “Well, they trained a neural net… kind of.”

Level 3: “Formulas where needed and where not” The Abstract is clear, the first half of the article is also okay (architecture, pictures). But then comes formula (4), where “magic” happens. I take the authors’ word for it that equation (3) leads to (4) because, of course, I won’t check it. Beyond that — sheer horror and belief in a miracle.

Level 4: “Goldfish Effect” While reading — everything is crystal clear. The logic is solid, conclusions are obvious, the authors are smart. I close the tab, someone asks me, “What was the article about?” — and I freeze. My mind goes blank. If you take away the paper, I can’t reproduce even the idea because there essentially isn’t an idea, there is a process.

Level 5: “Armchair Expert” Everything’s clear, I can retell the essence over a beer. I know that Input transforms into Output, but the “black box” inside is still black. Give me a computer, I wouldn’t be able to reproduce even the skeleton because, it turns out, the article lacks half of the important stuff.

Level 6: “Critic-Practitioner” Everything is clear, I can recount, understand how to reproduce (even without their code). I see where they cut corners. I definitely know that the “state-of-the-art” result is achieved only thanks to a lucky seed or dataset and this strange trick in preprocessing, mentioned in the footnote on page 12.

Level 7: “Deconstructor” Hooray, I’ve understood everything and implemented it myself. It works worse than in the article, but I know why. However, I understand this work better than the second author (who just made charts). I see that all this complex mathematics over 5 pages boils down to two paragraphs in the middle.

Level 8: “Nirvana” The article is trivial. The idea is secondary, it was all in the ’90s with Schmidhuber, just named differently. Formulas are overcomplicated for importance. I can write the same in 10 lines of code and it will work faster. Reject.

If anything — I’m stuck somewhere between 2 and 4.

Comparing US and Russian Higher Education Systems through Credit Hours | December 10 2025, 17:35

Regarding education in the USA and the USSR/Russia. My degree in the USA is evaluated as a Master of Science degree in Computer Science. My younger colleagues say that a Russian university degree is rarely recognized as a Master’s these days, and often hardly qualifies even for a Bachelor’s. I decided to look at the numbers and was very surprised.

To earn a bachelor’s degree in the USA, you need to spend about 2000 hours in classrooms/laboratories. In terms of credits, this equals 120 credit hours. One credit usually equals 1 hour (50 minutes) of lectures per week for a semester (15 weeks). Laboratory work has a different coefficient (often 2–3 hours in the lab count as 1 credit), so the actual number of classroom hours is slightly higher (closer to 2000+).

So, my diploma states that I spent 7908 hours in classes over five years. That’s four times more than the typical student in the USA. Based on the numbers, it turns out that I spent about 2000 hours on math, physics, and English alone over five years, with a total of 42 subjects.

A colleague shared that in his Russian bachelor’s diploma there are 3140 academic hours, which is twice as less. And can you share how many hours are in your diploma?

Year of graduation, university, specialty, and the number of hours? I’m curious about the range of variation.

The Inner Mechanics of Old Rotary Phones | November 25 2025, 00:59

When I was little, I used to take apart old telephones many times, and only now, in my grey years, I realized that I never wondered how they worked. And they worked in a very interesting way.

Let’s start with the dial. The phone is connected to the network by two wires. The dial is a rotary one. When you wind up the disk, the contacts are blocked, and when you release it, the disk returns backward and delivers a series of interruptions/pulses to the line. But how was it made to return at a constant speed (which is 10 pulses per second)?

It operated based on a centrifugal friction governor. The mechanics (gearbox) accelerated the governor’s axle to thousands of revolutions per minute. Two weights with friction pads (consider them brakes) were seated on the axle. The centrifugal force pressed them against the stationary drum, creating a braking effort. This is a direct heir to Watt’s centrifugal governor, allowing the mechanism to work stably regardless of how sharply you released the disk.

Next. The Central Office connected you with a friend. You both speak at the same time, and sound is transmitted there and back through two wires—why two wires and not four, you understand? Well, okay, but why don’t you hear yourself too loudly, since the microphone sends the sound there, from where the “speaker” hears it?

I couldn’t answer quickly. Went googling. So, it turns out that a special differential transformer was responsible for this. There, the current from the microphone branches off: part goes into the line to the friend, and part goes into the “balance circuit” (a chain of a resistor and capacitor inside the phone), mimicking the line resistance. The transformer coils are wound in opposition: the magnetic flows from the current in the line and the current in the balance circuit mutually annihilate themselves in the coil that goes to the speaker. Engineers purposely adjusted the balance not perfectly, leaving a “local effect” – a quiet sound of one’s own voice, so the phone wouldn’t seem “dead.” But the incoming signal from the friend has nothing to unbalance it (silence on your side), so it freely passes to the speaker.

Now about the microphone. At that time there were no transistors in phones, but the signal was loud. The secret is in the design of the microphone, it’s carbon. Essentially, it is a box with carbon powder and a movable diaphragm. The sound from your mouth compresses and decompresses the powder, changing its resistance. The microphone does not generate current but modulates the powerful current coming from the Central Office. Essentially, it worked as an amplifier. Over time, the charcoal compacted, and the audibility dropped—hence the habit of tapping the handset to “shake up” the powder.

The speaker was normal, electromagnetic. Although not quite. If there were only an electromagnet inside (without a permanent magnet), the phone would horribly distort the voice. An electromagnet attracts iron regardless of the polarity of the current. If you supply a sine wave (voice), the diaphragm would be attracted during both the positive and the negative half-waves. Result: the frequency of the sound would have doubled, and you would hear not the voice of a friend, but an unintelligible high-frequency buzzing. The permanent magnet solves this problem: It creates “preload.” The diaphragm is always attracted to the magnet with medium force. When the “plus” of the signal arrives, the magnetic field strengthens and the diaphragm flexes more. When the “minus” arrives, the field weakens and the diaphragm springs back.

In modern speakers, the force strictly depends on the direction of the current. Plus pushes, minus pulls. Therefore, the frequency doubling, which old phone engineers feared, physically cannot occur here. The diaphragm doesn’t need “preload” by a magnet, it just needs to hang in peace.

Interestingly, the principle of old electromagnetic capsules (metal diaphragm + “anchor”) is used now in the most expensive in-ear headphones—google “balanced armature headphones” (prices around $500).

The voltage in the telephone network was negative – minus 48/60 volts. Plus was grounded, and the “live” wire was the minus. Why? It turns out, this is protection against electrochemical corrosion. The cables lie in moist earth. If there were a “plus” (anode) on the wire, upon insulation damage, copper would dissolve (electrolysis) and the cable would rot. With “minus” (cathode), metal ions, on the contrary, tend to settle on the conductor from the soil, which prolonged the cable’s life by decades.