My parents got me a Sony BD-S350 Blue-Ray player for Christmas.  Like all Blue-Ray profile 2.0 players it has an Ethernet port.  While hooking everything I came to a realization about my home network; it has been overrun with STUFF.  Networks are for computers right?  Well I have an Xbox 360, a TiVo Series 3, a Wii, and now a Blue-Ray player all plugged into my network.  That’s twice as many things as computes on my home network.   The only question now is what new toy am I going to plug-in next!

Posted at 12/28/2008 10:04 PM
Comments [4] - Permalink

So I had a huge post ready to go about how to use ASP.Net Ajax createDelegate and createCallback functions together to get a function that will keep a property scoped this reference and pass predetermined arguments when I came across this article.  It is a great article about combining the functionally createDelegate and createCallback into a new function called createDelegateCallback.  This is a nice addition to the ASP.Net ajax library.

Posted at 11/12/2008 9:48 PM
Comments [0] - Permalink

I'm a huge Blackberry fan.  I have had a Blackberry for close to 6 years now and have never looked back. They do what they are designed to do (email and phone), no questions asked.  I've used windows mobile phones and have a few friends that have them and it seams like they are always having issues.  The iPhone is definitely a strong competitor but without a real keyboard and push email its not an option for me.  There is one huge are area that Blackberrys and RIM (Research In Motion) is lacking in and that's developer support. While there are many things to complain about the issue that pains me the most as a web developer is the Blackberry Browser.

The iPhone browser rocks.  The Blackberry Browser doesn't.  Its like developing for IE 4.0.  There is limited xhtml  and css support and if you follow the documentation its possible to create a functional website that looks decent  on the device.  There is very little javascript support, but it does have support to get GPS coordinates from a device with builtin GPS, like the Blackberry 8800, 8820, and 8310, which could be used to create some very cool location based websites.  Unfortunately the documentation is completely wrong.   The information in the content developer guide is just plain wrong and sample code on the blackberry developer website isn't even valid javascript.

Here is what I have found to be a more accurate description of the blackberry.location javascript API in the blackberry browser based on my testing using a Blackberry 8800 running v4.1.1.90:

gpsblackberry.location.latitude & blackberry.location.longitude:
The current latitude and longitude of the device.  The first time you access either of these properties the user is prompted if they would like to let the website access location information.  There is currently no setting on the device or on the enterprise server to disable this prompt or whitelist specific sites. If the user selects "No" then "0" will be returned for the latitude & longitude.

blackberry.location.setAidMode(aidMode):
This method sets the GPS aid mode to be used. 0 - Cell Site, 1 - Assisted, 2 - Autonomous.  The documentation is mostly correct on this method. "Autonomous" is the most accurate and most supported but also the slowest. The other two methods require carrier support and my carrier doesn't support it so I couldn't test them.

