Rants Tagged with “Programming”
<< < 1 2 3 4 5 6 > >> (Total Pages: 6/Total Results: 59)
I find it unfortunatle that Microsoft has made is way too difficult to write your own DataSource enabled controls. Deriving from DataBoundControl, but it still does not seem to be a way to synchronously get the data from the DataSource. In a DataBoundControl control you can get the DataSourceView like so:
DataSourceView view = this.GetData();
Great! Except that to actually get the code from the view requires you call view.Select() which is asynchronous. Luckily for Microsoft, their controls use a friend/internal method called ExecuteSelect(). If you look into the code that the GridView, FormView and DetailsView use, they don't call it asynchronously, but you have to ;)
There was a LadyBug filed...but was marked as "We're not taking new suggestions for Whidbey any more".
That leaves the control designer with two options, call it asynchronously or use reflection hackery to call ExecuteSelect. ARG!
I don't like to blog other blogs blindly much, but this The
Daily WTF posting is spectacular. Its a classic over-engineering that has Access,
SQL Server, VB COM, VBA, ATL COM, Java, C++ and Word Automation! Wow!
I have so many SQL Server instances on my local machine others in my home office that I wanted one place to start and stop them all. I liked the start-stop functionality in the SQL Server agent, but I have MSDE instances and SQL Server 2005 instances running too, so a single place to do it all from an icon tray was my goal. So here I've created a simple .NET 2.0 application. I would have done it with 1.1 to make it more accessible for users, but there were some features I needed in 2.0 to make the app work. So if you have the .NET 2.0 Framework installed, check out this new app to control multiple instances of SQL Server a mouse-click away:

It's not finished yet, but I am working on a Font Browser using Avalon. It's fun to work with XAML and code-behind, but without splitter or treeview controls its hard to make something really fun. I am also working on a database browser with Avalon, but until I find a tree view that project is dead.
I will post the font browser this weekend.
I have started to dig into the Beta 1 of Avalon now that I have a bit of free time and a couple of article commitments. I was surprised to find that there isn't an Avalon solution for something like a tree view yet. If I have time, i'll be writing one...otherwise maybe
Microsoft will notice the big hole and patch in later betas. If anyone knows of a project like this, please let me know.
I found it very interesting in a little test that the Flags attribute doesn't seem to change the way that the CLR numbers Enumerations. So that this enumeration:
public enum UnFoo
{
Foo,
Bar,
Quux,
Foobar
}
this code ends up not working as i'd expect:
Foo f = Foo.Foo | Foo.Bar | Foo.Quux;
Console.WriteLine(f.ToString());
this results in:
Foobar
This happens because Foo = 0, Bar = 1, Quux = 2, Foobar = 3, and Foo | Bar | Quux | Foobar = 3. So if you use a [Flags], make sure and number the enum properly:
[Flags]
public enum Foo
{
Foo = 1,
Bar = 2,
Quux = 4,
Foobar = 8
}
Another interesting thing is that I like that Enum.ToString() and Enum.Parse() do the right thing with Flaged enumerations:
Foo f = Foo.Foo | Foo.Bar | Foo.Quux;
Foo pf = (Foo) Enum.Parse(typeof(Foo), f.ToString());
if (f == pf) Console.WriteLine("They equal!");
It's cool that when you -OR- flagged numerations together that the Enum.ToString() turns it into a common delimited list. How cool is that?
I've spent much of the last three days with a client helping them figure out their domain model for their new system. What's been a delight is using the VS 2005 Class Diagram to capture the ideas. Its been very easy to throw up on a projector and describe the relationships between the data. While we're actually not using it to design the system, it was much easier to use the Class Diagram in VS 2005 than to fire up either
Enterprise Architect (which I like a lot for UML/Database work) or Visio. Two Thumbs Up!
I use a number of source code providers for different projects. Unlike the great SCC Switcher on codeproject (which is down today for some reason), this one acts like your SCC provider then allows you to choose on a check-out by check-out basis which one to use. This helps me because I switch between SCC multiple times a day and remembering to switch from one to the other works great. Check it out.
With
Microsoft reporting that it will release BT 2006 with VS and
SQL Server 2005, I guess I have some catching up to do. I am a little confused by their discussion of BT 2006 not really being available until 1st Quarter 2006. Anyone know the truth?
In this post to Ted's blog, he makes the argument that we, as developers, may not be taking enough responsibility for when projects fail. I tend to agree. While there are certainly cases when management and lack of requirements help a project fail. There are many times when the development team is at least as culpable in the failure. As developers we tend to like bright shiny things, so we get caught up in the "wouldn't it be great it" trap. We gold-plate projects so that they can't get out the door and can be lazy about task estimation.
But at the end of the day, I'd still rather blame management ; )