Coding Blocks

Data Structures – Primitives

Nov 19, 2018
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Data Structures Often Matter More Than Algorithms

  • Data structures matter more in day-to-day programming than algorithms for organizing and efficient access patterns.
  • Joe prefers converting input into convenient structures first (map/transform) so logic and output stay simple and fast to work with.
ADVICE

Preformat Input Before Applying Logic

  • Transform incoming data into the format you need before applying business logic or view rendering.
  • Joe described mapping and converting dates before rendering so view code stayed dumb and simpler to maintain.
INSIGHT

Why Floats 'Float' In Memory

  • Floating point stores numbers as sign, mantissa (significand), and exponent, so the decimal point 'floats.'
  • In 32-bit float: 1 bit sign, 23-bit mantissa, 8-bit exponent; doubles use 52-bit mantissa and 11-bit exponent.
Get the Snipd Podcast app to discover more snips from this episode
Get the app