ru
Feedback

Не попадитесь на канал ботавода! Telemetrio находит и помечает такие каналы 👉 Хотите видеть метку — оформите подписку

samdark blog ☕️ (Alexander Makarov)

samdark blog ☕️ (Alexander Makarov)

Открыть в Telegram

Notes taken by Alexander Makarov, lead of Yii framework, CTO of Twindo.ai and a long term IT engineering manager. - Official Yii updates: www.yiiframework.com - Consulting: asapirl.com

Больше
1 619
Подписчики
+224 часа
+47 дней
+630 дней
Архив постов
📊 TIOBE and PHP: die another day PHP is currently under new wave of strong "it will die" attitude. To my observation, it happens in cycles where "dying" attitude is altered with "it is alive!". Each cycle lasts 3-4 years in average and while PHP keeps living like that, other languages come and go. This year's TIOBE rating is there. PHP gained two positions and is at place 12 now getting close to Go which lost 3 positions. And that's not even beginning of "it is alive!" part of the cycle. Other notable changes are: 1) Rust swiftly climbing up to place 10 because of recent wave of LLM rewrites. 2) Legacy such as COBOL, Fortran, and Object Pascal regaining popularity. #php #tiobe

⏰ You likely don't need a PHP scheduler The topic was raised again for Yii3 about having a scheduler package. Schedulers are common: both Laravel and Symfony have one. But in most cases, you don't need it. Laravel runs schedule:run from cron every minute. schedule:work just replaces cron as the trigger. Either way, the framework boots 1440 times a day, mostly to find nothing to do. Symfony uses a worker that never stops instead, which is one more process to watch, restart after deploys, and keep from leaking memory. Way better, but still not really necessary. The main argument for these is "the schedule is in the repository". But a crontab file can be there as well, and cron tools already cover the features: - No overlap: flock -n. - Missed runs: anacron, or systemd timers with Persistent=true. - Monitoring: ping your monitoring service from the command. - Containers: supercronic. PHP-based schedulers also have a significant drawback: both run tasks one by one by default. You need runInBackground or a queue to fix that. Cron starts all the 8:00 jobs at 8:00. A scheduler makes sense for tasks that run more often than once a minute, schedules stored in a database, one-server execution with failover, or hosting without cron. Otherwise, just use cron. What do you think about PHP schedulers? #php #cron #laravel #symfony #devops #yii3 #yii

🔶 Стратоплан - Технический директор. Управление технологиями и людьми - №1 Давно хотел упорядочить мысли о профессии CTO и подтянуть навыки. И тут Стратоплан предложил пройти у них курс «Технический директор: управление технологиями и людьми» в обмен на то, что я честно опишу это всё здесь. Стратоплан учит управленцев давно. Это хорошее обучение от людей с большим управленческим опытом. Часть из них, если не всех, можно было встретить на различных конференциях и звучали они действительно круто. В 2024 я уже проходил у них два бесплатных курса: Teamlead:201 (2 дня) и CTO:201 (4 дня). Понравилось. Итого: обмен хороший, так что я согласился. Делюсь. 🔸Поступление Сначала заполнил анкету о себе и своих целях и решил кейс. Это было вступительное домашнее задание. 16 сентября было интервью, на нём коротко разобрали кейс. 19 сентября стартовал первый двухдневный блок. Предупреждали, что блоки интенсивные. Так и есть: каждый день с 10:00 примерно до 15:00. Если заниматься всерьёз, это напряжно, особенно после рабочей недели. Но оно того стоит: после занятий всё хорошо укладывается в голове. 🔸Формат Участников много. Кто-то уже CTO, кто-то хочет им стать. Периодически нас отправляют работать в группах: обсудить, решить кейс и принести результат на общее обсуждение. Группы собирают не случайно, и они остаются такими до конца курса. Собрали удачно: в нашей группе сразу сложилась хорошая атмосфера и конструктивное общение. 🔸Первый блок Вёл Илья Прахт. Многое пересекалось с CTO:201, так что часть была повтором и мне лично было немножко скучновато. 🔹День первый — роль CTO Что делать, когда приходишь в компанию. Как понять, какой CTO ей нужен. Как составить план и презентовать его руководителю. Практика: быстро найти проблемы без глубокого аудита. Обычно по описанию и короткому взгляду внутрь уже понятно, с чего начинать. Универсальных CTO, которые умеют всё, не бывает. Бизнес подбирает того, кто закроет часть задач сам, а остальное — наймом или людьми изнутри. Стейкхолдеры: кто чего хочет и как между ними балансировать, делая свою работу и принося пользу компании. Немного затронули корпоративную культуру и управление ожиданиями. Подходы системные. Это понравилось. 🔹День второй — стратегия - Что это такое и как её составлять. - Чем хорошая стратегия отличается от плохой. - Как строить стратегию, когда много неизвестных. - Как спускать стратегию сверху вниз, чтобы её выполняли. - KPI и OKR. KPI — для текущего процесса, который повторяется постоянно. OKR — для разовых изменений, когда нужно сделать что-то новое. 🔸Что почитать 1. Will Larson — An Elegant Puzzle: Systems of Engineering Management 2. Ричард Румельт — «Хорошая стратегия, плохая стратегия» 3. Eben Hewitt — Technology Strategy Patterns #cto #стратоплан