blackberry.location.refreshLocation():
This method request and update of the location from the device.  This method is non-blocking so if you try to read the laitude/longitude right after calling this method you may or may not get the newest information.  This method returns true on success.  If you have set an invalid AidMode (0 or 1 and the carrier doesn't support that feature) this method will return false and the callback method will never be called.

blackberry.location.onLocationUpdate(callbackJS)
This method is the worst a far as incorrect documentation goes.  This method sets a callback function that is called after you call refreshLocation() and the device actually has the new location data.  However in my testing it appears that this does not get called once per refreshLocation() call.  After you call refreshLocation() the callback function is invoked continuously when the location changes (about every 10-15 seconds in my testing). Another very important note is that you have to pass this method a string that gets evail-ed (like you can do with setTimeout).

 

Here is a sample that puts all of the pieces together.  It simply shows a javascript alert with the latitude and longitude when the location is updated:

   1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
   2: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   3:   <head>
   4:     <title>GPS Testing</title>
   5:     <script "text/javascript">
   6:  
   7:       // called when location object changes
   8:       function locationCB()
   9:       {
  10:           alert("Latitude "  +
  11:               blackberry.location.latitude);
  12:           alert("Longitude " +
  13:               blackberry.location.longitude);
  14:           return true;
  15:       }
  16:  
  17:       // test to see if the blackberry location API is supported
  18:       if( window.blackberry && blackberry.location.GPSSupported) {
  19:             document.write("GPS Supported");
  20:  
  21:  
  22:             // Set our call back function
  23:             
  24:             //WRONG: this would call our call back function immediatly, not after the refresh
  25:             //blackberry.location.onLocationUpdate(locationCB());
  26:             
  27:             //WRONG: the blackberry browser won't support passing a method.
  28:             //It will error on refresh and all javascript processing on the page will stop
  29:             //blackberry.location.onLocationUpdate(locationCB());
  30:             
  31:             
  32:             // RIGHT: pass a string that calls our method
  33:             blackberry.location.onLocationUpdate("locationCB()");
  34:             
  35:             // set to Autonomous mode
  36:             blackberry.location.setAidMode(2);
  37:         
  38:             //refresh the location
  39:             blackberry.location.refreshLocation();
  40:       }    
  41:       else
  42:       {
  43:         document.write("This Device doesn't support the Blackberry Location API");
  44:       }
  45:     </script>
  46:  
  47:   </head>
  48:   <body>
  49:   </body>
  50: </html>

 

Hopefully someday we will get a more feature rich, fully documented, Blackberry browser with DOM and AJAX support  (Firefox mobile anyone?).  Until then hopefully I have saved someone days of debugging incorrectly documented features.

Posted at 5/8/2008 2:40 AM
Comments [16] - Permalink
Here is a simple script that will automate the process of replacing notepad.exe with notepad2.exe in Vista.

I borrowed the idea from Jens Schaller and Lifehacker. Just save the code in a .bat file in the same directory as notepad2.exe and it will take care of the rest.
takeown /F c:\windows\notepad.exe
icacls c:\windows\notepad.exe /grant administrators:F

takeown /F c:\windows\system32\notepad.exe
icacls c:\windows\system32\notepad.exe /grant administrators:F

copy notepad2.exe c:\windows\notepad.exe
copy notepad2.exe c:\windows\system32\notepad.exe
Posted at 4/14/2008 10:36 PM
Comments [0] - Permalink

It looks like the fat lady is singing for HD DVD.  Netflix just sent me an email that they are switch to Blu-Ray only.  They are even going to switch the movies that are already in my queue to standard definition DVDs.  I hope that Microsoft releases a Blu-ray add on for Xbox 360.

netflix email

Posted at 2/11/2008 3:56 PM
Comments [0] - Permalink

We have been running Exchange 2007 basically since it was released.  Over all it is a great product and quite an upgrade over Exchange 2003.  Last month SP1 was released with some much anticipated improvements, including major improvements in the administrative UI, OWA, and more.  Unfortunately not all of us gets those new features.

The service pack installer is actually a full copy of exchange, not an patch. So just like the first time you install Exchange 2007 the setup runs through the "Readiness Check" to make sure you meet all the requirements.  Seeing how Exchange is already installed I wasn't too concerned about not meeting any of the requirements.  Boy was I wrong.  I was quickly greeted with an unexpected error message:

Error:

Microsoft Exchange Server 2007 setup cannot continue because this computer belongs to a domain that has a single-labeled DNS name. DNS domain name: mydomainname

Humm.  That's not good.  It appears that exchange doesn't like the fact that the windows domain name is "mydomainname" instead of something like "mydomainname.local" or "mydomainname.com".   I knew this day would come.  We have avoided renaming the domain for a while now because it is not a fun process.  The instructions to rename a domain are contained in an 82 page 1.2MB word document, and that's before you event get into the exchange stuff.

So I read all the documentation and was prepared to pull the trigger when I came across an interesting Knowledge Base article.  In summary you can't rename a domain that has an Exchange 2007 server in it, and if you do the only solution is to rename it back.

So I can't install SP1 with a single labeled DNS name and if you have Exchange 2007 already installed you can't rename the domain.  Microsoft just backed me into a corner.

I'm not alone as it appears there are several other people with this problem.  The worst part is the lack of documentation.  None of the release notes talk about this the requirement.  Even the new Deployment checklist doesn't say anything about it.

HELP MICROSOFT!!!  We want SP1 too.

UPDATE: 
It looks like the Exchange team is listening.  They posted on their blog that they are looking into the problem and will have an update by February 15th.  If you don't want to wait commenter inf pointed me to a registry hack to get around the domain check.
Posted at 12/20/2007 7:52 PM
Comments [4] - Permalink

A few weeks ago I decided to give Visual Studio 2008 a shot after reading all the good reviews.  I'm now using it as my primary development environment with and overall it is a nice upgrade.  Intellisense feels smarter, the IDE looks cleaner, the web designer is much nicer, and lots of other good stuff.  Unfortunately I have run into a few problems.

Web Deployment Projects - Currently web deployment projects are not supported in VS 2008.  I am a huge fan of WDP, recompiling a web application project not only makes the site load faster (at least on the initial page load) but also simplifies deployment.  It leaves me with a nice clean directory free of .vb or .cs files that I upload with having to worrying about deploying source files.  It also ensures that my aspx pages don't have any parser errors.  For VS 2005 WDP shipped as an add-in and I was hoping it would be included as part of VS 2008, just like Web Application Projects.  After some searching it look like we aren't going to get WDP in VS 2008 until after the final version ships.  Currently the top suggestion on Microsoft connect is for WDP to be included in VS 2008.  Maybe I'm wrong but it seams as if WDP isn't a very complex add-in, its just a wrapper around asp_merge.exe 

Microsoft Visual StudioBusiness Intelligence Projects - It looks like SQL Server Report Services projects (*.rptproj files) aren't supported either.  You get a lovely error message that lets you know that doesn't sound very optimistic about getting these reports to open in VS 2008.  My guess is I'll have to wait for SQL Server 2008 and will then be forced to update my sql server in order to use my development tools.

All in all I'm a VS 2008 fan, but its still in beta and it shows.  I rarely have major problems, like a complete crash, but the smaller issues can still be bothersome.   It is great thought that Microsoft is getting these beta versions in the hands of developers, hopefully in an effort to make a better final product.

Posted at 9/19/2007 11:14 PM
Comments [0] - Permalink