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

Резултати

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

Търсене: #march2023

当前筛选 #march2023清除筛选
The Open Platform

@topco · Post #51 · 03.04.2023 г., 09:01

DeFi: March headlines - DeFi sees its biggest hack in 2023 as Euler loses $197M: Euler Finance faced a flash loan attack on March 13, the attacker stole millions in DAI, USDC, staked Ether (StETH) and wrapped Bitcoin (WBTC) (source) - CFTC’s tech committee gathered in DC to talk DeFi: most of the participants agrees that they can "no longer ignore decentralization", and that its "benefits “far outweigh” the challenges, which they believe will “self-resolve”. Members unanimously voting for creating a Digital Assets and Blockchain Technology Subcommittee. (source) - The U.S. Treasury Department is close to releasing a risk assessment analyzing criminal use of DeFi: the department has reviewed decentralized finance’s role in such incidents as North Korean ransomware attacks, and will issue a risk assessment (source) - DeFi TVL Reaches 2023 Highs as Lido Liquid Staking Expands Its Lead: given that stakers will be able to withdraw their Ethereum after the upcoming Shanghai upgrade, demand for Lido liquid staking is surging (source) - DWF Labs Invests $20M in Derivatives Trading Platform Synthetix, Synthetix's perpetual futures product will be integrated into DWF Labs' trading business with the aim of boosting Synthetiix's trading volume (source) #DeFi#March2023#trends

The Open Platform

@topco · Post #56 · 07.04.2023 г., 09:02

Metaverse: March headlines - NVIDIA and Microsoft to Bring the Industrial Metaverse and AI to Hundreds of Millions of Enterprise Users via Azure Cloud: NVIDIA today announced a collaboration with Microsoft to provide hundreds of millions of Microsoft enterprise users with access to powerful industrial metaverse and AI supercomputing resources via the cloud (source) - Disney cuts metaverse division under Iger’s restructuring as part of the layoffs set to begin in March (source) - Animoca Brands Cuts Metaverse Fund Target to $800M, the fund previously announced in November 2022 that it was working on a new Animoca Capital fund with a target of $2 billion (source) - Meta says its single largest investment is now in ‘advancing AI’, analysts mention that Zuckerberg "altered the narrative of the company to one focused on efficiencies rather than looking to grow the metaverse at any cost" (source) - South Korea invests $51M into metaverse projects, South Korea’s Ministry of Science said the earmarked funds will be used to prop up 13 new projects leveraging virtual worlds in the health, tourism, and education industries (source) #metaverse#March2023#trends

The Open Platform

@topco · Post #53 · 05.04.2023 г., 09:02

Crypto Payment Solutions: March headlines - Telegram's Wallet Bot @wallet Integrates Tether (USDT) Payments on Tron Network: users can now send and receive USDT directly from their chats, as well as buy, swap, and make P2P trades with the stablecoin (source) - Silvergate suspends crypto payments network; shares fall after-hours: Silvergate on Wednesday warned in a filing that it was evaluating its ability to operate as a going concern, Coinbase Global Inc, Galaxy Digita, Paxos, Circle, Bitstamp and Gemini suspended their partnerships with Silvergate after the warning (source) - Visa, Mastercard Halt Crypto Initiatives Pending Industry And Regulatory Recovery, previously both companies forged multiple partnerships with crypto firms and dedicated teams to explore blockchain technology (source) - U.S. Federal Reserve’s Real-Time Payments System FedNow Coming in July, FedNow has been seen as a potential precursor to a central bank digital currency (CBDC) (source) - Bybit Launches Debit Card for Crypto Payments: the Bybit card will operate on the Mastercard network and will initially allow fiat-based transactions by debiting cryptocurrency balances when used to pay for goods and services (source) #paymentsolutions#March2023#trends

The Open Platform

@topco · Post #54 · 06.04.2023 г., 09:00

Web3 Creator Economy: March headlines - Animoca Brands Japan invests in global entertainment company Rainshine Global Inc., the two companies aim to build a gateway for Japanese intellectual properties (IPs) to reach new global markets (source) - Instagram scraps its Web3-related initiatives for now, previously Instagram tested the idea of limited-edition NFTs or digital collectibles minted from photos that users could create and sell (source) - NEAR Protocol is Taking a Step Towards Web3 Social Networking: NEAR Discovery, "the easiest point of entry into Web3", is meant to make it easier to create Web3 social networks. Many of the blockchain operating system’s building blocks already exist, like NEAR Crowd, a gig economy platform, and NEAR Social. They aim to address the drawbacks of centralized platforms like Facebook, Instagram, Snapchat and TikTok, including little to no anonymity or privacy, few rewards for content creators, no community input and censorship concerns (source) - Epic Games announced updates this week to Unreal Engine 5.2, including MetaHuman technology and procedural generation tools that allow creators to design custom maps and experiences within the game (source) #creatoreconomy#March2023#trends

The Open Platform

@topco · Post #52 · 04.04.2023 г., 09:00

Wallets: March headlines - EU Lawmakers Vote in Favor of Payment Limits on Anonymous Crypto Wallets: Damien Carême, the French lawmaker who leads the parliament’s negotiations on the overhaul, earlier told reporters that the plans wouldn’t prevent crypto payments, because the cap of 1,000 euros won’t apply if a regulated wallet provider is involved or the identity of the payer is known (source) - Elizabeth Warren is back with an Anti-Money Laundering act that would is likely to drive wallet providers overseas and weaken consumer choice: the act prohibits the use of digital asset mixers and requires self-hosted wallets, along with miners and validators to have AML policies (source) - Crypto Wallet Prototype Discovered Inside Microsoft Edge Browser - the unreleased features suggest the tech giant is considering a deeper move into Web3 (source) - Coinbase is starting a “wallet as a service” business that will allow companies to customize blockchain wallets for their own customers - the service could be used by gaming apps where tokens or NFT are part of the game, or by companies that might want to incorporate a wallet into an app and make that “almost invisible to the end user,” Patrick McGregor, Coinbase’s head of product for Web3 developer platforms, said in an interview (source) #wallet#March2023#trends