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

TGINSIGHT SIMILAR POSTS

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

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

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

Hashtags

Резултати

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

Търсене: #kirk

当前筛选 #kirk清除筛选
Trump's Ear

@trumpsear_tg · Post #1545 · 22.09.2025 г., 19:59

The vast majority of media, politicians and ordinary people after the murder of Charlie Kirk: "Hate speech led to this, we must stop spreading hatred against each other" Donald Trump:"I FUCKING HATE YOU ALL" #Trump#Kirk 👂More on Trump's Ear ⚠️

Hashtags

Trump's Ear

@trumpsear_tg · Post #1494 · 11.09.2025 г., 14:01

Donald Trump has promised to find all those involved in the murder of his colleague, conservative activist Charlie Kirk. According to the US president, the shot at Kirk is an attack on the United States and American values. #Trump#Kirk 👂More on Trump's Ear ⚠️

Hashtags

Trump's Ear

@trumpsear_tg · Post #1547 · 23.09.2025 г., 00:05

Even the liberal media in the United States admire Charlie Kirk's widow after her speech at the funeral ceremony.: She forgave her husband's murderer. Some see her as a completely new political figure among conservatives. Over the past day, the widow of conservative activist Charlie Kirk, Erica, conquered the United States with her speech at a farewell ceremony in Glendale. She went to the podium and forgave her husband's murderer: Forgiveness is the highest commandment of Christianity. Just as Jesus himself asked for mercy for his tormentors on the cross, Erica Kirk, a deeply religious woman, took the same position. These words stirred up conservative America. US President Donald Trump acted differently: instead of unity and reconciliation, he made it clear that he did not share Erica's message: This, he admitted, distinguishes him from Charlie and Erica. The American media admire Erica and are already talking about the "Donald Trump way" and the "Erica Kirk way" that American conservatives can follow. MSNBC said Erica's words were "what America needed to hear." Even the Washington Post, which is close to the Democrats, saw a new political figure in the widow. In a column titled "The Example of Erica Kirk," the publication wrote that her speech "made a tangible difference between Trump's uncompromising policies and the spirit of Christian love for one's neighbor." Thus, Charlie Kirk's murder could be a turning point — the beginning of a change for religious conservatives. And Charlie Kirk's organization, Turning Point USA, now headed by Erica, is experiencing an unprecedented boom: since the day of the tragedy, tens of thousands of young people have applied to new groups and donated millions of dollars to the organization. #Kirk#Media 👂More on Trump's Ear ⚠️

Hashtags

Trump's Ear

@trumpsear_tg · Post #1497 · 11.09.2025 г., 20:33

Time magazine dedicated the cover of its issue to Charlie Kirk, an American right-wing activist and executive director of Turning Point USA, who was killed the day before. #Kirk#Media 👂More on Trump's Ear ⚠️

Hashtags

Trump's Ear

@trumpsear_tg · Post #1559 · 24.09.2025 г., 19:59

Jimmy Kimmel returned to the air and attacked Trump American TV host Jimmy Kimmel returned to the air after the ABC television channel removed his program because of jokes about the death of conservative activist Charlie Kirk. The audience greeted him with ovations and shouts of "Jimmy, Jimmy!", and the host himself immediately lunged towards the White House. In general, Kimmel remained true to himself: he devoted the rest of the broadcast to harsh satire on Trump, including in a sketch with Robert De Niro. The US president reacted on his Truth Social network. #Trump#Media#Kirk 👂More on Trump's Ear ⚠️

Trump's Ear

@trumpsear_tg · Post #1538 · 19.09.2025 г., 18:01

American TV host Jimmy Fallon defended Jimmy Kimmel amid pressure from Trump The scandal surrounding the closure of Jimmy Kimmel's show is gaining momentum. After ABC took Jimmy Kimmel Live off the air because of jokes about the death of right-wing activist Charlie Kirk and criticism of Trump supporters, another giant of American comedy, Jimmy Fallon, came out in support of his colleague. In his program, the Tonight Show, he stated that this is not only about television, but also about protecting freedom of speech. Fallon, who humorously played up the situation in a sketch about Donald Trump's visit to the UK, stressed that satire cannot be silenced, and political criticism has always been a part of American culture. According to him, attempts to silence the presenters are a dangerous precedent. Trump himself had previously demanded that both Fallon and another popular late-night show host on American television, Seth Myers, be removed from the air. Other presenters joined the protest. Stephen Colbert supported both Jimmy's, saying that not only the show, but also the foundations of democracy are at risk. Television legend David Letterman called ABC's behavior "shameful and pathetic," and former President Barack Obama said it was "the best illustration of cancel culture" and a direct interference with freedom of expression. #Trump#Media#Kirk 👂More on Trump's Ear ⚠️

Trump's Ear

@trumpsear_tg · Post #1531 · 18.09.2025 г., 18:02

ABC Pulled Jimmy Kimmel's Show After His Jokes About Charlie Kirk's Death The American television channel ABC has suspended the release of the Jimmy Kimmel Live evening show for an "indefinite period." According to AFP, the reason was the host's jokes about the recent murder of right-wing activist and Trump supporter Charlie Kirk. The channel's decision especially pleased President Donald Trump, who has been openly feuding with Kimmel for many years. Kirk was shot dead last week during a speech at the University of Utah. The accused is 22—year-old Tyler Robinson, who has been charged with murder. "The MAGA gang desperately tried to portray the perpetrator as anything but one of them, and did everything possible to gain political advantage," Kimmel said on air. The remarks provoked a flurry of criticism: the chair of the Federal Communications Commission, Brendan Carr, threatened ABC with revocation of its license, and Nexstar media holding announced that it would temporarily not show the show. ABC President Andrew Alford called Kimmel's words offensive and inappropriate at a time when the country is in crisis. Now there are only two major evening shows left on American television — Jimmy Fallon and Seth Meyers, but Trump is already demanding that they be removed from the air. #Trump#Media#Kirk 👂More on Trump's Ear ⚠️

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