How Did Stocks Really Do in 2015?

How did your investments do in 2015?

Any of you who know me know that I am a big fan of investing in stock market index fund. These funds mirror the performance of the stock market as a whole and do not seek to pick and choose winners. Historically, most people who invest in index funds make more money than the people who try to gamble on the performance of a specific company or industry.

One of my favorite index funds mirrors the performance of the S&P 500 Index. The S&P 500 Index measures the performance of the 500 largest companies in the United States. Let’s see how it did in 2015 by way of examples:

In 2015, if you invested $1000 at the end of each month, you would have $11933.78 at the end of the year. In other words, you would have lost $66.22 out of the $12000 you invested.

Or… If you had invested $12000 on the first business day of January 2015, you would have had $11907.37 at the end of the year. In other words, you would have lost $92.63 out of the $12000 you invested. That’s less than 1%.

To put that in perspective, it is interesting to note that if you had sold such a hypothetical investment just 2 days ago, you would have gained more than 1% for 2015.

Remember that stocks are long term investments. It is normal for them to change day by day and from month to month or year to year. Economists have studied stock fluctuations for many decades and have found that there is no real pattern to day to day movements in stocks. If stocks go up one day, that does not mean that the economy is getting better. And if they go down one day, that does not mean that the economy is doing worse.

But, one thing we can say is that, in general, stocks increase in value over 10 or more years.

It is also important to remember that 2015 was the first year in 7 years that stocks went down over the course of the year. (And that was just barely). Where were stocks 7 years ago?

Well… if you had invested $12000 seven years ago, then you would have almost $18000 today.

Things are not so bad after all. And today begins a new year. Good things are in store for those who invest regularly in a diverse portfolio of investments.

How do I know? It has always been that way and there is no reason to believe that things are different now. :-)

Happy New Year!

Updating the Raspberry Pi

Updating the Raspberry Pi regularly helps it function efficiently and securely. Log into the Pi via SSH and then execute the following at the command line:

sudo apt-get update
sudo apt-get upgrade

This process can take some time, depending on the network connection speed and how long it has been since the previous update.

Cygwin – Linux Tools for Windows

As a developer, I tend to either work in a Linux environment (e.g., Ubuntu) or in a Windows environment. In either case, I find that Unix/Linux command line utilities are a necessity for serious software development. In Windows, those tools can be be installed through a package called Cygwin. Cygwin can be found at:

Install the default packages to begin with, along with all packages relating to the programming languages that you are interested in.

Quick Install of Ruby Development Environment

Have you ever been curious about the Ruby programming language or Ruby on Rails?

Here is a quick guide about getting up and running quickly.

First, go to and download the appropriate RailsInstaller package for your operating system.

Next, run the installer. This will install Ruby, Rails, Bundler, Git, Sqlite, TinyTDS, SQL Server Support, and DevKit.

This completes the installation of Ruby. Now, it is time to install an IDE. Personally, I like to use Eclipse because it has plugins for other programming languages (like PHP and Python) that I use. Install Eclipse by going to Download Eclipse standard and install it.

Load Eclipse. Go to the Help Menu and choose “Install New Software…”

Go to Choose the Eclipse Plug-in Version and then press the download button:


Now, copy the link to the download files to your clipboard:


In this case, the link is

Copy this URL into the “Work with” field in Eclipse’s “Available Software” window:


Select all items in Aptana Studio 3 and click “Finish”.

Eclipse will now restart and you will be ready to write your first Ruby program.

PDF – Scanning Odd and Even Pages Simultaneously

I have often found myself in a situation where I needed to scan several pages of a book – both odd and even.  However, I want my PDF file to only have one page from the book on each PDF page.  This post describes how to do this with Adobe Acrobat 9.5 under Windows 7.

Install Script to Duplicate all Pages of a PDF

Save the following code snipet to a file called DuplicateAll.js in the Acrobat folder that contains user defined scripts.  On Windows 7, this is:  C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Javascripts

        cExec: "duplicate_all_pages();",
        cParent: "Edit",
        cName: "Duplicate all pages"

