by seattleeng · 5y ago · 0 comments
Getting existing codebases to do new things is hard, and most of enterprise software engineering is basically "rework this API (in the general sense, not web-API sense) for a new product use case".
This tool seems to borrow the philosophy of Go's keeping the language simple, with the tradeoff of a more complex (but fairly well supported) ecosystem to account for missing language features.
IME, Golang (some would say paradoxically due to a lack of generics) is one of the best languages to refactor because of:
- Forced error handling semantics so that unhappy paths are easily enumerated
- Tooling like `rdep` to quickly grok the impact of a package refactor
- String templates/codegen being a first-class "blessed" part of the ecosystem (i.e. you can find tooling by the Go team as a reference when writing your own)
Some would balk at things like codegen being how Go handles this, but for the iteration loops at most companies at scale (where a few tools to do codegen are written & maintained by one team and consumed by others) it works well. For paradigms where you want everyone to contribute to the tooling, it works slightly less well since the barrier of understanding the ecosystem is greater than just understanding the language. Nevertheless, it seems to be the right tradeoff for most enterprise use cases.
They could have just added pattern matching and exhaustivity checking though, right?
For what it’s worth, I’ve been at more than a few companies and this lines up. Managing a refactor or migration that’s long term and creates significant impact across an org chart or product area is definitely in the purview of promotion to senior or staff, whatever it’s called.
I also think that "migration" and refactor are completely different concepts. And only the first is going to get you promoted (in the context of Google), because there's so much tooling for making even large refactoring relatively trivial. Pretty much every language has something like this, the build system also supports it too, so the process of, for example, taking a file, renaming it, querying and updating all dependencies (both source files and the build system), testing and sending out pull requests is essentially entirely automated. Unless there's something unique about a refactoring, it's not challenging enough to be promo-worthy.
Over the years, one company I've worked for off and on (as a consultant/contractor) went from a jQuery UI library, to a CSS component library (which was fine), to an AngularJS component library, then some ex-googler (younger than me) swept in and became CTO or similar and Decided that the whole company should use, drumroll please, Polymer. Then Polymer 2 came around and they had to scramble to make everything Polymer 2 compatible. They were just about done when Polymer 3 came around, which did things Differently once again.
But I'm sure the guy made decent scratch and left the company right before things came crashing down to an even more cushy job. That's usually what happens.
Rdep: https://github.com/axw/rdep Gomod: https://github.com/Helcaraxan/gomod
If you look at what they're doing under the hood, its mostly gluing bunch of official Golang libs that let you inspect package-level information.