Monday, March 28, 2016

How to install aspell for emacs on a macbook

Recently I bought a shiny new macbook and needed to install "aspell" for emacs.  Here's the way I did this:

1.  First install Homebrew, the missing package manager for the mac.  The hardest part is the arcane license acceptance bit.  In a console window enter:

sudo xcodebuild -license
/usr/bin/ruby -e "$(curl -fsSL"

2. Then install "aspell" into the "/usr/local/bin" by entering this command:

brew install aspell --with-lang-en

3.  In your .emacs file add the code to link this all together:

(setq-default ispell-program-name "aspell")
(add-to-list 'exec-path "/usr/local/bin")

4. Enjoy.

Tuesday, March 15, 2016

The Six Rules for Talkiing Politics at Work

You can talk politics at work, since we are all political animals, but you have to be careful because things can go dreadfully wrong.  Here's the things you need to know:

1.  Realize your vote doesn't count for anything - nada, zilch, zip.  No national election has ever been won by one vote.  It doesn't matter how you vote, you won't change the election outcome.

2.  Realize your political opinion doesn't count for anything.  Even if you could convince all your friends and acquaintances that your slightly offbeat politics are correct, it doesn't change anything. The increase of a few hundred votes won't change a national or congressional election.

3.  Realize your relationships with your co-workers are everything.  You work there 8 hours a day and your co-workers are key to your happiness and success there. 

4. Realize that knowing your co-workers better can actually improve your relationships.  That's the purpose of talking politics at work - it's not to change their wacky political views - it's to understand them better and improve your relationships.

5. Don't try to change their viewpoint - that's when things go wrong.  If things get a little testy, say, "Oh, my, look at the time, I've got to go."

6.  Don't tell them directly your viewpoints, but ask them their viewpoint. As Covey says, "Seek First to Understand, Then to Be Understood".  Wait for them to ask your opinion, if they don't, bite your lip, and don't tell them.

For example, in the break room you can ask, "What did you think of the primary results last night?"  Let them talk and listen, but really do listen.  Always remember they could actually, gulp, be right and you could be wrong.

Go ahead and talk politics at work, it can be great fun and deepen your understanding of your co-workers, but be careful.

Pics from .Net Users Group - Barrett Simms on Unit Testing

 Barrett Simms spoke to 80 people at the Austin .Net Users Group about Unit testing and tools.
Here's a few pics of what a users group looks like.  Join us next month.

 My notes:

His Toolset includes
ProjectRoller - a github project to get the initial setup

BaseAspNetAngularUnity - initial "project zero" code

 Unity for Dependency Injection

Simian to find duplicate code
Angular 1.5
Ncover - he uses desktop version, comments were made about how expensive it is
Moq - for mock object

command line to start:   ProjectRoller.exe ADNUG
testfast.bat - runs tests code in command window (used ConEmu, my fav shell replacement)

Branch Coverage is the one to pay attention to.  Try to keep above 94%.
Write a unit test for every conditional branch
Restricted access to constructors so we have to use DI
If you use "new" on an important object its an anti-pattern, use DI

Saturday, March 12, 2016

Turbo Tax Error: Schedule B: State ID exempt-int div-3 must be entered.

I was cruising along doing my taxes online with Turbo Tax, wishing we just had a national sales tax instead of income tax, and during the review, Turbo Tax gave me this error:

 "Schedule B: State ID exempt-int div-3 must be entered."

and offered to let me fix it in the form below.  Don't fall for it.  Do not try to fix it on the form shown.  You have to fix it elsewhere.

Go back to "Personal / Personal Income / I'll Choose what to work on / Dividends on 1099-DIV"

 If your problem is the same as mine, under "Exempt Div." you have "$0" shown.
You need to get rid of the "$0" and have it show a "-" instead.

 I was able to just hit "Edit" on both entries, change nothing, and select "Continue".
 After that it showed the "-" instead of the "$0".
Then my taxes passed review.
I hope your fix is as easy.
(Is it too late for the fairtax?)

Thursday, March 10, 2016

How to Install Windows 10 on a MacBook Pro using VMWare

I just bought a shiny new MacBook.  Here's how to install Windows 10 with VMWare.  It's very easy and takes about 30 minutes.

Why install Windows 10 on a MacBook?  Well, it's one of the best hardware platforms today and it gives you the flexibility of running the Mac OS or Windows.

Why use a virtual environment instead of Bootcamp?  With Bootcamp you have to create a special partition and set aside a fixed amount of space for Windows.  With a virtual host all that can be done dynamically.  You forfeit some speed using a virtual host, but gain flexibility.

1. Visit and download the appropriate Windows 10 ISO image - 64 bit.
2. Download the "Win10_1511_English_x64" ISO image to the "Downloads" directory or a USB drive with at least 4.1 GB of free space.

3.  Go to and download the fusion eval install.

4. Run the VMWare installer
 You can skip the license key and use the 30 day free trial version.  Answer the remaining questions as appropriate.

Select  "Install from disk or image"

 Select the location of your ISO windows install file.  I used a USB thumb drive.

 Being paranoid, I selected "More isolation" to reduce the security risks.  I'll use dropbox to transfer files.
5. Install Windows normally.  When asked for the license key, leave it blank to use the 30 day free trial period.
6. Enjoy.

Visual Studio 2015 looks great on a retina display:
A few notes on VMWare Fusion:
Fusion has three modes for hosting Windows 10: Unity, Single Window, and Full Screen.
1. Unity is the cool, hip one.  In Unity your Windows applications appear alongside your OSX apps in OSX windows.  You can cut and paste between the Windows 10 windows and OSX windows.
In Unity mode there is no Windows 10 screen with the start menu and metro app icons, the screen and start menu functionality are hidden inside the VMWare icon on the mac.  Right click and you can start your Windows applications.

2. Single Window  mode creates a OSX window which looks just like the desktop on Windows, with the start menu and app tiles.

To switch between them right click on the VMWare icon and select the top item, "Windows 10 ...".  This will put the VMWare menu at the top of your screen.  Select "View" and then your desired mode.  If the View modes are disabled, go to a Windows app and press "Shift-Command-U".

Wednesday, March 09, 2016

It Really is a Mobile First World

I've been redesigning my personal web site for mobile use with Bootstrap.  Checking on Google Analytics I find the effort is not wasted:

Tuesday, March 08, 2016

Speeding up a Web Site - a Personal Journey

Google has been gently reminding me over the years that my personal website could use a speed tune-up.  So today I took the plunge.  Here's my story today.

I went to Google's PageSpeed Insights page.  My home page earned a 64 out of 100 points for speed.  Hmmm.   Doesn't sound good.  Google had a series of recommendations.
1.  First to fix was JavaScript files blocking the page download.  I had  JavaScript files blocking the download.  After careful examination, two of those were deemed obsolete.  To the others, the "async" keyword was added so the modern browsers wouldn't block on downloading those.
  <script async src=""></script>
<script async src=""></script>

But, sometimes the bootstrap would load first and whine about needing  the jquery library.  So I concatenated both libraries into a single javascript source file, with jQuery first,  and called the combined file with "async".

2. I combined all custom css files into a minified file.   This is a no-brainer.

<!-- link local stylesheets -->
<link id="csslink" href="" rel="stylesheet" type="text/css" />
<link id="csslink" href="" rel="stylesheet" type="text/css" />
<link id="csslink" href="" rel="stylesheet" type="text/css" />

With a small linux shell script using the YUI compressor utility:
cat www/style/Menus.css www/style/Basic.css www/style/BeachCore.css > www/style/All.css
java -jar lib/yuicompressor-2.4.8.jar --line-break 80 www/style/All.css -o www/style/All-min.css

 Then replaced the three html lines above with
<link id="csslink" href="" rel="stylesheet" type="text/css" />

3. I then replaced the ancient Google Analytics script "urchin.js" with "analytics.js" which does not block.

Doing these three simple things raised my score from a 64 to an 79.

I started using YSlow from yahoo to get some more ideas, but those will have to wait...

Friday, March 04, 2016

Austin Homegrown API

I was final able to go to a Austin Homegrown API  meetup Wednesday night.  The most pleasant event was my car not being towed from the Wright Bros. Brew and Brew's parking lot even though I didn't know to get a validation pass.

Keith Casey spoke about an intriguing 100 line demonstration program he wrote using the Uber API to automatically check your calendar and arrange an Uber ride at the time needed, taking in account the current traffic conditions.  More at his  Future of Transportation post.

Dustin Blanchard of CarServ showed his work using the  Edmunds API.  I was surprised about how much info is available for free.  Edmunds allows low volumes of queries for free once you have a developer key.

Both speakers related that the API providers were eager for them to use their service.

Thursday, March 03, 2016

I've Been Very Impressed with the Latest "AddThis" Social Tracking Software

Social media buttons are important for websites.  I'd tried "" a few years ago and it didn't work that well for me.  I tried it again yesterday and it is awesome!
Adding the social media buttons required only two lines of code to be added to my site template.
And then magically, as shown below, the social buttons appear hovering on the upper left side of the page.

If that wasn't enough, I tried the analytics portion of the dashboard and was equally impressed.
Without lifting a finger I could see the number of visits during my first afternoon of using AddThis and how many shares were made.

 Color me impressed and thankful!