LunarLincolnLunarLincolnLunarLincolnLunarLincoln
  • Home
  • Process
  • Services
  • Work
  • Writing
  • About
  • Contact
  • Home
  • Process
  • Services
  • Work
  • Writing
  • About
  • Contact
Feb
29

Solving Hard Software Development Problems

  • Posted By : Travis Smith/
  • 0 comments /
  • Under : Coding

One luxury we as programmers often take for granted is the vast wealth of others’ experiences available for perusal at our fingertips.  Rarely do we encounter a software development problem so challenging that Google and StackOverflow cannot offer assistance. However, when working with cutting edge technology, these elusive obstacles arise more frequently and I’ve dealt with my fair share of them here at LunarLincoln.

While there is no steadfast problem-solving algorithm, most code artisans (I’m hoping this name sticks) will first consult the web.  More often than not, the hunt ends here.  An experienced developer will know the specific keywords that will help narrow the search for the solution to their problem.

giphy-2

But what if you encounter a problem that nobody knows how to solve?
Worse, what if nobody else has ever tried to do what you’re doing?

This is where we have to break out the big guns. Let’s use an example.

When I worked on Compass, I was tasked with figuring out how to stop it from draining the user’s battery so much.  At the time I hopped on the issue, Compass was tracking location data, motion data, HealthKit data, calendar events, photos, weather and more.  All the time.  Yikes.

compassiconintegrations1

Unsurprisingly, most phones didn’t react well to this kind of stress, and the largest complaint we got from testers was the drain it had on their phones.

Since everybody knows that premature optimization is the root of all evil, I had lots of avenues of attack.  The first matter of business was to figure out the biggest culprits.  Using Apple’s Instruments program, I was able to run the app and observe the battery usage levels as well as find out which parts of the app were consuming most of the CPU cycles.  As it turns out, recording a user’s location was creating huge spikes in battery consumption.  Knuckles cracked and fingers wiggling, I was ready to take a stab at it.

Adventure Time Deer

The first thing I did was dig into the current implementation to see how it worked.  The app was always tracking location, even in the background, with the highest quality accuracy.  And that’s great for results, but bad for battery.  Fortunately, I had a place to start looking for a solution.  Todd had a pull request ready which he said improved battery life but was ruining the accuracy of the location data.  His idea was to use geofencing.  He would wait until a user stopped moving, disable the GPS, and activate a geofence around the user.  When a user had moved a significant distance, the geofence would trigger, and the app would resume high accuracy tracking until the user stopped moving again.

I thought that was a brilliant solution, but as I researched all my options for tracking location, I learned it wasn’t going to work as we wanted.  Geofencing just didn’t offer enough precision.

giphy

The location logger app

The location logger app

The second solution was the phone’s motion coprocessor.

We were already tracking the user’s activity state, and I opted to hijack this information to determine when to activate and deactivate the GPS.  When a user is stationary, turn off the GPS.  Otherwise, crank it up.

Now I needed to create the algorithm to make this happen.  To iterate on the fine details of algorithm, I created a really small, ugly, but highly functional app that tracked my location and let me plug in my actual activity state (to make sure the motion coprocessor was accurate).  I would walk and drive around the neighborhood to test its accuracy while measuring its battery consumption. (Ben even went on runs to test the running measurement, and may or may not have eaten it on a piece of random construction material. Sorry Ben!)

The location accuracy visualizer app

The location accuracy visualizer app

When the tests were done, I would export the data and compare the location data to the route I actually took.  I created another tester app just to map the travel lines.  Using this, I could see whether my algorithm was precise enough to meet our needs.

In the end, I was able to create massive gains in battery performance without any noticeable hit to location accuracy.  Of course, the app still needs a lot of battery, but my models showed that multiple more hours of idle use could be seen, especially when stationary.

This form of rapid prototyping helped immensely in crafting a solution to this open-ended problem.

Surely this wasn’t the only way to solve this problem, nor is this guaranteed to be the best solution.  But one of my favorite ways to tackle a problem is to build myself some proper tools.

 

