Archive for 2011

Making SQLite Work

So I’ve been playing around with creating an offline application. Because I want dynamic data, I needed to figure out how to use a SQLite database. Honestly, I feel quite foolish because I was sure that I was doing everything correctly, following the tutorial (nearly) perfectly (sans “Girls” application, I enjoy being married!).

Despite working at if for several hours nothing I was doing was working. Then I caught it—the typo. Inside of my insert statement I had miss-typed the name of one of the table fields.

No errors. No warnings. No worky.

I guess this is my lesson that with a SQLite database there is no forgiveness. You do it right or you don’t do it. Apparently I just needed a reminder that I’m human.

Post Ratings: (No Ratings Yet)

Google Android’s Map to Success

Google’s Android OS is doing very well, on phones at least, but according to some surveys people would rather have an iPhone. It seems that a lot of people have only joined the Android ranks because it was available on their network and the iPhone wasn’t. This could be a problem for Android since all three of largest mobile phone providers may be offering the iPhone soon since AT&T and Verizon have it already and Sprint may soon join the party.

When it comes to tablets, Android tablet sales are still lagging quite a bit compared to the iPad. There are several possible reasons, some say that iPads are better, perhaps its due to the large number of apps Apple has to offer compare to their competition. No matter what the reason, however, Google has a great OS and it should be doing better than it is.

So what can Google do with a stagnant tablet market and a phone market that may not be so successful in the future? Well, the whole $99 fire sale HP just had could give us one hint. If Android phones and tablets where significantly lower priced than their iOS rivals, that could win over the masses. Of course, Google is subject to the manufacturers choices of hardware and prices, and they don’t control the pricing of the products that hit the market—but the could. Here are two ways that Google can make their platform more successful.

1. Subsidize

The United States Government has subsidized corn production in the US so much that you can find corn byproducts in just about every food you pick up in the grocery store. (Of course this only hurts the farmers and its not good for us either, but that is beside the point of this article.) Why can’t Google subsidize its products?

What if Google started paying manufacturers to produce the hardware of systems running a certified version of Google Android. This would have some big advantages. First, it would limit the customization that OEMs can do to the system and provide a more seamless experience for users moving from one device to another (something I know Google wants). Second, the price savings would go to the customers, meaning that more Androids will be running around than ever before because people love inexpensive toys. (The OEMs wouldn’t suffer like farmers do with corn production, since there isn’t really a middle-man.) Third, it may even bring some Android OEMs back into the fold of consistent experience (Amazon has completely overhauled Android, changing the UI and removing the marketplace…that’s not good for Google.)

If Google subsidized the purchase of certain types of hardware for systems that had the Android Marketplace, Google as the default search engine, and respectable hardware, customers would get a great deal and would flock to Android the way people flocked to the HP TouchPad (even though the thing has no perceivable future).

2. Make the Marketplace More Enticing

There are a couple things Google really needs to with their Marketplace, including making discovery easier, but I’m going to focus on something else.

Amazon has the right idea of offering a free app everyday. When I do finally get my own Android device, I will surely install Amazon’s App Store, simply so I can reap the benefits. If Google did this, or perhaps a “buy ten paid apps get the next one free” kind of deal, the Marketplace would surly be more successful attracting more developers. Google doesn’t really care if they make money on their Marketplace, they really just want people to make more Google searches, so this Marketplace strategy is really intended to attract more users to attract more developers to get higher app numbers to attract more users (who will then make more Google searches when they use their device).

Conclusion

Google is certainly one of the big mobile OS powers, but the game is still new enough that things can change quickly. Google better start acting with some strategy before, say Microsoft, gets ahold of these ideas and makes their platform more enticing for the users.

What ideas do you have to make the Android platform better?

Post Ratings: (No Ratings Yet)

jQuery Selector Test

The other day I was talking to one of my coworkers who asked me an interesting question. He wanted to know if there was any significant improvement, when using jQuery, to assigning a jQuery selector to a variable when you repeatedly are referencing the same object. Is there much overhead when jQuery instantiates the variable?

Neither he nor I doubted that there was some overhead, but we both wanted to have a more clear picture so I devised the following test:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script type="text/javascript">
	var tests = 100000;
	$(document).ready(function(){
		var date1a = new Date();
		edit1();
		var date1b = new Date();
		var date2a = new Date();
		edit2();
		var date2b = new Date();
		$('#one').html(date1b-date1a + " ms");
		$('#two').html(date2b-date2a + " ms");
	});
	function edit1(){
		for(var i = 0; i < tests; i++){
			$('#one').html(i);
		}
	}
	function edit2(){
		var two = $('#two');
		for(var i = 0; i < tests; i++){
			two.html(i);
		}
	}
</script>


And:

1
2
3
<div id="main">This is a test page.</div>
<div id="one">Test 1</div>
<div id="two">Test 2</div>

The results were pretty consistent as follows:

     This is a test page.
     3007 ms
     2497 ms

Post Ratings: (No Ratings Yet)

Thoughts on Windows 8

So the most recent Windows 8 preview is out:

Initially my thoughts are pretty generous. The new Windows 8 stuff looks like a well thought out system, but then they also show a full version of Windows desktop running on this touch screen laptop.

While I wonder about how well a system like this would do (partially built for keyboard and mouse but crammed into a tablet, but also a system obviously built for touch expanded to a desktop) my real questions go deeper than the UI.

