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

Резултати

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

Търсене: #cosmonauticsday

当前筛选 #cosmonauticsday清除筛选

🚀 On April 12, 1961, at 09:07 Moscow time, the Vostok spacecraft with pilot-cosmonaut Yuri Gagarin on board blasted off from the Baikonur Cosmodrome, marking the beginning of the space age in the history of mankind. Yuri Gagarin spent 108 minutes in space, making a complete orbit around the Earth, and successfully landed. While in orbit, he maintained radio contact with Earth, made observations through a porthole, controlled the operation of the ship's systems, and carried out simple experiments. 📰 Even his wife did not know about this feat. The news about Yuri's flight came out only 55 minutes after the launch of the Vostok rocket, becoming the most quoted report in the world. Two days later, many thousands of people with flowers and welcome posters took to the streets of Moscow, honouring the cosmonaut who had arrived in the capital. At the end of April, our compatriot went on a foreign tour, travelling through more than 30 countries in two years, where he was welcomed as a hero. #CosmonauticsDay

О мероприятии по случаю Международного дня полета человека в космос 12 апреля 2024 года по случаю Дня космонавтики Временный поверенный в делах Российской Федерации в Румынии Е.С.Копнина возложила цветы к бюсту Ю.А.Гагарина, советского летчика-космонавта, первого человека в мировой истории, совершившего полёт в космическое пространство. В торжественном мероприятии в Бухаресте приняли участие представители дипломатического корпуса, аккредитованного в Румынии, бизнеса, соотечественники, румынские общественные организации и СМИ. Российский дипломат поздравила гостей с праздником, отмечаемым ежегодно в день первого полета человека в космос, знаменовавшего важнейший шаг в истории человечества, впервые покинувшего колыбель родной планеты. Она отметила объединяющую силу Международного дня космонавтики, когда представители множества стран отдают дань памяти и восхищения мужеством, талантом и самоотверженным трудом всех поколений ученых, конструкторов, летчиков, внесших вклад в изучение и мирное освоение космического пространства. Мероприятие открыло серию культурных акций Посольства, посвященных Дню космонавтики. В их числе – конкурс и выставка детского рисунка «Я рисую космос» и показ на румынском языке познавательного документального фильма «Космическая история России», предоставленного Ассоциацией планетариев России. Кроме того, вниманию всех, увлеченных космической тематикой, будут представлены в переводе на румынский язык драматическая кинолента «Вызов», первый художественный фильм, снятый в условиях невесомости на Международной космической станции, и исторический фильм «Время первых» о первом выходе человека в открытый космос, совершенном советским космонавтом А.А.Леоновым 18 марта 1965 года. ПРЕСС-СЛУЖБА ПОСОЛЬСТВА #CosmonauticsDay#ДеньКосмонавтики

Russian Embassy in Albania

@rusembalb · Post #6740 · 12.04.2025 г., 21:28

“Having orbited Earth in a spaceship, I saw for the first time how beautiful our planet is. People, let us preserve and increase this beauty and not destroy it!” — Yuri Alekseyevich Gagarin 🚀 The world changed forever in those moments when Vostok-1 launched from the Baikonur Cosmodrome, and Yuri #Gagarin became the first person in history to enter Earth’s orbit and circle our planet. This collective feat of the entire Soviet Union, its scientists, and cosmonauts marked the beginning of the space era in human history. 🌏 Before the launch of the spacecraft, Yuri Gagarin addressed the people of the entire planet with these inspiring words: “Dear friends, both familiar and unknown, compatriots, people of all countries and continents! In just a few minutes, a mighty spacecraft will carry me into the vast expanses of the universe. What can I say to you in these final moments before the launch? My entire life now seems to me like one beautiful moment. Everything I have lived through and accomplished was done for the sake of this moment. Am I happy to be embarking on this spaceflight? Of course, I am! After all, throughout history, it has been the highest happiness for people to participate in new discoveries. Now, only a few minutes remain until the launch. I want to say goodbye to you, my dear friends, as people always say to each other when setting off on a long journey. How I wish I could embrace you all — both those I know and those I don’t, those far away and those close by! Until we meet again!” #CosmonauticsDay#Gagarin#FirstInSpace

