smudge.io

iPhone, iPad & Android Application Development

November 16, 2016
by smudge
0 comments

Scratching Your Own Itch

For seven and a half years I worked as a Systems Engineer at a major tech company. Ongoing changes within the company resulted in having five different managers within a 12-month period, and an annual review that gave me a ranking of mediocre despite a mid-year review that said I was on target to hit the highest rating, as I had done in many previous years. I was told the rating was because my utilisation was too low… It was 108% of my designated working hours. The other members of my team also received uncharacteristically low ratings.

At this I resigned from the company. Not to go and work for another tech company, but to do my own thing, to strike out on my own.

Three weeks after I resigned, all of my team were made redundant. I missed out on around 26 weeks of redundancy payment. I’m not overly worried about missing out on the redundancy, then or now, just happy to be setting my own direction and taking charge of my career. Some people have speculated that the team were given lower ratings, so when they were made redundant, it wouldn’t appear that the company was losing key performers and management wouldn’t be questioned over it… But that would be unethical right?

So I had to start my business as a sole trader. I had spoken to a friend of mine who ran a small tech company about providing some support services for me. What I really needed was:

  • Timesheet/Approvals
  • Invoicing/Statements/Outstanding Debts
  • Public Liability/Professional Indemnity Insurance

So I worked through my friend’s company, which allowed the company to manage all of the administration for my clients, while I invoiced the company a single line item once a month, at a cost of around 13%. Not a lot of technology needed, Microsoft Word to create invoices, Microsoft Excel to track income and expenses. I had downloaded trial copies of MYOB and the like, but these seemed overly complex for the simple tasks I required.

Fast forward four years and everything had been running smoothly, then personal issues caused the business to cease trading. Time for a new solution. Speaking to another friend, they recommended a particular contracting agency they had previously used. The agency supported a number of models including PAYG, Sole Trader and Pty Ltd Company. I transitioned my clients to this model. The agency added a number of overheads, partly because of their structure, including:

  • 5% Payroll Tax
  • 4.5% Management Fee
  • PAYG
  • Compulsory Super that negates additional payments because of the 90/10 rule for superannuation tax deduction

In addition, there was often issues in delays getting clients on-boarded, updating contracts, or simply getting purchase orders added to timesheet against. A working solution, but not seamless, and not always timely.

After nearly a year of this another friend who ran a small tech company asked me to do some work for them. Under this arrangement, they were covering the Public Liability and Professional Indemnity insurance for me under their policy. All I needed to do was invoice them weekly and supply timesheets for the various clients. Back to Microsoft Word for invoices and Microsoft Excel for timesheets.

A few months into this arrangement, working through both the contracting agency and direct to the tech company, I was introduced to Xero the Software as a Service accounting package by my friend at the tech company. I signed up for the Xero trial and was immediately impressed with the simplicity of the application. I set up my bank feeds, and once they were approved, began reconciliation creating rules as I went. To do my BAS, simply generate a report. The whole process was a breeze. Create an invoice, approve and email it. Seamless. Fast. Easy.

The only point of friction now, was the whole timesheet issue. Still using Microsoft Excel, and a single line item invoice every week. I looked at a number of products in the Xero Add-On Marketplace, but the issues I had were the applications didn’t record start and stop times as required by a number of my clients, or there were there own complete invoicing solution and would just transfer a single line item to Xero, which I was not keen on as it was effectively paying for the same solution twice, and had the opportunity for issues syncing and transferring between the application and Xero.

I imagined a better solution. A solution where I could access my contacts direct from Xero, and allocate time against them. From there to be able to create a draft invoice in Xero, so I could go in and adjust if necessary then approve and send with a couple of clicks. An iPhone app seemed ideal, as my phone was always at hand. Some of the other features I wanted were:

  • Set the start time when the timesheet is created
  • Update the stop time whenever it is selected
  • Use contact invoice terms where configured in Xero
  • Save the billing rate per contact
  • Configure projects (or POs) for contacts, and individual billing rates for projects
  • Create approval emails for select contacts to pre-approve invoices
  • Set individual contact time rounding
  • Export all previous times with invoice numbers to email

So I scratched my own itch. I built ZeroTime for Xero, an iPhone app. I used it for six months in a serviceable, but incomplete stage until getting the time to complete it. Once it was complete and in the iTunes App Store, I approached Xero to have ZeroTime approved as a Xero Add-On Partner. After going through the process and completing an interview/presentation with Xero Developer Relations it was approved. I must say the Xero Developer Relations were always helpful, promptly answering questions and clarifying details when requested.

So that was the last link in my workflow. I create timesheets in seconds as I work, offline if necessary. On Monday mornings when I invoice, I send the timesheets from my iPhone to Xero as a draft invoice for each contact I have worked for during the week, then click approve and send in Xero and it’s done. I think it’s yet to take more than five minutes, and I’ve been doing this for nine months now. My clients get detailed invoices, with start and stop times, and approval emails are automatically generated where required.

