Azure Functions and ServiceBus gotcha

Okay, so this might not be a gotcha, but I lost an hour early this morning trying to diagnose a problem with an Azure Function I’m writing. I’m using ServiceBus triggers and outputs to form a processing pipeline using the functions. One function reads the messages on a queue and then puts another message on a queue for another function to handle.

I was getting this non descriptive error when running locally.

error

After much experimentation I realised that the ServiceBus queue in the function.json must actually exist 🙂 For some reason I assumed the host would create them as required! Anyway.

Might be of use to somebody else.

Advertisements

Back to basics

Tempus Fugit. As a developer, one of the things that causes me to stress the most, is a simple lack of time.

I have so many ideas (mostly useless) floating around in my head that I would like to turn into reality. I have three apps in the App Store, which I don’t really update. I also have a day job.

Faced with so many things to do, I really struggle to focus. I can lock in on something for a week or two, but a customer email will arrive, or a new idea will pop into my head, and my priorities change, leaving something half done.

This excellent Commit Strip is basically my product range – http://www.commitstrip.com/en/2014/11/25/west-side-project-story/

Strip-Side-project-650-finalenglish

My iOS app, Roomr, is a good example of this.

What started out as a simple app for viewing the availablility of meeting rooms morphed into something more complicated, but which wasn’t *more* useful. I kept reacting to user’s feature requests, without keeping an eye on the growing complexity. Complexity, I said to myself, is natural as a product evolves.

Roomr doesn’t make much money. I’ve sold a few thousand units over the years, which I’m very thankful for, but it’s never actually been worth my time. Rather than maintaining that app, I’d have been better building an app for somebody else and getting paid.

It took me a long time to accept this simple truth.

Uncontrolled feature creep is the biggest issue I face.

I recently had a user state, in an email, that if I added feature X, they’d buy ten units of the app. I knew it would take me 20+ hours to implement this and that ten sales hardly covered 1/2 an hour of my time, but I went ahead anyway, knowing full well, that I’d probably never see a return on this investment. I justified it by saying “if I add feature X, more people will buy it”.

The fact of the matter is, it won’t make a blind bit of difference. I’ve had this request from two or three other users in the past three years.

Another justification for adding complexity is that by adding feature X, a large company will buy many, many licenses i.e. £££ for me. Again, reailty has taught me otherwise. I’ve had large multinationals inquire about the app and large scale deployments, but none of them ever made a purchase, despite many changes. An app with just one developer behind it, presents too much risk for companies, which I understand.

I’ve come to realise that, when you’re on your own building apps, simplicity is probably best. My iOS apps, Roomr and Peopler started with a very narrow focus on doing one thing and doing it well. Somewhere along the road, I lost focus on that. Sure, it was fun and interesting working on the complex stuff, but in the end, I think my nerves and customers, suffered.

I had planned on Roomr 4.0 being more complex than the previous versions, but I think it’s time to start ripping stuff out and making the app more focused than before. I’m also going to try ad support. If I can generate more revenue, it will be easier for me to update the apps.

This will, I suspect, upset some existing customers, but I would rather try a new approach, then kill the app off completely.

Import SaaS invoices into FreeAgent

One of the major pains when dealing with SaaS providers, is importing their invoices.

We all know the drill:

  • You log into your SaaS application
  • You find their invoice section.
  • You create a new bill in FreeAgent and copy/paste your way through the details and being sure to account for the various currencies!
  • You download the PDF form of the invoice and attach to the bill.
  • You then explain a banking transaction with this new bill.
  • Repeat over and over again for the various SaaS providers that take your money Smile

There is no standard way of getting these invoices and each provider has their own way of presenting the bills.

Painful is an understatement!.

Thankfully, Free Agent offers a very powerful (and easy to understand API) that enables developers to create applications that can interact with your account. As both a developer and a FreeAgent user, i decided to try and solve this woe.

My first idea was create an online service that could simply connect to each of my SaaS proviers. scrape the HTML and download new invoices each month. Whilst this is possible, it would mean having my service credentials sitting up on a server. Not good.

