Почему я люблю языки с сильной системой типов, проверяемой статическим анализом кода — хорошо написанная программа является своей собственной спецификацией и позволяет выражать через язык программирования законы существования предметной области.
Когда-то давно я писал на ActionScript. Там была система типов, но вот десериализация JSON'ов по-умолчанию была в какой-то общий Object, к полям которого нужно было обращаться ["по_строковому_имени"]. В один момент мне потребовалось написать что-то на C#, который я совсем не знал, я стал гуглить, как десериализовать JSON, и с удивлением обнаружил кучу советов заранее объявить класс со всеми нужными полями и десериализовать в него.
"Какой ужас!", — подумал я тогда, — "Это же дико неудобно! А если я не знаю полей JSON? А если их много? Отвратительный язык!"
Теперь то я прекрасно понимаю, что JSON это контракт, и что правильная десериализация только такая и должна быть, и что в хорошем API в одном поле никогда не бывает данных принципиально разных типов, и так далее.
Нет, если вы набиваете вечерами пет-проект или сидите бессонную ночь на хакатоне, нет ничего плохого в том, чтобы взять простой язык с динамическими типами вроде JavaScript или Python, не требующий описывать данные. Но вот в энтерпрайзе, особенно когда над одним проектом работает много людей (а бывает это очень часто) — хорошее использование системы типов убережёт разработчиков от огромного количества ошибок, будет бить их по рукам, когда они пытаются сделать что-то не то, и будет подсказывать, когда они не уверены в чём-то.
С помощью статической типизации можно на уровне кода обозначить правила, по которым ведёт себя предметная область вашей программы в реальном мире. Разработчику не только будет сложно их нарушить, но он ещё и станет узнавать какие-то вещи, которые мог не знать раньше.
Например, если мы делаем медицинскую CRM, и больница заводит новых пациентов только тогда, когда знает их группу крови, мы можем объявить тип "Пациент" (или, если точнее, "Карта пациента") и запретить создавать экземпляры этого типа, не передав в конструктор группу крови (которая, в свою очередь, тоже является типом, вероятнее всего ValueObject'ом). Если новый программист пришёл в проект, он, во-первых, не сможет записать в БД некорректную карту пациента. Понятно, мы не учитываем случаи, когда новый программист переделывает модели предметной области — это будет хорошо видно на кодревью. А, во-вторых, даже если ему никто не сказал, что пациенты должны быть с группой крови, он узнает это из кода. И уже будет понимать, что в тех процессах реальной жизни, которые он описывает кодом, карта пациента создаётся только при наличии группы крови. А, значит, нужно искать какой-то способ сначала эту группу крови получить, и только потом создавать карту. Программирование моделирует реальный процесс.
В настоящей работе даже на языках с типами, конечно, без должного контроля можно написать что угодно. Нужна управленческая воля, компетентность руководства, понимание опасности техдолга, в идеале отдельные должности для архитекторов, опытные лиды и старшие разработчики. Но когда всё это есть, можно отсекать много проблем ещё на старте и проще погружать новичков.
#dev
Решила продать старые ненужные вещи на Авито?
🟢
Но ты не любишь переодеваться, долго фоткать вещи. Вместо этого можно все сделать через нейросеть:
1. Просто фотографируешь вещь прямо на полу, висящими на вешалке и тд.
2. Заходишь в Nano Banana Pro
3. Загружаешь фото своей вещи и вводишь промпт, чтобы получить фото на белом фоне. Делаешь, пока не понравится результат.
Создай каталожное предметное фото [название вещи, лучше подробно описать]
Расположена строго по центру кадра, симметрично, в нейтральном положении.
Фон: чистый белый (#FFFFFF), полностью однородный, без градиентов и текстур.
Свет: ровный студийный, soft light, без жёстких теней и без художественного контраста
4. Дальше заходишь в ChatGPT или Gemini и просишь написать по шаблону промпт для фотосессии этой вещи.
📍Шаблон в первом комментарии!
5. Возвращаешься в Nano Banana Pro. Загружаешь фото по порядку:
- фото товара на белом фоне
- лицо модели
Дальше вводишь промпт и нажимаешь generate
6. Получаешь коллаж и пишешь:
Пришли только фото [номер фото] из [верхнего /
среднего / нижнего] ряда без искажений. Ничего не меняй.
В итоге качественная фотосессия для продажи любой залежавшийся вещи. Обязательно сохрани чтобы не потерять!
➡️AI Вентура | YouTube | MAX
в мире дизайна чистый белый — не всегда лучший выбор. он может казаться слишком ярким и утомлять глаза, особенно если дело касается сайтов или дизайна в социальных сетях.
рассказываем, какие мягкие альтернативы #FFFFFF выбираем сами.
1. Ultra close up editorial photograph of an extremely old, thin, pigmented female hand with short natural nails holding a bitten red velvet cupcake, red crumbs and white cream smeared on fingertips, wearing a hammered sterling silver cuff bracelet with an organic sculptural shape and a raw amethyst stone ring in an oxidized silver claw setting, subtle motion blur, every wrinkle and sun spot in sharp detail, 4:5 ratio, isolated on a crisp white background, hex #ffffff
2. Macro editorial shot of a very aged, bony, freckled female hand with short bare nails gripping a half eaten red cupcake, buttercream frosting smudged between fingers, wearing a chunky hand forged silver bangle with a heart scroll design and a large rough cut garnet ring in a blackened silver bezel, slight motion blur, extreme skin texture, 4:5 ratio, isolated on a crisp white background, hex #ffffff
3. Hyper detailed editorial close up of an elderly woman's thin spotted hand with short unpainted nails squeezing a bitten red cupcake, white frosting pressed into her creases, wearing an artisan sterling silver wrap cuff with a twisted vine motif and an oxidized silver ring holding a raw tourmaline crystal, gentle motion blur, veins and tendons fully visible, 4:5 ratio, isolated on a crisp white background, hex #ffffff
4. Extreme editorial macro of a very old, slim, sun damaged female hand with short natural nails cradling a red cupcake with a large bite taken out, cream frosting on her index finger and thumb, wearing a wide hammered silver cuff with an uneven organic edge and a rough cut moonstone ring in a hand wrought silver prong setting, soft motion blur, skin texture at maximum detail, 4:5 ratio, isolated on a crisp white background, hex #ffffff
5. Editorial close up photograph of an aged, fragile, pigmented female hand with short bare nails pinching a bitten red cupcake, white icing smeared across her knuckle, wearing a heavy oxidized silver chain link bracelet with an artisan toggle clasp and a large raw labradorite stone ring in a hammered silver setting, slight blur of movement, every age spot captured, 4:5 ratio, isolated on a crisp white background, hex #ffffff
6. Ultra realistic editorial macro of a very elderly woman's bony freckled hand with short natural nails holding a messy bitten red velvet cupcake, swirl of cream frosting on her ring finger, wearing stacked thin hand forged silver bangles with irregular textures and a blackened silver signet ring with a rough ruby cabochon, gentle motion blur, full skin texture, 4:5 ratio, isolated on a crisp white background, hex #ffffff
7. Detailed editorial close up of an extremely old, thin spotted female hand with short unpainted nails gently holding a red cupcake with two bites missing, white frosting smudged on her fingertips, wearing a sculptural sterling silver cuff shaped like an abstract leaf and an oxidized silver ring with a raw citrine crystal in a claw mount, soft movement blur, wrinkles and veins in full detail, 4:5 ratio, isolated on a crisp white background, hex #ffffff
8. Hyper close editorial photograph of an aged woman's skinny pigmented hand with short bare nails gripping a crumbling bitten red cupcake, cream icing pressed into her finger creases, wearing a heavy hand hammered silver torque bracelet and a chunky artisan silver ring with a rough aquamarine stone in an open bezel, subtle motion blur, maximum skin texture showing, 4:5 ratio, isolated on a crisp white background, hex #ffffff
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My peace keeper" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Brain quiet, heart full" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My dopamine" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You feel like a nap" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "The antidote" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Chaos canceller" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My stabilizer" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "High value human" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Zero cortisol" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My soft era" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Safe to land" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You make life soft" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My nervous system loves you" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You quiet the noise" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My calm in the chaos" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You recharge me" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "10/10 recommend" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "Walking green flag" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "You lower my stress" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
A macro editorial photograph of a miniature, luxurious dark red plush fur envelope floating in mid-air. A thick, textured cream cotton card slides out, featuring the message "My human charger" in clean, modern Helvetica Light typography. The tactile quality of the soft, deep-pile fur is palpable, with individual fibers and a rich sheen visible under professional studio lighting. The envelope casts a soft, realistic shadow on a pristine, crisp white #ffffff background. Maximum detail, minimalist luxury.
Сегодня давайте поговорим про тонировку изображения. Хочется сказать этому обэме, что на кадр нужно смотреть цельно. Учитывать заранее, что в финальной версии поверх шота будет накладываться графика. Если вы не любитель каши в композиции, белый в кадре может быть #FFFFFF только в графике, размещенной поверх кадра. Без фанатизма! Баланс между картинкой и графикой всегда настраивается индивидуально. Как понять, что ок? В любой непонятной ситуации смотрите хорошие рефы и все получится.
Behancega bir keysni taqdimotini tayyorlayapman, #ffffff rangli matn, #E5E5E5 rangda qolib ketgan ekan, o'zgartirib, qaytadan saqlab, yana yuklab qo'ydim. Baribir, uncha muncha kishi e'tibor qilmas edi, taqdimotni ham sifatli ishlash, kerak, taqdimot bu keysni ustki kiymidek gap. Ustingiz chang sozi yuravermaysizku, dizaynerlar, yana ham bilmadim 🤷♂️
🆕 Иногда цвет хочется написать словом вместо выбора через меню, например, red, blue, yellow... И это теперь возможно! Любое стандартное значение цвета из CSS можно написать в поле ввода цвета. Даже такое как “MistyRose”! Они автоматически преобразуются в шестнадцатеричный код цвета. Все цвета можно найти в таблице: https://htmlcolorcodes.com/color-names/#новое
К слову, а ты уже знаешь, что можно не писать весь HEX код цвета, если буквы и цифры в нём повторяются? Например, написав F ты получишь белый #FFFFFF, а 0 — чёрный #000000. Пара символов также будет повторяться: 5A станет #5A5A5A. А вот тройка символов скопирует каждый на отдельные составляющие цвета: “f9a” превратится в #FF99AA. #обучение