Now for the shameless plug for the iPhone app… ZeroTime for Xero: http://zerotime.io

If you are interested in Xero, you can get a 30 day trial Xero account and the Demo Company is pre-populated with data if you want to see a working version.

February 11, 2013
by smudge
0 comments

Android: 33 Days to Piracy

Having developed a number of apps for iOS, I had a number of requests for some of these applications to be ported to the Android platform. Having some spare time between projects, I decided to port the most popular and most requested app CNS Tap Test. This is a reasonably simple app used to track and trend the recovery of your Central Nervous System as part of a training program.

I had followed development on the Android platform, and piracy was always at the forefront of concerns regarding the platform. The common cases appeared to be, after removing any licensing or copy protection, and resigning with a third-party certificate:

  • Hosting on third-party websites for free distribution.
  • Injecting malware and re-posting the app.

With this in mind, I looked into the options to mitigate the risk of piracy. The typical options appear to be:

  • Do nothing
  • Obfuscate with ProGuard
  • Use the Google License Verification Library to license the app
  • Use custom code to detect changes to the .APK CRC and signature

My first concern is not to inconvenience legitimate users under any circumstance.

The most promising was the License Verification Library (LVL), but it does have some limitations such as requiring a network connection. Unfortunately there is a tool available (AntiLVL) to automatically strip LVL protection. It may not work in all cases depending on how LVL has been implemented. LVL appeared to be excessive for a $1 app, and would be circumvented with less effort than it took to implement it.

Detecting changes to the CRC and signature appeared to be a good option. The issue being that the valid CRC  must be held outside the .APK as it is unknown until the .APK is built, and then changed whenever the code is changed. What I decided to do, was to log these so I would know when the app had been compromised, but not to take any action in the off chance that a false positive would inconvenience legitimate users. Any action could easily be bypassed by disassembling the code, and putting a return into the appropriate call. I also used ProGuard to obfuscate the code.

The app went live on Google Play on the 7th of January. 33 days later the current version of the app logged a different CRC and signature. It has only been logged once to date, so whether the logging has been removed, or the app has been cracked but not yet distributed, is yet to be determined.

How does this compare to iOS? I have no comparison as I implemented no such scheme in my iOS apps,  but from a revenue viewpoint the iOS version of the application has 6x the revenue of the Android version over the last 30 days.

The piracy and minimal revenue does not encourage me to further invest time and money into the Android platform.

January 10, 2013
by smudge
0 comments

How to move your data from CNS Tap Test iPhone to Android

With the recently implemented Android version of CNS Tap Test there is the ability to import your results from the iPhone version.

This will allow you to consolidate all your results in one place. The import process will only create records for dates that do not exist, so the process can be run multiple time if necessary.

Note: The date format on the iPhone and the Android device must match, otherwise the dates may not be imported correctly.

The process is as follows:

1. Export CNSTapTest.csv from your iPhone by going to Settings by selecting the info (i) button, then selecting Email Data.

2. Connect the Android device to your computer with the USB Cable.

3. On the Android device drag the status bar down from the top of the screen to reveal the notifications panel.

Screenshot_2013-01-10-05-59-00

4. Select USB connected.

5. Select Turn on USB Storage.

Screenshot_2013-01-10-06-00-40

6. On your computer copy the exported CNSTapTest.csv to the root of the removable drive.

CNSTapTest_1

7. Eject the removable drive from your computer.

CNSTapTest_2

8. On the Android device drag the status bar down from the top of the screen to reveal the notifications panel.

9. Select Turn off USB Storage.

Note: If the last two points are not completed, CNS Tap Test will not be able to read the data.

10. Start CNS Tap Test on your Android device. Your records will be imported automatically.

Screenshot_2013-01-10-06-37-06

11. If any records are successfully imported, the file on the Android device will be renamed CNSTapTest.bak.

CNSTapTest_3

August 26, 2011
by smudge
2 Comments

All The Classic Signs

I had been working up to getting a good time on a 12km run, and looking to improve my cardio for a national competition 2 weeks after. I had been pushing hard, doing up to three sessions a day of running, swimming, cycling and BJJ. My plan was to push it hard, then ease up during the final week getting to complete rest at the end of the week.

Unfortunately my plans came unstuck, as I over did it and went into an overreaching phase. As you can see by the attached image from Overtraining Monitor, I was getting some early warning signs in the form of raises in resting heart rate. Then on the Thursday I had a raised resting heart rate with a corresponding drop in weight, followed by my resting heart rate remaining raised. By the Saturday I was on the mat wrestling and I was slow, gassed and feeling flat.

After a couple of days of complete rest, you can see my resting heart rate drops back down to the low 40’s. The following peak is my typical Thursday morning peak, where I have a big session late on Wednesday night, and don’t appear to have recovered by the time I measure about 8 hours later.

