Notes of a Traveling Cat

Notes of a Traveling Cat · Habr, Aug 1, 20238 min

Taking stock of my second decade of programming in C++ across all sorts of fields, from hydroacoustics and access control systems to games and classic game AI, I look back and all kinds of stories surface in my memory, some funny and some not so much, sometimes silly and amusing, sometimes frightening and mysterious. But always so memorable that their colors haven't faded even now, after all these years. I'm surprised myself that an ordinary coder managed to collect quite so many of them. I don't know where to put these stories, I couldn't find a Humor hub, so let them live under IT History, since this is IT too.

Traveling cats, harness them and they pull!
They never stray from the route,
but for some reason they're often blue.


Note number one, or Iron Man

I started out at a company that, in the early two-thousands, installed access control systems at all sorts of high-security sites, like the "Zvezdochka" shipyard in the glorious city of Severodvinsk. The city stands, as you may have guessed, on the bank of the Northern Dvina river in the Arkhangelsk region, near the White Sea. The nature there is breathtaking, the city itself is surrounded by picturesque forests and lakes, and the hunting and fishing there are probably the most beautiful of all the places I've been. Winter landscapes of snowfall and frost give the city a special, charming look.

And amid all this frosty splendor stands a plant that unloads fuel rods from submarines and, every now and then, saws those submarines up. As befits any serious high-security facility, everything inside is terribly restricted too, and some places require even more serious protection, like the ones where those fuel rods get unloaded. Twice a year my colleagues and I rode out for scheduled replacements and servicing of all kinds of small stuff like beam and volumetric motion sensors, sometimes laser elements, all perfectly normal - hardware wears out and ages. But at some point the sensors started dying almost every week, which didn't sit well with management at all, because reputation matters more than money. To be honest, the plant paid for all the business trips, but mess up once at a major site and you can forget about lucrative contracts, or about contracts in general. By the second week of the "crisis" a buddy and I arrived in the glorious city of Severodvinsk intending to figure out what on earth was really going on with the system and the sensors. At first we suspected power surges, but everything was wrapped in UPSes so thoroughly that they would burn out first, and only then everything else. The most interesting part was that the ones failing more often than the rest were the beam and volumetric sensors, the ones that react to the presence of living and not-so-living beings. Just kidding, of course, basically they're tuned to humans, and they didn't react to cats, dogs and birds all that noticeably. We crawled over the whole system, everything was fine, and not a single one broke in a whole week - a downright miracle. We were already getting ready to leave, had bought the train tickets, and one of the sensors fails, we start digging in while it's still hot, and there's plenty to think about, because we had replaced that very sensor when we arrived. We decided to look at the access log, there weren't all that many entries, but after filtering by the failed elements, visit times and, as it later turned out, smoking spots, we find... the culprit? I don't know what else to call it, but two months before this circus began, one of the submarines had come to the plant for its final mooring, and its captain kept coming by to oversee the death of his nuclear sub. Once we caught the captain first rank, who turned out to be a regular Siberian guy, we started asking him why he came here, and his answer put us on guard - is something breaking? I can't say I'm much of a believer in any kind of forces, but we had 10 failed specimens on our hands. And that evening we sat in a tavern over a shot glass of "tea" while the captain showed us tricks. For starters he asked for my Ericsson T28s and put it in his pocket. The captain had trouble with technology, or rather, technology had trouble with the captain. His cell phones lived three or four months and then died, batteries bought at the store could be flat by the time he got home. And when he walked past the TV on the wall, the picture went to snow. But out at sea everything was fine, even more than fine - his boats had one of the lowest breakdown rates. Between conversations and sea yarns the evening flew by like five minutes, and then the captain handed back my dead phone, which I had charged that morning. These days my new Samsung barely makes it to the evening, worn out from checking email and showing the clock on the screen. That Ericsson happily lived for several days on a single charge. The next morning we had a test smoke near a couple of sensors that were due to be replaced on our next visit, and... replaced them three days later, because they died. Fixing this was impossible, so we attached scripts to the captain's badge that switched the sensors off whenever he entered their range. And we left the local tinkerers everything we had brought with us, since the captain would be stuck here for another half a year. You've probably already guessed the captain's nickname.

The modest little "Zvezdochka" plant

Note number two, or Mission Impossimeow

Another site, the setting - a harsh Siberian winter in the glorious city of Krasnoyarsk-45 (Zelenogorsk), one of the closed cities in Russia, located in Krasnoyarsk Krai, in southern Siberia. It was founded in 1956 as a secret atomic city for developing nuclear weapons and producing nuclear fuel, and it's also home to a plant that mines uranium ore by the open-pit method, because rock rich in this element simply comes out to the surface. Until the early '90s the city didn't appear on maps at all.

We head out on a business trip because of strange and frequent alarms from the security system, an experimental one on which algorithms for analyzing human behavior were being broken in, movement speed, time spent in a room, weight, volume, gait rhythm. All of it was collected, analyzed, and all kinds of anomalies were searched for in that "big data". So the system repeatedly overreacted to Granny Valya, a 70-year-old cleaning lady, raising the floor guards on alarm in the evenings and squealing that it wasn't Granny Valya cleaning the room but an evil spy swiping uranium mining secrets out of a nightstand in a restricted office. Granny Valya was in fact a sly old fox, or rather, a devoted cat lover, and sometimes brought along one kitty or another, who also didn't mind making the rounds and inspecting the premises. Which drove the sensitive electronics crazy, with two bodies with different behavior signatures in a room that only one had entered, and so it raised the alarm across the whole floor. By the time the men in black arrived with assault rifles at the ready, the culprit was tucked inside her coat, and the sweet little old lady was finishing mopping the office, cursing the butterfingered programmers from faraway Petersburg. Probably everyone at the plant knew Granny Valya and nobody checked her much at the entrance, so the kitties were often delivered to the scene of the crime in comfort. It all came out by accident when, on yet another round of the premises, the animal decided to taste 82V of low-voltage wiring and, having spent its ninth life, passed away in its owner's arms, and she came to the guards in tears. Meanwhile we were going gray, because the alarm had gone off again, the third time that week, and a broken-wire alarm could only be cleared by the head of security with his own card, the whole floor was wailing with sirens, and the men in black from the checkpoint were rushing to help the floor guards, led by the plant director himself. One shot glass of "tea" didn't cut it that time, but in the end we did get the system into trial operation.

