# Wednesday, December 06, 2006

How To Find ASP.Net AJAX Autocomplete Extender

The project team wanted to ajax-ify some parts of a web page we were building so I naturally reached for the ASP.Net AJAX tools. I needed to configure the autocomplete textbox feature that looks at the characters in the textbox as you're typing and suggests actual values through a listbox that appears below the textbox.

This all works though a background web service call to the server that filters the total results that match the current prefix in some way.

I downloaded the ASP.Net AJAX 1.0 Beta 2 bits and got the Update panel working nicely. Then, I was onto the autocomplete textbox. I couldn't find it anywhere. I installed the AJAX Control toolkit from CodePlex but it wasn't there either. I just wanted to find and use this control:

<asp:AutoCompleteExtender ID="AutoCompleteExtender1" TargetControlID="txtSearch"
runat="server" ServiceMethod="GetCompletionList" ServicePath="~/Search.asmx"
MinimumPrefixLength="1" />

It wasn't in any of the assemblies. Then, through some forum, I forget where, I saw a reference to the ASP.Net 2.0 AJAX Futures November CTP. Ack! There is was.

This "futures" CTP installs in the same folder as the ASP.Net AJAX 1.0 Beta 2 bits so I'm not sure what was overwritten; I'd like to come back to this some day.

C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025

The important assembly to get is:

Microsoft.Web.Preview.dll

It seems that they've moved the autocomplete feature out into this assembly for Beta 2. Hopefully this will save you some searching if you need the feature too.

#    Comments [0] |
# Thursday, November 30, 2006

Measuring the Internet

You are hovering over bacon and eggs I've developed this phenomenal practice recently of rising early with The Wife (as a high school math teacher, she gets up wicked early) and donning my ratty old pair of Uggs, I make some bacon & eggs and a pot of coffee while I read the newspaper.

I usually come away with two or three great stories that I can use for conversation when I find myself in front of a non-developer.

Today, I came across this gem in The Oregonian:

Caught in a web of stupidity
In a recent Edge, we told you that the approximate time it would take you to visit every site on the Web if you spent one second at each one was 1 day, 9 hours, 46 minutes and 34 seconds. See, we were so busy visiting this one Web site (hey, we thought they meant TURKEY breasts!) that we left out a line. The actual figure is 3 years, 2 months, 1 day, 9 hours, 46 minutes and 34 seconds, according to The Chicago Sun-Times. Hey, Persnickety McPickypants, we were only off by 3 years and 2 months!

Huh... After thinking about it, I suppose they mean just the home page of every site. Even so, its easy to see how a large array of computers can successfully scan the entire web quickly. Then, it occurred to me the truly hard part was returning "the right" results quickly on a search result page.

#    Comments [0] |
# Wednesday, November 29, 2006

Garmin GPSMAP 76CSx

Last weekend, during the holiday break, The Wife turns to me and says, "What do you think of getting a GPS device and taking up geocaching?"

I was shocked. I had been secretly coveting the Garmin Nüvi ever since Scott Hanselman talked it up a while back. I was very subtle in my hints, but I finally got it across that I was only interested in the Nüvi.

Well, The Wife is a keen lady indeed on the Google search engine. She discovered that the Nüvi is not recommended for geocaching; its much more suited for use in the car or walking around a tourist town with its (relatively) large screen size and feature set.

There's another set of GPS devices that are better suited for geocaching. The GPSMAP 78CSx series has a better waterproof standard of IEC 529 IPX7, a built in compass, altimeter, celestial information, tide prediction and other things are just meant for folks out wandering around in nature. There are several other sets of GPS units such as marine and aviation. I think my brother has a Garmin in his plane and my other brother has one in his boat.

I was bummed, but glad that we were going to purchase the right device. I'm still keen on the Garmin Nüvi though. :)

My day job involves building websites for companies and giving them a fantastic place to promote their brand, product or service so perhaps my bar is a little higher than some, but the Garmin website blows. The site has a semi-decent Flash piece to promote one part of the site, but over all, its a typical 1998 experience. The user interface could do well with a little bit of polish and take advantage of some usability factors we (the web development community) have learned over the past few years.

With the holiday weekend and all, I did extensive checking online for retailers and let my fingers to the walking. There's a wide range of phone experiences; from appallingly bad all the way to very helpful. REI was one of the best phone experiences, plus they had one in stock!

The Wife and I bundle up for the rain and head out to the local REI to purchase our new GPS device. REI held it for us at the customer service desk, so I just walked up to them and they handed it over. They provide fantastic service and I highly recommend them for your outdoor and sporting needs. During checkout, they asked if we were members and The Wife recalled that we signed up when we lived in Chicago. I had no idea. That ended up saving us nearly $50 off the price! Booya!

We brought the device home and booted it up. It's very pretty and has a great layout of buttons and controls. Unfortunately the device didn't synch up with the satellites. We saw between 2 and 8 bars in varying heights, but they wouldn't fill in, which would indicate a successful initialization. We tried all sorts of things including a reinstallation of the software using the USB connection. We even drove out to the airport to assure ourselves of a wide open range. We got the most bars there, but again, they were not filled in. We left it outside in our backyard for about 90 minutes too, still nothing. I even drove up to Mt. Tabor and tried it there. Nada.

