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

Резултати

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

Търсене: #tanzania

当前筛选 #tanzania清除筛选
Voyage.Travel.Tourism

@VOYAGE · Post #1079 · 31.08.2024 г., 12:14

🗺Tanzania🇹🇿 Zanzibar is Africa's Maldives, a place on the map with dozens of breathtakingly beautiful beaches! Pristine white sand, turquoise Indian Ocean waters, gentle sunshine, and fewer crowds make it an ideal vacation spot. #Tanzania @voyage

Hashtags

RTDocumentary

@rtdocumentary · Post #215 · 16.09.2021 г., 11:45

Crawling up Kilimanjaro with no legs #video#Tanzania When Aleksandr was born with no legs and deformed fingers, his mother abandoned him. He grew up in an orphanage for kids with disabilities in a remote Russian town. However, Aleksandr has always aimed high and dreamed big. Aleksandr got lucky and was selected to take part in a US humanitarian project. At the age of 15, he walked on his new prostheses for the first time in his life. His temporary foster parents couldn’t let him go and adopted Aleksandr. To inspire kids with disabilities, Aleksandr and his friends from the orphanage took on the challenge to climb Africa’s highest mountain Mount Kilimanjaro at 5,895 metres. RT Documentary witnessed their incredible feat and made a film - https://youtu.be/v2Sz3k9gKp8 For now, Aleksandr lives and studies in Boston, USA, and has climbed Kilimanjaro for a second time! Follow: https://t.me/rtdocumentary

ጠቅላይ ሚኒስትር ዐቢይ አሕመድ (ዶ/ር) ከታንዛኒያ ዩናይትድ ሪፐብሊክ ፕሬዝዳንት ጋር ተወያዩ ******************* ጠቅላይ ሚኒስትር ዐቢይ አሕመድ (ዶ/ር) ከታንዛኒያ ዩናይትድ ሪፐብሊክ ፕሬዝዳንት ሳሚያ ሱሉህ ሀሰን ጋር ተወያይተዋል፡፡ ጠቅላይ ሚኒስትሩ በማህበራዊ ትስሰር ገጻቸው ባጋሩት መልእክት፤ ከታንዛኒያ ዩናይትድ ሪፐብሊክ ፕሬዝዳንት ሳሚያ ሱሉህ ሀሰን ጋር የሁለትዮሽ ግንኙነትን በሚያጠናክሩ አስቻይ ጉዳዮች ላይ ውይይት አድርገናል ብለዋል:: #EthiopianBroadcastingCorporation#Ebcdotstream#Ethiopia#PMAbiy#Tanzania#Diplomacy

RTDocumentary

@rtdocumentary · Post #770 · 15.05.2022 г., 18:02

‘Isaac is a very fast and intelligent rat. He is good at concentrating on finding TNT.’ In Tanzania, giant hamster rats are trained to be professional bomb disposal experts. They work in minefields in former hotspots. The rodents can easily smell carefully camouflaged explosive devices thanks to their excellent sense of smell. Do you want to see how a bomb-sniffing rat is trained? Then, watch the clip and film Isaac: The Story of a Little Giant. #Tanzania#minefields Follow: https://t.me/rtdocumentary

AREA

@area_eng · Post #115 · 22.06.2025 г., 14:03

Russia and Tanzania are developing cooperation in nuclear energy During the negotiations at SPIEF-2025, Russian Energy Minister Sergei Tsivilev and Tanzanian Deputy Prime Minister and Minister of Energy Biteko Doto Mashaka discussed the prospects for joint work in the energy sector. The Tanzanian side presented an ambitious five-year energy development program, which provides for a gradual increase in electricity supply to the population from current levels to 75%, and in the future - up to 100% coverage. Particular attention in the strategy is paid to the development of renewable energy sources and the study of the possibilities of peaceful nuclear energy. "Our president set the task that it is impossible to build technological sovereignty in one separate country. It must be built together with friendly countries. And the Republic of Tanzania is precisely our friendly country. Therefore, we are ready to share our technologies," Sergei Tsivilev emphasized. The Russian side proposed a comprehensive approach to cooperation. It includes the possible construction of low-power nuclear power plants, training of personnel in Russian universities, conducting technical and economic research, as well as implementing joint projects in non-energy areas - medicine and agriculture. This dialogue has become a logical continuation of previously reached agreements. In April 2025, Rosatom and the Ministry of Energy of Tanzania signed a memorandum on cooperation in the field of non-energy application of nuclear technologies. New negotiations expand the scope of interaction, opening up prospects for the implementation of large-scale energy projects. Experts note that Russian-Tanzanian cooperation in the nuclear sector can become a key factor in the implementation of the energy strategy of the African country. It will provide its population with stable and environmentally friendly energy sources, and will also create a basis for the technological development of a number of related sectors of the economy. #AREA#Africa#Russia#Tanzania#energy

RTDocumentary

@rtdocumentary · Post #749 · 12.05.2022 г., 15:00

'My father needed cows, not me'. These are the words of 13-year-old Kristina from Tanzania. Her father sold her to an older man to get a cow. The tradition is still widespread in Tanzania. Families live in poverty and find it difficult to feed themselves. So for a 13-year–old bride, her parents receive a rich dowry - almost a herd of cows. But the Tanzanian government is cracking down on this custom. Watch Kristina’s heartbreaking story. You can learn more about this tradition in ourfilm Bride Trade. #Tanzania#traditions#bridetrade Follow: https://t.me/rtdocumentary

123•••56
ПредишнаСтр. 1 от 6Следваща