- Do you really need to send data to your backend server every 10sec or would once an hour be good? Not only will this save power it will also cost your customers less of their network bandwidth. (Rule #1 - Use the radio less)
- Does having a white background really make the App better? Can you choose dimmer colors? If the App is idle should you dim the screen? (Rule #2 - lighting up more pixels uses more power)
- What about pushing more computation to the server rather than having the phone do it? (Rule #3 - Dont use the CPU for big calculations)
All topics fundamental
This blog will be about all topics fundamental to computer science, computer users, IT admins, and much more.
Saturday, March 24, 2012
Ads can steal your power - Mobile trade-offs
Friday, March 2, 2012
Old rules of thumb always need to be reconsidered
Let me give you an example of how changes in machine capabilities caused the rethinking of an OS. In Windows XP Microsoft Engineers designed the memory manager to aggressively push data from main memory (RAM) to disk. This was done because RAM was costly and very small (~128MB) at the time and so if more memory could be freed up new applications could start faster. If you waited until an application started to free memory users would wait 30 seconds to minutes before the application was usable because of paging RAM to disk. Between the time Windows XP and Vista shipped RAM prices dropped dramatically (from $40 for 128MB to just $2 dollars).
With the dramatic change in memory prices and the fact disks did not really get any faster Vista fundamentally broke from the past rule of thumb of free up as much RAM as possible and push it to disk to just the reverse. RAM was cheap and relatively plentiful so a feature called SuperFetch was created to aggressively page in data from disk to RAM. Based on the decision to not force RAM to disk overall UI performance seemed to be more snappy in Vista. No more shaking the mouse after lunch with XP and waiting a minute+ before logging in.
Well it looks like with the improved performance of CPU's and networks old rules of thumb around UI responsiveness are starting to be reconsidered. Some early UI research in 1968 by Miller and 1991 by Card lead to rules of thumb for UI regularly cited in "Response Times: The 3 important limits" and extended for the World Wide Wait, I mean Web.
Here is a recap of those rules and a few more that have been adopted from experience and very likely paper I've read long ago and forgotten:
- Users consider 100ms response times fast
- At around 1 seconds users will notice a delay but are tolerant
- At 5 seconds users are starting to get impatient and may take action
- At 10 seconds they lose focus
- At 15 seconds they are likely to hit “refresh”
- At 30 seconds they generally navigate away and don’t come back if there is an acceptable alternative.
Monday, February 27, 2012
Fix security bugs early - Interesting paper
http://www.stickyminds.com/Files/Automated%20Testing%20With%20Commerical%20Fuzzing%20Tools.pdf
Monday, November 7, 2011
A look at the Fundamentals in the Cloud
Sunday, October 30, 2011
Old performance addage... Polling is bad
Its long been known that polling is bad. It uses a ton of resources. The challenge is it trips up even great developers. Check out... http://m.guardian.co.uk/technology/2011/oct/29/iphone-4s-battery-location-services-bug?cat=technology&type=article
One way to catch this is to have a good set if resource monitoring tests. Its very likely Apple had these however its hard to catch with so many ways to configure software. This is where collecting these same resources from released devices can help (crowd sourcing test). Check out for example Microsofts SQM (aka Customer Improvement Program) data.
Should you decide to collect telemetry just remember the second addage... Bad collection is like polling.
Friday, October 28, 2011
Crowd sourcing Apple iPhone 4S power performance
Interesting easy to solve the issue...
http://m.guardian.co.uk/technology/2011/oct/28/iphone-4s-battery-apple-engineers?cat=technology&type=article
Monday, October 17, 2011
Performance Test Pattern
There are two test here. Test 1 which looks pretty erratic and test 2 which looks pretty stable and repeatable around 3 ms. Given this I'm pretty sure you are going to choose test 2 on which to monitor and track performance. The test is very stable meaning the variance is very low and repeatable because it does not drift off over time. For an example of drift check out the following:
Here you can see the results are pretty stable in that the overall variance from number to number if pretty low however the results are not very repeatable and seem to drift up over time. For this particular test high ping time is bad. This is also and example of "death-by-a-thousand cuts" where from test to test results look good but over long periods of time you see performance is dropping off.
So the question then comes up how do you make stable and repeatable performance tests? The answer is to follow a test pattern like the xUnit pattern with a couple of extra steps. The pattern is the following:
- setup
- warmup
- execute
- something most tests forget
- publish
- cleanup
- teardown