My second idea was to have a local windows service that did something similar. This approach started well until I hit Github. I use Two Factor Authentication, which I recommend, which makes automation impossible. The price of safety I suppose.

Having resigned myself to the “manual” approach, I explored the idea of using a Chome extension. This meant not having to worry about the credentials as I simply log into the providers the normal way. I also don’t have to worry about cloud security since none of my data leaves Chrome except when sent to FreeAgent (over HTTPS of course).

The idea is simple. When you visit a supported website, the extension injects an import button into the appropriate parts of the page. CLicking the button opens a dialog, prepopulated as best as possible.  You can then set the contact and category and optionally select the bank transaction you want to explain. Here is a GIF showing the flow on a dummy provider I created.

i4mFz7VxBD

This works *really* well, but it’s not 100%. Not all SaaS providers give all the information on the screen (I’ve tried parsing the PDF, but it’s too brittle and I don’t like my data going out of Chrome). Companies like Microsoft also redirect you all over the place when trying to open the invoice PDF, so sometimes you have to take actions like opening a PDF so the security cookies are set.

That said, overall, it’s made a massive difference to my accounting workflow. I can visit four or five providers in the space of 15 minutes and import 15 invoices. The rate of error is much lower since the extension is handling it for me.

At this moment in time, the extension supports:

  • Github
  • Office 365
  • Microsoft Azure
  • Taxamo
  • Hover (without PDF invoices it’s a bit disgusting so I’m looking at taking a screenshot)
  • Google Adwords
  • Forward

I want to add some memory into the extension, so it will preselect the contact and category for particular sites and I’ve a lot of JavaScript to clean up.

I think this could benefit other FreeAgent users and I’d ultimately like to release it and charge a monthly subscription. This would help me support providers beyond those I use myself.

If this workflow of invoice importing sounds familiar and is something you dread, I’d love if you could get in touch. I really like a few beta testers that could try this extension out and see if it’s a help or a hinderance. Please leave a comment or drop me an email – tomas@coldbear.co.uk

Android Beacon Monitoring Woes

My new experimental app, Job Tracker, has been out in the wild with my beta tester for the past few days and, whilst the feedback has been good, the app is just not working as I expected.

The main problem is that, after a random period of time, it stops picking up the beacons. This is due, I believe, to the fact that Android is killing my monitoring service due to memory pressure and failing to restart it. That or my implementation is utter rubbish. I’m going with the former 🙂

In order to make region monitoring work for beacons, you need to have an Android Service running that actually performs the monitoring. I had originally implemented this as a background service. To try and work around the problem, I’ve made my Monitoring Service run in the foreground and added a Ongoing notification to inform users as such.

device-2015-01-22-091258

This will, I hope, keep the service running for much longer, allowing a better experience for the user. This is just a reminder that iBeacons are certainly an Apple invention and hopefully Android will eventually bake iBeacon support into the OS.

Track your work. The iBeacon way (Van drivers only)

After a discussion with two of my brothers around the problems they face as mobile workers (electrician and mechanic), we got thinking about an app that might help them.

After much experimentation with Android and the (awesome) Estimote beacons, I have developed a simple Tracking application yesterday. It’s amazing what you can achieve when you have some clear and simple goals

By placing an Estimote beacon in their vans, their phones will track when they enter and exit. Combine this with their GPS location and you have a simple way of knowing when and where they leave their van.

A simple notification pops up when their enter their van asking them to complete the job details.

device-2015-01-10-134854

device-2015-01-10-134908

The biggest challenge here has been learning who Android finds locations. I finally settled on the FusedLocationAPI provider, but even this proved difficult to use. I wish Android would sort out it’s documentation or provider more up-to-date best practices!

Anyway, I have the Estimote SDK integrated, but the current challenge is making it work when the app has been killed. Simple in iOS. Not so simple in Android. In fact, I have yet to find any code samples on how I’m supposed to do it!

More to do, but this is coming together nicely!