Monday, December 9, 2013

Map sizes

I often grab pieces of maps from Bing and Google maps and use them to create specific maps (for example, plotting the locations of all Microsoft buildings). Today I was curious to see what would happen if you grabbed the entirety of Bing's maps and printed them out, so I did the math.

Bing maps' maximum available resolution is 10 CM per pixel, so if your screen is at a resolution of 1920x1080 pixel (minus the Bing toolbar and IE's toolbar), you can see an area of approximately 192 by 83 meters (576by 249 feet).

If you were to grab a picture of the entire US at that resolution, your resulting image file would be approximately 50,000,000 by 19,330,000 pixel. Using the common "megapixel" scheme of representing picture sizes, we're talking about approximately 966.5 Gigapixels! Naturally, no single computer would have enough memory to handle such a file, but if you could, and If you saved such a thing as a JPG with a medium compression level, the resulting file' size would be at least 40270833 MB (which are 40 TB). If you were to go and print this file at the standard high-quality print resolution (300 DPI), you would find yourself with a print that's 4234 by 1636 meters (2.6 by 1 miles).

Google maps, by the way, has about half that resolution, so the same output would be about a quarter - 241 GP image, 10 TB file, 1.3 by 0.5 mile print)

And finally, if you're interested in generating a JPG image from the maps, here is a guide to doing that. If that's not enough, here is a list of several other tools.

Tuesday, November 5, 2013

Turn up the fire

The Kindle Fire 7” tablet is one of the cheapest tablets out there. With the newer 8” version dubbed “Kindle Fire HD” out and about, you can score the previous model for less than $80. Despite the small size, when held by the hands (say, while lying in bed), it provides a screen-size equivalent to that of a 50” TV, which means it’s an excellent way to watch your favorite shows.

If, like me, you have a home network with your favorite shows and movies stored on a central computer, you might be interested in streaming the shows from it to the kindle. With the Kindle being an Android device, it’s not designed for this, but with a little bit of work, it can be done.

The first step is to gain access to your Windows Network, so you can view the files on the file server over the network. For this, a simple and free application exists – ES File Explorer, which you can find and install from the Kindle app store. Once installed click on Local on the top-left, and change to LAN. Define your shared folder and you’re ready for the next step.

Next, you need a movie player that would be capable of playing as many possible formats. A good tool for this is RockPlayer. The challenge with RockPlayer is that it’s not a free application, and it’s also not available on the Kindle App Store, so it requires “side loading”.

Side-loading is not difficult, and even though it might sound like it, it’s not jailbreaking or hacking. To Side-load the app you need to do the following:

1.      On the Kindle, go to settings

2.      Go to Devices

3.      Change the option Allow installation of applications to On

4.      Go to the Rockplayer website and to the download page

5.      Touch and hold on the download link to download the file to the kindle

6.      Using ES File Explorer you got earlier on, navigate to the download folder

7.      Touch the app to install it

Now, to play a movie, use ES File Explorer to navigate the network to where the file is, and touch the file to open it. The Kindle might ask you which app to use to open it, so simply select RockPlayer, and the file should start playing.

When RockPlayer is opened like that (by association), it will work straight away without any nags. If, however, you open it from your app menu, it will display a purchase window and ask you to buy it. You can do so and pay with PayPal, and the cost is just $10, which is really low for something as useful and reliable. Please consider paying it to support the application developer!
And lest I forget...the kindle fire is great, but an even better solution for this sort of thing is the Microsoft Surface RT tablet series. With Windows built into them, you can connect to your network and watch movies without any apps, side-loading or configuration. It's definitely a better, albeit expensive solution.


Tuesday, October 22, 2013

Knife squeegee

When chopping stuff for cooking, a particular nag is when stuff clings to your knife, esp. stuff like herbs. Most of us just wipe it with our fingers, but that’s not only dirty, but also dangerous (passing your fingers so close to the blade). Here’s a method for creating a knife-squeegee that can help.


1. Start with a piece of plastic. Polycarbonate looks best, but others are fine too. A small piece that’s about 8”x6” costs just a few dollars at Lowe’s or home depot, and would suffice for dozens of these.

2. Get a plastic cutting knife. These would also be available at Home depot, closely to where the plastic sheets are, and should be a few dollars. The plastic knives are weird, but don’t try this with a regular snap-knife. That’s hard and risky.

