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

TGINSIGHT SIMILAR POSTS

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

Изходен канал @clockstackwheels · Post #721 · 26.12

Почему я люблю языки с сильной системой типов, проверяемой статическим анализом кода — хорошо написанная программа является своей собственной спецификацией и позволяет выражать через язык программирования законы существования предметной области. Когда-то давно я писал на ActionScript. Там была система типов, но вот десериализация JSON'ов по-умолчанию была в какой-то общий Object, к полям которого нужно было обращаться ["по_строковому_имени"]. В один момент мне потребовалось написать что-то на C#, который я совсем не знал, я стал гуглить, как десериализовать JSON, и с удивлением обнаружил кучу советов заранее объявить класс со всеми нужными полями и десериализовать в него. "Какой ужас!", — подумал я тогда, — "Это же дико неудобно! А если я не знаю полей JSON? А если их много? Отвратительный язык!" Теперь то я прекрасно понимаю, что JSON это контракт, и что правильная десериализация только такая и должна быть, и что в хорошем API в одном поле никогда не бывает данных принципиально разных типов, и так далее. Нет, если вы набиваете вечерами пет-проект или сидите бессонную ночь на хакатоне, нет ничего плохого в том, чтобы взять простой язык с динамическими типами вроде JavaScript или Python, не требующий описывать данные. Но вот в энтерпрайзе, особенно когда над одним проектом работает много людей (а бывает это очень часто) — хорошее использование системы типов убережёт разработчиков от огромного количества ошибок, будет бить их по рукам, когда они пытаются сделать что-то не то, и будет подсказывать, когда они не уверены в чём-то. С помощью статической типизации можно на уровне кода обозначить правила, по которым ведёт себя предметная область вашей программы в реальном мире. Разработчику не только будет сложно их нарушить, но он ещё и станет узнавать какие-то вещи, которые мог не знать раньше. Например, если мы делаем медицинскую CRM, и больница заводит новых пациентов только тогда, когда знает их группу крови, мы можем объявить тип "Пациент" (или, если точнее, "Карта пациента") и запретить создавать экземпляры этого типа, не передав в конструктор группу крови (которая, в свою очередь, тоже является типом, вероятнее всего ValueObject'ом). Если новый программист пришёл в проект, он, во-первых, не сможет записать в БД некорректную карту пациента. Понятно, мы не учитываем случаи, когда новый программист переделывает модели предметной области — это будет хорошо видно на кодревью. А, во-вторых, даже если ему никто не сказал, что пациенты должны быть с группой крови, он узнает это из кода. И уже будет понимать, что в тех процессах реальной жизни, которые он описывает кодом, карта пациента создаётся только при наличии группы крови. А, значит, нужно искать какой-то способ сначала эту группу крови получить, и только потом создавать карту. Программирование моделирует реальный процесс. В настоящей работе даже на языках с типами, конечно, без должного контроля можно написать что угодно. Нужна управленческая воля, компетентность руководства, понимание опасности техдолга, в идеале отдельные должности для архитекторов, опытные лиды и старшие разработчики. Но когда всё это есть, можно отсекать много проблем ещё на старте и проще погружать новичков. #dev

Hashtags

Резултати

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

Търсене: #justice

当前筛选 #justice清除筛选
Dumbledore's Rambling

@dumbledorerambling · Post #4064 · 15.10.2024 г., 18:43

今天蹭课的一个讨论问题: Act in such a way that you treat humanity, whether in your own person or in the person of any other, never merely as a means to an end, but always at the same time as an end. (Kant) Consider four reasons I might fail to cultivate my talents: 1. Idleness and indulgence 2. Working 100 hours per week in a cubicle as a high-paid analyst 3. Scrolling social media for 4 hours a day 4. “Earn to give" - forgoing a career as a physician so i can make more money to give to charity Which (if any) treat myself as a means only and thus fail to respect my dignity? #justice

Hashtags

Trump's Ear

@trumpsear_tg · Post #1776 · 13.11.2025 г., 18:11

Human rights activists complain about Lindsey Halligan. Trump's former personal lawyer is Said to be Abusing his power Human rights activists from the Campaign for Accountability filed a complaint against the acting Federal Prosecutor of the Eastern District of Virginia, Lindsey Halligan, at the Florida and Virginia Bar Associations. They claim that she violates professional ethics, lies and opens cases without sufficient grounds, ABC News reports. #Trump#Justice 👂More on Trump's Ear

Trump's Ear

@trumpsear_tg · Post #1868 · 04.12.2025 г., 16:35

