E*trade Sucks (and Ameritrade too)

The Sanmina-SCI stock I foolishly purchased through their Employee Stock Purchase Program is currently trading at a third of its purchase price. Now, to add insult to injury, I see that E*trade (the broker Sanmina used for the ESPP) charged me $20 for the 6:1 reverse split last August. They call it a “mandatory reorganization fee” and claim that it’s standard practice to charge this fee. Yet, Fidelity, Scottrade, and USAA, to name a few, don’t seem to agree, as they do not charge this fee. E*trade customer service, both email and phone, refuses to reverse the charge, so it is now my moral imperative to liquidate and close the account. I’ll never use E*trade again, and hope that others will heed this warning as well. Avoid Ameritrade too, which also charges this fee.

E*trade Sucks

According to Kiplinger’s November 2008 report, Fidelity wins as best overall online brokerage, combining tools, research, large selection of funds and bonds, and relatively low fees. Most importantly, they don’t charge for mandatory reorganizations.

Anointing the best broker is tricky because so much depends on the needs and wants of customers. Investors who feel they need a lot of hand-holding may gravitate toward Fidelity and Charles Schwab, which run neck and neck in the race to provide customers with all the advantages of a full-service broker at a discounter’s price. Investors who are willing to settle for fewer bells and whistles will appreciate Muriel Siebert, a small firm that stands out for its selection of mutual funds and third-party research. Price-conscious customers might favor TradeKing and newcomer Options-House, which charge low commissions — $4.95 per stock trade, regardless of the account size — and provide good customer service.

Putting UTF-8 into C/C++ Source Code

After much googling, I could not find any tools for converting a UTF-8 string into an escaped C/C++ string literal suitable for pasting into an ASCII source file. Therefore I produced this Perl script which seems to provide a fairly readable escaped string:

use strict;
chomp;
print '"';
my $prev_esc = 0;
print map
    {
        if (ord $_ > 0x7f) {
            $prev_esc = 1;
            sprintf('\\x%lx', ord $_);
        } else {
            my $need_break = $prev_esc && /[0-9A-Fa-f]/;
            $prev_esc = 0;
            ($need_break ? '" "' : '') . $_;
        }
    }
    split('', $_);
print '"' . "\n";

Run it with the Perl -n option, and it will output an escaped string literal for each line input:

$perl -n utf8esc.pl
Grüße aus Bärenhöfe
"Gr\xc3\xbc\xc3\x9f" "e aus B\xc3\xa4renh\xc3\xb6" "fe"

Hit Ctrl-D on a blank line to exit.

Unfortunately, C/C++ seems to have the strange rule that all hex characters following a “\x” apply to that escape sequence, even though the maximum value allowed is 0xff. Therefore it is necessary to break the string into separate segments.

Misinformation about health care reform from Senator Hutchison?

I just read the Senator’s health care column from yesterday. The 4th and 5th paragraphs

The Administration’s proposal contains tax penalties and fees on small businesses that are not able offer health insurance. To pay these added costs, many small businesses could be forced to decrease workers wages, hire fewer employees, implement layoffs, or cut into other benefits. And some employers will have to pay a tax even if they already provide health insurance! A Kaiser Family Foundation survey found that roughly 3 in 5 small businesses will be hit with new taxes under the Democrats’ proposal.

Imposing new taxes on small businesses promises to wreak havoc on our economy. By raising taxes on some small businesses as high as 45 percent, they will be paying 10 percent more than what major corporations pay – and the U.S. corporate rate is among the highest in the world.

seem to be in direct opposition to the White House report on small businesses.

Unfortunately, the Senator does not city any specific legislation or documentation. However, the Kaiser Family Foundation she cites has a report on the President(-Elect)’s proposal that indicates no health care requirement for small business, and even provides a tax credit for them:

Require large employers to offer “meaningful” coverage or contribute a percentage of payroll toward the costs of the public plan; small businesses will be exempt from this requirement.

Provide small businesses with a refundable tax credit of up to 50 percent of premiums paid on behalf of their employees if the employer pays a “meaningful share” of the cost of a “quality health plan”.

I’ve written the Senator to find out what facts this column is based on.

Build Boost 1.39 for 64-bit Windows

Building Boost for 64-bit Windows turns out not to be completely straightforward. These instructions assume you’re using Visual Studio 2008 and running from a VS 2008 x64 Command Prompt.

First, running bootstrap.bat appears to fail:

Building Boost.Jam build engine

Failed to build Boost.Jam build engine.
Please consult bjam.log for furter diagnostics.

You can try to obtain a prebuilt binary from

http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bjam.log in that case.

Actually, it’s not failing to build, it’s just trying to copy the executable from the wrong path. All you need to do is copy tools\jam\src\bin.ntx86_64\bjam.exe to the top-level Boost directory.

