Kindle Fire Uses Android 2.3 (API Level 10) Gingerbread as its SDK

I preordered a Kindle Fire a couple days after it was announced. At $200, I figure I couldn’t go wrong. Besides, Amazon has impressed me greatly with my e-ink Kindle: I’m sold on their ability to please.

One of the things that most excites me about getting a fire is that I can start developing an Android application. Sure, I could have been developing in an emulated environment, but I want to have a physical tablet to actually test my app on. The affordability of the Fire was the opportunity I’ve been waiting for.

Oddly, Amazon waited a bit before providing developers any details on the Fire’s development target. Earlier this month, they finally spilled the beans: The Fire is built on Android 2.3 Gingerbread (API Level 10). Since the Fire has stripped-down hardware, the use of the older API makes perfect sense. For the app I’m building, 2.3 provides more than enough functionality. If all goes well, I should be able to release my little app (more on that later) in a couple weeks.

Let’s not forget Dennis Ritchie

While Steve Jobs’ death has been covered extensively by the media, I think it’s important that the world learn about the death of a man whose contribution to the information age is so immense that it is beyond measure. On October 12, 2011, Dennis Ritchie was found dead in his home at the age of 70. Ritchie is the inventor of the C programming language and a co-inventor of Unix, the father of all modern operating systems. The man was, without a doubt, brilliant. His contributions are what every nerd should aspire to.

Why is the C programming language so important? Because C was the perfect bridge between man and machine. Before C was invented, programmers had to write the code that runs operating systems (and most everything else) in assembly, which is just one step above binary. Assembly, while powerful, is also extremely cumbersome. Writing even the most trivial of programs is very time consuming. Ritchie’s C language put the development cycle of operating systems and applications into overdrive, allowing programmers to crank out innovation quickly and easily. On top of this speed and power, Ritchie gave his newly-minted language away for free to universities, who were free to do with it as they wished. C has since been used on nearly every system imaginable, from super computers, to PCs, to Macs, to video game consoles.

Nearly every programmable device in existence today owes its ability to be useful to Dennis Ritchie. Without his brilliance and willingness to give that brilliance away, we would still be in the dark ages of Information.

An easy fix for iTunes 10.5 (x64) that won’t install on Windows 7 64 bit

I just downloaded iTunes 10.5 and tried to install it on my Windows 7 64 bit machine. What I got was an error message that said:

There is a problem with this WIndows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.

The fix that allowed 10.5 to install correctly was very simple. Simply go to Control Panel > Uninstall a Program. Right-click on “Apple Software Update” and choose “Repair.” After that, iTunes 10.5 (x64) should install with no problems at all. Apparently the Apple Updater can get messed up and cause the new version not to install. Imagine that.

If only all Windows errors were so easy to fix!

Happy Birthday Super Nintendo!

August 23, 1991 is a day that would eventually change my life. It was on that day, 20 years ago, that the Super Nintendo Entertainment System (SNES)was launched in the United States. I didn’t get one until that Christmas, however, if the system hadn’t came to be, I wouldn’t have so many good memories.

I had good times with the system playing alone, but more importantly, I had a blast playing SNES with a lot of friends and family that I’ll never forget.  Without a doubt, I probably spent more time with Jeremy Akers next to the SNES than anyone else. I’ll never forget the night we fought each other in Mortal Kombat 2 for 250 matches so we could unlock some character (either Smoke or Noob Saibot…who knows). It was a hoot. Jeremy also crashed at my house where we played Donkey Kong Country for several days when Christmas break was greatly lengthened by a big snow storm. We played other games together too, but those two stand out in my mind more than any others.

My uncle Duck’s boys and I had a ton of fun huddled around an SNES. The week the SNES came out, Duck picked one up for his boys. They invited me down a few days later where I actually got my first look at the SNES. James and Tim had beaten the first couple areas and had just unlocked the Top Secret Area. I remember going into the first ghost house and Tim says, very seriously, “He is so not ready for the ghost house…” He was right, but I did learn to fly in there. (I remember we eventually took a break to let Daniel play Ultraman so he wouldn’t tell on us and we’d have to quit!) For the next 3 Thanksgivings, we all sat in Granny’s back room in front of an 11″ TV and played the game du’jour. One year, it was Mortal Kombat (which we beat) and another year it was NBA Live ’94. We teamed up and beat a 48 game season to win the championship!