⚖️ Cost of failure The cost of failure is very different in different projects. Many things we do is where failure is cheap: non-life-important but cool hobby projects, admin panels where the process is slow and you can fix quickly, throwaway projects. But some things we do are where the cost of failure is very high. An error in production may cost a lot of money or even human lives. Be honest, what is the type of project you are working on right now? What is the cost of failure? #ai #techdebt #money

🚀 Benchmarking YiiPress vs Hugo I love Hugo, ran a blog on it for some time and it was what inspired me to create YiiPress.
🚀 Benchmarking YiiPress vs Hugo I love Hugo, ran a blog on it for some time and it was what inspired me to create YiiPress. Mainly because I wanted "templates in PHP" but also because the challenging "can I make it faster in PHP". Finally benchmarked it properly. The answer is "yes, it is faster". Will talk about YiiPress internals tomorrow at Пыхник'26. #yii #yiipress #hugo #php

Компилируемый PHP: перспективы и возможности 👤 Дмитрий Dantes Первый доклад Пыхник’26 — открытый! Смотрим все вместе на 📹 Y
Компилируемый PHP: перспективы и возможности 👤 Дмитрий Dantes Первый доклад Пыхник’26 — открытый! Смотрим все вместе на 📹 YouTube и 📹 VK Видео (запись будет).

💡 Feedback loop on quality gate LLM outputs can be wrong both randomly and consistently. Quality gates matter. If you retry on a gate failure, pass the failed output and the specific reason it failed into the retry prompt. Cap the retries and have a fallback for when they run out. #llm #ai #patterns

Fear is the mind-killer “I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.” ― Frank Herbert, Dune

On quantum computing and IonQ Error Decoder In my university we were told many times that the day will come and we'll use quantum computers. That was ~20 years ago. IonQ announced "Industry’s First End-to-End Real-Time Quantum Error Decoder". What does that really mean? Decoder is part of quantum computer that figures out where errors most likely happened so these could be corrected. Without correction the computer can't function reliably for long enough for real work. Qubits making errors constantly is normal. The issue there is physics: reading qubit destroys its state so we can't look for errors directly. That's why there are extra "helper" qubits linked with original data ones which are answering "are data qubits 1 & 2 still match" repeatedly (parity check). Reading helper states produces a stream of "syndromes" (yes/no answers). Rate of the stream is several millions of answers per second. That's the input of the decoder. Output is exact a set of most likely places for the errors that explains "syndromes". Now back to what IonQ announced. 1. Realtime decoders are not new. Google did it in 2024 (Willow chip). 2. Running a simulated correction for 408 logical qubits on a single M4 Max CPU is truly new. Data rate is about 1 megabit per second, but workload is quite complicated. 3. It depends heavily on IonQ's architecture and is hardly transferable to other platforms such as superconducting ones. 4. One reason less to doubt quantum computing overall. What's left for useful quantum computer now is hardware with 12K physical qubits w/ same architecture and accuracy that runs stable for 30 minutes and more. They have 100 qubits today. Optimistic goal is to reach 10K by 2028 but I think that it likely won't be the case. Also, a proof that it's useful. Real problems where quantum beats CPU/GPU haven't been demonstrated yet. If these are achieved, some specialized tasks would be possible and achievements would worth the price. These are exponential problems: chemistry, materials, magnets. What we won't get yet: 1. Breaking classical encryption. 2. Proven gains in finance, logistics, AI. 3. Faster general purpose PC. So, 20 years later the useful quantum computers aren't there. But overall it advanced and problems are now mostly engineering, not physics. We likely still won't "use" quantum computers directly, but we may use materials and drugs designed with them. #quantumcomputing

