Author Archive

Found a file named “Silly Verse for James Dempsey”

April 17, 2016

awash in the miasma
of async blocks on dispatch_queues
bad data flyin’ like kids from pews
(when church lets out and they go free)
and to the console logging spews
apocalyptic, no good news
mood turning into plasma

Tax Time: Retirement plan for Indies

February 21, 2016

Tax Time here in the U S of A.   This post is for self-employeed and small business owners in the USA but does not constitute tax advice – you should consult a qualified licensed/certified tax professional – but is just some information to help you ask them some leading questions and pointers to documentation on the website for educational purposes.


As I’m calculating the basis in my SEP-IRA due to some conversions of IRA to ROTH IRA, I’m reminded that I lost out on about 10 years of pre-tax retirement savings due to a bad CPA who said I wasn’t eligible to do so since it was an S-Corp.  Got a new CPA and found out the first one was wrong (or the law changed and he was wrong at first but didn’t inform me that it had changed).

I suggest you educate yourself by starting at SEP FAQs and learn enough to ask the questions I should have:-/

The great thing about a SEP-IRA, for an S-Corp anyway (not sure about LLCs or sole-proprietors), is that the business makes the contributions for the employee and these contributions are deductible business expenses.

The limits are also a LOT higher than you as an individual have.  From an FAQ sub-page linked to from the one above:

How much can I contribute to my SEP?

The contributions you make to each employee’s SEP-IRA each year cannot exceed the lesser of:

  1. 25% of compensation, or
  2. $53,000 (for 2015 and 2016 and subject to annual cost-of-living adjustments for later years).

These limits apply to contributions you make for your employees to all defined contribution plans, which includes SEPs. Compensation up to $265,000 in 2015 and 2016 and subject to cost-of-living adjustments for later years) of an employee’s compensation may be considered. If you’re self-employed, use a special calculation to determine contributions for yourself.

So if you’re making more than $72,000 a year you can start to exceed the $18,000 personal contribution limit to a SEP-IRA or 401K.

This makes it sound like you don’t have to be a Corporation (but read Publication 560 & ask your CPA):

How much can I contribute if I’m self-employed?

The same limits on contributions made to employees’ SEP-IRAs also apply to contributions if you are self-employed. However, special rules apply when figuring the maximum deductible contribution. See Publication 560 for details on determining the contribution amount.

The only real down-side that I’m aware of (again, consult your hopefully better-than-my-old-CPA CPA) is that you make this contribution for all employees who meet the criterion you set in the SEP Plan Document.  The IRS has a “model SEP plan document”, form 5305-SEP that I used and that might be enough for you.  See the details/restrictions here.

My company mostly used contractors and I set the requirement to full-time employment for 3 years which was likely to exclude all but the most dedicated and valuable employees (and which I already qualified for :)).

On the other hand, having a good retirement plan that is competitive with with a big company’s 401K plan might help you attract employees that you otherwise couldn’t, so you might want eligibility that let’s employees participate as soon as they’ve passed some introductory trial period (90 or 180 days or whatever).  Notice that the limits for the SEP-IRA are actually higher than those for a 401K plan once compensation crosses the $72,000/year threshold.  So you can actually provide a more aggressive retirement plan with a SEP-IRA plan than with that big company 401K plan (unless I’m missing something).

And the employee can also make a ROTH IRA contribution as well (subject to the usual ROTH IRA contribution limits).

A SEP-IRA is cheaper to operate than a 401K plan (which is complicated enough that you have to pay a service to operate it for you – and they aren’t cheap).  Your employees can open their own SEP-IRA account and your business simply deposits money into it.  (See the IRS site for details).

Over the 10 years I was operating with the bad CPA I could have saved a lot more for retirement than the ~$4000-$5000 ROTH IRA limit, if only I’d known….   Now you know.

Go forth and save those pre-tax dollars for retirement!

Your 50-year-old self will thank you.  :-D


This is not tax advice. All readers should consult a qualified tax professional about any tax decisions they make for themselves or their business.

Game for getting your child to dress themselves in the morning

January 6, 2016

Here’s a game we used to get Geek to get himself dressed and moving in the morning.

I’d lay his clothes out flat on the floor to make a path of clothing from his bed to the door of his room. Then tell him that the game was to see if he could make it to the door getting dressed as he went without touching the floor. When he picks up a piece of clothing he has to put it on.