3. You’re going to need to cut the plastic into a strip that’s about ½” wide, and about 3-4” long. To know the exact length, measure the width of the blade at the widest point (typically, close to the hilt), double it, and add 1/2”. A typical 6” chef’s knife would be about 1.5” wide, so you’ll need a plastic strip that’s about 0.5 x 3.5”.

4. To cut the plastic, hold it flat on the table, and using a metal ruler, cut it by pulling the knife towards you. You’d need to repeat the cut about 10-15 times to score the plastic deep enough to allow it to break smoothly.


5. Once scored, place the plastic on the edge of a table, and apply pressure to break it along the score line.


6. Heat the plastic in the middle, so you can bend it. You can do this easily with a soldering iron (hold the iron close to the plastic, but don’t touch it, as it would stick to the iron). Another way is to place two ceramic tiles on a heat source like a stove, with a small gap between them. Then, place the plastic across. The heat will go between the ceramics and heat the plastic in the middle. Depending on how strong the heat source, the plastic should be bendy enough within less than a minute of heating. Don’t heat for too long, as it could cause it to “boil” (ugly bubbles appearing around the heated area).


7. Bend the plastic around the blade, but not too tightly. Ideally, you should have a bit of space at the top.


8. Remove the plastic quickly, and “close” it with your fingers, so that when it solidifies, it will be closed. That will allow it to cling to the blade.


9. Slide the new plastic on to the blade, and keep it there during chopping. When you need to clean the blade, simple slide the squeegee forward, and back.

Monday, October 7, 2013


While most software is available for download these days, some stuff still requires media. Most notably in that category is Clip art. For example, the 500,000 clip art explosion collection by Nova takes up no less than 20 GB of data, and that’s not feasible for downloading.

Even with physical media, we are still talking about 3 hefty DVDs, which means that every time you want to open a file from the collection, you have to insert the appropriate DVD. This is a hassle, to say the least, and if you don’t have a physical drive (my laptop doesn’t), that’s darn right impossible. If Nova’s software was decent, you could simply copy the content of the discs to your local hard drive and point the catalog tool to it, but that’s no possible either.

However, there IS a way around this, thanks to Windows’s ability to mount ISO images as virtual drives. The idea is to take the content of the DVDs, and convert it into an ISO file, and then mount it as a DVD. An ISO file is a special file structure that packs the content of a CD, DVD or Blue-ray disk into a single file, and as I said, Windows can natively “mount” such a file to behave and look just like you had a physical drive with the original disk in it.

To convert the DVDs into ISO files, you need a special tool, and unfortunately, this doesn’t come with Windows. My favorite tool is CDIMAGE, which is free and doesn’t come with any crapware or heavy installers. However, it does require some above-average understanding of files, folder and the CMD command prompt, so less technical users might prefer a tool like WINISO or WINIMAGE, which can do this with a visual interface. Once you have converted the content of the 4 DVDs into ISO files, you can just mount them as drives (one at a time, or all at once, up to you) and start using the software. Here are some more important things to know, though:

1. Disk 1 is just the catalog, and once you install it, you can discard the ISO to free up 3 GB of space.

2. You can’t install the software over the network, so make sure you use the DVD (no.1) or an ISO for that

3. The image catalog browser looks for the disks based on volume label, so when creating the ISOs, make sure you specify them as part of the process. The labels are “AE DVD 1”, “AE DVD 2” etc.

4. The DVDs have file names with special characters, so make sure you configure the imaging software to take this into account. For example, if you’re using CDIMAGE that I mentioned above, use the following format:

CDIMAGE –n –d –m –o –c -l”AE DVD1” D:\ c:\ClipArt1.iso


Occasionally, this might fail as well, for some really weird Unicode chars. An alternative that might help is:

CDIMAGE -m –o –j1 -l”AE DVD1” D:\ c:\ClipArt1.iso

Tuesday, September 24, 2013

Pickle Tickle

