Category Archives: Uncategorized

Vizio Co-Star has shipped!

I pre-ordered my Vizio Co-Star 3 weeks ago, after reading about it on some of the Android blogs.  Checking on their site a few minutes ago, and it looks like my unit has finally shipped!  I’m not usually one to pre-order a product, especially from a company new to the product space, but I thought I would take a chance on one of these.  I’ve been very happy with my Vizio TV, and their latest line of desktop and laptop PC’s looks very compelling.

I’ve had a Logitech Revue for the past year or so.  It has been a major disappointment.  The update to the latest Google TV took them much longer than other models.  The Revue is slow, laggy, and all but unusable.  Trying to play 1080p video through Plex basically causes the unit to grind to a halt.  Web browsing is slow and miserable.

I only have a few requirements for a Google TV Device:

  • Play 480p/1080p video from my NAS 
  • Browse the web
  • Neflix and Amazon Prime Video Streaming 
  • Play music streaming from the NAS, as well as Pandora
  • Display photos streaming from the NAS

Do all of those, without the lag, stuttering, freezing, and crashing that my Logitech Revue currently does, and I will be very happy.

Vizio could have a great product here.  The faster hardware, low price ($99), and their custom user interface should make this a very nice HTPC replacement.  The biggest question in my mind is how hacker-friendly the unit will be.  Will Vizio take the route of other manufacturers, such as Motorola and Logitech who love to lock down their Android devices with encrypted bootloaders?  Or, will they take more of a Nexus Q approach and embrace the hacker/ROM community instead of fighting them?  My hope is the latter.  I guess we’ll find out in a few days.

I/O Read Performance on Android 2.2

I’ve been experimenting with an app prototype that I hope to release on the Android market soon. The app reads sizable files (few hundred KB to a several MB) containing thousands of records. The app is a viewer for those records.

When the app initializes, it makes a pass through the file to index it which will eventually provide the UI layer with the ability to paginate through the file. When indexing, I find the boundaries of each record, and built up a data structure containing the offsets. This part of the read must be very fast, and uses a sequential reading pattern to read the entire file.

I started to notice some performance problems with this approach, so I decided to investigate performance of 3 common I/O methods. I don’t consider this a perfectly optimized benchmark, but it is an apples-to-apples comparison with the code I wrote. I’m posting these performance results in case other Android developers are trying to figure out which I/O method to use. Being new to Java in general, I wasn’t sure what was the best approach.

The first method of reading bytes from this file was done through a DataInputStream. It was initialized like this:

fin = new FileInputStream(new File(this.fileName));
din = new DataInputStream(new BufferedInputStream(fin));

Data was read using methods such as readInt(), readShort(), etc.
The second method was to use a RandomAccessFile stream. This type of stream was new to me, and was of interest because of the ability to access a file in random places. Although the first type of parse operation does not require random access, the second type of operation will benefit from this. The stream was initialized like this:

rin = new RandomAccessFile(this.fileName, “r”);

The third type of method was coupling a RandomAccessFile stream with a MappedByteBuffer. From reading the Android SDK, it appeared that there might be some advantages to this approach. The file is just mapped into a section of memory in the JVM, and other processes are able to access (and even write to) the file. It was initialized like this:
rin = new RandomAccessFile(this.fileName, “r”);
MappedByteBuffer buffer = rin.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, rin.length());
After implementing all 3 versions of these streams, in such a way that they can be switched around very easy, I ran performance tests on files ranging from 500 to 10000 records. I took 5 runs through the test collateral, and averaged the results.


  • Android 2.2 (Froyo)



The DataInputStream method of reading sequentially from a binary file was roughly twice as fast as the RandomAccessFile and MappedByteBuffer methods. I think for my initial indexing of the file, the DataInputStream method will work the best. When I implement the random access capability for pagination, I’ll need to revisit this with further benchmarks that expose that behavior.

Hello, Android

After the news of the Nexus One broke, I started reading all I could. I think that Google is really planning to shake up the entire wireless business with this phone, and change the way that consumers are locked into contracts. I currently have a Nokia E71, but I plan to ditch it when the Nexus One becomes available.

My E71 has been a good phone, but it has a lot of shortcomings:

– Nokia’s firmware updates are only released for European models. Sure, I could force the update and void my warranty, but I’ve held off doing that.
– Web browsing on the small screen pales in comparison to surfing on my wife’s iPhone. I’m no Apple fan, but if the Google browser is half as good, it will be a much better browsing experience than my Nokia.
– I’m a big fan that once you buy a piece of hardware, you have the right to develop content for it. With the iPhone, I’d have to buy a Mac, plus buy the iPhone SDK, plus certificates and fees. Not gonna happen. With Nokia, there’s this signing process that apps have to go through and from what I’ve read, is not easy for the average hobbiest to do. Android has a much lower bar for development.

I really think that Android is positioning itself to be the best mobile platform in the future. They seem to have the most-free (free as in freedom) development strategy. You can write and test your code on Windows, OSX, and Linux. It’s only $25 to register as an Android developer which allows you to publish your apps. There’s no app-czar that needs to approve your app. In-time, the app ecosystem around Android will surpass the other platforms. And since phones today are all about the apps, it will push Android into the #1 position someday.

