Archive for May, 2013

Never Pay for Another Book Again

May 24, 13 by admin

In my life, I try to live frugally.  I am one of the people who refused to buy into the iPod craze and later the iPad.  I typically wait a few years before buying into new technologies.  I canceled my cable TV subscription a while back and switched to over-the-air TV broadcasts.  This is a growing trend in America due to the high costs of combining Internet and TV service (not to mention cellular service – I use pre-paid phones instead of subscriptions).

In this post I will share one of my favorite money-saving “secrets” on how to save money buying books.  Many people know that you can save money by buying e-books instead of the dead trees version.  I usually buy most of my e-books from Amazon and recently have been getting all of my books for free.  I bought a book one time for $2.99 just to try out the store several years ago.  I haven’t bought another e-book since but I have a great collection of books both classic and modern books, fiction and non-fiction.

ancient-tomeTo find really great deals on books and lots of other items, you need to use a deal aggregation site.  My favorite is DealAgg.  This site loads a list of deals from 12 of the most popular online shopping deal websites.  The list of deals is collapsed which makes searching the web page difficult.  You will need to expand each deal list by clicking on the More link at the bottom of each of the 12 lists.

If you have never searched a web page before, you do so by hitting Ctrl-F on your keyboard.  This opens a search box on the top or bottom of your browser window which allows you to enter keywords to search for items on your current web page.  Entering the search term will find the first matching item on the web page.   Use the next button to find the all subsequent matches on the page.

So now that you have opened the DealAgg web page, expanded all of the deal lists, and know how to search the web page, how do you find the free ebooks?  Simple, just hit Ctrl-F and enter the keyword ” ebook” in the search box without the quotes.  Please note there is a leading space in front of the term “ebook”.  This leading space will eliminate faulty matches to “notebook” which will appear in a lot of places.   You will want to find a item that reads something like “Amazon Kindle Top FREE eBooks at Amazon”.   When you follow this link, you will see links to books being offered for free on Amazon.  Sometimes these books are textbooks that normally sell for $40 or more.

Other searches you can do are for “nook” or “kindle”.  Using this method you can find some really great books absolutely free.  You can also use this site to find lots of other great deals.  Search for “refurb” or ” hot” or “blowout” or “free”.  This site is great for finding all sorts of deals.

The best thing about Kindle eBooks is that you don’t even have to own an Amazon branded reading device in order to read your books.   The Amazon Cloud Reader allows you to read your books on almost any device you have.  They have a Windows 8 app which I personally love.  All the books you own are stored in the cloud for free which makes them available wherever you are.

Of course this method works best if you are not picky about which titles you want to read next.  If you collect books for a while as I have, you will always have a wide selection to pick and choose from.  My library only has 65 books so far but since I’m not a voracious reader, this is just fine for me.   My library is growing at a rate of about 4 books per week thanks to free eBook downloads found at Amazon.

I would be remiss if I didn’t mention the thousands of free out-of-copyright books you can download from Project Gutenberg.  They provide high quality books in eReader formats such as mobi) which can be transferred to your favorite reading device.  Free software such as Calibre can be used to convert the book file into Amazon’s preferred format and then load it onto your device.  This requires a little bit of technical know how so you might need your son or daughter to do this for you.

I hope these tips help you to stay frugal and spend more time (not money) enjoying life!

Linux Website Deployment Strategy

May 20, 13 by kenrich

Recently, I put together a set of steps for deploying new code to our Linux websites.  Below is a list of all of the steps we take to deploy new code.  Note that this is a work in progress and is still being improved and expanded upon with each deployment.

Feel free to adopt any of these strategies for your own business.  It is always best to do deployments after the peak hours which is around midnight on the West Coast.  You should also try to keep your maintenance periods as short as possible.   Performing a dry run before the actual deployment should help you meet this goal.

Put the site into maintenance mode

Uncomment the code in the .htaccess file at the website root

# Uncomment the following to enable maintenance mode
# RewriteCond %{REMOTE_ADDR} !=127\.0\.0\.([0-9]|1[0-9])
# RewriteRule ^maintenance.html$ http://%{HTTP_HOST}/ [R,L]

Make sure to substitute your IP address in the RewriteCond so that the developers still have unrestricted access to the site for deployment and testing. You can retrieve your local IP from my former site: http://www.whatip.com/

Test that maintenance mode is activated successfully

We need to access the website from a different IP address.  See Ensure the Site is Really Live below for instructions on how to do so.

Upload the Latest Sync Code (if necessary)

If we have made updates to the synchronization code, upload this first to make sure that everything goes well.

If any database schema or data changes need to be made to support the synchronization process, make these changes manually before proceeding.

Perform the Database Schema Sync

Initiate this on the development (or staging) machine.  Analyzes differences between the local database and the production.  Prompts the user to deploy changes to production that will modify the schema and bring it into sync with local.

Perform the Database Data Sync

Much like the schema sync, the data sync will look for database records on the local machine that are out-of-sync with the production server.  It will then prompt the user to deploy these changes to production.  The user will have the ability to confirm or reject changes selectively.

Perform the Code Sync

Next we need to perform the code synchronization.  This includes server-side scripts, javascripts, resources (images, videos and .htaccess files).  An automated script will analyze and present the user with all change detected.  At this point the administrator may approve or reject changes and deploy them to production.

