Label Cloud

Thursday, August 31, 2006

Where Is Time

Did you ever wonder where did you spend your 8 hour work day? Well, Here's a little utility I wrote to find that out.

Where Is Time?

The project is in C# - .NET 2.0. You should have no problem compiling it in 1.1 either. It has an example of how to use multi-threading with Windows forms, and .NET Interop.

Any comments are welcome


Share/Save/Bookmark

Monday, August 28, 2006

More Powershell tricks

Two other usefull scriptlets for the powershell

First function filters for only CLR files
Second returns CLR version that the assembly was compiled against.

function IsClr() {
process {
trap {continue;}
$asmb = $null;
$asmb = [System.Reflection.Assembly]::ReflectionOnlyLoadFrom($_.FullName);
if ($asmb)
{ $_ }
}
}

function ClrVersion
{
param ([System.IO.FileInfo] $fileInfo)
$asmb = [System.Reflection.Assembly]::ReflectionOnlyLoadFrom($fileInfo.FullName);
$refAssemblies = $asmb.GetReferencedAssemblies();
foreach ($refAssembly in $refAssemblies)
{
if ($refAssembly.Name -eq "mscorlib")
{
$refAssembly.Version
break;
}
}
}

Use Examples

dir | Clr

dir | IsClr | foreach-object{$V = ClrVersion($_); $_.Name + " " + $V.ToString()}


Share/Save/Bookmark

Sunday, August 27, 2006

Microsoft Atlas framework is renamed to ASP.NET 7.

This is one I did not expect. Joshua Flanagan has a blog entry enitled Formerly known as Atlas. It seems that Atlas framework has gotten a new name: it is is now officially called ASP.NET 7.0.

First of all, what ever happened to ASP.NET 3.0-6.0 (Joshua's blog explains the story). Second - I thought Atlas is about AJAX. Does it mean that Microsoft is using whatever left over projets it has to and calls them new versions of the software. May be not, may be it will have some more enhancements outside of Ajax. We'll just have to wait and see.


Share/Save/Bookmark

Friday, August 25, 2006

Trouble with the new Blogger Beta

Recently I started to use two new beta pieces of software for blogging. A few days back, I started to use Windows Live Writer The tool rocks. It did exactly what I need it to do, had a simple and clean interface, connected to blogger, and worked both in the corporate network and at home. Two days ago, I switched my blogger account to the new Blogger Beta - the second beta software. This experience was much less pleasing. I was planing to take a look at the new features. However, to use most of them, you'd have to switch your layout, and therefore loose the customizations that I had previously. The more serious issue that I've encountered was that my Windows Live Writer no longer worked! Apparently it is a known issue, Windows Live Writer is not compatible with Blogger Beta. I think its just an example of google not wanting to play nice with others. Too bad.


Share/Save/Bookmark

First time scripting with Powershell

Powershell (used to be Monad shell) is the great new command line shell from Microsoft. Now in RC1 with RC2 soon to come. Not only is it written in .NET, but .NET framework is at the core of the Powershell functionality. The shell is extremely scriptable, and even thought the language is not 100% C#, it gives you ability to tap into most of the .NET features.

Some things that you were only dreaming about doing in the old command prompt become extremely easy.

I wrote a simple script to let me check which assemblies are compiled with debug.

function IsDebug() {
process
{
trap {continue;}
$asmb = $null;
$asmb = [System.Reflection.Assembly]::ReflectionOnlyLoadFrom($_.FullName);
if ($asmb)
{
$Attribs = [System.Reflection.CustomAttributeData]::GetCustomAttributes($asmb);
foreach ($attrib in $Attribs)
{
if ($attrib.ToString().StartsWith("[System.Diagnostics.DebuggableAttribute") -AND
-NOT $attrib.ToString().StartsWith("[System.Diagnostics.DebuggableAttribute((Boolean)False") )
      {
       $_.Name + " Is DEBUG " + $attrib.ToString();
      }
     }
    }
  }
}

After the script is loaded, all I have to do is pipe a dir commandlet to IsDebug function like

dir | IsDebug($_)


Share/Save/Bookmark

Tuesday, August 15, 2006

What's in it for me?

I have a reputation for asking direct questions, and today was no different. I vendor that my company is dealing with has a product that is designed for our customers. So of course, they would like for us to talk about their product, and hopefully recommend it over their competitors. That's when I asked: "What's in it for me?" No, I don't mean, me personally, I mean for my company. How would proposing a third party vendor would makes my company stand out. And why do I have to ask a this question in a conversation about a business "relationship"

Lets look a the bigger picture. There are strong business relationships and there are weak ones. In a weak relationship, two companies work together by not stepping on each others toes, at least not too much and not every day. I can mention an unrelated product, I might even provide positive feedback, may be even recommend it to my customers. But all that comes without any direct benefit to my business.

In a strong business relationship, two companies work together to provide a better business solution for their customers. This relationship has to work both ways, and has to have a very clear and visible benefit to everyone involved. It has to be a wide, two way street.

This is happens all the time. Software and Hardware vendors communicate all on regular basis through these relationships. DELL and HP partner with Microsoft to make sure their hardware and software is tested for compatibility. Oracle partners with Sun to make sure they can properly scale and utilize the technological advances. Game developers work with console vendors to create games, and console vendors support game developers so their consoles have popularity.

So lets all work together for the benefit of both teams, I am all for it. I'll just make a note to myself, to always make sure I tell the other party what they will get out of a business relationship with me during the presentation. That way I'll avoid the question "What's in it for me?"


Share/Save/Bookmark

Jumping on the Windows Live Writer bandwagon

I am trying out the new Windows Live Writer. You can download it from the link above.

I really like the clean interface, the way that it integrated with my blogspot account and the .NET plugins. I have a good feeling about that I will be adding it to the list of my Toolset


Share/Save/Bookmark

Friday, August 04, 2006

I just got published on DevX - Gain Control of your .NET Logging Using log4net

Hey. I just got published on DevX

Gain Control of your .NET Logging Using log4net
Don't build logging capabilities for your applications from scratch; you can get robust and flexible logging functionality for your .NET applications with the free open source log4net framework, and then extend it to support custom needs.

by Timur Fanshteyn


Share/Save/Bookmark

Tuesday, August 01, 2006

Bush in good health but gains weight | US News | Reuters.com

Bush - The next Oprah. How many pounds did he loose / gain this week :)

Bush in good health but gains weight | US News | Reuters.com: "WASHINGTON (Reuters) - President Bush said on Tuesday he had gained four pounds (2 kg) because of 'too many birthday cakes,' but said he was feeling fine after his annual physical."


Share/Save/Bookmark