In early September I decided I wanted to find a new role in which I could make more of an impact than at my previous jobs. After having spoken to the very enthusiastic CTO of PepperHQ, Andrew Hawkins, about a role as the Senior Software Engineer of the Pepper Platform I decided it would be the perfect place for me to make a mark.
Pepper build a series of iPhone and Android applications for resturants, retail and hospitality — primarily Coffee Shops at the moment — which allow users to pay for products and recieve awards for being a loyal customer.
In my mind the coolest use case of the Pepper Apps is CheckIn/Pay by balance. Imagine you work in Canary Wharf and visit the same Coffee Shop every morning to get your caffeine hit. Without Pepper you would have to go in, order your drink, wait for it to be made and then pay for it using cash or a credit card and, if you wanted to earn loyalty rewards, you would have to carry a flimsy bit of paper with you and get it stamped every morning — assuming you don’t lose it before you’ve collected enough stamps for a drink.
With Pepper you can automatically be “Checked in” to a location as soon as you are within a given distance of the store, perhaps just as you come out of the tube station. You can then make your order from your phone and have it ready for you as you get to the counter. Here’s the cool bit, you can just pick up your coffee and walk off. Checking in to the location earlier made your profile picture show up on the till in the store so the Baristas know that it’s your coffee. The payment is taken from your in app wallet (which can, optionally, be auto-topped up from your credit card, meaning you never have to think about it again). Your loyalty is also managed in-app.
Pepper is really one of those applications that makes the most sense when you see it in action and realise just how much time it would save someone who buys two or three coffees a week.
My role at the company is to be in charge of the pepper platform — all of the backend services, primarily Node.js, that manage the interaction of the applications and point of sales systems.
I’ve been at the company for 3 months now and am really enjoying my time here. It’s pretty neat to build a product people can see the value in, and that is available for use with companies that are household names.
So far in my time at Pepper I’ve added “Pseudo Currency” as a type of loyalty scheme, improved the development process by introducing Continuous Integreation, Linting and a Pull Request merge model using protected branches and started work on a series of improvements to the loyalty reward process.
I plan to keep the blog up-to-date with any developments at the new job.
Obligatory xkcd Comic
Standards are one of the things which makes writing software a bit of a pain, but also allows the pleasure of writing a system which integrates, uses and enhances other systems. Indeed the Internet Browser you are reading this blog post on works using a multitude of standards, from the Internet Protocol and Transmission Control Protocol used to deliver the information to you, to the HTML and CSS used to render this web page on your screen.
For those people who are not entirely familiar with the term standards, a technical standard is — according to wikipedia — a “formal document that establishes uniform engineering or technical criteria, methods, processes and practices”. In laymans terms it’s a document that tells you how something works and how to implement it so that your implementation is compatible with other peoples. An example is RFC 2616, The W3C Standard for the HTTP/1.1 protocol.
Standards, in theory and most of the time in practice are fantastic, why invent a new way of guaranteeing the delivery of a packet over internet protocol if there’s already a standard written by a group of intelligent people who have tried to find and fix every edge case and is compatible with everyone elses system? There is no point.
The only time real issues do occur is when there is an edge case that hasn’t been thought of by the author of the RFC, or the standard is implemented incorrectly — either on purpose or by accident.
How strictly should we adhere to a standard?
The motivation behind for blog post was found when doing my coursework for the “Simulation and 3D Graphics” module in an API called OpenGL. I had written a program using OpenGL 3.0 on the computers in the Fenner Computer Laboratory in the University. However, when I went to the ITMB Computer Lab in the next building my code produced a completely different result. You can see the stark difference below.
The image on the left hand side is what I had been seeing as I engineered my code in the fenner laboratory. A column — textured with some “Epic Faces” — with a spotlight-lit sphere inside it. I’ll explain what the purpose of all this is in another blog post. On the right hand you can see what appeared using exactly the same code in the ITMB Lab, precisely nothing.
After many excruciating hours of searching — with some help from one of my housemates — I discovered the bug was being caused by me attempting to call the “glEnableVertexAttribArray()” method on a uniform member of a shader, something which you’re not meant to do, or indeed allowed to do in OpenGL. I had made a programming error, as every Software Engineer does many times a day. What is especially bad here however is that I wasn’t informed of my accident, either by error or by the thing simply not working.
Looking at the above image you may think that the Fenner Computer, using its Intel Graphics card, was “right” because it displayed the 3D objects I wanted it to. However, I would disagree. The AMD Graphics card on the ITMB Computer actually produced, according to the standard, the correct result. Nothing. Had I been working in ITMB when I produced the code I would have noticed that adding the glEnableVertexAttribArray() line broke everything, and would have immediately removed it, working in Fenner gave me a false sense of security that my code was in fact OK.
So, as far as I can tell this leaves us with a few options.
- We should say that in order to claim to implement the OpenGL standard, Graphics Card Manufacturers will have to write a, and work with a standard of how strict their implementations are, I would suggest that all graphics card manufacturers stick directly to the specification and throw exceptions or GL.ErrorCodes or display nothing on screen if there is an issue
- We write into the specification exactly what should happen in every possible edge case involved with the specification (this is obviously impossible)
- We don’t agree on a level of strictness and we waste countless hours of programming time, as we do at the moment
I sincerely hope that eventually number 1 happens, but I’m not sure how likely it is.
Should we ever add proprietary elements to a standard?
Another issue with standards its that sometimes they don’t fulfill everyone’s use cases, in other words they don’t allow everybody to do everything they would like. For example the body of standards used to make up web pages don’t allow websites to run executable code, such as c++ binaries, natively. This lead to things such as the much despised ActiveX control and the slightly less despised Java Web Applet.
The issues associated with this are many
- Users have to install an additional piece of software before they can enjoy certain functionality
- Users then have to ensure this software is up-to-date and manage it properly to avoid security failures
- The fact these downloads exist allow other people to fake them, allowing easier drive-by-download attacks.
I would argue that if we are ever using a standard, or claiming to use a standard we should endeavour to never add to it ourselves. Instead, the correct course of action would be to write a Request for Comment (RFC) and implement the feature in your browser or program, but have it turned off by default. This way develops can turn it on to test it and play around with it, but they won’t become reliant on a proprietary features to implement their solution. Everyone wins. Thankfully most of the browser makers are going this way, so the HTML5 and associated specifications shouldn’t be too fragmented.
Worried about the future
As mobile browsing is becoming more and more popular at a tremendous rate more and more websites are aiming to make mobile friendly sites, either by making completely separate sites such as http://m.bbc.co.uk/sport or by using responsive designs such as the brilliant one which is used at https://www.gov.uk/. Whilst I can do nothing but encourage the development of mobile sites, especially if they have feature parity with the desktop sites and have a great touch-centric UI, I am worried that history is repeating itself.
Sites famously used to have landing pages which said “Works best in Internet Explorer” or “Works best in Netscape”, this is because often those websites would use proprietary features from either browser, for example gradient backgrounds. Unfortunately, because the two major mobile operating systems, Android and iOS, both use WebKit rendering engines to render HTML, CSS etc content mobile website developers are not only utilizing proprietary features , but actually relying on them.
Though the sites don’t show annoying images that say “This site works best in webkit” the result is equally annoying — a substandard browsing experience for anyone who uses a browser which doesn’t use a WebKit rendering engine, examples include Opera Mobile and Internet Explorer.
Developers, learn from the past, and if you can at your organisation have a standard for implementing true standards!
I’ve found that for projects like this is useful to have a Facebook group as most people at uni check Facebook more often than their Email Inbox
You may recall that earlier this year I started work on a Windows Phone 7 application for HullCompSciBlogs.com, this quickly progressed into a full scale project to make sure that the 3 smartphone operating systems with the highest market share had an application available. So far we already have a Windows Phone 7 app available on the Windows Phone Marketplace and an Android App available on Google Play.
Cameron is still working hard on the iOS application and expects that it will be available through iTunes in the very near future! When we were discussing this we both agreed that the back end system needed a complete revamp.
When I was designing the Windows Phone 7 application I decided on using XML as the data interchange format, mainly because I was getting used to using LINQ which means that an XML based solution is very easy to implement in C# for Windows Phone. I never expected that it would turn into a full scale project and instead expected that it would remain my own personal project. Probably a silly idea in hindsight considering that the Hull CS Blogs very fundamental idea is that of a community. Not only is XML not as well supported out-of-the-box on certain other fruity platforms, its not the best format for the job. In my opinion JSON is much better because it provides the same data in a much smaller file due to its simpler syntax.
The Data Interchange Format is just one niggle with the system, the other is that it is at the moment a bit of a pain to update. I have to manually edit an XML file to create, edit or update information on featured applications and contributors — which is based on my portion of Freeside, so no one else has access rights in order to update it themselves. There’s also currently no system for someone to submit their blog to our system and have it reviewed before becoming publically viewable. So the addition, removal and editing of contributor profiles and blog feeds isn’t exactly the perfect solution at the moment.
The final big issue with the system is that we simply don’t keep enough data on our contributors. The system we are currently proposing will keep the following details for contributors:
- A display picture
- Their full name
- URL’s for both their website and blog RSS feed
- Twitter Username
- LinkedIn Username
- Reddit Username
- Date they joined HCSB
- Study Year
- Study Programme
Whereas at the moment we only keep their Name, Twitter username and Blog RSS url. We’ll also keep information on applications developed by students and lecturers who attend the university including:
- Release date
- License type
At this point we need to think about security because we carry a lot of information. It then becomes a bit more of a project that needs to be handled by more than one person, and instead handled by a team of competent computer scientists, and wheres better to source them than from the list of contributors itself? Therefore yesterday I put together the Hull CS Blogs Workgroup consisting of the current mobile application developers, John Van Rij — who set HCSB up initially — and a few people I thought would be helpful in producing a back end.
The basic aims of The HCSBW is to create a community based around Computer Science at the University of Hull based on an open JSON api that can be expanded on and improved by University students for years to come (one of the reasons why the whole system will only be written in language formally taught within the university itself) allowing students to improve their career prospects by getting their story out there for employers to see.
It will all begin properly in freshers week where the team and I will be presenting to the new first year computer scientists in an attempt to get them interested in Hull Comp Sci Blogs and indeed blogging itself. I’ll be sure to write about how our software project and social project of getting people on board works.
In a continuation of the Hull CS Blogs teams quest for world domination Alex Pringle has designed, developed and published an Android Version of my Hull CS Blogs app. The application uses the same data sources as my application and is very similar to use, its also based off of the same code.
Cameron is still actively working on an iPhone version and we hope that will be delivered soon too!
I haven’t posted since I received my results and felt it was time for an update.
Since I got back from Hull I’ve been working at my uncles company, Regtransfers.co.uk, who are the leading supplier of personal number plates. I’ve had several roles including contacting websites about Internet marketing opportunities, finding companies that have names relevant to number plates we own and want to sell and, most interestingly, a Windows Phone 7 application.
Regtransfers already have an iPhone application and a “HD application” for iPad as well as an Android app available on Google Play. My aim was to make an application that offered all the same functionality of the other applications:
- Search for number plates
- Select a number plate and choose options for the acrylic plate (Flag icon, border colour) and see both the front and back plates (white and yellow)
- Make Enquiries about selected number
- Buy selected number using secure form
- Order the Regtransfers Magazine
- View the Regtransfers Youtube Videos
I also added a twitter feed which is not present in the other applications since the company has started to have a bigger social media presence recently.
The application isn’t finished but below you can see some comparison between the WP7 application I developed and the iPhone version which was outsourced:
As you can see, I’ve taken quite a native look putting a lot of emphasis on the simplicity and “flat look” Windows Phone users expect in their applications — though I’m not sure I’m entirely happy with the background at the moment — it looks nice but it can make some of the text a bit hard to read.
Here are some more images of the WP7 application
What else have I been doing? Well, I’ve realised I’m not back for long so I’ve been spending a lot of time with my friends, family and girlfriend. I’ve also done a bit of work on my brothers website and a few secret projects ill be announcing soon 😉
Friday night the Hull Computer Science app for Windows Phone 7 finally got certified and accepted onto the marketplace. I say finally but it has to be said that this is the quickest an app of mine has passed through the process — taking just 3 days as opposed to the normal 5.
It’s also the first time I have passed certification first time, which can’t be a bad time. It’s safe to say that the beta I mentioned in my previous blog post definitely helped, as well as me being more stringent about having built in error checking around methods that could fail (for example a network request or file I/O operation).
If you want to download the application you can do so by clicking here.
Again a special thanks to the following people:
- John Van Rij for his help with the back end of Hull Comp Sci Blogs.com
- Rob Crocombe for general support throughout the process and the icon design
- Rob Miles for the photography used in the application
In other exciting news fellow blogger and Hull Computer Scientist, Cameron Wilby, is porting my application to iOS, the operating system which runs both iPhones and iPads. You can see some very early builds of this in the images below:
As you can see its a direct port, with all the same features as the Windows Phone 7 application. I’ll start work on the Android version soon, and then we’ll have total Smartphone coverage across the 3 main platforms! Good stuff!