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.

Exploring the Fascinating Properties of Glass | November 21 2025, 23:58

I got carried away with the topic of glass and learned so many interesting things, so I’m sharing. It all started when I read about the supercritical state of matter – it turns out that the line separating liquid and gaseous states on a pressure and temperature graph at some point breaks off, and beyond that lies a state of matter that is neither here nor there. I started reading about states (phases) of matter and stumbled upon the fact that glass is essentially a state between liquid and solid. It flows, just very slowly. This myth is popular thanks to observations of medieval windows, where the glass is often thicker at the bottom, which was attributed to “flowing” under the influence of gravity, and it was even mentioned in school textbooks. In reality, glass is an amorphous solid with extremely high viscosity at room temperature, and it does not flow noticeably even over billions of years; the uneven thickness of old glass panes is explained by production technologies, when the thicker edge was installed at the bottom for stability.

I delved into the topic of glass further. It turned out that the reason why glass can be transparent is rooted in quantum mechanics, specifically in the electronic structure of the material, not because of the density of particles. The essence is that for an electron to absorb a photon, it must transition from one energy level to another, but in silicon dioxide, the width of the band gap is so large that the energy of visible light photons is physically insufficient to make this “jump.” As a result, light simply cannot interact with the electrons and goes straight through the material, while higher-energy ultraviolet radiation can overcome this barrier and is thus absorbed by glass.

It also turned out that melted glass conducts electricity. Moreover, the mechanism of conductivity fundamentally differs from how metals conduct electricity. In a copper wire, current is a flow of free electrons. In cold glass (an insulator), electrons are tightly bound, and ions are locked in the solid lattice. But when you heat glass to the molten state (usually above 1000 degrees for silicates), thermal energy breaks the rigid bonds of the lattice, and glass becomes a liquid, with ions gaining freedom of movement. The current in molten glass is the physical movement of charged atoms (ionic conductivity), not just “flowing” electrons.

The green tint you see on the edge of regular glass (as seen in the attached picture) turns out to be caused by iron ions, present as impurities (~0.1%). Sand is a natural material, and removing all the iron from it is difficult and costly. Low-iron glass, which has tens of times fewer iron ions, is used in solar panels, not just because it is more transparent. Iron greedily absorbs the infrared spectrum (thermal energy), reducing the efficiency of the panel. By removing iron, we allow maximum energy to reach the silicon cells.

And finally, the most “mind-blowing” (literally). There are these things called “Prince Rupert’s drops.” If you drop molten glass into icy water, the outer shell of the drop cools and hardens instantly, while the inner part remains liquid. As it cools, the core tries to contract, but the hardened shell doesn’t allow it. As a result, the inside of the drop preserves colossal mechanical stress (up to 700 MPa).

The physics of this process creates a paradox: the “head” of such a drop can withstand being struck by a hammer because the compression of the surface makes it incredibly strong (the same principle is used in tempered glass for smartphones). But just nick the thin tail, and the balance of forces is disrupted, and a wave of destruction moves through the drop at the speed of a bullet (about 1.5 km/s), turning it into glass dust right in your hands.

There’s also something in physics called “metallic glasses” (amorphous metals). If you cool the molten metal at a rate of a million degrees per second, atoms do not have time to arrange into a crystalline lattice and freeze in chaos. Such “glassy metal” possesses unique magnetic permeability and is stronger than titanium, because it lacks crystal lattice defects, which are usually the points of destruction. So glass is a much broader concept than just transparent substance in our windows 🙂

The only example of an object made from this material, amorphous metal, that I’ve encountered is, believe it or not, the iPhone clip.

By the way, that same amorphous structure of glass, which I mentioned earlier, gives it an unexpected advantage — supernatural sharpness. If you take a scalpel made of the best surgical steel and look at it under an electron microscope, its edge will look like a jagged saw. This is inevitable: steel is made up of crystalline grains, and it’s impossible to sharpen it any smoother than the grain size allows.

But obsidian (volcanic glass) when fractured provides an edge only about 3 nanometers thick (about 1/30000 the thickness of a human hair). There’s no magic here, just that glass lacks a crystalline lattice, which would otherwise prevent achieving a perfectly smooth fracture down to the molecular level. That’s why obsidian scalpels are still used in the most complex eye surgeries — the cut is so clean that tissue cells are minimally traumatized, and healing occurs faster.