The first day they were in a mostly reasonable order – one that matched the order you’d put your clothes on. When he completed that successfully I congratulated him and said that tomorrow would be more tricky (build anticipation for getting out of bed and getting dressed!😉 ).

The second day the order was such that he had to hop past some pieces and then jump back and then jump forward in order to get the underwear on under the pants, for example.

And you can increase the difficulty to get it interesting. One day I made it essentially impossible and we laughed a lot and then I asked him what two items of clothing could switch with each other to make it possible (teaching programming/algorithms/puzzle solving) and then did the one he picked so that he could get out the door.

Didn’t take long before he was in the habit of getting dressed and moving in the morning and was fun instead of a struggle.

iWork ’09 and .docx files

February 24, 2015

If you happen to rebuild a mac and put 10.9.5 on it and you install iWork ’09 from an older CD/DVD so you get iWork 9.0, you will find that you cannot open .docx files.

Going to the AppStore is fruitless – just wants to get you to update to the current versions of Pages (the rewrite) and then tells you that you have an incompatible system (requires OS X 10.10 or later).  It doesn’t offer to update you to the updates for iWork ’09 that you may have been offered back when you first installed iWork and before the new iWork apps came out.

The solution is to get the updater from Apple’s Support area (search for “iWork 09 update”).  Here’s a link to the newest we found (9.3).

Dad’s dad just recalled a prank I (apparently) did at a young age…

December 19, 2014

Funny to have Dad’s dad talk about stepping on Legos and then recall this other event which I swear I don’t remember doing, but I would have been younger than 7 when this is purported to have happened:

Then there was the Sat morning when I heard massive giggles from the hall,
went out to see and slipped on the Crisco-greased floor one (or both) of you
had so much fun creating…  :-)

It is amazing I survived you kids!

Gladdens my heart to hear I (with help & encouragement from my nearest sister I’m sure) was keeping him on is toes* at such a young age…  :-P

Geek was so much more well behaved than I, sadly.  I have no recollection of him playing such pranks (though the empty milk carton put back into the fridge was pretty funny).

*or perhaps “off his toes” would be more accurate…

Fix for spinning Pizza in Finder (10.9.5): remove dropbox contextual menus

November 7, 2014

Got  really tired for seeing the SPOD (Spinning Pizza of Death) in the Finder while trying to navigate in the folder hierarchy.  Happens off and on every 30 seconds or so.  Finally tracked it down to something dumb that Dropbox’s contextual menu code is doing (version 2.10.41).

It’s a bit of a pain to remove but here’s what you need to know:


is where the nasty is.  Contents:


The “###” is the user id number of the current OS X user (probably 501, 502, etc).

You need to move the “DropboxHelperInstaller” out of this folder or it’ll just keep re-installing the other stuff. I didn’t track down which of the two bundles are causing the problem, but it’s one of the “FinderLoadBundle”, or “DropboxBundle.bundle”. I removed both of these and the “mach_inject_bundle_stub.bundle” and that seems to solve the problem (after you quit Dropbox and relaunch the Finder).

Unfortunately Dropbox really wants to repair itself so it will keep prompting you every time it launches to put these back:

Screen Shot 2014-11-07 at 7.44.40 PM

Just select “Cancel” and it won’t be able to put these buggy files back.  Everything except the Finder integration seems to work fine and the Finder doesn’t keep dying inside dropbox contextual menu code for some indeterminate (but too long) amount of time.  I’ve told them on Twitter but they haven’t fixed this yet:-/

UPDATE:  As of Dropbox v2.10.52, and only when running on OS X 10.10.1, there’s a checkbox for “Enable Finder Integration” that might turn this stuff off more easily.  I haven’t tried it yet, but I’m hopeful.

Objective C Builder Pattern play

April 12, 2014

So I read two posts on the Builder Pattern from Java today that got linked to off of Twitter.

This by Klaas Pieter which referenced this one by Uli Kusterer.  Both good articles.

I haven’t done Java much at all for the last 10 years and so am not used to this pattern, but I thought about how I might do something similar and while I’m not sure my first thought is any better, it seems to meet the requirements and/or benefits noted by the two blog posts in question and the tweet discussion referencing them.

Instead of:

 Pizza pizza = new Pizza.Builder()

(from Uli’s post), or

  Image* theImage =
    (new Image.Builder)->SetWidth(100)

(from Klaas’ post)

I tried something like:

Foo * aFoo = [Foo fooWithData: @{
     @"width" : @21, @"height" : @22 }];

