TGViewer
Channel Public Channel
samdark blog ☕️ (Alexander Makarov)

samdark blog ☕️ (Alexander Makarov)

@samdark_blog

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
Subscribers
1.62K
Photos
183
Videos
4
Links
289
Recent Posts 19 shown
Post #421 470
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
  • 👍 5
  • 🔥 3
  • ❤ 1
  • 👀 1
Post #420 835
Пыхник’26 — целая неделя PHP!

С 28 сентября по 2 октября пройдёт Пыхник’26 — онлайн-конференция для PHP-разработчиков.

В программе 10 докладов о современной PHP-разработке: AI, архитектура, асинхронность, компиляция и тестирование.

Доклады распределены на всю неделю — не нужно выпадать из работы на целый день!

До конференции проводим еженедельные встречи «У костра» — обсуждаем PHP, AI и будущее разработки. Темы предлагают и выбирают сами участники.

• 28 сентября — 2 октября
• Прямой эфир + записи
• 5 дней по 2 доклада: утром и вечером
• Билет — 3 000 ₽

Скидка 15% по промокоду SAMDARK-26!

👉 Программа и билеты
  • 🔥 7
  • 👍 4
Post #419 757

Forwarded from Taras Soroka

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.
Telegram Сорока пишет | Об ИТ и менеджменте Тарас Сорока: управление ИТ и цифровой трансформацией – Ex CTO/CIO: телеком, финтех, ритейл – Бюджеты 5+ млрд ₽. Команды 600+ сотрудников – Стратегии. Процессы. Кейсы. Менторинг ИТ-менеджеров Консультация: @tnsoroka
  • 👍 4
Post #418 727
💬 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
YouTube Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup Bjarne Stroustrup is the creator of the C++ programming language and a former researcher at Bell Labs. We talked about what Bell Labs was like, programming language design, and interesting anecdotes from his experience. • My ergonomic keyboard project I…
  • 👍 7
  • 🔥 4
  • 🤔 4
  • 👏 2
  • ❤ 1
  • 😁 1
Post #417 733
🌬 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
  • 👍 9
Post #416 739
🧰 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
  • 👍 8
Post #415 1.07K
🗓 Стачка PHP 2026

Уже несколько месяцев занимаюсь секцией PHP для Стачки. Смотрим заявки, общаемся со спикерами и выбираем доклады, которые хочется услышать самому.

В этот раз собрали темы про реальные инженерные задачи:

- Илья Глазунов, ЖилиБыли — ИИ в travel-tech но не ради хайпа
- Дмитрий Бухонов, Flowwow — Археология данных: миграция S3-хранилища без потери файлов
- Ярослав Черкашин — Комбинаторный взрыв: как держать сложность кода под контролем.
- Ольга Глеклер, Make WordPress — WordPress 7 в большой системе: AI, агенты и федеративная архитектура на примере внедрения LMS
- Иван Русин, Flowwow — Перенос сложных компонентов: когда модульное тестирование бессильно

Где и когда?

3–4 октября в Санкт-Петербурге.

На Стачке будет около 200 докладов в десятках секций и специалисты из Сбера, Яндекса, Авито, VK, Ozon, Magnit Tech, ПСБ и других компаний. Так что даже если PHP не единственное, что вас интересует, можно найти много полезного по соседним направлениям.

Промокод для своих — PHP.
Программа и билеты на сайте.
  • 👍 10
  • 🙏 2
Post #414 1.02K
⭐️ 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
Exakat Quand les generateurs ont vraiment du sens
  • 👍 17
Post #413 793

Forwarded from Пыхник’26 онлайн | 28 сентября – 2 октября

Пыхник’26. План «Б»

Итак, мы продолжаем делать Пыхник, но теперь полностью онлайн!

📆 Сдвинули даты на пару недель вперёд. Конференция пройдёт на последней неделе месяца — с 28 сентября по 2 октября.

🎤 Все 10 спикеров и программа остаются: доклады про AI, архитектуру, async, рантаймы и тестирование.

🌐 Запустили сайт, где можно приобрести билет любой картой или подать заявку от компании. После оплаты вы получите приглашение в группу участников.

🏷 До конца недели онлайн-билет стоит 2000₽. Затем цена вырастет.

💪 Участникам краудфандинга отправили промокоды на билеты со скидкой. Ищите письмо на адресе, указанном при регистрации на «Планете».

https://pyhnik.phpyh.ru/
  • 👍 9
  • 🔥 3
  • ❤ 2
  • 😁 1
  • 💊 1
Post #412 878
🔶 Буду на СЕКОН'26