Without a cat, life's just flat.

Note three, or the Amphibian Man

After graduating from university in 2006, I got a job at an outfit that developed technical means of detecting all kinds of underwater things that try to surface where they shouldn't and peek where they're not allowed - stationary hydroacoustics, in short. With three years of production code for all sorts of cool access control systems behind me, I was at my personal Ballmer peak from the chance to take part in developing equally cool software systems. It so happened that I joined at the very start of the project, effectively the only application programmer on a new software suite, which was being broken in on field trips somewhere beyond the Arctic Circle. We arrived in the glorious town of Gadzhiyevo, and I, proud of Item N, inside which the little bytes of my code are beating, march across the hills roughly toward the sunrise. Item N is angular, assembled from components that can in principle keep working not far from a puny little nuke blast, weighs a bit over 10 kg, and I cheerfully haul it toward the sun along the road among the hills.

Hills and submarines

By the end of the second hour of the journey I realize that there's essentially no road at all, just marker poles along the edges, the item has put on weight and grown especially square and awkward corners, which I no longer really feel, and the same goes for my back now and then. And the self-compiled little bytes running in debug, because the release build leaks memory and things like valgrind haven't been invented yet, aren't that much of a joy anymore. Doesn't matter, real men don't whine, they just keep going forward, even when they can't anymore. We get to the spot and deploy the equipment, the antennas themselves sit on the seabed. We switch on and tune up, and ask the tug assigned to us to move around with a corner reflector so we can fit the seabed terrain more precisely. About half an hour later we see a diver swimming from the tug toward the antenna and happily report over the radio - "we see you, why did you send out a swimmer without the command". And they answer, surprised, - "the diver's right here, sitting on deck, catching his breath". Now it was our turn to be surprised, because apart from people, only sharks, killer whales and a couple of other sea creatures that definitely have no business here move that evenly. We ask the tug to come over and look through its side-scan sonar (a locator) at whatever marvel is swimming there, but as soon as the tug got moving, the blip dissolved. This repeated several more times during the trials, whenever the tug came with people and stood still, a "diver" would separate from it and swim toward the antenna and, after circling a bit at the edge of the echo pit, vanish, or vanish sooner if the tug started moving. We never did figure out what it was, maybe it was an echo from the tug's propellers resonating in some odd way, or maybe some animal, or a dense school of fish, which can also "light up".

common ringed seal

Note four, or all brawn, no brains.

Another business trip to the end of the world, to the glorious city of Vladivostok. We're defending the motherland's borders from everything that swims underwater in the Golden Horn Bay. Handover of the harbor security system is heading toward completion, but someone with shoulder boards gets the idea of setting up a backup observation post not where the main system is installed but at the unit's headquarters, five kilometers from the bay. The team wasn't particularly thrilled, because everyone was already set on handing over the system and going home, but nothing to be done, he who pays the piper calls the tune. An extra condition of the quest was that we weren't allowed to plug into any existing networks for security reasons. In the end we decided to lay fiber, but since this was a non-civilian system, the fiber turned out non-civilian too, a brutal fiber, 6 cores in double armor. By the time the second post was being deployed, we asked the commander to lend us some sailors to run a temporary line through the air along the likely cable route, we'd bury it later. The assigned troops were tasked with dragging the cable from two reels from here toward headquarters, but either we discussed too loudly how best to run the route, or the sailors turned out to be very "quick-witted" - be careful what you wish for. Our words about running the cable through the air were taken literally, in places it went through trees, in places over bushes and benches and dangled playfully from poles, but almost nowhere did it lie on the ground. It must be said, to the servicemen's credit, that they managed it in a few days, unwinding all 5-plus kilometers from the reels. Only when we started switching on the backup workstation, it turned out there was no link. The likelihood of such an outcome was unlikely, the cable had been tested before shipping, and the only things that could damage it were a megalodon, should it decide to have a snack at depth, or a wild excavator in a fit of digging. Nothing to be done - we walk along the route, marveling at the ingenuity of the conscript sailors, "marveling" in four-letter words for about a kilometer, after which it was the always-calm chief project engineer's turn to marvel, when he saw the cable tied in a knot and carefully draped over branches so it wouldn't fall. To grasp the full absurdity of the sight, try tying a tree branch as thick as your arm into a knot, the stiffness is comparable.

Vladivostok, the bridge was still being built

As it turned out, the cable had been hung like that in two more places. Naturally, there was no longer any talk of permissible bend radii, and we had to call in a craftsman from the capital who knew how to splice that kind of fiber, because the locals all refused, even for all the money in the world. Of the 6 cores, 4 didn't survive the execution, and of course different ones in different places, the channel was torn up thoroughly, and splicing all the damage cost as much as a brand-new Lada. We never managed to get a coherent reason out of the squad of Hulks - "why the f... did you do that?" - everyone denied everything and pointed fingers at each other, all to no avail. We handed the system over badly behind schedule, by then just dreaming of getting home, after throwing a good banquet for the base command.

These, of course, aren't all the notes of a traveling cat, I'll write up and post the others later if you liked these.

Thanks for reading to the end.

All notes