Tuesday, July 26, 2016


I recently upgraded my laptop to Windows 10.  One disadvantage is the classic minesweeper game has gone away.  Fortunately I can still play it on an older desktop running Windows Vista.  I recently had to create a new account on this machine because a malware infection had rendered my previous account unusable.  This meant my minesweeper win rate statistics were reset and I could easily track my recent performance.  I have since played 100 games on the difficult (16x30) board of which I won 43.  Most of the losses were due to unavoidable guesses but I sometimes trigger a bomb unexpectedly due to flagging a square as a bomb incorrectly.  These errors are most commonly caused by failing to notice a diagonal adjacency.  Taking this into account I estimate the win rate with optimal play is around 50%.

Sunday, July 17, 2016

Windows 10

As you may have heard Microsoft is offering a free upgrade from Windows 7 or 8 to Windows 10.  The offer is currently set to expire on July 29, 2016.  One of my home computers, a cheap Dell Inspiron laptop running Windows 8 which I bought in 2010, was eligible for the offer.  Due to laziness and paranoia I had delayed accepting but with the deadline approaching I upgraded on July 4th.  So far despite some minor annoyances I haven't regretted doing so.  Hopefully this will extend the useful life of the laptop with which I have been generally pleased.

Tuesday, June 28, 2016

Quicken Workaround

I have been using the 2010 Quicken Premier program since 2009 (like cars new versions of the program come out the year before) to track my personal finances. Recently the update stock prices function (which downloaded current price quotes and other information for securities in your portfolio) stopped working. According to Quicken it should have stopped working as of April 20, 2013.  This is because of a Quicken policy to discontinue online services after about 3 years to encourage upgrading to the current version of the program.  I briefly considered upgrading but according to reviews on Amazon the current versions of the program don't work unless you are on the internet and have logged into a Quicken server.  I find this utterly unacceptable.

Fortunately there is a workaround.  The program provides a way to update stock prices from a list of quotes in a comma-separated values (CSV) file.  Each line of this file should contain the ticker symbol, price (and optionally date) separated by commas.  This file could be produced in a text editor but since I have 49 prices to update this would be a lot of work.  An easier way to produce such a file is to set up a Google Finance portfolio with the securities you are interested in and then use the download to spreadsheet function.  This produces a CSV file.  It isn't quite in the format Quicken wants but I found it fairly easy to write a little Fortran program to adjust each line.

A few hints for people wishing to do something similar.  I will assume you are running under a Microsoft Windows operating system.  Quicken seems to like each line to end in a space and the file to end in a blank line.  The information you want (ticker and price) is the second and third fields of each line in the file (named "My Portfolio.csv") Google saves (in your downloads directory).  Which means you usually want to copy the information between the first and third commas.  However sometimes the first field (company name) contains a comma.  In that case the name is enclosed in quotes.  So if the line starts with a quote symbol you want to extract the portion of the line between the second and fourth commas.  For some of the index quotes Google starts the symbol with a '.' so for example the S&P 500 has symbol '.INX'.  Quicken doesn't like the initial '.' so it should be deleted.  Quicken looks for the CSV file on your desktop so if you create the file there you can avoid entering the full path name. Google won't overwrite an existing "My Portfolio" file in your downloads directory so this file should be deleted before you try to download a new set of prices.

One issue I haven't resolved is that sometimes the prices in the CSV file Google downloads seem to be stale (outdated) compared to the prices you see on your screen.

I believe Yahoo Finance has a similar portfolio function which might also work but since for some unknown reason Yahoo is currently not allowing me to create an account I can't test this.

Sunday, June 19, 2016

Car Talk

My previous car was a Toyota Solara. This was a pretty good car but it had an annoying flaw. There was some problem with way the tires were sealed to the rims and they tended to develop slow leaks. So I had to keep topping off the air pressure. When it got too bad I would take it to a tire place and they would do something that fixed the problem for a while but eventually it would recur. Also the car was high mileage and required expensive repairs from time to time. Finally in 2013 (at 216,000 miles) it had a serious engine problem for which I received a $4000 repair estimate. So I replaced it with a Toyota Camry my current car.

The Solara was a variant of the Camry so there isn't too much difference between them. The Camry had about 34000 miles on it when I bought it (it is now approaching 72000 miles). This is the only car I have owned with less than 100,000 miles on it and it has been pretty trouble free which is nice. The Camry also gets better highway mileage than the Solara. The gas tank is the same size so the range is greater. The longest distance on one tank of gas I managed with the Solara was 536.5 miles (Salt Lake City to Denver) in 2011. I soon exceeded this with the Camry (541.7 miles in November 2013) and while on vacation last month set a new personal record by going 626.2 miles on one tank. 

The miles per gallon (mpg) achieved between fill ups seems to vary quite a bit even when I am driving almost exclusively on highways. On my vacation last month my mpg varied between 33.3 and 44.8. Measurement error could be part of this, I fill the tank until the pump shuts itself off and I expect there is some variation in how much gas is in a full tank. Elevation change is clearly a factor, my record distance was aided by a 5000 foot elevation drop which I estimate saved about .8 gallons (compared to no net elevation change). Running the AC will reduce mpg as will traffic tie ups. Average speed affects mileage and when driving long distances in the same direction it seems plausible that you could have a substantial average head wind or tail wind which would also affect mileage. Anyway enough things lined up right for a new record.

