I can’t believe it’s September already. The weather is starting to become cool and wet, days are becoming shorter, marking the end of what has been an incredible summer (and year to date). It’s been a while since I’ve written here, so with the changing season I thought I’d share a bit of an update of 2016 so far. Some of these warrant their own blog posts, but until I have time to write the full thing here is a summary.
Software Development
Using Multidex to solve INSTALL_FAILED_DEXOPT errors on Android
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.
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
