Although it's more obvious on social media than here, several joke commands in Stata (read that as: several light-hearted Stata programs) have been posted recently, and welcome they are too.
This is more of a meta-post, on how to write joke programs, as if you glance at the code of these programs you will find not only a certain communality of style (meaning, programmers copy good or at least workable ideas from each other, and how else would we get anywhere), but also a certain long-windedness of code, rather like this not quite interminable sentence.
Here are some very small tricks for writing joke programs, illustrated by example.
Notice how you don't need a multiple branching structure or to wire in certain random number results into the code. You just need to define your jokes and call up one with a single call to a function. Also, a structure like this is easy to extend. The SMCL tags in the display ensure that text is wrapped fairly within any narrow Results window.
This is more of a meta-post, on how to write joke programs, as if you glance at the code of these programs you will find not only a certain communality of style (meaning, programmers copy good or at least workable ideas from each other, and how else would we get anywhere), but also a certain long-windedness of code, rather like this not quite interminable sentence.
Here are some very small tricks for writing joke programs, illustrated by example.
Code:
program myjoke local myjoke1 "The lognormal is more normal than the normal" local myjoke2 "Statistics means never having to say that you are certain" local myjoke3 "The method of 'postulating' what we want has many advantages; they are the same as the advantages of theft over honest toil. (Bertrand Russell)" local myjoke4 "Sure, he invented fire. But what has he done since? (some caveperson academic)" local myjoke5 "Not even wrong (Wolfgang Pauli)" local myjoke6 "Notation is a branch of etiquette, not of logic" local myjoke7 "Be careful where you point that straight line. It could go off anywhere." local myjoke8 "Local means what it says" local myjoke9 "PCA isn't a washing machine. Muck stays in the wash. At best it ends up on low eigenvalue PCs." local myjoke10 "Your punishment is that your code did exactly what you asked for" local myjoke11 "Reputation, like almost anything else, is measured with error" local myjoke12 "To see what is going on, you really need a graph" local myjoke13 "Intuitive means familiar, not intuitive" local myjoke14 "Theory is just somebody else's speculation that got into the literature" local myjoke15 "Variance is the attitude of one statistician to another (R.A. Fisher, supposedly)" local myjoke16 "Confidence intervals are really diffidence intervals" local myjoke17 "A significance test is a roundabout way of finding out that you need a bigger sample" local myjoke18 "Despite its purpose, no-one really wants to read a legend" * 18 should be replaced by the maximum number of jokes if different local which = runiformint(1, 18) di "{p}`myjoke`which''{p_end}" end
Comment