今日已更新 365 条资讯 | 累计 39058 条内容
关于我们

Controlled and Imperfect Beats Perfect and Foreign

Anton Brilliantov 2026年09月03日 17:55 2 次阅读 来源:Dev.to

The code you can change today is worth more than the code you cannot. 👋 I'm Anton - a software engineer working mostly in PHP/Symfony and Go, currently carving Go services out of a live PHP monolith. This is the last part of a block about the platform, the service template and generated skeletons, and I want to close it with the one idea that decided most of the calls in it. Maybe it is useful to you; maybe you look at this the other way round and I'd like to hear that. Notes: github.com/brilliant-almazov . As with every part of this series: this is what I do on one codebase, not advice for yours. The thesis Between a decision I can change today and a decision that is better but changes on someone else's release, I take the first one. Not because it is written better - it usually isn't - but because the cost of changing it is known in advance. "Foreign" here doesn't mean bad. It means not moved by me : a shared library, a platform package, a dependency with its own release cadence. Those are often the better piece of code. They are also the piece whose change window I don't own. Where the rule shows up in the layout Universal code is born in a service, because that's where you can see it is needed, and it lives in the platform. That gives three phases, and they are deliberately two different bodies of work: Phase A - preparation, inside the service. No imports of any domain package, the public API frozen, tests moved into the concern's own subfolder, a context-cancellation test present. Closed by a green run in the service's own repository. Phase B - the move into the platform. Files relocate, the package name becomes the target folder's name, service imports are cleaned out. Only on a direct instruction from the platform's owner. Phase C - the service switches to the platform version. Exactly the given tag goes into the modules, the local package is deleted, imports are replaced. No pseudo-versions, no replace . No tag - the work doesn't start. Phase C is a separat

本文内容来源于互联网,版权归原作者所有
查看原文