Label Cloud

Wednesday, May 30, 2007

New version of Windows Live Writer is available

Beta 2 of Windows Live Writer is available. Great new look. Tons of new functionality

From the WLW website


New Authoring Capabilities

  • Inline spell checking
  • Table editing
  • Ability to add categories
  • Page authoring for WordPress and TypePad
  • Support for excerpts and extended entries
  • Improved hyperlinking and image insertion
  • Paste Special
Integration and Compatibility
  • SharePoint 2007 support
  • New APIs enabling custom extensions by weblog providers
  • Automatic synchronization of local and online edits
  • Integration with Windows Live Gallery
  • Support for Blogger Labels
Plus...
  • New look and feel
  • Available in 6 languages
  • Improved accessibility and keyboard support
  • Many other frequently requested enhancements!

Get it at http://writer.live.com


Share/Save/Bookmark

Tuesday, May 29, 2007

LogParser

I just added an essential tool to my toolset. Microsoft LogParser. This great tool allows running of SQL queries against a variety of log files and other data sources. Here's an example query

 

SELECT date, REVERSEDNS(c-ip) AS Client, COUNT(*) FROM IISLOG.log WHERE sc-status<>200 GROUP BY date, Client

The same can be ran against event logs, registry, csv, xml files, and much much more.

The link to Microsoft download site is: http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en

There is also a great helper site: www.logparser.com with a large collection of scripts to help with the more complicated admin tasks.


Share/Save/Bookmark

Tuesday, May 22, 2007

ScriptDB

I was looking for a free utility to script database objects from command line. There aren't that many of them out. However, I did find one that was very good at getting the job done and came with full source code. ScriptDB from ElsaSoft.

I made a few changes to the code to make it easier to use the ScriptDB in the build scripts and accept more options from the command line. I was spoke with the original developer Jesse Hersch and he agreed to publish the new application to on an open source repository.

So now: Please check out the openly available ScriptDB on CodePlex at http://www.codeplex.com/ScriptDB. The application does almost everything I need from a command line tool, and now that it is easily available to the community, hopefully it will be improved farther.


Share/Save/Bookmark

Thursday, May 10, 2007

Upgrading application settings

.NET 2.0 has a very nice support for storing custom application settings. It provides a read-only access to the application level settings and read-write access to the user-level settings. For more information check out http://msdn2.microsoft.com/en-us/library/8eyb2ct1(VS.80).aspx

One of the bugs I had to deal with in QueryExPlus is that whenever a new version of the application was released, the settings would get reset to their defaults. The culprit is that settings are stored in the C:\Documents and Settings\\Local Settings\Application Data\\_Url_\\user.config

The location includes the location hash and the version of the executable. The code to keep the old settings is pretty simple.

Add a user level setting called First_Run. Make it boolean and set the default to be False

If this is a first run of the application version, call Upgrade() function, set the First_Run setting so you do not do it again and save the settings.

if (QueryExPlus.Properties.Settings.Default.IsFirstRun)

{

Settings.Default.Upgrade();

Settings.Default.IsFirstRun = false;

Settings.Default.Save();

MessageBox.Show("Settings Upgraded");

}


Share/Save/Bookmark

Monday, May 07, 2007

Asynchronous ForEach and Funky Anonymous Delegates

I was working with some code based on an excellent article on multi-threaded technics in the May 2007 MSDN Magazine. One of the code snippets that was provided is a ForAll routine. For my use, I simplified it a little from the article. The new code snippet is attached

private static void ForAll<T>(IList<T> data, Action<T> a)
{
CountdownLatch latch = new CountdownLatch(data.Count);

for (int i = 0; i < data.Count; i++)
{
int idx = i;
ThreadPool.QueueUserWorkItem(delegate
{
a(data[idx]);
latch.Signal();
}
);
}
latch.Wait();
}

One of the interesting points in the code is the


int idx = i;

It is required, and without it, the delegate will use the value of i that is currently in use by the for loop that surrounds it.


Share/Save/Bookmark

Friday, May 04, 2007

Some thoughts on managing the short and demanding projects

I've mentioned before that I am now a new job, and will be doing some hard core hands on development. May be the development is not really hard core, since I am not doing anything revolutionary, however, for someone who was not writing full time for over 3 years, this sure seems like it.

What makes the task more challenging, are the very different architecture, tight time frame and no time calmly sit learn and think through every detail. So how do you deliver?

