index page 3 - Dave's Blog

Search
My timeline on Mastodon

Dr. Horrible Link Roundup

2008 Aug 10, 3:33

Doctor Horrible's Sing Along Blog is an Internet only show you may have already watched and heard everything about. If you missed this somehow, its a musical by Joss Whedon (Buffy the Vampire Slayer, Firefly) staring Neil Patrick Harris as an aspiring super villian who can't get up the courage to talk to his laundromat crush. Its very funny, fairly geeky, and on the Internet so of course I've enjoyed it thoroughly and have some links to share. It surprised me how many blogs that I don't usually see posting the same things telling me about it: first on Eric's blog, then The Old New Thing, and even Penny-Arcade.

Dr. Horrible's again available online via Hulu with commercial interruption.

Check out the official fan site. They link to such things as the owner of Dr. Horrible's house. He had appeared on Monster House, a reality show about remaking people's homes like Monster Car or Pimp My Ride is about remaking folk's cars, and had his house turned into a evil scientist's lab. Consequently its a perfect fit for Dr. Horrible and in return the owner appears in one of the final scenes and in the credits as the 'Purple Pimp'. Apparently the purple suit is his. Also on his blog you can find out what's happened on that big chair that appears in the show. All I'll say about that is, good thing Neil Patrick Harris wears a lab coat while sitting on it.

At the recent Comic Con some attendees took video of the Dr. Horrible Comic Con panel (video clips contain spoilers) some of which I've grouped together. Besides the videos containing the creators and stars of the musical who are all hilarious (see Felicia Day's comment on twittering) there's also some excellent bits about a possible second installment and information on the impending DVD. To finish off this series of Dr. Horrible links check out this Venn Diagram of Felicia Day's work.

PermalinkCommentsdr. horrible doctor horrible humor link roundup

Finished First Three Zelda Games

2008 Jul 17, 4:45
Screen shot from Legend of ZeldaScreen shot from Zelda II: The Adventures of LinkScreen shot from Legend of Zelda: A Link to the Past

I want to once again profess my love for the Wii's Virtual Console. Sarah and I recently finished playing through the first three Zelda games. Although I'd played a bit of the first two I never had a Nintendo as a kid and so unlike Sarah this was my first time completely playing through Zelda I & II. What people say about Zelda II is true... its all so true. And on the flip side I have fond memories of beating the third Zelda game which Sarah hadn't played.

In hilarious Zelda related news, a friend from work's husband posted the following blog post concerning their son named Link.

PermalinkCommentszelda link video-games nontechnical wii

Visiting College Friends and Vice Versa

2008 Apr 27, 4:51

Jesse, Nicole and Pat in his carLast weekend after Saul and Ciera's wedding, I drove up to Pat, Grib, and Jesse's house to which I hadn't previously been. I got in late and they'd just finished a UFC party. The next day Grib had to travel for work but the rest of us met Scott and Nicole, Jesse's girlfriend at a place for breakfast. After that we went back to their place for some Rock Band which I hadn't played previously and Pat took the opportunity to show off his real life musical skills on the banjo.

Pat plays the banjoThis weekend, Jesse and Nicole are up visiting Seattle. On Friday, Sarah and I met up with them at the BluWater Bistro in Seattle which sits right on Lake Union. The view was nice although difficult to see from our table and overall I like the sister restaurant in Kirkland better. They were both short visits but it was fun to see people again.

PermalinkCommentsfriends college california nontechnical

Warm Weekend

2008 Apr 14, 10:22

Cafe Pirouette ExteriorIt was warm and lovely out this past Saturday and Sarah I and went to a new place for lunch, then to Kelsey Creek Park, and then out for Jane's birthday. We ate at Cafe Pirouette which serves crepes and is done up with French decorations reminding me of my parent's house. We got in for just the end of lunch and saw the second to last customers, a gaggle of older ladies leaving. I felt a little out of place with my "Longhorn [heart] RSS" t-shirt on. The food was good and in larger portions that I expected.

Kelsey Creek FarmAfter that we went to Kelsey Creek Park and Farm. The park is hidden at the end of a quiet neighborhood, starts out with some tables and children's jungle gym equipment, then there's a farm which includes a petting zoo, followed by many little trails going off into the forrest. There weren't too many animals out and the ones we did see didn't seem to expect or want the sun and warm weather. We followed one of the trails for a bit and turned back before getting sun burned. You can see my weekend photos mapped out on Live Maps.

