Browser tab management

I’m one of those people that uses the browser as a todo list – there are multiple 100s of tabs open across my browsers and several computers.  These are extensions and settings that I’ve found invaluable.

Vertical Tabs

Tab Thumbnail View

These aren’t exactly tab-related, but they allow for mostly seamless hopping between browsers and between computers.

  • Password Sync for both Firefox 4 and Chrome: LastPass extension
  • Bookmark Sync for both Firefox 4 and Chrome: Xmarks extension

Free faxing with eFax and Box.net

Every couple of months I have to send a fax.  Here’s the solution I’ve been using to send faxes free, reliably, and without ads.

  • Open a Box.net account
  • Upload your Word document or PDF
  • Click the drop-down next to your document, choose More Actions -> Add Applications
  • Add the eFax application
  • Send with eFax will now appear in your list of actions.  Choose that option, type in a phone number, and you’re done!

Save mucho taxes in 2011 with the right taxable entity

Very few of my friends and former co-workers (especially those doing contract work) are taking advantage of the tax benefits available to them. This is a quick primer aimed to inspire these people to get their ducks in a row for 2011.

Requirement:

  • Have income from contract work, from a business, or have a hobby that you can quickly turn into a business by having a profit motive.

Potential Tax Benefits:

  • Deduct business-use expenses either partially or fully (e.g. computers, office supplies, business travel, meals, education)
  • Make massive contributions to a tax-deferred retirement plan: $16,500 + 20% of net income or salary (post-tax options available too)
  • Passive income can be paid to you as a distribution which is not subject to Medicare and Social Security taxes (15.3%)

Get Started Checklist:

  • Apply for an EIN online (Only required for an LLC or Corporation)
  • Apply online with your Secretary of State for a business license (Only for a LLC or Corporation) ($150 first year, $80 thereafter in WA)
  • Open a separate bank account for business use – use your EIN if you have one and use your LLC/Corp name if you have one
  • Open a separate credit card account for business use – use your LLC/Corp name if you have one
  • Open a Solo 401K account if you want to contribute to a retirement plan (I recommend Fidelity)
  • Keep at least two records for every business purchase – e.g. save the receipt + save your credit card statement
  • If the business purpose of an item is not obvious, write a short explanation on the receipt
  • Keep a strict separation between your personal accounts and business accounts (co-mingling = potential disqualification)
  • Keep all records for 7 years in case of an audit

There’s a confusing distinction between the legal entity type and the taxable entity type. For example, an LLC can elect to be taxed as a Sole Proprietor (default) or an S-Corp.

Legal Entity Type Sole Proprietor LLC LLC S-Corp
Taxable Entity Type Sole Proprietor Sole Proprietor S-Corp S-Corp
Paperwork and fees very little medium medium medium-high
Limited liability no yes yes yes
Can pay Distribution no no yes yes
Tax form 1040 Sched. C 1040 Sched. C 1120-S 1120-S

It’s probably a good idea to start as a Sole Proprietor unless you have significant passive income or would benefit from limited liability (e.g. you have an employee or hire contractors and they do an activity that can cause damage).

I’ve been in every category above over the years with StepMania, In The Groove, Pump It Up, and ChartPT.  The form-filing is generally worth the return on time-invested for me.

Rules for optimal web site performance

I’ve been working to improve the performance a large site at Amazon.  Steve Souders has written two excellent books that explain browser/http best practices.  A few of the rules were new to me and very helpful (flushing/mod_deflate settings, different browser techniques to defer Javascript).  The important take-away is that only a small fraction of typical page load time is bottlenecked by the server generation of a page.

High Performance Web Sites
(companion site)

  1. Make Fewer HTTP Requests
  2. Use a Content Delivery Network
  3. Add an Expires Header
  4. Gzip Components
  5. Put Stylesheets at the Top
  6. Put Scripts at the Bottom
  7. Avoid CSS Expressions
  8. Make JavaScript and CSS External
  9. Reduce DNS Lookups
  10. Minify JavaScript
  11. Avoid Redirects
  12. Remove Duplicate Scripts
  13. Configure ETags
  14. Make AJAX Cacheable
Even Faster Web Sites
(companion site)

  1. Understanding Ajax Performance
  2. Creating Responsive Web Applications
  3. Splitting the Initial Payload
  4. Loading Scripts Without Blocking
  5. Coupling Asynchronous Scripts
  6. Positioning Inline Scripts
  7. Writing Efficient JavaScript
  8. Scaling with Comet
  9. Going Beyond Gzipping
  10. Optimizing Images
  11. Sharding Dominant Domains
  12. Flushing the Document Early
  13. Using Iframes Sparingly
  14. Simplifying CSS Selectors

My first round of optimizations just went into production and our metric that measures “time from click until critical feature shows up in the browser” dropped from 5.25s to 3.5s. It’s neat to multiply the savings and see that many weeks of end-user browser load time are saved each day.

Free year of EC2 hosting on AWS

I put together my own co-located server for ChartPT, and I’ve been regretting it more and more each time AWS releases new features and drops prices.  They just announced a new Free tier today.

  • 750 hours of Amazon EC2 Linux Micro Instance usage (613 MB of memory and 32-bit and 64-bit platform support) – enough hours to run continuously each month*
  • 750 hours of an Elastic Load Balancer plus 15 GB data processing*
  • 10 GB of Amazon Elastic Block Storage, plus 1 million I/Os, 1 GB of snapshot storage, 10,000 snapshot Get Requests and 1,000 snapshot Put Requests*
  • 5 GB of Amazon S3 storage, 20,000 Get Requests, and 2,000 Put Requests*
  • 30 GB per of internet data transfer (15 GB of data transfer “in” and 15 GB of data transfer “out” across all services except Amazon CloudFront)*
  • 25 Amazon SimpleDB Machine Hours and 1 GB of Storage**
  • 100,000 Requests of Amazon Simple Queue Service**
  • 100,000 Requests, 100,000 HTTP notifications and 1,000 email notifications for Amazon Simple Notification Service**

