Почему я люблю языки с сильной системой типов, проверяемой статическим анализом кода — хорошо написанная программа является своей собственной спецификацией и позволяет выражать через язык программирования законы существования предметной области.
Когда-то давно я писал на ActionScript. Там была система типов, но вот десериализация JSON'ов по-умолчанию была в какой-то общий Object, к полям которого нужно было обращаться ["по_строковому_имени"]. В один момент мне потребовалось написать что-то на C#, который я совсем не знал, я стал гуглить, как десериализовать JSON, и с удивлением обнаружил кучу советов заранее объявить класс со всеми нужными полями и десериализовать в него.
"Какой ужас!", — подумал я тогда, — "Это же дико неудобно! А если я не знаю полей JSON? А если их много? Отвратительный язык!"
Теперь то я прекрасно понимаю, что JSON это контракт, и что правильная десериализация только такая и должна быть, и что в хорошем API в одном поле никогда не бывает данных принципиально разных типов, и так далее.
Нет, если вы набиваете вечерами пет-проект или сидите бессонную ночь на хакатоне, нет ничего плохого в том, чтобы взять простой язык с динамическими типами вроде JavaScript или Python, не требующий описывать данные. Но вот в энтерпрайзе, особенно когда над одним проектом работает много людей (а бывает это очень часто) — хорошее использование системы типов убережёт разработчиков от огромного количества ошибок, будет бить их по рукам, когда они пытаются сделать что-то не то, и будет подсказывать, когда они не уверены в чём-то.
С помощью статической типизации можно на уровне кода обозначить правила, по которым ведёт себя предметная область вашей программы в реальном мире. Разработчику не только будет сложно их нарушить, но он ещё и станет узнавать какие-то вещи, которые мог не знать раньше.
Например, если мы делаем медицинскую CRM, и больница заводит новых пациентов только тогда, когда знает их группу крови, мы можем объявить тип "Пациент" (или, если точнее, "Карта пациента") и запретить создавать экземпляры этого типа, не передав в конструктор группу крови (которая, в свою очередь, тоже является типом, вероятнее всего ValueObject'ом). Если новый программист пришёл в проект, он, во-первых, не сможет записать в БД некорректную карту пациента. Понятно, мы не учитываем случаи, когда новый программист переделывает модели предметной области — это будет хорошо видно на кодревью. А, во-вторых, даже если ему никто не сказал, что пациенты должны быть с группой крови, он узнает это из кода. И уже будет понимать, что в тех процессах реальной жизни, которые он описывает кодом, карта пациента создаётся только при наличии группы крови. А, значит, нужно искать какой-то способ сначала эту группу крови получить, и только потом создавать карту. Программирование моделирует реальный процесс.
В настоящей работе даже на языках с типами, конечно, без должного контроля можно написать что угодно. Нужна управленческая воля, компетентность руководства, понимание опасности техдолга, в идеале отдельные должности для архитекторов, опытные лиды и старшие разработчики. Но когда всё это есть, можно отсекать много проблем ещё на старте и проще погружать новичков.
#dev
Hillary #Clinton dichiara: "Non ho mai incontrato Epstein e non avevo idea dei suoi crimini". Aggiunge: "Non sono mai salita sul suo aereo, né ho messo piede nella sua casa" e precisa di essere, "come qualsiasi persona normale, inorridita dai suoi crimini".
@UltimoraPolitics24
Dopo #Trump, anche Hillary #Clinton interveniene sulle elezioni italiane, difendendo la Meloni: "Avere una premier donna è buona cosa, giudicatela per ciò che farà."
@UltimoraPolitics
This is the moment Hillary Clinton stormed out of her Jeffrey Epstein deposition after discovering a Republican lawmaker had secretly photographed her against the rules.
'I'm done with this,' Hillary yelled after her lawyer informed the House Oversight Committee that the image was circulating online.
'If you guys are doing that, I am done. You can hold me in contempt from now until the cows come home. This is just typical behavior,' Hillary shouted.
#Clinton#Epstein
👂More on Trump's Ear ⚠️
Hillary Clinton has furiously attacked a top Republican in a dispute over how her and her husband's Jeffrey Epstein testimony will be recorded by Congress.
Bill and Hillary are set to testify on their relationship with the pedophile later this month before the House Oversight Committee.
Hillary on Thursday accused Oversight Chair James Comer, a Republican, of 'moving the goalposts', alleging that he is now demanding that the Clintons' depositions - originally agreed to be held behind closed doors - be filmed as well as transcribed.
'Let's stop the games. If you want this fight, RepJamesComer, let's have it—in public,' the former Secretary of State posted on X.
'You love to talk about transparency. There's nothing more transparent than a public hearing, cameras on. We will be there.'
A spokesman for the committee said: 'The Clintons are going to Clinton and try to spin the facts since no one is buying their claims. The only ones moving the goalposts are, as usual, the Clintons and their attorneys.'
Comer on Tuesday announced that Hillary agreed to appear for a deposition on February 26 and former President Bill Clinton would appear on February 27.
The agreement came after months of wrangling, with the Clintons demanding that they be allowed to provide the committee with a closed-door deposition in New York and written testimony.
#Epstein#Clinton
👂More on Trump's Ear
⚠️
Bill and Hillary Clinton refused on Tuesday to testify in the House’s Jeffrey Epstein investigation, escalating a monthslong battle with its Republican leader, Representative James R. Comer of Kentucky, who quickly said he would take steps to hold them in contempt of Congress.
“Every person has to decide when they have seen or had enough and are ready to fight for this country, its principles and its people, no matter the consequences,” the Clintons wrote in a lengthy letter to Mr. Comer, the chairman of the House Oversight Committee, which was obtained by The New York Times. “For us, now is that time.”
#Epstein#Clinton
👂More on Trump's Ear ⚠️
Epstein had a painting of Clinton in a woman's dress.
During a search of the villa of infamous financier Jeffrey Epstein, a painting depicting former US President Bill Clinton in a blue dress and red high-heeled shoes was found.
The New York Post quotes a law enforcement source.:
"It was hanging there in a prominent place, right at the entrance, on the right, in the next room. Everyone saw this picture, laughed and grinned."
The existence of this portrait, which depicts Clinton in a Monica Lewinsky dress, has been known for many years. Now it has become public knowledge. Its author, artist Petrina Ryan-Kleid, called the painting "Parsing Bill". As she told Artnet News in a 2019 interview, "it's just a silly school art piece," written in 2012. It came as a "complete surprise" to the artist that her work ended up in Epstein's house. According to her, the painting was sold at a school charity auction.
Ryan-Clade explained that the blue dress is a reference to the dress worn by White House intern Monica Lewinsky. It was an important piece of evidence in the case of her affair with Clinton.
There were stains on the dress that contained President Clinton's DNA. Lewinsky kept it as proof of her sexual relationship with him.
Lolita Express passenger
There were also a lot of photos with Clinton in the Epstein case. By themselves, they do not prove his complicity in any crimes, but their motives look very remarkable. They show Clinton, for example, in the Jacuzzi and in the pool, always in the company of women. In one picture, a young woman is sitting on his lap, presumably on a private jet.
Allegedly, Clinton flew on the plane of convicted sex offender Epstein up to 26 times. Due to the large number of young girls on board, the plane was known as the Lolita Express.
#Epstein#Clinton
👂More on Trump's Ear
La Camera Usa ha avviato un procedimento per oltraggio al Congresso contro Bill e Hillary #Clinton, che si sono rifiutati di testimoniare nell’indagine sul caso Jeffrey #Epstein.
@UltimoraPolitics24
Former US President Bill Clinton to testify in Epstein case
Former U.S. Secretary of State Hillary Clinton testified for almost six hours at a closed meeting of the House Oversight Committee as part of the Jeffrey Epstein investigation. After the interrogation, she sharply criticized the Republicans for the fact that the hearings were held in a closed format, saying that she would prefer an open trial. Clinton stressed that she had already answered the same questions many times and did not intend to speak again if a public meeting was organized.
According to her, some of the questions concerned not only the case itself, but also conspiracy theories like "Pizzagate" and even UFOs. She also expressed dissatisfaction with the fact that some Republicans were not personally present at other interrogations, but noted the professionalism of committee Chairman James Comer, who, in her opinion, asked significant questions. Clinton reiterated that she was not familiar with Epstein, and Ghislaine Maxwell called only an "acquaintance," explaining that she attended her daughter's wedding as an escort for another guest.
The chairman of the committee described the testimony as productive, but noted that Republicans were not completely satisfied with the answers, as Clinton often referred to the need to ask her husband questions. Former President Bill Clinton is also expected to testify behind closed doors.
#Epstein#Clinton#Congress
👂More on Trump's Ear ⚠️
"I can't remember ever meeting Mr. Epstein." Hillary Clinton testified in the U.S. House of Representatives
Former U.S. Secretary of State Hillary Clinton testified before Congress about her ties to Jeffrey Epstein, who was convicted of involving minors in prostitution. According to her, she knew nothing about the crimes of this financier, as well as about the crimes of his trusted assistant Ghislaine Maxwell. 🚫
At the same time, Clinton admitted that she had contacts with Maxwell during her work at the Clinton Foundation. Maxwell, who was later convicted of crimes as an accomplice of Epstein, was invited to the wedding of Clinton's daughter Chelsea in 2010. 👰
Bill Clinton is also due to testify soon — he will become the first former U.S. president to be subpoenaed by Congress as a witness. Previously, the Clintons had refused to testify for months, and agreed only after strong public pressure. 📜
Democrats demand Trump's testimony
Democrats in the House Oversight Committee demand that U.S. President Donald Trump also testify. Hillary Clinton also demanded this, as Trump appears "tens of thousands of times" in the materials on the Epstein case. The chairman of the committee, Republican James Comer, objected that Trump could not be called to testify, as he was the current president of the United States. 🇺🇸
#Epstein#Clinton#Congress
👂More on Trump's Ear ⚠️
➡️ The Clintons will appear before Congress on the Epstein case.
Former US President Bill Clinton and his wife, former Secretary of State Hillary Clinton, have agreed to testify before a congressional committee on the Jeffrey Epstein case. This was announced by Clinton's representative in X.
The couple said they hoped to set a precedent that would apply to everyone.
Previously, both had refused to testify before the Republican-dominated committee: the Clintons' lawyers pointed out that they had already provided all available information to the congressmen in advance and voluntarily. However, then the rhetoric became tougher.
The possibility of bringing charges from the US Department of Justice was discussed: the relevant voting procedure has already been initiated in the House of Representatives. In the worst case scenario, Bill and Hillary Clinton could face up to a year in prison.
Earlier, US President Donald Trump accused Bill Clinton of having significantly more ties with Jeffrey Epstein than Trump himself. Trump has initiated investigations into the former president and other Democratic politicians.
The published materials on the Epstein case have already mentioned the names of both Clinton and Trump, as well as many other politicians and famous personalities. At the same time, no specific offenses have been proven against either Bill Clinton or Donald Trump.
#Epstein#Clinton#Congress
👂More on Trump's Ear ⚠️
Donald Trump said yesterday that he had discussed the bombing of Iran with a former U.S. president. Representatives of Bill Clinton, George W. Bush, and Barack Obama have said that there were no such conversations.
#Trump#Clinton#Obama
👂More on Trump's Ear ⚠️