At work, we have been receiving reports of people, particularly on Android 2, not being able to install from the Google Play Store citing an error message “Package file is invalid“. At the same time, I was trying to test one of the features I was developing on a couple of Android 2 test devices we have in the office, but I was repeatedly getting an INSTALL_FAILED_DEXOPT error from adb. It seemed that both of these issues could be related.
Software Development
Checking for a Null value in SQL
Yesterday I fell into a very simple but dangerous SQL trap. Can you identify it? Found it? It’s the comparison to null. My intention was to get rows where another_column was null, however the query did not do so. It didn’t give me any results where another_column was null, but didn’t give me any error either. Why? Null in SQL is not a real value. Null means “lack of a value” or “unknown”. Anything compared to null leads to an “unknown” result. Therefore, in SQL there are actually three values conditions can evaluate to: true, false, and unknown/null. This is called Continue Reading
iOS Screen Resolutions
iOS screen resolutions from an app developer’s point of view. 2007: In the beginning Back in 2007 when the first iPhone and iPod Touch were launched, iOS developers only had to worry about one resolution: 480×320. Its aspect ratio is 3:2. Life was great. 2010: The retina displays Fast forward three years and three generations later. In 2010, the iPhone 4 and iPod Touch 4th generation were launched with the first Retina Displays, which doubled the resolution of the screens. The new resolution thus was 960×640. This was great for developers as the new resolution had the same aspect ratio of Continue Reading
Database query optimization is a useful skill
Recently I read an article titled “Quick tip: Improve developer habits by showing time cost of DB queries” by Dan Birken. He claims that one common reason why websites load slowly are because of unoptimized database queries: Websites can be slow for many reasons, but an overwhelmingly common one is time spent performing database queries. Now database queries are likely a very important part of rendering the webpage – the information to populate a page has to come from somewhere. But sometimes rendering a page is slowed down by either unnecessary queries or improperly optimized queries. I completely agree with his view. For most Continue Reading
Heartbleed
The Heartbleed vulnerability has been all over the news this past week. As usual, the media sometimes twists the facts, sometimes intentionally, other times inadvertently. For example, I’ve heard Heartbleed being called a virus, or being framed as something that was deliberately created to be malicious. Also, from reading people’s comments on the online news articles and blog posts, it seems that many people don’t really understand what Heartbleed is or does. From my point of view as a software developer, I would like to provide some information and resources that I believe are true and report the facts (but Continue Reading