That night we went out with some friends for Jane's birthday. Eric was just back from the RSA conference and we met Jane and Eric and others at Palace Kitchen in Seattle located immediately adjascent to the monorail's route. The weather was still good so they left the large windows open through twilight and every so often you'd see the monorail pass by.

PermalinkCommentswashington bellevue weekend nontechnical

Encoding methods in C#

2008 Apr 12, 10:38

For Encode-O-Matic, my encoding tool written in C#, I had to figure out the appropriate DllImport declarations to use IDN Win32 functions which was a pain. To spare others that pain here's the two files CharacterSetEncoding.cs and NationalLanguageSupportUtilities.cs that declare the DllImports for IdnToUnicode, IdnToAscii, NormalizeString, MultiByteToWideChar, and WideCharToMultiByte.

PermalinkCommentsencodeomatic boring csharp widechartomultibyte idn tool dllimport

Zeno's Progress Bar - Stolen Thoughts

2008 Apr 7, 10:09

Text-less progress bar dialog. Licensed under Creative Commons by Ian HamptonMore of my thoughts have been stolen: In my previous job the customer wanted a progress bar displayed while information was copied off of proprietary hardware, during which the software didn't get any indication of progress until the copy was finished. I joked (mostly) that we could display a progress bar that continuously slows down and never quite reaches the end until we know we're done getting info from the hardware. The amount of progress would be a function of time where as time approaches infinity, progress approaches a value of at most 100 percent.

This is similar to Zeno's Paradox which says you can't cross a room because to do so first you must cross half the room, then you must cross half the remaining distance, then half the remaining again, and so on which means you must take an infinite number of steps. There's also an old joke inspired by Zeno's Paradox. The joke is the prototypical engineering vs sciences joke and is moderately humorous, but I think the fact that Wolfram has an interactive applet demonstrating the joke is funnier than the joke itself.

I recently found Lou Franco's blog post "Using Zeno's Paradox For Progress Bars" which covers the same concept as Zeno's Progress Bar but with real code. Apparently Lou wasn't making a joke and actually used this progress bar in an application. A progress bar that doesn't accurately represent progress seems dishonest. In cases like the Vista Defrag where the software can't make a reasonable guess about how long a process will take the software shouldn't display a progress bar.

Similarly a paper by Chris Harrison "Rethinking the Progress Bar" suggests that if a progress bar speeds up towards the end the user will perceive the operation as taking less time. The paper is interesting, but as in the previous case, I'd rather have progress accurately represented even if it means the user doesn't perceive the operation as being as fast.

Update: I should be clearer about Lou's post. He was actually making a practical and implementable suggestion as to how to handle the case of displaying progress when you have some idea of how long it will take but no indications of progress, whereas my suggestion is impractical and more of a joke concerning displaying progress with no indication of progress nor a general idea of how long it will take.

PermalinkCommentszenos paradox technical stolen-thoughts boring progress zeno software math

URI Addressable Text Adventure Games

2008 Mar 2, 9:18

This post is about creating a server side z-code interpreter that represents game progress in the URI. Try it with the game Lost Pig.

I enjoy working on URIs and have the mug to prove it. Along those lines I've combined thoughts on URIs with interactive fiction. I have a limited amount of experience with Inform which generates Z-Code so I'll focus on pieces written in that. Of course we can already have URIs identifying the Z-Code files themselves, but I want URIs to identify my place in a piece of interactive fiction. The proper way to do this would be to give Z-Code its own mimetype and associate with that mimetype the format of a fragment that would contain the save state of user's interactive fiction session. A user would install a browser plugin that would generate URIs containing the appropriate fragment while you play the IF piece and be able to load URIs identifying Z-Code files and load the save state that appears in the fragment.

But all of that would be a lot of work, so I made a server side version that approximates this. On the Web Frotz Interpreter page, enter the URI of a Z-Code file to start a game. Enter your commands into the input text box at the bottom and you get a new URI after every command. For example, here's the beginning of Zork. I'm running a slightly modified version of the Unix version of Frotz. Baf's Guide to the IF Archive has lists of IF games to try out.

There are two issues with this thought, the first being the security issues with running arbitrary z-code and the second is the practical URI length limit of about 2K in IE. From the Z-Code standard and the Frotz source it looks like 'save' and 'restore' are the only commands that could do anything interesting outside of the Z-Code virtual machine. As for the length-limit on URIs I'm not sure that much can be done about that. I'm using a base64 encoded copy of the compressed input stream in the URI now. Switching to the actual save state might be smaller after enough user input.

PermalinkCommentszork frotz interactive-fiction zcode if technical uri fragment

