Back in 2012, in my never-ending quest to geek up Tuihana Cafe, I threw together a Windows based app that takes SMS messages and prints them out on our kitchen receipt printer (read about it here). It allows our customers to make an order on their way to the cafe, without having to stand around and wait for the coffee to be made.
All was right in the world… or so I thought.
Late last year I decided to learn ESC/POS and print directly to the receipt printer, rather than continue cheating by using the Epson .Net OPOS drivers. This introduced a very annoying bug:
For some reason, the receipt printer or my program was adding in random characters (such as the speech marks before Printed, and the bracket before Sender) and dropping characters (like the O from the word One). My staff were clever enough to decipher these messages, however this wasn’t completely bulletproof – an order came through for 1x flat white, but the system printed out 21x flat white. It was then I new that I had to fix this once and for all.
For the last month I’ve been working on a fix, and it wasn’t until today that I stumbled across a blog post with the solution.
BinaryWriter has a method .Write() which takes a string as the input parameter. Instead of just appending this to the internal buffer, it also (not helpfully) prepends the length of the string in the first byte.
From the blog post:
Now that I think about it, this makes perfect sense: strings in the .NET framework are typically not thought of as being null-terminated, they’ve got a length, and in order for theBinaryReader‘s Read(string) method to work, it’ll need to be able to know the length of the string to determine how many bytes to read.
In my case, I was writing data to an Epson TM-T88III receipt printer, and given the structure of the commands that the printer expects, it doesn’t need or want the length of the string in this way. Because I didn’t read the MSDN documentation closely, I was left scratching my head as to why weird characters were showing up or characters were being omitted in my output.
The solution? Replace .write(“Test”) with .write(Encoding.ASCII.GetBytes(“Test”))
The new receipts all fixed up and looking purdy:
Hopefully this helps someone out from weeks of frustration and programmer rage.
A few years back I was introduced to one of the earlier versions of the Livescribe Smartpen. At the time I remember being very impressed with the technology, so when I had the opportunity to review this current version, I jumped at it.
It a nutshell, the smartpen gives you the best of both worlds – you get the tactical feel of pen and paper, with the smarts of having those notes digitised, for later referencing and searching. I have never found writing with a stylus on a tablet to be any good, so this smartpen is a good hybrid solution.
The smartpen has three components:
- The pen itself
- A dot paper notebook
- An iOS device (iPad or iPhone)
Installation is quite simple. Find the Livescribe app in the app store, install it, then turn on the pen to pair it. Once this is done, you’re ready to go.
To turn the pen on, you twist it in the middle, which also extends the nib of the pen out (this prevents use of the pen without it being switched on). Charging is done through the micro USB port at the end.
The pen has a small infrared camera which picks up tiny dots printed all over the paper. The notebooks are inexpensive to buy, or if you have a printer capable of printing at 600dpi, you can print your own paper.
Because each piece of paper in the notebook has dots unique to it, the app can separate your notes by not only notebook, but also by page.
One of the most powerful features of the pen is the ability to record meetings. To begin a recording, just tap the record image in the notebook. Not only does the app record your notes, but also the audio (using the iOS device). Using the Pencast mode of the app, you can play back the audio and watch your notes draw before your eyes. If you need to jump to a specify point, this is also achievable.
The best part of this, is in a meeting, you no longer have to take detailed notes, or worry about missing an important part. Your notes now only have to be a summary of what’s being said, as you can easily recall all the discussion of the meeting from the audio.
The second feature I am most impressed with is the note transcribing. In Feed mode, if you swipe from left to write, the app converts your handwriting to text, making it easier to search in future.
In the interest of science, I roped in my cafe staff and a random customer to get them to write. Even with the five different types of hand writing, the app was able to convert to text pretty accurately.
The pen also has internal memory in it, so if you’re not within range of your iOS device, you can still take notes which will sync once back in range.
I’m a big fan of the Livescribe pen, my only complaint is no Android support at this time, though I’m told this will be available later in the year. If this support was out now, I would be purchasing one of these right now.
If you’re an IT company (or as the Americans call it, a MSP, Managed Service Provider) you would’ve heard of Autotask – they provide software that includes a CRM, service desk, contract, scheduling – pretty much everything you need to run your IT business. We already extensively use the Autotask API with our Autotask-Xero connector.
I was invited last year to Arizona to speak at their conference, and this year I’m running a two hour workshop on the Tuesday of the conference around the Autotask API, and what it’s capable of.
The workshop will be broken into two parts – the first part being a business overview of what benefits the API can bring, the second will be a more in-depth technical demonstration, where we will actually connect to the API, and push/pull data live from Autotask.
If you’re planning on heading over, please message me on twitter.
As a punter, I don’t like any surcharges, and a quick search of Twitter seems I’m not alone:
I just don't understand cafe surcharges. Just at Rosie in Parnell and the place is full. Is that not enough? #surcharge #AucklandThe bottom line is that being open on a public holiday is more expensive. All your staff that are working on one of their normal days not only get time and a half but also a day in lieu (if it’s not one of the days they normally work, they don’t get the day in lieu). The decision for a business owner is whether to pass this directly onto customers through a surcharge.
— Aidan Cunningham (@aidocunn) April 17, 2014
At Tuihana Cafe we don’t. While I haven’t done any hard research to see if this resonates well with our customers, a quick look at the Google Analytics for our website, it seems it is a popular search term on a public holiday:
We experienced five times our normal traffic volumes on Good Friday (Apr 18), with another slight increase on Easter Sunday – Sunday isn’t a public holiday, however most people think it is (the actual holiday is the Monday).
The biggest referrer of traffic to our cafe website over the weekend? No Surcharge, a site that lists all the businesses that are surcharge free on public holidays.
It seems the cafes in nearby Kingsland have already got the message:
Almost every cafe in Kingsland has "No Surcharge" in their window today. A victory for the free market?From a tech perspective it does seem that having no surcharge is a big drawcard for customers.
— JeremyGreenbrookHeld (@JGreenbrookHeld) April 21, 2014
Yesterday I was invited down to Queen St for a special promotion for Monteiths. As well as an impressive outdoor hunting ground they’d setup opposite Britomart, we were given four different sample meals to taste made by well-known chef Sean Connolly (the chef behind The Grill at Sky City).
Monteith’s is trying to promote its beers and ciders, and especially with the ciders, show how a cider can be paired with a meat (in this case, the venison sausage).
From a more relevant technology viewpoint, they are launching a mobile app, which…
“uses augmented reality to give punters the opportunity to ‘hunt’ duck, stag, lamb and beef, everywhere from their local bar to their office. By hunting a full meat pack you go into the draw to win one of hundreds of premium Gourmet Direct meat packs for the BBQ.
The app is available now and free to download via the App Store for I-phone or Google Play for Android. All you'll need to get started is a smartphone, a steady hand and a good appetite.”
It’s quite a fun game to play, and will get you some strange looks, as from a distance it appears like you’re frantically taking photos and spinning around in a circle. On the iPhone the flash goes off, Android users are thankfully spared this.
In a complete coincidence, this app was also developed by Rush Media, the clever guys behind the longest tennis court in the world (see the post below).