Thursday, June 9, 2016

2015 taxes

My taxes got off to a bad start this year when the DVD drive in my computer died while reading the TurboTax disc.  Fortunately external DVD drives (which plug into a USB port) aren't very expensive.  I ordered one from Amazon and it was able to read the disc.  So I guess I can't blame this on TurboTax. 

Last year Intuit annoyed a lot of people by removing longstanding features from the Deluxe version of TurboTax (in order to force people to buy a more expensive version).  The ensuing outcry eventually caused Intuit to reverse course and the deleted features (or at least most of them) were restored for 2015.  One positive difference is Intuit now appears to provide unlimited state returns as part of the base program (previously if you needed to file more than one state return you had to purchase upgrades for each additional state).  This saved me some money as I spent the summer working at my employer's California location.

In addition to again encountering some problems with TurboTax that I have complained about in previous years I found a new issue.  When entering items from Box 14 on your W2 TurboTax says something like don't worry if you can't find the item in their drop down menu of common deductions.  But you should worry because if TurboTax doesn't recognize the abbreviation it won't treat it as a deductible state tax potentially costing you money.  In my case I had a deduction labeled "UI/HC/WD" which it turns out is the same as "UI/WF/SWF" which is deductible.  The program actually knows this but only lists "UI/WF/SWF" in the main menu.  If I recall correctly you have to consult a help page to get a list of alternative names which includes "UI/HC/WD" which I had not done until this year.  I don't think this actually cost me money in previous years because I am subject to the alternative minimum tax which doesn't allow the deduction.  However anyone who just pays the regular tax is potentially overpaying if they overlook this which TurboTax makes it easy to do.

I also found I had been making another error in my New Jersey returns.  States generally do not tax interest on directly held federal bonds.  So you can exclude this interest from income on your state return.  But if you own a mutual fund that in turn owns federal bonds state tax treatment varies.  In New York this interest is taxable unless it is a substantial fraction of the mutual fund dividends (over half by some test if I recall correctly) but in New Jersey it appears you can prorate and exclude the portion of dividends attributable to interest on federal bonds from your income even when it is only a small fraction of the dividends.  Having lived in New York for many years I was used to the New York rule (which my mutual funds never came close to satisfying).  When I moved to New Jersey I assumed the rule was the same.  This oversight cost me a small amount of money in previous years but not enough to make filing amended returns worth the hassle.

I filed my federal return electronically April 10 and mailed the state returns April 12.  My refunds were reasonably timely.  I received (by direct deposit to my bank account) my federal refund on April 20 and my New Jersey refund on June 3.   I was not due a refund from California.

Over the years I have had various issues with TurboTax but there don't appear to be any obviously superior alternatives so I will probably stick with the devil I know.

Added 7/19/2016:  Actually I received my New Jersey refund May 3 not June 3.

Saturday, April 16, 2016

Defensive Indifference

I listened to the end of the Yankee's game this afternoon.  The Yankees were trailing the Seattle Mariners 3-2 with two outs in the bottom of the ninth but they had runners on first and third.  At this point the runner on first stole second.  However the Yankee's announcer, John Stirling, started claiming it wasn't a steal because of defensive indifference (since apparently the Mariners had not defended against the steal).  However a play should only be ruled defensive indifference  if  the run doesn't matter.  Here the potential winning run was moving into scoring position so defensive indifference does not apply.  And indeed when I checked later the play was properly scored a steal.  I knew the rule because Bill James in one of his books had discussed a similar play that had been scored incorrectly.  Stirling has been announcing Yankee's games since 1989, you would think he would know the rules by now.  Btw the next batter grounded out so the Yankees lost and the steal didn't make a difference.

Computer Go

Last month the computer Go program AlphaGo beat a top human player, Lee Sedol, 4-1 in a 5 game match. Long ago I studied Go some but never played enough to become very good. However I know the basics and was able to follow the match with some interest (despite the live games being at an inconvenient time). Go is a harder game for computers to play than chess and 20 years ago when IBM's computer chess program, Deep Blue, was playing Garry Kasparov, computer Go programs were pretty bad. So there has been a lot of progress. I see three big contributors to this milestone. First a new algorithm, Monte Carlo tree search (MCTS), developed about 10 years ago, proved to work very well for Go. Second there has been continuous progress in machine learning, in particular deep learning for artificial neural networks. Third computer technology continues to advance rapidly. Modern graphics processing units (GPUs) provide incredible computational power for suitable problems and this has contributed to recent advances in deep learning.

If you are interested in playing an online computer Go program check out the Cosumi site. It provides a variety of skill levels and board sizes (standard Go is played on a 19x19 grid but smaller sizes make for a faster game and are easier for computers to handle). I have played some 9x9 games against it. I find it an entertaining opponent. At level 5 (the highest level provided) it still moves quickly but can beat me most of the time despite the occasional weird blunder.  I recommend the 2-click setting to avoid frustrating unintended moves.  Unfortunately the FAQ is in Japanese so I don't know anything about the underlying program. Apparently it has been around for a while but I didn't discover it until the match got me interested in Go again.