Label Cloud

Thursday, November 29, 2007

Google Maps for Mobile - Impressions Day 2

I just took a 60 mile trip and was checking My Location on the Google Maps for Mobile. To my surprise, it was pretty accurate during the whole trip. The map would place me on the highway or within a 50 yards of the highway along the route.

Another interesting detail, I didn't have to request the location all the time, the position would adjust as the car was moving - very much like the it does on the GPS.

That brought an interesting thought - Now Google has not only the locations where their devices are being used, but the movement patterns as well. That's a lot of information that can be used for both good and not ...

Technorati Tags: , , ,


Share/Save/Bookmark

Wednesday, November 28, 2007

Google Maps for Mobile - now with My Location

Today, Google made a new Google Maps for Mobile available on their site. The new beta version includes a My Location functionality that places your location on the map based on the information received from the cell phone towers.

I've installed the app on my Blackberry Curve. The My Location function is great, even though it is not as good as a GPS. While in my office, Google Maps placed my location within around 100m of my real location. That was great. The neat trick is that positioning works even when you are inside a building, something that GPS can not do.

However, near my house, it around 1 mile off (1.5 Km). Still good, considering makes it easier to request directions since its a lot easier to select the source point on the map.

I am sure they will be improving the app as time goes on as well.

Get the application from http://www.google.com/gmm

Technorati Tags: , , ,


Share/Save/Bookmark

Thursday, November 22, 2007

Subversion pre-commit hooks

I am using a wonderful source control product Subversion. More information is available on http://subversion.tigris.org

A great future of subversion is an ability to run a server script before the check-in is committed . The script has the ability to rollback the check-in. We are using this functionality to enforce comments for every check-in.

To create a script, place any executable file into a hooks folder in the repository. You can start with a pre-commit.tmpl template file that is located there already. The template is a perl script that accomplishes exactly that functionality.

Our subversion runs on a windows system, so we converted the perl script into a batch file

"c:\Program Files\Subversion\bin\svnlook.exe" log -t %2 %1 | FindStr [a-zA-Z0-9]
IF %ERRORLEVEL% EQU 0 GOTO OK
echo "Commit Comments are Required" >&2
exit 1
:OK
exit 0

Place the code into a pre-commit.bat batch file in the hooks directory.

Technorati Tags: ,,,


Share/Save/Bookmark

Monday, November 19, 2007

VS 2008 Wait is over

VS 2008 is RTM on November 19th

Get it now...

http://microsoft.com/vstudio/

Technorati Tags: , ,


Share/Save/Bookmark

Slacking around with slacker.com

A great music service is Slacker.com

Slacker.com provides an Internet radio with a few great twists.

  1. It is customizable. You can create your own radio stations by flagging favorite artists.
  2. You can play it through the Web Page or via a installed music player
  3. It lets you take the radio with you by letting you buy a portable music player.

This is definitely something that I am looking forward. Some things from my wish lists are

  1. Ability to tap into an ITunes music library for extended selection
  2. Ability to use a cell phone network for data transfer, so I am not tied to the WiFi or their proprietary DJ Technology (Can someone please explain that to me)
  3. Bluetooth in the portable device

So far, I am loving it.

Technorati Tags: , , ,


Share/Save/Bookmark

Wednesday, November 07, 2007

Windows Live Writer is out of Beta

The excellent tool that I am using to write blog entries is finally out of beta. Get it now.

http://windowslivewriter.spaces.live.com/default.aspx

Technorati Tags: , ,


Share/Save/Bookmark

Tuesday, November 06, 2007

Compiling an empty project from Command Line (Compiler Error CS2008)

I've encountered an interesting issue compiling a WebSite Project from command line using msbuild.

The project did not have any .cs source files because the pages referenced assemblies from a different project. Compilation was successful in Visual Studio, but using msbuild, I was getting a compiler error CS2008 - No inputs specified

Apparently, Visual Studio handles an empty project properly, but command line csc compiler does not. To solve the issue, just add a blank .cs file (I actually placed the comment explaining the issue in the file)

Technorati Tags: , , ,


Share/Save/Bookmark

Tuesday, October 23, 2007

Removing (Uninstalling) ClickOnce Web deployed application from Application Cache

I keep looking up a command to completely uninstall a ClickOnce application form the Application Cache. If the application is deployed using "Run from the Web" method, it is not available in the "Add/Remove Programs" control panel. To remove it, you have to clear the application cache. An important note: this will remove ALL applications from the cache. That is usually not a problem, since the next time you run them, they  will be downloaded.

To clear the cache, run the command "mage.exe -cc" from the Visual Studio command prompt.

Mage is using an API call to accomplish this functionality

CleanOnlineAppCache from Dfshim.dll

You can achieve the same functionality by using a command line tool RunDll32.exe

rundll32 %windir%\system32\dfshim.dll
CleanOnlineAppCache

Or create a batch file with the above command

Technorati Tags: , , ,


Share/Save/Bookmark

Wednesday, October 17, 2007

SecureString class

I found a reference to an interesting class while reading MS blogs. System.Security.SecureString might come in handy in whenever you want to keep strings in memory securely.

Technorati Tags: , ,


Share/Save/Bookmark

Monday, October 15, 2007

Software Quote

I am rereading the Code Complete book again. And this quote is just perfect

There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. -C. A. R. Hoare

