4 ms·
> We replaced 1,000 lines of YAML with 10 structs ... I looked, but target URL didn't spell it out, and I lack sufficient domain knowledge to dive into the rep
by Jedd 8y ago
> We replaced 1,000 lines of YAML with 10 structs ...
I looked, but target URL didn't spell it out, and I lack sufficient domain knowledge to dive into the repo to find it -- but I'm curious as to how big, and indeed how complex, those 10 structs are.
It seems disingenuous to swap units mid-sentence when comparing size or complexity.
My gut feel is the set of people who could understand thoughtfully designed YAML should be larger than the set of people who could understand thoughtfully designed structs (+ wrappers?).
- ghuntley 8y agoThis quote was taken from a kubernetes retrospective at https://about.sourcegraph.com/go/valuable-lessons-in-over-engineering-the-core-of-kubernetes-kops/#what-did-they-remove-exactly/ https://about.sourcegraph.com/go/valuable-lessons-in-over-en... Scroll to the bottom: In a nutshell, they got rid of a custom programming language they had inadvertently created via YAML and text/template. Their YAML models were effectively written in a Turing-complete language composed of YAML and text/template directives. They had been heavily abusing the FuncMap type in text/template.
- Jedd 8y agoThanks, and yes, I did read through that page. Lots of coloured text that tantalisingly looked like links but weren't, and a lot of broken images/slides. I got to https://github.com/kubernetes/kops https://github.com/kubernetes/kops ... and that's where I got out of my depth. It sounds like it wasn't a problem with YAML per se, but their misappropriation of text/template and wrangling YAML to be something other than a configuration tool. It feels similar to if I were to complain about the shortcomings & complexity of the jinja2 constructs I make within my YAML.
- ghuntley 8y agoAh yes but please revisit this problem space from the perspective of a consumer of YAML. Ops folks are drowning in it. The industry can and should do better.