Barcodes are an underapprecated technology for amateur projects in general. The technology is error-resistant, mature and reliable in a hardware sense, cheap at the entry level and cheap to deploy at scale, etc. I got a surplus commercial Zebra/Symbol 2D/3D barcode scanner gun with dock (or it also talks bluetooth, USB, or naturally RS232) for $35 and a new OEM battery was $15, and tbh you could just have used a smartphone with an app instead if I didn't want the speed and reliability of the scanner gun. Barcodes are the cost of a sheet of printer paper and some tape (or sticker paper if you want to be fancy!) and are an extremely accessible and tactile way to operate all kinds of systems (a barcode doesn't have to be a "thing", it can represent an "action" too) via a control server, same as via an app. Pressing a button in an app is way slower and more cumbersome than scanning a barcode on the wall that says "advance belt to next item", a scanner gun is an enormously fast and tactile UX, and RS-232 and other low-level interfaces make it easy to tie into other stuff. It's a fantastic project tool that is really underexploited compared to "everything is ESP32 on the network".
The bar-code and shipping container are probably some of the greatest inventions of the 20th century, and unlike a shipping container it's completely appropriate and accessible to individuals for messing around with projects.
(no, your shipping container home is not actually a good idea)
I've never thought about how it works on a technical level, but my guess is you just draw a random line across the image field and the widths of the barcode encoding characters are designed such that the dot-dash pattern produces distinct beat frequencies as the laser traverses. Your "software" is basically a FFT transform and then you look for your target pattern within your designed beat frequency range, so as long as the beam will randomly cross the barcode a reasonable amount the signal will pop out of the noise, and it's completely irrelevant which direction you go (although you do need to go along it not across it - hence it being wide and not square). Yeah it's not zero computational power but by the 70s you can bring a shitty fixed-function FFT chip to market for cheap enough, with the CMOS revolution and all.
People underestimate how much can be done with spectrographic watermarks like that, they're resistant to scaling (because harmonics), rotation and flipping (because it's not about any one position... it's about the beat frequencies between them), translation (of course), etc. That's iirc how the Eurion Constellation works - the patterns form a spectrographic fingerprint, but in 2D instead of just a 1D beat frequency. But it pops right out of a fft so you can put it into random copiers and printers.
I went to look up a source to describe the Eurion Constellation scheme (I'm not sure if an academic description exists given the commercial and sensitive nature?) and they brought up the practice of microprinting (of the super fine lines) and that probably is detectable with FFT and edge detection.
QR codes are much less resilient to interference. Barcodes can be easily read on flexible material and handle glare and obstructions quite well. QR codes need to remain flat and are very error prone if even a small bit of the pattern is blocked.
The bar-code and shipping container are probably some of the greatest inventions of the 20th century, and unlike a shipping container it's completely appropriate and accessible to individuals for messing around with projects.
(no, your shipping container home is not actually a good idea)