I recently purchased Hello, Android a few weeks ago, and ended up reading it in a few hours. Very well-written book, as it walks through the development of a Sudoku application. It has already inspired me to start playing around with the API’s and try to create an app based on an idea my wife had. I’m amazed at how after a few hours, I was able to make a lot of progress. Of course, it helps that I have years of experience with embedded development, and a few months of Java experience.

Twitter and the #IranElection

I’ll admit…I used to be one of those that looked at twitter for the first time, and just thought it was worthless. I joined, I made a few tweets, added a few friends, and that was about it. Used it at Microsoft PDC to find out some cool events going on, but that was really it.

The Iran crisis has shown how powerful and useful it is a communications mechanism. I wonder if the founders ever thought it could be used like this, or if they only were thinking about making some cool web 2.0 website to impress their friends. The flow of information just simply cannot be stopped, and it’s failing in all of these countries like Iran, China, and other’s that feel the need to censor what their citizens can know about. The use of VPN, proxy servers, Tor, and other future technologies will make this next to impossible for governments to do this.

The world is watching what is happening in Iran through twitter, and Facebook, and Flickr, doing what the traditional media members cannot do right now. It’s a historical moment to see both the events in Iran, and how they are being broadcast out to the world.

Xdebug, eclipse, and PHP

I wanted to try setting up a debugger for PHP on my Kubuntu dev box. After struggling for a few hours with setting up the Zend Debugger on my LAMP server, I stumbled onto this page, which had me up and running in about 5 minutes:

I can now step through my PHP, view variables, set breakpoints, etc, on my Kubuntu 9.04 machine. Wish I had tried that first over the Zend debugger.

A followup to my last post about career goals

I was at a Microsoft event a few months back, and attended a Brian Prince’s talk on Career Introspection. One statement that struck me then, and remains in my head today:

the company you work for, or change the Company that you work for.

I feel that I’m in the ‘former’ group, trying to push through modern technologies and breaking new ground. I feel like at some point I’m going to feel like I’m pushing a rope though. However, like Brian suggests, I did commit myself to stay this year, and I have a good idea of where I want to be at the end of ’09 (I have half a year to make it happen). We’ll see how close I end up.

Overall, the most important items from Brian’s talk was to make sure we realize that the company is not going to manage your career for you. Your manager will be plenty happy if you continue to do a great job exactly where you are today for the next 10+ years. You have to manage your career and make sure your job lines up with your career. To do this:
  • Find some recruiters, maybe through Having recruiters in your network is a good thing, and I’ve had several conversations with them. It never hurts to hear about a new opportunity, or to chat with them about what skills are big in your area. I’m always upfront and say that I’m probably not looking to move, but it’s good to have the conversations.
  • Keep your resume ready: In today’s job market, things can change quickly. I’m sure that a lot of my colleagues who are in the same position for 15-20 years were not ready for what happened. I have a resume that I update every few months, because you never know what’s around the corner.
  • Network: User groups, such as .NET SIG, Java, Linux, are a great way to hear about opportunities. Training events where you’re sitting in a room with people from other companies, or big industry events like Microsoft PDC are a great experience. I learned a lot by chatting with other’s at PDC, and it was great to poke my head out of the shell a bit and see what was going on. My passion for new technology was awakened after PDC when I realized how far behind my company is.
  • Freelancing: Yes, the extra hours suck and it’s difficult to find work, but if you don’t feel that you are doing what you want, consulting is a great way to get started. I’ve been able to use a lot of technology that my company doesn’t use. Incidentally, I’m now starting to use some of what I have done as a consultant for my day job, and it has helped a lot.
It’s hard to say with any certainty what will happen this year. All I know is that I need to keep reviewing where I’m at, and trying to figure out where I want to go and how I get there.

Career crossroads…

I had a call from a recruiter Thursday at work about a job opportunity using C#. I wasn’t really interesting in jumping ship at this point, but I always like to return these type of phone calls, because you never know. I told her I didn’t have much experience in C#, most of what I’ve done for the past 11 years is using C++. She said the client wants C# experience, and even though C++ is similar in many ways, that doesn’t count.

Which immediatly started to worry me. My company tends to prefer old technologies and old way of doing things (jumping to Scrum being the only real diversion). Am I eventually going to take myself out of the job market, like the Cobol programmers who never picked up another skill after new languages surpassed it?
Sure, through my consulting efforts, I have done some PHP and Ruby on Rails, but that doesn’t match up to someone with 3-5 years experience. And .NET, which is really the market leader here, is something that I’ve only used to write things like test clients and other apps that are not meant to be shipped to customers. I’m now doing some Java for work, but I have about 2 months experience, not the 3-5 years that I would need to apply for a job in that space.
Talking to the recruiter, she said .NET jobs far outweigh Java and C++ in this area. She also said the Cleveland job market ‘sucks’ now for IT, which isn’t surprising since it was a shitty job market for IT even when we weren’t in a recession.
The big question is how do I fix this. Do I continue to push for change in my company, to move forward in technology? If I only keep working with the technology that my company wants, I will be pushed out of this job market. Do I try to do more consulting work where I can use these newer technologies? That seems like the logical choice, but it comes with a cost of personal time/family time, etc. Or do I just dig in, and prepare to be at my current company for the long haul (meaning learning new technology isn’t as important)?