⏩ Re-benchmarked different ways to serve PHP Some time ago I've made some benchmarks to find out which server / mode is best
⏩ Re-benchmarked different ways to serve PHP Some time ago I've made some benchmarks to find out which server / mode is best to run Yii3 apps (applies to PHP in general as well). It is comparing FrankenPHP, RoadRunner, Rapira, PHP-FPM, FreeUnit. Recently I've got back to these and rewrote benchmark to use wrkx which is way more efficient than k6 I've used initially improving things along the way and fixing config issues. ⭐️ Highlights 1. Rapira is impressive. If not constrained with DB access, it can reach 100K RPS on a single server without erroring. Twice more than FrankenPHP. 2. When DB is used, the difference between Rapira, FrankenPHP and RoadRunner is not huge. DB access limits RPS cap. 3. Worker mode is significantly more performant than classic mode. Almost 10x difference without DB, 2x difference with DB. 4. Hard to get past 8K RPS in classic mode even with great hardware. Worker mode is that way to build new apps. 5. There are some good features in each of the servers so performance alone can't be the only factor when choosing a server. 🔸Full report: https://yii3-benchmarks.github.io/app-api/ 🔸Source: https://github.com/Yii3-Benchmarks/app-api #php #frankenphp #rapira #roadrunner #yii #yii3 #benchmark #performance

Пыхник’26 — целая неделя PHP! С 28 сентября по 2 октября пройдёт Пыхник’26 — онлайн-конференция для PHP-разработчиков. В прог
Пыхник’26 — целая неделя PHP! С 28 сентября по 2 октября пройдёт Пыхник’26 — онлайн-конференция для PHP-разработчиков. В программе 10 докладов о современной PHP-разработке: AI, архитектура, асинхронность, компиляция и тестирование. Доклады распределены на всю неделю — не нужно выпадать из работы на целый день! До конференции проводим еженедельные встречи «У костра» — обсуждаем PHP, AI и будущее разработки. Темы предлагают и выбирают сами участники. • 28 сентября — 2 октября • Прямой эфир + записи • 5 дней по 2 доклада: утром и вечером • Билет — 3 000 ₽ Скидка 15% по промокоду SAMDARK-26! 👉 Программа и билеты

