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

Резултати

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

Търсене: #perception

当前筛选 #perception清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #632 · 26.08.2025 г., 13:22

🌎 The phenomenon of synesthesia allows some people to experience a blending of senses—like seeing colors when hearing music or tasting flavors from words. This rare trait reveals how flexible and interconnected the human brain’s sensory pathways can be. ✨ #neuroscience⚡#consciousness⚡#perception 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1336 · 11.03.2026 г., 12:11

🌎 Marathon runners often report “time expansion,” where minutes can feel much longer during intense effort. This phenomenon is linked to changes in dopamine levels in the brain, affecting how we sense passing seconds. Scientists have tracked measurable shifts in perceived time during both high physical exertion and tasks demanding intense attention. ✨ #time⚡#neuroscience⚡#perception 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1114 · 09.12.2025 г., 18:11

🌎 Time can seem to slow down or speed up based on emotional state. Studies show heightened fear, such as during accidents, leads people to recall more detail, but does not actually slow objective time. Experiments reveal our brain may stretch memory to make intense events feel longer, a phenomenon called time dilation. ✨ #neuroscience⚡#perception⚡#psychology 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #972 · 27.10.2025 г., 22:11

🌎 The phenomenon of "temporal binding" describes how the brain knits together events that happen closely in time, making them feel like a single, unified event. Studies show people often judge actions and their effects as happening closer together than they really are, revealing how the human mind shapes our perception of time’s flow. ✨ #neuroscience⚡#psychology⚡#perception 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #938 · 20.10.2025 г., 12:11

🌎 Time perception can be dramatically altered by body temperature, with research showing people exposed to cold environments often overestimate how much time has passed. This effect is linked to changes in the brain’s internal clock, and studies found that participants in cold water estimated intervals were about 20% longer than in neutral conditions. ✨ #neuroscience⚡#psychology⚡#perception 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #644 · 28.08.2025 г., 13:22

🌎 Time can feel stretchy in our minds! In moments of stress or fear, your brain’s perception of time slows down—an effect called “time dilation.” The brain records more details during intense experiences, making events seem to last longer in memory. That’s why scary or thrilling moments feel like they stretch on forever, even though the real clock keeps ticking at its usual pace. ✨ #neuroscience⚡#psychology⚡#perception 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #670 · 01.09.2025 г., 18:22

🌎 Your sense of time can shift dramatically—scientists call these “time anomalies.” Strong emotions or new environments can make minutes feel like hours, or hours like seconds. This happens because your brain judges time based on how much information it’s processing, not by the clock. Moments packed with novelty or excitement seem longer, while routine days fly by unnoticed. ✨ #psychology⚡#perception⚡#brain 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1101 · 05.12.2025 г., 12:11

🌎 The phenomenon known as synesthesia causes some people to involuntarily link senses, such as perceiving numbers or letters as specific colors. Brain scans show increased cross-activity between sensory regions in synesthetes, and the trait is estimated to occur in about 4% of people. ✨ #neuroscience⚡#perception⚡#senses 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1050 · 18.11.2025 г., 18:11

🌎 Our sense of time is shaped by specialized brain regions, including the cerebellum, basal ganglia, and the right supplementary motor area. Research using brain imaging and patient studies shows damage to these areas can create time perception anomalies—such as feeling time stretch, shrink, or fragment unexpectedly. The cerebellum, once thought only to control movement, plays a key role in accurately judging short time intervals. ✨ #neuroscience⚡#perception⚡#anomalies 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #738 · 13.09.2025 г., 00:22

🌎 In rare cases, time perception can be distorted by neurological conditions such as temporal lobe epilepsy or brain injuries. People may report "time slowing down," déjà vu, or missing chunks of experience. Some individuals with temporal lobe seizures even describe feeling like time has stopped completely. ✨ #neuroscience⚡#perception⚡#anomalies 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1082 · 28.11.2025 г., 22:11

🌎 Your brain uses a region called the "suprachiasmatic nucleus" as its master clock, syncing your sense of time to light and dark cycles. Disruptions—like jet lag or shift work—can make time feel faster or slower, and this clock influences sleep, alertness, and body temperature rhythms. ✨ #perception⚡#neuroscience⚡#circadian 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1011 · 06.11.2025 г., 22:11

🌎 Certain types of migraine can cause "time dilation" or "time compression"—making minutes feel like hours or vice versa. Research links these time perception anomalies to abnormal brain activity in areas responsible for processing time and sensory input. Migraine auras affecting time sense have been documented in up to 15% of patients. ✨ #migraine⚡#neuroscience⚡#perception 👉subscribe Interesting Planet 👉more Channels ​

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