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

Резултати

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

Търсене: #kuta

当前筛选 #kuta清除筛选
Bali News

@balinews · Post #224 · 24.10.2024 г., 10:45

🌴 Pererenan is the third best street in the world 2024 📍 Pererenan, a small but vibrant neighborhood in Bali, was recently ranked in the top 3 best streets in the world 2024 by Time Out magazine. This recognition is no coincidence - the neighborhood attracts both locals and international audiences with its unique features and atmosphere. ✨ Why is Pererenan so attractive? Time Out magazine has highlighted Pererenan as one of the most unique and atmospheric streets in the world, where the balance between tradition, nature and development creates a special environment for living and relaxing. @BaliNews #places#Kuta

Hashtags

Bali News

@balinews · Post #44 · 12.05.2024 г., 10:45

🌅 The ultimate sunset serenade with Jay Sean & IYAZ at Rock Bar 🎤🎶 Rock Bar AYANA to present JAY SEAN & IYAZ Live – an electrifying evening of sensational music and ocean vistas. 📆 Mark Your Calendars :) Date: May 17, 2024 Time: Kick off at 4:00 PM Venue: Rock Bar Ayana, the iconic beach club that offers a perfect blend of elegance and excitement. 🎫 13 tickets left! @BaliNews #wheretogo#Kuta

Bali News

@balinews · Post #223 · 23.10.2024 г., 12:01

🌊 Kuta beach will be restored after the storm 📍 The recent two-meter high tidal waves that hit Bali left a mark on one of the most popular beaches on the island, Kuta. 🏖 The sandy coastline has been badly eroded, making it virtually unfit for walking. 📰 Now, new breakwaters are planned to be built. It is expected that the authorities will begin work to restore the beach this month, but for now the beach and small businesses on it are being helped by locals and tourists. Together they have decided to cope with coastal erosion. @BaliNews #beaches#Kuta

Bali News

@balinews · Post #58 · 25.05.2024 г., 14:08

📸Colorful carnival was held in Nusa Dua 💧The most colorful event of the Water Forum and the only one available to everyone, tourists and expats missed out. There were fewer spectators at the carnival than participants. 🐲 The carnival was conceived as a kind of live exposition with Balinese cultural attractions. Dancing, theatrical skits, music, costumes - all elements of national identity, epic, art. It was noisy, energetic and very spectacular. 🎤 Among the honored spectators were spotted, for example, Indonesia's Minister of Tourism and Creative Economy Sandiaga Uno - pictured in the center with a Balinese headdress. The man on his right hand is Dewa Made Indra, Bali's provincial regional secretary. @BaliNews #festivals#Kuta

Bali News

@balinews · Post #315 · 08.02.2025 г., 06:35

🏛️A peace museum will be built on the site of the terrorist attack in Kuta 📰 The Badung District Government has bought the land where the Sari Club used to be located. That very site of the biggest terrorist attack in Indonesian history in 2002. To commemorate the event, a Bali Peace Museum will soon be built on the site. 🧘🏻‍♀️ The park project includes a mural telling the chronology of that day and a 'reflection corner' where visitors can sit and remember those who lost their lives. The museum is meant to be not only a reminder of the terrorist attacks, but also a symbol of peace and tolerance. ℹ️ The 2002 terrorist attacks in Kuta were the largest terrorist attack in Indonesia's history in terms of casualties. On October 12, 2002, the first explosive device weighing about 1 kg went off near the entrance to the Paddy's Pub nightclub, where a party was held. A memorial to the victims of the terrorist attack now stands on the site. Every year on October 12, there is a ceremony where tourists from all over the world come to honor the memory of the victims. There are two other memorials in Australia in Canberra and in Kings Park in Perth (88 of those who died that day were Australians). @BaliNews #realestate#places#Kuta

Bali News

@balinews · Post #506 · 08.10.2025 г., 12:10

📰Free Kalista electric buses extended until November 🆓 The first month of trial operation of Trans Metro Dewata electric buses on the route from the central parking lot in Kuta to the ITDC parking lot in Nusa Dua has concluded. 🚍 The electric bus will continue operating on the route until November 6. Travel is free, and payments via e-money or QRIS Tap are for demonstration purposes only, meaning no funds are deducted from the account. #transport#free#Kuta@BaliNews

Bali News

@balinews · Post #544 · 15.12.2025 г., 13:20

📰 Bali now hosts the largest Apple Premium Partner in Southeast Asia 🛍 The new Imaginaria by Digimap is a two-story flagship on Sunset Road, Kuta. Here, technology is part of the culture, not just gadgets. Technology, art, and Balinese philosophy all in one place! 📍 Jl Sunset Road No. 9, Seminyak — a new must-visit for tourists, Apple fans, and anyone who appreciates cross-cultural retail projects. #tech#places#Kuta@BaliNews

Bali News

@balinews · Post #148 · 21.08.2024 г., 11:47

🪧Bali airport workers have gone on a three-day strike 📰 Workers at Bali's Ngurah Rai airport have gone on strike. They held a peaceful protest at the motorcycle parking lot. 📄 The reason for the strike, which will last three days, was a problem with labor contracts. Despite the participation of about 250 people in the strike, the operation of the air harbor continues as usual. @BaliNews #airport#Denpasar#Kuta

Bali News

@balinews · Post #230 · 29.10.2024 г., 03:07

🥳A four-day Halloween party in Kuta 🔔 Starting tomorrow, October 30, Old Man's will be hosting a series of Halloween parties starting at 5:00pm. Come dressed to impress as your favorite ghoul, ghost, or Halloween character for a chance to win big in our spine-chilling costume contest. 🎫 Tables for one-day start from Rp2,400,000 – included entrance fee for 4 pax, 1 bottle of house pouring and 4 mixers. 👨‍💻 More information via the link. @BaliNews #wheretogo#parties#Kuta

Bali News

@balinews · Post #25 · 26.04.2024 г., 10:50

🤕Two foreigners beat up the Pechalangs at a villa in Seminyak Kuta police have detained two US citizens, 26-year-old Aabed Attia and his older brother 30-year-old Zeyad Ahmed Attia. According to law enforcers, the Americans beat up two pechalangs (local vigilantes) at a rented villa in Seminyak after being reprimanded over loud music. The foreigners are now in a detention center, awaiting trial. @BaliNews #accidents#Kuta#Seminyak

Bali News

@balinews · Post #113 · 10.07.2024 г., 12:05

🤖A unique art exhibition Neuro Conflict will take place in Bali 📍 This weekend from 12 to 14 July, Superlative Gallery in Kuta will host an unusual exhibition called Neuro Conflict. Here you can experience a unique combination of art and modern technology, including neural networks. 🤖 The event will run for three days. The exhibition will feature works by international artists, interactive art installations, fascinating lectures on artificial intelligence, as well as performances and an auction. @BaliNews #wheretogo#exhibitions#Kuta

Bali News

@balinews · Post #274 · 24.12.2024 г., 12:30

⚓A concert venue will be built in the port of Benoa 🚢 The 8.11-hectare port area known as Taman Segara Kerthi in Bali's maritime tourist center will be transformed into a concert venue. 📰 Eric Tohir, minister for public enterprises, said it will be part of a complex including a marina, entertainment venues and shopping areas. It is hoped that major events such as Tomorrowland, Summer Sonic and other world-class events will be showcased in the harbor area. @BaliNews #goodnews#projects#places#Kuta

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