There’s no shortage of info and articles about pickling on the lovely internet. Why am I bothering to write one too? Well, all too often, I see a common misconception, where people make pickling seem a lot harder than it should. Perhaps it’s just that some people are misinformed and haven’t bothered experimenting and exploring, and perhaps it’s some desire to make it more “professional” than it truly is. The reality is that pickling stuff can be really easy and quick. You can have a nice jar of pickled cucumbers with just 10 minutes of work, and 4 days of waiting (not 3 months or a year, as some would lead you to think).
What pickles a cucumber or other things involves is the combination of the various chemicals, temperature and time. The “what” is available in every supermarket, and the time factor is, as I said above, only a matter of days. What you need for a pickling session is:
1. Coffee Kettle (to boil water)
2. Pickling Jars (available at any supermarket, often in a pack of 9 or 12)
3. Knife, to cut things down to size.
Ingredients for pickling cucumbers:
1. Cucumbers
2. Water
3. Salt
4. Vinegar
5. Hot peppers
6. Mustard Seeds
7. Black Pepper (dry whole peppercorns)
8. Garlic
9. Dill
You can’t really put a 12” cucumber in a jar, so it’s best to seek out small cucumbers. These are rarely available at stores, but can usually be found in Farmer’s markets during the summer. Typically, these are very cheap – around 2$ a pound. Another type of cucumbers that are suitable for pickling are sometimes available at QFC and Costco. These average about 6” in length, so 5-6 of them fit nicely inside a standard 1 Qt pickling jar. It’s also possible to cut regular large cucumbers to slices or strips and pickle those.
The hot peppers and Garlic are optional – they are mostly for taste, and if you don’t like this particular taste or prefer another, that’s perfectly fine. Some people like to add lemon wedges to the jar, and others like other spice combinations. Depending on your preferred spiciness level, you might like to use Serrano or Jalapeno peppers (like me), or something stronger like Habanero or even Ghost peppers.
Mustard seeds should also be available in any supermarket, usually in a little can or jar that would last for many pickling sessions. The Dill needs to be fresh, and that’s often sold in bunches that would be enough to 3 or more jars. Some people say you need to use the flowering dill bunches, but that’s not true, and any regular dill would do. The vinegar is important, but it can radically affect the taste. If you use White vinegar, that’s OK if you don’t put too much in…but I recommend a milder type like Rice vinegar. A typical $3 pack of dill suffices for 4-5 jars.
The process:
1. Put a teaspoon of mustard seeds in the jar.
2. Put a teaspoon of peppercorns in the jar.
3. Put the cucumbers in the jars, and try to pack them as much as you can*, leaving about ½ inch at the top for the dill.
4. Optionally, add garlic cloves, hot peppers, lemon etc. I recommend slicing whatever you add to enhance the flavor.
5. Boil water in a kettle – you’ll need at least a cup per every jar you’re pickling.
6. Add salt to water (1 teaspoon per cup of water) and stir well.
7. Pour into pickling jar slowly until everything is covered. If you pour it too fast, the glass might crack. You might also consider warming the jars ahead of time with warm tap water to reduce the risk of this happening.
8. Fold a bunch of Dill and place on top of the covered cucumbers.
9. Close the jar tightly
10. Let stand for 4 days inside the house, in a place that doesn’t get cold.
11. Open and taste. If the cucumbers are ready (to your taste and opinion), put the jar in the fridge to stop the pickling process.
12. After a day in the fridge, you can move the jars to a cabinet or some other storage place, where they should be fine for many months (in theory, even years).
I personally feel the pickles are enjoyable even after 3 days, but an extra day makes them a tad better. Heat facilitates the pickling process, which is why we use boiling water. On the other hand, cold stop it, so make sure the jars are stored indoors. If you are in a hot area, you can also place them outside in the sun – this makes the pickling go even faster…as fast as a single day!
* Packing the cucumbers is not mandatory, but if you don’t, you’ll need a lot more water to fill up the jar.

Tuesday, September 10, 2013

Are you sleeping?

When running a server with a large number of sites and using our new Dynamic Worker-Process Page-Out, an administrator might need to figure out what’s going on with the sites for tracking and resource optimization reasons. The simplest way to know of a site going into hibernation is by visiting the event viewer. When IIS puts a site to sleep, it logs an event ID no. 2310, which looks like this:


By querying the event log (with powershell, for example), you can produce a report that lists which sites are getting suspended often. Another type of information you might need is knowing how many of your sites are actually suspended throughout the day. This info can be achieved by examining the Private Working Set Size, which indicates how much memory a process is using. A site that is suspended will typically consume 2-6 MB, while an active site would consume at least 8 MB.

By using WMI to examine the memory usage of all the sites, you can create a data file with this information, which you can later import into something like Excel. Here’s a script for such a thing:

const iForWriting = 2
const iForAppend = 8
iHibernating = 8000000 'Hibernation threshhold
sReportFileName = "SiteReport.csv"
Set oFileObj = CreateObject("Scripting.FileSystemObject")
Set fSaveFile = oFileObj.OpenTextFile(sReportFileName,iForWriting,true)
fSaveFile.Writeline "Date,Time,Active,Hibernating"
set oProcessList = GetObject("winmgmts:{impersonationLevel=impersonate}\\.\root\cimv2").ExecQuery ("Select * From Win32_PerfRawData_PerfProc_Process")
iHibernatingCount = 0
iActiveCount = 0
for each pProcess in oProcessList
if instr(,"w3wp")<> 0 then
if clng(pProcess.WorkingSetPrivate) < iHibernating then
iHibernatingCount = iHibernatingCount +1
iActiveCount = iActiveCount +1
end if
end if
sResult = date & "," & time & "," & iActiveCount & "," & iHibernatingCount
wscript.echo sResult
Set fSaveFile = oFileObj.OpenTextFile(sReportFileName,iForAppend,true)
fSaveFile.Writeline sResult
wscript.sleep 60000

This script runs in a loop, checking and counting how many sites are suspended and how many aren’t, and dumping the result into a CSV file every minute. After this runs for a certain amount of time (ideally, at least 24 hours), you could double-click the CSV file to open it in Excel, and use the graph functions to produce a graph, like this:


Based on these figures, you can establish your performance data for peak and off-peak hours, and plan your expansion and hardware budgeting properly.

Good luck!

Blog post written by Erez Benari and Ahmed ElSayed

Monday, September 9, 2013

Hacking doors

A few weeks ago, my 2.5 year old son learned to open doors by twisting the doorknob. Joyous day? Not so much. We still had plenty of places in the house we didn’t want him going into. Naturally, we went to Lowers and got some of the plastic doorknob proofing add-ons, like this:


These are pretty simple – they are composed of two parts, which snap together around the doorknob. This rotates freely, so the kid cannot open the door by twisting it, and to actually twist the knob, you need to insert your fingers through the side-holes and apply pressure. A child doesn’t have large enough hands for this, so that worked pretty well…for a few days.

Indeed, it only took a few days for my junior hacker to figure out that by tugging on this, he was able to unclasp the plastic latches that keep this thing together, and as a result, it comes apart, revealing the knob and allowing him to open the door. What to do?

Lucky for me, I was able to figure out a way to outsmart the smartypants. The latches that hold this thing closed are small, but large enough so I could put a small screw through them, keeping the thing “locked”. I used a small drill-bit to drill through (to make sure the screw doesn’t crack the plastic) and put in very small screws, right there:


Since then, no more break-ins…or break-outs!

Saturday, August 10, 2013

Things to do in Seattle

Things to do in Seattle

There are probably hundreds of articles and lists of what to do in Seattle, but I’ve yet to find one that’s complete. When my friend Micky asked for a list due to a family visit, myself and other friends helped him build the following list. Here it is…hopefully for posterity. Current update: Aug 2019.

Note 1: Blogger is lousy at formatting tables, so I suggest copy-pasting the whole page into Excel or Word to view the details.

Note 2: When a location is listed that is not in Seattle, the acronym STS means “South to Seattle”. I’m sure you can guess what NTS, ETS and WTS means…

Cost Per Person
Electric indoor Kart racing
Redmond (ETS)
No drivers license required
Hot air balloon ride
Carnation (ETS)

The Seattle Great Wheel
Long lines
Indoor Skydiving
Renton (STS)
250 LB weight limit
Wild waves theme and water park
Federal Way (STS)
$20 after 4pm.
Kayak and Canoe on Lake Union
$14-22 Per hour

Kayak and Canoe on Lake Sammamish
Issaquah (ETS)
$15-30 per hour

River Rafting
Some age restrictions
Duck tours of Seattle
Dress well, cold wind on the water segment.
Pacific Science Center museum
IMAX theatre on premise at extra cost
Seattle Center
Various events, fairs and promenade
Space Needle
Huge souvenir shop
Skycity restaurant
Your 1st born
At top of space needle
Underground Tour

