Попробовали на работе предметно-ориентированное проектирование (Domain Driven Design). Это такой способ построения архитектуры, когда ты (чаще всего с помощью системы типов и ООП) описываешь физическую суть вещей, которые представлены в твоей программе.
Например, если в программе есть объект "Книга", то её нужно снабдить свойствами, которые бывают у книг в реальности: число страниц, автор, язык, тип обложки и т.д. При этом данные свойства должны быть такими, чтобы присвоить им нереалистичные значения было нельзя. Допустим, число страниц не может быть отрицательным (и скорее всего в реальном мире не может быть нулём). При попытке установить отрицательное число страниц программа должна выбросить исключение. А совсем в идеальном случае -- не дать этого сделать программисту на уровне статического анализа кода.
Описав все свойства книги, вы снабжаете её операциями, которые над ней можно сделать. Например, из книги можно вырвать страницу, и при этом число страниц уменьшается. Нет такого случая, когда можно вырвать страницу без изменения числа страниц. Вы строго программируете эту зависимость, делаете у книги метод "Вырвать страницу", а он уже уменьшает число. Кстати, свойство "Число страниц" при этом нельзя переназначить в уже созданной книге. Можно только создать книгу, передав в её конструктор (так называется в программировании функция создания объектов) заданное число страниц. Но поменять число страниц можно только специальными методами "Вырвать страницу" и "Вклеить страницу".
С помощью этого подхода вы гарантируете, что ваши объекты всегда находятся в валидном состоянии -- то есть таком, которое возможно в реальной жизни с объектом, представленным программой.
Плюсы подхода очевидны: меньше число ошибок. Код описывает сам себя, и программист, если не лезет внутрь объекта "Книга", вообще не сможет сделать с книгой ничего недопустимого.
Минусы, думаю, тоже понятны: изначально проектировать сложнее, нужно учесть много нюансов, писать тесты. Время разработки изрядно растёт. Изменение требований даётся дороже: например, если каким-то образом в ваш книжный магазин поступят книги со страницами из кевлара, которые невозможно вырвать :)
Но первый проект с этим подходом мы сдали хорошо, без багов. Лучше, чем многие предыдущие.
#dev
A vibrant, whimsical acrylic painting of a cheerful peacock mid-jump, executed in a "naive art" or "folk art" style. The peacock has a simplified, rounded pink face with a small smile and long, thin black whiskers. Its body is elongated and segmented with bold turquoise and bright pink horizontal stripes. The background is a textured, painterly mix of saturated orange, sunny yellow, and soft violet with visible brushstrokes and "grungy" distressed edges. Incorporate large, decorative circular "eye" patterns on the peacock's body or in the air around it, featuring concentric rings of teal, red, and white dots. Use a bold color palette of hot pink, cyan, orange, and yellow, with thin, sketchy black ink outlines and whimsical white dotted accents throughout the composition. Make it a vertical one with an aspect ratio of 9:16
#made by @ai_artz _4o
@ai_artz🦚
A vibrant digital painting in anime style, vertical 9:16 aspect ratio. A black cat is sitting on a metal balcony rail in an urban environment, seen from behind, gazing up at a giant Saturn-like planet in the sky. The planet is partially covered by clouds and fades naturally into the swirling sunset sky. The sky transitions from warm golden and orange tones near the horizon to deep purples and blues above. The city below is bathed in warm sunlight, with rooftops, distant buildings, and subtle power lines adding depth. The overall mood is serene and dreamlike, evoking quiet wonder.
#made by @ai_artz _4o iG
@ai_artz🎨
A mesmerizing nocturne painting capturing a city at midnight, reminiscent of the style of Mariusz Lewandowski. The city streets are cloaked in darkness, with only dim lights illuminating the cobblestone pathways. A lonely streetlamp casts a warm, golden glow, while the buildings in the background loom ominously in the shadows. A few silhouettes of trees and billowing curtains add depth to the scene, while the silence is palpable. The oil painting exudes a sense of serenity and solitude, with rich, textured brushstrokes that bring the city to life.
#made by @ai_artz _Ideogram v1.0
@ai_artz🎨
Sorry guys, the AI forgot the chair 😄
A photo of a man painting a pink flower on a canvas amidst the ruins of a dilapidated structure. The background is filled with debris and the structure's remains. The man is wearing work attire and is focused on his painting. The overall image has a desolate atmosphere, but the act of painting a flower brings a sense of hope and resilience. --v 6.1 --ar 9:16
#made by @ai_artz _Midjourney v6.1
@ai_artz🍀
A photograph of a city street during a sunset. The sky is a deep pink color, and the buildings are contrasted against it. There are a few cars on the street, and the street lights are on. The image has a warm feeling to it.
#made by @ai_artz _Ideogram v1.0
@ai_artz🌆
A woman holding a fire that is in a shape of heart on a beach. The sun almost went down and we can barely see the woman.
#made by @ai_artz _Ideogram v1.0
@ai_artz❤️🔥
Full-body portrait of a man in a futuristic, cyberpunk city at night, wearing a dark, hooded jacket with glowing, red eyes and a high-tech mask. The jacket is detailed with intricate patterns and subtle wear, giving a gritty, dystopian feel. The background features a cityscape with tall buildings, neon lights, and glowing advertisements, evoking a high-tech, immersive atmosphere. The man has a menacing presence, with the neon lights reflecting off his gear and a sense of mystery surrounding him --v 6 --ar 9:16 --s 50
#made by @ai_artz _Midjourney v6.0
@ai_artz🤖
An enchanting night sky with vibrant orange and purple clouds illuminated by a fading sunset. A vintage Volkswagen van parked on a dark, desolate road, with faint hints of a desert landscape in the background. The sky is filled with stars, creating a serene yet mysterious atmosphere. The colors blend seamlessly from the dark road to the colorful clouds, creating a captivating contrast. --v 6 --ar 9:16
#made by @ai_artz _Midjourney v6.0
@ai_artz🌿
A serene sunset scene with a vibrant pink and purple sky, viewed from a grassy hill. In the foreground, two people are lying down, only their legs visible, dressed casually in white sneakers and Converse shoes, and wearing light-colored pants. The foreground also features a garden bed with red and pink flowers. The middle ground includes a few people scattered across the grass, enjoying the view. In the background, a calm lake reflects the sunset, with distant silhouettes of hills and trees. The overall atmosphere is calm and romantic, with the soft lighting creating a warm and inviting vibe.
#made by @AI_artz _Midjourney v6.0
@ai_artz🌿
A charming traditional Japanese-style storefront at night, illuminated by warm glowing lanterns and cozy interior lights. The shop has wooden frames, a blue fabric awning with Japanese text, and a window showcasing various food items, bottles, and decorations. Lush greenery surrounds the entrance, with potted plants and vines. A cute panda statue sits on one side, adding a whimsical touch. The scene features intricate details, soft warm lighting, and a serene atmosphere. Highly detailed, cinematic composition, 2D anime style, vibrant and rich colors --ar 3:4 --v 6.1
#made by @ai_artz _Midjourney v6.1
@ai_artz🐼
An award winning photograph of a street photo of an old man sitting on a subway, wearing a casual cloth with buttons. He is looking slightly to the side. The lighting is soft, emphasizing the subject's natural features, and the background is slightly blurred, showing part of a subway interior. The image is framed with a Polaroid-style border, and subtle handwritten text "AI_artz" is written on the lower part of the frame. The overall mood of the scene feels calm and introspective, with a focus on the old man's expression and the quietness of the moment. Use natural colors and a real-life aesthetic. --ar 9:16 --v 6.1
#made by @ai_artz _Midjoireny v6.1
@ai_artz🔡
A dimly lit abstract oil painting of a cat and a dog sitting on a table. The table has a candle, a bowl of fruit, and a few other items. The cat and the dog have curious expressions. The background is a shadowy room with a few visible objects.
#made by @ai_artz _Ideogram 2
@ai_artz