• 0 Posts
  • 19 Comments
Joined 9 months ago
cake
Cake day: December 29th, 2023

help-circle








  • The lack of pressure leads to absurd file sizes for silly things.

    A few weeks ago, I needed a vector company logo, so I asked our graphics team for one. The file they sent me was 6MB. While working with it, I noticed it was actually quite clean, so I exported it as an SVG and it came out to 2KB. 1/3000th the size for the exact same graphic.

    I opened their file up in a text editor and found font configs for specific printer models (in a graphic with only filled curves), conditional logic, multiple thumbnails, and other junk.


  • I feel the need to point out that a float isn’t an integer with a decimal stuck on. A floating point number is called that because the precision on both sides of the decimal point changes depending on the size of the number.

    It’s actually stored as an exponent and a value to apply the exponent to. This allows you to express incredibly tiny numbers and incredibly large numbers, but the gaps between representable numbers is inconsistent.

    You know how 10 / 3 * 3 is often not 10 because the decimal representation loses the repeating .33? In float, you run into the same issue but in much less predictable places.