Smoke Test the Application

Now that all of the code and database modifications have been made, we need to verify that the site is working properly.  Since the site is available for us (due to the RewriteCond we placed in our .htaccess), we can run our tests on the live site.

 

Some tests should not be run on the live server such as those which make database changes that cannot be easily undone.  These should be done on a staging server instead.  Smoke testing usually involves a human tester going through most of the features of the site to check that they look okay.

Take the Site Out of Maintenance Mode

Comment the code in the .htaccess file at the website root so it looks like the following:

# Uncomment the following to enable maintenance mode
# RewriteCond %{REMOTE_ADDR} !=127\.0\.0\.([0-9]|1[0-9])
# RewriteRule ^maintenance.html$ http://%{HTTP_HOST}/ [R,L]

Ensure the Site is Really Live

Load your web site using a different IP than the one you excluded in your RewriteCond.  There are websites available to do this.  One of them is http://www.webpagetest.org/.

How to Setup Android Studio on Debian 7

May 16, 13 by kenrich

Android-logoLast night I installed Android Studio on Debian 7.  I use the term “install” loosely since you really don’t perform an install, you just extract the files to a folder and then run it.  After creating a project skeleton, I noticed an error when trying to run the project.  The system mentions that ADB is unable to run (well it really says it’s unavailable).  After performing some searches on Google(tm), I noticed that this was due to my having the AMD64 architecture and the ADB requires i386 references which didn’t exist on my system.

The solution was to install the i32-libs package using Apt to make all of this work.  Of course, it wasn’t as simple as this.  I had to first add the i386 (intel 386) architecture as an alternate platform to support using “sudo dpkg –add-architecture i386”.  Even that was not enough.  I had added some additional repositories to /etc/apt/sources.list that needed to be removed, then I had to  run “apt-get update” and then finally “apt-get install i32-libs”.  Finally, my system was ready and ADB ran properly (you can test this by running “./adb version” in the platform-tools folder.

So now my skeleton builds and runs using the virtual devices.  I believe the install took about a gigabyte of space, but that’s okay.  Oh, I should also mention that Android Studio recommends using the Oracle (Sun) Java runtime and tools since there are known bugs with the openjdk that comes installed default with Debian 7.  You have to add a third-party repository (from Canonical, makers of Ubuntu Linux) to your sources.list in order to get this installed (Google on how to do this).   With these two steps I was up and running and ready to develop Android applications.

Fun times with InstallShield 2009

May 05, 13 by kenrich

installshieldLately, I’ve been fighting with InstallShield (because there is no other better way to put it) to manage some basic installer functinoality.  Actually, I’ve been learning all the various different facets of the software off and on over the past few months.  I know that its used by a lot of different companies and seems to be powerful to do lots of different things, but I have to say that the experience has left me kind of sour.

I have to admit that a lot of the problems I have dealt with have been my own making.  But there were others that were clearly a fault of InstallShield itself.  Now bear in mind that I was using InstallShield 2009 Premier and not the latest version, so some of this may not apply to the newest version.  An upgrade to 2012 is in the works but these issues are only in regards to 2009.

First of all, let me mention the project file format.  It is a combination of binary and plain text.  This makes it virtually impossible to do change revision on the project files.  It makes it difficult for users to see what changes were made and how to undo those changes.  I am dealing with Basic MSI projects and sometimes I can see XML based rules and sometimes I cannot.  I haven’t been able to figure out why this is the case, but its very annoying.

Second, I’d like the mention the horrible user interface.  I get the fact that they are trying to make it look like an IDE (and * have no problem with that).  The tree node navigation is a little non-standard but I guess it is somewhat consistent.  I am wondering what’s with the tabs though.  Sometimes they are on the top and sometimes on the bottom.  You also have the same tables (like string tables) represented in multiple ways in the application.  The Features and Setup nodes mostly represent the same information except one allows you to manage components and one does not.

Next there is the issue of error reporting.  Many of the errors can be cryptic such as when you have a file path which is too long.  Sorry InstallShield, excuse me for having a long path on my development drive.  It’s not like InstallShield creates long paths itself… oh wait a minute, it does!   I had a particularly nasty error  message while creating a chained installation package that read “build error 6151 (Cannot save target database)”.  After days of research, I found out this error occurs when the installer package name is longer than 9 characters in length.  Gee, InstallShield could have just limited the name in the IDE to just 9 characters but instead I get this cryptic message.  (FYI: this has been fixed as of IS 2010).

There are a lot more flaws I could mention here, but I’ll save most of those for another post.  One last point, when trying to build a release, if you have Windows Explorer or a command prompt open to one of the directories under the release folder, InstallShield shows you an error that reads “Cannot rename folder because it is currently in use”.  If programs like Visual Studio can create builds when the folders are open, I don’t understand why InstallShield can’t.

As an aside, I’ve invested time in learning Nullsoft installer and WiX installer.  My preference is to convert everything over to the WiX installer.  WiX is fairly simple, straightforward, and all files are text-based and can easily be version controlled.  Plus, an added bonus is that I don’t have to worry about licensing issues so multiple people can work on the same project at the same time (and the software is totally free).  For now, I am stuck with InstallShield but I hope to be leaving soon.