Почему я люблю языки с сильной системой типов, проверяемой статическим анализом кода — хорошо написанная программа является своей собственной спецификацией и позволяет выражать через язык программирования законы существования предметной области.
Когда-то давно я писал на ActionScript. Там была система типов, но вот десериализация JSON'ов по-умолчанию была в какой-то общий Object, к полям которого нужно было обращаться ["по_строковому_имени"]. В один момент мне потребовалось написать что-то на C#, который я совсем не знал, я стал гуглить, как десериализовать JSON, и с удивлением обнаружил кучу советов заранее объявить класс со всеми нужными полями и десериализовать в него.
"Какой ужас!", — подумал я тогда, — "Это же дико неудобно! А если я не знаю полей JSON? А если их много? Отвратительный язык!"
Теперь то я прекрасно понимаю, что JSON это контракт, и что правильная десериализация только такая и должна быть, и что в хорошем API в одном поле никогда не бывает данных принципиально разных типов, и так далее.
Нет, если вы набиваете вечерами пет-проект или сидите бессонную ночь на хакатоне, нет ничего плохого в том, чтобы взять простой язык с динамическими типами вроде JavaScript или Python, не требующий описывать данные. Но вот в энтерпрайзе, особенно когда над одним проектом работает много людей (а бывает это очень часто) — хорошее использование системы типов убережёт разработчиков от огромного количества ошибок, будет бить их по рукам, когда они пытаются сделать что-то не то, и будет подсказывать, когда они не уверены в чём-то.
С помощью статической типизации можно на уровне кода обозначить правила, по которым ведёт себя предметная область вашей программы в реальном мире. Разработчику не только будет сложно их нарушить, но он ещё и станет узнавать какие-то вещи, которые мог не знать раньше.
Например, если мы делаем медицинскую CRM, и больница заводит новых пациентов только тогда, когда знает их группу крови, мы можем объявить тип "Пациент" (или, если точнее, "Карта пациента") и запретить создавать экземпляры этого типа, не передав в конструктор группу крови (которая, в свою очередь, тоже является типом, вероятнее всего ValueObject'ом). Если новый программист пришёл в проект, он, во-первых, не сможет записать в БД некорректную карту пациента. Понятно, мы не учитываем случаи, когда новый программист переделывает модели предметной области — это будет хорошо видно на кодревью. А, во-вторых, даже если ему никто не сказал, что пациенты должны быть с группой крови, он узнает это из кода. И уже будет понимать, что в тех процессах реальной жизни, которые он описывает кодом, карта пациента создаётся только при наличии группы крови. А, значит, нужно искать какой-то способ сначала эту группу крови получить, и только потом создавать карту. Программирование моделирует реальный процесс.
В настоящей работе даже на языках с типами, конечно, без должного контроля можно написать что угодно. Нужна управленческая воля, компетентность руководства, понимание опасности техдолга, в идеале отдельные должности для архитекторов, опытные лиды и старшие разработчики. Но когда всё это есть, можно отсекать много проблем ещё на старте и проще погружать новичков.
#dev
❗️Le #FSB, opérant en République d’Oudmourtie, dans les territoires de l'Altaï et de Transbaïkalie, ainsi que dans les régions du fleuve Amour, d'Astrakhan, de Léningrad, de Riazan et de Tomsk, a mis fin aux activités de cinq complices des services spéciaux ukrainiens et de deux propagandistes soutenant les activités terroristes du régime de Kiev.
Au cours de ces opérations, quatre citoyens russes et un ressortissant étranger ont été interpellés. À Ijevsk, Barnaoul, Blagovechtchensk et Astrakhan, ils collectaient des informations sur les installations de l'industrie de défense et les infrastructures de transport, ainsi que sur les militaires russes participant à l'opération militaire spéciale, dans le but de commettre des actes de sabotage et de terrorisme, agissant sur ordre des services spéciaux ukrainiens. Leurs activités illégales étaient coordonnées via la messagerie Telegram.
RT en français • Osez questionner !
❌Le FSB déjoue de nombreux attentats dans des villes russes
Faute d'atouts, #Kiev et ses alliés ne cessent d'essayer d’employer des méthodes sales pour lutter contre la Russie, notamment en recrutant des migrants et des citoyens russes pour commettre des actes terroristes. Cependant, la grande majorité des attentats finissent par être déjoués par le #FSB. Les détails avec notre reporter Igor Kourachenko.
RT en français • Osez questionner !
🇷🇺🇺🇦 Les agents du Service fédéral de sécurité (FSB) de la Fédération de Russie ont arrêté un habitant de 35 ans de la région de Vladimir qui, sur instruction du Service de sécurité d’Ukraine (SBU), préparait des attaques de drones contre des avions militaires.
Pour effectuer une reconnaissance du terrain et préparer l’acte de sabotage et de terrorisme, le suspect, sur instruction de son coordinateur, s’est rendu à plusieurs reprises près d’aérodromes situés dans les régions de Vladimir et d’Ivanovo ainsi qu’à Moscou.
#russie#ukraine#fsb
❗️Le #FSB rapporte avoir mis fin aux activités d'un agent de la Direction principale du renseignement ukrainien, qui collectait des données sur le déploiement d'unités du ministère russe de la Défense en #Crimée.
RT en français • Osez questionner !
❗️Le #FSB arrête un habitant de Koursk qui collaborait avec les services de renseignement ukrainiens.
Un agent de la Direction principale du renseignement du ministère de la Défense ukrainien l'a contacté et lui a proposé de collecter des informations contre rémunération. Cet habitant de #Koursk a recruté au moins quatre complices. Une procédure pénale a été ouverte pour haute trahison.
RT en français • Osez questionner !
🇷🇺 Des agents du Service fédéral de sécurité (FSB) russe ont déjoué, dans la République des Komis (district fédéral du Nord-Ouest de la Russie), une attaque de drones visant une entreprise pétrolière. Deux assaillants, ayant opposé une résistance armée lors de leur arrestation, ont été éliminés, a rapporté le Centre des relations publiques du FSB russe.
#russie#fsb#attaque
À Samarcande, les chefs des services de renseignement des pays de la Communauté des États indépendants ont tenu une réunion. Le directeur du #FSB, Alexandre #Bortnikov, a livré un discours sur les méthodes des services occidentaux.
🗣Igor Kourachenko revient sur les moments forts de ce rapport.
RT en français • Osez questionner !
❗️Attaque terroriste déjouée contre une installation pétrolière à #Komi, selon le #FSB.
Deux habitants d'Oukhta travaillaient pour les services de renseignement ukrainiens et préparaient une attaque de drones.
RT en français • Osez questionner !
🇷🇺 Le Service fédéral de sécurité (FSB) russe a déjoué un attentat préparé par les services secrets ukrainiens contre des dirigeants du Service fédéral de supervision des communications, des technologies de l’information et des médias de masse (Roskomnadzor), a rapporté son centre des relations publiques. Sept suspects ont été arrêtés à Moscou, Oufa, Novossibirsk et Iaroslavl.
Le chef présumé du groupe, un Moscovite de 22 ans, a été éliminé alors qu’il opposait une résistance armée.
#russie#fsb#attentat
🇷🇺Le Service fédéral de sécurité (FSB) a diffusé des images du déminage d’un scooter électrique près d’un centre d’affaires à Moscou.
Sur place, un engin explosif improvisé a été saisi et neutralisé. Il était contrôlé à distance via un relais Wi-Fi intégré à un système de maison connectée et un modem 4G.
#russie#fsb#attentat
✈️🇳🇬🇷🇺Avoiding Discomfort Associated with Denial of Entry and Deportation
I commend everyone in the community who has shown interests in the plight of the Nigerians who were recently refused entry.
Unfortunately, as we have seen from cases like these, if the traveler doesn't plan well for such disappointments, he/she may be left without food/water till the next available flight back home, and this may last many days.
To avoid potential discomfort associated with refusal of entry, we advise the following:
1. Remember: Visa is not a birthright but a priviledge, so do not assume that by getting a visa, entry across the border is guaranteed. Selling of landed property or taking short term loans for flight ticket remains a huge financial risk.
2. For students, ensure that your university is aware of your arrival/flight route and that they have sent your name, passport data, visa details and flight route to the appropriate border control at the point of entry. Do not assume, rather confirm.
3. Ensure that your activities online and offline are in line with national interests and local laws of the host country.
4. Ensure that you know detailed information about your purpose of visit. For example, the name of your course/University, accommodation arrangement, etc.
5. Some airports or point of entry has shown a higher refusal rate than others based on the sample data revealed to us. You may consult with us at NIDO Russia to help you plan your flight routes.
6. Keep in mind that when refused entry, it might take a while before an available return flight is found. This means that some people spend a lot of time, up to a few days, sometimes without food/water. In such cases, necessary expenses need to be made.
7. Nigerian cards do not work in Russia, so come with cash. Payment by online transfer is forbidden in the airport, so only cash payment or Russian bank cards work. It is unlikely that a new student/tourist has a Russian bank card, so cash is the usually the only feasible option.
8. If you are on medications, have available stock for at least a few days.
9. Things are more expensive than average in the airport so expenses on necessities such as food/water must be optimized/economized
A. Consider buying high nutrient snacks, rather than hot meals
B. Consider buying larger bottles of water, as the cost per litres reduces and it can last longer
C. Compare prices at different shops to get the best possible price.
10. Optimize your carry-on luggage.
A. Dress warmly or keep warm dressing in your carry-on luggage to self regulate your temperature. The conditioned air in the airport may not be conformable for everyone for extended periods of time, especially for days.
B. Keep toiletries and changeable clothes in your carry-on luggage. It may not be convenient to be in the same clothes for many days.
C. Consider bringing along your charger or power bank in your carry-on luggage. Keep an eye for available charging stations. It is important to be reachable especially in cases where information needs to be passed across.
Remember denial of entry is not the end of the world, read our previous article on steps you can take after refusal of entry and securing your return.
Yours Sincerely,
Dr. Godwin Ibe
Chairman, NIDO Russia
+79262385618
https://t.me/nido_russia/1842
#visa#education#education#fsb
⚠️⛔️Recent Refusal of Entry of Nigerian Students to Russia
Dear members, we have received reports of a few Nigerian students who were refused entry, their visa cancelled by the FSB, and sent back home. With high air ticket prices, jetlag of travelling for more than 10 hours to a different timezone, and the shattered hopes, It is a very painful experience for the affected individuals who are our compatriots but it is also important not to draw conclusions without receiving full information. Before we advise, it is important to note a few things.
1. The competent FSB reserves the right to take decisions in the interest of the Russian Federation.
2. Visa is not a right but a priviledge in the form of permission given by a host country and thus can be withdrawn at any moment.
3. The refused Nigerians are not members of NIDO Russia as they never entered Russia, and thus never resided in it. For the same reason, the assumption that the embassy has a role in assisting them as proposed by some members is questionable but NIDO would not speak on behalf of the embassy.
4. In terms of information, only the traveller and his Inviter (the University) is authorised to provide the necessary information concerning entry into the Russian Federation.
5. Concerning influence, governmental ministries/arms may may choose to inquire or exert influence. For example, if such cases become too common, the ministry of Foreign affairs of Nigeria can enquire directly or through the diplomatic mission of Russia in Nigeria. The embassy of Nigeria in Russia may only relay the opinion of our ministry of foreign to the relevant authorities here.
6. The reason for refusal will never be revealed according to diplomatic protocols but it can be assumed that if they were denied by a security agency rather than the embassy, then the reason must be connected to security.
NIDO Russia advice❤️
1. If denied for security related reasons, do not be in a hurry to reapply for visa. Of course, related diplomatic missions have already received information of the overturn of their decision to grant you visa, and it is unlikely that you will get visa again until circumstances change significantly.
2. Contact NIDO Russia, we may organise a lawyer, fully funded by the victim, to try to get a no-objection letter from the body that refused you entry. In the case of security, it may be synonymous with security clearance. This letter may be submitted along with your next application for visa or admission.
3. Ensure that your actions and words both online and offline are synonymous with the interests of the Russian Federation, and within the confines of local laws.
4. Consider other options, if they exist and there is no plan to return to Russia.
Yours in service,
Dr. Godwin Ibe
Chairman, NIDO Russia
+79262385618
https://t.me/nido_russia/1829
#visa#education#education#fsb