11-12 сентября в Пензе будет конференция СЕКОН. Буду там и расскажу про свой опыт использования LLM-ок как в коммерческой разработке, так и для OpenSource и личных проектов.

https://2026.secon.ru/speakers/speaker-2mbvof

#events #secon
2026.secon.ru SECON 2026 XIV международная конференция разработчиков ПО
  • 👍 7
  • 🔥 3
Post #411 847
⌨️ 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
Telegram Сергей Предводителев 🌿 Про Ghostty Весной я переехал со стандартного GNOME Terminal на WezTerm. И всё меня устраивало, пока я не начал использовать агент Pi. Не знаю по каким причинам, но на ноутбуке после работы с Pi в WezTerm (особенно после длительных сессий) выход из терминала…
  • 👍 6
  • ❤ 1
Post #410 1.05K

Forwarded from Angie

Всем здравствуйте!

В разделе Deploy документации PHP-фреймворка Yii было две статьи про удобный деплой в Docker Swarm с использованием образов с Caddy и Traefik для автоматической настройки проксирования и получения сертификатов для HTTPS.

Но ведь мы знаем, что всем нужно немножко Angie. Поэтому мы разработали похожий сценарий для проектов на Docker Compose и собрали Docker-образ с Angie Docker Proxy. Он автоматически обнаруживает контейнеры по переменным VIRTUAL_HOST и VIRTUAL_PORT, генерирует конфигурацию Angie и получает TLS-сертификаты через ACME/Let's Encrypt.

Такой подход может быть удобен для тех, кто размещает несколько приложений на одном сервере. Чтобы подключить новое приложение, достаточно указать домен и внутренний порт контейнера.

Статья о настройке всего этого размещена в документации Yii.

Пробуйте и ждём ваших отзывов!
  • 👍 17
  • 🔥 5
  • 👎 1
  • 😁 1
Post #409 1.2K
🤔 AI/LLM is not "new compiler"

I'm stumbling upon "AI is the new compiler, so there's no need to review generated code" too much recently.

That's basically false and harmful analogy. Compilers are deterministic; LLMs aren't.

I know speckit exists and I know that verification may be attempted at an interface boundary.

But!

First, spec always has gaps while compiler's input doesn't. In case of spec, any gaps are filled by LLM with something that sounds good.

Second, zero review is as safe as your test suite is complete, which for most real systems it isn't.

Non-functional requirements such as scope creep, security, performance, memory leaks, race conditions aren't caught by tests at all.

Compilers are a good exception, there is a mathematical verification possible and these are super-well-tested against all possible code.

LLMs are neither.

So no, AI is not the new compiler. A fast and capable collaborator but not a proven, deterministic translation layer.

Review the output. Test it. Check the constraints.

#ai #llm #codereview
  • 👍 23
  • 💯 8
  • 🔥 3
  • 👎 1
  • 😁 1
Post #408 1.12K

Forwarded from Новости от CutCode

Стрим, посвященный Open source в эпоху LLM

LLM пишут код, делают ревью, поддерживают документацию — кажется, будто для open source это идеальный инструмент. Но точно ли всё так хорошо?

Кому в итоге стало легче — контрибьюторам или мейнтейнерам? Действительно ли LLM экономят время или просто перекладывают работу с одних на других? Что происходит с качеством контрибьюций? А может, какие-то open source проекты в эпоху AI вообще перестают быть нужны?

Тема сложная и местами болезненная, поэтому собираемся поговорить об этом с Александром Макаровым, Алексеем Гагариным, Андреем Helldar и Данилом Щуцким.

Обсудим, как LLM изменили повседневную разработку, где они действительно экономят время, где создают новую работу и каким вообще может быть будущее open source в эпоху AI.

Есть вопросы? Можете задавать заранее!

🔔 20 августа в 19:00

https://youtube.com/live/JjQ3ZkOcDns?feature=share
YouTube Open source в эпоху LLM: кто пишет код и кто его будет ревьюить? LLM всё глубже входят в ежедневную разработку: пишут код, тесты, документацию и целые PR. Но что это меняет для тех, кто много лет создаёт и поддерживает open source? В гостях — разработчики, для которых open source давно стал большой частью профессиональной…
  • 🔥 11
  • 👍 7
  • ❤ 4
Post #407 1.6K
📄 PER-CS v3.1

PHP's coding style is just about to get its new version. 3.1 fixes a few clarity and wording issues but also there are some interesting changes. You can check these yourself, there's a changelog. I'll, instead provide a few numbered code snippets to discuss.

🔸1 — clone with parenthesis

$b = clone($a);
$b = clone($a, [
'foo' => 'bar',
]);


🔸2 — switch-case-match

