The first use of barcodes was to label railroad cars , but they were not commercially successful until they were used to automate supermarket checkout systems , a task in which they have become almost universal . The first use of barcodes was to label railroad cars , but they were not commercially successful until they were used to automate supermarket checkout systems , a task for which they have become almost universal .