July 15, 2011
by smudge
3 Comments

A Bad Westhost Experience

I had hosted a website with Westhost on a shared server for a while, and hadn’t had a whole lot of problems with it, other than some limitations around the maximum number of connections allowed on the shared hosting platform. When I had the requirement to bring another website online as a backend to an iPhone app, I went for the base Cloud Hosting package choosing the Reseller option to allow SSH access. Through my own incompetence I managed to sign up for 12 months in advance, rather than by paying on a monthly or quarterly basis.

Unfortunately I have been afflicted by more than one outage every month. The following are the outages as recorded by Site24x7.

Uptime Downtime No. of Down
99.84% 8h 57m 9
DOWNTIME SUMMARY
From To Duration
Jun 27,2011 20:16:56 Jun 27,2011 23:32:26 3 Hrs 15 Mins
Apr 09,2011 14:53:44 Apr 09,2011 15:10:40 16 Mins 55 Secs
Apr 05,2011 13:31:06 Apr 05,2011 13:33:12 2 Mins 6 Secs
Mar 23,2011 21:18:27 Mar 24,2011 00:17:30 2 Hrs 59 Mins
Feb 23,2011 23:35:26 Feb 24,2011 00:46:22 1 Hrs 11 Mins
Jan 21,2011 16:24:20 Jan 21,2011 16:26:18 1 Mins 57 Secs
Jan 07,2011 13:47:08 Jan 07,2011 14:20:56 33 Mins 47 Secs
Dec 27,2010 05:21:38 Dec 27,2010 05:55:26 33 Mins 48 Secs
Dec 03,2010 10:49:34 Dec 03,2010 10:52:09 2 Mins 35 Secs

I would like to point out these are all infrastructure failures, not bad code or misconfiguration on my part. I understand that outages are going to happen, but on at least two occasions I was unable to contact anyone via instant chat, or able to get any response by logging a call or via Twitter until well after the outage was over. My mail server at home had been up for two years straight before it was restarted during  a distribution upgrade, and I don’t have a SAS 70 Type II Compliant Data Centre.

After the last 3+ hour outage I decided enough was enough, and moved my websites to the Rackspace Cloud.

Not unreasonably, I now wanted a refund for the unused four months of hosting, and for the 3 months where the uptime was below 99.9%, as advertised on the Westhost home page:

It seems only reasonable when you look at their 100% Lifetime Satisfaction Promise including:

  • We promise to provide you with optimal uptime. Our hosting systems infrastructure will be constructed, maintained, and monitored to ensure 99.9% uptime.
  • We take our promises very seriously and will issue you an appropriate credit if we have failed to meet our end of the bargain.

And that is where the problem occurs…. According to Westhost Billing:

“In regards to your request, due to our Terms of Service we do not offer a uptime guarantee on our Cloud, Reseller or Shared hosting or unManaged server plans. We only offer an SLA (Service Level Agreementt) on our Dedicated Servers found at this link, http://www.westhost.com/policies/sla.html.”

Does this mean their 100% Lifetime Satisfaction Promise only applies to their Dedicated Servers?  To me, that is certainly not how they advertise it, and the confusion must reign internally as when I previously asked for a refund for an outage the response I got was not that it wasn’t applicable to my account but that:

“I am sorry that you have experienced those down times, unfortunately we will not be able to reimburse you because we calculate the up time from the beginning of the month to the end of the month so if those are the only two downtime’s for those months they occurred in separate months so would not have effected each other and each month would have had a up time of 99.9%.”

So having been informed that should I have 99.9% downtime in a month I would be due a refund, I laboured under the misapprehension that I would get a refund for the four months hosting I had paid for, but not used. Not so apparently:

“In regards to your cancellation for the cloud service no refunds are offered when service is closed in the middle of the hosting period.”

I’m not saying that if you break out Lawyers at ten paces, they don’t have a legal, contractual case for the above refusal to refund for service not delivered, but I believe it is well outside of the spirit of the 100% Lifetime Satisfaction Promise and the message conveyed by their website.

So with a bitter taste in my mouth, I have had some early success with Rackspace:

  • Hosting costs are calculated by the hour on resources and bandwidth used (Calculator), so it looks like my hosting cost will only be 25-30% of what it was at Westhost.
  • I have logged one support call so far for a change that was done BLINDINGLY FAST, and right the first time.
  • Should I want to leave (which I am very much hoping will not be the case), I can terminate billing immediately just by deleting the virtual machine.

UPDATE: Within 24 hours WestHost had contacted me, and undertaken to give me a refund for the four months of hosting that I had not received. Within 5 days I had the refund in my PayPal account.

UPDATE: 24 August – Things not going so well over at WestHost. Rackspace 57 days, 100% uptime.