DEV Community

loading...
Cover image for βœ”||🀒 Commit or Vomit | Easter eggs

βœ”||🀒 Commit or Vomit | Easter eggs

jmdejager profile image 🐀πŸ₯‡ Jasper de Jager ・1 min read

Wasn't planning on posting the second βœ”||🀒 this fast but couldn't wait any longer with this one! And no, it's not about eating to much easter eggs but easter eggs in your code. πŸ˜…

easter eggs βœ”||🀒

Would you place easter eggs in your code?

❀: Commit (something I could commit)
🏷: Vomit (I'd never commit this)
πŸ¦„: I like your post please continue this series!

Let's vote! 😊

P.s. leave your best easter egg idea for fun!

Discussion (21)

pic
Editor guide
Collapse
moopet profile image
Ben Sinclair

Whether I would or wouldn't depends entirely on the product and who it's for.
Most of the time, no. But if it was for me or my friends, or if the client wanted it, then maybe.
Easter eggs in code can cause problems down the line. You need to document them carefully - if they're obfuscated in any way then a future developer might break something, or even wonder if the code's been maliciously compromised.

I'm more likely to leave things in help documentation.

Like with :help holy-grail in Vim, or the end of the basic --help in Ack.

Collapse
nefomemes profile image
Nefomemes • Edited

For this NuxtJS site I'm currently making, I added the Jokomium meme to the error page. It's basically the Obamium meme but with the current president of Indonesia, Joko Widodo, with the Indonesian version of Dragostea Din Tei.

blthunderstorm.repl.co/404

Collapse
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager Author • Edited

Thnx for joining in! You put some great effort in that easter egg.

Personally I'd never use the 404 for something like this. I'd use it for things like: 'did you mean ""?' or some search bar to help people find what they were looking for. Furthermore I'd always make my easter eggs neutral so they can never give people a bed experience.

It depends heavily on the type of site/app your making. Good to see a lot of effort going into easter eggs 😊

Collapse
nefomemes profile image
Nefomemes • Edited

Well, I just though it would be great if I add a box under the error message saying things like this:


Wanna go back to home? Click here.
Seems unexpected? Report it in our GitLab repo.


Overall, I still need to do a lot to get this thing done.

Thread Thread
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager Author

Good ideas!

That will definitely improve the user interaction 😊

Collapse
jayjeckel profile image
Jay Jeckel • Edited

Absolutely not. I have a strict no-fun-allowed rule when it comes to the actual code. No funny variable names, no humorous naming themes for classes and methods, no catchphrases dictating pronunciations, and no code, easter egg or otherwise, that isn't there with the goal of making the product better for the user.

I don't have any problem with entertaining comments that have jokes, stories, rants, whatever, but code itself is not the place to be witty.

Collapse
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager Author

Sometimes when I come across some funny code it makes my day. It actually helps me be more productive and keeps me going when I have boring stuff to write.

This is exactly what this series is for, showing both sides 😊 thanks for sharing!

Collapse
johnkazer profile image
John Kazer

I recall from the early days of electronic car media systems that someone forgot to take out a developer Easter egg, which went to production and might have been quite embarrassing if anyone worked out how to activate it (some button push combo).

Collapse
jmdejager profile image
Collapse
edave64 profile image
edave64

Depends. I'd probably never add anything that requires assets, so no images or sounds.

But a little text joke in unlikely conditions is probably fine. But keep it out of the backend. No outside code should have to deal with your nonsense

Collapse
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager Author • Edited

I love adding joy to code! Not too much easter eggs subtile is best!

Collapse
siddharthshyniben profile image
Siddharth

You mean subtle

Collapse
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager Author

🀣 subtle difference

Collapse
lucianojung profile image
Luciano Jung

❀ To the Code or the Programm? To the Programm any time if my team and me found it funny. In Code only if it's still clean code after it :)

Collapse
jmdejager profile image
🐀πŸ₯‡ Jasper de Jager Author

Good question, I guess it is about both. Totally agree with your answer. The occasional cleverly found variable name or comment is ok πŸ™‚ , developer joy is so important and this a part of it.

Collapse
qoyyuum profile image
Abdul Qoyyuum

Easter eggs are always fun. Of course, it depends on whether its worth the effort to do in the middle of running a sprint or when you want to do something on a slow period.

Collapse
jackmellis profile image
Jack

Definitely Easter eggs, as long as it's subtle. Saying that, it depends how serious your company/project is, read the room!

Collapse
brenodamata profile image
Breno da Mata

Love easter eggs! When pokemon go came out we switched the users profile pic with a random 1st gen Pokemon.

Collapse
jmdejager profile image
Collapse
siddharthshyniben profile image
Siddharth • Edited

Depends on the type of program. I would definitely add them if they were some kind of library but I wouldn't spend too much time on them.

Collapse
jenbutondevto profile image
Jen

Tests are a nice place to put them, otherwise I can’t really see when/where is an appropriate place to put these :( 🀒