Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Hey guys. Do you know any studies about the quantity of boiler plate code in different project types? I don't seem to find any actual numbers. I know this is subjective and relative to the language, project type and frameworks used, but there must be an actual study somewhere that covers at least a niche. Thanks!


migration rejected from stackoverflow.com Dec 2 '13 at 18:24

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by MichaelT, gnat, GlenH7, Bart van Ingen Schenau, Robert Harvey Dec 2 '13 at 18:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – MichaelT, gnat, GlenH7, Bart van Ingen Schenau, Robert Harvey
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

In order to do a study about quantities of boilerplate code, you'd first need a definition of boilerplate. If you want the study to be completed during your lifetime, the definition will need to be something that can be checked by a computer. You'd also need access to a lot of code. However, not all code is publicly available, so there's a possibility of selection bias. Finally, what would be the benefit of the study to justify the cost?

That said, I would think the amount of boilerplate code would be more tightly correlated to the programming language used than the type of project. A website created using Lisp, for example, would have a lot less code than a website created using COBOL.

What you're saying is correct. I was just curious. Often different frameworks brag that they reduce boilerplate code by N%, but since there are no real numbers I was wondering how they could make those statements. –  Cristian Vrabie Jan 13 '11 at 22:44

IMO, Boilerplate code is a symptom of a poorly written application. Why not factor out that boilerplate code, instead of repeating it everywhere? If that's impossible, then it is a symptom of a poorly designed programming language.


Not the answer you're looking for? Browse other questions tagged or ask your own question.