Next, you need to install any of the optional libraries you want to support. For Python support, you can install the Windows AMD64 MSI Installer, and then add the install directory (C:\Python26 by default) to your PATH. For Graphviz parsing support, download and unzip Expat 2.0.1 and my VS 2008 x64 project files, then use Batch Build in VS 2008 to build the x64 targets. You’ll also need to rename the Expat library reference in Boost’s libs\graph\build\Jamfile.v2 from “expat” to “libexpat”.

Finally, run the following commands to build Debug and Release DLLs, setting the Expat paths appropriately and the -j option to the number of processor cores you have:

set EXPAT_INCLUDE=C:\expat-2.0.1\lib

set EXPAT_LIBPATH=C:\expat-2.0.1\win64\bin\Debug
bjam -j3 --stagedir=stage64 --without-mpi toolset=msvc address-model=64 variant=debug link=shared threading=multi runtime-link=shared stage > build-shared-multi-debug64.log

set EXPAT_LIBPATH=C:\expat-2.0.1\win64\bin\Release
bjam -j3 --stagedir=stage64 --without-mpi toolset=msvc address-model=64 variant=release link=shared threading=multi runtime-link=shared stage > build-shared-multi-release64.log

With any luck, in about 5-15 minutes, you’ll have a set of DLLs and import libraries in stage64/lib. The build generates lots of output and warnings, which is the reason for redirecting the output to a file, but you’ll want to check the beginning and end of each log to make sure it built everything you expected.

Expat 2.0.1 for 64-bit Windows

I couldn’t find any instructions for building Expat for 64-bit Windows (x64), so I updated the 32-bit projects files myself: expat-vs2008-x64.zip. See my projects page for brief usage instructions.

XMLSpy 2009 Disappointment

I’ve always thought XMLSpy was a great product. Unfortunately, today I discovered the caveat that you have to spend lots of $$$ on it to be impressed.

I just bought a copy of XMLSpy 2009 Standard ($129) after evaluating 2009 Enterprise ($999), since that’s the version that the free trial links go to. Anyway, I’m highly disappointed about the read-only grid view and read-only schema view in the Standard edition. The schema editor is pretty cool and unique, so I can understand it being Pro-level ($499), but it’s pretty lame to have the grid read-only. I work at a small company, so I couldn’t justify $370 for grid view anyway, but I probably would have stuck with free XML Notepad had I known.

Windows Update Finally Working

When I got my iPhone 6 months ago, I had to upgrade vile and hated iTunes to activate it. After the iTunes upgrade, it wanted me to restart the computer. When the system booted back up (and on every subsequent reboot), there was a crash in userinit.exe. Unable to find any trace of a surgical solution on the web, I resorted to the blunt solution: reinstall Windows (in place).

After reinstalling, the userinit.exe crash went away, but then a new problem surfaced that has plagued me constantly until today: Windows Update fails on all updates. Back when the problem first occurred, I could find no solution that mentioned the particular problem, which surfaced as error 80246002 or “AUClnt FATAL: Error: 0×80004002. wuauclt handler: failed to spawn COM server” in C:\WINDOWS\WindowsUpdate.log. At long last, thanks to this page, I found the solution, KB943144, posted October 26, 2007. The short answer:

net stop wuauserv
regsvr32 %windir%\system32\wups2.dll
net start wuauserv

myFairTunes

I’m very excited to find that it’s not difficult at all to remove iTunes DRM from songs purchased from the iTunes Music Store. myFairTunes will convert all your purchased music from M4P to M4A in place, add it back to your iTunes library, and optionally back up the M4P files to another folder and remove them from iTunes. Since my primary music computer has trouble syncing my iPhone, it’s very helpful to be able to move the music to another computer that doesn’t have as much sync trouble.

myFairTunes on SourceForge

Congress needs to hold Cheney accountable

From MoveOn.org:

Did you see the news? President Bush let Scooter Libby, the one man who was convicted for the lies around the Iraq war, go free. Paris Hilton served more jail time than he will.

And the obstruction of justice doesn’t stop there. The Senate recently subpoenaed documents from the Vice President’s office around the illegal wiretapping program and so far he has not complied. It’s clear this administration thinks it’s above the law. That’s un-American, and I think it’s time for Congress to hold them accountable.

I just signed a petition urging Congress to force Vice President Cheney to respond to its subpoenas. If he doesn’t, Congress has to begin impeachment proceedings against him. Can you join me by clicking the link below?

Petition: Stop Executive Overreach

Thanks!

P.S. If you’re on Facebook, join the group “I am outraged over Bush’s pardon of Lewis “Scooter” Libby!”.

My Visited Countries