this post was submitted on 28 Mar 2024
370 points (93.6% liked)

Programmer Humor

32820 readers
210 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
(page 3) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 52 points 9 months ago (2 children)

Did anyone say Magabyte yet?

load more comments (2 replies)
[–] [email protected] 0 points 9 months ago (7 children)

On the contrary.

KB = 1,000 bytes and MB = 1,000,000 is empirical.

KiB = 1024 bytes or 2^10^ and MiB = 1,048,576 or 2^20^ is Metric.

Remember, empirical is the miserable system the rest of the world abandoned because it made math and science difficult. KB makes storage miserable, never being clear whether your have the exact space your box claims it does. Please continue to Free^TM^ yourself from British "nonsense", while the rest of the world evolves.

load more comments (7 replies)
[–] [email protected] 12 points 9 months ago (1 children)

I use jiffies to refer to clock speed.

load more comments (1 replies)
[–] [email protected] 8 points 9 months ago (1 children)

The Indians use Crore and Lakh

[–] [email protected] 5 points 9 months ago

They use those for everything

[–] [email protected] 34 points 9 months ago (1 children)

why go for RAMs when the constitution says ARMs...

and no more bits or bytes too, double bytes small or quadbytes regular size all the way.

  • kilo bytes is a grand

  • mega bytes is a venti

  • giga bytes is a grand venti

  • terabytes is a doble venti

really large amounts of ARM is a ton

load more comments (1 replies)
[–] [email protected] 4 points 9 months ago* (last edited 9 months ago) (3 children)

I'm surprised there aren't more suggestions which use intentionally-similar abbreviations. The American customary system is rich with abbreviations which are deceptively similar, and I think the American computer memory units should match; confusion is the name of the game. Some examples from existing units:

  • millimeter (mm) vs thou (mil)
  • meter (m) vs mile (mi)
  • kilo (k) vs grand (G)
  • kilonewtons (kN) vs knots (kn)
  • statute mile (m/sm) vs survey mile (mi) vs nautical mile (NM/nmi) vs nanometer (nm)
  • foot (ft) vs fathom (ftm)
  • chain (ch) vs Switzerland (ch)
  • teaspoon (tsp) vs tablespoon (tbsp)
  • ounce (oz) vs fluid ounce (fl oz) vs troy ounce (ozt) vs Australia (Ozzie)
  • pint (pt) vs point (pt)
  • grain (gr) vs gram (g)
  • Kelvin (K) vs Rankine (R; aka "Kelvin for Americans")
  • short ton (t) vs long ton (???) vs metric tonne (t) vs refrigeration ton (TR)
[–] [email protected] 2 points 9 months ago* (last edited 9 months ago) (4 children)

The knot is non-SI but perfectly metric and actually makes sense as a nautical mile is exactly one degree meridian. kn also doesn't clash with kN, Newtons are always written with capital N. Capitalisation generally matters. No standard abbreviation exists for nautical miles but definitely don't use nm because ~~newton~~nano metres.

That is, if you take all those colonial units out of there suddenly you're left with SI units and things that work well with SI units.

Oh and a pint is 500ml, a pound is 500g, a hundredweight is 50kg (because 100 pound), and a teaspoon is rather approximate because everyone outside of North America will use an actual spoon you stir tea with. The important part is not the precise amount but distinguishing it from "a pinch" etc. I guess by extension ounces should be 25ml and 25g. While we're at it: An inch is 25mm, and a foot an even 1/3rd of a metre while a yard is exactly one metre.

Did you know that a Newton metre is about exactly one chocolate bar metre? The work it takes to lift it in about standard gravity, that is. Very intuitive.

t for ton is a quirk in SI, you can use Mg if you want. There's also other SI-adjacent strangeness such as the hectare, which is one hecto-are: While SI has meters for length and litres for volume somehow the are isn't official for area.

load more comments (4 replies)
load more comments (2 replies)
[–] [email protected] 164 points 9 months ago (2 children)

How about feet of IBM punch cards?

A 1 foot tall stack holds 1,647,360 bits of data if all 80 columns are used. If only 72 columns are used for data then it's 1,482,624 bits of data and the remaining columns can be used to number each card so they can be put back in order after the stack is dropped.

[–] [email protected] 25 points 9 months ago

THIS is what I’m talking about!

[–] [email protected] 42 points 9 months ago (1 children)

I like this because the amount of bits in a stack can vary depending on whose foot you use to measure, or the thickness of the card stock.

load more comments (1 replies)
[–] [email protected] 30 points 9 months ago (3 children)

From smallest to biggest:

Bits (basic unit)

Bytes (8:1 reduction)

Words (4:1 reduction)

KiB (32:1 reduction)

MiB (1024:1)

GiB (1024:1)

TiB (1024:1)

PiB (1024:1)

A normal amount of porn (237:1)

[–] [email protected] 4 points 9 months ago

Words aren't always four bytes

[–] [email protected] 14 points 9 months ago* (last edited 9 months ago) (2 children)

All definitely not metric as metric uses steps of 1000 (and there's also 10 and 100 and 1/10th and 1/100th but that doesn't extend to 10000 and 1/10000th).

The KiB, MiB, etc, the 2^10 scale is called binary prefixes (as opposed to decimal prefixes KB, MB, etc) and standardised by the IEC.

And while the B in KiB is always going to mean eight bits it's not a given that a byte is actually eight bits, network people still use "octet" to disambiguate because back in the days there were plenty of architectures around with other byte sizes. "byte" simply means "smallest number of bits an operation like addition will be done in" in the context of architectures. Then you have word for two bytes, d(ouble)word for four, q(uad)word for eight, o(cto)word for 16, and presumably h(ex)word for 32 it's already hard to find owords in the wild. Yes it's off by one of course it's off by one what do you expect it's about computers. There's also nibble for half a byte.

EDIT: Actually that's incorrect word is also architecture-dependent, the word/dword/qword sequence applies to architectures (like x86) which went from being 16-bit machines to now being 64 bit while keeping backwards compatibility. E.g. RISC-V uses 32-bit words, 16 bits there are a half-word.

The bit, at least, is not under contention everyone agrees what it is. Though you can occasionally see people staring in wild disbelief and confusion at statements such as "this information can be stored in ~1.58 bits". That number is ~ log~2~ 3, that is, the information that fits in one trit. Such as "true, false, maybe".

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 2 points 9 months ago

An Uvalde is the memory equivalent of PCM 48 kHz sample rate of children screaming.

[–] [email protected] 0 points 9 months ago* (last edited 9 months ago)

KiB, MiB, GiB, TiB

load more comments
view more: ‹ prev next ›