by ryandrake · 2y ago · 0 comments
If you absolutely must write an Easter egg, put it in the “About” screen or the command line usage string or something… not in the program’s primary output.
To me, software is a community effort. Communities are made of people, and people have gloriously many motivations for their work. A spirit of play is one of those motivations, and I'm glad people honor it. Yes, it shouldn't cause much trouble along the way. But that's not because of some theory about what software it's for. It's because of the people.
The expected behavior is described there.
Easter eggs is an element of controlled chaos.
I wouldn’t want my home builder to insert an Easter egg that causes my windows to open randomly in the middle of the night on one day of the year because he found it “joyful.”
If bit flips become more common as transistors get smaller, that’s certainly going to throw a much less controlled wrench in the works.
And something like this printing out in error could indicate that you have been compromised and you should lock down everything. Verify that you full system is clean and go through all of the logs.
I would suggest not relying on some joker’s code and write your own instead.
Open source is open source. That’s all that’s promised, and we aren’t entitled to anything more.
For starters the user of 'man' is an interactive unix user. Other than really unusual edge cases (eg processes which produce printed versions of the unix manual, and the test scripts of the OP in the stackexchange) there are no non-interactive or batch uses of man, it isn't used in pipelines or scripts etc.
Whereas grep is a staple of batch processes, scripts, cronjobs large and small as well as being a key tool for interactive use.
I would be very annoyed if the Tarsnap website was broken because someone decided to throw in an Easter egg and make the output occasionally inconsistent.
If anyone reading this is ever considering putting in an Easter egg like this: Please check if stdout is a terminal! If your output is going to a terminal, it's probably safe to be silly. If your output is going anywhere else, you should absolutely not play games.