And one more powerful engineering case — vitrification (glassification). Mankind has chosen glass as the most reliable “safe” for nuclear waste. Liquid radioactive waste is mixed with special additives, melted, and cooled into blocks. The trick is that dangerous isotopes are not just poured inside, they are chemically embedded into the atomic grid of the glass. Glass is chemically inert, it doesn’t rust like metal or decompose for thousands of years. This is perhaps the only material that engineers trust to store hazardous substances on a geological time scale. Yes, it takes about a million years for a discarded bottle to decompose.

And finally. Digging into history, it turns out that the Romans were engaged in nanotechnology 1600 years before we even invented the word. In the British Museum stands the “Lycurgus Cup” (4th century AD). If you look at it under normal lighting, it’s greenish and opaque. But if you place a light source inside the cup, the glass flashes bright rubin red.

Until the 1990s, scientists could not understand how this was achieved. An electron microscope showed: Roman craftsmen added gold and silver, ground to nanoparticles about 50 nanometers in size (about 1000-1800 times thinner than a hair). This size of particles triggers a quantum effect known as surface plasmon resonance: electrons in the metal begin to oscillate such that they absorb some wavelengths of light and let others pass depending on the angle of incidence. The funniest thing is that the Romans did this empirically, “by eye,” and we’ve only just learned to replicate this consciously in photonics. It’s crazy to think you could handle 50 nm gold dust by eye. This moment required additional googling.

It’s unlikely the Romans mechanically crushed the metal to 50 nanometers — they had no such mills.

More likely, they added gold and silver in the form of salts or foil to the molten glass mass. The nanoparticles formed not by crushing, but by crystallization and sedimentation from the melt under very precise temperature conditions (“glass prescription”). This is even more complex chemistry than simple grinding.

The most astonishing thing is not that they did it, but that the ratio of gold to silver was maintained perfectly. Changing the concentration of gold by just 1% would alter the color to something other than pure ruby red. This indicates that the craftsmen mastered the technology incredibly accurately, although they likely did not understand the mechanism. And that they had a heck of a lot of time for all kinds of nonsense;) probably many generations dedicated their lives to experimenting. Because it’s hard to see why all this was necessary.

There’s a beautiful hypothesis (unproven, but popular) that the cup could have been used as a detector. If you pour a different liquid into it (for example, alcohol with impurities or poison), the refractive index changes, and the color of the “flash” might vary.

Data Science: The Modern Alchemy of the 21st Century | November 16 2025, 04:02

A cryptic post today. While writing a book on RecSys, I caught myself thinking that modern data science is essentially the alchemy of the 21st century. Half of the “best practices” in algorithms lack a solid mathematical framework. It’s a set of heuristics that “just work”. Much like in the 17th century where they mixed everything indiscriminately, it happens now, and if something works better, everyone else starts doing the same. There’s just no answer to the question “why”.

Take, for example, the NCF/NeuMF (Neural Collaborative Filtering) algorithm. The logic goes like this. Say, there are a million movie ratings by users. And 100 million ratings by users yet given – users can’t watch every movie in the world. But out of these 100 million, you need to choose candidates for advertising for a particular user. The algorithm, of course, has a training phase, where weights are calculated, and a prediction stage, where these weights are used on the incoming data.

(What the algorithm does. Essentially, it’s an ensemble of three sub-algorithms, two of which generate their own conclusions, and then their decisions go to a new neural network, the third algorithm, which provides the final recommendation. Smartly, it’s a hybrid of GMF (matrix factorization) and MLP (Multi-Layer Perceptron). The first of these two is based on matrix decomposition, and the second represents a neural network with multiple layers. Weights are adjusted on training data.)

For one positive example, it takes 4 negative ones. Why four? Just because it’s “not too many and not too few”. Would 8 be better? Unknown, but it would definitely take longer to learn.

Why are embedding dimensions 32? or 64? There’s no formula. It’s the “golden mean” between a “dumb” model (few k) and an “overtrained” (many k).

Now about the neural network. Why is the MLP block built as a “tower” (64 -> 32 -> 16)? Why not (50 -> 25 -> 10)? Why ReLU between them (and not tanh for example)? Pure empiricism. The number of layers in the tower is also adjusted.