My name is Taras Soroka. I’m a CTO, digital transformation consultant, mentor, and the host of the channel Сорока пишет | Об ИТ и менеджменте. I've been mentoring for many years now, and I can confidently state: the topic that keeps my mentees – mid-level managers in our beloved tech scene – up at night is people management. It's a broad topic, but the questions my mentees ask most often are always the same: – what principles to follow when building a team; – whether to bring your battle-tested crew from previous jobs with you to a new gig; – what to fire people for, and how to do it painlessly; – how to give feedback properly so you don't offend them but still get the point across… And so on. There’s a whole legion of these questions, and I answer them confidently and without a second thought – how else could I, when I’ve answered each one at least twenty times already? But this week, I got asked an unconventional one:
who is someone you would absolutely never put in a management role?
I'll be honest: the question caught me off guard, and I asked for some time to think it over until our next session. I thought about it, formulated my answer, and before sharing my thoughts with my mentee, I'm sharing them with the subscribers of the samdark blog. If you've ever renovated your apartment, you've definitely run into this type of contractor:
– We'll knock this out for you right now. It'll be dirt cheap! – Sorry, but that's not exactly what I need. – Yeah, but you don't get it, it's really cheap! We'll use particleboard from Home Depot here, nails from the dump there, we'll patch it up with some glue – I actually have some left over from my last client, it doesn't hold well but it's free, we'll slap some shit on here, shove a couple of sticks in there… – But it's just gonna turn out like shit in the end. Can't you just do a proper job? – Do you have any idea how much a proper job costs? Nah, nah, nah, what's wrong with you, everyone does it this way. Yeah, it's shit, but it's literally peanuts – stop busting my balls, just agree. – I want it done right, I have the money – no need to do a trash job, no need to cut corners – just do it well. You could do it like this, or like this, or even like this… – You're a weird dude, man. We're offering you cheap, and you want it good. It's impossible to work with someone like you, so go fuck yourself.
Sound familiar? In the corporate world, it looks exactly the same. If you hand a project over to a manager with a similar mindset, they'll pretty quickly come back to you with a completely inadequate solution and an explanation of why they chose that specific option:
❗️ doing it right is more expensive than doing it wrong, so our baseline plan is to do it wrong. Yeah, it doesn't solve our clients' problems – but it's dirt cheap. ❗️ No, nobody handed down any budget constraints to us. We just want to make it as cheap as humanly possible. ❗️ Yes, we'll go to the project sponsor and show them an option that a priori doesn't meet their needs, but hey, it's for peanuts. Yes, we're sure they'll agree to it – because they couldn't possibly choose an option that's better but more expensive, right?
This approach makes my blood boil – I've been unable for years to figure out where these managers get this mental block against doing it right, and why minimizing costs becomes the only meaningful criterion out of a whole variety of options. But maybe no explanation is needed here. What's needed is the realization that people with this mindset aren't going to change. They might be great individual contributors, but under no circumstances should they be put in management roles – these are Anti Midas types. Any initiative you put them in charge of will turn into absolute shit. And you'll end up spending a ton of money, time, nerves, and other employees' energy cleaning up the shitshow left behind by these Anti Midases. So it's better not to. Keep these employees in rank-and-file roles, and if you suddenly find yourself with a manager who has this mindset – kick them out on their ass before they cause any real damage.

💬 Bjarne Stroustrup on AI
Code will still be written by humans, and they will rely on abstraction. The examples I've seen of efforts for AI to generate code have not been successful. They produce more bugs, more security flaws, they have laden code and it's hard to validate. And the senior developers that would be needed to validate it. I've seen some of them beginning to retire because they don't want to deal with the validation of something that changes every time you make a change in your approach. It's not good at safety critical, performance critical code. Now, let's say that 70 or 80% of the world's code doesn't fit that pattern, but it's that 10, 20% of the code that I'm interested in. Also, even Dijkstra claimed that the idea of having natural languages being the programming language was idiotic.
From this interview: https://www.youtube.com/watch?v=U46fJ2bJ-co #ai #llm

🌬 TION MagicAir CO² sensor calibration via USB HID I have a Tion breather and a MagicAir station that measures CO² and adjus
🌬 TION MagicAir CO² sensor calibration via USB HID I have a Tion breather and a MagicAir station that measures CO² and adjusts breather performance automatically. Recently it started to go all-speed always. I've checked CO² reading and they were about 1000 ppi more than a real value (I have another standalone sensor to compare). After some communication with support I've learned that I can precisely re-calibrate it via USB HID. Put the ready to use script at GitHub. https://github.com/samdark/tion-magicair #tion #usb #hid #magicair

🧰 Running Gitea container on older kernels I'm running Gitea at my Synology NAS which has dated Linux kernel not compatible with modern git. Using latest Gitea image directly results in:
error: unable to get random bytes for temporary file: Function not implemented
Luckily, that's easy to fix by getting older image and copying a new binary there. Could be done right in compose config (I'm using Portainer there):
networks:
  gitea: 
    external: false
  
services:
  server:
    build:
      dockerfile_inline: |
         FROM gitea/gitea:1.25.5 AS old
         FROM gitea/gitea:latest
         COPY --from=old /usr/bin/git /usr/bin/git
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    networks:
      - gitea  
    volumes: 
      - /volume1/docker/gitea:/data
    ports:
      - "3000:3000"
      - "6022:22"
#nas #synology #git #gitea