We bought it on Friday and now it was Sunday. I got in the car and headed back down to REI to exchange it for a new one. I went to the customer service desk and explained the situation. The nice fella gave me a store voucher, took the broken device and asked me to go to the GPS display and get another one (downstairs). I was filled with glee!

I bolted for the display. Too bad, they were out. I did have a quirky exchange with one REI staffer at the display though. I explain the problem to him and he retorts, "Did you initialize the device? Do you even know what initialization is?" I was a tad startled by his gruff questioning, plus I was really interested in getting the device to work. Perhaps I had forgotten something and I was merely a few minutes away from eternal bliss. Alas, no. Everything this jerk explained was something I had already tried. I've written him off though; I still really like REI.

At this point, I could either ask REI to order another device for me, or I could try my luck on the broken device. I decided to go back to the customer service desk, retrieve the broken device and try some more for the remainder of the Sunday. With no luck, I phoned Garmin during the week and explained the situation. The fella was awful nice on the phone and said, based on my description that the device was probably broken. Since the bars appeared at varying heights, the antenna was probably fine and it could "see" the satellites, but it was having problems reading packets from the satellites. He said to return it to REI and grab another. Ha!

The Wife and I went back to REI today and exchanged the device. Fortunately they received a shipment recently, so they had a device available for us immediately. Yay! Plus, they were super nice to us. The Wife was immediately skeptical, so we walked a few blocks down to Jameson Square to test it out. It just took two minutes and we were locked in! Yay!

REI also gave us a $20 gift certificate for an Introduction to GPS Navigation Class. The Wife and I are looking forward to taking that for starters. I've been reading Patrick Cauldwell's posts about geocaching too. This looks like a great hobby to dive into.

#    Comments [1] |
# Monday, November 27, 2006

Command Spy

I saw this post on Jeff Atwood's blog about a new tool from SlickEdit, the makers of SlickRun; easily the most frequently used program on my laptop day-in and day-out.

The Command Spy
Whenever you click on a menu item or toolbar button in Visual Studio, you are executing what is known as a "command". Unfortunately, it's almost impossible to tell what command is linked to which menu items or toolbar buttons. The Command Spy monitors command execution and allows you to see exactly what commands you've run, how many times you've run them and what key bindings are used to invoke those commands. The main purpose of this tool is to allow you to learn what commands are bound to which keystrokes, so that you can work faster within the IDE.

I installed Command Spy over the Thanksgiving holiday. It totally rocks! Just run the VS.Net add-in while you're coding for a couple of hours and then take a look at your metrics. Command Spy will tell you how many times you've run a command without using the short-cut keystrokes. Its a great way to improve on your productivity.

#    Comments [2] |

Using Microsoft Outlook 2007 as an RSS Reader

I started using the RSS reader in Microsoft Outlook 2007.

I was using SharpReader for as long as I've ever had an RSS reader and subscribed to feeds. I really like having just one application running for my communications and work items (email, tasks, calendar, RSS feeds...). Its super easy to add a feed when you're visiting a web page too. I used folders quite a bit in SharpReader to categorize feeds, but I'm trying the "one big folder" approach for now in Outlook.

Sometimes, I got lazy and didn't open SharpReader on my laptop for a while. The posts would get way out of control. Sure, I could add it to my Start Up programs, but one of my quirks is to keep that list short, if not empty. Some weeks I even tell SQL Server to not startup automatically. Perhaps that's one of the old carry overs from living too long with too little RAM on a weak laptop.

Outlook 2007 as an RSS reader is nice, but I miss some of the basics, like identifying the URL to a blog I've already subscribed to. There's probably a way to display that information easily in Outlook, but I haven't discovered it yet.

To date, the most frustrating thing has been refreshing feeds. It gets joined at the hip with my email send/receive request. So, when someone comes by my desk in a general freak-out mode and asks how to solve a problem raised in a recent e-mail, I click on Send/Receive if I haven't gotten it yet. Now, thanks to the additional RSS feeds, I have to wait much longer as everything is updated. There must be a way to decouple these requests from each other in Outlook.

Overall, I'm very happy with the switch so far.

#    Comments [2] |

How Fast Is Your Internet Connection?

I've been using http://www.internetfrog.com/ for a few months now, but I read Doug Purdy's blog about http://www.speedtest.net/. I think this will be the new default speed test tool for me. Its awfully shiny.

#    Comments [0] |
# Tuesday, November 21, 2006

XHTML, What's It Good For?

We've had some on going discussions at Pop Art about the usefulness of XHTML. Some folks in our industry are fond of HTML 4.01 while the fine folks in the HTML Working Group of the W3C have recently released the eighth public Working Draft of the XHTML 2.0 specification.

Its obvious to me of the benefits obtained by removing presentation as much as possible. The content is more flexible and the design is easily changed. As much as possible, one should decouple the content from the presentation. Making the content more semantic is a step forward. In code, one benefits from a clear expression of developer intent. There's plenty of parallels to draw here.