I have a certain methodology that I've been using in my development and managerial career and so far it had been very successful in helping me deliver projects. A big focus is on delivery on time. If future can not be implemented on time, it is removed from the list of deliverables, but the timeframe is kept intact. To make this easier, I split the original timeframe into three sections: short, medium and long term. The deliverables are split as well.

The short term timeframe is exactly that - short term. If a whole project is a month long, it is a week. For longer projects, its 3 to 4 weeks. But never longer then a month. The more demanding the schedule, the shorter it is. The deliverables are concrete. If I am not 100% sure that I will deliver, they are not in the list and become a medium to long term deliverables. Once they are set, they do not change unless something critical happens.

At the end of the short term deliverable, the rest of the project is reevaluates almost as a new project. Only at this point, I have the knowledge that was learned during the short term timeframe. The rest of the project gets split up again into short, medium and long.

This way of managing a project allowed for constant on time delivery. If I am not sure I will deliver in the short term, I don't promise it day one. And the item will get reevaluated a short time later. The business is usually happy with the on time delivery that is on time, then a larger promise that is not delivered.

This also allows for reevaluation the priorities. The more dynamic the project, the tighter the timeframe's - the more often the priorities are reevaluated.


Share/Save/Bookmark

Switching gears

I just switched jobs, and my new environment and responsibilities are very different from what I had over the past few years. So my next few posts will be on the switching gears and the differences that are felt.

Here's the preview


Share/Save/Bookmark

Thursday, April 19, 2007

Excellent shortcuts in Google Calendar

I've been using Google calendar for some time, and I was always complaining that Create Event popup did not provide the ability to enter event details such as time and location. It only provided one line "What" entry field.

Well... I learned something new today. The "What" field is extremely powerful. It has ability to parse out time and location details from the entered string. For example, entering "Dinner at My Place 6PM to 8PM" will create an appointment from 6:00PM to 8:00PM. The "What" will be "Dinner at My Place" and location will be "My Place". There is ability to set duration like "Dinner at 6PM for 2hr", do recurring meetings, etc...

Full help and available shortcuts are here: http://www.google.com/support/calendar/bin/answer.py?answer=36604


Share/Save/Bookmark

New version of Fiddler 2

A new version is of the fabulous Fiddler tool is available at http://www.fiddler2.com/fiddler2

I didn't realize that Fiddler provide support for creating Visual Studio WebTest scripts. The tool is getting better and better.


Share/Save/Bookmark

Wednesday, April 18, 2007

Excellent MSDN Managazine article on Parallel Data Structures and Algorithms

Last MSDN Magazine has an excellent article on Parallel Dat Structures and Algorithms. Article provides implementation source code and explains the following

  • Countdown Latch
  • Reusable Spin Wait
  • Barriers
  • Blocking Queue
  • Bound Buffer
  • Thin Event
  • Lock-Free LIFO Stack

Here is a link to the full article on MSDN: http://msdn.microsoft.com/msdnmag/issues/07/05/CLRInsideOut/

Related Arclie: "What Every Dev Must Know About Mulithreaded Apps" msdn.microsoft.com/msdnmag/issues/05/08/Concurrency


Share/Save/Bookmark

Monday, April 02, 2007

Confirmation Dialogs vs. Undo dilemma

I just deleted a content section from my yahoo homepage. No confirmation, no UNDO. Its just GONE....

When designing a user interface, developers always have to take into account the dilemma between the ease of use, and safety/compliance.

One example of such dilemma is confirmation boxes. Many application UIs are designed by developers with development skill sets in mind. That means, and extra confirmation box is OK. However, for most users, that choice of UI is pretty annoying. The other extreme, is to let the user take full responsibilities for his actions: if he makes a mistake, he's at fault, and we have a CYA because we can show him an audit trail of how he made the mistake. And than, there's the great compromise - let you user do everything he needs, but provide a full UNDO functionality. This is the hardest to implement, yet, provides the easiest and most convenient UI.

Here are the perfect example: Why do we need a confirmation box when deleting a file in windows, if it will go into the recycle been anyway, and I will be able to restore it?

Google homepage has a great example of how things should be done: when you click on the X to close the content section, the home page shows a link that allows you to UNDO the operation. Easy, clean, does exactly what it needs to do.


Share/Save/Bookmark

Friday, March 30, 2007

Analyzing local webservices using Fiddler

Fiddler is a great tool for analyzing web traffic. it can be used to monitor, review and profile web sites as well as web services. The current realease version is great, but the version 2 Alpha is even better, since it allows interseption of HTTPS traffic.