🗓 Стачка PHP 2026 Уже несколько месяцев занимаюсь секцией PHP для Стачки. Смотрим заявки, общаемся со спикерами и выбираем д
🗓 Стачка PHP 2026 Уже несколько месяцев занимаюсь секцией PHP для Стачки. Смотрим заявки, общаемся со спикерами и выбираем доклады, которые хочется услышать самому. В этот раз собрали темы про реальные инженерные задачи: - Илья Глазунов, ЖилиБыли — ИИ в travel-tech но не ради хайпа - Дмитрий Бухонов, Flowwow — Археология данных: миграция S3-хранилища без потери файлов - Ярослав Черкашин — Комбинаторный взрыв: как держать сложность кода под контролем. - Ольга Глеклер, Make WordPress — WordPress 7 в большой системе: AI, агенты и федеративная архитектура на примере внедрения LMS - Иван Русин, Flowwow — Перенос сложных компонентов: когда модульное тестирование бессильно Где и когда? 3–4 октября в Санкт-Петербурге. На Стачке будет около 200 докладов в десятках секций и специалисты из Сбера, Яндекса, Авито, VK, Ozon, Magnit Tech, ПСБ и других компаний. Так что даже если PHP не единственное, что вас интересует, можно найти много полезного по соседним направлениям. Промокод для своих — PHP. Программа и билеты на сайте.

⭐️ PHP Digest #1 Some interesting reads about PHP. 1. When Generators Actually Makes Sense — when to use yield. 2. Proper logging in PHP with PSR-3 — how to properly use PSR-3 loggers without losing context. 3. Exploring Coroutines in PHP — again, yield but also fibers. 4. New in PHP Intl 8.5: IntlListFormatter – display arrays as locale-aware lists — cool formatting trick with intl. 5. Stateless services in PHP — good practice to keep in mind considering many alternative worker-based runtimes popping up for PHP last years. 6. PHP Ecosystem Deep Dive: The Code Quality Landscape — interesting findings about PHP ecosystem. 7. PHP tips and tricks — quick one-liners, unexpected behaviors, hidden features and strange things that are concealed in the dark corners of PHP. #digest #php

Пыхник’26. План «Б» Итак, мы продолжаем делать Пыхник, но теперь полностью онлайн! 📆 Сдвинули даты на пару недель вперёд. Ко
Пыхник’26. План «Б» Итак, мы продолжаем делать Пыхник, но теперь полностью онлайн! 📆 Сдвинули даты на пару недель вперёд. Конференция пройдёт на последней неделе месяца — с 28 сентября по 2 октября. 🎤 Все 10 спикеров и программа остаются: доклады про AI, архитектуру, async, рантаймы и тестирование. 🌐 Запустили сайт, где можно приобрести билет любой картой или подать заявку от компании. После оплаты вы получите приглашение в группу участников. 🏷 До конца недели онлайн-билет стоит 2000₽. Затем цена вырастет. 💪 Участникам краудфандинга отправили промокоды на билеты со скидкой. Ищите письмо на адресе, указанном при регистрации на «Планете». https://pyhnik.phpyh.ru/

🔶 Буду на СЕКОН'26 11-12 сентября в Пензе будет конференция СЕКОН. Буду там и расскажу про свой опыт использования LLM-ок как в коммерческой разработке, так и для OpenSource и личных проектов. https://2026.secon.ru/speakers/speaker-2mbvof #events #secon

⌨️ WezTerm → Ghostty Followed Sergey Predvoditelev and tried Ghostty instead of WezTerm for a few days. 🔸Some things I use daily were better: 1. Window decoration feels native by default. 2. Can drag and drop tabs with mouse. 3. Can rename tabs with mouse. 4. Mouse context menu to split windows (not using it much anyway, covered by tmux) 5. Scrollbar. 🔸Some things are about the same: 1. Performance. 2. Color themes. 🔸Had to configure a few things:
theme = Apple System Colors
font-size = 11
copy-on-select = clipboard
app-notifications = no-clipboard-copy
Copy when selecting and do it silently, font size and color theme I like. 🔸Missing 1. Windows support. 2. Utilities such as imgcat. 3. Advanced multiplexing with workspaces, remote support etc. (I've used tmux and ssh anyway). 4. Lua scripting in configs (haven't used it much). I had to replace wezterm imgcat that I use to view images via `mc`. Ghostty doesn't ship with a viewer so:
sudo apt install timg
timg my_image.jpg
It is actually faster than WezTerm's so a good replacement. A clear drawback is quite bad documentation. Ghostty has more features than explicitly documented. For example, command palette that is available via ctrl + shift + p could be found only by exploring current hotkeys. But that's not a deal breaker. Overall, a good terminal to keep. #linux #wezterm #ghostty #terminal