Why do GMF and MLP parts have different embeddings at the input? Because the authors of the paper tried it, and it “worked out better”. No mathematical proof. Why do they go to the final layer with equal weights? Because they just do.

Why are the outputs of the two paths “concatenated” (concat), and not added or multiplied? “Experience showed that this way the result is more accurate.”

And so it is with everything, up to the choice of optimizer Adam or the “magical” learning_rate=0.001, although at least these have some mathematical basis.

That is, at least a dozen parameters of one algorithm are empirically chosen, with no clear confidence that they are independent of each other. But many of them depend on the dataset, but no one knows how 😉

In general, alchemy.

Smart Car Seat Selection: How My Tesla Knows the Driver | November 03 2025, 14:29

Incidentally, in my Tesla, there’s a very clever system for identifying the driver. If I enter the car first but sit in the passenger seat, placing my phone immediately in the central console for charging, and then Nadia enters second but sits in the driver’s seat and also places her phone there, her profile is selected automatically because she’s the driver, even though both phones are on charge under the central console.

So, there are two possibilities: either there is an antenna which can precisely detect that a phone has crossed the driver’s door rather than entering the car in any other way, or there is a camera focused on the driver. In any case, it’s very reassuring that it “just works”.

Unveiling “Recommender Algorithms”: A Comprehensive Guide on Recommendation Systems | October 25 2025, 17:36

I finally released a book on #RecSys! It’s called Recommender Algorithms, where I’ve compiled over 50 recommendation algorithms with detailed mathematical derivations, thorough explanations, and code examples.

https://www.testmysearch.com/books/recommender-algorithms.html

It all started early this spring in Germany, when I attended an ACM conference and sketched out the first structure of the book while analyzing the talks from the RecSys track. And now, just six months later, it has come to life.

Why did I write it? Because neither online nor in print is there a single, accessible resource that deeply explores recommendation algorithms of various types and purposes. There are articles focused on small subsets, but collecting and systematizing approaches—from foundational methods to the very latest—seems to have never been done before. I don’t know if I succeeded, but I’d love to hear your feedback.

Please like & share!

P.S. Click at READ SAMPLE to see the first 40 pages. The table of contents is there as well.

https://www.testmysearch.com/books/recommender-algorithms.html

https://www.testmysearch.com/books/recommender-algorithms.html

From Tesla Model Y to Model S Plaid: A Swap Experience | October 14 2025, 16:51

Recently, my Tesla Model Y fell ill, and the dealership gave me a Model S Plaid as a loaner car. It’s simply a monster, accelerating to 100 km/h in 2 seconds. Over a thousand horsepower. But after driving it for a week, Nadezhda and I realized that we would still not trade our Model Y for a Model S.

Well, the fact that it’s unusually low to the ground is a minor issue. We would get used to that. But getting out from behind the wheel is always incredibly awkward for me. My belly isn’t that big, but in the Model S, it’s like a real cockpit. You have to carefully sit down and climb out, whereas in the Model Y, you just jump in somehow and go.

Moreover, the Model S is really noisy inside compared to the Model Y. You can hear the road. And this is for a price twice that of the Model Y. Also, for some reason, the mode where you just walk away from the car works less sensitively, and locks the car only when you are already quite far away.

And then there are the turn signals. What idiot decided to put their buttons on the steering wheel? It’s impossible to get used to that. The steering wheel still turns, and the buttons are always somewhere unclear.

But, damn it, it’s very beautiful from the outside. Especially with a light interior.

By the way, Tesla has somewhat poorly thought out the mechanism for issuing a replacement car, and it works with only one driver. You can’t set two keys for two different phones. Moreover, it would be nice to store the settings in the cloud and receive a replacement car already adjusted to your preferences.

And the car fell ill in an interesting way too. It’s funny when the car on the highway tells you that there’s a little problem, the engine is dead, but you should not distract yourself, just keep driving. After parking, the car might theoretically not drive, but so far all is normal. If not, we will tell you. Meanwhile, your drive will not sound the same.

As I understood, the car simply switched from 4-wheel drive to 2-wheel drive. Funny that such a fallback exists at all. Already fixed, it needed an inverter replacement.