So, I can write an HTML 4.01 compliant page without excessive tables, if any. I'm well versed in CSS, but not an expert, like some at my company that have the reference material memorized. Why use XHTML?

The best reason I've been able to identify is validation. If I write a piece of code that enables web content management, I've immediately opened the door for the visitor to break the page from an HTML compliance perspective. If I don't shut that door quickly, they'll degrade the site quickly. It doesn't matter to me if the client should have known better, I should write quality code and quality code should anticipate an obvious opportunity for user error like invalid markup.

As Scott Hanselman said, there are three forms of XML: well-formed XML, valid XML and Crap. Its really easy to send the user provided markup through an XML parser and determine if its well-formed, meaning it obeys the basic rules (I think there are four) of XML. Valid XML means it not only is well-formed, but it also follows a specific schema - whatever that might be. I could make my own custom schema, or I could refer to an external one, like say, the XHTML 1.0 specification.

I've created the simplest mechanism in some code; simply passing the user provided markup through an XML parser, which catches obvious mistakes that identify the third kind of XML, Crap. Its also easy to parse each element or attribute to validate any rules in the pattern, such as "you cannot use the element <br />" or the "you cannot use the attribute 'style' in the markup". Some WYSIWYG editors automatically add style attributes or font tags of goo in the markup. Passing the content through the XML parser is an easy way to protect from these mistakes and keep CSS folks from yelling at you too much.

When I started writing this blog post, I was considering authoring some code that would enforce the XHTML 1.0 rules; there couldn't be too many of them to write up. Yet, as I was typing, I realized the XHTML 1.0 specification probably has a schema, and sure enough there's a DTD on the W3.org site. Huh... seems obvious now. What could have been a fun 3 hour power coding project at home has turned into a 15 minute walk in the park. Now I can reference that schema in a validating XML reader and know that the content is acceptable on that level too. I'm going to go give it a whirl and see what happens. Guess I'll be able to meet the fellows on time at the Horse Brass for a beer after all.

#    Comments [0] |
# Wednesday, November 01, 2006

Essential WIndows Workflow Foundation

I saw this link on Don Box's blog about a new Workflow book coming out. Since I'm considering WF, I'm going to take his advice and get the book.

This is a nice parlay for me after a session at the recent Seattle Code Camp. I sat in on a Windows Workflow Foundation talk by Paul Mehner, the South Sound .Net User Group Leader in Olympia, WA.

I could tell this guy is a professional trainer; he had a thorough understanding of Windows Workflow Foundation, solid content and a ton of energy. Not a sleepy eye in the whole audience!

#    Comments [0] |
# Monday, October 30, 2006

Seattle Code Camp 2

The Seattle Code Camp 2 was a great weekend. It was held at Digipen, the world's first video game university. Its a cool office, and judging by all of the labs, the auditorium, and extensive media clippings framed on the wall, its a fantastic place to learn 2D and 3D animation, game programming, art and anything else related to game development. Jason Mauer did a great job of pulling everything together. I'd love to help out and organize the next Portland or Seattle gathering.

My presentation on DotNetNuke and web content management went well; I think its got some legs. Here's the zip file of my presentation and the code I was talking about. This was the first time I've presented this material and it went fairly well. I really believe in the concepts that I've been whittling on and DNN has just been the delivery vehicle of the moment. I think it'd be a lot of fun to take this one on the road and hit up a couple of code camps in other cities. I wonder what The Wife would think of that?

One of my favorite presentors last weekend was Bill Vaughn. He's with Beta V, and a prolific author; he's written a couple of SQL Server books recently. I took advantage of the opportunity to learn quite a bit about SQL Server 2005 Compact Edition and Reporting Services from him.

The XNA team was also on hand to present some brand new material. The new beta is due very soon, if its not out already. Charles Cox was on hand (a Digipen graduate) to give a great demo on building a XBox 360 game with C#.

#    Comments [0] |
# Saturday, October 21, 2006

16:3 Scale Labyrinth

16:3 Scale Labyrinth I forgot to mention that we we're linked by makezine.com the other day for our efforts in building a large scale labyrinth game.

My friend Dave Selden is the master mind. He had the idea to make the game based on his sweet eBay purchase. He called up some friends and we've been helping Dave build it over the past couple of weeks in the hopes of winning a mini-golf contest. We're up against our neighbors at Wyden & Kennedy, the ad agency for Nike. They are purportedly making a giant whale with the ball shooting out of the blow hole; rumors to be sure but I would expect they have a larger budget too.

The game begins by placing the golf ball in the start position on the board surface. One or two players turn two giant knobs on the sides of the game to manipulate the x and y axis of the board surface. If the player succeeds in moving the ball to the finish hole, the ball descends through a tube, out the side, and directly (hopefully) into the cup. Otherwise, the ball drops out on the far side of the game; where the player must then putt the ball around the rectangular green to the side with the hold. Got to love the mini-golf game!

Thanks Drew! He submitted us to makezine.com. He has millions of hundred dollar ideas.

#    Comments [0] |