rest page 5 - Dave's Blog

Search
My timeline on Mastodon

Coding Horror: You're Reading The World's Most Dangerous Programming Blog

2010 Jan 20, 8:28GZip vs Deflate execution speeds. Deflate found to be much faster in particular cases and about the same in the rest.PermalinkCommentsgzip deflate performance technical http compression programming development blog

Cheap Multiplayer Tricks for New Super Mario Bros. Wii

2010 Jan 5, 1:47

The New Super Mario Bros. Wii is a great game. Its the fun of old school Mario with the addition of great graphics and the kind of multiplayer I've wanted for Mario since playing the original as a child: its got up to four player simultaneous cooperative multiplayer. I recommend it to anyone who has enjoyed Mario in the past. Watch this amazing video of level 1-3 you can unlock in the game.

As noted elsewhere, multiple players attempting to navigate platforms, grab power ups, and throw turtle shells creates new challenges but along with that there's new ways to be incredibly cheap.

Jumping Higher
A second player means a head one can jump on to reach higher locations. Jump on your friend's head at the apex of their jump while holding down the jump button yourself for maximum jumping. In the game you can also grab other players and hold them over your head. This is useful for reaching the top of the flagpole at the end of levels. On that same line, if the player you grab has a flying cap you can now use them to fly in the same manner you would use a flying block which makes it easy to get two players to the top of the finish flagpole if only one of you has a flying cap.
Power-Ups
Normal power-up blocks now spawn enough power-ups for everyone. A mushroom is spawned for each small player and full power-ups for the rest, except in the case everyone is small: then one of the power-ups is a full power-up. If there's two players and you're both small, the full power-up always jumps out of the block to the right. Some hidden power-up blocks only give out one power-up and in that case its a mushroom or not based on the player who hits the block - so be sure that a big player hits that if you have one.
Death & Bubbles
When a player dies but at least one other player lives the dead player comes back in a limbo bubble from which they must be released before they may play again. Because of this, in a tough spot you can send one player in and leave a second behind. If the first dies you don't lose your place in the level and the first comes back in a bubble ready to try again. For instance, if you're trying to get the last star coin in 2-1 which sits just above the abyss, one player can just jump to their death for it and as long as another player lives you've collected the coin. However you need not sacrifice your life to do this: you can press down and 'a' to force yourself into a bubble saving yourself from death. This is true in general as long as you have enough time to see your death coming. This is also useful if one player runs ahead to the right. The screen will expand a bit but then it will just move to the right following the player in the lead. Players left behind walls or now forced into lava pits will die unless they use the bubble.
Misc.
  • If all players hit the ground at the same time from a ground pound it acts like hitting a pow block, killing the enemies on the screen.
  • If you hold a player who has a projectile power over your head they can still use their power.
  • Bubbles can be popped by hitting them with your fire or ice projectiles as well as thrown shells or blocks.
  • All players get the extra lives from anyone collecting 100 coins or finishing a level with more than 7 enemies on the screen.
PermalinkCommentsmultiplayer mario wii

Make: Online : Hack the box to get to the phone

2009 Dec 31, 4:40"Nokia has been struggling a bit this year, but this "hack it" to get your phone unboxing is pretty interesting. Once you "root" the box it opens up and a little puff of smoke appears, along with your phone (if you're a phone / gadget reviewer)." Makes me wonder how many devs and engineers they had working on the box to contain this phone.PermalinkCommentsphone video cellphone hack

Grocery Shopper Data Use

2009 Oct 13, 11:15

Photo of Hostess Pride chicken display from the Library of VirginaQFC, the grocery store closest to me, has those irritating shoppers cards. They try to motivate me to use it with discounts, but that just makes me want to use a card, I don't care whose card and I don't care if the data is accurate. They should let me have my data or make it useful to me so that I actually care.

I can imagine several useful tools based on this: automatic grocery lists, recipes using the food you purchased, cheaper alternatives to your purchases, other things you might like based on what you purchased, or integration with dieting websites or software. At any rate, right now all I care about is getting the discount from using a card, but if they made the data available to me then the grocery store could align our interests and I'd want to ensure the data's accuracy.

PermalinkCommentsidea boring data grocery store

Code - Open Blog - NYTimes.com

2009 Oct 6, 9:43Articles on various APIs and other experiments from the NY Times. Some interesting things in here...PermalinkCommentsblog todo nytimes api programming mashup journalism technical

the ragbag - arial & helvetica on friday, i hosted a screening...

2009 Sep 27, 2:28Poster demonstrating example differences between Arial and Helvetica. Love the end line: "my buddies [said] ... “a documentary about a font is as interesting as it sounds.” i could not agree more."PermalinkCommentsvisualization font design helvetica typography arial poster

RFC 959 - File Transfer Protocol

2009 Sep 9, 5:35The FTP spec's section 3.5 'ERROR RECOVERY AND RESTART' describes how to resume an FTP download.PermalinkCommentsietf reference ftp rfc resume download internet technical

