3 ms·
When I read your rationale, it feels a lot like literal programming, as I experienced it when reading PBR[1]. But without the documentation around it, I'm not
by magicalhippo 7y ago
When I read your rationale, it feels a lot like literal programming, as I experienced it when reading PBR[1].
But without the documentation around it, I'm not sure I feel the same way about it. It feels harder to reason about what where why.
Also, I'm assuming bugs should be fixed without using this layering. After all, without that layer you got broken code. But often I find there's not a clear-cut distinction between feature and bug fix. What then?
Anyway, interesting idea, would have to try it to get a feel like I said.
[1]: For example http://www.pbr-book.org/3ed-2018/Sampling_and_Reconstruction/Sampling_Interface.html#BasicSamplerInterface http://www.pbr-book.org/3ed-2018/Sampling_and_Reconstruction...
- akkartik 7y agoIt's definitely inspired by Literate Programming. My code instructions in OP refer to a directory called wart/literate. > But without the documentation around it, I'm not sure I feel the same way about it. It feels harder to reason about what where why. I don't understand this. Are you saying my approach doesn't permit documentation? I don't see why. Check out the start of the first layer: http://akkartik.github.io/mu/html/000organization.cc.html http://akkartik.github.io/mu/html/000organization.cc.html Do you mean that the documentation doesn't look as nice as Literate systems? I think that's a good thing: http://akkartik.name/post/literate-programming http://akkartik.name/post/literate-programming. Giving important concepts in your program a good central place is the essential need of documentation. Layers give features a single consolidated place (a https://en.wikipedia.org/wiki/Focal_point_(game_theory) https://en.wikipedia.org/wiki/Focal_point_(game_theory) ) where you can include documentation and be confident that someone interested in the feature will find it. Next to this attribute, I think typography is almost meaningless. I think it's far more important that documentation be accessible from within my programming environment, than that it be typeset well. > I'm assuming bugs should be fixed without using this layering. Yup! From the final paragraph of OP: "Codebases have three kinds of changes: bugfixes, new features and reorganizations. In my new organization bugfixes modify a single layer.."