Monday, September 14, 2015

Priorities and getting things done

This morning I read an older but popular blog post on the duct tape programmer. It is colorful commentary that I've read it before and provides a good reminder on prioritization and getting things done.

There are, no doubt, occasions where you don't want the duct tape programming methodology used, for example when writing the software that keeps an airplane in the sky or a machine that keeps medicine flowing properly into your veins. But I don't work for a company doing those kinds of things. I'm part of a company that buys, sells and delivers building products. We're in an industry that is slow overall to use technology in order to gain competitive advantage and become more effective and profitable. So using "duct tape" here is actually pretty useful and necessary. To paraphrase Joe's post,

I'm not here to write code; I'm here to create value for this organization.

This mindset isn't about making a choice between value-added functionality wrapped in that lovely VB6 gray on the one hand (we have too many of those still in use, unfortunately), and useless but pleasant looking UIs on the other. The development tools and platforms today don't present that one-or-the-other choice. Conceiving, creating and putting into the hands of our business partners the tools that make a difference is paramount. And if it takes duct tape at times to help us do that, so be it.

Friday, May 29, 2015

Windows 8.1 App Mystery - controls randomly disappear but are still interactive

Late last year my team delivered a Windows 8.1 modern app to our outside sales force equipped with ThinkPad 10 tablets. There were bugs to be worked out, of course, and we've still got plenty to fix. But one problem has been truly discouraging given our inability to reproduce it.

The Problem

From time to time, we'd get reports from sales that the top third of screens in the app would simply disappear, leaving just the background of the screen. The weird thing was that the controls that disappeared were actually still interactive. If you knew where they were, you could tap them and do things. But a horrible user experience, especially when you're in front of a customer.

We even saw this problem ourselves on occasion but couldn't reproduce it. The only way to get around it was to close the app and reopen it.

Over time, we came to see that this problem generally occurred after the device had come out of sleep mode. One of our more observant sales reps pointed this out and stated that if he manually closed the app after each customer encounter, the next time he woke the device and used the app he rarely had the issue.

Reproducing the problem

I ran across two SO threads describing the same exact problem: here and especially here. We could actually reproduce the issue using the method he found:
"I can re-create the problem by going to task manager and creating a dump file for the running app. After I do this twice and resume the app, the two text blocks disappear."
He also described how the use of images was related to this problem. Sure enough, we were using an image for our app's background.

Fixing the problem

We removed the background image and instead used a simple Brush. At that point, we could no longer reproduce the issue using the steps above -- problem resolved.

I'm still not sure why the problem occurred in the first place. Possibly related to the lower memory devices (2GB)? Or maybe just something we were doing wrong in the app when trying to use a background image?