Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2019, 05:08 AM
guestchaz is offline
Guest
 
Join Date: May 2011
Location: boise idaho
Posts: 2,062

A question about bar codes and qr codes


What information can be coded with each, for instance I know a bar code can be read by machine to mean "peaches canned delmonte 16oz" at the piggly wiggly or "jeans wrangler 33x40" at the local farm fuel feed and sundries and I've seen qr codes on all the cars at the auction.

But can I scan a copy of "Where The Sidewalk Ends" and have the computer spit out a barcode or qr code that another computer would read out as the text of that book? Or perhaps a copy of Picasso's Guernica?
__________________
"Don't be too proud of this ideological terror you've constructed."
J. "Eddie" Wanabe,
Rebel Scum, United States

Last edited by guestchaz; 02-25-2019 at 05:09 AM.
  #2  
Old 02-25-2019, 05:14 AM
FinsToTheLeft is offline
Member
 
Join Date: Nov 2010
Location: Toronto, Ontario
Posts: 487
A QR code can contain 4290 alpha numeric characters, so you can encode anything you can fit in there. UPC codes on products only contain the UPC number, the scanner has to do a lookup on a database to find out that it’s a can of peaches and it is priced at $1.29.

Last edited by FinsToTheLeft; 02-25-2019 at 05:16 AM.
  #3  
Old 02-25-2019, 05:18 AM
Khendrask is offline
Guest
 
Join Date: Feb 2010
Location: Nowhere, South Carolina
Posts: 724
A barcode only encodes a number. Usually, that number is printed right under the bar code, so no... no book.

The highest (current) density QR code can store about 7000 numbers, OR about 4300 Alphanumeric characters, OR about 3000 8 bit bytes of data. Enough for perhaps a synopsis, or more usually, a link to a site with the text of the book, but not a book by itself.
  #4  
Old 02-25-2019, 06:39 AM
guestchaz is offline
Guest
 
Join Date: May 2011
Location: boise idaho
Posts: 2,062
Ah, ok. Just wondered because I saw a barcode used as art yesterday (huge, framed and glazed) and it made me wonder.
__________________
"Don't be too proud of this ideological terror you've constructed."
J. "Eddie" Wanabe,
Rebel Scum, United States
  #5  
Old 02-25-2019, 07:03 AM
leahcim is online now
Member
 
Join Date: Dec 2010
Location: Boulder, CO
Posts: 3,594
Quote:
Originally Posted by Khendrask View Post
A barcode only encodes a number. Usually, that number is printed right under the bar code, so no... no book.
That number is usually GTIN blocks of which are assigned by GS1 to various retailers to give unique numbers to their products. So the mapping from "024000010623" to "Del Monte Peaches 16OZ" happens externally.

You can look up information about specific codes at: http://gepir.gs1.org/index.php/search-by-gtin . For example, it shows that all codes that start with 02400 are Del Monte products.
  #6  
Old 02-25-2019, 07:13 AM
enipla is offline
Member
 
Join Date: Jul 2001
Location: Colorado Rockies.
Posts: 13,871
Quote:
Originally Posted by leahcim View Post
That number is usually GTIN blocks of which are assigned by GS1 to various retailers to give unique numbers to their products. So the mapping from "024000010623" to "Del Monte Peaches 16OZ" happens externally.
Yep. This way than can manage stock and know when to order more as well as change the price on the fly. It's all in an external database.
__________________
I don't live in the middle of nowhere, but I can see it from here.
  #7  
Old 02-25-2019, 10:30 AM
Zyada is offline
Guest
 
Join Date: Apr 1999
Location: Foat Wuth!
Posts: 5,003
Hit save too soon...

Last edited by Zyada; 02-25-2019 at 10:31 AM.
  #8  
Old 02-25-2019, 10:30 AM
Dickerman is offline
Guest
 
