TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #721 · 26.12

Почему я люблю языки с сильной системой типов, проверяемой статическим анализом кода — хорошо написанная программа является своей собственной спецификацией и позволяет выражать через язык программирования законы существования предметной области. Когда-то давно я писал на ActionScript. Там была система типов, но вот десериализация JSON'ов по-умолчанию была в какой-то общий Object, к полям которого нужно было обращаться ["по_строковому_имени"]. В один момент мне потребовалось написать что-то на C#, который я совсем не знал, я стал гуглить, как десериализовать JSON, и с удивлением обнаружил кучу советов заранее объявить класс со всеми нужными полями и десериализовать в него. "Какой ужас!", — подумал я тогда, — "Это же дико неудобно! А если я не знаю полей JSON? А если их много? Отвратительный язык!" Теперь то я прекрасно понимаю, что JSON это контракт, и что правильная десериализация только такая и должна быть, и что в хорошем API в одном поле никогда не бывает данных принципиально разных типов, и так далее. Нет, если вы набиваете вечерами пет-проект или сидите бессонную ночь на хакатоне, нет ничего плохого в том, чтобы взять простой язык с динамическими типами вроде JavaScript или Python, не требующий описывать данные. Но вот в энтерпрайзе, особенно когда над одним проектом работает много людей (а бывает это очень часто) — хорошее использование системы типов убережёт разработчиков от огромного количества ошибок, будет бить их по рукам, когда они пытаются сделать что-то не то, и будет подсказывать, когда они не уверены в чём-то. С помощью статической типизации можно на уровне кода обозначить правила, по которым ведёт себя предметная область вашей программы в реальном мире. Разработчику не только будет сложно их нарушить, но он ещё и станет узнавать какие-то вещи, которые мог не знать раньше. Например, если мы делаем медицинскую CRM, и больница заводит новых пациентов только тогда, когда знает их группу крови, мы можем объявить тип "Пациент" (или, если точнее, "Карта пациента") и запретить создавать экземпляры этого типа, не передав в конструктор группу крови (которая, в свою очередь, тоже является типом, вероятнее всего ValueObject'ом). Если новый программист пришёл в проект, он, во-первых, не сможет записать в БД некорректную карту пациента. Понятно, мы не учитываем случаи, когда новый программист переделывает модели предметной области — это будет хорошо видно на кодревью. А, во-вторых, даже если ему никто не сказал, что пациенты должны быть с группой крови, он узнает это из кода. И уже будет понимать, что в тех процессах реальной жизни, которые он описывает кодом, карта пациента создаётся только при наличии группы крови. А, значит, нужно искать какой-то способ сначала эту группу крови получить, и только потом создавать карту. Программирование моделирует реальный процесс. В настоящей работе даже на языках с типами, конечно, без должного контроля можно написать что угодно. Нужна управленческая воля, компетентность руководства, понимание опасности техдолга, в идеале отдельные должности для архитекторов, опытные лиды и старшие разработчики. Но когда всё это есть, можно отсекать много проблем ещё на старте и проще погружать новичков. #dev

Hashtags

Резултати

Намерени 41 подобни публикации

Търсене: #sweden

当前筛选 #sweden清除筛选
DE - Geopolitics Edition

@DefendEvropa · Post #15728 · 13.09.2022 г., 17:53

#Sweden, national parliament election: S (S&D) is largest in all constituencies but two in Scania where SD (ECR) leads. SD, M (EPP), KD (EPP), L (RE) are together stronger in the South. S, C (RE), V (LEFT), MP (G/EFA) together do best in the North and the three largest cities. ➤ europeelects.eu/sweden

Hashtags

POPULAR FRONT

@popularxfront · Post #6146 · 03.05.2026 г., 16:27

🇸🇪#Sweden: The Swedish Coast Guard has seized a Syrian-flagged vessel named Jin Hui, suspected of being part of Russia’s so-called "shadow fleet". The ship was sailing in Swedish territorial waters south of Trelleborg and had appeared on multiple sanctions lists. Its destination was unclear. Authorities also suspect the vessel may have been operating under a false flag and was reportedly carrying no cargo. (via Reuters)

Hashtags

International Geographic

@internationalgeographic · Post #5450 · 24.02.2025 г., 19:34

#Sweden🇸🇪 The Luleo Archipelago is a group of Swedish islands in the northern part of the Bayer Belonian, located near the city of Luleo and the mouth of the Lule River. The sea freezes in January and remains frozen until March - April. Ice roads are cleaned by the four populated islands.

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #1205 · 23.12.2024 г., 13:14

🗺Sweden🇸🇪 📏 📏 📏 📏 📏 📏 📏 📏 Performance at the Taylor Swift concert in Stockholm 🤩 📏 📏 📏 📏 📏 📏 📏 📏 #Sweden @voyage

Hashtags

Voyage.Travel.Tourism

@VOYAGE · Post #844 · 05.04.2024 г., 12:16

📍Sweden🇸🇪 Gorgeous evening view from the Liseberg amusement park in Sweden. 🎢 Liseberg Amusement Park is also a true symbol of love, as it was built in 1923 by merchant Lamberth for his terminally ill wife Lisa. He transformed the former pastureland into a real garden with trees, flowers, and water areas. 🌳🌺😍 After Lisa's death, the park was donated by her husband to the state, and currently, it attracts about 3 million visitors per year, making it one of the most popular entertainment and leisure destinations in Europe. #Sweden @voyage

Hashtags

POPULAR FRONT

@popularxfront · Post #5402 · 13.03.2026 г., 13:43

🇸🇪#Sweden - 🇷🇺#Russia: The Swedish Coast Guard, together with the police, has boarded another vessel suspected of operating under a false flag off the coast of Trelleborg. The oil tanker, named "Sea Owl I", is believed to be part of Russia's shadow fleet. It was reportedly sailing under an alleged false flag on its way to the port of Primorsk in Russia after departing from Santos, Brazil. Investigators were also alerted by the fact that the ship appeared unusually light and insufficiently loaded. After the Coast Guard boarded and took control of the vessel, the captain, which is a Russian citizen, was taken in for questioning, however, he has not been arrested yet. Meanwhile, the Russian embassy in Sweden stated earlier today that it is "monitoring the situation", with Russian officials describing the boarding as an act of "piracy". (via Göteborgs-Posten & Reuters)

POPULAR FRONT

@popularxfront · Post #5311 · 08.03.2026 г., 01:16

🇸🇪#Sweden - 🇷🇺#Russia: Swedish special forces, along with aviation police and the coast guard, have seized a sanctioned Russian vessel which was sailing under a false flag. The operation took place this Friday while the ship was sailing in Swedish territorial waters in the Baltic Sea near Trelleborg. The ship was involved in the theft of grain from the territories that Russia has occupied since July 2025. During last summer, the ship is said to have had its flag changed from a Russian flag to a Guinean flag. (via Göteborgs-Posten)

POPULAR FRONT

@popularxfront · Post #4229 · 21.12.2025 г., 17:18

🇸🇪#Sweden - 🇷🇺#Russia: The Swedish Coast Guard has boarded the Russian vessel ADLER in the Baltic Sea and carried out inspections on the ship which was reported to regularly transport military cargo to Russian allies in Africa. The ADLER is operated by M Leasing LLC, a logistics company under EU sanctions and linked to the Russian Ministry of Defence. The ship was forced to anchor off the Swedish coast yesterday morning after reportedly suffering an engine failure. According to Swedish media, the crew is cooperating with the Swedish Coast Guard during the inspection. (via Reuters; 📹 via @wartranslated on X)

ПредишнаСтр. 1 от 4Следваща