function duplicate_all_pages() {
        var r = this.getPageBox();
        var w = r[2] - r[0];
        var h = r[1] - r[3];
        var oldD = this;
        var newD = app.newDoc({ nWidth: w, nHeight: h });
        var path = oldD.path.replace(oldD.documentFileName,"");
        for(var p=oldD.numPages-1; p>=0; p--) {
                pageFile = path+"page_"+p+".pdf";
                oldD.extractPages({ cPath: pageFile, nStart: p });
                newD.insertPages({ cPath: pageFile, nPage: -1 });
                newD.insertPages({ cPath: pageFile, nPage: -1 });
        return true;

A special thanks to for providing this code!

Scan Open Book Pages and Save as a PDF

Open the book, place it face down on the scanner, and scan odd and even pages of the book at the same time.  Then, open the resulting PDF in Adobe Acrobat.

Crop and Split Pages

Go to the Edit menu and choose “Duplicate all pages”.  This option should be the last option on the menu.

Now, look at the first page of the PDF.  The odd page number from the book will be on the left hand side.  Crop out the page as shown in the example below:


Note that this should be applied to all odd pages.

Finally, do the same thing for the even page numbers as shown in the example below:



Now, each page of the book will be on a separate page in the PDF file.

Funding a New Business with a 401K

A few years ago, Intuit did a study showing that 72% of people would prefer to be self-employed. (1)

But, starting a business is costly. According to Forbes, the cost of starting one of the 20 top franchises ranges from just over $60K to almost $1.5M. (2)  Such figures are staggering for most  aspiring entrepreneurs and cause the idea of opening an independent business to be quickly dismissed.  However, there are options open to many people.

One of these options is using an existing 401K from your employer to fund the start-up or acquisition costs of a new business.  This option is called a Rollover as Business Start-up, or ROBS.   Here’s how it works:

  1. Form a Corporation.  In order to meet IRS requirements, the corporation must be a C Corporation – not a Limited Liability Corporation (LLC) or S Corporation (S Corp).  For sake of example, let us call the corporation “VCSCO, Inc.”
  2. New Corporation Sponsors a 401K Plan.  A CPA or an expert in setting up a ROBS creates a 401K for VCSCO, Inc., and agrees to be the plan administrator.
  3. Rollover Your Existing 401K Plan.  Rollover the funds from your present 401K plan into the new VCSCO, Inc., 401K plan.  Rolling funds from one 401K to another creates no tax liability.
  4. New 401K Plan Invests in the New Corporation Stock.  VCSCO, Inc., issues shares of stock and your new 401K plan buys them.  The proceeds from the sale of the stock to your 401K plan is deposited into the VCSCO, Inc., bank account.  It can be used to pay for franchise fees, start-up costs, and working capital to start a business or purchase an existing business.

When applying for bank or SBA loans, lenders consider such cash to be unencumbered funds.  In other words, there are no loans made against it and no debt associated with it.   Since business loans for many types of businesses are routinely made with 25% down payment, an entrepreneur can realistically afford to purchase a business that costs 3 or 4 times as much as the value of the 401K.   With average 401K balances of over $75K, a surprisingly large number of people have access to the money needed to start an average franchise with initial investments of $300K.

What kind of franchise can a person purchase for $300K?  A tax service like Liberty Tax.   A Merry Maids franchise.  A Supercuts franchise.  Or a fitness center franchise like Anytime Fitness.  For the more confident entrepreneur, $300K is more than enough to buy a small car wash, a dryer cleaners, or a laundromat.

In order to use a ROBS for funding, the entrepreneur must be a salaried employee of the business.  The salary that the entrepreneur makes should not come from the ROBS funding – but only from operational revenues generated once the new business opens its doors.


The biggest drawback of using a ROBS for funding a new business adventure is that there is significant risk of losing retirement savings.  The entrepreneur is solely responsible if the business spirals into bankruptcy.

Other drawbacks include the IRS requirement that all full time employees of the business be offered the same 401K plan.  In other words, if your new business has full time employees, you will be required to offer them shares in the venture.  Obviously, if this is undesirable or unfeasible, only part-time workers can be hired.

Finally, the IRS wants to make sure that ROBS are not used as a backdoor method of withdrawing money tax-free from a 401K.  Therefore, it is important that your business opportunity be valued by a professional appraiser before the ROBS funding is secured as well as on a yearly basis thereafter.  And be prepared for an IRS audit – especially if your new enterprise is a cash business where money laundering could be a concern for the government.







Reversing Page Order in Adobe Acrobat

Here is a very useful trick that I found today and want to share.

Create a file called “Reversepageorder.js” your Acrobat Javascipt Folder (C:Program FilesAdobeAcrobat 9.0AcrobatJavascripts).  Put the following in it:

app.addMenuItem({ cName: “Reverse”, cParent: “Document”, cExec: “PPReversePages();”, cEnable: “event.rc = ( != null);”, nPos: 0

function PPReversePages()
var t = app.thermometer;
t.duration = this.numPages;
for (i = this.numPages – 1; i >= 0; i–)
t.value = (i-this.numPages)*-1;
t.text = ‘Moving page ‘ + (i + 1);
}// JavaScript Document


Restart Acrobat.

The Reverse option will be under the Document menu.

Creating an Image with Transparent Parts

If an image has transparent parts, some browsers will ignore them.  But, creating images with transparent parts is useful when making a collage or when creating a Visio diagram with embedded images.  Here is how to create an image with transparent parts using GIMP:

  • Install GIMP, if necessary.  Here is a link to the Windows installer for GIMP 2.8.2
  • Open the image, or copy/paste it into GIMP.  If it is copied in, save it before proceeding.
  • Choose the Layer -> Add Transparency -> Add Alpha Channel menu.
  • Click on the Fuzzy Select Tool icon:
Fuzzy Select Tool


  • Click on the area of the image that you want to be transparent.  Note that the area of the image that you want to be transparent must have a fairly uniform color.
  • Press Delete.
  • Repeat until you have removed all of the areas of the image that you want to be transparent.
  • Choose the File -> Export menu.
  • Save the file as *.png