Join Date: Aug 2007
Location: Pacific NW
Posts: 426
Different bar code symbologies have different character sets. Some symbologies only encode numbers, while others include alphabetic and other characters. Some have different modes that determine the character set. So it all depends on which symbology is used.

Last edited by Dickerman; 02-25-2019 at 10:32 AM.
  #9  
Old 02-25-2019, 10:56 AM
Zyada is offline
Guest
 
Join Date: Apr 1999
Location: Foat Wuth!
Posts: 5,003
Aww, man. I was going to explain how you got from a bar code to "peaches canned delmonte 16oz", but it's already been done.

Instead, I'll tell a story related to this. I used to work in IT for a major craft chain which sold puzzles (among other things). Puzzles were sold to us in thematic assortments: landscapes, castles, fantasy, etc.

We actually had two fields to store descriptions - the full description, and a shorter description to be printed on receipts. We usually got the regular description from the vendor, and the system would generate the shorter description. The people who were responsible for putting new items into the database were supposed to verify that the shorter description was good. That didn't always happen.

Which is how someone in the deep south got a receipt that said something along the lines of "Scenic Castle Ass" This had to be fixed right away, so I did the change. I also searched for other items that could have the problem.

My favorite is still "Fuzzy Kitten Ass"
  #10  
Old 02-25-2019, 11:25 AM
RaftPeople is offline
Guest
 
Join Date: Jan 2003
Location: 7-Eleven
Posts: 6,475
Quote:
Originally Posted by Khendrask View Post
A barcode only encodes a number. Usually, that number is printed right under the bar code, so no... no book.
A barcode can encode anything you want, numbers, letters, etc., but due to the physical presentation, the number of characters is limited. For example, a code 128 barcode has a maximum of 48 characters.

A 2D barcode encodes information vertically as well as horizontally, which allows for more character density. You can see examples on parcel carriers shipping labels like FedEx.

A QR code is just one type of 2D barcode.
  #11  
Old 02-25-2019, 01:01 PM
RaftPeople is offline
Guest
 
Join Date: Jan 2003
Location: 7-Eleven
Posts: 6,475
Quote:
Originally Posted by leahcim View Post
That number is usually GTIN blocks of which are assigned by GS1 to various retailers to give unique numbers to their products.
Slight correction: typically the UPC/GTIN is assigned by the company that created the product and the retailers just use that UPC/GTIN. In other words, retailers like Macy's or Amazon don't typically assign the UPC/GTIN for items purchased from vendors.
  #12  
Old 02-25-2019, 01:34 PM
scr4 is offline
Guest
 
Join Date: Aug 1999
Location: Alabama
Posts: 15,427
Quote:
Originally Posted by FinsToTheLeft View Post
A QR code can contain 4290 alpha numeric characters,....
But that's the largest version of the QR code, which looks like this. And with the least amount of error correction.

Which is why QR codes are generally used to communicate a web address or some code (e.g. package tracking number) rather than containing a lot of useful information by itself.

Last edited by scr4; 02-25-2019 at 01:36 PM.
  #13  
Old 02-25-2019, 02:21 PM
Musicat is offline
Charter Member
 
Join Date: Oct 1999
Location: Sturgeon Bay, WI USA
Posts: 20,922
I could answer most of the questions here, but I waited 8 hours to see this thread and they have already been answered. SDMB is just too fucking fast.

I learned about multiple barcodes when I programmed a S100 circuit board to read all of the codes in use at the time, and to drive any dot-matrix printer to print each as well. Quite an experience.

We thought we'd sell thousands, but we only sold 3 of them. I guess the time wasn't right for mass use.
  #14  
Old 02-25-2019, 02:40 PM
Darren Garrison's Avatar
Darren Garrison is offline
Guest
 
Join Date: Oct 2016
Posts: 9,802
Quote:
Originally Posted by guestchaz View Post
But can I scan a copy of "Where The Sidewalk Ends" and have the computer spit out a barcode or qr code that another computer would read out as the text of that book?

