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

Резултати

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

Търсене: #incidents

当前筛选 #incidents清除筛选
Bali News

@balinews · Post #601 · 04.04.2026 г., 09:25

👮‍♂️ Another social media thrill-seeker in Bali has ended up in an immigration report 📍 A video has gone viral showing a tourist speeding on a motorbike and launching off a well-known cliff near Balangan Beach straight into the ocean. 🛵 He tied the bike with a rope to keep it from falling into the water, but it didn’t help — the rented vehicle was badly damaged, and the offender refused to pay for the damages. #incidents@BaliNews

Hashtags

Bali News

@balinews · Post #531 · 25.11.2025 г., 13:50

👮‍♂️ A major scandal is unfolding in Bali 📰 According to local reports, russian influencer Sergey Domogatsky, known in Indonesian social media as Mr. Terimakasih (“Mr. Thank You”), is suspected of running a large-scale real-estate investment scheme. Amid the ongoing police investigation, Domogatsky has already left Indonesia. 👮‍♂️ Authorities say there are 30 complaints filed by 29 foreign nationals against the 40-year-old Russian. Victims claim he collected funds under the pretext of investing in luxury property developments on the island — projects that were never completed. 💸 The estimated losses amount to 80 billion Indonesian rupiah, roughly 5 million USD. 🔎 The situation continues to develop as Bali police carry on with the investigation. #incidents@BaliNews

Hashtags

Car News

@car_news · Post #1763 · 26.12.2025 г., 10:45

🚕Waymo robotaxis are back at the center of a scandal 📍 This time, the vehicles caused chaos on the streets of San Francisco. 🚥 The autonomous taxis use the traffic-light system for navigation, so when it goes down, route planning breaks as well. ⛔ For several hours, Waymo cars stood on the roads like bricks, blocking other drivers from getting through. Is rise of the the machines beginning? #driverless#incidents@Car_News

Car News

@car_news · Post #1741 · 12.12.2025 г., 13:33

😰Three Waymo robotaxis caused a “standoff” and blocked a street in San Francisco 📰 In the northern part of San Francisco, three Waymo autonomous taxis got stuck on a narrow street, completely blocking traffic. Two cars lightly collided while trying to maneuver, after which both went into emergency mode, and the third stopped right in front of them, creating a full traffic jam. 😤 Because of this, residents couldn’t leave their driveways and had to wait for company engineers to intervene and resolve the situation. All vehicles were empty — no passengers were inside. 💬 Waymo commented on the incident, calling it a “learning moment” for improving their autonomous driving system. #driverless#incidents@Car_News

Bali News

@balinews · Post #363 · 21.03.2025 г., 12:41

😱 А very impressive python crawled onto Seminyak beach for a rest yesterday 🐍 It was not allowed to rest, though – despite its status as a public beach, the snake was politely but firmly asked to leave. @BaliNews #places#incidents#Seminyak

Bali News

@balinews · Post #340 · 04.03.2025 г., 12:35

🗺63 bogus investors kicked out of Bali, 111 more await deportation 📰 The Immigration Service conducted Operation Wira Waspada from January 14 to February 21, 2025, together with the police and the Investment Coordination Board (BKPM). 🕵️‍♂️ During the operation, about 520 foreign nationals were found to have used investor visas to enter Bali although they were in the country for other purposes. Most of these foreigners came from China, Russia, Pakistan, India and Australia and were engaged in trading and consulting businesses. 💸 Due to such practices, Indonesia has lost investments worth about 1.6 trillion IDR. @BaliNews #incidents#realestate#investment

Voir de ses propres yeux

@voir_yeux · Post #12790 · 04.05.2026 г., 21:28

🇩🇪 Plus de 20 personnes ont été blessées à des degrés divers lorsqu’une voiture a percuté des personnes dans le centre de Leipzig (est de l'Allemagne), tandis que deux morts ont été signalés. C’est ce qu’a déclaré le chef des pompiers de la ville, Axel Schuh. Deux personnes ont été grièvement blessées, elles ont immédiatement reçu les premiers soins avant d’être transportées en soins intensifs. [...] En outre, nous avons aussi une vingtaine de blessés, a-t-il indiqué, cité par le journal Leipziger Volkszeitung. #incidents#allemagne#voiture#victimes

Voir de ses propres yeux

@voir_yeux · Post #12784 · 04.05.2026 г., 16:08

🇩🇪 Au moins deux personnes ont été tuées lorsqu’une voiture a percuté un groupe de personnes dans le centre de Leipzig (est de l’Allemagne). C’est ce qu’a rapporté le journal Berliner Zeitung, citant son correspondant sur place. Deux autres personnes ont été grièvement blessées, tandis que plusieurs autres ont subi des blessures moins graves. Selon les premières informations, l’accident s’est produit dans le centre historique de Leipzig, sur la principale rue commerçante de la ville. #incidents#allemagne#voiture#victimes

International News

@intnewsagency · Post #8541 · 17.03.2026 г., 06:24

Key Events of Monday, March 16 Bailiffs seized 32.1 billion rubles from Yuzhuralzoloto. Near Moscow, 61 drones were shot down within 24 hours. The Israeli army launched an operation against Hezbollah in Lebanon. Telegram fined 35 million rubles for incomplete removal of banned content. A powerful solar flare threatens a geomagnetic storm. The Ministry of Culture announced personnel changes. Gas prices rose in Moscow. Medvedev returned to ATP top 10. #Russia#InternationalNews#Incidents#Culture#Sports The main news of Russia and the world ishere.