Friday, November 18, 2011

The Power of (Kindle) Fire

I may do a video review of the Fire at some point because I'm tired of silly unboxing videos and people fumbling through the Kindle Fire UI making stupid comments. But for now ... here is my article on the Fire as requested by some friends of mine.

First off let's clear some things up. This device has been dubbed an iPad killer. In some ways (which we will discuss) it could be but in other ways its not. The truth is one is chicken and the other is beef. Some people prefer one, some people prefer the other. And hey, some people might prefer pork of seafood. [Man, I'm getting hungry.] No the Fire doesn't have a camera, 3G, microphone, GPS, or a pretentious price tag. It is a $199 device and an iPad is a $600 device. Personally, I think its a smart move too.

Your smart phone will have all the features I mentioned and already has a data plan attached to it. So for someone like me who is a "bang for the buck" individual I don't want to pay for duplicate features and a second data plan. For some people this won't be an issue or concern. Great! That's fine.

So what is the Kindle Fire? Its a device to consume Amazon content (magazines, books, music, movies, tv shows, etc), run apps, and do some web browsing. In that regard (except for using iTunes content) it sounds just like an iPad at 1/3 the cost.

What do I like about the Fire? It is not too bulky so you can use it with one hand. Content can be stored in the Cloud or on the device. Purchasing content is easy and there is good integration between the Amazon site on your PC and the Kindle device. For example, if I purchase content on Amazon it will be available on the Kindle to download or view.

What don't I like about the Fire? The "8GB" storage is actually closer to 6.5 with everything that is pre-loaded. Since you can store content on the Cloud that's not too big of a deal but if you're trying to load up on movies (less of an issue with books or music) then you might not have enough space. Allegedly you can store about 10 movies on the Kindle Fire. The plus side of this is that if you're connected to wireless you can pull content from your private cloud storage or stream movies.

What do I like about the Amazon content? The selection is there. Most new media is available for download. The pricing is slightly better (say $15 for a new popular movie) vs $20 for the physical media. There is also rental options that make content available for $1.99 - $5.99. Most TV shows are about $1.99 for an episode or the season can be purchased.

Music prices seem to be fairly consistent about $0.99 a song but album prices can vary. Obviously book prices vary along with magazine subscriptions.

With Prime you get free streaming of videos and some limited "loaner book" selections. The content isn't necessarily newer stuff but its not all junk. Where it really shines is the amount of kid friendly content (Sesame Street, etc).

What do I dislike about the Amazon content? I'd prefer newer content over quantity of content for the Prime stuff. As far as I know there is no "add-on" to download music for a flat rate like Zune Pass or others. Some of the content (like Amazon's audio books; Audibles) doesn't seem well integrated with Fire yet.

Apps are lacking as well. I can get some of the more popular apps (Angry Birds, Facebook, Pandora, etc) on my device but ones like ESPN Fantasy Football don't appear to exist.

Amazon Prime? For $80/yr which includes free 2-day shipping on Amazon orders I think Prime is one of the better deals going on. That is basically $6.66 (nice) per month and includes not only streaming content but the loaner books (1 per month). So better deal than Netflix, etc.

Is this device good for kids? Yes, if supervised. There is no filtering/parental controls for web browsing or content downloads. And since even free content requires having all your billing stuff setup there isn't much to prevent your child from running up a huge bill on content.

In the first night of using the Fire and trying to get my kid to bed I was able to read her several children's books and stream episodes of Sesame Street. The finale I bought Kung Fu Panda ($6.99) and was able to stream it instantly. I later downloaded it so we can watch it on the go.

Other thoughts? Kindle doesn't have much in the way of inputs. It has a mini stereo jack and a power plug. The included power cable is a wall cable so I'm not sure if you had a USB cable with the correct connector if you could access the Fire or not. (IE as a mounted drive.)

Since you're purchasing digital content (not tied to a device) it seems like you could watch the same content on a computer or connect a computer to your TV and watch it that way. That seems pretty neat to me because now you're not having to re-purchase media.

Again, no SD ports or anything but you can upload content on the Amazon site to their cloud so that is handy. I think you can even upload non-Amazon music content as well.

Web browsing experience is closer to PC than Smart Phones are. Wasn't overly fast but wasn't overly slow either.

Final verdict: Great device if you have modest needs and the price is very reasonable.

Friday, August 26, 2011