I can’t forget the summer my cousin Jennifer spent a lot of time at the house and we played Super Mario World like it was going out of style. One episode I remember vividly is when Jenn got all worked up over Star Road and swore several rather nasty oaths. My mom heard and made that noise she makes when she hears cursing. When mom walked off, we cracked up laughing.

The game I’ve probably played most in my life is The Legend of Zelda: A Link to the Past. I love that game! I spent hours and hours hulled up in my room navigating Hyrule all by myself. I’ve probably beaten it from start to finish at least 10 times. (Thanks to my horrible spatial memory, its almost like a new experience each time. I know what’s in the game, but I usually have to wander around a bit to find everything. It’s the only advantage of being so forgetful.) The other game I probably played the most was Ken Griffey Junior Baseball. To this day, it is the funnest arcade-style baseball game I’ve ever played!

In case you can’t tell, I don’t think any other system will ever hold such a dear place in my heart.  Happy 20th Birthday SNES!

A PHP Script to automatically clean files affected by the the eval(gzinflate(base64_decode…) hack

In late April, my server got hacked. Most of my php files had code that looked like this placed at the top:

eval(gzinflate(base64_decode('DZZFssRYokOX... long string of gzipped-base64-encoded php code);

I’m not sure how the bad guys got in, but I changed all my passwords and updated all the software on the server. Then, like any obsessive programmer, I set forth making a script to clean up the mess programatically. My solution was a two-step process. I used GNU find command to find all my php scripts with the code “eval(gzinflate” in them. I chose to search by this code because I can’t think of too many legitimate reasons to do this, and it matched all the infections I found manually. The full command I used for this was:

find /full/path/to/public_html -name "*.php" -exec grep -li "eval(gzinflate" {} \;

This command finds all php files then uses grep to look inside each file for “eval(gzinflate”.

I copied the results of this command to a text file called fullInfected.txt .

After I had a list of infected files, I wrote a php script that’ll go through each file on the list, do a search, and remove all lines with the infected code in it. I saved the script in the same directory as my fullInfected.txt file. You can get that file (with a few sample supporting files) here: CleanEvalBase64_decodeHack script.

There are two variables that can be set at the top of the file: One for the name of the file with the list of infected files in it ($listOfFiles) and another for the text to search for ($findWhat). I uploaded the script to the server and ran it via SSH:

php clean.php

When the script runs, it will log a list of which files were cleaned.

This script is released as-is, with no implied warranty whatsoever under the Creative Commons Attribution-ShareAlike 3.0 Unported License. Make a backup of your server before using this and test this very thoroughly on a small sample of infected files.

I’m sure there’s more efficient ways to do with with shell commands and/or regex, but I didn’t know how to do it that way. Good luck getting cleaned up!

Browsers, browsers, browsers!

Nerds of the world: rejoice! The browser wars are ablaze for the first time in over a decade. Microsoft, Mozilla, Google, Apple, and Opera are duking it out, feature-for-feature and there’s no clear winner. For the record, I don’t want anyone to win because competition makes software better since developers have to work hard to keep and maintain their market share. While the four major players volley for our affections, Netizens all over the world win! As I mentioned in a recent post, most of what we do with computers is moving to the net. Therefore, the availability of quality browsers is a big deal for techies and Luddites alike.

The First Browser Wars

The First Browser Wars ended around 1997 with the release of Internet Explorer 5. At the time, there was IE, Netscape, and (to a much lesser extent) Opera. When Microsoft decided to unload its war chest in 1995 with the intent of destroying Netscape, it was a matter of time before the boys of Redmond stomped Netscape into the ground. In the span of 2 and a half years, the battle was over.

In 1997, I was just learning how to make web pages. I couldn’t have been happier that Internet Explorer was the winner since that meant I didn’t have to work so hard trying to make my pages look the same on both browsers.  I still tested my sites in Netscape Communicator, but IE was the only browser I really worried about. Life as a budding web designer was good.

My happiness was ill-founded, though, because without competition, Microsoft stopped updating Internet Explorer after the release of IE 6 in September 2001. It would be seven and a half years before Balmer and company decided to release a new version. During IE 6, there were security threats uncovered at least every couple months. While it was nice having only one platform to worry about, it was frustrating and scary to have to worry about security every time you visited a page. Opera never went away during this time, but it never gained much traction in the U.S. at the end of the First Browser Wars

The Second Browser Wars and Beyond

A spunky upstart named Mozilla arose from the ashes of Netscape after Netscape’s Gecko source code was released in 2000. In 2004, Firefox 1.0 was officially released. I honestly never thought Firefox would gain as much traction as it did, but it turns out, FF 1.0 was the scout that signaled the beginning of the Second Browser Wars.

Fast forward 7 more years since FF 1.0 was released and Google has entered the market with Chrome, which shares common roots with Apple’s Safari (via the Webkit engine). It’s apparent that all are scrambling for more market share if you consider that the browser version numbers are increasing at an alarming rate. While some of the version incrementing is for marketing purposes (because we all know higher version numbers mean a better product…), the browsers really are getting better from all the vendors.  Here’s my quick breakdown of the strengths of each browser:

  • Internet Explorer 9 – Microsoft has gone out of its way to make IE safer to use for everyday surfing. It automatically checks for phishing attacks, warns users if it detects so much as a mouse fart on a website, and integrates with MS Security Essentials. While it’ll take awhile to shed its reputation as the insecure kid on the block, Microsoft is trying hard to prove otherwise.
  • Firefox 5 – Firefox is my favorite because of its vast library of plugins, especially plugins that make life easy for web developers. Mozilla keeps making Firefox faster and has taken an aggressive stance toward security since version 3.5.
  • Chrome 12 – Google’s brainchild is the fastest kid on the block. It’s super clean interface and seamless updating architecture has appealed to millions since its debut in late 2008. Google is showing its serious about being the one and only browser folks turn to for their Internet needs.
  • Opera 11 – The underdog of the roundup, the Scandinavian wonder invented tabbed browsing in 1996 and continues to set the bar for standards compliance, and it manages to be incredibly fast as well. The only browser found on the Wii, Opera can also be found on PCs, Macs, iPod/iPad, and mobile phones. Opera is the most hardware-agnostic of the bunch.
  • Safari  5 – Admittedly, Safari is my least favorite, however, it is by far the best mobile browser in existence, as it renders pages on the iPod Touch and iPad perfectly. Safari is what all mobile browsers should strive to be.

I hope the Second Browser Wars rage on for a long time and we, the consumers of Internet goodness, continue to reap the benefits of the battle. Unlike the First Browser Wars, the current struggle is being fought on technical merit and security. Neither Microsoft nor anyone else can crush the competition strictly with wads of money. No matter who you choose as your browser, I wish everyone happy surfing!

Re-Register Apache and Mysql as Services After Moving Zend Server Directory to a New Computer

I recently got a new Toshiba A665-S5183X Core i7 laptop and I really love it.  The only thing about getting a new computer (especially if you’re a geek) is transferring files and settings from the old machine to the new one. I used Windows 7’s Easy Transfer to move over all the usual documents (pictures, papers, etc), and I also transferred about 15 GB of programs that are not registry dependent. One of the folders I transferred was my Zend Server CE installation. Zend Server includes the Apache Web Server as well as Mysql Server. I wanted the two installed as a service, but I didn’t want to have to reinstall, since I had customized many settings in several places in the installation and didn’t want to start over. So how hard is it to reinstall the two servers as a service? As it turns out, not hard at all.

First, open an Administrative Windows Command Prompt. The rest is as easy as follows.

Install Apache As a Service

cd into your Apache2 bin directory and type

httpd -k install -n “Zend-Apache2” -f “C:\program files (x86)\C:\Program Files (x86)\Zend\Apache2\conf\httpd.conf"

This command will install Apache 2 as a service named Zend-Apache2 in  your services.msc service control utility (where you can start/stop your Apache service). Additionally, it will tell the service to use the specified httpd.conf file (which can be anywhere you want). The service installer will even be nice enough to warn you of errors or warnings in your specified conf file.

Install Mysql As a Service

cd to your Mysql bin directory and type:

“mysqld” –install MySQL-Zend –defaults-file=”C:\Program Files (x86)\Zend\MySQL51\my.cnf”

As above, whatever the word you type after the install directive will be the name of your service in services.msc. The defaults file represents the path to your Mysql cnf file.

Happy web developing with Zend framework running as services on your new box!

Should You Buy a Mac or a PC?

In the last couple years, more and more folks have been asking me whether a Mac or a PC is the better computer. In case you don’t know, a Mac is a type of computer made by Apple, the same company that makes iPods and iPhones. A PC, on the other hand, refers to a computer that runs Microsoft Windows. When you’re standing there holding your credit card deciding which to buy, which is best?

Apple would have you believe that Macs are far superior to the old stalwart PC. You may have seen the Apple ads on TV that portray the Mac as a coolguy 30-something with all the answers. He has conversations with PC, who is a middle-aged nerd in an ill-fitting business suit that is always having problems.  According to Apple, the purchase of a new Mac will change your life forever.

Well, Apple’s claim is true in some ways, but it’s mostly marketing hype. The truth is that for 95% of computer users, all tasks they want to do can be done on either a Mac or a PC. The difference lies in how the total cost of each of the machines is spread out. Macs are great for creating audio, video, and DVDs right out of the box. It’s easy to make your own custom recordings or photo albums. Also, you don’t have to buy antivirus software for Macs. The catch to all this is that Macs cost about twice as much (or more) than a PC with the same amount of processing power, memory, and storage space.

PC owners won’t pay as much up front, but they will have to spend $400-$500 to buy software that offers features equivalent to what a Mac can do out of the box. (Some users won’t spend a dime on extra software because they will never need these capabilities.)  Then, there’s the $30-$50 per year you’ll have to spend on a good antivirus program, since Windows PCs are vulnerable to many types of viruses and other malware. PCs outshine Macs in the area of choice. For any given thing you might want to do on a PC (such as create scrapbooks), there may be 4-5 good programs to choose from for getting it done. On the other hand, a Mac might only have 1-2 programs for any given purpose. Macs and PCs can’t run the same software, so any software you want to use has to be written for one or the other.

Which Do I Think is Best?

I have used PCs for 15 years and Macs for 8 years. My personal take on it is as follows:

Buy a PC: If you favor a lot of choices, buy a PC. As for software, there still is no where near the amount of software available for Macs as PCs. Why? Apple makes up 10% of the computer market, so there aren’t as many people buying software for Macs. Therefore, more developers (the people who create computer programs) write code for PCs. I would feel guilty if I didn’t state outright that I think Windows 7 is great. It’s the best thing Microsoft has cranked out in a long time. As an example, AreoSnap and the way Libraries work allow me to get more done faster. It’s all the small touches like this that makes Windows 7 great.

On the hardware side, Apple doesn’t offer a lot of variation in hardware configuration or style. When’s the last time you saw a red or blue Macbook? Some people love the clean, white lines of a Mac. Others abhor them. Unless you buy a PC, you’re out of luck.

Buy a Mac: If you are willing to pay a little more and don’t want to worry about so many choices, a Mac is the way to go. Most of the software that’s available for the Mac is pretty high quality, as long as it always has the features you need.  Macs come with iLife, which comes with some of the best consumer-grade audio and video creation tools out there.  More and more developers are being drawn to write software for Macs, because there market share is growing very quickly (due in part to the iPod, iPad, and iPhone). Also, Macs are easier to maintain. Macs do get slower over time like PCs, however, it  takes much longer. As of now, you really don’t have to worry about viruses on a Mac, though I suspect that will change as more and more people buy Macs. The more people using a system, the more appealing it is for virus programmers to get to work.

With the Web, Who Cares?

I can’t really say a Mac or a PC is better. It all depends on what you value. Each is great in its own way. Mac vs. PC has been, is, and will be one of the biggest geek holy wars.

Most PC users I know right now are really into sharing things on sites like Facebook, Flickr, or Twitter. All this communal goodness takes place in a web browser. The sites don’t care what browser you use, and both Macs and PCs have several great browsers available. So, for most people, the choice of Mac or PC is moot. Both cost about the same in the long run, and both do a good job getting things done, howbeit in different ways. Some things are easier on a Mac and some things are easier on a PC, but you really can’t go wrong either way.

In the last couple years, more and more folks have been asking me whether a Mac or a PC is the better computer. In case you don’t know, a Mac is a type of computer made by Apple, the same company that makes iPods and iPhones. A PC, on the other hand, refers to a computer that runs Microsoft Windows. When you’re standing there holding your credit card deciding which to buy, which is best?

Apple would have you believe that Macs are far superior to the old stalwart PC. You may have seen the Apple ads on TV that portray the Mac as a coolguy 30-something with all the answers. He has conversations with PC, who is a middle-aged nerd in an ill-fitting business suit that is always having problems.  According to Apple, the purchase of a new Mac will change your life forever.

Well, Apple’s claim is true in some ways, but it’s mostly marketing hype. The truth is that for 95% of computer users, all tasks they want to do can be done on either a Mac or a PC. The difference lies in how the total cost of each of the machines is spread out. Macs are great for creating audio, video, and DVDs right out of the box. It’s easy to make your own custom recordings or photo albums. Also, you don’t have to buy antivirus software for Macs. The catch to all this is that Macs cost about twice as much (or more) than a PC with the same amount of processing power, memory, and storage space.

PC owners won’t pay as much up front, but they will have to spend $400-$500 to buy software that offers features equivalent to what a Mac can do out of the box. (Some users won’t spend a dime on extra software because they will never need these capabilities.)  Then, there’s the $30-$50 per year you’ll have to spend on a good antivirus program, since Windows PCs are vulnerable to many types of viruses and other malware. PCs outshine Macs in the area of choice. For any given thing you might want to do on a PC (such as create scrapbooks), there may be 4-5 good programs to choose from for getting it done. On the other hand, a Mac might only have 1-2 programs for any given purpose. Macs and PCs can’t run the same software, so any software you want to use has to be written for one or the other.

Which Do I Think is Best?

I have used PCs for 15 years and Macs for 8 years. My personal take on it is as follows:


Buy a PC: If you favor a lot of choices, buy a PC. As for software, there still is no where near the amount of software available for Macs as PCs. Why? Apple makes up 10% of the computer market, so there aren’t as many people buying software for Macs. Therefore, more developers (the people who create computer programs) write code for PCs. I would feel guilty if I didn’t state outright that I think Windows 7 is great. It’s the best thing Microsoft has cranked out in a long time. As an example, AreoSnap and the way Libraries work allow me to get more done faster. It’s all the small touches like this that makes Windows 7 great.

On the hardware side, Apple doesn’t offer a lot of variation in hardware configuration or style. When’s the last time you saw a red or blue Macbook? Some people love the clean, white lines of a Mac. Others abhor them. Unless you buy a PC, you’re out of luck.


Buy a Mac: If you are willing to pay a little more and don’t want to worry about so many choices, a Mac is the way to go. Most of the software that’s available for the Mac is pretty high quality, as long as it always has the features you need.  Macs come with iLife, which comes with some of the best consumer-grade audio and video creation tools out there.  More and more developers are being drawn to write software for Macs, because there market share is growing very quickly (due in part to the iPod, iPad, and iPhone). Also, Macs are easier to maintain. Macs do get slower over time like PCs, however, it  takes much longer. As of now, you really don’t have to worry about viruses on a Mac, though I suspect that will change as more and more people buy Macs. The more people using a system, the more appealing it is for virus programmers to get to work.

With the Web, Who Cares?

Most PC users I know right now are really into sharing things on sites like Facebook, Flickr, or Twitter. All this communal goodness

Netbook Plunge

Last night, I decided it was time that I get myself a netbook. These tiny form-factor laptops have been around for a while now, however, I initially brushed them off as an underpowered machine that casual computer users would buy to avoid breaking the bank while still having basic Internet and emailing abilities.

I’ve changed my mind about who needs a netbook after lugging my 17″ hoss of a laptop for the past 13 months.  Don’t get me wrong:  I love the power of my full-sized portable. I have been using it as my primary machine to teach online courses, create websites, and wrangle technology since I got it. It’s fast, full-featured, and gets the job done.  Its weight, though, leaves something to be desired when I just need to check email or or look up some basic information while I’m not at home. A lighter weight, lighter duty machine would fill the bill. This type of machine is a netbook.

After weighing the build quality and price of several netbooks that Best Buy had to offer, I decided to go with the Asus Eee PC 1015PE. So far, I have been very happy with my choice. The little netbook boots fast, is snappy, and gets about 8 hours of battery life  while surfing and checking email. Typing on the 85% chicklet-style keyboard takes a little getting used to, but after about 12 hours of exposure, my fingers are having little trouble touch typing. The trackpad is spacious and responsive, and the click button that sits below it works well enough for right and left clicking.

On the comical side, the text in most of the Asus-created apps features poorly-translated English. For example, after finishing with the registration app, the congratulatory text said, “Now your new machine can get your downloads from us.” I’ve been using products from Taiwanese companies for years and this is expected. I don’t think this diminished the overall experience and I’m not judging at all: I cannot imagine becoming even semi-fluent in any Asian language, as the speech patterns and tones are beyond me. Nonetheless, it is pleasantly comical to read when feeling out a new gadget.

The 1015PE comes with Windows 7 Starter, which I’ve heard many people complain about. My take on it is that Starter is perfect for a netbook. Many of the customization options are disabled and it doesn’t have Media Center enabled, but given the limited power of a netbook, this is a virtue.  You don’t need all the bells and whistles of the more fully-featured versions on a netbook. If you think you do, you probably don’t need a netbook in the first place.  I have no intentions on upgrading from Starter: Its light-and-lean feature set is exactly what this lilliputian machine needs.

To sum up, I’m happy with the 1015PE and would recommend it to anybody who needs a small machine with good battery life that is capable of consuming basic information.

Life with a Kindle

I’ve had my Amazon Kindle (Wi-Fi only) e-reader for a little over a week now. I don’t regret my purchase at all. It’s an absolute joy to use.  The screen is so good that I’m not sure how you could make it look more like paper.

The Kindle solves a couple problems for me. For one, I’m running out of room for new books. I have a lot of books I may never open again, for for some reason, I feel compelled to keep them. Storage is even harder considering that many of my books are programming and tech books that are thick and heavy. I have a couple cheap bookshelves that probably couldn’t take another pound. With the Kindle, I could fit every book I own into it’s light, 7-inch frame. Granted, there aren’t many of the books I will repurchase for the Kindle, but considering I’ll be buying new tech books for the rest of my life, the Kindle will be hosting thousands of pages of silicon-derived goodness before you know it.

The second problem my Kindle solves is the closest bookstore is an hour and half away. I know I can buy books online, straight from Amazon, but I really like the fact that I can get previews of books right on the Kindle. I realize Amazon has allowed you look inside books on it’s website for a long time, but I really do prefer the Kindle’s paper-like screen for reading longer works. There’s also the instant-gratification aspect of having a book in under a minute. That will come in very handy the next time I get stuck trying to configure a Squid proxy server and need to figure out the problem 10 minute ago.

I think the Kindle will even allow me to start reading more fiction, since it’s so easy to tote around. While I’m waiting for Beck to come out of Bath and Body Works, I can catch up on some reading. I’m currently working my way through Terry Goodkind’s Wizard’s First Rule, the first book in the Sword of Truth series. And since the Kindle has a decent WebKit-based web browser built-in, I can always catch up on the latest news or Facebook gossip anywhere I can snag some free wi-fi.

If anybody has been sitting on the fence as to whether an e-reader is worth it, I can tell you they are if you like reading at all. As always, your mileage may vary, but for me, it was a very wise purchase.