Earlier in the week I attended the Mobile technologies in libraries: information sharing event in Birmingham. It was an interesting event and I spoke to a few librarians and information specialists. A Lanyrd page has a full list of details and materials.
I ran a breakout session on ‘Bibliographic management on mobile devices’ which covered the m-biblio project. It was a small group but they were interested in the project and the issues surrounding using mobile devices for managing bibliographic references.
Last week (14 - 16 February, 2012) I attended the Dev8D developer conference with Damian Steer. The conference is primarily aimed at developers working in Higher Education, but also attracts developers from other sectors and some indies as well. Calling it a conference doesn’t really do it justice, since there is a mix of invited speakers, delegates offering talks, workshops and tutorials. The event is free for the attendee and is funded by JISC and other sponsors. The Professional Development Group of IT Services at the University of Bristol were kind enough to fund my travel, accommodation and subsistence.
This year the format changed slightly with less lightning talks and the ability for people to offer sessions on whiteboards. In the afternoon, those sessions that attracted the most interest went ahead - you put a mark next to a session you were interested in with a marker pen. As you would expect, the quality of the sessions varied but the net gain of learning new technologies and talking to other developers outweighed any minus points. In fact, Dev8D promotes voting with your feet - if a session isn’t what you expect or too easy, leave and find another session.
On the first day I attended Alex Bilbie’s (@alexbilbie) session on HTML5. I’ve already used some HTML5 with m.bristol.ac.uk but it was good to see an overview of the various changes to HTML5, the tags available and examples of where to use them.
I also attended the Pearson Education session on their Developer API, which includes access to FT Press, DK Eyewitness Travel Guides and Longman Dictionary. The API travel guide looks particularly interesting if you wanted data from one of the cities they cover. The dictionary also includes multimedia content for certain words, so could be used in Flash card type applications for kids. I think Pearson are still working on the pricing framework since the API call limit doesn’t seem high for some APIs like the dictionary and would become expensive quickly.
On the first day I also attended the Jorum session. I wanted to learn a little more about learning repositories. Mimas are working on proving a RESTful API over Jorum which uses DSpace. The Jorum team have a challenge to create “applications that demonstrate useful, innovative, original use the Jorum DSpace Read API for the benefit of HE and FE”. I was initially interested in this, but it looks like the team have a lot of work to make the API scalable since a call can return more information than you need. For example, I sent a query for information on a community - it returned ~65,000 lines of JSON. This was for too much data for my poor brain to parse and work out what would be relevant for further API requests.
The end of the first day was marred by breaking my glasses and I missed the morning of the second day due to being at an opticians getting a new pair.
When I got back to the event I attended a session on The JLern Experiment and related programming challenge. This is around a JISC Learning Registry Node which is attempting to create a community of creators, publishers, curators and consumers. I need to read more information about The Learning Registry project and the idea of capturing ‘paradata’ around a learning resource. In this sense, ‘paradata’ refers to activity data around an item, such as feedback, rankings and usage data.
I was interested in the Introductory and Advanced session on CoffeeScript by Jack Franklin. The few slides and then a programming challenge certainly made me concentrate :-). I never enjoy writing JavaScript and I thought CoffeeScript might be a useful approach. CoffeeScript is a language that compiles to JavaScript and has removed braces and semicolons and indentations are important. So, the following JavaScript …
123
square = function(x) {
return x * x;
};
… can be written like this in CoffeeScript:
1
square = (x) -> x * x
It seems fairly clean although verbosity in languages doesn’t usually bother me - I like Java and Objective C :-). I’m going to spend sometime learning CoffeeScript over the next few weeks and have bought Trevor Burnham’s CoffeeScript: Accelerated JavaScript Development. If I become confident in using the language I’ll offer to talk about it for one of our internal tech talks.
On the second day I also went to a really informative session by Owen Stephens and Thomas Meehan on library data. I’ve started accessing library data for the m-biblio and they provided a really useful session on MARC and why library catalogues provide the information in a certain format. The session was a rich mine of information on systems, tools and formats.
The third day was busy attending sessions, looking in the project zone and catching up with some developers who hadn’t been able to attend the earlier days of the event. I attended a session on ePub but the exercises including creating a basic epub book by hand but that involved copying XML off a number of powerpoint slides. It was interesting to see what constitutes the epub format but you’d definitely create one with tools such as KindleGen 2 or iBooks Author. Damian and I also managed to have a whirlwind visit to the British Library to see a number of exhibits, including ‘Manga: Professor Munakata’s British Museum adventure’.
One exciting development of the three days was finding out that Wilbert Kraan (@wilm) of Cetis uses Glint, the SPARQL client application that I wrote for OS X. I really need to find some time to fix some bugs and develop the application further!
I would highly recommend Dev8D to other developers in the HEI community. There are many interesting talks and sessions and, with several parallel tracks, the hardest thing is deciding what to attend.
Yay! I’ve managed to successfully scan some telepen barcodes (including one in a University library book) with the iPhone.
I created a telepen decoder to work with the ZBar barcode reader library and related iPhone SDK. The code needs more testing and improving, but I’m happy with the result.
In a previous post I noted that Telepen is the proprietary barcode format used in the Library at the University of Bristol. The Telepen symbology is publicly available and this post documents my understanding of the symbology.
The symbology has a number of key characteristics:
It represents the full ASCII character set
Characters take up the same amount of space
Wide to narrow bar ratio is 3:1
Four possible combinations of wide and narrow bars and spaces
Can be read as a binary sequence; uses 8-bit even-parity characters
Has a start character(_), stop character (z) and a check character
Telepen barcodes can represent numeric data (like the numbers used by the University) in a double-density mode. This means an ASCII character is used to represent a pair of numeric characters.
1511075964
For each pair of numbers (15 11 07 59 64), we add 27 to get their ASCII representation (17-26 are reserved for the character series 0X to 9X), which leaves us with:
42 38 34 86 91
These should be prefixed by the start character ‘_’ (ascii value of 95) and postfixed by the check digit (90 in this case) and the stop character ‘z’ (ascii value 122), giving us:
95 42 38 34 86 91 90 122
The values can then be looked up in the symbology character set to create the barcode. Alternatively, for creating barcodes for testing, I used a barcode generator with the unencoded values:
To decode the barcode you could analyse the image against the symbology character set. However, more interestingly, the barcode can be read as a bit stream. There are four possible patterns:
narrow bar + narrow space (1)
wide bar + narrow space (00)
wide bar + wide space (010)
narrow bar + wide space (01 or 10 - alternates within a byte)
We are dealing with 8-bit even-parity characters which are encoded with least significant bit first.
Looking at the barcode above, the first pattern is a narrow bar and a narrow space (1) giving us the pattern:
1
There are then four more narrow bar and narrow space patterns (1), giving us the following pattern:
11111
The next pattern is then a wide bar + wide space (010), so we now have the following 8 bit pattern:
01011111
The decimal value for this pattern is 95, which represents ‘_’ in ascii which, in turn, is the start character for the barcode.
If we continued to look at the next set of bar and space patterns, we would get the following 8 bit pattern:
10101010
So, the decimal value for this pattern is 170. However, the most significant bit is set to 1 and this can be discounted to obtain the correct ascii value. The decoded bytes are even parity, so if the first 7 bits in the byte have an uneven number of 1s then the most significant bit will be set to 1 - this provides some simple error detection when decoding the barcodes.
We can use a bitwise operation to mask the most significant bit to obtain the ascii value:
1
int ascii_value = decoded_byte & 0x7F
In the case of 170 that would leave us with 42. If we deduct 27, that will leave 15, which are the first two digits if the barcode number 1511075964.
If we decoded all of the patterns we would have the following numeric values:
95 170 166 34 86 219 90 250
After we mask the most significant bit we are left with:
95 42 38 34 86 91 90 122
We can remove the start character ‘_’ (95) and the stop character ‘z’ (122) and that leaves us with the decoded numbers and the check digit:
42 38 34 86 91 90
To validate against the check digit obtain the sum of the numbers (excluding the check digit):
42 + 38 + 34 + 86 + 91 = 291
We then use modulus 127 to find the remainder:
291 % 127 = 37
Deduct the remainder from 127 to get the check digit:
127 - 37 = 90
So, the check digit matches! If we then subtracted 27 from each of the decoded numbers:
The barcode numbers can end in X, and so the pair sequence 0X to 9x are represented by values to 17 to 26.
When working out the check digit, if the calculated value is 127 then the check digit is actually 0
There are other conditions when representing ascii values and not the double-density numeric mode - I won’t worry about those for the moment since I’m interested in only numeric values for this project.
In future posts, I’ll document how I’m attempting to write a decoder for the ZBar bar code reader so I can decode the telepen barcodes without using pencil and paper. :)
The Telepen barcode used by the Library at the University of Bristol encodes a 10 digit number that uniquely identifies an item of stock such as a book or journal. The barcode number has a number of characteristics:
The first digit is the prefix and is always the number 1
The second through to the 9th digit will be from the range 0 to 9.
The tenth digit is the check digit and can range from 0 to 9 or be the character X
The check digit allows us to test whether or not the barcode number is a valid number used by the University, since we use a specific weighting algorithm. This is independent of the check digit used by the Telepen barcode symbology.
In testing the check digit we ignore the prefix which is the first digit. Each remaining number is multiplied against a relevant weighting in the following list: {7, 8, 4, 6, 3, 5, 2, 1}. Modulus 11 is then used on the sum of the weighted values to get a remainder. The remainder is then subtracted against 11 to get the check digit value. If the value is 10 or 11, then that is represented by the characters X or 0 respectively.
Example 1
1511075964
We ignore the prefix and multiply the next 8 digits against the appropriate number in the weightings list:
(5 x 7) + (1 x 8) + (1 x 4) + (0 x 6) + (7 x 3) + (5 x 5) + (9 x 2) + (6 x 1) = 117
Find the remainder:
117 % 11 = 7
Subtract from 11 to find the check digit:
11 - 7 = 4
Therefore, 1511075964 is a valid University barcode because the last number matches the check digit created by the algorithm.
Example 2
142837074X
Ignore the prefix and multiply the next 8 digits against the appropriate number in the weightings list:
(4 x 7) + (2 x 8) + (8 x 4) + (3 x 6) + (7 x 3) + (0 x 5) + (7 x 2) + (4 x 1)
Find the remainder:
133 % 11 = 1
Subtract from 11 to find the check digit:
11 - 1 = 10
10 is represented by X and this matches the last digit of 142837074X
The Library at the University of Bristol uses Telepen barcodes for stock management. In the m-biblio project I’d like to be able to read the barcodes within the smartphone application we are creating. I’m looking at using the ZBar bar code reader, which also includes an iPhone SDK. ZBar supports a number of barcodes implementations, including EAN-13/UPC-A, UPC-E, EAN-8, Code 128 and QR Codes. However, it doesn’t support the Telepen barcode symbology. I’ve spent far more time that I’d like to admit into looking at how easy it would be to add a new decoder to the ZBar SDK to decode the Telepen symbology. It probably would have been a lot easier if I’d written a reasonable amount of C in the last eight years.
I’ve had some success implementing a new decoder that can successfully decode a number of Telepen barcodes of various sizes. For example, the following barcode was decoded by using the command line zbarimg utility:
I’m planning to document what I’ve learnt and implemented over a series of blog posts.
At work I’m currently working on the JISC funded m-biblio project. The project started in November and runs until the end of July. The aims of the project are fairly ambitious considering the time and effort available:
“We propose to enhance the learning and research activities of the University of Bristol’s academic community by developing a mobile application that can record and organise references to books, journals and other resources. These references can be added actively by scanning barcodes and QR codes, or passively by automatically recording RFID tags in items being used for study and research. With permission of the user, the application will submit anonymous usage data to their library. This innovation will provide library staff with a valuable set of user-derived usage statistics. It will be able to track which resources were used, and where. The library will therefore be given a rich seam of usage patterns, including data about library items that are often confined to branches such as periodicals, journals and reference books. The application will be made available to the wider FE/HE community for use in other institutions.”
We were hoping to be able to read the library’s RFID tags with NFC capable phones, but this isn’t possible due to the way the tags are encoded. I’m currently focussing on adding telepen decoder support to the ZBar bar code reader, so we can scan library barcodes via the phone’s camera. Telepen is the barcode format used by the library. My C is very rusty but I’m plodding along … who new bit twiddling could be so much fun? :)
I’ve got a pretty simple iPhone application on the App Store called Sensory Play. It recently got a negative 1 star review:
This is a total con, just a bunch of suggestions any parent with a special needs child would already do, it’s disgusting when people rip off others who are desperate for special needs apps. Want my money back!
Negative reviews are part and parcel of the App store but this one did annoy me a little. I’m not sure they are ideas that every parent will do, especially if you are just starting down the road of living with a young special needs child. Also, at 69p it is hardly expensive. It certainly pails in comparison to some of the kit we’ve had to purchase in the last few years that has the label ‘special needs’.
A little history of Sensory Play and why it was developed … Our son Thomas was born extremely premature and is severely disabled with numerous physical and learning disabilities. My partner, Alison, developed a number of ideas to engage with Thomas and placed them on laminated cards. One of Thomas’ sensory support professionals liked the cards and thought that other parents would find them useful and suggested that we printed more of the cards and sell them for a nominal amount. As an alternative, I wanted a project to start learning the iOS SDK and this seemed like a good opportunity. I worked on the app in 2009 and placed it on the App store.
I could have been altruistic and given the application away for free. However, setting the app at the lowest tariff (was 59p and now 69p) seemed a reasonable way of recouping some of the £59 a year I pay for the iOS developer programme. In 2011 we earned a very modest £108 for the application.
I think the product description needs updating to make it very clear what the application is about and maybe give more information on why the app was developed. More screen shots might help. That said, I’m not convinced that everyone reads descriptions and screenshots before downloading.
The app is well overdue an overhaul … the UI needs updating since doesn’t take into consideration retina displays and the extra screen retail estate provided by the iPad. Hopefully Alison has some additional ideas we can incorporate into the app. It would be good to allow parents to add their own ideas and maybe update the existing ideas to make them suitable for their own personal situations.
With regard to another 1 star review:
All the 6 reviews must of been written by authors of this “app” as it’s just a hand full of ideas nothing else , it’s just text for 59p absolute rubbish
I can confirm that neither Alison or I wrote any of the other reviews, although one does look like it was written by a well meaning relative.
I’ve decided to change the blogging software I use from Wordpress to Octopress. I’ve migrated the old posts but they have different URLs - I’ll try and be a good ‘net citizen and add some redirects. The blog only had a dozen comments and I didn’t have the energy to migrate them. Since Octopress provides a way of creating a blog with static web pages I’m going to try the Disqus for comments in the future.
I recently wrote an iPhone application that provides a guided tour of the University of Bristol’s precinct. You can get the application from the iTunes Store. The Undergraduate Recruitment team had already created the concept of a walking tour with a paper printed map and some mp3 files when I became aware of the idea in one of the MyMobileBristol project meetings. Delivering the content in an app seemed like the logical next step. The content was further developed by the Public Relations Office and Ben Hayes provided help with the design. I worked on bringing it all together with the iPhone SDK.
The core of the application provides a map (that shows your location if you are near the campus) with a number of points of interest:
Selecting a point will give you an audio narration and some photos:
The app also provides access to videos that should be of interest to prospective students:
Version 1.0 of the application was around 22MB in size which was an issue because the phone won’t let you download anything that large over 3G. I compressed the audio files for version 1.0.1 and we are down to a slimmer 12MB.