This weekend I was trying to resolve an issue with an accidental purchase one of my relatives made on ViaGoGo. We realised the mistake the same day as the purchase, and I set about trying to get a refund.
Being the somewhat impatient person I can be with matters like this, and knowing that different channels of communication often result in different outcomes, I decided to send ViaGoGo an email and a direct message on Twitter at the same time.
A few hours later I got a response via both email and twitter (strangely enough, they replied by email first). The email I recieved was a pretty bad copy/paste job that started with “Dear mrs , ” Yes, lowercase Mrs. Yes, without my last name. The email told me that tickets were unrefundable and that they considered the case closed.
Meanwhile, on Twitter, I recieved a well written response and the offer of a full refund — which was then processed the same day.
The cynic in me thinks that perhaps companies are more likely to work with you when they know you have a public platform to complain about them on. But perhaps this isn’t the case, perhaps the different responses is just a function of speaking to different people in different roles (Community Manager vs Customer Support) or just people in different moods on that day.
Either way, I always seem to have recieved better customer service when I use a Social Network.
A little while ago I was curious about how software that uses Transaction Logs works, so I built a toy to-do command line application to get some hands on experience.
Transaction Logs are used when you want to have metadata detailing each action that has taken place on a system but then actually use those logs as the data for the system. Therefore to build up the state of the system at any time you can simply “replay” each action that took place before that time. This enables you to time travel as well as know exactly what happened for user 54 to go into his overdraft.
Above you can see every feature of
todo-log (I did say it was a toy application!) being used from the macOS terminal.
add command you can store a todo item with both a title and some additional body text. This todo item is then assigned a short code — shown in red above — which can be used as the unique identifier to manipulate it in other commands. The transaction detailing the addition of the todo item is saved to a JSON Lines (
ls command, without parameters, displays a list of all the todo items which are outstanding at the current time. Some basic formatting is applied including showing a friendly date (e.g. “two hours ago”) for the creation time of a todo-item.
Deleting a todo item is simple, just pass the shortcode of the item to the
rm command. The command doesn’t then delete the add transaction from the
jsonl file, instead it adds its own
remove transaction detailing the time of deletion and the todo item involved.
log command just prints out the raw
.jsonl to the terminal for inspection. In the above screenshot you can see the format of both the
Finally, passing a positive integer parameter to the
ls command goes back in time by that number of transactions. In this example you can see what the state of the todo list was before the previous
rm command was issued. Everytime
ls is called it simply builds up the current state of the system by rerunning each of the actions detailed in the
.jsonl file — to go back in time we just ignore the last
n lines, where
n is the number provided to the command.
You can have a look at this fun little project over on my Github.
Though I only spent a couple of hours on it, and it doesn’t do much, I feel like working on this gave me a greater appreciation of what transaction logs can be used for and the challenegs around them. Systems like RDBMS transaction logs and Apache Kafka are much more interesting to me as a result.
Sometimes the easiest way to learn about something and become more interested is just to jump in and build something
Mark Zuckerberg recently unveiled Jarvis, a simple AI to control various facets of his home including his lighting and more amusingly his toaster, which was a result of a challenge he set himself late last year to be completed by the end of 2016. The Facebook CEO is well-known for setting himself a “personal challenge” each year — a phrase which I think much better describes what we aim to achieve when we set ourselves a “New Years Resolution”. I thought that it might be nice to try to follow in Marks footprints, though not aiming for something quite as grand as building my own AI.
It’s well-known that Gyms are very popular in January as many people set themselves a New Years Resolution of losing weight or getting fitter but, by early February the same gyms are usually back to normal levels of use. Though there are undoubtely many reasons why this happens I think one of the big ones is that “losing weight” isn’t a great objective — losing 1lb technically completes it though thats probably not what the resolver intended.
Thinking back to my Business Studies A-Level I remember learning about S.M.A.R.T objectives. S.M.A.R.T is a mnemonic describing the properties which make an objective a useful measure.
Using these properties we could make our “lose weight” objective into “Lose 10lbs by December 31st”. That way we at least have something we can measure our progess against and a time set for when we want to have it done by! It’s also not so difficult as to be unachievable. Much easier to maintain motivation for.
With that in mind here are my Personal Challenges for 2017:
- Read 24 books by December 31st. That’s one every two weeks. Up from my current year score of half a book (Code Complete in case you’re wondering). Split between fiction and non-fiction.
- Contribute and have accepted some code to Chromium, Servo and Node by December 31st
- Build and deploy the “Organisations” feature of CS Blogs by March 31st
- Finish and deploy the new Universal React version worldwidelighthouses.com by July 31st
- Write at least 12 blogs by December 31st
- Write and have accepted a talk for a conference held in London by December 31st
- Lose 10lbs by December 31st
I think all of these objectives are S.M.A.R.T. so I should be able to keep the blog up-to-date with my progress.
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.
I first created this blog in September 2011 in preparation for the start of my undergraduate degree — the idea being that I would chronicle my time at university both in terms of what I learnt and the fun I was having.
Not being able to get a wordpress.com domain using my name (there are 1,574 people in the US called Danny Brown according to the US Census Bureau) I stuck on the name “dannycomputerscientist”, perhaps somewhat presumptuously considering I hadn’t even started my Computer Science degree.
256 blog posts later I’m still here blogging about Computer Science but also about my hobbies and holidays. A change of domain name to something shorter, more memorable and easier to communicate made sense — so when I discovered that DannyBrown.blog was still available to purchase I jumped at the chance.
So for the time being I — reluctantly — remain on wordpress.com but now the blog is known as, and accessible by, dannybrown.blog.
I hope you continue to enjoy reading as much as I enjoy writing.