YouTube - AtYourLibraryOrg's Channel - Cory Doctorow Interview

2009 Aug 24, 9:56AtYourLibraryOrg interviews Cory Doctorow on library and librarian related Cory Doctorow topics, then breaks up his answers into short videos. Easy to watch and interesting.
PermalinkCommentsvideo cory-doctorow library information drm literature business economics

Creating Accelerators for Other People's Web Services

2009 Aug 18, 4:19

Before we shipped IE8 there were no Accelerators, so we had some fun making our own for our favorite web services. I've got a small set of tips for creating Accelerators for other people's web services. I was planning on writing this up as an IE blog post, but Jon wrote a post covering a similar area so rather than write a full and coherent blog post I'll just list a few points:

PermalinkCommentstechnical accelerator ie8 ie

DSC04581 on Flickr - Photo Sharing!

2009 Aug 13, 9:46An awesome health care protest sign. I've made a huge mistake.
PermalinkCommentshumor photo obama politics television arrested-development sign protest

Choose Your Own Adventure – Most Likely You’ll Die | FlowingData

2009 Aug 11, 5:21"Michael Niggel took a look at Journey Under the Sea, and mapped out all possible paths. It turns out that death and unfavorable endings are in fact much more likely than the rest."PermalinkCommentsvisualization via:ethan_t_hein literature fiction if interactive flowchart infographics chooseyourownadventure

Cambridge Cop Accidentally Arrests Henry Louis Gates Again During White House Meeting | The Onion - America's Finest News Source

2009 Aug 4, 7:19"Witnesses said that Sgt. Crowley, failing to recognize Gates on their flight to Logan Airport, arrested the tenured professor in midair, once again at the baggage claim, and twice during their shared cab ride back to Cambridge"PermalinkCommentshumor onion politics

Eat Pants - Interactive Fiction Sessions from my Server Logs

2009 Jun 29, 4:19

I've looked at my web server logs previously to see if anyone had used my Web Frotz Interpreter and until recently didn't realize that awstats (the web server log report generator) was truncating the query from my URL, so I couldn't tell that anyone was actually using it. But after grepping the logs manually I've pulled out the URLs of visitor's text adventure sessions. If you'll recall, my Web Frotz Interpreter stores the game state in the URL so its easy to see user's game states in the web server logs.

I've put some of the links up on the Web Frotz Interpreter page. Some of the interesting ones:

PermalinkCommentsserver-logs technical zork frotz pants interactive-fiction uri if

PowerShell Scanning Script

2009 Jun 27, 3:42

I've hooked up the printer/scanner to the Media Center PC since I leave that on all the time anyway so we can have a networked printer. I wanted to hook up the scanner in a somewhat similar fashion but I didn't want to install HP's software (other than the drivers of course). So I've written my own script for scanning in PowerShell that does the following:

  1. Scans using the Windows Image Acquisition APIs via COM
  2. Runs OCR on the image using Microsoft Office Document Imaging via COM (which may already be on your PC if you have Office installed)
  3. Converts the image to JPEG using .NET Image APIs
  4. Stores the OCR text into the EXIF comment field using .NET Image APIs (which means Windows Search can index the image by the text in the image)
  5. Moves the image to the public share

Here's the actual code from my scan.ps1 file:

param([Switch] $ShowProgress, [switch] $OpenCompletedResult)

$filePathTemplate = "C:\users\public\pictures\scanned\scan {0} {1}.{2}";
$time = get-date -uformat "%Y-%m-%d";

