Dealing with GS-1 and Amazon

I have gone and joined GS-1 and got barcode numbers.

This is a shame in some ways, but Amazon seem to be insisting on GS-1 checks. It looks increasingly like the listing I got with a re-sold UPC code for a pack of cards was somehow a fluke.

It is a simple process and you get codes instantly, but that does not help as apparently the on-line checker does not show instantly (WTF not?) and you do not get a "certificate" for a couple of days (again, WTF not?).

So even with a GS-1 prefix I cannot list anything else on Amazon (yet). Stupid or what.

I appreciate the orders for my first deck of cards, and the reviews, thank you all. Keep 'em coming.

However, I noticed something odd on GS-1 which I had not seen before. They list the codes you have (and even, helpfully, have worked out the check digit, which is not hard).

But they do not provide the graphic/artwork for the barcode simply. You have to click some button to ask for it. OK, but then it says I have "3 image credits" and can "buy more".

Hang on, seriously, they will make bar code images for £7 to £16 quit per image?

Making a barcode image is not hard, seriously. I did this in school in the early '80s (I sold RML some s/w to scan UPC and EAN codes as well when in sixth form). But it really is not hard. I have a simple program to do it, and it can even be coded in raw postscript.

Seriously - this is how much work it is in postscript, with checksum calculation... Why charge for images at all for "members". How is that the behaviour of a non-profit members organisation, really?

%%BoundingBox: 0 0 132 120
% EAN Bar code printing system
/EAN_dict 20 dict def EAN_dict begin
/w 1 dup dtransform exch round exch idtransform pop def
/h 60 def % point size height of bars
/m[{3 2 1 1}{2 2 2 1}{2 1 2 2}{1 4 1 1}{1 1 3 2}
   {1 2 3 1}{1 1 1 4}{1 3 1 2}{1 2 1 3}{3 1 1 2}]def
/r[[0 0 0 1 1 1][0 0 1 0 1 1][0 0 1 1 0 1][0 0 1 1 1 0][0 1 0 0 1 1]
   [0 1 1 0 0 1][0 1 1 1 0 0][0 1 0 1 0 1][0 1 0 1 1 0][0 1 1 0 1 0]]def
/b 1000 array def
/lhs 10 array def
/rhs 10 array def

