Wednesday, March 18, 2009

Is there protection in this virus?

So ... I have McAfee products installed on my PC laptop. They are supposed to protect me from undesirable processes that hog system resources, and protect me from things like annoying pop ups. McAfee software does this by hogging system resources,


and annoying me with pop ups.

Wednesday, March 11, 2009

different blogs?

While researching some features of GoDaddy.com hosting, I found the following blog software that might be useful for future use.

BlogEngine.NET
- GoDaddy reference
- free, open source .net
- Features
- multi-author support


LifeType
- cool demo
- Features
- easy deployment, "plug n' play"
- easy YouTube

Thursday, March 5, 2009

Blend Feng Shui (Keyboard Shortcuts)

I am having a poopy experience somewhere in the combination of Visual Studio 2008, ReSharper 4.5 and XAML editing. Lots of crashing and slowness. So, I have been using Microsoft Expression Blend to edit XAML controls. I find myself performing the following keyboard shortcuts almost every time I open Blend and/or a XAML file:

Blend:
  • F4 - Hide Panels (sort of like Full Screen)

XAML file:
  • F11 (twice) - Cycle Code/Designer view to split screen
  • [CTRL]+0 - Sets the Designer zoom to Fit Screen and, more importantly, centers the control in the Designer pane

Ahh!

Sunday, March 1, 2009

Vista 64-bit on Inspiron 1720 ... meh

I am in the process gathering all the resources to rebuild my PC laptop. It's been about 18 months since the OS was installed, and Windows is getting old and cranky. I have a Dell Inspiron 1720 with 3gb of RAM. I considering trying to do Vista 64 bit, but just glancing down the following thread convinced me it wasn't worth it: http://en.community.dell.com/forums/p/19244280/19378694.aspx

meh ...

I guess, all this time I have had a few issues with Vista, but certainly not the angst that keeps getting spouted about it. I still have UAP enabled. I run Visual Studio as a non-administrator, etc., etc. But, all the talk about Windows 7 and Microsoft's pseudo-admission that they missed the boat with Vista has done more to dampen my enthusiasm for Vista than any actual or perceived failure of the OS.

So, if trying out something new on Vista, like putting 64bit Os on my box, requires even a little extra amount of effort, I loose my appetite. Kind of a shame, really. Poor, maligned Vista.

Cancel or allow? ... allow

Friday, February 6, 2009

WPF control that shows today's date

All I wanted was to show today's date on a screen. It took a few minutes of Googling to put the pieces together.

Here's the short and skinny:
<TextBlock Text="{Binding Source={x:Static System:DateTime.Now}, StringFormat=\{0:MM/dd/yyyy\}}"></TextBlock>

Just to be sure, here's how it would fit in if you were to start up a brand new WPF project and paste the TextBlock into a Window:
<Window x:Class="WpfApplication3.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:System="clr-namespace:System;assembly=mscorlib">
<TextBlock Text="{Binding Source={x:Static System:DateTime.Now}, StringFormat=\{0:MM/dd/yyyy\}}"></TextBlock>
</Window>

Here are a few places from which I have pieced together this minor epiphany:

Friday, January 16, 2009

IEnumerable<Dimecast> Expect(this IEnumerable<Dimecast> source, Func<Dimecast, bool> predicate); ?

Dimecast's slogan says:

Dimcasts.Expect(x => x.ToLearn()).Something.New()

So ... there is an IEnumerable of Dimecasts. Not all of the Dimecasts can do 'ToLearn'. Therefore they want to whittle away the ones that can't. The new subset then has a 'Something', and that 'Something' does 'New'? Is that what they meant to say?

Do the Dimecasts learn? Shouldn't something consume the Dimecasts and then learn from them? What are the side-effects of calling 'ToLearn' on a Dimecast? What if calling ToLearn on the individual leaves the called IEnumerable of Dimecasts in an inconsistant state?

Or maybe they mean that the big family of Dimecasts expects each one if its members to go out there and 'ToLearn'. When they do that and then all come home, the family can get together and new up a big something. What do they do with the new Something? They go to all this trouble to new up a Something, but then they drop the pointer to it. Is that intentional? Does the new Something not have a point?

Wednesday, December 31, 2008

Nontransitive generic interfaces

We're pretty busy racing to a deadline, so I don't have a great deal of time to dig into this. I just stumbled across a C# feature that works differently than I would have guessed. Check out the following code.


public class test
{
   public void doTest()
   {
      Interface1<object> win = new Class1<object>();
      Interface2 fail = new Class1<object>();
   }
}

public interface Interface2 : Interface1<object>
{
}

public interface Interface1<t> where T : class
{
}

public class Class1<t> : Interface1<t>
   where T : class
{

}


All I am really after is for Interface2 to act as an alias for Interface1 and hide the generic declaration bits. Well ... here it is. Maybe I'll come back later if I figure out a solution.