San Francisco sues Mars and Coca-Cola for excessive sugar, salt, and fat content in their products 🍬⚖️ San Francisco is suing food corporations Coca-Cola, PepsiCo, Kraft Heinz, Mondelez, W.K. Kellogg, and Mars for their heavily processed finished products. In the lawsuit, Megapolis refers, among other things, to research by the World Health Organization (WHO), published in the medical journal The Lancet. 📚🌍 The ultra-processed products (UPF) of these companies often contain sugar, salt, fats, industrial starches, and additives such as emulsifiers, colorants, or flavors. WHO warns that the consumption of such products increases the risk of cancer, cardiovascular diseases and diabetes. ⚠️🫀🍩 The San Francisco prosecutor's office accused the companies that the sale of harmful products led to the development of a crisis in the healthcare sector. The city, in particular, is seeking a ban on "misleading" advertising of these products and is demanding financial compensation for the damage that, according to the prosecutor's office, was caused to San Francisco. 💼💵 The Manufacturers' Association has so far denied the charges. According to her, there is no universally recognized scientific definition of "ultra-processed foods," and calling products unhealthy just because they are processed is misleading consumers. 🏭🤷‍♂️ A similar case already occurred in the United States in the 1990s: then San Francisco sued the tobacco industry, and the case ended with the payment of compensation in the amount of 539 million dollars. 📜💰 #Health#Justice 👂More on Trump's Ear

Venezuelanalysis

@venanalysis · Post #1715 · 10.08.2024 г., 16:10

Venezuela's highest court will review information submitted by electoral authorities and political parties to clarify the July 28 election results. Read the report: https://venezuelanalysis.com/news/venezuela-presidential-candidates-and-political-parties-submit-electoral-evidence-to-supreme-court-far-right-opposition-rejects-request/ #Venezuela#Elections#Justice

⚖️🇺🇸LUXURY REAL ESTATE MOGULS CONVICTED OF SEX TRAFFICKING 🔹 Alexander brothers — Oren, Alon, and Tal — found guilty on 19 counts after five-week federal trial in NYC 🏛️👨‍⚖️ 🔹 Over 60 women testified they were drugged and assaulted at Hamptons parties, Caribbean cruises, and Aspen ski trips 🏝️💊 🔹 Former Douglas Elliman brokers built billion-dollar Official real estate empire while running systematic predator scheme 🏢💰 🔹 Sentencing August 6, 2026 — brothers face life in prison as they remain jailed pending appeals 🔒⚡ Real estate world completely shattered — these weren't just millionaire playboys, they were calculated predators 😱🚨 #Justice#RealEstate @america

International News

@intnewsagency · Post #9370 · 24.04.2026 г., 18:33

Ex-Judge Chernov’s Family Assets Seized by State A court ruled Alexander Chernov’s (ex-Krasnodar judge, 1994-2019) activities illegal, confiscating family assets worth about 900 million rubles: 6 land plots, 106 commercial properties, 2 houses, 36 kg of gold, and 22 million rubles. Chernov secretly managed businesses; his ex-wife and daughters helped hide assets and re-register ownership. Former arbitration judge Anastasia Shepel is also implicated. #Russia#Krasnodar#Corruption#Justice The main news of Russia and the world ishere.

PrimeVisa

@primevisa_uz · Post #1153 · 15.01.2023 г., 16:04

Plato’s Republic is an iconic philosophical masterpiece! Follow Socrates and friends on their exploration of justice, exploring questions such as "What is justice?" and "What makes a government just?". Experience philosophy at it's finest with Plato's Republic! #Philosophy#Classic#Justice @ninjasblog

Borkena

@borkena · Post #5973 · 11.03.2026 г., 04:22

Which Ethiopia Is Being Praised? Judicial Independence, Armed Conflict, and the Rule of Law in Contemporary Ethiopia. Read more. https://borkena.com/2026/03/10/which-ethiopia-is-being-praised-judicial-independence-armed-conflict-and-the-rule-of-law-in-contemporary-ethiopia/#Ethiopia#politics#conflict#Justice#ruleoflaw

🚨🇺🇸FEDERAL JUDGE ORDERS REPATRIATION OF VENEZUELANS DEPORTED TO CECOT PRISON 🔹 US must allow Venezuelans to return from El Salvador's CECOT prison 🧑 🔹 Court rules deportation violated constitutional rights 🔹 130+ men held in notorious megaprison now eligible to fight cases Landmark decision: "This situation would never have arisen had the Government simply afforded Plaintiffs their constitutional rights" — Judge James Boasberg. #USNews#Trump#immigration#Venezuela#Justice @america

Venezuelanalysis

@venanalysis · Post #1603 · 15.06.2024 г., 19:23

Venezuelan President Nicolás Maduro tasked his new minister for penitentiary affairs with taking measures against corrupt practices in the legal system. Inmates in dozens of prisons suspended a hunger strike against judicial delays and poor incarceration conditions following the government's response. Read the full report here: https://shorturl.at/t1g2l #Venezuela#Justice#Prisons#legalsystem

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