I know these sound super fucking boring but they are actually pretty interesting.
First, error correction - what is it?
Essentially, it dictates how much redundant information is stored in the code to ensure it remains readable even when part of it is missing.
This is pretty amazing - If your code is outdoors you can choose a higher redundancy level to make sure it still functions when obscured.
(try it)
Second, the mask - what's that?
Well, QR readers work best when there are the same amount of white and black areas.
But the data might not play ball so a mask is used to even things out.
When a mask is applied to the code anything that falls under the dark part of the mask is inverted.
A white area becomes black and black area becomes white.
There are 8 standard patterns which are applied one by one.
The pattern that achieves the best result is used and that info is stored so the reader can unapply the mask.
Finally we get to the actual data.
Weirdly, the data starts at the bottom-right corner and winds back up like pictured.
It almost doesn't matter where it starts because it can be read at any angle.
The first chunk of information here tells the reader what mode the data was encoded in and the second tells it the length.
In our case each character takes up 8 bit chunks, otherwise known as bytes, and there are 24 of them.
There is still a bunch of left over space after our data.
This is where the error correction information is stored so that it can be read if partially obscured. The way this works is actually really really complex so I'll leave that out.
That's basically it!
For the absolute nerds who made it here, a fun fact:
Perhaps the coolest thing about QR codes is that Denso Wave, the company that invented them, never exercised their patent and released the technology for free!
Before we all mute the word 'dithering' I thought I'd explain a little bit about why we needed to dither digital images in the first place.
Although it's an aesthetic now, we used to need dithering to trick our eyes into seeing more colors than were actually there. 👇
So in the early days of computing, memory was scarce and we couldn't store a lot of color detail.
To get around this we used limited palettes with lookup tables or really low bit depth colors, to reduce the number of colors in an image, also called quantization.
The problem with quantization is it creates hard steps where there should be gradual gradients - we don't have a color in between these.
This is where dithering comes in. We can approximate this gradient by adding some noise with the two neighbouring colors.
Excited to finally share what I've been working on.
Introducing Detax, a comprehensive suite of automated tax avoidance and money laundering tools. Our goal is to revolutionise the financial fraud industry by bringing it into the 21st century.
Why are some typefaces harder to read than others at the same font-size?
Well, it has a lot to do with x-height but of course it's a bit more complicated than that: ↓
You probably know this already but the x-height of a typeface is the difference between the baseline and the height of the lowercase letters.
We can also think of x-height as a ratio of the total cap height or body height.
Typically we use the letter x to determine this, hence the name.
Interestingly, curved lowercase letters like a, c, and e are often slightly taller than the x-height. They purposefully overshoot so that they appear the same visual height as x, v, w, and z.