Vegas and New Year

2008 Jan 2, 8:57

Normal Sized Slot MachineTwo and half weeks ago Sarah and I went to Las Vegas where I got to see Jesse, Pat, Chris, and (briefly because he's some kind of big shot too busy for his friends now etc) Grib from college. They're mostly in San Jose and I hadn't seen them for a while so it was a lot of fun to hang out. We all stayed at the MGM which is a nice hotel with some good restaurants. In other Vegas related links, Sarah added Sarah's Las Vegas restaurant reviews to her reviews and Jesse has Jesse's Vegas photos up too.

Vegas DinnerSarah and I saw the Blue Man Group (video from a concert) and the Price is Right Live Show. The Blue Man Group was very cool although the music was all rock with a heavy drum focus (not depicted in the videos I linked) which I got a little tired of. But despite that I really enjoyed the show, very funny and I totally recommend it. The Price is Right Live Show is like the regular show on TV except the recording is not televised and its not hosted by Bob Barker or Drew Carey. So folks from the audience are still called up to play the same games and really win prizes. It was advertised as hosted by Todd Newton, B-list game show host, but was instead hosted by JD Roberto who hosted such things as "Reality Remix" and the show "Are You Hot? The Search for America's Sexiest People". The showcase showdown included the 2008 version of my car and thankfully I wasn't picked to compete for that because, well I don't know where they bought the car, but I would have gotten the price very wrong. We sat right next to the stage for that show and had a good time.

MGM Grand in Las VegasFor New Years Eve Sarah and I stayed in and watched the glitched Seattle Space Needle fireworks show from a safe distance. On New Years we went to a pot-luck at Todd's house and had a fun time. Todd's place is on the top of a hill and has a lovely view of Washington's snow-capped mountains.

PermalinkCommentsnewyear vegas lasvegas personal bluemangroup

Theme Options

2007 Dec 24, 12:41These days it seems like there's a social sharing website for everything representable as bits. Like Scribd for (mostly legal) documents, SciVee for scientific research videos, Wordie for words, and Kuler for color themes. Kuler seems like a ridiculous website (overkill) but I had been meaning to update my homepage's color design and Kuler has an RSS based REST API. The API lets you obtain things like the most recently added color themes or the most popular or all themes containing the color dark red, etc... So of course rather than update my website's design I hooked up my css to the color themes coming out of Kuler. Select my main page's color theme from a list of random Kuler themes. As I'm sure the regular readers can guess I use an xslt and blah blah blah... It looks OK with Silver Surfer and Happy Hipo but in general changing the colors this way doesn't produce something pretty.

When reading about Kuler I found that they may have stolen the whole idea wholeslae from ColourLovers. They discuss the thievery in an article on their blog. I would have switched over to ColourLovers out of principle but they don't have an easily accessible API.PermalinkCommentscolourlovers color xslt theme homepage technical kuler design

Angie and Kane Went Away

2007 Nov 19, 12:35Angie and Kane Go Away PartyTwo weekends ago I went down to California for Angie and Kane's going away party. It was fun despite going to a country western club. It was a very large place with plenty of space for line dancing, a dentist chair turned into a make-margaritas-in-your-mouth chair, and of course a mechanical bull. Surprisingly, I did not fit in.

Jon's Go Away PartyThis past weekend Sarah and I went to the EMP and SciFi Museum. The last time I was there was for the Star Trek convention (I'm cool) and Sarah hadn't been before. We also ate in the attached diner which was acceptable.PermalinkCommentsemp seattle nontechnical

Portal is fun; the cake is a lie!

2007 Oct 22, 4:47I purchased the Orange Box off of Steam a bit ago and like others before me who have discussed elsewhere, I already owned two of the five games that come from the Orange Box. However, the combined price of HL2E2 and Portal, the two games I actually wanted was supposedly equivalent to the price of the Orange Box bundle. Incidentally, if anyone would like HL2 or HL2E1 I can gift them to you.

HL2E2 was excellent of course but the big surprise for me was Portal. (Mild spoilers follow) It has a sort of zen simplicity: there are a few simple game-play mechanics, a handful of textures and objects, and a deceptively simple story all used well and tied together to produce an entertaining and polished game. It seems a bit short but its probably better to end with the gamer demanding more. The humor and the sort of play within a play aspect of the game is what really sold me though. It has the funniest ending theme I've heard (also blogged by the creator). The voices of the automated turrets are so adorable I would feel compelled to hug them if they weren't always trying to kill me. Additionally the weighted companion cube seems like an experiment in understanding gamers' attachment to NPCs. In this case the NPC is a box and yet I still felt awful incinerating it. The whole time I was vaguely reminded of Solitary the reality show that sticks contestants alone in small rooms forcing them to endure various tests all the while being watched by a humorous computer with a female voice. Someone should sue...