/EAN_ck{% str with ? EAN_ck string
 dup[exch dup{48 sub}forall pop 0 9 7 counttomark 4 sub
 {dup 5 -1 roll mul 4 -1 roll add 3 1 roll exch
 }repeat pop pop 10 mod exch dup length 1 sub 3 -1 roll 48 add put pop
}bind def

/EAN{EAN_dict begin
 [exch{48 sub}forall counttomark /l exch def
 l 13 eq{13 -1 roll r exch get /rr exch def}if/p l 2 idiv def
 rhs 0 p getinterval astore pop lhs 0 p getinterval astore pop pop
 [1 1 1 0 1 p 1 sub l 13 eq
 {{lhs 1 index get m exch get exec 5 -1 roll rr exch get 1 eq{2 1 4{-1 roll}for}if}for}
 {{lhs exch get m exch get exec}for}ifelse
 1 1 1 1 1 0 1 p 1 sub{rhs exch get m exch get exec}for
 1 1 1 counttomark b 0 3 -1 roll getinterval astore true exch
 {w mul exch
  {gsave 0 h rlineto dup 0 rlineto 0 h neg rlineto
   closepath fill grestore false}{true}ifelse exch 0 rmoveto
 }forall pop pop
end}bind def

/EANP{EAN_dict begin gsave
 gsave dup EAN_ck EAN grestore 0 -5 rmoveto w 1 scale
 /OCRB findfont dup setfont(0)stringwidth pop 7 exch div
 scalefont setfont
 dup length 2 mod 1 eq{
  dup 0 1 getinterval dup stringwidth pop neg 0 rmoveto show
  dup length 1 sub 1 exch getinterval}if 3.5 0 rmoveto
 dup length 2 idiv 1 index 0 2 index getinterval 3 1 roll dup getinterval
 exch 2{gsave 1 setgray
  dup length 7 mul dup 0 rlineto 0 10 rlineto neg 0 rlineto closepath fill
  gsave dup show grestore length 7 mul 4 add 0 rmoveto
grestore end}def

% This is an example :-
%36 dup moveto (5060319060290) EANP showpage

Seriously - if there is a market for this I will be happy to do it for £1 a go, LOL!

Update: I used their £16 a shot tool (well I had three credits) to make one. It took over 10 seconds to make (WTF). It makes an EPS which looks like this...

So I ran my C code to make this which makes an SVG and comes out much nicer, actually uses OCR-B, and works just as well. Took 4ms user time to run. I mean really, WTF are they doing?!?


Trying out Amazon...

As you probably know, at A&A, we sell mostly things like broadband and telecoms as services, but there are a number of things that are just stock items that we sell (everything from routers, splitters, cuddly dragons to ISP grade Firebrick costing tens of thousands). So we thought it may be an idea to try out Amazon and see how it works as some things may be better and more convenient sold through Amazon.

Time consuming and tedious at first

To start with, it was quite time consuming and tedious to set up the seller account. They don't just want company details, but also passport numbers and expiries of all beneficial owners of the company, scans of passport, scans of bank statement to prove account number, credit card number, the works. It probably took me a couple of hours to sort that all.

Listing a product

Listing a product is not too hard. It involved a title, description, images, and so on. It was not entirely clear what each field did in terms of the listing, but easy to play around and learn how it goes.

As an experiment we decided to list something simple to start with, as this is a bit of a test to see how well it all works. Some playing cards (please buy some). These are actually the ones from my previous blog post, which A&A are selling now.

Of course anyone that got them free from me are welcome to leave an Amazon review - the funnier the better.

Fulfilled by Amazon

One of the things we wanted to experiment with is the whole "fulfilled by Amazon" thing, where they hold the stock for you. Now this has costs, related to the volume of the item, so playing cards are a good test for this. I suspect cuddly dragons are not so good.

To my surprise that was easy. I had to update the listing with weight, and dimensions. I had to advise the overall weight and dimensions for the box of 50 packs we are sending. It ended up with a shipping label to print. UPS collected later that day. 24 hours later, Amazon are selling!

It is meant to shows as Amazon Prime as well, not sure if I have missed something or being impatient on that one. It could also be I set the price a tad too low to make sense for 1-click and prime. I'll see if I can work that one out. I can see Amazon Prime being useful for things like DSL routers and splitters and so on. [update: increasing price by 99p means it is now 1-click and prime, but I could not find the help to tell me what the price has to be for this.]

The hard part - barcodes!

It turns out product barcodes are a bit of a complicated area!

There is a group (GS-1) that manages product bar codes world wide. Wikipedia explains it a bit.

It seems that, until 2002, you could buy a block of barcodes and they were yours forever and nothing prohibited you from reselling them to others. This is the sort of model I like for such things personally. There are some rules or guidelines on things like barcode reuse after a product is discontinued, but it is all pretty simple.

However, these days, you have to be a member of GS-1, on an ongoing basis, and so you effectively rent the barcodes.

However, if you google, you will see that loads of people sell barcodes, outright, for quite reasonable prices. So I bought some. Simples.

Is this legit? Well yes, from what I can tell, as these pre-2002 barcodes could be sold and re-used, so that is all that is happening.

However, it seems Amazon have a bit of an issue. They use barcodes, these UPC and EAN unique barcodes, to track stock. Indeed, if a barcode is issued to a product they will treat all stock of that product the same and interchangeable. When you create a listing you, ideally, need to give them the UPC or EAN barcode number. (There are other ways with labels on the product with Amazon issued codes).

So why is that an issue. Well, the problem is that you can just make these up. Amazon seem to accept any barcode they don't yet have in inventory. So even if you have barcodes, you can find some Chinese company has effectively hijacked them and so you cannot list your items on Amazon. Apparently Amazon can fix this, but apparently it is a hell of a lot of work.

It also turns out that it does not matter if you got barcodes directly from GS-1 or from some reseller. Indeed, it seems, the resellers check on Amazon first to eliminate any that have been hijacked. I do not know if GS-1 do the same.

As it happens, having bought 100 barcodes in March, most are now magically allocated to clothing or iPhone cases on Amazon! I did not realise this at first, as my listing for the above pack of cards using a barcode printed on the pack, works. But there was a slight clue - the control pages for setting up the listing showed this image...

That is, perhaps, a clue that someone had tried to do a listing using that code (for a dress?).

Now I come to trying to list the A&A decks of cards I find the code is not available as it is an iPhone case! This is a tad infuriating as we printed the barcode we allocated on the box! Not being listed on GS-1 as the owner, I cannot even go through the apparently time consuming process of disputing with Amazon, I don't think.

My only choice will be another barcode, and stickers on the packs (or, Amazon can do labels that go on the product for you, which would be a shame on my nicely designed boxes). I think I would rather do the stickers myself...

So what can be done?

Well, Amazon have a solution, it seems. They plan to only accept UPC/EAN codes where the manufacturer matches what GS-1 have listed. This means, apparently, these older re-sold barcodes won't work. What is odd is that, just yesterday, one did work, one we got.

If Amazon do actually go through with this new policy, even if just for new listings, that should stop the hijacked barcodes happening. However, it will mean we have to join the club and pay the ongoing fees to have directly GS-1 allocated codes, which is a shame. What we hope is that existing, legitimate, re-sold barcodes are not suspended on the Amazon site, which may possibly happen one day I guess. At this point that only impacts selling some playing cards for a bit of fun, which is why I am glad we did an experiment on this.

Even so, I can see people selling stuff, using made up barcodes, simply telling Amazon the item they are selling is "manufactured by Andrews & Arnold Ltd" which they can just look up on the GS-1 web site, and Amazon would accept the listing. After all, the seller does not have to claim to be the manufacturer. It is possible Amazon would take such issues more seriously, who knows. It would also be interesting if GS-1 would handle the arguing with Amazon for us as a member given the claims GS-1 make about how much better it is getting codes from them directly.

More to learn

We have to fully understand the costs in practice, and the processes for payments, and for VAT invoicing as well. Things will be shipped without us having issued an invoice, so we are going to have to import in to our accounting system. It is exactly this sort of thing which a trial on something simple like playing cards is worth doing.

We also need to consider what sort of things will be sensible and cost effective to sell via Amazon rather than shipping ourselves. It may be that Amazon is not for us (except perhaps for playing cards), we will see.


A RevK GiveAway

[Update: We have given away hundreds of packs of cards, so I have stopped for now. Thanks for the interest - I am amazed how many requests in just two days]
[Update: Now available to buy on Amazon]

Having spent so much time on these playing cards (drawing the court cards and making code, etc), I decided to have some actual decks printed - a Reproduction 19th Century Goodall & Son deck, printed on modern playing card board. Ivory Graphics have done a good job...

The lack of index in the corner means they are fine for games with cards on the table, but not really that good for when you have a hand of cards. The original deck was 32 cards (no 2 to 6) but these are a full 52 card deck.

They are something unusual to impress your friends and family, and I have decided to give away some to my blog readers.

Just follow this link to request a pack: www.me.uk/cards/ordercard.cgi
(name/address just used for the postage, honest)

Obviously subject to availability, but do have fun and comment here or tweet...
[And yes, I am personally paying for these decks and postage which A&A is handling for me]

The card designs are here...


Lungs of the Earth

I always heard that the rain forests were "lungs of the Earth" as they use sunlight to convert Carbon Dioxide in to Oxygen which we need to breath. The idea is that they create the Oxygen we all need to live.

And then, more recently, I heard that they are pretty much neutral. Indeed this article points out that the Carbon they extract ends up decomposing and releasing that Carbon Dioxide back in to the atmosphere (using Oxygen in the process). This makes perfect sense and made me wonder why I did not question the "lungs of the Earth" idea in the first place. There are other articles that point out that they will vary absorbing or releasing Carbon Dioxide over periods of years, so a sort of "capacitor" for Carbon Dioxide on the planet, but not the power plant for Oxygen.

So I pondered where does the Oxygen I need to live come from. Well, there is an incredibly simple answer!

The Oxygen I need is used to burn (oxidise) the Carbon from my food. That Carbon in my food ultimately comes from plants (directly, or via other animals). Those plants get the Carbon from Carbon Dioxide in the atmosphere, and using sunlight as an energy source they release Oxygen when they absorb that Carbon. Indeed, the sunlight's energy used to split the Carbon Dioxide, is the energy released when Carbon is burned in my body.

So there is a perfect balance. The exact amount of Oxygen I need in order to burn the Carbon in the food I eat is exactly the amount that was released by the plants that absorbed that Carbon from the atmosphere in order to end up in my food!

Of course, I also end up with some Carbon in my body as part of my body, or leaving my body by other means. That Carbon gets released as Carbon Dioxide when my poop decomposes, and finally when my body decomposes after I die - that decomposition needs exactly the amount of Oxygen that was released by plants that absorbed that Carbon.

So, there should always be exactly enough Oxygen for us to burn the food we eat simply because that food only exists because exactly that much Oxygen was released by photosynthesis in the first place.

Nice isn't it :-)


GDPR: Secret black lists

I think I have this right, but it seems rather concerning to me with the way GDPR has tightened things up so much there looks to be a concerning loophole.

I say loophole, it is there for good reason, but even so.

The GDPR is an EU-level document — a regulation — and regulations apply automatically in Member States, without the need for national implementation. The GDPR is a bit of an odd regulation though, as it contains a reasonably large number of areas where Member States are permitted to implement national derogations.

The UK’s new data protection act — the Data Protection Act 2018 — came in with the GDPR, repealing the previous Data Protection Act 1998. The Data Protection Act 2018 does various things, and one of them is to set out certain exemptions to some of the provisions of the GDPR.

For example, the Act exempts a data controller from complying with some aspects of the GDPR where they are processing personal data for "prevention and detection of crime", and where applying the GDPR’s provisions would be likely to prejudice that. This includes provisions dealing with subject access, as well as the right of rectification. This is, in principle a good idea, but I think I can see a problem - "black lists".

I know someone that recently tried to buy an item on-line and the order was cancelled as their email/number is, according to the retailer, on a "fraud list". The obvious answer (on basis that they have not committed any fraud) is Subject Access Request and a demand to have the data corrected.

However Data Protection Act 2018 SCHEDULE 2 part 2 says otherwise. Most of the rights you have, like Subject Access Request and rights to correction of the data simply do not apply where the data is for the purpose of preventing and detecting crime - which could be argued here.

There is a caveat "to the extent that the application of those provisions would be likely to prejudice any of the matters" but I am not sure that helps.

Even arguing it is wrong to be on the list is not clear, what if the list was "the following email address or phone numbers have demonstrated behaviour which is consistent with the behaviour demonstrated by fraudsters" - it could be correct to be on the list. i.e. being on the list may not mean you have committed fraud or are being investigated for doing so, simply that it could be a list useful for preventing and detecting crime.

But as you may not even know of the list (though in this case the retailer said so), let alone its purpose, or what of your data is on it, why and how, then there is no way you can know or do anything about it!

So it looks a lot like secret blacklists of people are completely allowed by GDPR. Am I wrong? Is this morally wrong?

[Some paras courtesy of Neil, thanks for the explanation of how GDPR applies to UK]


Playing cards getting out of hand now

It has to be said that when I get started on some project (or "side quest") I do tend to get a tad carried away, and playing cards is no different. The card printing company asked if I wanted a job! We have printed samples and some quantity runs of half a dozen types of deck so far.

First off, the card making system that allows you to pick from hundreds of thousands of different decks (here) has been extended somewhat already. See below.

If anyone wants to have these card designs printed, I'd recommend Ivory Graphics. My customising site can produce print ready artwork and instructions on ordering. I have to say the quality of printing is pretty damn good.

I took a close up of the King of Diamonds, and blew it up and still it is hard to see the dots on the print screen. I have no idea what resolution this is, but it is really quite impressive.

It totally justifies making vector based artwork for the cards in the first place.

So, the recently added options are :-

Super size indices

A relatively simple change was to make the indices larger, but obviously that meant making the pips and court card images smaller to fit. They look nicer with a box round the pips as well.

Grey clubs/diamonds

I did not know this was a thing, but apparently it is. The Clubs and Diamond being greyed out, presumably to avoid mistakes. Easy enough to do.

Symmetric pips

I have seen this done in various ways. It always bugged me that cards are not symmetric layout of pips (e.g. the 7) let along symmetric pips where possible (e.g. the 6). But obviously cards with odd numbers of pips need something special for the odd one. What I have done is cut the pip and have a jagged line between the two halves. Initially I did not do for diamonds as not necessary, but they looked out of place.

What was also fun was how to mix with "All pips same way up", which I decided to make all the pips the combined up/down version - looks weird!

Duplimate barcodes

This was totally new to me - I played bridge a bit in school but I had no idea that bridge clubs don't just shuffle a deck and deal!

What they do is deal the deck on computer in advance and then have a machine deal out the hands. This means you can all play the same hand over several games meaning nobody has the luck of the deal as a reason for winning!

I am amazed, to be honest. But this is apparently a big thing and has been for a long time. Long enough for the patent to be running out in 1½ years or so. For now, to my surprise, I find that we can simply buy a licence for €0.10 per deck which is cheap enough to do things properly if we ever sponsor a bridge club.

Alternative backs

Initially I did a simple diamond pattern back, but I also played around with a marked back using position of little triangles. However, I actually liked the back design so have made a static (non marked) symmetric version of the back - it will be on the next packs of A&A cards.

Amazingly we have given away well over 100 packs of cards now. More coming next week.

Four colour deck

Another of the I never knew this was a thing cases, a four colour deck. Again, pretty easy option, though I did have to work out interactions with other features like "ghost deck".

Alteran index characters

Obviously I have been watching too much Stargate, as I also added Alteran (Ancient) character indices as an option.

Print ready artwork

As I've been working with Ivory Graphics and they seem like good guys, I have also made it so the form allows you to prepare complete print ready artwork for a whole deck. It takes a while to make so gets emailed, but includes instructions on how to order real cards!


The initial decks we got were simply packed in a cello wrapper with gold tear out strip. However, I decided to give it a go designing a box, and it turns out to be quite easy. They have a template as PDF which inkscape can simply import and I can simply save as a PDF to send back to them. They look really good!

Other cards

I was quite intrigued by some of the other packs of cards from Europe. Many of the cards I had been playing with were US based and had different styles of court cards, but these cards I looked at are clearly based on the very same original designs. But there are occasional minor differences, apart from obviously that they have been redrawn.

I was also surprised to see commercial cards that were badly done like this Queen of Spades with the pip over the crown! Even so,  and ignoring for a moment that the older cards were mirrored images for six of the court cards, the same features exist in the detail of the card.