firebus's picture

ABSI Calculator

Overview

BMI has been used as a measure of health for quite some time, but the data doesn't support a strong correlation between BMI and mortality. The problem is that BMI doesn't distinguish between fat and muscle, or between good and bad distribution of fat.

Recently, waist circumference has been proposed as a more-accurate metric, but this measurement also has it's limitations. Since WC and BMI are highly correlated, so there may be a limit to how much extra information can be derived from WC.

firebus's picture

The Subdivision

Riding on Division, in transit from SOMA to the Mission, sucks. Too many cars, and dirty, messed up traffic patterns as offset grids collide. You can avoid it by heading a block south to Alameda and then wiggling around to 15th st.

Riding on 17th St, in transit from Potrero to the Mission, doesn't suck. But there's a couple of hilly blocks that you can avoid by heading 3 blocks north to Alameda, and then wiggling around to 15th St.

On the way back from the Mission to either Potrero or SOMA, you can take 14th St, and head through the Best Buy parking lot and wiggle back to Alameda St.


firebus's picture

Fun with integers


php > print 1100690227200 / 1099511627776;
1.0010719299316

php > print 1100690227200 % 1099511627776;
PHP Warning: Division by zero in php shell code on line 1

?


php > print PHP_INT_MAX;
2147483647

php > print gettype(1100690227200);
double

!

There is no integer division operator in PHP.

Operands of modulus are converted to integers (by stripping the decimal part) before processing.

*facepalm*


firebus's picture

Level 5

After seeing Abraham Lincoln Vampire Slayer last night, I coincidentally found this quote in Good to Great:

Level 5 leaders are a study in duality: modest and willful, humble and fearless. To quickly grasp this concept, think of United States President Abraham Lincoln (one of the few Level 5 presidents in United States history), who never let his ego get in the way of his primary ambition for the larger cause of an enduring great nation.


firebus's picture

Prebeaten Basketball

In bowling, you can pre-beat your opponent. If you're leading by more than 30 pins in the 9th frame, there's no way you can lose in the 10th, etc.

Watching my one NBA game of the year tonight, I realized that the same is true for basketball.

Assuming perfect play by the losing team, and passive play by the leading team (letting the shot clock run out), the losers can only close the gap by 3 points every 24 seconds.


firebus's picture

Bootie Top Ten Scraper

https://gist.github.com/2828075

Every month (or so) Bootie releases a top ten compilation of decent recent mashups.

The comp consists of a list of links to mp3s, or a zip of the whole set.

Each link is to the original artist's file - so there are no naming conventions, and tags are all over the place. I've been thinking about writing a script to automate the download and tagging process for awhile.


firebus's picture

ISO Exercise Calculator

Oy! It took me forever (literally a week, and probably 4 different tries) to get the algebra right on this.

Let's say you have Incentive Stock Options.

When you buy stock through the ISO plan (exercise the options), you have to pay some money to the company. You will also probably owe some Alternative Minimum Tax, proportional to the difference between the strike price and the market price when you exercise the option.


firebus's picture

Still thinking about ESPP

Are you bored yet? Probably :) I'm not!

The internet is generally of the opinion that you should sell your ESPP stock as soon as possible, paying the penalty (in extra tax) of a disqualifying distribution.

The calculators I've made so far only show a pretty nice benefit for holding the stock. So why sell as soon as you can?

  1. The increased risk that comes from holding the stock for a longer period of time. The increased profit from holding is a small part of the total profit, so a small swing in stock price or a market downturn can wipe that out

firebus's picture

Graphing ESPP calculator

Overview

  • This one plots the net profit of qualifying vs. disqualifying distributions over a range of sale prices.
  • This graph does not consider the annualized return, which is much higher for an immediate disqualifying distribution (you sell right after you buy) than for the corresponding qualifying distribution, assuming you have to hold for 18 months.
  • This graph also omits any treatment of the probability of a given sale price given the market price.
firebus's picture

423-Qualified ESPP Tax Calculator

Overview

  • An ESPP is a benefit plan that allows employees to purchase stock from their company at below market price. Usually income from your paycheck is withheld for a certain period of time (say, 6 months) and then used to buy stock at the end of the period.
  • Your tax rate for the transaction depends on how long you hold the stock before selling it.
  • To get favorable tax treatment, you have to hold the stock for 2 years after the grant of the ESPP (the start of the withholding period) and 1 year after the stock is
Syndicate content

Powered by Drupal - Design by Artinet - Amazon Affiliate