1

It seems pretty common knowledge that code is read far more than it is written. Does this mean that if a tool produces code that's checked in, then it's a net negative (saves the author some time in writing it, but more than makes up for it in time spent by everyone else reading it)?

If not, why not?
If yes, is there still a reason to use code scaffolding tools (e.g. yeoman)?

  • 2
    Once people have learned to trust the code a particular piece of software writes, they don't look at it so often. That said, the code the software writes isn't usually checked in to version control. Programmers still have jobs because we've not yet figured out how to write a program that will write all of our code for us. – Ed Grimm Feb 6 at 6:42
  • @EdGrimm: "the code the software writes isn't usually checked in to version control" – Unfortunately, it is. E.g. creating a new empty Ruby on Rails application generates over 60 files with over 1600 lines, all of which is checked into the repository. Even ignoring all the generated READMEs, CSS, and HTML, only counting Ruby files, and only counting actual SLOC (minus comments, etc.), there's still 126 SLOC of Ruby code generated. And note that this is completely empty. Every model, controller, view, etc. generated will add more code. – Jörg W Mittag Feb 6 at 9:41
  • That's a drop in the bucket. Programs are exceedingly proliferate programmers. That having been said, is that actually program-generated code, or just template spew? If it's just copying files from some package that specifies what goes into a new project, that doesn't match what I think of as program-generated code. I'd only count it if the program uses actual logic to vary what goes into it - and when creating an empty project, it doesn't seem like there's anything to logic over right away. – Ed Grimm Feb 6 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.