Coding is a teamwork most of the time. Sometimes we need to use a really old code snippet or we need to modify it. On the other hand comments play a major role in a code. Before implementation, some people write what TODO in human language as a practice.
Nowadays, emojis are popular everywhere. In addition, emojis adds more emotional meaning to the text. So, what about emojis in code π€?
ππ‘This is just an idea
---------For example -----------
π - Something to find more
π - Something really important
π¨ - Something to fix
π― - Something fully Tested
π - Passwords or things related to security
βAnd another thing, most of the new text editors can display emojis
Interesting that many people seem to think there's an objective, one-rule-fits-all-situations response to this question. in spite of literally millions of different coding contexts in the world today.
Well, origin/master couldn't give a rat's spit about emjois. And, unless it's a personal repo, this should be avoided. The reason is similar to why your commit messages should be imperative and not past tense.
I use emojis for git commits to better visualize and organize commits:
| Commit type | Emoji |
| Initial commit | π :tada: |
| Version tag | π :bookmark: |
| New feature | β¨ :sparkles: |
console.log(`π¨π¨ HACKER ALERT! π¨π¨`)
console.log(`Running in DEVELOPMENT mode\n`)
^ I have this code in a couple projects where I can build it either for development, or production :D It's fun!
Code needs precision and emoji are not precise - they display wildly differently across devices and there's no universal agreement on what they mean anyway.
We've got π over in the sidebar which I presume means 'fist bump' but I've also seen it used for 'punch'.
Someone commented on some code of mine once with a grinning cat emoji and it looked like an angry cat to me. They were confused when I asked what was wrong with the code. So yeah it adds emotion to text, but not uniformly-understood emotion.
I don't think it'd improve readability much.
Emojis are mostly used for opinions and emotions. I don't think those help with understanding code.
So I'd say use them if you want to make the code more fun. Similar to the jokes in code thing from a while ago.
This is with the exception of emojicode.org where I'd recommend using them.
The comment itself should be sufficient -- if you use the UTF-8 characters you're just introducing cross-character set headaches and wasting time looking them up that could be spent writing better code.
If you're using the conventional character based ones half the time someone's just gonna go "what are these junk characters" on anything more complex than the simple smilie and delete them.
But I'm old school, even if my content is going to be in a wider character encoding, I prefer to keep my code within the 7 bit ASCII limits just so I never once have to worry about my source getting boned by a character encoding mismatch; since pretty much every character set has ASCII codes 0x00 to 0x7F as its base.
But what do I know? I still say 99%+ of English language content has zero business using any characters outside ASCII-7! Oh noes, eyes cantz usededed teh styled quotes -- big deal!
cedric simon
Web dev
I am not sure emojis will work well with many tools.
How about on terminals?
How about programs written in different encoding than utf-8 (yep, here in japan, we have to deal with 3 encodings most of the time...)
How do you grep emojis quickly from command line?
And the list can go on and on if I spent enough time on it.