Someone should write a book "Refactoring to simple" or "Designing so you don't have too"

Technorati Tags: ,


Share/Save/Bookmark

Saturday, October 13, 2007

Providing multiple endpoints for the WCF service

I had to implement compression for an internal WCF service. A requirement however is to make sure that older version of the service is left as is. To achieve that we've added another endpoint to the an existing binding

Here's the original Configuration File for the server.

<services> <service name="Repositories.Clients" behaviorConfiguration="DebugBehavior"> <endpoint name="Clients" contract="IClients" binding="basicHttpBinding" /> </service> <services> <behaviors> <serviceBehaviors> <behavior name="DebugBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors>

The URL for the service is http://hostname/Clients.svc

Here's the new file

<services> <service name="Repositories.Clients" behaviorConfiguration="DebugBehavior"> <endpoint name="Clients" contract="IClients" binding="basicHttpBinding" /> <endpoint name="ClientsCompressed" contract="IClients" bindingConfiguration="compressedConfiguration" binding="customBinding" address="compressed"/> </service> <services> <bindings> <customBinding> <binding name="compressedConfiguration"> <compression compressionMode="GZip" compressionLevel="Normal"/> <httpTransport/> </binding> </customBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="DebugBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors>

The new URL for the service is http://hostname/Clients.svcc/compressed

The old service works just like before. But the new one requires compressed data. It is serviced by a completely separate binding and has independent configuration.

 


You can follow the same above example to specify multiple client endpoints as well. However, if multiple endpoints exist, the WCF Proxy has to be created by specifying an endpoint name.

 

localhost.Clients1Client client = new localhost.Clients1Client("compressed");

Technorati Tags: , ,


Share/Save/Bookmark

Tuesday, October 02, 2007

Working with Java (pure Java)

Last couple of weeks I was writing a lot of code for a Proof Of Concept project. Having to switch from my "native" C# to Java brought out a very interesting experience. Here are some high lights

  • Java is not as evil as it might seems at first. - It is fast, clean and has LOTS and LOTS of libraries and tools available to support your work.
  • It is very possible port logic from GOOD C# code to java code. I am talking about server side code, not WinForms. The development style is very similar. The APIs and Frameworks are so similar, that often the difference in code is only the casing of the function calls.
  • Eclipse Rocks! - So far, I've worked in eclipse, and am totally loving it. One one hand it is a very easy to understand UI with great support for development. On the other hand, it has more options and variations then any other development tool I've ever seen. I wish someone would have adopted it for .NET development.
  • Some things I still don't understand and / or miss. For example - Properties definition instead of using Getters/Setters. Ability to write services. I am still not sure how to run Java daemons in a Unix environment, but for Windows they have to be wrapped into 3rd party tools.
  • It seems that Garbage Collection is implemented better in .NET. I've never had to worry about maximum and minimum heap sized, or freezes within my application for GC run. It seems that those are often the topic sand concerns of the Java world. I've hit the "Out of memory" exceptions on multiple occasions so already. The only time I've ever received one in .NET was with a recursion bug.

Overall. The experience of writing in a different language is excellent. It gives you a very different (and often the same) perspective on software development. I probably would have the chance to learn a new language if I can't apply it, however, if there is a way to apply a new language - I would say - Go for it.

Technorati Tags: , ,


Share/Save/Bookmark

Monday, September 17, 2007

System freeze and SATA Command Queuing

After building the new PC, I've been experiencing constant system freezes. Windows would freeze for about 30 seconds - all keys including CTRL+ALT+DEL or CTRL+SHIFT+ESC that usually switch to the appropriate utilities would work. 30 seconds later, the system would go back to its regular state, like nothing would happen. All actions that where queued up during the 30 second "freeze" would fire up. This was happing during performance intensive operations as well as when the computer was relatively free, on average around twice an hour.

After upgrading all drivers, motherboard BIOS and removing disconnecting all peripherals - I finally found a solution on Google that worked. Apparently - NVidia SATA drivers enable Command Queuing by default even though many drives do not support it. Disabling the option seem have fixed the problem. I've been "Freeze" free for 4 days now.

To see uncheck the option:

  • Right click on computer, select "Properties
  • Select "Device Manager"
  • Find "Storage Controllers"
  • For each "NVIDIA nForce Serial ATA Controller" select Properties, and uncheck "Enable Command Queuing" option

DeviceManager

SATA


Share/Save/Bookmark

Thursday, September 13, 2007

Grouping emails by Conversation

When reading emails in GMail, they are organized by conversation so related emails are easy to see. Follow the following steps to create the same view in outlook.

  • Select View -> Arrange By -> Current View -> Define Views
  • Select "Messages" and click "Copy..." button
  • Rename the new view to be "Messages by Conversation
  • On the new view, select "Modify...", then "Group By..."
  • Select "Conversation" in the first group by drop down.
  • Hit OK to apply the view

 

Technorati Tags: ,


Share/Save/Bookmark

Asynchronous ForEach (Part 2)

I wrote about creating an asynchronous ForEach method before. Apparently, there is a going to be a TPL (Task Parallel Library) available that will do the same type of functionality (and more I am sure)

Parallel.For(0, 100, delegate(int i) { a[i] = a[i]*a[i]; });

Technorati Tags: ,


Share/Save/Bookmark
Directory of Computers/Tech Blogs