Thursday, November 10, 2011

Replacing GetHostByName with GetHostAddresses

I’m working on some C# code that needs to send some data over a socket connection.  The user can specify the destination by name or by IP address.  I was using syntax like the following to get the address

IPAddress addr = Dns.GetHostByName(host).AddressList[0];

IPEndPoint endPoint = new IPEndPoint(addr, 9100);

That worked, but VS2010 spits out the following warning:

'System.Net.Dns.GetHostByName(string)' is obsolete: '"GetHostByName is obsoleted for this type, please use GetHostEntry instead."'   

So I replaced the call to GetHostByName with GetHostEntry. When I passed in the IP address as a string GetHostByName, it threw an error, "No such host is known".

That's not good. I didn't want to use obsolete code, but the recommended replacement wasn't working. I did a bit of searchnng on the Internets and found that GetHostEntry attempts to do a DNS reverse resolve and that doesn't always work. As it turns out, GetHostEntry is not the only method that can be substituted for GetHostByName. GetHostAddresses will return the IP address for the specified host. I was able to use the following code without any warnings:

IPAddress addr = Dns.GetHostAddresses(host)[0];

IPEndPoint endPoint = new IPEndPoint(addr, 9100);

And we are good.

Friday, September 30, 2011

An odd way to post

This short little post was composed with the Blogger iPhone app. It's running on my iPad and I'm using the BlueTooth keyboard that HP made for the ill-fated TouchPad.

It works, but I'm limited to basic text entry. No fancy HTML was harmed in the making of this post. You can include images, which is something I guess. I would have liked an app that let you enter in HTML markup using something like markdown.

On the plus side, the HP keyboard is nice way to enter in extended amounts of text on a touch only device. Most of the keys work. The media keys work just fine, but most of the TouchPad specific keys are ignored. With the exception of the search key, that invokes the iOS search box. For $20, it's a good enough BT keyboard for my needs. It's HID enough.

I went back and edited this post with an app called, BlogPress. It's not Windows Live Writer, but it's good enough for posting from a tablet. You can do some basic HTML formatting. It's a bit quirky, especially when scrolling at the bottom of the page. The text looks like it's dropping of the bottom of the page and you have to drag the page back up. But it works.

Location:Home,United States

Wednesday, July 13, 2011

How to set the DevExpress ASPxScheduler current time line marker to only appear for the current date

I’ve been using the DevExpress ASPxScheduler with one of our WebForms apps and it’s been a pretty good experience so far. It does pretty much what I need for it to do and I have been able to bend it to do things that I want it to do.

One feature is that it displays a marker on the scheduler to represent the current time.  This is a feature that Outlook does on its calendar and the ASPxScheduler by and large is trying to mirror that experience.  In this case, they behave slightly differently than Outlook.  In Outlook, the time line marker only appears when the calendar time span includes the current date.  If the calendar view does not include the current date, you don’t see that line.

(Image of the scheduler control showing the time marker taken from the online documentation)

With the ASPxScheduler, if you have time line marker enabled, it’s always being displayed, no matter what the date is.  That is a little bit counter intuitive and doesn’t match the Outlook model that DevExpress is trying to following.  As it turns out, it was easy to change that behavior.

You can use the VisibleIntervalChanged event of ASPxScheduler control and make the time line marker behave like Outlook with a single line of code:

protected void ASPxScheduler1_VisibleIntervalChanged(object sender, EventArgs e)
ASPxScheduler1.OptionsBehavior.ShowTimeMarker = ASPxScheduler1.ActiveView.GetVisibleIntervals().Interval.Contains(DateTime.UtcNow.Date.AddMinutes(1));

We use this event to enable the display of the marker when the current date is being displayed by the control, otherwise disable the marker. The call to GetVisibleIntervals().Interval returns TimeInterval object, which is a DevExpress.XtraScheduler class that represents an interval of time for the current scheduler view.  You can use the Contains() method to check if a DateTime or TimeInterval object is contained within the interval.  Internally, the ASPxScheduler uses UTC time, so you want to pass the current date as UTC.  We add 1 minute to the time otherwise the DayView for the previous day will include the current date.

This functionality works for the version of the ASPxScheduler that was current at the time this was written, v2011.1.5.

Wednesday, June 08, 2011

Binding an Enum to a DataSource

I had some code for an ASP.Net Webforms app where I need to present to the user a list of options that were define as Enum.  I want to populate a combobox with the enumerated type values and do it from code automatically.  This is the Enum in question

enum PrintColorSchema {
Default = 0,
FullColor = 1,
GrayScale = 2,
BlackAndWhite = 3,

To make things more interesting, I wanted to exclude the first item in the list, “Default”.  One way to do this would be to manually populate a select list with the values from the Enum.  While that would work for this Enum, I wanted to find a way where I didn’t have to hard code the values.

I added a DropDownList control to the page and in the code behind, I added the following code:

ColorSchema.DataSource = 
.Select(en => new
Value = en,
Text = Wordify(en.ToString())
}).Where (en => en.Value != PrintColorSchema.Default);

ColorSchema.DataTextField = "Text";
ColorSchema.DataValueField = "Value";

What we are using is a bit of LINQ to convert the Enum to an IEnumerable collection of an anonymous class. That class has two members, Value and Text. Value is set to the enumerated type and Text is set to prettified version of the enumerated type. That function looks like this:

public static string Wordify(string pascalCaseString)
System.Text.RegularExpressions.Regex r =
new System.Text.RegularExpressions.Regex("(?<=[a-z])(?[A-Z])|(?<=.)(?[A-Z])(?=[a-z])");
return r.Replace(pascalCaseString, " ${x}");

