Допустим, вы разработчик, и вам от пользователя приходит строка user-agent с описанием того, каким браузером он пользуется.
В этой строке будет что-то типа такого:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
И вы хотите из неё узнать мажорную версию Chrome, то есть вытащить число 51. Что вы сделаете? Можно, конечно, написать свой парсер, но я уверен, многие воспользуются регулярными выражениями. Я бы воспользовался. Какое выражение сюда подходит? С виду кажется, что вот такое:
/Chrome\/(\d\d)\./g
Мы ищем слово Chrome и слэш, затем ловим в группу две цифры, после которых стоит точка. Так?
По крайней мере, мышление достаточного количества разработчиков именно таково. Зачастую программистам не хватает умения отойти от техзадания на уровень вещественной сути того, с чем они работают. На самом деле число 51 это версия. Версия будет увеличиваться со временем. «Марти, где твоё четырёхмерное воображение?» Если уже прошло 50 версий, то и следующие 50 не за горами, число станет трёхзначным, регулярка или парсер, сделанные под двухзначные числа, перестанут работать.
Трехзначная версия Chrome и Firefox приближается уже сейчас. И да, в них падает куча функций на сайтах, включая крупные корпорации: Yahoo, Bethesda, HBO и бог знает сколько сайтов поменьше. Чисто из-за цифры. Это уже назвали «Проблема сотой версии» по аналогии с «Проблемой 2000 года» (программисты записывали год двумя цифрами, 2000 стал неотличим от 1900).
К чему это я? Полезно задумываться о физическом воплощении того, что вы представляете в своей программе. Ваш код должен описывать не столько требования заказчика, сколько законы, по которым существует этот объект в реальном мире.
#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