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

Резултати

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

Търсене: #squad

当前筛选 #squad清除筛选
敏迪選讀

@mindiworldnews · Post #1356 · 15.05.2024 г., 00:12

2024/05/15 (Wed) 5/15 美菲澳日組印太新小隊 Squad、喬治亞民眾抗議代理人法案是「俄羅斯法」 #Squad#俄羅斯#喬治亞#日本#歐盟#美國#菲律賓 我們前陣子才講美日菲會談... 最近菲律賓和美日又有新合作... <br><br>5 月 10 日,<strong>美、日、澳、菲</strong>四國防長在夏威夷見面...

MoonPlay

@moonplay_official · Post #71 · 20.07.2024 г., 07:54

Welcome, New Space Cadets! 💫 Since Monday, we've welcomed an incredible 600k new space cadetsto our mission! 🚀 With so many explorers joining, here's a quick reminder about the journey ahead. Your ship and crew are built for one epic trip only. After each successful mission to the moon, you level up and need to construct a brand new spaceship🚀 and recruit a fresh crew to set off on your next journey. 🌌New Ship: Each mission gives you the opportunity to build even cooler, more powerful ships. Your level increases with every successful expedition, unlocking better designs and greater mining power. 🌌Fresh Crew: Invite new friends to join your adventures. Each new expedition requires a full crew, and more friends mean greater strength and success. No friends? No prob! Use special bots. 🌌Continuous Exploration: The adventure never ends! Keep exploring the cosmos, completing missions, and reaping stellar rewards. 🌌Balance Intact: Levelling up doesn’t reset your Space Bucks balance. You keep all your hard-earned Space Bucks as you progress. ℹ️ For more info, check the mission manual here. Every journey helps you level up, bringing you closer to mastering the cosmos. So gear up, build your fleet, and keep pushing the boundaries of space exploration: the end of season 1 & the first token airdrop are coming!🔔 👉Start your To The Moon adventure now!👈 Website | Telegram Chat | X | Discord | Medium #ToTheMoon#MoonPlay#ecosystem#blockchain#gamefi#web3#wenlisting#squad#rank#communityfirst#taptap#clicker#game

MoonPlay

@moonplay_official · Post #69 · 18.07.2024 г., 15:10

Squad Multiplier: Earn More💰 If you haven’t joined a squad yet, you’re missing out on a fantastic way to turbocharge your 💸 earnings and complete expeditions faster. Whether you team up with friends or join forces with other players, being in a squad is your ticket to higher earnings. Head to the Crew tab—> Squads👥, check out the top squads on the leaderboard, or create your own and invite others to join. The higher your squad’s rank, the bigger the Space Bucks multiplier, up to a whopping 1.5x! After three days in a squad ⏰, you start benefiting from the squad’s multiplier. Your squad’s rank boosts your: 💸 Mining income ✅ Mission rewards 🌕 Expedition rewards 💫 Star Dust rewards So, what are you waiting for? Team up, level up, and watch your earnings skyrocket. Who’s going to be the first Rank 3 Squad in the game? Let’s wait and see! 👉Start your To The Moon adventure now!👈 Website | Telegram Chat | X | Discord | Medium #ToTheMoon#MoonPlay#ecosystem#blockchain#gamefi#web3#wenlisting#squad#rank#communityfirst#taptap#clicker#game

MoonPlay

@moonplay_official · Post #67 · 16.07.2024 г., 17:33

New Mission Pack Alert 👀 OGCommunity, known for building the most influential community and ecosystem in the gaming industry, brings you a fresh pack of missions! Connect with over 2 million members 👥, gain new knowledge, and take part in epic gaming experiences. 👉 Head right to Missions tab and complete special tasks curated by OGCommunity to earn rewards. Don't miss out on this opportunity. Together, we’ll conquer the cosmos and build a thriving lunar colony! 🤩 👉Start your To The Moon adventure now!👈 Website | Telegram Chat | X | Discord | Medium #ToTheMoon#MoonPlay#OGCommunity#ecosystem#blockchain#gamefi#web3#wenlisting#squad#mission#communityfirst#taptap#clicker#game

MoonPlay

@moonplay_official · Post #70 · 19.07.2024 г., 12:48

Can You Catch The LEPrechaun? 🍀 Hey Space Cadets! We're excited to announce a fantastic new partnership with LEPrechaun🎩! This summer, LEPrechaun is bringing a bottomless pot of $LEP coins - and you've got a chance to join the gold rush. Join their pre-launch on Telegram now and secure an airdrop for early users! But that's not all! LEPrechaun is also introducing 4 fresh missions✅ for you, our brave explorers. Head to the Missions tab and check them out to boost your progress in ToTheMoon! and start earning $CLOVER in LEPrechaun bot. Don't miss out on this stellar opportunity! 👉Start your To The Moon adventure now!👈 Website | Telegram Chat | X | Discord | Medium #ToTheMoon#MoonPlay#LEPrechaun#partnership#ecosystem#blockchain#gamefi#web3#wenlisting#squad#rank#communityfirst#taptap#clicker#game

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