Hacker News new | ask | show | jobs
by MichaelAza 4693 days ago
Not a mnemonic per se but I have melodies for common code snippets.

"public static void Main(string[] args)", which is the default method signature for the main method in C#, is a hip-hop beat. SQL statements are always metal tunes. Javascript is usually indie pop.

2 comments

I also have a melody for the default method signature in Java which is the same except a slight difference in case "public static void main(String [] args)"
Please tell me you guys are actually singing the signature to a particular tune in your head like people sing the ABC song when they recite the alphabet. Because that is adorable.

Rapping arbitrary chunks of code could be a fun after-hours conference game.

You're partially correct. I do sing them, not necessarily in my head.
Just out of curiosity, do you say "array of string" or "strings" or something else?
Actually, I say "string" and then drop the bass for the square brackets.
Normally, this would honestly be a moment when I'd question if you were trolling, maybe post the fry meme image.. but. Given the topic, I actually believe you O_O