Give this a scan.
  #15  
Old 02-25-2019, 05:14 PM
FinsToTheLeft is offline
Member
 
Join Date: Nov 2010
Location: Toronto, Ontario
Posts: 487
Quote:
Originally Posted by Zyada View Post

My favorite is still "Fuzzy Kitten Ass"
Many years ago I bought my wife a present from my local jewellery store which bore the name of its proprietor, for the sake of the example his name was Ben Cohen. On my visa bill the description appeared as “BEN COHEN JEW”
  #16  
Old 02-25-2019, 05:17 PM
FinsToTheLeft is offline
Member
 
Join Date: Nov 2010
Location: Toronto, Ontario
Posts: 487
Quote:
Originally Posted by scr4 View Post
But that's the largest version of the QR code, which looks like this. And with the least amount of error correction.

Which is why QR codes are generally used to communicate a web address or some code (e.g. package tracking number) rather than containing a lot of useful information by itself.
The last time I renewed my Canadian passport, you filled out the form with Adobe Reader and then printed it for submission. All of the entered data appeared in the QR code so the scanner didn’t even have to OCR the page
  #17  
Old 02-25-2019, 09:12 PM
xnylder is offline
Guest
 
Join Date: Aug 2003
Location: Montreal, Quebec, Canada
Posts: 1,039
Quote:
Originally Posted by Darren Garrison View Post
Give this a scan.
Beautifully done.

Since the question's been answered, here's a solution that's got even more information in a compact package: The complete works of Shakespeare encoded inside a .jpg file.

Last edited by xnylder; 02-25-2019 at 09:12 PM.
  #18  
Old 02-26-2019, 10:11 AM
rock party is offline
Guest
 
Join Date: Jul 2006
Posts: 668
I've always wondered how much info is encoded on a barcode. Like the particular batch of canned peaches...where they were distributed to, ect. I'm thinking about something like the Tylenol poisoning. Could you find out where the product came from just from the barcode. Or if you return the canned peaches to a different store..could they say, "nope, wasn't purchased here!"
  #19  
Old 02-26-2019, 10:55 AM
leahcim is online now
Member
 
Join Date: Dec 2010
Location: Boulder, CO
Posts: 3,594
Quote:
Originally Posted by rock party View Post
I've always wondered how much info is encoded on a barcode. Like the particular batch of canned peaches...where they were distributed to, ect. I'm thinking about something like the Tylenol poisoning. Could you find out where the product came from just from the barcode. Or if you return the canned peaches to a different store..could they say, "nope, wasn't purchased here!"
From the standard UPC/GTIN-12 code, none of that. Generally the first half of the code is the manufacturer, and the second half is the specific item from that manufacturer.

Manufacturers can choose to put more complex information on their packaging, but that wouldn't be in the UPC.
  #20  
Old 02-26-2019, 11:05 AM
bump is offline
Guest
 
Join Date: Jun 2000
Location: Dallas, TX
Posts: 17,061
Quote:
Originally Posted by RaftPeople View Post
A barcode can encode anything you want, numbers, letters, etc., but due to the physical presentation, the number of characters is limited. For example, a code 128 barcode has a maximum of 48 characters.

A 2D barcode encodes information vertically as well as horizontally, which allows for more character density. You can see examples on parcel carriers shipping labels like FedEx.

A QR code is just one type of 2D barcode.
Yep. At my last job, one of the things we implemented was new pharmacy software, and we had the option of getting linear or 2D barcode readers. Linear (Code 128, I believe) readers could read the NDC code off the bottles, while the 2d codes had room for a lot more- lot number and expiration date, for example.
  #21  
Old 02-26-2019, 11:39 AM
Chronos's Avatar
Chronos is offline
Charter Member
Moderator
 
Join Date: Jan 2000
Location: The Land of Cleves
Posts: 81,825
xnylder, that's not really a compact package: The image itself might look small, but all of the heavy lifting is done by the headers that you don't see on your screen. You could make the visible part of the image anything you want, including something super-tiny like 64 pixels, but the filesize would still be the size of the complete works of Shakespeare (zip compressed).
  #22  