RPS has articles on Portal including a Portal review, a page suggesting Portal is a tale of lesbianism, and others.PermalinkCommentshl2e2 game hl2 solitary valve portal nontechnical

Why I Feel Old

2007 Oct 12, 3:20And now to fit in better with the rest of the emo kids on LJ, in no particular order here are some reasons why I feel old: PermalinkCommentspersonal nontechnical

Ad Blocking built into IE7

2007 Sep 11, 2:55There's been some news recently on some guy hating on FireFox for its ad-blocking.

On a similar note here's a fun tip for IE7 users I got from Eric. You can get decent ad-blocking in IE7 by putting ad servers in the restricted zone. By default script inclusion is blocked between different zones so you can put domains that serve up ads in your restricted zone after which, normal internet zone sites won't be able to include script from them. This covers most of the ads I run into these days.

I use Fiddler to figure out the domains that are serving up ads which incidentally also has an ad-blocking^H^H^H^H general purpose content blocking plugin. Here's a screenshot of Slashdot and ArsTechnica from my browser. Notice the large blank areas in the screenshots:
PermalinkCommentsad-blocking personal ad ie7 technical browser tip ie

Symbols.com - Home

2007 Sep 4, 1:53Database of symbols and their meaning.PermalinkCommentsbook purchase reference symbols language dictionary index database free encyclopedia

Which which - Batch File Hackiness

2007 Aug 9, 5:41To satisfy my hands which have already learned to type *nix commands I like to install Win32 versions of common GNU utilities. Unfortunately, the which command is a rather literal port and requires you to enter the entire name of the command for which you're looking. That is 'which which' won't find itself but 'which which.exe' will. This makes this almost useless for me so I thought to write my own as a batch file. I had learned about a few goodies available in cmd.exe that I thought would make this an easy task. It turned out to be more difficult than I thought.

for /F "usebackq tokens=*" %%a in ( `"echo %PATH:;=& echo %"` ) do (
    for /F "usebackq tokens=*" %%b in ( `"echo %PATHEXT:;=& echo %"` ) do (
        if exist "%%a"\%1%%b (
            for  %%c in ( "%%a"\%1%%b ) do (
                echo %%~fc
            )
        )
    )
)
The environment variables PATH and PATHEXT hold the list of paths to search through to find commands, and the extensions of files that should be run as commands respectively. The 'for /F "usebackq tokens=*" %%a in (...) do (...)' runs the 'do' portion with %%a sequentially taking on the value of every line in the 'in' portion. That's nice, but PATH and PATHEXT don't have their elements on different lines and I don't know of a way to escape a newline character to appear in a batch file. In order to get the PATH and PATHEXT's elements onto different lines I used the %ENV:a=b% syntax which replaces occurrences of a with b in the value of ENV. I replaced the ';' delimiter with the text '& echo ' which means %PATHEXT:;=& echo% evaluates to something like "echo .COM& echo .EXE& echo .BAT& ...". I have to put the whole expression in double quotes in order to escape the '&' for appearing in the batch file. The usebackq and the backwards quotes means that the backquoted string should be replaced with the output of the execution of its content. So in that fashion I'm able to get each element of the env. variable onto new lines. The rest is pretty straight forward.

Also, it supports wildcards:
C:\Users\davris>which.cmd *hi*
C:\Windows\System32\GRAPHICS.COM
C:\Windows\System32\SearchIndexer.exe
D:\bin\which.exe
D:\bin\which.cmd
PermalinkCommentswhich cmd technical batch for

Wp64 Issues

2007 Aug 6, 3:43Miladin told me about the Visual Studio compiler's promising option Wp64 that finds 64bit portability issues when compiling in 32bit. If, for instance, you cast from a (long*) to a (long) you get a W4 warning. However, the #defines are still set for 32bit builds. This means that other parts of the code can make assumptions based on the #defines that are valid on 32bit but generate 64bit errors or warnings.

For instance, in winuser.h the public published Windows header file there's the following:
...
#ifdef _WIN64
...
WINUSERAPI
LONG_PTR
WINAPI
SetWindowLongPtrA(
    __in HWND hWnd,
    __in int nIndex,
    __in LONG_PTR dwNewLong);
