The DIMV Blog

Покрытие в картинках

Тесты — это хорошо. Приятно работать с кодом, который хорошо покрыт качественными тестами. Тесты дают свободу. Можно экспериментировать, не боясь что-нибудь сломать; можно рефакторить код до идеала, не опасаясь, что он перестанет работать. Люблю тесты.

Покрытие тестами — полезная метрика, если не делать из неё цели1. Дядя Боб на одной из лекций спрашивал аудиторию, к какому проценту покрытия кода тестами стоит стремиться, и, получив в ответ что-нибудь вроде «95%», с картинным удивлением вопрошал: «Выходит, вам всё равно, работают ли остальные пять процентов вашего кода? Так стоило ли их писать?!»

Не суй наши ПД во вражескую БД!

Тут вот у нас есть 152-ФЗ «О персональных данных». И в нём написано, что

персональные данные - любая информация, относящаяся к прямо или косвенно определенному или определяемому физическому лицу.

– 152-ФЗ «О персональных данных», ст. 3, ч. 1.

То есть, например, имя, фамилия и номер паспорта — это всяко персональные данные, другой трактовки никак не получается.

А ещё написано, что этот закон вполне себе применим

к обработке персональных данных граждан Российской Федерации, осуществляемой иностранными юридическими лицами […], на основании договора, стороной которого являются граждане Российской Федерации, иных соглашений между иностранными юридическими лицами […] и гражданами Российской Федерации либо на основании согласия гражданина Российской Федерации на обработку его персональных данных.

•••

В этом году будет двадцать пять лет нашему выпуску из школы. По этому поводу вчера мы традиционно собирались вместе, и нас было больше, чем обычно (я и сам не каждый год участвую в подобных мероприятиях).

Удивительно теплой и дружной получилась встреча. Мы выросли очень разными людьми, и может быть, не каждый из нас с охотой общался бы индивидуально с каждым из остальных, но всем вместе нам оказалось друг с другом очень хорошо и комфортно. Наверно, мы очень счастливые люди.

•••

I missed out on a rather good movie today.

My wife was watching, and I was doing some housekeeping on one of the non-work-related projects. I could have joined her on the couch, but I chose to turn my back on the TV, so I didn’t watch. I listened through the whole story, and I turned around to watch several scenes, but I didn’t watch the movie. I think I would have enjoyed it if I watched.

•••

In Russia, we have a lot of holidays. Some think we have way too many holidays, but I’m kinda used to it, so I’m not fit to judge.

Most of Russia doesn’t observe Christmas on December, 25 (the prevalent church here is the Russian Orthodox who never switched to Gregorian calendar, so Christmas is January, 7). However, the USSR legacy (they tried to make the church-related holidays obsolete by introducing the non-church-related holidays about vaguely the same dates) of celebrating The New Year on January, 1, combined with the modern Russian return-to-roots state-wide celebration of Christmas, results in the state-sanctioned holiday (think of it as “bank holiday” in Western terms) spanning most of the first half of January.

•••

Today, in one of the Telegram chats somebody asked if anybody remembered what the limit of the filename length in MS-DOS was. That someone could not remember the 8.3 rule seems counterintuitive to me, but I can rationally persuade myself that there are people who never worked with DOS or that someone could forget. That’s not what triggered this post.

It was the answer. Someone just forwarded an reply to the question from one of the GPT assistant chats.

•••

I’ve been wearing a wristwatch since I was a teenager. If I happen to leave home without a watch on my wrist, I feel as if I’m naked, uncomfortable. For the last ten years, I’ve been using smartwatches almost exclusively.

Three months ago, my smartwatch stopped functioning and I decided to try and live with an ordinary watch for a change. I dug out my old quartz watch, put in a new battery and set the time. The battery is still good three months later and will run for a couple years more, which is awesome compared to smartwatches. The rest of the experience was frustrating.

•••

I don’t really care about the US politics or the US economy that much. I don’t live there, and the local developments around me interest me much more. However, as I read about Elon Musk being appointed as advisor or whatever it is, I remember thinking: “Now, at least they’ll have someone with an idea”. After all, what Musk did to the industry of space launches is worth a praise every day of any week — at least in my book.

SpinRite

SpinRite is a piece of data recovery software written by Steve Gibson of dubious Security Now fame. Anyone familiar with the matter knows how much Gibson likes to boast about SpinRite, how it is a complicated piece of software writted in pure Assembly language, how it’s polished and thoroughly tested on a variety of obscure hardware to achieve perfection at every release, and how its data-recovery algorithms are based on intricate physics of modern disks to ensure the recovery of every bit of data that could possibly be recovered. The data recovery ability “which far exceeds any other known utility” is the main selling pitch there.