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

Резултати

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

Търсене: #obit

当前筛选 #obit清除筛选
NFT & Airdrop News

@airdrop_nft1 · Post #390 · 22.01.2024 г., 17:08

🎉 Hey Crypto Enthusiasts! 🚀 Get ready for the launch of an exciting new token – OneBit (OBIT)! 🌟 🪙 Token Name: OneBit 💹 Symbol: OBIT 🎁 Don't miss our incredible Airdrop: 👥 1 USER = 200 OBIT Free! 🚀 PreSale Blast-off: 👉 1 USER = 10,000 OBIT + 0.05 BNB 🌐 Unlock more rewards with our referral program: 🔗 Referal Airdrop: +25% OBIT 🔗 Referal PreSale: Grab an extra 25% OBIT 📌 Secure your Airdrop on our official website: onebit.store/airdrop/index.html 📌Official Project Chat https://t.me/OneBit_Chat Join us on this thrilling crypto journey with OneBit! 🚀✨ Don't miss out on this opportunity to be part of the future of finance! 🌐💰#OneBit#OBIT#CryptoRevolution🚀🌟 ‼️ Please remember: We are airdrop hunters and only participate in free airdrops, please do not buy any airdrop token

Airdrop Market Pro

@airdrop_market_pro · Post #390 · 11.12.2023 г., 20:07

We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥 In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰 Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪 🔗 Website: onebit.store 💸 Airdrop: onebit.store/airdrop/index.html 🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited! Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄 #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕 🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀 https://www.youtube.com/shorts/S4iu3jA6Kac

Airdrop Market Pro

@airdrop_market_pro · Post #388 · 04.12.2023 г., 17:38

🚀 Exciting News! 🚀 Dear Friends, we have revamped our pre-sale page for a lightning-fast and more animated experience! 🌐✨ But that's not all – we've introduced a game-changing feature to boost our token value: the Automatic Token Burn function! 🔥 Now, in every pre-sale, if you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is designed to fortify our token's value and aims to keep 1 OBIT = $0.01. 📈💰 Join us in this exciting journey towards a stronger and more vibrant community! 🌟💪 Website: https://onebit.store/ Airdrop: https://onebit.store/airdrop/index.html #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀

NFT & Airdrop News

@airdrop_nft1 · Post #385 · 11.12.2023 г., 20:07

We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥 In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰 Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪 🔗 Website: onebit.store 💸 Airdrop: onebit.store/airdrop/index.html 🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited! Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄 #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕 🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀 https://www.youtube.com/shorts/S4iu3jA6Kac

NFT & Airdrop News

@airdrop_nft1 · Post #382 · 04.12.2023 г., 17:38

🚀 Exciting News! 🚀 Dear Friends, we have revamped our pre-sale page for a lightning-fast and more animated experience! 🌐✨ But that's not all – we've introduced a game-changing feature to boost our token value: the Automatic Token Burn function! 🔥 Now, in every pre-sale, if you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is designed to fortify our token's value and aims to keep 1 OBIT = $0.01. 📈💰 Join us in this exciting journey towards a stronger and more vibrant community! 🌟💪 Website: https://onebit.store/ Airdrop: https://onebit.store/airdrop/index.html #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀

Free Airdrop News 🔥🔥🔥

@free_airdrop_nn · Post #214 · 11.12.2023 г., 20:06

We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥 In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰 Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪 🔗 Website: onebit.store 💸 Airdrop: onebit.store/airdrop/index.html 🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited! Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄 #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕 🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀 https://www.youtube.com/shorts/S4iu3jA6Kac