Old 03-01-2019, 06:08 PM
Derleth is online now
Guest
 
Join Date: Apr 2000
Location: Missoula, Montana, USA
Posts: 21,003
Quote:
Originally Posted by xnylder View Post
Beautifully done.

Since the question's been answered, here's a solution that's got even more information in a compact package: The complete works of Shakespeare encoded inside a .jpg file.
The visible image is small but the file size is... well, not huge because English text compresses pretty well, but a lot bigger than an image that small would normally be.

In short, most of the file is dead weight as far as putting image on the screen, and that dead weight is the complete works of Shakespeare.
  #23  
Old 03-02-2019, 08:40 PM
TokyoBayer's Avatar
TokyoBayer is online now
Guest
 
Join Date: Oct 2003
Location: Taiwan
Posts: 9,945
Quote:
Originally Posted by rock party View Post
I've always wondered how much info is encoded on a barcode. Like the particular batch of canned peaches...where they were distributed to, ect. I'm thinking about something like the Tylenol poisoning. Could you find out where the product came from just from the barcode. Or if you return the canned peaches to a different store..could they say, "nope, wasn't purchased here!"
If you read through this thread, you can discover that the importance of barcodes is that they can refer you to databases. There is absolutely no need to encode distribution information in a barcode. Zero.

For current manufacturing processes, it would be a nightmare and add complexity and make many, if not most products unprofitable.

The inefficiencies introduced would drive process engineers into insane asylums. Instead of printing boxes in batches of thousands or tens of thousands, you have to break the batches up for each individual store. Then store then. Then make sure that the right box goes to the right place.

Manufacturing in bulk just dies. Everyone becomes manufactured after an order. Then shipped from China. Etc. etc. etc. And everything needs to be separated and tracked.

Products with individual serial numbers can be tracked now. It simply makes no economic sense to do that with cans of peaches.
  #24  
Old 03-02-2019, 09:54 PM
Musicat is offline
Charter Member
 
Join Date: Oct 1999
Location: Sturgeon Bay, WI USA
Posts: 20,922
Quote:
Originally Posted by TokyoBayer View Post
If you read through this thread, you can discover that the importance of barcodes is that they can refer you to databases. There is absolutely no need to encode distribution information in a barcode. Zero.
Agreed, and to elaborate...

It is axiomatic in database management that info not be duplicated, but referenced. As long as you can provide a unique product identifier, no additional info needs to be encoded on the product itself, as it can be looked up (and maintained) elsewhere.

OTOH, it is theoretically possible to encode anything and everything you want in a barcode as long as the character set allows (some character sets are numeric only). A colleague and I once devised a barcode that allowed the complete (at the time) ASCII 127 character set to be printed and read. It was intended to make short programs -- in languages such as Assembly or Basic -- cheaply printable in magazines or flyers. The recipient could enter the entire program to his computer by scanning a few lines on a page in seconds.

It worked very well, but was eclipsed by the decreasing cost and universality of portable media plus the increasing length of programs.
  #25  
Old 03-03-2019, 10:19 AM
Darren Garrison's Avatar
Darren Garrison is offline
Guest
 
Join Date: Oct 2016
Posts: 9,802
Quote:
Originally Posted by Musicat View Post
A colleague and I once devised a barcode that allowed the complete (at the time) ASCII 127 character set to be printed and read. It was intended to make short programs -- in languages such as Assembly or Basic -- cheaply printable in magazines or flyers. The recipient could enter the entire program to his computer by scanning a few lines on a page in seconds.

You could have marketed your own barcode reader, called the Musicuecat.
  #26  
Old 03-03-2019, 12:47 PM
Musicat is offline
Charter Member
 