Here’s one way to implement that – there are multiple, clearly
(pardon the formatting, trying to fit into our narrow blog them is annoying):

// .h file
#import <Foundation/Foundation.h>

@interface Foo : NSObject

+ (instancetype) fooWithData: (NSDictionary*) initParams;


// .m file
@interface Foo ()
@property (nonatomic, assign) long width;
@property (nonatomic, assign) long height;
@property (nonatomic, assign) long depth;

@implementation Foo

+ (instancetype) fooWithData: (NSDictionary*) initParams
  Foo *result = [[Foo alloc] init];

  // If one uses setValue:forKey: in a loop as
  // as Uli notes then we can't support integral
  // properties like ints.
  // Also doing it explicitly as below
  // means we don't have to have the same name
  // for our private internal properties as we
  // document for our public parameters because
  // we can map them here.
  // e.g.,
  //  result.imageWidth = [initParams[@"width"] longValue];

  if ( initParams[@"width"] != nil )
    result.width = [initParams[@"width"] longValue];

  if ( initParams[@"height"] != nil )
    result.height = [initParams[@"height"] longValue];

  if ( initParams[@"depth"] != nil )
    result.depth = [initParams[@"depth"] longValue];

  return result;

- (instancetype) init
  self = [super init];
  if ( self )
    // init with defaults
    _width = 10;
    _height = 10;
    _depth = 1;
  return self;

- (NSString*) description
  return [NSString stringWithFormat:
           @"Foo: (%p), width: %ld, height: %ld, depth: %ld",
           self, self.width, self.height, self.depth];

// main.m
#import <Foundation/Foundation.h>