...
#else  /* _WIN64 */
...
#define SetWindowLongPtrA   SetWindowLongA
...
#endif /* _WIN64 */
...
In 64bit everything's normal but in 32bit SetWindowLongPtrA is #defined to SetWindowLongA which takes a LONG rather than a LONG_PTR. So take the following code snippet:
...
LONG_PTR inputValue = 0;
LONG_PTR error = SetWindowLongPtrA(hWnd, nIndex, inputValue);
...
This looks fine but generates warnings with the Wp64 flag.

In 64 bit, p is cast to (LONG_PTR) and that's great because we're actually calling SetWindowLongPtrA which takes a LONG_PTR. In 32 bit, p is cast to (LONG_PTR) which is then implicitly cast to (LONG) because we're actually calling SetWindowLongA. LONG and LONG_PTR are the same size in 32bit which is fine but if you turn on the Wp64 flag there's a W4 warning because of the implicit cast from a larger size to a smaller size if you were to compile for 64bit. So even though doing a 32bit or 64bit compile would have worked just fine, if you turn on the Wp64 flag for 32bit you'd get an error here.

It looks like I'm the most recent in a list of people to notice this issue. Well I investigated this so... I'm blogging about it too!PermalinkCommentswp64 technical 64bit compiler c++ visual-studio setwindowlongptra

Ozzie

2007 Jun 25, 3:13I keep seeing 'Ozzie' on emails and such now due mainly to Ray Ozzie who is now the Chief Software Architect at Microsoft and his brother Jack Ozzie. Whenever I see his name I think of Ozzie from Chrono Trigger. He was one third of a trio of villains, the other two being Flea and Slash. I feel like I should be thinking of the Ozzy for which this Ozzie was named but I really don't.
Ray Ozzie. Links to license.Ozzie from Chrono Trigger. Links to license.Ozzy Osbourne. Links to license.
My next thought on Ozzie is the Scottish guy who went to my high school. He'd shout 'Ozzie! Ozzie! Ozzie!' to which listeners were compelled to respond 'Oi! Oi! Oi!'. The wikipedia article on the chant has some thoughts on the origins but I suppose at Microsoft it could take on entirely new meaning. I really hope I'm someday in a meeting with Ray or Jack Ozzie and have the opportunity...PermalinkCommentsozzy personal ozzie random nontechnical

Office Remodel

2007 Jun 11, 4:20Venkat NameplateMy manager has come back this week from a 10 week vacation and paternity leave. In response and similar to other office hacks some dedicated coworkers and I decided to do something to my manager's office.

Venkat's New Office SpecWhile gone we knew my manager, Venkat, was getting into meditation. My coworker Vishu had the excellent idea of easing Venkat back into work by making his office better suited for meditation. To start with, we updated his nameplate with an Om.

Venkat's New and Improved OfficeNext we emptied his office of anything that could distract him from meditation and replaced it with a yoga mat. Of course I left a copy of the specification for the remodel in his office.PermalinkCommentsmicrosoft personal office humor nontechnical

IE7 Feed Display Update

2007 May 22, 3:22I've created an update to the IE7 feed display.

After working on my update to the XML source view I tried running my resourcelist program on other IE DLLs including ieframe. I found that one of the resources in ieframe is the XSLT used to turn an RSS feed into the IE7 feed display.

My first thought for this was that I could embed enclosures into the feed display. For instance, have controls for youtube.com videos or podcast audio files directly in the feed display. However, I found that I can't use object or embed tags that rely on ActiveX controls in the page or in frames in the feed display.

With that through I decided I could at least add support for some RSS extensions. Thanks to IE7's RSS platform which provides a normalized view of RSS feeds it was really easy to do this. I went to several popular RSS feeds and RSS feeds that I like and took a look at the source to see what extensions I might want to add support for.

For digg.com I added support for their RSS extension which includes digg count, and submitter name and icon. I added the digg count in a box on the right and tried to make it fit in stylistically. For the iTunes RSS extension I add the feed icon, feed author, and descriptions. I was surprised by how much of the podcasts content was missing from the feed view. I also added support for a few other misc things: the slash RSS extension's section and department, the feed description to the top of the feed display, and the atom author icon.

I wonder what other goodies lurk in IE's resources...PermalinkCommentsfeed res slashdot digg resource itunes technical browser ie rss extension

xkcd :: Index

2007 May 17, 5:51The forum for the XKCD comic.PermalinkCommentshumor forum xkcd
Older EntriesNewer Entries Creative Commons License Some rights reserved.