The type initializer for ... threw an exception

I was given some old code that I needed to port/partially rewrite.  The code had some funky things like a class trying to reference a static class as its base (which C# doesn't allow).  My guess is someone started to rewrite the code before they checked it into source control and never completed it.

Anyhow, I wrote a test app for this code after making a few tweaks and when this particular object was initialized it hit the declaration for the constructor and quit.  For some reason, .NET didn't throw any exceptions; it just stopped executing the code.

I wrapped my call with a try catch and caught the following: "The type initializer for 'NameOfClassICalled' threw an exception".  [This was a TypeInitializationException.]

After carefully stepping through the code I found my simple yet elusive mistake.  The code was initializing the base class which has static methods it was trying to load.  These static methods used the ConfigurationManager which uses the App.config... which I failed to include in my project.

Adding my app.config with the proper entries and I was off to the cases.  Reminder:  The parent assemblies config is the one that is used by assemblies called during execution.

Monday, August 22, 2011

Portable Storage Devices


Had a situation today where I needed to copy some files off a computer and didn't have a thumb drive handy.  Solution, I ended up using my cell phone which could have its SD card mounted as a hard drive.  This got me thinking and I put together a list of devices I could think of that can be used with your computer a hard drive aside from the typical.

1. Smart phones
2. MP3 players
3. Digital Camcorder
4. Digital Camera

Friday, August 19, 2011

SSL content

Ran into something the other day that I thought was worth mentioning.

If you have a site that is secured with SSL then pay close attention to where you are referencing graphics and other content from.  If you have a logo, for example, on an unsecured site that you reference then users will get a nasty message about the secured page having unsecured content.  This will happen each time the visit the site and possibly each page they visit.

Wednesday, July 13, 2011

Using a timer with a Windows service

When I write a Windows service I like to build a class library which I can test using a WinForms/WPF project; a test harness.  For me, its easier to debug this way than trying to attach to the process while running, etc.

I recently had a problem where my service ran perfectly except for some items I setup on a timer.  I couldn't find an error in the Event Log and when I tested the code in my test harness application it worked fine.  After adding a ton of logging I found that my timer never fired!

Ultimately what I found is that my test harness application's code (which I copied and pasted directly into my service to fire off my class library's methods) the timer was an instance of type System.Windows.Forms.Timer but my other services used System.Threading.Timer!  Changing the type of timer immediately solved my problem.

Moral of the story, make sure you're using the correct timer object!  The Windows.Forms.Timer will not work in anything outside of a form!

Wednesday, May 11, 2011

Property Grid

So this is probably not something you would use everyday but a cool feature in .NET is the Property Grid control.  This control accepts an object and displays the public properties of that object int he same fashion as the property window inside of .NET.  It also allows editing of those properties that have a setter available.

I'm using this for a "What If" calculator that is geared towards developer testing of our loan decisioning code.  We are also hoping to expand this to be used by our customer's auditor(s).

Usage

Drop the control on your form and then simply set the "SelectedObject" property to the object you want to display.

Ex. 

object someObject = new object();
propertyGrid1.SelectedObject = someObject;

Advanced Steps

You'll notice that by default the object is a jumbled mess when it is displayed.  There is a very quick and easy way (no code required) to really clean this up.

First, go to your object and make sure you have the using statement for "System.ComponentModel".  This will enable you do add Attributes which the Property Grid will make use of at run-time.

Browsable:  This will tell the property grid not to display an object or property.  Above that property you simply put [Browsable(false)].

Category:  Like the IDE, this grid offers the options of sorting alphabetically or to group properties.  Useage is [Category("Name Here")] about the property that you want to group into  a given category.  Note: You can only assign one category per property.  I found that to be a bit of a bummer but you could always create another property that accesses the same variable and assign it to another category I suppose.

Those are just two of the attributes available.  Some other useful ones are for read-only, default value, and a user friendly description of the field.


Monday, April 11, 2011

ClickOnce Error in .NET After Password Change

I ran into this issue and found few sites actually document what to do.

If you change your password (or password changes on a a remote login) and you try to do a ClickOnce deployment you may get an error that it can't publish because it can't find the specified directory.

The solution is to map a drive to that remote location and check the "use different credentials" button.  Use the credentials for that mapped drive and once you've successfully connect then retry publishing.

Basically, the password gets cached and .NET tries using the cached settings instead of prompting for a new login/password.