Russian Embassy in Cambodia

@russian_embassy_in_cambodia · Post #4255 · 12.04.2025 г., 12:57

“Having orbited Earth in a spaceship, I saw for the first time how beautiful our planet is. People, let us preserve and increase this beauty and not destroy it!” — Yuri Alekseyevich Gagarin 🚀 The world changed forever in those moments when Vostok-1 launched from the Baikonur Cosmodrome, and Yuri #Gagarin became the first person in history to enter Earth’s orbit and circle our planet. This collective feat of the entire Soviet Union, its scientists, and cosmonauts marked the beginning of the space era in human history. 🌏 Before the launch of the spacecraft, Yuri Gagarin addressed the people of the entire planet with these inspiring words: “Dear friends, both familiar and unknown, compatriots, people of all countries and continents! In just a few minutes, a mighty spacecraft will carry me into the vast expanses of the universe. What can I say to you in these final moments before the launch? My entire life now seems to me like one beautiful moment. Everything I have lived through and accomplished was done for the sake of this moment. Am I happy to be embarking on this spaceflight? Of course, I am! After all, throughout history, it has been the highest happiness for people to participate in new discoveries. Now, only a few minutes remain until the launch. I want to say goodbye to you, my dear friends, as people always say to each other when setting off on a long journey. How I wish I could embrace you all — both those I know and those I don’t, those far away and those close by! Until we meet again!” #CosmonauticsDay#Gagarin#FirstInSpace

“Having orbited Earth in a spaceship, I saw for the first time how beautiful our planet is. People, let us preserve and increase this beauty and not destroy it!” — Yuri Alekseyevich Gagarin 🚀 The world changed forever in those moments when Vostok-1 launched from the Baikonur Cosmodrome, and Yuri #Gagarin became the first person in history to enter Earth’s orbit and circle our planet. This collective feat of the entire Soviet Union, its scientists, and cosmonauts marked the beginning of the space era in human history. 🌏 Before the launch of the spacecraft, Yuri Gagarin addressed the people of the entire planet with these inspiring words: “Dear friends, both familiar and unknown, compatriots, people of all countries and continents! In just a few minutes, a mighty spacecraft will carry me into the vast expanses of the universe. What can I say to you in these final moments before the launch? My entire life now seems to me like one beautiful moment. Everything I have lived through and accomplished was done for the sake of this moment. Am I happy to be embarking on this spaceflight? Of course, I am! After all, throughout history, it has been the highest happiness for people to participate in new discoveries. Now, only a few minutes remain until the launch. I want to say goodbye to you, my dear friends, as people always say to each other when setting off on a long journey. How I wish I could embrace you all — both those I know and those I don’t, those far away and those close by! Until we meet again!” #CosmonauticsDay#Gagarin#FirstInSpace

Russian House Brussels-Europe

@rushousebrussels · Post #2989 · 30.03.2026 г., 12:45

📅April Programme at the Russian House Brussels We are pleased to present our April programme — a rich and diverse series of cultural, educational and artistic events. ✨ This month: — 🎨 Family space art workshop for children — 🎬 Space Documentary Film Days dedicated to Cosmonautics Day — 🎼 Concerts and musical evenings, including a special programme of the Bolshoi Theatre — 📚 Lectures and historical meetings — 🇷🇺 Russian language workshops and conversation club — 🎭 Theatre performance and film screenings for all ages 🖼 Throughout April, discover our exhibitions: — “The Amazing Earth” — “Energy of Space” by Sergey Kraynev — “Captain Cousteau in Russia” — “When Art Nouveau meets Artificial Intelligence” 📍 All events take place at the Russian House Brussels or online 🔗 Full programme and registration: rushouse.be We look forward to welcoming you! #RussianHouseBrussels#BrusselsEvents#Culture#RussianCulture#Art#Music#Cinema#Education#CosmonauticsDay#Brussels