int main(int argc, char *argv[]) {
  @autoreleasepool {
      // note no depth specified, taking default of 1
    Foo * aFoo =
      [Foo fooWithData: @{ @"width" : @21, @"height" : @22 }];
    NSLog(@"aFoo: %@", aFoo );

Paste the above into CodeRunner and run it and you get:

2014-04-12 16:22:38.918 Untitled 7[71144:707]
aFoo: Foo: (0x7f8842c0af00), width: 21, height: 22, depth: 1

In the above I only typed in the class method as taking the full parameter list but normally I would have made the init method take the same parameter and do the initialization & mapping there. Something I’d likely add if I was going to actually use this, which I’m not likely to. Why not? Because to use the construct above you’d have to document the parameter keys available to use in the dictionary and what type of value each takes. This is where ObjectiveC’s named parameters comes in handy: they are self documenting.

Anyway, an interesting procrastination from what I was supposed to be doing this Saturday afternoon…🙂

I think Craig is right on track with his wearables & Apple

March 13, 2014

I think Craig Hockenberry @chockenberry is right on track with his Wearing Apple post.

I’ve been thinking and talking about a “personal secure network” among a collection of devices you are wearing or carrying for a while now and it seems like a no-brainer to me.  Seems totally silly to put all the battery, radios, antennas, storage and whatnot in a single device (google glass for example).

You need less battery in what I call the ‘motes’ if the LTE/WiFi radios and antennas are in the ‘core’ (“hub” in Craig’s post). What are ‘motes’ ? Think rings, earrings, necklace, bracelet, phone in pocket, flexible battery in belt, piezo generator in shoes, motion generator in umbrella/walking stick, bluetooth earpiece, display in glasses and/or contacts, high performance computing cube in our backpack, and sure, even a watch🙂

What’s the problem with this vision? Lots really🙂  Charging all these devices will be a pain.  Clearly you need something like a flat pad you set ‘motes’ on while you sleep and they charge inductively.  Better yet would be if they had small energy harvester chips with fractal antennas that harvested ambient energy (microwaves, cellular signals, AM, FM, etc) to extend their battery life.  Oh, yah, better batteries would be a big win and this may not get cool until that happens.

Want to get even more “out there?” Check this out:  Sugar-powered biobattery has 10 times the energy storage of lithium.  Pretty cool but one of the implications of this might be devices that could be powered from our body’s internal processes directly.  So to charge your devices you just eat more.  Be a boon for obesity.  Need to lose weight? Play more flappy birds!  :-P

This then lets us surgically implant devices so you don’t have to worry about forgetting it at home.  You may think I’m being silly, but the convenience will win people over.  Also, note the long-time existence and surgical implantation of pacemakers & defibrillators.  Then look at how common tattoos and body piercing are in youth today (in parts of the USA anyway).  We are not that far from this.

Ok Geek’s hungry so leaving it at this quick “jot this down” for now.

Brother® stops & refuses to print. Annoying! So I hack their TN-360 toner cartridges to get all the toner in them.

March 2, 2014

I purchased a Brother® MFC-7840w multifunction laser printer some years ago and I have to say that it’s one of the better modern printers I’ve owned.  Mac OS X software for it isn’t great (buggy), but it’s better than most of the others I’ve tried and the printer performs quite well.  I’ve been recommending them to anyone who’s asked me (and I get asked quite a bit).

After finishing the small starter toner cartridge they supply with the printer I put in my first TN-360 “High Yield” toner cartridge which claims 3500 pages under “normal use”.  I use this printer under what I’d consider normal conditions – mostly simple text documents.

Worked well but all of a sudden it just stopped printing with a message about the toner needed to be replaced.  “That’s odd,” I thought to myself.  “I’ve owned a lot of laser printers over the last 22+/- years and they’ve always started gradually printing more and more faintly when the toner was running out and I’ve never had a printer just refuse to print until I changed the toner cartridge before! Seems pretty heavy handed.  Then I calculated the number of pages it had printed (2120) and had an uncomfortable thought: “If they just stop and refuse to print and the printouts were looking just fine right up until that point, how do I know it’s really out of toner?”

I didn’t get my money’s worth and the forced toner replacement was feeling heavy handed and annoying.  So I wondered, “how do they decide to put up that alert anyway?”  Pulled the toner cartridge out and started examining it looking for electrical contacts (sensors inside?) or some other mechanism.  I found this:


Note the arrow.  It’s pointing to a clear plastic “window” on the right side of the toner cartridge when you’re looking at the top from the front where the handle is.  It appeared like it might give the printer an optical view into the insides of the toner cartridge. “Ah HA!” I thought.  Small piece of Gorilla tape (sticks much better than electrical tape) later and I had this:


Put it back in and time for a test…

Printer prints PERFECTLY… We are being ripped off by Brother and that really sucks.

This fixed worked for another 1001 perfect printouts and then it stopped again…

“DANG IT! The printouts were still looking *fine*!”

Take the toner out to put in the replacement and notice something on the side when you’re looking at the bottom:


There’s Another Sensor Window!  (With Gorilla tape on it in this image).  Here’s a close-up:


This piece of tape added and, sure enough, working FINE again… ARG FARG SNARG – BROTHER!  I want to like you but this is robbery!  AND it’s bad for the environment which makes it even more offensive.  Rarely do I want to call for a class action lawsuit, but this situation was definitely making me feel that way…

How many perfectly fine beautiful printouts did I get after blocking the second window?  I can’t tell you yet because it’s still going strong 200 sheets later.  :-/

So, if you want to get the full life out of your Brother TN-360 High Yield printer cartridge you may want to pick up a roll of Gorilla Tape and prepare to “fix” the cartridge.  Be careful to make sure the tape is stuck on there will because a loose piece of tape being drawn through your printer will probably do bad things to it (Follow these instructions at your own risk!).

Please add a comment if you try this with a different printer model and it works for that one also; likewise for other Brother toner cartridges. Thanks!


Note: All trademarks noted are the property of their respective trademark owners.

Simple BBEdit Text Filter that’s been useful:

February 18, 2014

Dad’s been working with some JSON output from a web service lately and it comes back lacking line-feeds and indentation which is great for transmission but hard to read for humans.  Dad’s not a python programmer and Geek’s busy writing a Humanities 110 paper, but the simple python script (below) seems to work if you put it into

~/Library/Application Support/BBEdit/Text Filters/

It can be used to beautify the front window in BBEdit if that contains JSON:

#!/usr/bin/env python
import fileinput
import json
if __name__ == "__main__":
  jsonStr = ''
  for a_line in fileinput.input():
    jsonStr = jsonStr + ' ' + a_line.strip()
  jsonObj = json.loads(jsonStr)
  print json.dumps(jsonObj, sort_keys=True, indent=2)

Because Bare Bones Software is so cool this works with their free Text Wrangler editor as well except you just put the files in

~/Library/Application Support/TextWrangler/Text Filters/

instead, as one would expect.

This gives you a new item in the “Text” -> “Apply Text Filter” sub-menu named whatever you named the file ( in my case).  Open a messy JSON file, select “Text” -> “Apply Text Filter” -> “” and watch your file contents magically become beautiful! Thanks BBEdit!