HOW TO REFER TO A MAGIC CONSTANT IN C

  Lawful Neutral Chaotic
Good LIBUUID_UUID_LENGTH sizeof(uuid_t) sizeof(UUID_NULL)
Neutral UUID_LENGTH 16 uuidLength
Evil NUMBER_OF_OCTETS_IN_RFC_4122_UNIVERSALLY_UNIQUE_IDENTIFIER 128 / CHAR_BIT SIXTEEN

Originally posted for the Fediverse.

UnsafeMutableRawBufferPointer

Because it came up at work, a recap of Swift pointer nomenclature:

  • Unsafe - because it is
  • ? Mutable - vs const
  • ? Raw - vs typed, puts the specialness of C’s void * in its own type
  • ? Buffer - knows its length
  • Pointer - because it doesn’t own the data

Originally posted on Twitter.

Queue, Queeu, Quuee

PRO TIP: the letters in “queue” describe the order elements are accessed.

  • queue /ˈkju/: first-in first-out
  • queeu /ˈki.ju/: last-in first-out
  • quuee /kuˈwi/: general interface, order unspecified

Older Posts

  1. 2019-09-13 Presentation on PrintAsObjC
  2. 2019-02-21 A Shiny Magic Number
  3. 2014-12-28 SIGWINCH

Possibly Related Tags