Hacker News new | past | comments | ask | show | jobs | submit login

Yea, I think this is actually the real answer, and OP is just wrong.

Here are old and modern examples where the boilerplate is a standardized plate that's filled out using punched letters/numbers.

https://lestaret.files.wordpress.com/2009/09/boiler-3a.jpg

https://www.steephillequipment.com/wp-content/uploads/2017/0...

(am also in the MechE space)




This looks much more in line with programming boilerplate with literal fill-in-the blanks.

I would say the article captures early etymology but this could be why we call it boilerplate.

What I'd like to learn is the earliest computer related usage of the term. Wikipedia says[0]:

> The term arose from the newspaper business. Columns and other pieces that were distributed by print syndicates were sent to subscribing newspapers in the form of prepared printing plates. Because of their resemblance to the metal plates used in the making of boilers, they became known as "boiler plates", and their resulting text—"boilerplate text". As the stories that were distributed by boiler plates were usually "fillers" rather than "serious" news, the term became synonymous with unoriginal, repeated text.[2][3]

> A related term is bookkeeping code, referring to code that is not part of the business logic but is interleaved with it in order to keep data structures updated or handle secondary aspects of the program.

[0] https://en.wikipedia.org/wiki/Boilerplate_code#Origin


At a certain point, the slang term "boilerplate" branched away from the derogatory sense in reference to newspapers to the more neutral sense of formulaic. The first "neutral" sense reference in the OED is from 1949:

Navy Contract Law (U.S. Bureau Naval Personnel) ix. 212/2 -- "This type of clause has proved so valuable that it is presently standard ‘boilerplate’ not only in shipbuilding contracts but also in almost every kind of contract."

The first reference in the OED for it being used w/r/t computer stuff is 1990:

L. Wall & R. L. Schwartz Programming Perl vii. 379 -- "Like mus itself, man2mus is not 100% effective, but can save you a lot of time producing the initial boilerplate."


The actual man2mus program appears to be not accessible to the easily searchable public internet anymore, but there's a few references to it - "usub/man2mus A manual page to .mus translator". It's Perl, apparently.

Neat.


The reference to "Programming Perl" was no doubt helped along by Perl developer Jesse Sheidlower who worked at the OED in the early 2000s. From his Wikipedia page: "Although not a computer programmer by training, Sheidlower introduced Perl to the North American offices of Oxford University Press and developed tools for data manipulation when no programmers were available. He is also one of the core developers of Catalyst, a popular Perl web development framework."


Assumptions are immaterial, however. Etymology of the term is as noted in the article. It is more likely that this use (as on water heaters and such) derives from the same typesetting usage.


It's always satisfying to be certain, but the meaning of words does shift over time, and sometimes words have multiple origins. Assuming that 70s or 80s programmers knew anything about printing presses is tenuous. Given the long assumption that boilerplate refers to plates on equipment and superior fit of "fill in the blank" documents, it seems more likely that this is the intended meaning. Perhaps the term was heard and misunderstood early on? But the proposed origin doesn't align with the community that's using it to refer to source code.


The replies seem confused.

No one ever called it “boilerplate code” for any reason having to do with boilers or typesetting or water heaters.

It’s a language idiom. It entered common use through reasonably well documented avenues, and that is via typesetting.

We use it because that’s just how language works. All these “it makes more sense to me if it referred to such and such” misunderstand language.


> Assuming that 70s or 80s programmers knew anything about printing presses is tenuous

True, but as you say the meaning of words shift. It is entirely plausible that they were exposed to the term in its bureaucratic meaning, and continued to use it without any connection to actual boilers - the same way we do today.


As to 70's and 80's programmers knowing about printing presses I'll point out that a significant early AI program (1968-1970) was named SHRDLU. One familiar with printing history might recognize those letters as part of the second column of moveable type characters on a Linotype machine (and other type-casting machines.) I didn't look up a reference, but I recall that the first row of bins for hand set hot type letters followed the same convention of letter frequency in English text (for english speaking countries that is.) etaoin shrdlu That string of characters became more well know due to its appearance in hot type set news papers of the era. The characters sometimes accidentally made it to press rather than being pulled as part of an erroneous line of text.

https://en.wikipedia.org/wiki/SHRDLU https://www.wikiwand.com/en/Etaoin_shrdlu


I remember asking my father in the 1980s what "boilerplate" meant, having encountered the term in a newspaper. He relayed it to me in the legal sense of the preliminary standard matter on a contract. He was a software developer starting in the 1960s so I have absolutely no doubt that the bureacratic usage was well known in those circles.


> Assuming that 70s or 80s programmers knew anything about printing presses is tenuous.

I don't think that's the case at all. Lots of work was done computerising newsrooms in that period.


I find more likely that the programming "boilerplate" comes from the legal "boilerplate".


Merriam Webster[1] online disagrees with you and agrees with OP. That said, etymology is often contentious.

https://www.merriam-webster.com/dictionary/boilerplate




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: