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

TGINSIGHT SIMILAR POSTS

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

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

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

Hashtags

Резултати

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

Търсене: #wait

当前筛选 #wait清除筛选
Social Justice Watch

@social_justice_watch · Post #17065 · 05.09.2022 г., 02:13

I wonder how many gay people are actually transgender & dont know it because people thing being transgender is transitioning when it’s literally just not being cis. like I had a friend tell me last night “all my life I wanted to be a girl. even to this day, like if someone told me I could transition & look like you or *insert another trans woman idk* I would do it in a heartbeat” and when I was like omg ur transgender he was surprised? like he was like wait just wanting to be a girl makes me transgender even if I dont do anything about it? and like its harder to pinpoint non binary people but if u have a desire be a different gender ur transgender. transitioning is a choice but being transgender is not. “One of the symptoms of being a girl is wanting to be a girl.” Don’t remember where I heard that but the quote is my life. This is one of the posts I can explicitly pinpoint as helping me realize that I might not be cis. The biggest symptom of being trans is wanting to not be your gender. It can also be dysphoria, it can also be euphoria, it can also be presentation, but wanting to be something else is all you really need. #wait so ur telling me#‘i dont want to have a gender’#can mean#‘i dont have a gender??’ I would also like to know… for reasons Confirmed. How to know you’re agender: You don’t want to be anything else. You look at the options for gender and gender presentation and decide to go back to bed Bold of you to assume I got out of bed Nah but seriously thanks for the insight So, if I look at gender and say “this is some bullshit and I want no part of it”, I guess that makes me agender? if that’s how you wanna identify, yeah. feeling anything mentioned in this post doesn’t mean you have to identify as trans, but feeling anything in this post is literally all that’s necessary to identify as trans if you want to. fuck gatekeepers forever. 👏if👏you👏don't👏feel👏cis👏you're👏possibly👏not👏cis👏 i mean this is literally what jvn said This is one of those things where you can go 25+ years of your life not realising that actually no not everyone secretly wishes they were some mashup of male and female and that you are, in fact, genderfluid as fuck. You can want to be the other gender. You can want to be another gender. You can want to divorce all connection to the gender you were born into. You can want to keep it as an origin point that shapes your journey. You can want to be more than one gender at once. You can want to be more than one gender, at different times. You can want to be no gender. You can want to be sort of in between genders. You can want to be both genders. You can want to be rid of gendered body parts you already have. You can want to keep gendered body parts while also being another gender. You can want to be rid of them but not want the side effects of excising them. You can feel dysphoria at being shaped like/viewed as/treated like a gender you don’t want. You can feel euphoria at being shaped like/viewed as/treated like a gender you do want. You can change your mind or adjust your goals or refine your wishes. You can be stationary and fixed in your identity. You can be fluid and changing. You can be extremely gendered in your presentation. You can be not very gendered in your presentation. You can be androgynous. You can be a little of both. You can be a lot of both. If gender is a line you can cross, as the words trans (across/on the other side of) and cis (here/on the same side of) indicate, you can cross it in any way you like, including dancing on top of it. Be happy. Be you. This is an extremely affirming post. https://genderkoolaid.tumblr.com/post/691574739639091200/i-wonder-how-many-gay-people-are-actually

Hashtags