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

Резултати

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

Търсене: #votingrights

当前筛选 #votingrights清除筛选

🏛️🇺🇸SENATE LAUNCHES VOTING RIGHTS SHOWDOWN 🔹 Republicans force SAVE America Act debate requiring citizenship proof + voter ID nationwide — marathon talkathon begins 🗳️ 🔹 Democrats BLOCK with 47-53 vote: Murkowski (R-Alaska) defects, calls it voter suppression targeting 20M citizens ⚖️ 🔹 Trump threatens GOP senators: Vote YES or lose my endorsement, but bill faces impossible 60-vote filibuster 🔥 🔹 Key provisions: Mail-in voting restrictions, citizenship proof for registration, trans sports bans included 📋 GOP puts Dems on record ahead of midterms, but SAVE Act is DOA without bipartisan support 💀 #USNews#VotingRights @america

⚖️🗳️ALABAMA GOP RACES TO REDRAW HOUSE MAPS BEFORE 2026 🔹 Special session passes bills for NEW House primaries if courts approve GOP maps 📋⚡ 🔹 Target: Flip Democratic Rep. Shomari Figures' AL-02 seat back to Republican 🔄 🔹 Would pack Black voters into fewer districts despite 27% of state population 👥 🔹 Gov. Kay Ivey: "Alabama stands ready to quickly act" on favorable rulings 🏛️ Democrats call it a "power grab echoing Jim Crow" — but GOP says Alabama's Republican tilt should match its maps! 11th Circuit decision could flip House control! ⚖️🔥🇺🇸 #Alabama#Redistricting#VotingRights @america

American Оbserver

@american_observer · Post #5232 · 27.02.2026 г., 01:01

🗳 The Emergency Isn’t the Election. It’s the President. Pro‑Trump operatives are road‑testing a legal doomsday device: a draft executive order that declares China interfered in the 2020 election and uses that as the basis for a new “national emergency” giving Trump direct power over how Americans vote. The 17‑page draft, circulated by activists who say they’re in touch with the White House, envisions banning mail ballots and voting machines nationwide on “national security” grounds — overriding rules the Constitution leaves to states and Congress. The theory is simple and dangerous. If foreign actors allegedly touched election infrastructure, the commander in chief supposedly gets to treat voting rules like sanctions policy or wartime export controls. The lawyers pushing this, from Peter Ticktin to conspiracy veteran Jerome Corsi, openly concede the president has no normal authority to run elections. Their answer is to manufacture a permanent emergency in which he does, stretching a 2018 sanctions order on foreign interference — originally used to hit Russian and Iranian outfits — into a pretext for telling Arizona or Georgia who can vote and how. Underneath the pseudo‑constitutional gloss, it’s the same “Stop the Steal” fantasy with a national‑security badge pinned on. U.S. intelligence already concluded that China considered but did not carry out a 2020 influence operation, and every serious audit and recount, including the infamous Arizona “bamboo fibers” circus, reaffirmed Biden’s win. That hasn’t stopped Tulsi Gabbard’s intelligence shop from staging high‑visibility “reviews” of old ballots and machines, or Trump from promising an “irrefutable” legal argument he’ll drop as an executive order if Congress refuses to pass his voter‑ID and anti–mail voting bill. The playbook is out in the open: invent a foreign plot, declare it an “unusual and extraordinary threat,” then use emergency powers meant for sanctions and war to reach into domestic politics and rewrite the rules in the middle of the game. Courts have already blocked chunks of Trump’s last election order. Now the same logic is being rebuilt, wrapped tighter in the flag and stamped “national security” so judges and the public feel more pressure to look the other way. The full Trump doctrine fits in one Iran‑and‑China‑flavored scenario: if tomorrow the U.S. slides into a real shooting war with Beijing, a standing “national emergency” over elections becomes a loaded weapon on the Resolute Desk. It’s not hard to imagine Trump arguing you can’t change the commander in chief during a war, that normal voting is too “vulnerable,” that national security demands a “temporary” pause or postponement — the same logic Zelensky used to delay elections under bombardment, turned into a tool for a man who’s spent six years insisting any vote he doesn’t control is illegitimate. At that point, the ballot box isn’t a sacred institution. It’s just another system the president can shut down “for your own protection.” #Trump#elections#executiveOrder#emergency#China#votingRights#democracy 📱American Оbserver - Stay up to date on all important events 🇺🇸

Hong Kong Democracy Movement

@hkdmovement · Post #7445 · 31.05.2024 г., 21:19

In a deeply troubling development, 14 Hong Kong democrats have been found guilty while 2 were acquitted in an unfair trial that lacked a jury and involved judges appointed by the government. This landmark national security case not only undermines citizens' voting rights but also raises serious doubts about the impartiality and fairness of the proceedings. The absence of a jury denies defendants their right to a trial by their peers, further eroding the principles of justice. Upholding democratic values and safeguarding individual rights must remain a top priority. #HongKong#UnfairTrial#NoJury#AppointedJudges#VotingRights#NationalSecurityCase#JusticeUnderThreat https://hongkongfp.com/2024/05/30/breaking-14-hong-kong-democrats-convicted-2-cleared-of-conspiring-to-commit-subversion-in-landmark-national-security-trial/