Skip to content

A Couple Calculators

I wrote a couple JavaScript calculators quite a while ago, but never got to linking them from anywhere, thus nobody can possibly find them. Warning: nothing fancy beyond this point.

First up is a relative screen size calculator which will let you compare the screen area of 16:9 and 4:3 aspect ratio (widescreen vs. standard) screens to see what the equivalents are. I wrote this when I was replacing my 14” iBook – since the MacBook and MacBook Pro are both 16:9’s, I wanted to know how the screen areas compared. If you plug in 14” into this calculator and hit the button it’ll tell you that you need at least a 14.8” widescreen to break even. I wasn’t in the mood for a smaller screen, so MacBook Pro it was. Today I see Staples has a 32” LCD TV for $499. Is that bigger than my 27” 4:3 CRT? Yes – it’s as big as a 30” 4:3 CRT. Etc.

Next is an SSH Multi-hop Forwarding Calculator. This one lets you figure out a command line that can be used to do port forwarding over ssh when there are multiple hosts to traverse. For instance, you’re at home on your cable modem, and you want to ssh through your server, to a client’s bastion host, then into their webserver, and you want to port forward port 8080 on that webserver to your local machine. The command-line length can be daunting, and you better get all the flags right. Sorry, there should be a help file here, but there isn’t. If you’re sufficiently determined it shouldn’t be terribly hard to figure out.

Have fun – I hope somebody finds them useful!