“Give me six hours to chop down a tree and I will spend the first four sharpening the axe.” – (Probably not) Abraham Lincoln


Sep
30

The Ah-Ha Moment….and what comes after

  • Posted By : Jennifer Bennett/
  • 0 comments /
  • Under : App Advice, CaseCollage, Design

Two Wednesdays ago – Apple held their keynote.

The public got to hear about what developers had been privately talking about ever since WWDC. New iOS7, drastically new design, new phone colors, new cases, new everything. After all the news stories, podcasts, dinner conversations, and tweets – I will be glad if I never have to hear about iOS7 again. (side note: I do not worship at the foot of the giant golden apple like some members of LunarLincoln).

Something that I had been very vocal about, since seeing the beta iOS on Wiley’s phone weeks ago, was the lack of forethought put into the new OS.  The day-glo colors, the hyper thin fonts, the icon redesigns – some of it seemed…first draft/rookie. There were a lot of changes, and I’m not sure every single aspect had been vetted to a Job-sian standard. Now, the general public may not be as finely attuned as I am to these things and will never bat an eye at the changes, but one thing everyone DID notice was this:

Screen Shot 2013-09-30 at 10.33.27 AMSeriously? There are at least 5 quick fixes to this issue. – No circles, Fill in those circles, Move the circles, Move the regs, Don’t get into the case industry.

But, whats done is done. Aaaaand, why not benefit from other’s missteps?

Here comes the ah-ha moment….can’t someone just cover up the “hon”? What if the circles were frames…what if…we built an app to fix this.

IN A WEEK.

Obviously, we didn’t do it in a week. WE DID IT IN TWO. BAMMMMMMM.

I do not suggest ever building an app in two weeks if you value your free-time, sanity, household cleanliness, or personal relationships with business partners. That said, our app is currently in review and I feel pretty damn excited about it.

Things I learned when building an app in a condensed timeline:
– You don’t get to “sit” on your design. Don’t let it ruminate. Don’t edit it with the clear eyes of the next morning. Nope – slap that crap together at 11pm
– You have to edit on the fly a lot. How many times have I rebuilt the photoslider? Or resized/recolored icons – do not ask.
– To quote the Real World, you will “stop being polite and start being real” (And NO we do not need 10 tutorial screens (but I will make you one, if you just shut up uuuughhh))
– You will have to compromise on concept. Our platonic ideal is about 2 more updates down the road, but 1.0 isn’t half bad.
– There is a lot more design to an app than just UI. We need an icon, a facebook cover image, a twitter background, a website, a landing page, some mockups, a press kit. Oh hey, what about a video?
– You will lie to yourself again and again about what “almost done” really means.

We’re almost done you guys! Hopefully, the powers that be will look at our app, approve its excellence – even if it is poking at their failure – and everything can go public. Now we just have to wait and see.


Recent Posts
  • Celebrating 10 Years
  • Copious Communication
  • Initial Questions for a New Mobile App Project
  • Gif TV: A LunarLincoln Product
  • Onboarding other peoples code
  • What’s in a name?
  • Don’t build it all. Picking a Platform.
  • Talk to your Users
  • Design for Fat Fingers
  • A new look
Archives
  • August 2023
  • May 2021
  • September 2020
  • November 2019
  • October 2019
  • June 2019
  • April 2019
  • February 2019
  • January 2019
  • October 2018
  • August 2018
  • June 2018
  • April 2018
  • January 2018
  • October 2017
  • August 2017
  • June 2017
  • February 2017
  • January 2017
  • September 2016
  • July 2016
  • April 2016
  • March 2016
  • February 2016
  • October 2015
  • September 2015
  • July 2015
  • May 2015
  • February 2015
  • December 2014
  • November 2014
  • September 2014
  • May 2014
  • April 2014
  • January 2014
  • December 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • December 2010
Categories
  • Agency
  • App Advice
  • Branding
  • Business
  • Business
  • CaseCollage
  • Coding
  • Design
  • Design
  • NSVille
  • Uncategorized
  • Web Design
Copyright LunarLincoln 2025. All Rights Reserved