4 ms·
The problem is not the tools. The tools are just fine. The problem is the scope of the resulting scaffolds, and the diversity of their target spaces. I primari
by teilo 4y ago
The problem is not the tools. The tools are just fine. The problem is the scope of the resulting scaffolds, and the diversity of their target spaces.
I primarily work in Python, so that is my reference. Django provides its own scaffolding tool, but it is too opinionated. Flask provides no scaffolding. Framework specific tools are rarely sufficient to meet the needs of an organization. Regardless of language and framework, choices must be made, and when you have a team of any size, everyone needs to agree on the same standards. We all know this.
If one limits a scaffold to the lowest common denominator, the base standards of an organization: directory structure, configuration, CI/CD, testing, library management, documentation, linting, packaging, container configuration, i.e., everything that precedes actual functionality, scaffolding is not hard, and is very helpful.
But as soon as one tries to drill down into specific functionality that is not common to all projects, then scaffolding quickly becomes difficult and unwieldy.
IMO, the key is to not think of scaffolding as a tool to speed development, but as a tool to enforce those standards of an organization that are common to all projects in a given language/framework. Resist the temptation to go further. If your scaffold needs more than a half dozen or so inputs, then you are probably expecting too much of it.
- SkyPuncher 4y agoExpanding on this. Scaffolding breaks my mental model for reading code. This often results in more mental overhead and slower/worse outcomes. When scaffolding generates code for me, I read it as psuedo-blessed code. Rather than starting from a clean slate and working through my mental checklist, I must interpret what the scaffolder created. Figure out what I _actually_ need and figure out what needs changing. By contrast, without a scaffolder, I feel like it's much easier for me to build a mental model around the problem I'm solving - focusing in on the more important components first. Yes, I know that I'll probably need 20 files to complete a feature. However, I don't need those files right now.
- darau1 4y agoTo your point about not using scaffolding as a tool to speed development: I have found that rails' scaffolding commands make me lazy. I will routinely destroy, and recreate, an entire scaffold because I need to change it; somehow I think this is easier than just editing the file I already have on my system -- only to then spend 10 minutes combing through all the changes rails made so I don't lose any of the changes I made. It's very silly.