Migrating to new rlucas.net domain for most blogging

1

Gentle reader,

This server has gotten so slow,
probably thanks to Philip’s blog, that
I have finally decided to put up my own server elsewhere.  Other
reasons are:

  • I can’t use vim here to edit my entries.
  • I hate the HTML munging that this blog software uses.
  • Despite
    the PageRank boost of the .harvard.edu domain, I have decided to opt
    for the branding aspect of my long-time username, rlucas, which has
    been the local part of my Internet email address since 1993 or
    so.

And so, I am putting on hold this, my
Berkman blog.  I do intend to keep using it for Harvard-specific
things, on occasion, but my technical notes and, newly, my startup and
VC related dispatches, will be found from now on at my rlucas.net blog.

Migrating to new rlucas.net domain for most blogging …

Class::MethodMaker v2 dies with cryptic “Unknown error” in compilation with bad arguments to use / require

ø

If you use Class::MethodMaker and have a subtle error in your

use Class::MethodMaker [ whatever…];

line, such as not quoting a bareword, you can end up with this error:

Unknown error
Compilation failed in require.
BEGIN failed–compilation aborted.

If this happens, scrutinize your “use” lines and especially your C:MM line.If you use Class::MethodMaker and have a subtle error in your

use Class::MethodMaker [ whatever…];

line, such as not quoting a bareword, you can end up with this error:

Unknown error
Compilation failed in require.
BEGIN failed–compilation aborted.

If this happens, scrutinize your “use” lines and especially your C:MM line.

[FIX] Adobe Reader v.5 fails to open PDF with “There was an error opening this document. A temporary file could not be opened.”

1

If you see “There was an error opening this document.  A temporary file could not be opened.” when trying to open a PDF file, you may need to clean out C:\\Documents and Settings\\USERNAME\\Local Settings\\Temp\\Acr*.tmp

Cheers to “gprellwitz” who suggests this here:

http://www.experts-exchange.com/Web/Graphics/Adobe_Acrobat/Q_20790405.html

Jeers to the MSFT developer who decided that “Documents and Settings” with spaces and mixed caps was a better home directory prefix than “home”

[WORKAROUND] “Adobe Reader” version 7.0.5 hangs in Firefox 1.0 and 1.5, using all CPU

ø

If you run “Adobe Reader” (no longer called Acrobat Reader as of version 6) in Firefox 1.5 (or 1.0) in Windows XP, you may discover that it uses all CPU when opening a PDF doc.

Uninstall Adobe Reader from Control Panel:Add/Remove Programs, and download an old version like version 5 of Acrobat Reader here:

http://www.adobe.com/products/acrobat/readstep2_allversions.html

Thanks to Joshua Burke for suggesting the solution here:  -->

[BUG] ActiveRecord woes with SQL Server odd names (spaces and brackets), ntext data types

ø

ActiveRecord (latest versions of ODBC, DBI, and AR as of today
2005-12-01) seems to be having trouble with at least two things that
SQL Server 7 does:

1. The SQL Server adaptor (sqlserver_adaptor.rb) get_table_name sub
expects a name to have no whitespace in it.  The conditional and
regex need to be changed to look for bracketed names like [Poorly
Designed Table].  Then, the columns sub needs to know to take the
brackets off the ends of the names when it looks up the table by its
textual value.  To complicate this, according to
 http://msdn2.microsoft.com/en-us/library… you can have
either double-quotes or square brackets as your delimiters in SQL
Server names, and you can even escape brackets by doubling.  I
have written hackish code that solves for simple [Dumb Name] tables but
not the whole enchilada, so I’m not posting it here yet.

2. The data type “ntext” seems to create memory allocation problems; I get an error of:

/usr/lib/ruby/site_ruby/1.8/DBD/ODBC/ODBC.rb:220:in `fetch’: failed to allocate memory (NoMemoryError)

Running this on CYGWIN_NT-5.1 RANDALL-VAIO 1.5.19s(0.141/4/2) 20051102 13:29:13 i686 unknown unknown Cygwin on Win XP Pro.

National Strategy for Victory in Iraq — nuggets from iraq_national_strategy_20051130.pdf

1

On the off chance that nobody’s yet done it, here are some things hidden inside the PDF the White House released today:

http://www.cia.sgov.gov/cwfb/cfactbook/flags/iz-flag.html

The URL (apparently on a government intranet) of a page showing a flag in the CIA World Fact Book.  Curious.

The author and his email address, and what was apparently a working
title (“National Strategy for Supporting Iraq” — wonder how long that
lasted in front of the spin doctors).

Another tag showing the same information, but with a more recent
modification date showing that the PDF was apparently distilled just
hours before release.

National Strategy for Victory in Iraq — nuggets from iraq_national_strategy_20051130.pdf …

WORKAROUND: Excel for Mac toolbars “trapped” off the screen

ø

If you hook up an external monitor to your Mac OS X machine and run Excel 2004 for Mac on it, you might move your toolbars completely or partially over to the second desktop area. If you then remove the external monitor, it is possible for the toolbars to get “stuck” such that only a corner (like the resizing corner) is visible. You can resize them, but not move them back onto your main screen.

You can try to use “Reset” in the View:Toolbars:Customize Toolbars/Menus, but that doesn’t work. There’s some other reset-to-defaults choice somewhere that I tried (and can’t find now) that didn’t work either. Quitting and restarting does nothing.

Try going into your home directory (/Users/username) and nuking this file:

/Users/username/Library/Preferences/Microsoft/Excel\ Toolbars\ \(11\)

Upon restarting Excel, they were back to normal location. Problem solved (except for the braindead engineering).

[BUG/WORKAROUND] Microsoft Outlook 2003 / XP can’t import vCard notes field; Entourage on Mac can

ø

I am trying to sync my contact information between apps and machines. Here are my absolute, non-negotiable requirements:

(“Works
with” means I can round-trip in the given format — not necessarily
that it is native, and it’s OK if I have to use a tool or a script
intermediary since I’ll be scripting this stuff anyhow.)

1. Works with Outlook.

2. Works with Address Book on Mac.

3. Works with abook from the command line.

4. Is editable text in case I need to switch platforms, or do revision control, or any of a host of things.

I
was good with some kind of cobbled-together vCard solution, until I
discovered that MS Outlook 2003 on Windows XP could export note:
fields in .vcf files (oh, and insult to injury — there is no “Export”
option to vCard, you have to do some right-clicky nonsense or else
highlight all your contacts and “Forward as vCard”) but would not
import those same notes!

Outlook does not round trip a fully-spec’ed RFC standard?!?! What the hell?

Happily
(?) my workaround is to use MS Entourage for the Mac, which will
round-trip appropriately and sync itself with the Exchange server at my
work.  For those who cannot, perhaps there is a VBA
solution.  If you have one, please comment; I will update if I
discover how to get Outlook 2003 to accept the notes fields.

[HOWTO] Getting your profit-sharing plans rolled out of Fidelity’s non-prototype retirement accounts as qualified distributions to separate IRAs or 401ks.

12

If you are a small business with a Profit Sharing Plan / defined
benefit plan set up through an independent benefit advisor firm,
someone may have counseled you to set up your investments at
Fidelity.  They will create a “Non-prototype retirement account”
in the name of your Profit Sharing Plan trust.  You can make
trades and do what you will (although as of late they refuse to let you
buy funds that have even potentially a short term sales charge, which
really drastically limits you) and it’s all for the big pool of
money.  As a “non-prototype” plan, Fidelity washes their hands of
the actual record-keeping of who is owed what and how much is vested to
whom, etc.  That’s why you’re paying your independent benefits
advisor all those fees each year, right?

When you discover that the costs invoved are so high as to cut
seriously into your returns, you’ll want to dissolve your profit
sharing plan and distribute the assets among the beneficiaries so each
can put his funds into a low cost IRA.  Your advisor will have you
prepare corporate resolutions to that effect and tell you to distribute
the funds payable to the IRAs or 401ks of the beneficiaries, so that
they are qualified rollovers and so nobody has to withhold taxes for
the IRS.

Try telling that to Fidelity.  If your experience is like mine,
they’ll have no idea, then check on things for you.  They’ll come
back and say that they can make a check payable to the Trustees, to the
Plan, or they can do a qualified rollover to Fidelity.  They will
swear up and down that they can’t send the money to a “contra FI”
(another bank).  They’ll transfer you to “Retail Distribution,”
who will tell you that they can only pay out to the order of the
trustees, and that maybe you could have your trustees all sign the
check and then cash it at a bank, but that oh, yes, maybe, I suppose
you could get checkwriting privileges on the Fidelity account
itself.  If you are unlucky, you might try to do this.

However, if things get more and more fubared on your phone call, you
might get transferred to “Retirements Department” where someone puts
you on hold two more times to research and then discovers that yes,
those things mentioned above (only payable to the trustees or via a
Fidelity rollover) are trueish but there is one magical thing to do
otherwise, that will without any fee, cause the funds to be sent to the
new banks and the new IRAs, and that is this.

Prepare a letter containing these magical 5 elements:

1. Direction to Fidelity to make a check payable to “Contra FI FBO
Employee Name Account” (e.g., “Vanguard Funds FBO John Smith Rollover
IRA”), in an exact dollar amount, and with the address to which to send
that check.

2. Certification by the trustees that the distribution is an “eligible rollover distribution.”

3. Statement that the trustees assume all responsibility for
record-keeping for the plan assets and for reporting the distribution
to the IRS for tax purposes.

4. Statement that the trustees indemnify and hold Fidelity harmless for
any liability with respect to processing the direct rollover.

5. Original signature with a bank’s signature guarantee from EACH of
the trustees (each must take the letter to the bank and sign in their
presence).

Send this mystical incantation, the specs of which are not available to phone reps or on the web site, to:

Fidelity Investments
Attn: Distribution Services
PO BOX 770001
Cincy OH 45277-0035

To their (sort of) credit, they had previously hinted to another
trustee that they needed a “distribution letter,” but did not mention
the 5 requirements, and when I called back to ask about it, had to put
me on hold 6 times and transfer me twice to get me the magical list of
things to do.  My cell phone is now almost out of batteries after
nearly 40 minutes on the line with them.  They were certainly
polite about the whole thing but it does seem a bit disingenuous of
them to keep insisting that we roll into Fidelity IRAs and “forgetting”
about this handy exception.

Of course, if you do this, you had better be damn sure that your p’s
are crossed and your q’s are dotted with respect to telling Uncle Sam
about the whole thing since Fidelity has now washed its hands of you.

Enjoy your new, rolled-over, low-overhead IRAs and 401ks!

[WARN] MD5 sums irredeemably broken

ø

The MD5 hash function is dangerously unusable at this point.  I
was under the impression, casually following crypto over the last
couple years, that it was weak but likely “good enough” for
non-military, non-banking types of applications.  Dead wrong.

There are now known attacks — and doubtless toolchains for specific
exploits — that permit creating two completely different (but valid)
pieces of plaintext that generate the same MD5 sum.

See http://www.doxpara.com for an example of two mocked-up HTML pages,
one for “Lockheed” and one for “Boeing,” that share the same MD5 hash
sum.

See also Wikipedia’s MD5 entry (which does not NEARLY sufficiently raise the alarum on this) at  -->