Почему я люблю языки с сильной системой типов, проверяемой статическим анализом кода — хорошо написанная программа является своей собственной спецификацией и позволяет выражать через язык программирования законы существования предметной области.
Когда-то давно я писал на ActionScript. Там была система типов, но вот десериализация JSON'ов по-умолчанию была в какой-то общий Object, к полям которого нужно было обращаться ["по_строковому_имени"]. В один момент мне потребовалось написать что-то на C#, который я совсем не знал, я стал гуглить, как десериализовать JSON, и с удивлением обнаружил кучу советов заранее объявить класс со всеми нужными полями и десериализовать в него.
"Какой ужас!", — подумал я тогда, — "Это же дико неудобно! А если я не знаю полей JSON? А если их много? Отвратительный язык!"
Теперь то я прекрасно понимаю, что JSON это контракт, и что правильная десериализация только такая и должна быть, и что в хорошем API в одном поле никогда не бывает данных принципиально разных типов, и так далее.
Нет, если вы набиваете вечерами пет-проект или сидите бессонную ночь на хакатоне, нет ничего плохого в том, чтобы взять простой язык с динамическими типами вроде JavaScript или Python, не требующий описывать данные. Но вот в энтерпрайзе, особенно когда над одним проектом работает много людей (а бывает это очень часто) — хорошее использование системы типов убережёт разработчиков от огромного количества ошибок, будет бить их по рукам, когда они пытаются сделать что-то не то, и будет подсказывать, когда они не уверены в чём-то.
С помощью статической типизации можно на уровне кода обозначить правила, по которым ведёт себя предметная область вашей программы в реальном мире. Разработчику не только будет сложно их нарушить, но он ещё и станет узнавать какие-то вещи, которые мог не знать раньше.
Например, если мы делаем медицинскую CRM, и больница заводит новых пациентов только тогда, когда знает их группу крови, мы можем объявить тип "Пациент" (или, если точнее, "Карта пациента") и запретить создавать экземпляры этого типа, не передав в конструктор группу крови (которая, в свою очередь, тоже является типом, вероятнее всего ValueObject'ом). Если новый программист пришёл в проект, он, во-первых, не сможет записать в БД некорректную карту пациента. Понятно, мы не учитываем случаи, когда новый программист переделывает модели предметной области — это будет хорошо видно на кодревью. А, во-вторых, даже если ему никто не сказал, что пациенты должны быть с группой крови, он узнает это из кода. И уже будет понимать, что в тех процессах реальной жизни, которые он описывает кодом, карта пациента создаётся только при наличии группы крови. А, значит, нужно искать какой-то способ сначала эту группу крови получить, и только потом создавать карту. Программирование моделирует реальный процесс.
В настоящей работе даже на языках с типами, конечно, без должного контроля можно написать что угодно. Нужна управленческая воля, компетентность руководства, понимание опасности техдолга, в идеале отдельные должности для архитекторов, опытные лиды и старшие разработчики. Но когда всё это есть, можно отсекать много проблем ещё на старте и проще погружать новичков.
#dev
Xalqaro xotin-qizlar kuni bilan! 🥳
Aziz ayollar, sizni ushbu ajoyib bahor bayrami bilan tabriklaymiz, doimo gullar singari atrofdagilarni o‘z go‘zalligingiz va nafosatingiz bilan quvontirib yuring! 🥰
Barcha qiyinchiliklar sizni chetlab o‘tsin, qalbingizdagi mehr esa yaqinlaringizni va oila a'zolaringizni iliqlik bilan to‘ldirsin. 🫶
Biz sizni yaxshi ko‘ramiz, Kalleh jamoasi ❤️
➖
С Международным женским днем🥳
Милые дамы, поздравляем вас с этим чудесным весенним праздником и желаем, чтобы вы всегда, подобно цветам, радовали всех окружающих своей красотой и нежностью🥰
Пусть все невзгоды обходят вас стороной, а доброта сердца согревает родных и близких🫶
Мы вас любим, команда Kalleh❤️
#kalleh#8march
🎙 President of the Russian Federation Vladimir Putincongratulated the women of Russia on International Women’s Day, celebrated on March 8.
💬Dear women of Russia!
From the bottom of my heart, I congratulate you on International Women’s Day!
In our country, this wonderful holiday is traditionally filled with special warmth and sincerity. Today, words of love, gratitude and respect are heard everywhere. Our men express their appreciation to their mothers, wives, grandmothers, daughters, sisters, friends and colleagues, letting them know how much they are cherished and how deeply their contributions are valued, both at home and in the workplace, where they often take on complex professional challenges.
You truly do it all: taking care of children and scoring outstanding achievements in various fields, embodying both strength and grace, courage and tenderness, and winning us over again and again with your beauty and charm. You inspire men to strive for greatness, encouraging them to do better, to take bold steps and to be the true defenders of their families and homes, and our Motherland.
You hold within you life’s greatest miracle: the gift of bringing new life into the world. The tenderness and generosity of a mother’s heart and the warmth of a mother’s love transform the world and make it a better place. Motherhood is both an immense joy and a profound responsibility. We are fully aware of this and will continue to do our utmost so that mothers and families with children, especially large families, receive the support they need and see that their interests are always in the focus of the government’s attention.
My warmest words go to the women who are in places where it is most difficult right now, the participants in the special military operation. You are working in different spheres, including in field hospitals and on the front lines, doing your combat duty with distinction.
I would also like to say a few words for the women whose dear ones – husbands, fathers, brothers and loved ones – are defending the future of our country. Your heartfelt support and unfailing care, love and loyalty empower our men, strengthening their morale and the unwavering belief that the truth – and hence victory – is on our side.
Dear women!
We know that so much in life depends on you, on your talents, creative energy, love, and utmost responsibility with which you undertake any job. Once again, we are in awe of your beauty, kindness and grace.
I would like to wish success, health, well-being, and all the best to you and your loved ones. May you always find happiness alongside those you hold dear.
💐 Happy International Women’s Day!
#8March#InternationalWomensDay
🎙 President of the Russian Federation Vladimir Putincongratulated the women of Russia on International Women’s Day, celebrated on March 8.
💬Dear women of Russia!
From the bottom of my heart, I congratulate you on International Women’s Day!
In our country, this wonderful holiday is traditionally filled with special warmth and sincerity. Today, words of love, gratitude and respect are heard everywhere. Our men express their appreciation to their mothers, wives, grandmothers, daughters, sisters, friends and colleagues, letting them know how much they are cherished and how deeply their contributions are valued, both at home and in the workplace, where they often take on complex professional challenges.
You truly do it all: taking care of children and scoring outstanding achievements in various fields, embodying both strength and grace, courage and tenderness, and winning us over again and again with your beauty and charm. You inspire men to strive for greatness, encouraging them to do better, to take bold steps and to be the true defenders of their families and homes, and our Motherland.
You hold within you life’s greatest miracle: the gift of bringing new life into the world. The tenderness and generosity of a mother’s heart and the warmth of a mother’s love transform the world and make it a better place. Motherhood is both an immense joy and a profound responsibility. We are fully aware of this and will continue to do our utmost so that mothers and families with children, especially large families, receive the support they need and see that their interests are always in the focus of the government’s attention.
My warmest words go to the women who are in places where it is most difficult right now, the participants in the special military operation. You are working in different spheres, including in field hospitals and on the front lines, doing your combat duty with distinction.
I would also like to say a few words for the women whose dear ones – husbands, fathers, brothers and loved ones – are defending the future of our country. Your heartfelt support and unfailing care, love and loyalty empower our men, strengthening their morale and the unwavering belief that the truth – and hence victory – is on our side.
Dear women!
We know that so much in life depends on you, on your talents, creative energy, love, and utmost responsibility with which you undertake any job. Once again, we are in awe of your beauty, kindness and grace.
I would like to wish success, health, well-being, and all the best to you and your loved ones. May you always find happiness alongside those you hold dear.
💐 Happy International Women’s Day!
#8March#InternationalWomensDay
🎙 President of the Russian Federation Vladimir Putincongratulated the women of Russia on International Women’s Day, celebrated on March 8.
💬Dear women of Russia!
From the bottom of my heart, I congratulate you on International Women’s Day!
In our country, this wonderful holiday is traditionally filled with special warmth and sincerity. Today, words of love, gratitude and respect are heard everywhere. Our men express their appreciation to their mothers, wives, grandmothers, daughters, sisters, friends and colleagues, letting them know how much they are cherished and how deeply their contributions are valued, both at home and in the workplace, where they often take on complex professional challenges.
You truly do it all: taking care of children and scoring outstanding achievements in various fields, embodying both strength and grace, courage and tenderness, and winning us over again and again with your beauty and charm. You inspire men to strive for greatness, encouraging them to do better, to take bold steps and to be the true defenders of their families and homes, and our Motherland.
You hold within you life’s greatest miracle: the gift of bringing new life into the world. The tenderness and generosity of a mother’s heart and the warmth of a mother’s love transform the world and make it a better place. Motherhood is both an immense joy and a profound responsibility. We are fully aware of this and will continue to do our utmost so that mothers and families with children, especially large families, receive the support they need and see that their interests are always in the focus of the government’s attention.
My warmest words go to the women who are in places where it is most difficult right now, the participants in the special military operation. You are working in different spheres, including in field hospitals and on the front lines, doing your combat duty with distinction.
I would also like to say a few words for the women whose dear ones – husbands, fathers, brothers and loved ones – are defending the future of our country. Your heartfelt support and unfailing care, love and loyalty empower our men, strengthening their morale and the unwavering belief that the truth – and hence victory – is on our side.
Dear women!
We know that so much in life depends on you, on your talents, creative energy, love, and utmost responsibility with which you undertake any job. Once again, we are in awe of your beauty, kindness and grace.
I would like to wish success, health, well-being, and all the best to you and your loved ones. May you always find happiness alongside those you hold dear.
💐 Happy International Women’s Day!
#8March#InternationalWomensDay
🎙 President of the Russian Federation Vladimir Putincongratulated the women of Russia on International Women’s Day, celebrated on March 8.
💬Dear women of Russia!
From the bottom of my heart, I congratulate you on International Women’s Day!
In our country, this wonderful holiday is traditionally filled with special warmth and sincerity. Today, words of love, gratitude and respect are heard everywhere. Our men express their appreciation to their mothers, wives, grandmothers, daughters, sisters, friends and colleagues, letting them know how much they are cherished and how deeply their contributions are valued, both at home and in the workplace, where they often take on complex professional challenges.
You truly do it all: taking care of children and scoring outstanding achievements in various fields, embodying both strength and grace, courage and tenderness, and winning us over again and again with your beauty and charm. You inspire men to strive for greatness, encouraging them to do better, to take bold steps and to be the true defenders of their families and homes, and our Motherland.
You hold within you life’s greatest miracle: the gift of bringing new life into the world. The tenderness and generosity of a mother’s heart and the warmth of a mother’s love transform the world and make it a better place. Motherhood is both an immense joy and a profound responsibility. We are fully aware of this and will continue to do our utmost so that mothers and families with children, especially large families, receive the support they need and see that their interests are always in the focus of the government’s attention.
My warmest words go to the women who are in places where it is most difficult right now, the participants in the special military operation. You are working in different spheres, including in field hospitals and on the front lines, doing your combat duty with distinction.
I would also like to say a few words for the women whose dear ones – husbands, fathers, brothers and loved ones – are defending the future of our country. Your heartfelt support and unfailing care, love and loyalty empower our men, strengthening their morale and the unwavering belief that the truth – and hence victory – is on our side.
Dear women!
We know that so much in life depends on you, on your talents, creative energy, love, and utmost responsibility with which you undertake any job. Once again, we are in awe of your beauty, kindness and grace.
I would like to wish success, health, well-being, and all the best to you and your loved ones. May you always find happiness alongside those you hold dear.
💐 Happy International Women’s Day!
#8March#InternationalWomensDay
Девчонки, с праздником весны!
Вы так прекрасны, как цветы.
Спасибо, что со мной всегда —
В дожди и в ясные года.
Желаю вам любви, тепла,
Чтоб жизнь, как кимчи, жила была! 😁
Пусть дома пахнет вкуснотой,
А в сердце — вечная весна!
С 8 Марта! Обнимаю крепко 💐
#8march#8марта#kim_chi_kim
Дорогие наши женщины, матери, сестры, жены и дочери!
Сердечно поздравляем вас с праздником весны, красоты и женственности — с 8 Марта!
Сегодня, находясь на передовой, мы особенно остро чувствуем вашу поддержку, тепло ваших сердец и вашу бесконечную любовь. Вы — наша опора, наше вдохновение и наша сила.
Мы знаем, как непросто вам в эти дни, но ваша стойкость и вера помогают нам идти вперед. Спасибо вам за ваше терпение, за вашу заботу и за то, что вы всегда с нами, даже на расстоянии.
Пусть этот день принесет вам радость, улыбки и надежду на скорую встречу. Мы верим, что мирное небо скоро вернется, а наши сердца снова будут рядом с вами.
С праздником, дорогие! Вы — наши героини!
С любовью и уважением, ваши бойцы.
#8марта#8march#поздравления
KNAUF kompaniyasida turfa xil kasb egalari: muhandislar, buxgalterlar, sifat, logistika, xavfsizlik, xodimlar boshqaruvi va investitsiyalar bo‘yicha mutaxassislar ishlaydi.
Har kuni ular ishlab chiqarish jarayonlarining barqaror faoliyati, loyihalar rivoji va yuqori sifat darajasini ta’minlab keladilar.
Ularning tajribasi, kasb bilimdonligi va tafsilotlarga e’tibori kompaniyaning olgʻa yurishiga turtki beradi.
Xalqaro xotin-qizlar kunida biz sizni jamoamizning dur-u gavharlari – KNAUF rivojiga ulkan hissa qo‘shib kelayotgan ayollar bilan tanishtirmoqchimiz.
Mehnatingiz, mas’uliyatingiz va g‘ayratingiz uchun tashakkur.
8-mart bayrami muborak!
- - - - -
В КНАУФ работают люди самых разных профессий — инженеры, бухгалтеры, специалисты по качеству, логистике, безопасности, управлению персоналом и инвестициям.
Каждый день они обеспечивают стабильную работу производства, развитие проектов и высокий уровень качества.
Их опыт, профессионализм и внимание к деталям помогают компании двигаться вперёд.
В Международный женский день мы хотим познакомить вас с частью нашей команды — женщинами КНАУФ, которые вносят огромный вклад в развитие компании.
Спасибо за ваш труд, ответственность и энергию.
С праздником 8 марта!
#knaufuzbekistan
#buildonus
#KNAUF_Yangiliklar
#8mart
#8march
🌷Happy International Women’s Day!
The Russian House in Brussels warmly congratulates all women on the occasion of 8 March.
This special day is a celebration of the strength, wisdom, talent, and inspiration that women bring to our world. Throughout history, women have played an essential role in society — preserving cultural traditions, inspiring creativity, and contributing to the development of communities and dialogue between nations.
May this spring bring you joy, new inspiration, warmth, and happiness. We wish you good health, prosperity, and many bright moments filled with smiles and kindness.
With best wishes on the holiday of spring, beauty, and inspiration!🌸
Russian House in Brussels
#InternationalWomensDay#8March#RussianHouseBrussels#WomenInspire#SpringHoliday
🤗 Дорогие женщины,
Коллектив Русского дома поздравляет вас с Международным женским днём #8Марта!
Пусть этот весенний праздник наполнит ваши сердца энергией и радостью, подарит отличное настроение и искренние улыбки! Пусть в ваших домах царят любовь, счастье, тепло, уют и благополучие! 💐
🤗 Αγαπητές γυναίκες,
Το Ρωσικό σπίτι στην Αθήνα σας συγχαίρει θερμά για την Παγκόσμια Ημέρα της Γυναίκας, #8 Μαρτίου!
Είθε αυτή η ανοιξιάτικη γιορτή να γεμίσει τις καρδιές σας με ενέργεια και χαρά, να σας προσφέρει υπέροχη διάθεση και ειλικρινή χαμόγελα! Είθε να βασιλεύει στα σπίτια σας η αγάπη, η ευτυχία, η ζεστασιά, η θαλπωρή και η ευημερία! 💐
Με τις καλύτερες ευχές μας για μια υπέροχη ημέρα!
#женскийдень#праздник#8марта#8μαρτίου#8march#международныйженскийдень#παγκοσμιαημεραγυναικας#holiday#8march#8μαρτίου#internationalwomensday#παγκοσμιαημεραγυναικας
🤗 Αγαπητές γυναίκες,
Το Ρωσικό σπίτι στην Αθήνα σας συγχαίρει θερμά για την Παγκόσμια Ημέρα της Γυναίκας, #8 Μαρτίου!
Είθε αυτή η ανοιξιάτικη γιορτή να γεμίσει τις καρδιές σας με ενέργεια και χαρά, να σας προσφέρει υπέροχη διάθεση και ειλικρινή χαμόγελα! Είθε να βασιλεύει στα σπίτια σας η αγάπη, η ευτυχία, η ζεστασιά, η θαλπωρή και η ευημερία! 💐
Με τις καλύτερες ευχές μας για μια υπέροχη ημέρα!
🤗 Дорогие женщины,
Коллектив Русского дома поздравляет вас с Международным женским днём #8Марта!
Пусть этот весенний праздник наполнит ваши сердца энергией и радостью, подарит отличное настроение и искренние улыбки! Пусть в ваших домах царят любовь, счастье, тепло, уют и благополучие! 💐
@rossotrudnichestvo@rusembgreece
#женскийдень#праздник#8марта#8μαρτίου#8march#международныйженскийдень#παγκοσμιαημεραγυναικας
#womensday#holiday#8march#8μαρτίου#internationalwomensday#παγκοσμιαημεραγυναικας