The code


converts the Enum to an array of constants. The next part


returns an IEnumerable collecttion from the array. The code

.Select(en => new
Value = en,
Text = Wordify(en.ToString())

returns a new IEnumerable<> collection of an anonymouse type. That type has the enumeration element as the Value and that element converted to a string as the Text. Since the elements were in "PascalCase", a simple RegEx function was used to split the text into multiple words, The final Where operator is used to filter out the first item from the list.

The HTML that gets rendered:

<select id="ColorSchema" name="ColorSchema"> 
<option selected value="FullColor">Full Color</option>
<option value="GrayScale">Gray Scale</option>
<option value="BlackAndWhite">Black And White</option>

Which renders like this

For this Enum, all the code was overkill, adding three <option> elements to the <select> control would have been less work.  Where this is handy is when you have Enum types with many elements or when the Enum type changes.  If the Enum type changes, no modification to your code is needed to update the combo box.  One less place in the code to fail.  And that is a good thing.

Tuesday, May 03, 2011

There was a Time Warner Cable Disconnect Technician in my yard this morning.

I had an interesting conversation this morning with a Time Warner Cable (TWC) Disconnect Technician.  I went out to get my paper and he had the cable junction box open.  He was clipping the wires going my house and my neighbor’s house.  We had both switched to Verizon FiOS TV and were no longer paying for any TWC services.

He came over to me and asked if he could ask a few questions.  I wasn’t sure what to expect, but he was very friendly.  He is a Disconnect Technician. He was driving all over town, clipping the cable wires to houses that had switched from TWC to FiOS.  Since FiOS TV went live in Bethlehem last month, TWC was bleeding customers all over town.  He didn’t give me any numbers, but he said a lot of people had already switched and TWC management are pretty upset.

He is also a disgruntled ex-employee of TWC.  At one point he was a TWC employee with the full benefits, at some point they terminated his position and hired him back as a contractor to TWC.  He was not happy about the change from being an employee to being a contractor.  He wasn’t the only employee that they did this to, it must have been a cost cutting move on TWC’s part.

He asked me about the services that I was getting and how much I was paying. Oddly enough, he though I was getting the TV channels through a dish.  He literally didn’t know that FiOS TV was a Verizon package of channels.  He said that he was thinking of getting FiOS service for himself.

He did say a few times that the local TWC management were upset over the subscribers losses to Verizon.  They don’t have much to offer existing subscribers who want to switch.  They can’t compete on the technology side, but they can compete on the cost.  Raising their rates a month before FiOS TV rolled into town, was not one of their smarter moves.

When I went to the local TWC office to cancel my service and return the equipment, the staff there made no attempt to keep me as a customer.  They asked where I was moving to, and they were surprised when I said I wasn’t moving.  But they did not ask why I was dropping the service or ask if there was anything that they could do to get me to stay with TWC.   It would have been a pointless effort, I was already on FiOS TV and there was nothing that TWC could offer to get me to switch back.  Still, it’s general business sense to keep your existing customers.

Tuesday, April 05, 2011

One week with FiOS TV

It’s been a week since I switched from Time Warner Cable to Verizon FiOS TV.  After years of having only one choice in my town for cable TV, Verizon just started offering FiOS TV. While I appreciate the quality of support that I had received from TWC, I was ready to switch providers.  I’m getting better technology at lower price from VZ.

I already had FiOS Internet, bundled with the Verizon Phone service.  I had TWC digital cable with a single Set Top Box (STB) and a CableCARD for my TiVo HD.  I was able to get their digital lineup on two TV sets, and a limited selection of their lineup on the analog channels on two more sets.  I love my TiVo and had two Series 2 boxes on the analog cable, and a TiVo HD connected to the digital cable.  The combined total of FiOS Internet, TiVo subscriptions, phone, and cable, came to around $200 a month.  My FiOS Internet connection speeds where set to 20 MB/s down, and 5 MB/s up.

I upgraded to the FiOS Extreme Triple Play package.  This gave me a selection of channels a little better than the selection that I had TWC digital cable.  I also gained a faster Internet connection, rated at 25MB/s in both directions.  Over the last week, I did spot tests at different times and I was getting results like this:

If you use any online service for printing digital pictures, you’ll appreciate that upload speed.  On the days where I need to work from home, the connection to my office network is fast enough that I feel like I am at the office.

Since FiOS TV is digital only, I retired my Series 2 TiVo units.  They had been in use since 2005, it was time to say good bye.  TiVo customer support was nice enough to transfer my TiVo HD to the cheaper rate that I was paying on the Series 2. I ended up getting the Verizon multiroom DVR with three set top boxes.  Each STB would be able to access the shows recorded on the DVR.  That wiped out the loss of the Series 2 boxes.  For the TiVo HD, I got a CableCARD so it could get the FiOS TV Channels.

Installation was pretty straight forward.  The installer was friendly and professional and had done a lot of FiOS TV installations.  The CableCARD installation was new to him, and we’ll get to that in a minute.  Since I had had FiOS Internet for the last 5 years, most of the installation prep work was already done.  He just had to check all the coax cable connections.and hook up the new hardware.

Time Warner had done a pretty good job with the coax wiring over the years.  The installer only had to do a couple of things with the coax wiring, mainly removing the splitters from the the two TV sets that had the Series 2 boxes.

The first thing that was installed was the FiOS router.  He installed an Actiontec MI24WR (Rev F).  This router took the Ethernet cable coming in from the Verizon ONT and provided the FiOS Internet over WiFi and through the Ethernet jacks.  It provided CATV and TC/IP to the DVR and STBs over the coax cable.

While this appears to be a decent enough router, my existing Netgear WNDR3700 router has better hardware for WiFi.  After the installer got the Actiontec working, I hooked my router to the Actiontec.  I had to make some minor changes to the Netgear to let it coexist with the Actiontec, then I logged into the Actiontec and turned off it’s WiFi radio.

It takes a while for the DVR and STBs to come online.  While we were waiting, we tackled my TiVo HD.  This was installer’s first experience with a CableCARD, so he let me help him out. But first, I need to explain something about using a CableCARD with Time Warner.

Time Warner Cable uses a technology called Switched Digital Video (SDV) to be able to provide their channel lineup with their existing bandwidth.  Usually when you have cable TV, all of the channels that you can get are sent over the cable line at the same time.  Your TV or STB knows what frequency each channel is on and when you change the channel, the appropriate frequency is selected.  Nothing new here, it’s been that way in form or another since the days of Uncle Milty.

With SDV, only the channels being watched in your general neighborhood are going over the wire.  When you change the channel, the STB requests to have that channel provided.  If that channel is already being sent your street or apartment building, then you get the current frequency of that channel.  Otherwise the local office enables that channel and tells the STB what frequency it’s on.

A TiVo box has no idea how SDV works.  So the TiVo people and the CableCARD people came up with a device called the tuning adapter. It sits between the TiVo and the cable and TiVo knows how to talk to the tuning adapter.  When you change the channel on the TiVo, it sends a message to the tuning adapter, which in turn does the SDV dance with the office, and the end result is that you get your channel.  When it works, it’s fast and transparent to the end user.  My experience with the tuning adapter was that every few months or so, it would lose the ability to get the channels and you would have to reboot it.  This functionality isn’t unique to the TiVo, the TWC DVR and STB just have it built in.

FiOS TV does not use SDV, so I didn’t have to deal with any tuning adapter nonsense.  We pulled the TWC cable card out, unplugged the tuning adapter, and plugged in the VZ supplied CableCARD.  TiVo is very helpful with CableCARDs.  When you insert new one it, TiVo automatically displays the information that installer needs to get the card activated.  With TWC, the installer had to call in the information from the card.  It took a few tries to get it working.  With FiOS, the installer had an app that he installed on my PC and he was able to activate the card easily.

The TiVo immediately saw that the card was activated, and we went through it’s guided setup to tell it that it had a new cable provider.  For some off reason, Verizon had not notified TiVo that my zipcode was covered by FiOS.  I had called TiVo a few days before the install, and they provided me with a list of zipcodes that would work.  I entered in the closest one in, and my TiVo was now in FiOS country.

After telling it that it was now on FiOS TV, the TiVo connected to it’s mothership and downloaded the new lineup and channel guide information.  It then migrated over the season passes from the old TWC channel numbers to the channel numbers used for the same stations on FiOS TV.  I was amazed how well that worked.

We have been using the FiOS TV for a week now and we are very happy with it.  The picture quality appears to be noticeably better than TWC.   Verizon does not apply any additional compression to the programming, and it looks like Time Warner Cable does.

The FiOS DVR is very good.  Very easy to use and works great from the STBs.  On a scaled from 1 to 10, where the basic TWC HD DVR is a 1 and the TiVo HD is a 10, I would rate the FiOS DVR a solid 7.  If you never used a TiVo before, you would be very happy with just the FiOS DVR.  While you can’t pick a show to record from the STB, there are mobile apps iPhone, iPad, Android, and the web, that let you easily program the DVR.  The DVR has a 500GB drive, big enough to record 50 to 70 hours of HD programming or 200 hours of SD programming.  That’s about 3 times more storage than I have with the TiVo HD.

The software running on the DVR and STBs is much nicer than the software running on the TWC STB box.  It’s much snappier to navigate and is just better to use.

There are few drawbacks.  I lost BBC America HD, I’m going to miss that channel.  FiOS TV does have the SD channels, so I still get to see the shows.  It just wont be in HD.  I know, a “First World Problem”, but I did want to be fair.  It sounds like they are planning on adding BBCA HD, but I have no idea when.

If the hardware fails, I have to call and have a replacement shipped to my home,  As of right now, there is no local store for getting replacement hardware.  And any TV set that you want to watch FiOS TV with is going to need a CableCARD or cable box.  The days of just plugging the coax into the back of the TV and letting the TV tune the channels are over.

I was a loyal Time Warner Cable customer for close to 20 years.  Their service was professional and they did the best they could with dealing with SDV issues.  And they had no way of matching the Internet speeds that I have had with FiOS.  Verizon has the advantage with the newer technology.  With the cancelling the two TiVo subscriptions and consolidating the cable, phone, and Internet, I will save about $40 to $50 a month.  Since I’m getting more features for less money, I’ll count that as a double win.

Thursday, February 17, 2011

Initial impressions of the Netgear WNDR3700

I recently upgraded my home network with a new router.  I have Linksys WRT54GS router, running a custom firmware called DD-WRT.  DD-WRT provides a lot of extra functionality that wasn’t available with the stock firmware.  It’s the closest thing to a free lunch that you can get, computer-wise.

I’ve had the WRT54GS for a couple of years and it was starting to show it’s age.  I needed to reboot it about once a week or so, or I would lose network connections.  It also predated the 802.11n protocol, and my iPad and one of my laptops support N.  I also wanted a router that supported gigabit speed LAN ports.  So I’ve been in the market for a while now.

Last year, Netgear released a few new N ready routers.  The WNR3700L was designed to be used with custom firmwares.  Netgear even created a website, MyOpenRouter, to support the enthusiasts.  It has a fast processor (480mfz), gigabit ports, and supported G & N on the 2.4ghz band.  I came this close to buying one.

Then I read up on the next size up router from Netgear, the WNDR3700.  This is a dual band router.  You can configure B/G/N on the 2.4ghz band, and A/N on the 5 ghz band. You can keep the N devices at the less crowded 5ghz, and leave the G devices at 2.4ghz,  It also has a faster (680mhz) processor.  This router was listed as a powerful router on the DD-WRT site.  So I spent the extra money and bought that one instead.

The first thing I learned was that I bought a WNDR3700v2, the 2nd generation model.  DD-WRT was not supported for this model.  It turns out that Netgear based their firmware on the OpenWRT project, so out of the box it came with nearly every feature that I wanted.  It had support for updating my DynDNS account, static IP addresses, IPv6, guest networks, a shared USB drive, DLNA, etc.

It doesn’t have everything that DD-WRT has.  It doesn’t have a VPN server.  With DD-WRT, you can run PPTP and OpenVPN servers.  I use PPTP for a few reasons.  The main one was to be able to get a secure connection to my home network so that I could open a remote desktop session to my home PC.  I could also use the VPN connection to access sites that would be normally blocked by the network that I was connected to.  The WiFi network at my local car dealer blocks all of the social networking sites.  When I’m waiting for my car, I would open a VPN connection so that I could check Facebook and Youtube.

Using a VPN also provides a level of security when you are on an unsecured WiFi network.  By encrypting your traffic, your are less likely to have someone capture your data.  The pptp protocol is not completely secure, OpenVPN has better security.  Apple, in it’s infinite wisdom, does not provide OpenVPN support on iOS.  I could open a PPTP VPN connection from my iPad, but there’s no way to get OpenVPN to work. Well, there is a 3rd party OpenVPN client for jailbroken devices, but I’m not going down that route.  At any rate, PPTP is still more secure than unencrypted traffic.

So the WNDR3700 was pretty close to being good enough with the OEM firmware.  Since the WRT54GS was running a PPTP server just fine, I decided to keep it around and use it just as an access point.  That’s part of the joy of DD-WRT, it’s vary easy to customize a router for special needs.  On the DD-WRT site, there are pretty clear instructions for turning a router into wireless access point.  This is all I needed to do:

  1. Change the IP address of the old router.  Since the WRT54GS would be wired to the WNDR3700, they couldn’t have the same IP address.  I changed the WRT54GS from to
  2. Configured the DHCP server on WNDR3700 to use the range to for handing out IP addresses.  This would make sure that nothing else would get the address.
  3. On the WRT54GS, set the WAN type to disabled and disabled the DHCP and DNSmasq services.
  4. Set the WAN port on the WRT54GS to be a LAN port.
  5. Configured the WNDR3700 to forward the PPTP port, 1723, to the IP address now reserved to the WRT54GS.  Any request for a PPTP connection from the outside would now get redirected from the WNDR3700 to the WRT54GS.

After making those changes, I wired the routers together,  I opened a VPN connection to my office PC and RDP’ed into it.  From my office PC, I opened a VPN connection to my home network to verify that the PPTP server was accessible,  It worked the first time.  That’s rare for me, but I’ll take that for a dollar.

I’ve been using this router for a week and it has been rock solid.  There are a few quirks, the UPnP had some issues with Windows Home Server, but that was easy to work around. The wireless range is much better than what I had with the Linksys.  I probably would have been good with the single band WNR3700L, but I am happy with it’s dual band big brother.

Tuesday, February 15, 2011

How I patched a Dell workstation with a firmware update from HP

About 18 months ago, I got a Dell Precision T5500 workstation.  A decent PC with a Xeon quad core processor which has bee a pretty decent box for doing development with.

About a month ago, it started acting very flakey.  I would be doing my work and the display would go all wonky on me.  I would see crawling vertical lines going down the display.  After a minute or two, the colors would get very dark and the computer would stop responding.

A reboot would restore the machine.  There were no warning signs, nothing in the event logs.  One minute it was running, the next it was locked up.  This would happen about once a day or so.  Not enough to keep me from using the machine, but enough to warrant getting it fixed.

We have Dell Priority support, which we hoped would help resolve this problem.  We bought this machine with Vista and it had the free upgrade to Windows 7.  We had bough a bunch of these machines, another one was having a strange crashing problem as well.  Because I had installed 64 bit Windows 7 on it, Dell said it was not supported. 

That annoyed our IT manager.  He then engaged Dell support to fight the good fight.  He called BS on that one and their response was for him to uninstall the current video driver and install the latest Dell approved driver.  While he was doing that, I stated doing my own research.  They had a Plan B, but that involved swapping drives without machine and wouldn’t have actually resolved anything.  We hoped to avoid Plan B.

This T550 came with an NVIDIA Quadro NVS 295 video card.  It’s a basic workstation card with enough horsepower to drive 2 displays.  I had kept the driver updates current with whatever Windows Update suggested for it.

We downloaded the files from Dell, and ripped out the current driver.  The Dell drivers refused to install, claiming that there were no supported devices installed.  The IT guy had downloaded the recommended driver, which supports a motley crew of NVidia cards.  He found a NVS 295 specific driver on the Dell site and started downloading that.  Peachy.  While he was fighting with my machine, I had found some clues in the NVIDIA forums.

I was not alone.  Other Dell owners had reported similar problems with that video card.  This post has a screen shot that was similar to what I was seeing.  Another post described applying a NVS 295 firmware update from HP’s web site.  This was posted by several Dell users as working.  Since it's on the Internet, it must be true.  The IT guy didn't want to flash the Dell with the HP supplied file, but I convinced him by using the following three arguments.

  1. It's a video card BIOS firmware, not for the motherboard.
  2. If we brick it, Dell has to replace it as it will no longer be a software problem.
  3. You can't beat the entertainment value of flashing Dell supplied hardware with HP supplied updates and having it work.

So I downloaded the firmware from a HP page labeled as “NVIDIA Quadro NVS 295 Video BIOS (ROM) and Flash Utilities”,  and the latest driver from NVIDIA.  The Dell NVS 295 driver download completed first and we ran that.  It would not install because it couldn't find the video card.  We then ran the HP flash updater, which immediately recognized the missing NVS card and happily flashed the BIOS.  After rebooting, we ran the NVidia supplied drivers and they installed without incident.

It’s now been a couple of weeks and my T550 has been running non-stop without any failures.  While I don’t understand why HP is only known place in the Googleverse that has a NVIDIA firmware update, I’m just glad that someone released it.

Updated: 2/6/2012
I recently had a comment on this post that I did not publish.  That person posted anonymously and put his email address in the post.  I don’t think he wanted his email address published (and you’ll see why), but I will include rest of the post:

I have the same problem, and I am unable to track down that flash utility! HP apparently doesn't support it anymore. Would you by any chance have it still and possibly throw it up and media fire or some other site for me to download?

The link I had listed no longer goes to the correct page.  HP updated the article and broke the link.  That’s how the Internet works folks, nothing is truly static.  That’s why we have search pages.  That HP link takes you to a page that has a search box.  If you type in “”Quadro NVS 295” in the search box and press the submit button, it comes back with a list of pages.  At this time, the top page on the list is the current page for the firmware download.  Since HP can and will change the link, I’m not going to make any effort to keep my page in synch with HP.

Since HP holds the copyright to that download and is still supporting, I don’t think it’s 100% kosher to put that file up on a file sharing site.  If HP abandoned it, then I can see a reason for making the file available.  But there’s no need when you can easily download it from HP.  It took less than 5 seconds to find the updated page.

One final point. About 7 months after writing that post, the problem came back.  In all likelihood, a Windows update has a conflict with the card and/or the drivers.  Since the machine was still under warranty, I had Dell send out a replacement card.  It failed right after booting up with the same problem. I was done with that card.  I ripped the card out and replaced it with a higher end card.

Friday, February 04, 2011

Reflections on Red Gate and their decision to charge for .NET Reflector

The chattering classes in the .NET world have been buzzing about Red Gate’s decision to start charging for the .NET Reflector utility in March.  I’m been amazed by the hostility and venom sent their way.  Lots of nasty things being written in a forum provided by Red Gate.

Earlier in the week, Red Gate posted a open letter to the .NET Community that the next version of .NET Reflector would cost $35.  Previous versions had been free (with an enhanced version available for an additional cost).  You can’t use the free one indefinitely, there is a time bomb in program that forces you to upgrade every 6 months.  If you don’t upgrade, the program deletes itself from your machine.

The time bomb predates Red Gate’s purchase of Reflector, the original author, Lutz Roeder, implemented that to force everyone to use the latest version.  It’s annoying, but it kept him from having to support multiple versions out in the field.

When Red Gate bought Reflector from Roeder in 2008, he posted the following on his blog:

Red Gate will continue to provide the free community version and is looking for your feedback and ideas for future versions.

There is nothing in that statement that says that Red Gate has to continue to make new versions available for free.  It was never an open source project, and there is no reason to expect Red Gate to make it one.  I think they tried to make the business model work, but did not see enough revenue from the paid version to cover the free versions.  That is unfortunate, but that’s just how it goes sometimes.

The tone that some people are using on the Red Gate forum was pretty raw.  When you see topics like “Red Gate, you have destroyed your reputation” or “Your parents should be really ashamed!”.  It wasn’t all negative, there are a lot of thoughtful comments, but I was surprised by the dumb and nasty.  I don’t think Red Gate was prepared for the response that they received.  They probably should have provided more lead time to their announcement.

I think that Red Gate should put out one more release of the free version of Reflector, version 6.  This final free release would have the time bomb feature removed.  No support at all from Red Gate would be available.

I would also like to see other licensing options.  I would like to see a site or company license that would let any number of developers within the company use Reflector.  LINQPad is another great .NET development tool and Reflector could use a similar licensing model.  There is a free version and a paid version.  The paid version has more features and you can license it by user, group of users, or all users within a company.  If Red Gate could offer that, I would have a much easier time getting my company to buy it.

It’s a great tool and the price is appropriate.

Sunday, January 23, 2011

Price Chopper's RoboDeli is great idea, but flawed

I just did some Sunday shopping at a local Price Chopper supermarket.  It was pretty busy and there was a long line at the deli counter.  With in the last few months, they implemented a computerized ticket system.  Instead of grabbing a ticket and waiting for a number to be called, you pushed a button on a touch screen and a numbered ticket was printed out for you.  On a large TV screen above the deli, the ticket numbers currently being served and tickets to be served were listed, along with their approximate wait times.

Knowing the wait time is handy, it gives you a better idea of how long you will be waiting before you be served..  They also have a touch screen set up to allow you to place your order and come back later to get it.  Since the wait time was up to 20 minutes, I decided to give the "RoboDeli" a shot.

The RoboDeli worked, but it was an exercise in frustration to use.  The touch screen was the main culprit, but the software design had a few flaws too.  The touch screen was just bad.  It was very difficult for it to register a button press and when it did pickup a button press, it would often get the wrong button.

I just wanted to get some ham.  While I was able to easily select "ham", I had to scroll through several pages of items to get the one I wanted.  Those buttons were large and while it took a while to get it to read my finger press, it got the right selection.

Next came the weight and thickness.  Those buttons were smaller and it took much longer to get the right selection to register.  I then added the ham to the order and went to complete the order.

It asked if I wanted to get a text message on my phone when the order was ready.  That's a brilliant idea, but they really messed up on the implementation.  To enter in the phone number, you were presented with a numeric keypad on the screen, plus skip, completed, and clear buttons.

The number buttons were small and close together.  I don't know if it's supposed to remind you of a phone, but it only used a small portion of the display.  Every time I pressed the "5" key, it would register as "2".  The really annoying part was that it had no concept of a backspace button.  The clear button would clear all of the numbers, forcing you to start from the beginning.

After several failed attempts, my 10 year old daughter took time off from texting all of her friends to take pity on me and enter the number in herself.  She had less luck than I did.  We finally gave up and pressed the skip key to send the order to the deli.

At that point, it went back to it's home screen.  No order number or any other way of identifying my order.  When they processed my order, it would be placed in a cold case next to the deli.  It would have an order number on it, but you wouldn't know what that order was.  You just have to remember what you ordered and grab the right one.  And also to remember to periodically check back to see if it was ready.  You also had to know where the pickup would be, that was not clearly identified.

It took about 4 minutes for me to place the order.  That's a long to order a 1/2 lb of ham.  Of that time, 2.5 minutes were occupied with my failed attempt to enter in my phone number. It would take longer for 10 people to enter in their orders in total (without picking them up), than it would for 10 people to wait at the counter and actually get their order.

What they are trying to do is a great idea, they just dropped the ball on how they implemented it.  Something that is supposed to save you time should not take longer and annoy you in the process.  This is what they need to do to fix it:

  1. Display a large sign over the screen that would list the steps needed to place the order and where to pick up the order.  While you can display that information on the screen, this way it's always available for the user.
  2. Get a more responsive and accurate touch screen.  This isn't esoteric technology.  Your self serve checkout registers have much better accuracy and response on their touch screens.  You should be at least at that level of accuracy for the RoboDeli.
  3. Page Up and Page Down types of buttons are keyboard/mouse navigation tools.  With touch screens, you scroll through lists by dragging the list with your finger.  The system feels like it was designed to be used with a mouse, not a finger.  Find the person who designed this system and give him an iPad and show him how touch screen applications really work. 
  4. Use the entire screen for input.  A larger phone number pad would have been better.  It doesn't cost anything extra to use more of the screen.
  5. Add a backspace key. Not being able to the delete just a single character is just mind boggling bad.
  6. Display the order number so the user can remember what order to pick up.
  7. Have an option to print the order ticket.  With the information of what the customer just ordered, you can suggest complimentary items to go with that order and provide coupons on the ticket itself.  "Buying a lot of cold cuts? Here's a coupon for mustard."  Every point of interaction with a customer is a chance to sell him something.  The store already has a machine that prints out coupons when you swipe your AdvantEdge card, so you already have the ability to do this.
  8. Have a mag strip reader to be able to read the AdvantEdge card (Price Chopper's loyalty card) and be able to print the customer's name on his order.  If you could add a mobile number to the AdvantEdge card account, that would be even easier for text notifications.

Monday, January 10, 2011

A Random Vegas Observation

I like walking the strip in Vegas at night, it makes for great entertainment.  I just love watching everything going on.  I’m not into gambling, so I just walk around and take pictures of the bright lights.  One of the seedier parts of the Vegas Strip Life are the “Porn Slappers”.  If you have never been to Las Vegas, Porn Slappers are people who stand on the sidewalk and hand out “business cards” for “contractors in the adult service industry”.  Prostitution is illegal in Clark County, this is one of the ways that they advertise their services.

They are not allowed to come up to you and harass you (that right is reserved for Crossgates Kiosk employees), so they need to do something to get you attention.  They slap the cards in their hand to get your attention.  Thus, the “Porn Slapper” name.  The more likely they think you would be interested, the more slaps you hear.  Welcome to Las Vegas!

The streets are just littered with cards with pictures of half-naked women, sporting what appears to be non-factory equipment. I’ve been to Las Vegas for work a few times, but it’s not a place I would bring my kids to see.  I don’t want to have to explain to an 8 year old what an “escort” is.

While I have never seen anyone take one of the cards, they must be effective.  The Porn Slappers are all over the strip.  While I tune them out as background noise, I have seen quite a few people take offense to them.  They are harmless, but it’s not what you expect to see back home.

I was walking down by Planet Hollywood and I found myself instep with a retired couple from Milwaukee.  They were on vacation and this was their first trip to Vegas.  They were a little unnerved by the Porn Slappers, so I decided to help them out a bit  We chatted a bit and I explained what the Porn Slappers were. I told them that I usually say gibberish to the Porn Slappers, it confuses them and throws them off their game a bit.

So we walked one, and whenever a Porn Slapper came close, I would go into “Denny Crane” mode.  I would just say random things like:

  • I’m looking for a one-armed man
  • Are you my mummy?
  • Denny Crane, Denny Crane
  • Tippecanoe and Tyler too
  • Vote for me and shoes for all
  • Member, FDIC

Pretty much just random sayings, whatever floated out the archives. And the Porn Slappers would just back away from us.  Mr and Mrs Milwaukee were greatly entertained and I had a chuckle or too.  Cheap fun on the strip.

Wednesday, January 05, 2011

Scrolling a ListView’s EditItemTemplate with some help from jQuery

I’ve been using ASP.Net’s ListView control and I cam across a little quirk while setting up the editing bits.  I have an EditItemTemplate defined that has some input controls and a couple of nested ListViews.  It’s a nice way of defining a hierarchal editing view.  If you haven’t used a ListView before, Scott Mitchell have a great tutorial.

My ItemTemplate displays the data for each line of data and has a couple of buttons, one to edit the item, the other to delete it.  When you click the edit button, you get a page refresh and ASP.NET renders the EditItemTemplate with the editing controls and the user can edit the item and save the changes.
The problem was when you needed to scroll down the page to make the EditItemTemplate visible in the browser.  If the height of the ListView was greater than the visible height of the browser, the user would have to scroll down the page to get to the first input control.  I ended up using a bit of jQuery to scroll the edit area into view for the user. 
This is an edited down version of the EditItemTemplate for a ListView that I’m currently working on:
    <div style="padding: 0 0 10px 0;" class="MyEditItemTemplate">
        <b>Calendar Name:</b>
        <asp:TextBox ID="txtCalendarName" runat="server" 
            Text='<%# Bind("CalendarName") %>'></asp:TextBox>
        <asp:ImageButton ID="imgbUpdateCalendar" runat="server" 
            ToolTip="Update Calendar" AlternateText="Update Calendar" 
            ImageUrl="~/Images/accept.png" />&nbsp;
        <asp:ImageButton ID="imgbCancelUpdate" runat="server" 
            ToolTip="Cancel" AlternateText="Cancel" 
            CausesValidation="false" CommandName="Cancel" 
            ImageUrl="~/Images/cancel.png" />
        <br />
        <div style="padding: 5px 0 0 40px;">
            <div style="border: 1px black solid">
                <asp:ListView ID="ListViewChildCalendars" 
                    runat="server" DataSourceID="odsChildCalendar"
                        <span class="SubListViewHeader"><strong>Associated Calendars</strong></span>
                            <asp:PlaceHolder runat="server" 
                        <hr />
                        <%# Eval("CalendarName") %>&nbsp;
                        <asp:ImageButton ID="imgbDeleteCalendar" 
                            AlternateText="Remove Calendar from Group" 
                            ToolTip="Remove Calendar from Group" 
                            OnClientClick="return DeleteConfirmation('C',;" 
                            ImageUrl="~/Images/delete.png" />
                            <b>Calendar Name: </b>
                            <asp:DropDownList ID="ddlChildCalendars" 
                                runat="server" DataSourceID="odsCalendarList"
                            <asp:ImageButton ID="imgbAddChildCalendar" 
                                ToolTip="Associate Calendar with Group" 
                                AlternateText="Associate Calendar with Group" 
                                ImageUrl="~/Images/accept.png" />
                        <span class="SubListViewHeader"><strong>Associated Calendars</strong></span>
                            This list is empty</blockquote>
        <asp:ImageButton ID="UsedForScrolling" runat="server" 
            ImageUrl="~/Images/0.gif" CssClass="UsedForScrolling"/>
    <br />

This EditItemTemplate has a nest ListView to associate other items to item currently being edited.  It’s basically a pick list populated from a drop down list.  Since each selection from the list generated a page refresh, it is important to keep the EditItemTemplate displayed on the page.

All of the controls in the EditeItemTemplate are wrapped inside a <div>, with the CSS class name set to “MyEditItemTemplate”.  Defining a CSS class is great for styling, it also makes it very easy to locate controls using jQuery. Also notice the last control in the template, the ImageButton with the ID of “UsedForScrolling”.  It uses an image of an invisible GIF file.  It’s a 1x1 image, with the single pixel set to the transparent color.  The browser will render it (briefly), but it wont be visible.  You can download the GIF from invisible GIF file link.  I had obtained it from a page by Nick Webb.

You can use the HTML input control instead of an ImageButton, it will not matter too much.  You want to avoid using a control that will render on the screen as a visible item, like a text input control or a check box.  While the code will hide the control after the page has loaded, there would be a flash as the control is rendered, and then removed from the page,  With the invisible GIF, you avoid the brief flash on the page.

This is how we scroll the edit template so that it’s entirely in view:

  1. Check for the existence of the invisible button.  It’s only visible when you are editing an item in the ListView.
  2. Set the focus to that button.  While it will render as a transparent image, it can still receive the focus.  This will force the browser to scroll the page (if necessary) so that the focused input control is in view.
  3. Set the focus to the first input control in the EditItemLayout.
  4. Hide the transparent input button.  While you can’t see it, you don’t want the user to be able to select it.

We implement this with some jQuery code that will do all 4 four steps.  I put the code in a javascript function that I named “ScrollIntoView()” and called that function from the jQuery ready event.

$(function () {

function ScrollIntoView()
    var TempInputControlForScrolling = $(".UsedForScrolling:input:visible:first");
    var FirstEditControl = $(".MyEditItemTemplate input:text:visible:first");

if (TempInputControlForScrolling.length)
else {

The first line in ScrollIntoView() uses a jQuery Selector to match the first visible input control with a CSS class of “UsedForScrolling”.  The next line matches the first visible text input control that is a child of the control with the CSS class of “MyEditItemTemplate”.

If we found an input control, then the length property of the TempInputControlForScrolling variable will be greater than 0.  If no match had been made, the length will be 0.  With the match, we set the focus to the invisible GIF input button, then set it to the first text edit control, then finally hide the invisible button.  If the .UsedForScrolling selector did not match any controls, which will happen when you are not editing an item in the ListView, then the first text input control on the page will get the focus.

Sunday, January 02, 2011

Cable TV Competition coming to Bethlehem? (FiOS TV vs Time Warner Cable)

On January 12th, 2011, the town of Bethlehem (NY) will be holding a monthly town meeting.  One of the topics on the agenda is to have a public hearing to allow the public to voice their opinion on whether or not to allow Verizon to provide FiOS TV.  This would be a competing cable TV service, going up against Time Warner Cable (the current provider).

This should be interesting for a few reasons.  For the last few years,Verizon has provided FiOS Internet service in parts of Bethlehem.  I’m in one of those parts and have had FiOS since it became available.  Verizon started laying down cable through out the entire town for FiOS, but abandoned that task when the economy tanked in 2008.  I heard a rumor that Time Warner was able to put pressure to block additional FiOS deployment, but I haven’t seen any proof of that.

To be able to offer TV to the town, Verizon will have to lay down fiber through out the rest of the town.  Or at the very least, cover the same area served by Time Warner Cable.  That’s a significant expense for Verizon and will take some time to rollout.

This should make Time Warner Cable very nervous.  I know a fair number of people who get the “All The Best” package from Time Warner Cable, with TV, Internet, and telephone service all bundled together,  When Verizon wired up my neighborhood with FiOS, almost no one wanted to switch from Time Warner Cable’s package to some mixture of Time Warner Cable and Verizon.  Verizon did not have FiOS TV, their equivalent to the Time Warner Cable bundle was FiOS  Internet, Verizon phone, and DirectTV satellite TV.  So most people stayed with Time Warner Cable.  The convenience of a single bill trumped the faster broadband speeds offered by FiOS.

If people have the option for a true all in one plan from Verizon, then they a competitive choice to over Time Warner’s plan.  Especially if Verizon offers a discounted rate for the first year or two.  Many people who signed up for “All The Best” were given a discounted rate for the first year (possibly two).  That rate jumped up quite a bit after the discount period was over.  If Verizon has a cheap enough rate, people will be inclined to switch.  Verizon also calls their package “Triple Play” and their introductory offer is $89.99 a month.  That beats Time Warner’s introductory rate of $99 a month.

I’m customer of both companies.  I have Verizon phone and FiOS Internet, and I have Time Warner Cable TV service.  If FiOS TV becomes available, I’m going to consider switching to it.  I spent some time talking to FiOS TV sales agents and it sounds like they offer strong competition to Time Warner Cable.

Verizon has a multi-room DVR called the Home Media DVR.  This is an upgrade from their standard HD DVR.  If you have multiple TV sets with cable, one set will have the Home Media DVR and the rest just need to have set top box (STB).  Each STB can watch shows recorded on the DVR.  I was told by the sales agent that multiple recorded shows can be watched at the same time, from different STBs.  I asked a couple of sales agents how many show could be watch simultaneously and they said it depended on the number of set top boxes.  I don’t think that is true, I think the limit is 2 STBs watching from one DVR based on materials published on the Verizon web site.

The Home Media DVR can record 85 hours of SD and 20 hours of HD content.  If you need more space, you can move shows from the DVR to a PC and back again.  You can also send your own video and music content from a PC down to the DVR,  This uses a feature called the Media Manager.  There have been sneak peeks posted online for the next version of the FiOS TV software that looks pretty cool.  It looks like the next version gets the following:

  • Support for an external ESATA hard drive so you can record more shows at once.
  • The program guide uses the 16x9 screen on HD TV Sets
  • An undelete button (sorry, I can do that now with my TiVo).
  • DVD style chaptering on recordings.

This version (IMG 1,9) is not out yet, but since it would take time to rollout FiOS TV in this town, it should be out by the time we could use it.  Some more information can be found here.

If you use a TiVo with a CableCard to get Time Warner Cable, there are a couple of benefits that you would get by switching to FiOS TV.  First off, no Switched Digital Video (SDV), which means no tuning adapter will be required.  I posted about the annoyances of SDV a while back.

The other TiVo benefit is that FiOS TV does not blindly set the CCI flag to the “Copy Once” setting that Time Warner Cable uses.  “Copy Once” means that you can record the show to your TiVo, but you can’t transfer the show from the TiVo to your PC or another TiVo.  Verizon FiOS TV does not have this limitation.

There might be some drawbacks to switching from Time Warner Cable to FiOS TV.  First off, you’ll need a STB or DVR for any TV that you want to watch cable on.  Time Warner Cable still offers the analog channels.  You can still watch most of the channels on a SD TV just by plugging the coax cable in the back of the TV.  You can’t do that with FiOS, and to be fair, you need a STB for every TV that has the Time Warner Cable digital channels.

Will we get the local sports with FiOS TV?  With Time Warner Cable, we get the local Syracuse and Siena games as part of the standard cable package.  It’s not clear if we would get that with FiOS TV.  We also get a local Time Warner news channel, YNN.  I could not get a straight answer from the sales agents if FiOS TV offered something similar.

There is also the question of support.  Time Warner Cable has local offices and branch locations in this area.  If a remote or DVR fails, you can drive to the mall or TWC office and get it replaced.  Will Verizon have locations in this area?  They don’t have any now, but a quick peek at the online store locator does show many locations across the state.  They also have online forums for support. 

Time Warner Cable has great live technical support via Twitter.  Does Verizon match that?  They both offer “live chat” support, but the Time Warner Cable Twitter support is manned by experts and they know more about the system than the live chat people.

Time Warner Cable does offer a multi-room DVR, but only as part of their Signature Home package.  That is their high end offering, $199 a month in NYC.  That’s more than I want to pay and I don’t want to switch from FiOS Internet back to RoadRunner.  I’m looking forward to hearing more about FiOS TV.