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

TGINSIGHT SIMILAR POSTS

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

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

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

Hashtags

Резултати

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

Търсене: #remember

当前筛选 #remember清除筛选
Lsposed Modules Updates Tracker

@lsposed_Modules_Updates_Trackers · Post #6229 · 18.03.2026 г., 15:30

#Remember#rafareborn 模块:eu.hxreborn.remembermysort 简介:Remember My Sort 版本:300-3.0.0 更新时间:2026/03/18 18:13:22 更新日志: 💥 BREAKING CHANGES due to df21727 - migrate to libxposed API 101 (commit by @hxreborn): Migrates from libxposed API 100 to 101. API 100 will no longer be supported once 101 is officially released. An LSPosed Manager with API 101 support may not be @lsposed_Modules_Updates_Trackers | @lsposed_Geeks_Bot

Lsposed Modules Updates Tracker

@lsposed_Modules_Updates_Trackers · Post #6153 · 09.03.2026 г., 21:30

#Remember#rafareborn 模块:eu.hxreborn.remembermysort 简介:Remember My Sort 版本:202-2.0.1 更新时间:2026/03/10 04:51:04 更新日志: 🐛 Bug Fixes ef31320 - prevent dimId from being misinterpreted as the sort direction (commit by @hxreborn) Restores sort preferences for users upgrading from v1.x. @lsposed_Modules_Updates_Trackers | @lsposed_Geeks_Bot

Journey to Fluency

@fluencyinenglish · Post #7068 · 23.04.2019 г., 03:06

‍#grammar #remember #infinitive 1⃣ Remember + Infinitive 1⃣ به خاطر داشتن کاری که باید در اینده انجام دهید 2⃣ Remember + Gerund 2⃣ به خاطر داشتن کاری که در گذشته انجام داده‌اید 🆘 Infinitive: to + Verb 🆘 Gerund: Verb + ing @ieltsstrategies @fluencyinenglish

Journey to Fluency

@fluencyinenglish · Post #6746 · 08.01.2019 г., 06:20

#remember #forget #try @fluencyinenglish ❇️Remember + gerund This is when you remember something that has happened in the past. You have a memory of it, like being able to see a movie of it in your head. I remember going to the beach when I was a child. (= I have a memory of going to the beach). He remembers closing the door. (= He has a memory of closing the door). @fluencyinenglish ❇️Remember + to + infinitive This is when you think of something that you need to do. (And usually, you then do the thing). I remembered to buy milk. (= I was walking home and the idea that I needed milk came into my head, so I bought some). She remembered to send a card to her grandmother @fluencyinenglish ❇️ Forget + gerund This is the opposite of remember + gerund. It's when you forget about a memory, something that you've done in the past. Have we really studied this topic before? I forget reading about it. I told my brother that we'd spent Christmas at Granny's house in 1985, but he'd forgotten going there. @fluencyinenglish ❇️Forget + to + infinitive This is the opposite of remember + to + infinitive. It's when you want to do something, but you forget about it. I forgot to call my mother. (= I wanted to call my mother, but when it was a good time to call her, I forgot. I was thinking about something else, and the idea to call my mother didn't come into my head). She keeps forgetting to bring his book back. @fluencyinenglish ❇️Try + gerund This is when you do something as an experiment. The thing you do is not difficult, but you want to see if doing it will have the result that you want. I wanted to stop smoking, so I tried using nicotine patches. (= Using nicotine patches was easy, but I wanted to know if it would help me stop smoking). She tried giving up chocolate, but it didn't help her lose weight. (It was easy for her to give up chocolate. She gave it up to see if it would help her lose weight, but it didn't). @fluencyinenglish ❇️Try + to + infinitive This is when the thing you do itself is difficult. In the present tense or future tense, this means you might not succeed in doing it. In the past tense, it means that you made an effort to do the thing, but you did not succeed. I'll try to carry the suitcase, but it looks too heavy for me. She tried to catch the bus, but she couldn't run fast enough @fluencyinenglish ❇️Regret + gerund This is when you are sorry about something you did in the past and you wish you hadn't done it. I regret going to bed so late. I'm really tired today. She regrets leaving school when she was sixteen. She wishes that she had studied more and then gone to university. @fluencyinenglish ❇️Regret + to + infinitive We use this construction when we are giving someone bad news, in quite a formal way. The verb is almost always something like 'say' or 'tell' or 'inform'. I regret to tell you that the train has been delayed. The company regrets to inform employees that the London office will close next year. @fluencyinenglish

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