[void]([reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll"))

$deviceManager = new-object -ComObject WIA.DeviceManager
$device = $deviceManager.DeviceInfos.Item(1).Connect();

foreach ($item in $device.Items) {
        $fileIdx = 0;
        while (test-path ($filePathTemplate -f $time,$fileIdx,"*")) {
                [void](++$fileIdx);
        }

        if ($ShowProgress) { "Scanning..." }

        $image = $item.Transfer();
        $fileName = ($filePathTemplate -f $time,$fileIdx,$image.FileExtension);
        $image.SaveFile($fileName);
        clear-variable image

        if ($ShowProgress) { "Running OCR..." }

        $modiDocument = new-object -comobject modi.document;
        $modiDocument.Create($fileName);
        $modiDocument.OCR();
        if ($modiDocument.Images.Count -gt 0) {
                $ocrText = $modiDocument.Images.Item(0).Layout.Text.ToString().Trim();
                $modiDocument.Close();
                clear-variable modiDocument

                if (!($ocrText.Equals(""))) {
                        $fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $fileName
                        if (!($fileName.EndsWith(".jpg") -or $fileName.EndsWith(".jpeg"))) {
                                if ($ShowProgress) { "Converting to JPEG..." }

                                $newFileName = ($filePathTemplate -f $time,$fileIdx,"jpg");
                                $fileAsImage.Save($newFileName, [System.Drawing.Imaging.ImageFormat]::Jpeg);
                                $fileAsImage.Dispose();
                                del $fileName;

                                $fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $newFileName 
                                $fileName = $newFileName
                        }

                        if ($ShowProgress) { "Saving OCR Text..." }

                        $property = $fileAsImage.PropertyItems[0];
                        $property.Id = 40092;
                        $property.Type = 1;
                        $property.Value = [system.text.encoding]::Unicode.GetBytes($ocrText);
                        $property.Len = $property.Value.Count;
                        $fileAsImage.SetPropertyItem($property);
                        $fileAsImage.Save(($fileName + ".new"));
                        $fileAsImage.Dispose();
                        del $fileName;
                        ren ($fileName + ".new") $fileName
                }
        }
        else {
                $modiDocument.Close();
                clear-variable modiDocument
        }

        if ($ShowProgress) { "Done." }

        if ($OpenCompletedResult) {
                . $fileName;
        }
        else {
                $result = dir $fileName;
                $result | add-member -membertype noteproperty -name OCRText -value $ocrText
                $result
        }
}

I ran into a few issues:

PermalinkCommentstechnical scanner ocr .net modi powershell office wia

Mostly Moved Into New House

2009 Jun 19, 8:07

New House ExteriorThe weekend before the previous, Sarah and I moved our belongings into the new house and spent a lot of time packing and unpacking, and now we're officially living there (interested Facebook friends can find my new address or just ask me). The Saturday of the previous weekend Sarah's family came over for a half house warming and half Sarah's birthday celebration which was fun and served to force us to do more unpacking and forced me to take trips to Home Depot, Bed Bath and Beyond, etc. On Sunday, Sarah and I went out to her favorite restaurant and she opened her gifts that I had to hide to keep her from opening before her birthday. Happy Birthday Sarah!

While at Home Depot I had trouble finding what I was actually looking for, but I did find everything I needed to terminate the Cat5e cables that are wired in the house. Each room has a wall plate with two RJ45 sockets, both sockets wired to Cat5e cable. One of the cables per plate was already hooked up to a standard phone service punchdown board and the other cables per plate were all hanging unterminated next to the punchdown board. So now I've terminated them all with RJ45 connectors and hooked them up to my hub, wireless router, cable modem, etc. I had the same sort of fun setting all that up as I did playing with model train sets as a child. Hopefully no therapy will be required to figure out why that is.

PermalinkCommentspersonal2 train address sarah house new-house birthday

E309: the 7 things you need to know about Microsoft's press conference - Offworld

2009 Jun 1, 3:26Some unbelievable stuff in this video for future Xbox features. And I write 'unbelievable' as in, I find it difficult to believe the 3d motion sensing 'you are the controller' stuff would work as well as it does in the demo video. The rest of the described features seem practical and sound neat.PermalinkCommentsblog microsoft video videogames xbox e3

A Brief History of Microsoft's Live Search's New Domain Bing

2009 Jun 1, 11:07
Logo for bing! from 2003 via The Wayback MachineLogo for BING* from 2006 via The Wayback MachineKimberly Saia's flickr photo of the Microsoft bing search logo.
When I heard that Live Search is now Bing one of my initial thoughts was how'd they get that domain name given the unavailability of pronouncable four letter .COM domain names. Well, the names been used in the past. Here now, via the Wayback Machine is a brief, somewhat speculative, and ultimately anticlimactic history of bing.com:

The new name reminds me of the show Friends. Also, I hope they get a new favicon - I don't enjoy the stretched 'b' nor its color scheme.

PermalinkCommentsmicrosoft technical domain history search archive dns bing

Using BitTorrent to Retrieve Objects Stored in Amazon S3

2009 May 29, 12:12"Any object in Amazon S3 that can be read anonymously can also be downloaded via BitTorrent. ... Retrieving a .torrent file for any publicly available object is easy. Simply add a "?torrent" query string parameter at the end of the REST GET request for the object." Yes, this is awesome!PermalinkCommentstorrent amazon s3 bittorrent p2p via:pskomoroch

Wallace and Gromit: A Matter of Loaf and Death | 2009 Seattle International Film Festival | Nick Park | United Kingdom - Films

2009 May 25, 10:19"Wallace and Gromit return-this time as purveyors of the Top Bun bakery, despite the fact that 12 other local bakers have disappeared in the previous year. Now it's up to Gromit to solve the mystery while Wallace woos new love interest Piella Bakewell."PermalinkCommentshumor movie wallace-and-gromit animation claymation for:hellosarah

What San Francisco/Silicon Valley can learn from the Twittering company: Zappos - Scobleizer: bleeding edge technology talk

2009 May 13, 11:21Lots of interesting notes on the company culture of Zappos. "Yesterday I was lucky enough to visit Zappos and get a tour and talk with some of their executives, including Tony Hsieh, CEO."PermalinkCommentstwitter marketing business culture zappos shoes ecommerce
Older EntriesNewer Entries Creative Commons License Some rights reserved.