TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #247 · 11.03

Попробовали на работе предметно-ориентированное проектирование (Domain Driven Design). Это такой способ построения архитектуры, когда ты (чаще всего с помощью системы типов и ООП) описываешь физическую суть вещей, которые представлены в твоей программе. Например, если в программе есть объект "Книга", то её нужно снабдить свойствами, которые бывают у книг в реальности: число страниц, автор, язык, тип обложки и т.д. При этом данные свойства должны быть такими, чтобы присвоить им нереалистичные значения было нельзя. Допустим, число страниц не может быть отрицательным (и скорее всего в реальном мире не может быть нулём). При попытке установить отрицательное число страниц программа должна выбросить исключение. А совсем в идеальном случае -- не дать этого сделать программисту на уровне статического анализа кода. Описав все свойства книги, вы снабжаете её операциями, которые над ней можно сделать. Например, из книги можно вырвать страницу, и при этом число страниц уменьшается. Нет такого случая, когда можно вырвать страницу без изменения числа страниц. Вы строго программируете эту зависимость, делаете у книги метод "Вырвать страницу", а он уже уменьшает число. Кстати, свойство "Число страниц" при этом нельзя переназначить в уже созданной книге. Можно только создать книгу, передав в её конструктор (так называется в программировании функция создания объектов) заданное число страниц. Но поменять число страниц можно только специальными методами "Вырвать страницу" и "Вклеить страницу". С помощью этого подхода вы гарантируете, что ваши объекты всегда находятся в валидном состоянии -- то есть таком, которое возможно в реальной жизни с объектом, представленным программой. Плюсы подхода очевидны: меньше число ошибок. Код описывает сам себя, и программист, если не лезет внутрь объекта "Книга", вообще не сможет сделать с книгой ничего недопустимого. Минусы, думаю, тоже понятны: изначально проектировать сложнее, нужно учесть много нюансов, писать тесты. Время разработки изрядно растёт. Изменение требований даётся дороже: например, если каким-то образом в ваш книжный магазин поступят книги со страницами из кевлара, которые невозможно вырвать :) Но первый проект с этим подходом мы сдали хорошо, без багов. Лучше, чем многие предыдущие. #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