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

Резултати

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

Търсене: #serbia

当前筛选 #serbia清除筛选
Orizzonti Politici

@orizzontipolitici · Post #980 · 07.01.2021 г., 10:54

Con il nostro giro del mondo, ora voliamo in #Serbia. 🇺🇸Con l’elezione di Biden negli Usa, le politiche statunitensi sono destinate a cambiare. I loro effetti si spingeranno sino ai Balcani, intaccando anche lo strano equilibrismo che costituisce il tratto peculiare della nazione tradizionalmente considerata egemone nell’area: la Serbia. 🇷🇸Visto l’appoggio concesso a Trump per il suo disinteresse sulla questione aperta del Kosovo, il presidente serbo Aleksander Vučić – già costretto ad affrontare i movimenti interni che denunciano una torsione autoritaria – dovrebbe essere annoverato tra gli sconfitti. 📥Non è così facile in Serbia, dove la politica estera si basa su quattro pilastri: i rapporti con Usa, Ue, ma anche Cina e Russia. Mantenere buoni rapporti con una nazione così influente è prerogativa essenziale. Nonostante tutto, l’elezione di Biden rischia di minare questo equilibrio. ▶️vai all'articolo

Hashtags

BAZUKA

@jbazuka · Post #302 · 24.09.2022 г., 12:07

🇷🇸#SerbiaМарш за семейные ценности в Белграде⚠️☝️ 💬 Люди продолжают выходить на шествия в поддержку семейных ценностей, даже после победы над гей-парадом, который смогли отменить люди, показав свою решительность в этом вопросе.

Hashtags

BAZUKA

@jbazuka · Post #250 · 11.08.2022 г., 11:33

🇷🇸#SerbiaСербские фермеры вышли на забастовку⚠️☝️ 💬 Дороги, ведущие к правительственным учреждениям в Нови-Саде и Воеводине, перекрыты из-за повышения стоимости топлива. 💬 «Если вы не выполните наши требования, то мы заблокируем всю страну!»

Hashtags

RTDocumentary

@rtdocumentary · Post #746 · 12.05.2022 г., 09:20

‘This is like Hitler’s Kristallnacht when he killed about 90 people, and they want to kill much more.’ In an exclusive interview with RT Documentary, Emir Kusturica compared European politics to Hitler's actions. The director is sure it is impossible to cancel Russian culture. Moreover, he calls on his colleagues to open a new chapter of Russian history: ‘We must bring Dostoevsky to the planet, not only to Europe.’ Kusturica is the creator of the Kustendorf Film Festival. More than 500 films from all over the world have been selected for the festival this year. The Russian movie Clear Sky has been awarded the gold. Emir Kusturica is one of the subjects in our new documentary about Russia's friends in Europe, and there are many of them. Will you be waiting for thepremiere? #video#Serbia Follow: https://t.me/rtdocumentary

RTDocumentary

@rtdocumentary · Post #245 · 07.10.2021 г., 10:00

Serbian Woodstock 🎺 #video#Serbia Every year, thousands of revellers gather in a small Serbian town to dance their feet off, immerse themselves in Balkan brass music and feel like characters in a Kusturica movie. It’s the annual trumpet festival in Guca that runs for five days straight. Brass bands come from all over Serbia to compete for the ‘Golden Trumpet’ trophy, make a little money and get noticed by industry leaders. The Guca festival was first held in 1961 and has since grown into Serbia’s biggest music event. Brass bands are an essential part of every major event, including births, weddings and funerals. Find out more about the festival and see what it’s like to party in Serbia - https://youtu.be/WwP_AdfNERg Follow: https://t.me/rtdocumentary

POPULAR FRONT

@popularxfront · Post #5789 · 06.04.2026 г., 11:27

🇷🇸#Serbia – 🇭🇺#Hungary: Two backpacks containing what Serbian authorities described as “US-made plastic explosives” were discovered in Kanjiza, a few hundred meters from the TurkStream pipeline linking the town to the Hungarian border. The devices, along with detonators, were found yesterday by the Serbian military and police near the gas infrastructure. Serbian officials have said that they had prior intelligence that a “man with military training from the migrant community” was planning a diversion targeting the pipeline. On the Hungarian side, PM Viktor Orbán convened an emergency defence council, calling it a planned sabotage and warning of threats to energy security ahead of the April 12 elections. The incident has escalated into a political crisis in Hungary, with opposition figures suggesting a possible "false flag" in order to influence the upcoming elections. No arrests have been made, as suspects, motive, and responsibility remain unknown. (via Reuters & CNN)

🇭🇺⛽️🪖Parte de TurkStream será protegido por el Ejército húngaro Fuerzas húngaras se encargarán de la proteccióndel tramo del gasoducto TurkStream en territorio del país, desde Serbia hasta Eslovaquia, declaró el canciller, Peter Szijjarto. Cuatro países, Hungría, Serbia, Turquía y Rusia, acordaron tomar medidas decisivas para proteger el gasoducto, agregó. Anteriormente, el presidente de Serbia, Aleksandar Vucic, informó durante una conversación telefónica con el primer ministro húngaro, Viktor Orban, sobre el hallazgo de una bomba a pocos cientos de metros del gasoducto entre Hungría y Serbia. Según Szijjarto, el último intento de sabotaje "encaja bien en una serie" de acciones de Ucrania contra el suministro energético de Hungría. Los informes preliminares de los servicios serbios apuntan a un inmigrante con formación militar como sospechoso en el incidente con bomba en Serbia. 📷 IA #hungría#serbia#ucrania ——— Únete a la lucha por la verdad en 📱Telegram 📱 YouTube 🫥Odysee 📱X

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