Thursday, April 13, 2023

📚 Using emojis in identifiers

Although I generally do not do well with symbols to convey information (I do much better with words), I do find symbols helpful as attention-getters and visual cues to convey very simple information.

For example, in the code below, the emoji's help me quickly identify/locate colour constants in my code.


CONST 🎨brick_red = &HC62D42, _

      🎨electric_lime = &HCCFF00, _

      🎨metalic_sunburst = &H9C7C38


SCREEN 23 : COLOR ,&HFFFFFF : CLS

LINE (10, 10)-(100, 100), 🎨electric_lime, BF

LINE (200, 200)-(300, 300), 🎨brick_red, BF

CIRCLE (200, 100), 50, 🎨metalic_sunburst, , , , F



2 comments:

  1. Of course, emojis can quickly turn into "too much of a good thing". Too many emojis in source code can be over-stimulating and distracting ("everything" grabbing at one's attention, eyes not knowing where to look.)

    ReplyDelete
  2. BTW, not only emojis, but also Unicode characters (https://en.wikipedia.org/wiki/List_of_Unicode_characters)

    ReplyDelete

🖥 Fan Dance

This is a port and mod of a SpecBAS program by ZXDunny. Run the program View the source code And, a "less is more?" version: Run t...