Join Date: Oct 1999
Location: Sturgeon Bay, WI USA
Posts: 20,922
Quote:
Originally Posted by Darren Garrison View Post
You could have marketed your own barcode reader, called the Musicuecat.
Good idea, only 40 years too late. And we would have probably been sued by CueCat, another good idea that failed.

(On retrospect, since :CueCat came 20 years later, maybe we would have sued them!)

We actually did market a product which we called the Bartender, which was able to read 7 common codes in use at the time, including the ASCII-complete code, which we called Bytewrite. The device also provided a data stream for any of the 7 barcodes, data that could be used to drive any printer that could be addressed by simple coordinates, like a dot-matrix graphic device.
  #27  
Old 03-03-2019, 01:24 PM
Ranger Jeff is offline
Guest
 
Join Date: Apr 2013
Posts: 6,848
Where I once worked there were SKU numbers. A long SKU and a short SKU.

https://jumbotron-production-f.squar...98422da8cd.png
  #28  
Old 03-03-2019, 01:26 PM
Darren Garrison's Avatar
Darren Garrison is offline
Guest
 
Join Date: Oct 2016
Posts: 9,802
Quote:
Originally Posted by Musicat View Post
We actually did market a product which we called the Bartender, which was able to read 7 common codes in use at the time, including the ASCII-complete code, which we called Bytewrite.

Actually (smugly correcting the guy who worked on it) it could read 8 of them.
  #29  
Old 03-03-2019, 02:06 PM
Tim@T-Bonham.net is offline
Charter Member
 
Join Date: Mar 2003
Location: Minneapolis, MN
Posts: 14,661
Quote:
Originally Posted by rock party View Post
I've always wondered how much info is encoded on a barcode. Like the particular batch of canned peaches...where they were distributed to, ect. I'm thinking about something like the Tylenol poisoning. Could you find out where the product came from just from the barcode. Or if you return the canned peaches to a different store..could they say, "nope, wasn't purchased here!"
No, it can't. (Pr at least, it isn't done that way.)

The can labels with the barcode already on them are produced by a printing company, thousands at a time, long before the peaches have even been picked. Then they are applied to the outside of cans after they are packed & sealed. (Every once in a while there is a story about a customer opening a can of peaches and finding plums inside -- wrong batch of labels used.) It wouldn't be economical to do it any other way.

But the expiration date information is added to the label or the end of the can as it comes off the production line. That often contains other information, like the plant, date, & shift that produced it, sometimes even the specific canning machine. That can be used by the producer to identify the source. (That's why when you complain about a bad or contaminated product, the company will generally ask you to send them the entire package that it came in, so that they can get those production codes.)
  #30  
Old 03-03-2019, 03:22 PM
leahcim is online now
Member
 
Join Date: Dec 2010
Location: Boulder, CO
Posts: 3,594
Quote:
Originally Posted by Ranger Jeff View Post
Where I once worked there were SKU numbers. A long SKU and a short SKU.

https://jumbotron-production-f.squar...98422da8cd.png
SKU codes are not, in general, mean to be universal identifiers. The format, and what they mean is internal to a specific manufacturer/retailer.
  #31  
Old 03-03-2019, 03:52 PM
Musicat is offline
Charter Member
 
Join Date: Oct 1999
Location: Sturgeon Bay, WI USA
Posts: 20,922
UPC-E, a subset of UPC, was developed for use on very small items, like a pack of gum or a Lifesavers roll. Obviously it encoded less info than a longer code, since space was at a premium more then than now, but it worked. I am not up to speed on modern code specs, but I'm sure they are more liberal and flexible.
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:04 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.

Send questions for Cecil Adams to: cecil@straightdope.com

Send comments about this website to: webmaster@straightdope.com

Terms of Use / Privacy Policy

Advertise on the Straight Dope!
(Your direct line to thousands of the smartest, hippest people on the planet, plus a few total dipsticks.)

Copyright © 2018 STM Reader, LLC.

 
Copyright © 2017