Washington Fairgrounds
Puyallup (STS)
Various events, fairs and conventions
Washington state fair
Puyallup (STS)
Every September. Rides cost extra.
Boeing museum of flight
South Seattle
Very large museum. Many full planes on display, inc. SR-71, Space shuttle body.
Boeing future of flight+factory tour
Everett (NTS)
Some restrictions on tour for children
museum of glass
Tacoma (STS)

Lemay car museum
Tacoma (STS)
Significant walking distance inside
Seattle aquarium
On the old seattle port, nice promenade
Seattle art museum
Cheap parking. Park there, walk around downtown.
cougar mountain zoo
Issaquah (ETS)

MOPOP (Music + Sci-Fi museum)

Music, Science fiction and other cultural exhibitions. AKA “EMP” museum.
Woodland Zoo

Reptile zoo
Monroe (NTS)

Helicopter ride/flight lessons
South Seattle
20, 30 or 40 minute tours
Fry’s electronics store
Renton (STS)
Geek’s dream
Microsoft visitor center and store
Redmond (ETS)
No software or hardware sold to the public, but plenty of Microsoft branded items like shirts, bags, office toys.
Wade’s gun store and indoor range
Redmond (ETS)
Renting a gun for the range requires a buddy to come-with, or bring your own gun.
Snow-play in Hyak park
Snoqualmie Pass (ETS)
Winter time only
Liquor and Wine
Bellevue (ETS)
Huge store for drinking fans. Frequent wine tastings.
651 N 34th St, Seattle
Can’t get in without an employee escort
1730 Minor Ave, Seattle
Can’t get in without an employee escort
410 Terry Ave N, Seattle
1200 12th Avenue, Seattle
Can’t get in without an employee escort
Amazon Biodome
2111 7th Avenue; Seattle,
Can’t get in without an employee escort
Bruce Lee’s grave
1554 15th Ave E, Seattle

Leavenworth Bavarian town
Leavenworth (NTS)
Lots to do, especially around Christmas
Canada and
Lots to do. Takes ~4 hours to get there.
Lots to do. Takes ~4 hours to get there.
Las Vegas
Lots to do. 2.5 hours by plane.
Los Angeles
Lots to do. 2.5 hours by plane.
San Francisco
Lots to do. 2.5 hours by plane.
San Diego
Lots to do. 2.5 hours by plane.
Golden Gardens Park and beach

Alki Beach

Lake Sammamish
Issaquah (ETS)
Free, but requires discovery pass
Gasworks Park

Argosy Cruises

Mt. Rainier

Mt St. Helens

Hiram M. Chittenden Locks (a.k.a. Ballard Locks)

Olympic Park
Olympic Peninsula (WTS)
$15 per vehicle
Snow almost year round. Might be dangerous in Winter.
Ye Olde Curiosity Shop
Store that is somewhat of an oddity museum too
Family Fun Center
Renton (STS)
Many kid-oriented fun rides and activities
South Center Mall
Renton (STS)
Large mall, and with the adjacent strip-mall area, its HUGE.
Pike Place
Check out the Wall of GUM! Parking is difficult and expensive.
Deception Pass park
Oak Harbor (STS)
Free, but requires discovery pass
Camlann Medieval village
Carnation (ETS)

Olympic Game Farm
Sequim (WTS)
Buy 4-5 loafs of wheat bread at Safeway beforehand to feed the animals.
Marymoor park concerts
Redmond (ETS)
Fun park to visit even when no concert
The Gorge Amphitheatre
Quincy (ETS)
High profile shows, but 3 hours drive east
St. Michelle Winery
Woodinville (NTS)
Store and concert venue
The Triple Door
Restaurant with shows
Seattle Theatre Group
Multiple theatres and venues
Various shows
Evergreen State Fair
Monroe (NTS)
Fair every August. Admission doesn’t include rides
Evergreen fairgrounds
Monroe (NTS)
Various events year round
Bumbershoot Festival
$50-55 per day
Every August
DEFY (Flying Circus)
Tukwila (STS)

Willows Mini Golf
Redmond (ETS)
Call ahead to reserve time
Mini Mountain indoor ski
Bellevue (ETS)

Goodwill Seattle
1400 S Lane St, Seattle
Largest Thrift store in the state
600 5th Ave S, Seattle
Massive Asian product store
Lolli and Pops
Multiple Locations
Unique collection of fun candy and snacks
Wings over Seattle
1301 Alaskan Way, Seattle
Unique ride
VR Arcade
Redmond (ETS)