Wenger Case 22 Label with two GTINs

Primary Keys (5) – Relabelling

Wenger Case 22 Label with two GTINs

When I was a kid, it was a common sight to see people in the supermarket with machines applying price labels to stuff. Nowadays this is something really rare, and only happens when food products are about to run out and are discounted. Still, sometimes, you see a product that has been re-labelled.

Sometimes the new label contains the same barcode, but additional information that is not present on the original packing, this is often the case in pharmacies in Switzerland. Another reason can be that the labels are incorrect, or incomplete, the official price has changed or some other legal changes. And sometimes, it is really hard to know what went on.

I needed a new sleeve for my swiss army knife, so I bought a new one at transa. The sleeve comes in a plastic wrapping, with a perfectly valid barcode, 07611640194054 which is assigned to:

Wenger S.A. Fabrique de Couteaux
Route de Bâle 63
2800 Delémont
Switzerland

Still another label was added with a restricted use code: 2000003332137. The label also contains some additional information: size, colour, weight and another number, 078577-006001 which is not encoded in the barcode. Why change the barcode? One possible reason is that there are variations of the product sharing the same manufacturer provided code and they wish to distinguish them in their system. Another possible reason is that the product originally did not bear a barcode, and the store assigned it a restricted use one so that their system could work, and the product got a manufacturer provided number later. Compatibility…

Flattr this!

Bob Yak trailer

Bob Yak

Bob Yak trailer

I have been living for seven years without a car, which worked out pretty well. Still, there are time when you want to transport bulky items, there is only so much stuff you can put into the saddle-bags. I have been considering buying a trailer for my bike for ages and I finally bought a Yak trailer from Bob.

The Yak trailer has only a single wheel and is thus quite narrow, an important feature when you are biking a lot within the city. I had ordered it by mail and delivered at work, so that I could assemble it in the bike workshop. Assembly is pretty straightforward, you need unscrew the rotating hooking part and re-assemble it outside of the frame, build the mud guard for the wheel, and you are pretty much done. Hooking is done by the way of a special rear-wheel axle that is wider and has two knobs. The trailer hooks on those knobs.

I have not yet seriously driven the trailer, just brought it back home. The cargo capacity is pretty good, and when biking in a straight line, I did not feel much additional drag, the bike does react a bit strange when turning, you feel like driving a miniature trailer truck.

I still have to figure out how to fully use this trailer, in particular for shopping: how to park, how to lock it, but it looks pretty promising.

Flattr this!

screen capture of the DSM control panel UI

Synology DSM 5.0

screen capture of the DSM control panel UI

Synology has upgraded the software of its Diskstation line of servers to version 5.0. This version brought mostly features for power-users and a lot of incremental improvements, in particular for file-sharing performance, which are very welcome. The most visible change is the new, more polished UI. It is interesting to see how far they got in emulating a window manager within a browser. The sad part is that the new UI looks like a clone of Windows 95, and is as intuitive.

Sadly, I mostly noticed the difference in terms of what broke: my squid installation first, but that is not critical. More annoying, the printing sub-system, which was providing both Airprint and Google-print broke. Of course this happened on the one week when I needed printing to work, and ironically, the one time I did not install the beta of the new software. The forums contained the usual recommendations so that the NAS would find my printer again: unplug, restart, replug, Windows 95 indeed. The one feature that motivated me to upgrade was a system to handle unified cloud storage (Google Drive, Dropbox) synchronisation – it took me quite some time to realise this is done by the way of an app one has to install.

The new release comes with new version of the mobile phone apps. Promising features, like the ability for DS audio to stream music to my Chromecast, but again broken by lack of testing, my Chromecast did not recognise the authentification keys of the app – the trick, I figured out, is to disable https, when you log into the NAS from the app.

All in all, a pretty disappointing release, I wish Synology had spent more time to test this version before releasing it to the public. If you don’t need the performance improvements now, I would recommend you wait until the various quirks are fixed before upgrading.

Flattr this!

Old School Record Format

Old School Record Format Structure
Header1 Header2 Header3
Value1 Value2 Value2
Value1 Value2 Value2
Value1 Value2 Value2

One very common way of passing data around in computer systems is the tabular format, multiple records that share the same, fixed set of fields. Often time, this kind of data is passed around in the dreaded CSV format, which more or less guarantees there are going to be escaping and parsing problems.

While human readable formats have some advantages, mostly that they are easier to debug by humans, but they also introduce numerous escaping problems, as the same set of character have to be used for both control and content. So humans can read the data, but usually get it wrong. With the advent of Unicode text, the idea of human readable formats has become even more problematic, as most text editors have trouble handling those text.

As I mentioned in an earlier post, the big irony is that ASCII provides all the control characters necessary for building a file with tabular records. With such a format, no need for escaping, the control characters are defined control characters that are forbidden within the records.

So let me propose the old-school record format, it has the following characteristics:

  • The file is encoded as UTF-8, optionally prepended by a BOM sequence.
  • Text fields can contain any human readable character.
  • Text fields can only contain the following control characters in the 0-31 control range: Horizontal Tab (/0x9), Line-Feed (/0xA), Carriage Return (/0xD).
  • Control characters are Start of Header (/0x1), Start of Text (/0x2), Group Separator (/0x1D) and Record Separator (/0x1E).

The file itself has two parts, the first contains the headers, the second contains the actual data. The header part starts with the start of header character () contains C header names each separated by C – 1 Group Separator () characters and ends with a Record Separator ().

The data part starts with the Start of Text () character it contains L records separated by L – 1 Record Separtor () characters. Each record contains C fields separated by C – 1 Group Separator () characters.

The main issue of this format, is that it cannot be handled by text editors, but then again, writing tools that convert between this format and others is pretty trivial. So would be adding support to a text editor…

Flattr this!

Check IO Capture / You are Here

Checkio

Check IO Capture / You are Here

I have spent the last few days playing on CheckIO, enough to reach level eight – you need to be logging in and have reached a given level to see another user’s page. While one could consider this site to be a game, its puzzles are basically small programming problems one has to solve using code written in Python. Some of them are classics: sorting numbers, producing roman numerals, others are more esoteric, I’m always impressed by the stories that people create so they can use the Fibonacci sequence in code.

CheckIO’s web interface contains a small editor with syntax highlighting and the ability to run python code, both in 2.7 and 3.3 variants. So you can run your solution and then check it against the official validation tests. Once you solve a puzzle, you can publish it and discuss the solution of various people. Thanks to this, I have already learnt a few python tricks I did not know.

So if you have minimal python skills and like coding puzzles, this is a really good site.

Flattr this!