I've used fiddler to profile our development and production website. It is also a great tool to monitor webserivce traffic. It will be able to show full incoming and outgoing message payloads. However, when debugging against localhost, Fiddler will not be able to intercept the traffic. There is a simple change that is required to be able to debug against localhost. Full description is at http://www.fiddlertool.com/Fiddler/help/hookup.asp - Section "Why don't I see IE7 or System.NET traffic sent to http://localhost or http://127.0.0.1?"

Here are the steps I used to be able to monitor smartclient application running against localhost (my development webserver is running on port 1652):

  • Start Fiddler v2
  • Select Rules -> Customize Rules...

  • Scroll down to OnBeforeRequest and add the override code if (oSession.host.ToUpper() == "SMARTAPP") { oSession.host = "127.0.0.1:1652" }

  • Point your application to SMARTAPP instead of pointing it to localhost:1652

That's all. Worked like a charm.


Share/Save/Bookmark

Thursday, March 29, 2007

Long distance travel - the Google way

How do you get from New York to Moscow? Google will show you the way.

Google will give you complete turn by turn directions including "Swim Across Atlantic Ocean". Check it out, it might be an interesting trip if you want to save on airfare.

Links:
Google Suggests You Swim Across The Atlantic Ocean
Screw air travel: Google suggests you get out and swim


Share/Save/Bookmark

Monday, March 26, 2007

New Sansa e260 + USB connectivity through a keyboard = almost system rebuild...

I just got myself a Sansa E260 MP3 player. A pretty good deal for $95 at Buy.Com after Google Checkout

Its a pretty nice device. Plays everything I need it to play - WMA, MP3, Video (after conversion - pretty annoying), Images (After conversion - again pretty annoying), Radio. The UI is OK. Reminds me of a mix between Windows Media Center and IPod. I think IPod is easier to navigate, but Sansa is still not bad at all. For $95, its a great little toy.

I connected it at home to me Vista laptop with no issues at all. Everything worked like charm. So I brought it to work and decided to copy the latest hanselminutes podcast to it. That's when the trouble started.

I have a media USB keyboard from Dell. Nothing special, a default keyboard that came with the system. It can (or rather should) act as a USB hub providing 2 extra USB plugs. I should mentioned, that I never used it as a hub before, and just assumed that it worked. I plugged the Sansa in, and ..... Nothing happened. Media player did not show the device. Running "Add hardware" wizard showed a nice little dialog: "you can install only one device at a time". Rebooting didn't help. Google search found a few articles about the error with almost all of them pointing to a specific registry - "Remove the key and reboot". Well.... Being adventurous - I do exactly what the posts suggest. After the reboot - I see a "Windows XP Setup" screen as the first window, Before any network logons, startup scripts, etc... After rebooting in safe mode, windows brings up an error message: "Setup can not run in safe mode" and reboots. The "Windows XP Setup screen" starts up again and system looks hung up, with only occasional HardDrive light. After 30 minutes or so, I decide that I might have to rebuild it - or at least repair from the DVD.

In another 30 minutes or so, the system finally starts up, and seems normal. However, the original problem is still not fixed. The Sansa still does not connect, the "Add new hardware" wizard still does not start up. So I decide to go back to basics. Crawl under my desk, and plug it into the back of the machine. Hooray, it works like a charm. The system recognized it within 10 seconds, brought up WMP, and showed it as the device.

So... Lessons learned:

  1. Minimize experiments unless you have spare machines or multiple harddrives. (I have both so I was able to work while my main system is down, and rebuild OS still keeps all my important files intact)
  2. KISS - Keep it simple. When you need to plug in the new device - don't use the USB keyboard as a hub if you never did it before. Go straight for the USB port you trust.
  3. DO NOT SCREW AROUND WITH REGISTRY. Especially based on forum posts unless you completely trust people who trust them


Share/Save/Bookmark

Friday, March 23, 2007

My.Yahoo Beta

Two days ago, I switched my home page to the new My.Yahoo Beta. Looks very promising. Here are some initial comments

  • The site definetely looks flashier. I like the improvement, but it took me a day to get used to it.
  • My original layout was in 3 columns, with the middle column being wider then the side columns. That layout is no longer available, since all columns are of the same width. That's a bit of an overkill for some feeds that are really narrow.
  • There is a pretty big square advertisement that you can't move. It used to be flat and wide, and I was able to visually ignore it, now it is distracting. It also moves the right column lower and not where I'd like it to be.

I didn't have any issues with performance. Overall impression is pretty good


Share/Save/Bookmark
Directory of Computers/Tech Blogs