switch (true) {
case (
$a === 10
&& $b === 20
):
doSomething();
break;
}


🔸3 — spaces around pipe operator

$result = $input |> trim(...) |> strtoupper(...);


🔸4 — chaining

$result = '<foo>'
|> strtoupper(...)
|> htmlspecialchars(...);


🔸5 — empty closures

$noOpFunction = function () {};

// SHOULD be preferred where possible:
$noOpFunction = fn() => null;


🔸6 — anonymous classes

$example = new
#[Attribute]
class {
// ...
};


🔸7 — enums and scoping (private)

<?php

enum Size
{
case Small;
case Medium;
case Large;

private const Huge = self::Large;
}


🔸8 - arrays

return [
'foo',
'bar',
];

someFunction([
'foo',
'bar',
]);


#php #psr12 #percs
GitHub per-coding-style/migration-3.1.md at master · php-fig/per-coding-style PER coding style. Contribute to php-fig/per-coding-style development by creating an account on GitHub.
  • 👍 14
  • 🔥 11
Post #406 1.47K
🥩 Meat-routing and trust erosion

It is very tempting to copy-paste LLM answers or research as is. It usually looks great.

You validate it once, twice, three times... You make a few corrections but otherwise it's good. Then you start trusting and stop validating. Essentially, you are a meat router now.

Your colleagues will eventually notice, and ask themselves a few questions:

1. Can I trust this person any more than the LLM?
2. Has this person even read that response, or just forwarded it?
3. Can't I just use the LLM myself?
4. Why should I read that wall of text when I just need a yes or no?

That is, essentially, worse than "vibe-coding" — because there's no immediate feedback like "it doesn't work." A bad LLM answer can sit in a doc or a Slack thread for weeks, quietly trusted, before anyone notices.

The fix:

1. Consider answer a draft. Never forward it right away.
2. Compress it. If you can't reduce it to 1-2 sentences, you have not processed it.
3. Claim it. Take responsibility for the answer.
4. Verify the claim. Check what matters.

#llm #ai
  • 👍 12
  • 🔥 6
  • 👏 4
  • 💯 3
  • 💩 1
Post #404 1.06K
💡Wavy Lamp is awesome

Finished printing and assembly of wavy lamp and I love the result. It is pretty both day and evening.

I've printed "big" variant. Costed me around 13$ including the bulb and the cord.

The base is black PETG. The main part is Elegoo PLA Silk Bronze.

#3d
  • 🔥 16
  • 👍 10
  • ❤ 5
Post #403 1.4K
New yiiframework.com is live

The Yii website has a fresh new look!

We’ve redesigned it for clearer navigation, better readability, improved mobile support, and consistent dark mode—all while keeping the familiar Yii spirit.

Take a look and let us know what you think!

https://www.yiiframework.com/

#yii
  • 👍 29
  • 🔥 24
  • 🍾 7
  • 👎 1
Post #402 1.66K
💡Self-learning agents

All modern agents currently read AGENTS.md as the initial point of custom instructions. Claude sometimes ignores it, but usually doesn't.

For almost a year, I've had the following in my AGENTS.md:
# Lessons learned

When automated checks don't pass, when I correct execution, ask to do
things in a specific way, or instruct in any way meaningful to make a
process from it, write it down in as less words as possible into
`docs/lessons.md`. Refer to it when planning execution.

So far I have 50 lessons written down, and it really helps agents make fewer mistakes.

Some examples that were added:

1. Treat full-suite OOM as a product bug; isolate the test and fix the leaking/reentrant path instead of accepting a memory-limit workaround.
2. Apply UI translation label changes to every locale that owns the key.
3. Prefer built-in framework handlers over custom logging handlers.
4. Include units in timeout/duration constant names.
5. Remove unproven defensive UI fixes when backend handles the real failure.
6. Fix invalid frontend payloads at the source; do not normalize them server-side.
7. Audit final diffs against the target branch; exclude unrelated hunks.

#ai #llm #agents #lessons
  • 👍 11
  • 🔥 7
  • 🙏 2
Older posts →

About this channel

How can I read @samdark_blog without a Telegram account?
TGViewer shows the public web preview Telegram publishes for samdark blog ☕️ (Alexander Makarov): recent posts, photos, videos and the subscriber count, with no app, login or account.
How many subscribers does samdark blog ☕️ (Alexander Makarov) have?
samdark blog ☕️ (Alexander Makarov) (@samdark_blog) has 1.62K subscribers on Telegram, refreshed roughly every 30 minutes.
Does samdark blog ☕️ (Alexander Makarov) know I viewed it here?
No. Public channel previews carry no viewer identity, and TGViewer has no accounts or tracking of what you look up.
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →