Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is "❨╯°□°❩╯︵┻━┻" with such an encoding used for a method name?

Tags:

ruby

sidekiq

I came across following method in sidekiq gem. Its just invoked from test_sidekiq.rb.

def self.❨╯°□°❩╯︵┻━┻   puts "Calm down, bro" end 

This is the only link I was able to find on SO.

  1. Google can't understand ❨╯°□°❩╯︵┻━┻. Why doesn't Ruby complain about this encoding?
  2. What is the purpose of this method (not much looking at its body)?
  3. Why did author @mike-perham use this name? Just for fun, or testing some boundaries?
like image 793
saihgala Avatar asked May 31 '14 23:05

saihgala


2 Answers

If you really do not understand the sense of the method name, that is a (Japanese-style) facemark. Whereas English facemarks are rotated 90 degrees counter-clockwise and are long in the vertical direction of the actual face, Japanese facemarks are to be read in the direction as is, and are long in the horizontal direction. The author of this is likely to be either a Japanese, or someone who is influenced by Japanese culture like anime.

In this particular case, each character expresses a certain part. From left to right:

  • The right edge of the face
  • The right arm raised
  • ° The right eye
  • The mouth
  • ° The left eye
  • The left edge of the face
  • The left arm raised
  • An imaginary curve expressing the trace of a thrown table
  • ┻━┻ A thrown upside-down table (most likely a chabudai that used to be seen typically in Japanese homes until some decades ago)

Chabudai gaeshi used to happen often at some feudal Japanese homes until some decades ago. The father had the absolute monarchic right at home, and whenever he was frustrated over something, he would flip the chabudai during dinner to show his anger, and the family (especially the mother) had to prepare the dinner again.

chabudai gaeshi

Here are more variations.

like image 137
sawa Avatar answered Sep 26 '22 07:09

sawa


It's a core part of the Sidekiq API. Sidekiq is limited to only tables while Sidekiq Pro adds APIs to flip other types of furniture: chairs, ottomans, loveseats, etc.

like image 33
Mike Perham Avatar answered Sep 22 '22 07:09

Mike Perham