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

Резултати

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

Търсене: #recreation

当前筛选 #recreation清除筛选
URA Singapore

@URASingapore · Post #871 · 14.06.2024 г., 09:31

‘❌’ always marks the spot. Can you decipher the next location of our roving exhibition for the Recreation Master Plan? 💎⁣ Give this post a 👍 if you've figured it out! Still in the dark? Then stay tuned for more updates 😉 #DMP2025#SpaceForOurDreams#RecreaMP#Recreation

URA Singapore

@URASingapore · Post #780 · 17.04.2024 г., 10:06

Westies, check out these up-and-coming spaces that will make it easier to rest and relax! 😋 As part of the Recreation Master Plan, we are exploring ways to bring recreation closer to your doorstep and to develop a connected network of parks, natural green spaces, and waterways. Visit our first two roving exhibitions to explore future plans for the West: 1️⃣ 14 – 19 Apr: Westgate 2️⃣ 21 – 28 Apr: Senja-Cashew Community Centre 👉go.gov.sg/ConnectedtoPlayTG Photo credit: Housing Development Board [1], National Parks Board [2], Land Transport Authority [3] and JTC Corporation [4] #DMP2025#SpaceForOurDreams#RecreaMP#Recreation

URA Singapore

@URASingapore · Post #774 · 14.04.2024 г., 02:00

When it comes to living well, it’s essential to have places for play and recreation in our city. 🏋️‍♂️🚣‍♀️🎬 Planning these spaces to support active and fulfilling lives has always been a key aspect of our plans. Check out such upcoming spots in the West, with more coming your way in the Recreation Master Plan! Visit our first roving exhibition to share your feedback on proposals and recreation plans for the West. Find us at: Westgate from 14 – 19 April and Senja-Cashew Community Centre from 21 – 28 April 👉go.gov.sg/ExploreWestTG #DMP2025#SpaceForOurDreams#Recreation#RecreaMP

URA Singapore

@URASingapore · Post #767 · 05.04.2024 г., 10:01

Westies, do you recognise these places? 😉 Here’s the perfect recreation spot for each of your favourite activities! 🙌 Planning ahead for the long-term has allowed us to weave play and leisure into our city fabric. With the Recreation Master Plan, we’re creating more recreational opportunities by tapping on our green, blue, and everyday spaces. Want to know what’s in store? Visit our first roving exhibition for a sneak peek into future plans for the west, from 14 – 19 April. 👉go.gov.sg/BestinWestTG React with a ❤️ if you’re excited to check out the exhibition! #DMP2025#SpaceForOurDreams#Recreation#RecreaMP

URA Singapore

@URASingapore · Post #897 · 02.07.2024 г., 10:33

If you could shape the future of the North, with all its potential, what would it look like?⁣ 🤔 Bring your best ideas to the roving exhibition for the Recreation Master Plan and help co-create exciting recreational offerings to be enjoyed and experienced by Singaporeans from all walks of life.⁣ Event deets 👇⁣ 📌Canberra Plaza⁣ 🗓️6 – 14 July⁣ Find out more here 👉go.gov.sg/NorthRecrePlansTG #ExploreSingapore#RecreaMP#DMP2025#Recreation#SpaceForOurDreams

URA Singapore

@URASingapore · Post #879 · 22.06.2024 г., 04:08

From a wealth of greenery to inland waterways, the North-East region is home to many active lifestyle amenities and hidden gems for recreation💎 Visit our Recreation Master Plan exhibition and share your best ideas on how we can enhance these spaces for more recreational opportunities! 📍One Punggol 📆 22 - 30 June You can also submit them via the FormSG link here 👉go.gov.sg/NorthEastRecrePlansTG #DMP2025#SpaceForOurDreams#RecreaMP#Recreation#ExploreSingapore

URA Singapore

@URASingapore · Post #851 · 29.05.2024 г., 10:00

Got a big appetite for fun? Check out the multitude of recreational opportunities we’re creating through the Recreation Master Plan! 👆 Swing by to see and share ideas for these exciting recreation plans! 📍 VivoCity 📆 25 May – 2 June 2024 📍 Kallang Wave Mall 📆 8 – 16 June 2024 See ya there 👋 Find out more at: go.gov.sg/CentralRecrePlansTG #DMP2025#SpaceForOurDreams#RecreaMP#Recreation#ExploreSingapore

URA Singapore

@URASingapore · Post #842 · 22.05.2024 г., 04:05

So, what’s on the menu in the Central Region? Well, we have quite a spread 😋 Here’s a sample of the recreation plans bringing you more leisure opportunities in this part of Singapore 🙌 Learn all about the new marine park at the Southern Islands and other exciting developments in Kallang, Southern Ridges and more at our roving exhibitions for the Recreation Master Plan! Visit the exhibition at: 📍 VivoCity 📆 21 May – 2 June 2024 Kallang Wave Mall 8 – 16 Jun 2024 #DMP2025#SpaceForOurDreams#RecreaMP#Recreation#ExploreSingapore

URA Singapore

@URASingapore · Post #833 · 14.05.2024 г., 10:08

Where to next? ✈️ To the East side we go! 😁 Have ideas to create more recreational opportunities around our island? Help us put together an itinerary of leisure options that we can all enjoy in the future through the Recreation Master Plan 👉go.gov.sg/EastRecrePlansTG #DMP2025#SpaceForOurDreams#RecreaMP#Recreation#ExploreSingapore

URA Singapore

@URASingapore · Post #826 · 11.05.2024 г., 04:49

Catch flights, not feelings - and step into the future with us ✈️ Swipe ➡️ to some of the future recreational developments in the East that’ll bring you even more leisure opportunities. Be sure to catch our Recreation Master Plan exhibition at: 📍 Bedok Town Square 📆 11 – 19 May 2024 👉 Find out more at: go.gov.sg/RecreTripTG #DMP2025#SpaceForOurDreams#RecreaMP#Recreation#ExploreSingapore

URA Singapore

@URASingapore · Post #814 · 07.05.2024 г., 04:23

Would you like to see more outdoor gyms? 🏋️ Well, one Westie certainly does 🙌 At our recent Recreation Master Plan roving exhibition, we caught up with some of you 👀 who shared about the new recreational spaces you’re most looking forward to. These exhibitions will be roving to a location near you from now till July. Visit us and share your recreational ideas for your ‘hood! The next stop will be at Bedok Town Square from 11 - 19 May! 👉 Find out more on the Recreation Master Plan here: go.gov.sg/EverydayVoicesTG #DMP2025#SpaceForOurDreams#RecreaMP#Recreation#ExploreSingapore

URA Singapore

@URASingapore · Post #811 · 03.05.2024 г., 10:01

Did you manage to catch our last Recreation Master Plan exhibition in the West? 🧐 If not, come join us at our upcoming one in the East! React to this post with a 👍 if you’ve figured out just where it’s being held 😄 Still in the dark? Then stay tuned for more information soon 😉 #DMP2025#SpaceForOurDreams#RecreaMP#Recreation#ExploreSingapore

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