I use S3 and CloudFront as an edge cache for StepMania.com.  I’m waiting just a little longer for the transfer costs to drop so that I can move all of the file downloads to S3 (my current S3 bill would be ~$500/mo according to the AWS calculator).

in Web | 195 Words

Took a job at Amazon – What’s good, what’s not

After being rejected by Facebook (despite nailing every interview – at least I thought), I accepted a job at Amazon.  Today marks my 2 week anniversary, and here are some quick pros/cons about Amazon with some Microsoft/Google experiences thrown in for comparison.

+ The average age at Amazon is much younger than at Microsoft.

+ Amazon’s apps and services are much less brittle, much more fun to work with, and release 30x more frequently than most products at Microsoft.

+ Amazon has awesome office spaces in Downtown Seattle, which I prefer to the Redmond campus or the Google buildings in Freemont and Kirkland.

+/- Amazon pays better than Microsoft but not as well as Google (see GlassDoor).

+ There are many opportunities for travel at Amazon (on-site Kaizens with operational groups).

– Frugality is a company core principle (which is good), but it’s taken too far when it comes to monitors and assigned computers.

– Amazon has insignificant perks ($100 retail site discount) compared to many perks at Microsoft (company store, discount cards, free beverages, subsidized cafes, 100% health, gym).

What I care about most is opportunity for personal growth, and there’s plenty at Amazon.  Management has proven that they can expand into new areas even better than Google, and Amazon is still in the early stages of exposing its many platforms and service verticals to the public through AWS, WebStore, FBA, and similar programs.

in Jobs | 230 Words

Tools for creating MacOS installer .dmgs

StepMania installer .dmg

StepMania installer .dmgI spent some time updating the StepMania MacOS installer. There are many features that you probably will want in an installer dmg:

  1. an “Applications” link or alias
  2. a custom background image
  3. custom placement of icons
  4. .dmg compression
  5. a way to script building of an installer dmg

Here’s how you’ll want to achieve the above in your installer build script

  • Create a temporary directory and copy into it all files you’ll want in your final .dmg (typically a .app or 1 directory, and maybe a documentation file)
  • Create a symbolic link (ln -s /Applications $your_temp_dir) or manually make an alias to /Applications and then copy the alias to your temp directory.
  • Use the yoursway create dmg script and pass in your temp directory, background image, icon locations, and it will spit out a compressed dmg.  Something like: create-dmg –window-size 500 300 –background background.png –icon-size 96 –volname “StepMania4” –icon “Applications” 380 205 –icon “StepMania” 110 205 StepMania.dmg ../$temp.dir.  Their script is based on the Adium installer applescript + wrapper.

You can see exactly how StepMania does it by checking out our scripts: https://svn.stepmania.com/svn/branches/4.0/stepmania/PBProject

Useful, free tools for .Net app memory profiling

In the process of trying to slim down ChartPT‘s memory usage, I settled on these free tools:

VMMaphttp://technet.microsoft.com/en-us/sysinternals/dd535533.aspx

Skip the many tutorials out there for the command line “vadump.exe” and use VMMap instead. The GUI presents information in a much more useful format (filterable, sortable).

First, check the list of loaded modules – some are explicit References in your project, others are dependencies of your references – and eliminate dependencies that you can do without.  Next, check the “Private” and “Private Working Set” columns to identify areas that you may have some control over.

CLR 2.0 Profiler – http://www.microsoft.com/downloads/details.aspx?familyid=a362781c-3870-43be-8926-862b40aa0cd0&displaylang=en

Be sure to grab the “2.0” flavor of the profiler.  Many tutorials are old and link to the CLR 1 version of the .Net Profiler – that version won’t work with your app that builds against .Net 2.0 or newer.

Use this app to take a snapshot of your memory usage, then view allocations by object type and view allocations in a call graph.

Tutorial: http://msdn.microsoft.com/en-us/library/ff650691.aspx

My biggest culprit: WCF

System.ServiceModel and System.Web grab 5.5MB of private memory (14+MB of private WS on my machine) as soon as I instantiate a client proxy object.  The same things happens using built-in HTTP bindings in a skeleton console app or in the WCF test client.  The System.Web allocation could probably be eliminated by changing to TcpTransport.

Intel RAID5: pretty much worthless

I have a co-located server with a 3-disk RAID5 array (Intel ICH8 controller).  Things seemed fine when I was setting up the server – pull a disk drive, re-insert, volume rebuilds, everything keeps working.

What I didn’t test though is how degraded the performance is while rebuilding.  A disk array that was getting 100MB/s reads during normal operation is now getting < 1MB/s reads while rebuilding, and my database application can’t complete requests at that speed.  To add insult to injury, the completely idle server with all disks healthy takes over 100 hours to rebuild a 2TB volume (~5.8MB/s).

Googling reveals dozens of similar horror stories with Intel RAID5 rebuilding.  Do yourself a favor and rule out Intel’s RAID5 if you care about usable uptime.

Edit: I’ve changed to a 2-disk software RAID1 and am getting 80MB/s read during rebuilds.