Tablets (at least all of the ones that I know of that aren’t just convertible laptops) all use solid state storage. This is good for several reasons. First, it keeps a device small and light. Second, it makes devices faster than a slow rotating harddrive based system would be. Solid state storage is ideal for tablets, but it also has its drawbacks.

At the moment, solid state storage is expensive. At tigerdirect.com, solid state harddrives with 120 GB run around $300, if you search for regular harddrives, your first results show 2TB for a mear $80. That’s 16 times the storage for about 25% of the cost!

The cost of solid state drives is typically the reason you only see tablets with 16 – 64GB. Of course solid state harddrives will come down in cost eventually, today they are only affordable by the masses with less capacity.

So coming back to a Windows 8 tablet, how much storage will just the operating system take? If you take Windows 7 and add more onto it for the touch stuff you’re looking at a significant chunk of storage. My Windows 7 VM (with only a couple added programs) takes up more than 20GB of storage.

So without any files, I’d expect Windows 8 to take up the same amount of storage. Not including any programs. Not including huge music/video collections.

One of the reasons iPad has been successful is because it is so affordable, its base model starts out with 16GB. Most of that storage is free when you get the device. For Windows to provide the same amount of free space on a Windows 8 machine they would have to have at least 32GB. Of course that is still in competition with iPad and its upper models, but it also means that Windows tablets can’t compete with the lower models on price.

Perhaps I’m blowing this out of proportion. Maybe an OEM will make an inexpensive model with lots of storage and still beat Apple on its pricing. What do you think?

Post Ratings: (No Ratings Yet)

If I were Amazon.com, I’d consider taking my books and going home.

So Apple released a new subscription model. It says that all in-app purchases will be subject to a 30-70 split in profits, much like the music and App Store currently emulate. Further, all purchases that can be made outside of an iOS app, must also be available for purchase inside the app and no link can be provided within the app to outside stores. And they can’t be priced lower outside of the iOS app either. This seems to be bad news for Amazon.com because they just so happen to put a 30% profit margin on their books, I’m sure that other eBook retailers with iOS apps are also thinking for ideas.

There’s quite bit of controversy over this policy; I’ve even seen people that decided to sell their iPad because of it. I’m a of Apple, but this last move seems like too much. 30% is a huge chunk. Not allowing publishers to opt for different prices outside of the iOS app or to provide a exterior link inside the app seems to be anti-competitive to me. But I’m not a lawyer and (by the laws of the land) that means I don’t know what is right or wrong (go figure).

What would I do if I were Amazon? Well, they have a few questions to ask themselves. Their main questions will revolve around how much profit they make from the iPod/iPad and how much revenue they would lose as soon as they stopped providing an iOS app. If the answer is, “not much” then I’d say it’s safe to say that the iPod app is safe. If the answer is more than is comfortable then we’d see Amazon do one of a few different things.

  • Amazon could stop providing an app in the App Store.
  • Amazon could just not worry about it.
  • Amazon could raise the price of eBooks to mitigate the cost.
  • Amazon could make it possible, but very difficult to buy books inside the Kindle App.
  • Amazon could hire a hypnotist who has some kind of access to Steve Jobs and “persuade” him to revise this policy.

You see, when Amazon is making their decisions, they have to think about people like me. I’d be a library book person myself, but the unfortunate thing about that is that my local library is very small and the very interesting books I’ve been reading (Sources of Power and This Year I Will both very interesting) as well as the books I plan to read in the near future are almost never available there, so I get kindle books from Amazon. They are around $10 each, and I like the fact that I’ll have them forever, so it’s not that bad of a deal (though someone really needs to develop an eBook library). The only problem is that I don’t particularly like reading them on my computer, I’m glad I have an iPod Touch for that. I’m not interested in buying a one-use-only gadget. If I couldn’t read Kindle books on my iPod, I wouldn’t buy them at all.

The only problem is, if I can’t read them on my iPod, I won’t buy them. But even if I did buy them inside of the iPod App, Amazon wouldn’t make any money. Personally I’d probably opt to buy them online anyway, my wife and I get free Amazon gift cards so I wouldn’t want my iTunes credit card used, but most people wouldn’t care how they are paying for the book, so that means that isn’t an option really.

Maybe Amazon will choose to raise the price of their Kindle Books 10-15%. This would still give them a somewhat smaller profit when the book is purchased within the Kindle App, and they would receive more than 30% profit when purchased elsewhere. Of course, they run the risk that people may stop buying the more expensive eBooks, but if they find the right percentage perhaps they won’t lose anything on their revenue.

But they could decide that Apple’s idea of fair, isn’t fair, and leave the App Store until Apple decided it would be more “reasonable”. It could well mean that Amazon chooses to call Apple’s bluf and leave the iOS App Store altogether, retreating to the haven of their own Kindle, until Apple comes crawling back. Whether that would happen I don’t know, but there could be unintended consequences for Apple (lower sales, lower profit). Again, that wouldn’t be all good of Amazon either. Like I said, I have no interest in a Kindle and I’m sure there are others who feel the same.

I don’t know what Amazon will do. I suspect they’ll raise prices, probably 10-15%, or leave the iOS App Store entirely. I can say that I hope Apple and Amazon work this out.

Post Ratings: (No Ratings Yet)