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

Резултати

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

Търсене: #sanur

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

@balinews · Post #34 · 03.05.2024 г., 10:34

🛍️The biggest mall in Southeast Asia is about to open its doors in Bali 🏬 The new ICON Mall in Sanur is due to open to the public on the 17th of May and comes as part of the massive tourism redevelopment project in Sanur. 🥇The shopping complex will eclipse Kuta Beachwalk Mall, Bali Galeria Mall, and even Living World Mall in Denpasar, which is currently the biggest retail park and mall on the island. @BaliNews #Sanur#wheretogo

Bali News

@balinews · Post #437 · 16.06.2025 г., 13:20

💆🏻‍♀Bali Wellness Expo 2025 📆 From June 27 to 29, Sanur will host Indonesia's first Bali Wellness & Beauty Expo 2025. ℹ️ More than 70 brands from Indonesia, Korea, Japan, and China will showcase the latest in wellness and aesthetic medicine, while guests can enjoy talk shows, master classes, group yoga sessions, and cultural performances. Each day is dedicated to a separate theme, ranging from sustainable tourism to the synthesis of traditional practices and modern medicine. 📲 Information and registration are available on the official website. #wheretogo#health#Sanur@BaliNews

Bali News

@balinews · Post #144 · 17.08.2024 г., 03:15

🚇Sanur and Jimbaran will be connected by an underground tunnel 📰 Bali authorities have warned that locals and visitors to the island should prepare for increased traffic jams in September. The reason for this is road construction on several major highways at once. This includes the construction of the long-awaited Bali urban railroad network. 🛩 The second phase of the project will be a ring line connecting Bali Airport with the center of Denpasar and the resort of Sanur. 🕒 Authorities are unable to give further details at the moment, but say they want to create an ambitious project that will solve the traffic problem between Sanur and Jimbaran as soon as possible. @BaliNews #roads#Sanur#Denpasar

Bali News

@balinews · Post #126 · 25.07.2024 г., 13:56

🪧The Balinese public has spoken out against the new beach club in Sanur 🙅‍♂️ No sooner have locals gotten used to the new shopping center in Sanur, now they have to defend the beach as well. Bali Icon Mall opened in June 2024, but not completely - the promised beach club was decided to be completed later. This construction is what the Balinese people oppose. 📰 The population fears that this development could affect the people who choose Sanur as their vacation destination. And if noisy young people flock here, pensioners and families with children may not like it, reports detikbali. @BaliNews #beaches#Sanur#Denpasar

Bali News

@balinews · Post #297 · 18.01.2025 г., 05:04

🏥International clinic in Sanur will start seeing patients in April 2025 👩‍⚕️ Bali claims to be the main Indonesian medical center. Already in April 2025 the island will become a resort where people can restore not only mental strength, but also health. 📍 The international hospital, which is being built in Sanur, is almost ready. The hospital plans to admit its first patients in spring, and the grand opening is expected to take place in July. ℹ️ 260 wards, doctor's offices and medical laboratories will be located on an area of 5 hectares. The four-story hospital is being built in the concept of an environmentally friendly or green hospital, surrounded by 183 trees, 123 of which have been relocated due to construction. 💵 In this way, the Balinese authorities plan to develop medical tourism in Bali and Sanur in particular. As for the cost of treatment in such a luxurious hospital, the management promises to make it competitive so that patients of all income levels have access to quality medicine. @BaliNews #projects#places#health#Sanur

Bali News

@balinews · Post #158 · 03.09.2024 г., 11:15

🚀AeroXSpace Adventure game center opened in Sanur 🎠 AeroXSpace, the largest space adventure theme park, has opened in Bali. It is a children's active play area with trampolines and thrill rides. 🔫 The indoor play space is fully air-conditioned and occupies an area of more than 3500 square meters. The pavilion features 26 multi-level attractions that give children an unforgettable experience. 🛝 One of the key attractions is the Launch Pad Slides, which allow you to experience the sensation of free fall. ⏳ The park is open from 9 am to 9 pm. For prices and details, see the link. @BaliNews #places#wheretogo#kids#entertainment#Sanur

Bali News

@balinews · Post #82 · 10.06.2024 г., 10:00

🛍The new Icon Bali shopping centre has finally opened in Sanur Many people had heard about Icon Bali long before it opened. Local journalists, talking about what an amazing project awaits us, said that it would outshine even the largest mall on the island Living World, because it will have the largest floating market in Southeast Asia and other unique entertainment, in addition to shops, of course. The opening date has been postponed at least twice. First they planned to launch in April, then they put the date in May, but in those days the building was not even externally ready. And now, finally, on the 7th of June, the opening took place. 8 Wonders of Icon Bali is a special feature that the mall is proud of, nevertheless the whole project still look quite raw. @BaliNews #wheretogo#places#events#Sanur#Denpasar#Ubud