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

Резултати

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

Търсене: #piyush

当前筛选 #piyush清除筛选
Pensive|

@PensivePost · Post #5015 · 23.03.2021 г., 10:41

When I was old I'd never chase peace, Now I can't live without this. When I was old I never thought I'll miss, Now everything is temporary still I seek. Used to cry when someone leaves me alone, Now me, myself and I love to stay at home. Used to cry when someone shows me the ghost, Now I don't know how to cry every day I see the living ghost in the people. I always live with the right people, who might care! If anybody wants to prove me wrong, I say “I think you are right there”. Don't let the world falls you down, you're doin alright, damn! #review#piyush

Pensive|

@PensivePost · Post #5001 · 15.03.2021 г., 09:59

Baby you can't ruin all the beautiful things Stop doing all these suitable mood swings Why did you think, That way. Sometime mind fucked up And the heart has to pay. I don't want to hate you Please don't make me to say it. We should forget bout us And shall pretend like we don't remember each other name. You were behind the fame and I understand. I was in pain but You didn't understand. #piyush#review

Pensive|

@PensivePost · Post #5013 · 22.03.2021 г., 10:27

Your world what was so busy So I left alone and that wasn't easy Our love didn't leave any meaning Then I called you and you keep it on ringing Now my heart can't stop singing My mind can't stop thinking 'Bout you I thought my friend would leave me, but not you I hope you too wanted the same thing Love, lust and fam thing Our future is now too far Am I blind? Why don't I can't see? Can't see, can't see, can't see.. ? Anymore.. Don't know 'bout those First, they love and then leave What made you by leaving them broke? #piyush#poetry#review

Pensive|

@PensivePost · Post #4878 · 06.02.2021 г., 14:27

Spectrum of love I had once affected from love We were one, now it's just get separate by move No one tried to prove Now we aren't into.., Love. But still checking up on each other's. Maybe we still don't want to get lose That was best life, when I had choose.., Her. Now it's getting worse and I can't do.., Anything. Stucked up on penny things, You and me had fucked up everything. Me and her, had dreams. It was fucked up ever since. #review#piyush#verse

Pensive|

@PensivePost · Post #4872 · 04.02.2021 г., 18:06

Why it's feels so alone? Maybe cause of I didn't hear my fav songs It's night and it's so dark It's feeling like I'm lost When this night will end? Stop living in my head! What if I stay calm? And what if you stay with me? There are thousands of words to say And you are not here to listen to me One day you would come at any reason for me And one day I'll be gone for many reasons and you won't see that coming.. #review#piyush#verse

Pensive|

@PensivePost · Post #4862 · 03.02.2021 г., 11:11

She just want to be alright, Even things are not all right, She's now crying like all night, She chooses darkness so she lose light. Now even god wants to know, who's right ? I didn't do anything wrong and idk if I have did maybe, No one knows how much I need you my baby, Again! You left me but when will this pain? You got yourself outta my life and I'm still in that lane. Sometime true love dies and no one gives a damn, Tell me after broking me what did you gain? #review#piyush#verse

Pensive|

@PensivePost · Post #4856 · 02.02.2021 г., 17:17

She cried and said “why you want to control me?” I cried and said “it doesn't make me lonely.” She said is love isn't there to make we us? I said that's right but what bout lust? She still think that I was hiding something And than she left me saying you share nothing Now she miss me too Losing controlling too She thought I was fake But now who left true? #verse#review#piyush

Pensive|

@PensivePost · Post #4966 · 27.02.2021 г., 19:37

She was drunk and lonely Alone in the city maybe that's why she don't know me Writing bout her maybe that's made her know me Hooked up with her cause she was horny She didn't said any word but when I left she said wish you'd met me before I just saw in her eyes and felt like she want more Her body wanting me but she couldn't said any word Maybe she don't want to get addict or maybe she don't want to do this anymore Her weight was much heavy but at that time, I made her feel low She said wanting this so hard, waiting from the months Tell me how you get good at this ? now I can't satisfy at once I just started from removing clothes and slowly her body started gettin burn Pleasure come with pain though but she was having fun Leg was stucked with her pants but it looks like she wanted to run Or maybe she wanted the one who won't run and drive her crazy And later, she found me and I found her, no one is between us (Erotic breathing and saying) 'Amazing'. #review#piyush#fictionalstory

Pensive|

@PensivePost · Post #4855 · 02.02.2021 г., 17:05

She cried and said “why you want to control me?” I cried and said “it doesn't make me lonely.” She said is love isn't there to make we us? I said that's right but what bout lust? She still think that I was hiding something And than she left me saying you share nothing Now she miss me too Losing controlling too She thought I was fake But now who left true? #review#verse#piyush#pease