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

Резултати

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

Търсене: #children

当前筛选 #children清除筛选
RTDocumentary

@rtdocumentary · Post #892 · 09.06.2022 г., 16:01

‘Jorge was my only son, he meant everything to me. He and his pregnant wife were taken from their home in handcuffs with bags over their heads.’ Delia de Califano from Argentina has never seen her son or daughter-in-law after the event she describes. From 1976 to 1983 Argentina was ruled by the junta. Those who disagreed with the military dictatorship were kidnapped and tortured. Children of opposition members were given away to childless military families. For more than 30 years Delia hasn’t lost hope to find her grandson. Those women, whose kids were kidnapped back then created a group and became known as mothers of the Plaza de Mayo. Mostly being 80+, they are still looking for their children. Their stories are in the documentary Argentina’s Stolen Children. #humanstories#children Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #920 · 14.06.2022 г., 10:26

How Ukrainian schoolchildren are instilled with Nazi ideology A textbook titled 'Defence of the Motherland' was found in one of the schools in Mariupol. It was published in 2018 under the patronage of the SBU and was given to high school students. The textbook describes the mining of public places, biological weapons, and how to handle grenades, RPGs and Kalashnikovs. The book also explains to teenagers the advantages of NATO and how dangerous Russia is for Ukraine. Several chapters are devoted to warfare. Teenagers were told how to fire, act as part of a combat team and provide first aid if wounded during a fight. In addition, illustrations explain how NATO troops defend and attack. And that’s not all there is to say about education in Ukraine. See our documentary film Fast Forward to Fascism to find out how children are being taught a distorted version of history. #Donbass#history#children Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #906 · 11.06.2022 г., 12:01

According to the deputy regional director of UNICEF, Rania Dagash, 386,000 children in Somalia need treatment due to malnutrition caused by a long drought and the lack of humanitarian aid. Experts say the COVID-19 pandemic and anti-Russian sanctions have caused difficulties in helping people. For example, about 92% of Somalia’s wheat needs came from Ukraine and Russia, but now supply chains are disrupted, said Rania Dagash. But the main reason is drought linked with global climate change. Today’s most suffer from freshwater shortages, and more frequent droughts regions are Somalia, Ethiopia and Kenya. Droughts are just a part of a global water crisis. Watch the documentary No Way Back: Water to learn more about what’s happening to the water cycle and our planet’s water resources. #children#Somalia Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #816 · 25.05.2022 г., 17:02

‘I told them it isn’t for me, but they didn’t believe me. They kept beating me. They fed me very poorly.’ This Indian girl was held as a sex slave for a year. She left home to get some money for her brothers to get an education, but it ended badly for her. In India, these kinds of stories are common. Children are often kidnapped and sold into slavery. Today is International Missing Children’s Day, that’s why we want to show you this poor Indian girl’s story. Watch the clip to know what horror she has gone through. Find more stories like this in the documentary Lost Kids. #children#slavery Follow: https://t.me/rtdocumentary

📱🚫FLORIDA BANS SOCIAL MEDIA FOR KIDS UNDER 16 — PARENTS REVOLT 🔹 Governor DeSantis signs strictest social media law in America — platforms must verify age or face fifty thousand fines per violation 💰 🔹 TikTok, Instagram, Snapchat given 90 days to implement age verification — biometric scanning and ID checks required 📋 🔹 Parents file federal lawsuit claiming violation of First Amendment rights — ACLU joins challenge citing free speech 📊 🔹 Tech industry threatens to exit Florida market over compliance costs — Meta considers blocking state IP addresses 🔥 America's kids vs. Big Tech battle intensifies as states push digital protection laws 💻 #Florida#socialmedia#children @america

Borkena

@borkena · Post #6206 · 23.04.2026 г., 14:19

"ሂውማን ራይትስ ዋች" በወልቃይት በትግራይ ተወላጆች ላይ መድሎ ይደረጋል የሚል ክስ አሰማ ፤ በሰሜኑ ጦርነት ከ 30,000 በላይ ህጻናት ወላጂ አልባ ሆነዋል መባሉ እና ሌሎች ዜናዎች፡፡ https://youtu.be/LxMt8G6OnbY#Ethiopia#News#EthiopianNews#Welkait#Tigray#Children

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