August 29, 2006
@ 08:42 PM
I mentioned in a previous post that I was going to investigate using SQL Server Everywhere edition for a database to unit test against, when the database really can't be removed from the picture.

Since then I have been swamped with work, and have not had time to post.

I did end up using SQL Everywhere for unit tests on a project. I had to copy-past-edit some code from the NHibernate Sql2000 family of driver classes, but it was pretty easy and I only had to open the sqle documentation once (...to find out that they don't support TOP.)

I will try to post more details later, but it was basically the same as my previous post on SQLite - I didn't notice any performance differences, nor does it support lots of functionality that SQLite doesn't, but it is SQL Server's little brother and it can replicate with SQL Server (very exciting!), which is a feature I plan on using for something else soon.

Anyway, just wanted to post something...


 
Categories: database | tdd | sqle

August 29, 2006
@ 08:32 PM
One thing that's always a pain when applying for a new job is wrestling together a bunch of phone numbers, addresses, e-mail addresses, etc., to use as references. It's kind of embarrassing and awkward to boot.

The nice thing about being in a users group (like ssdotnet - especially one that's not too big, where you can know everybody) is that you are in a group of people that are dedicated enough to their craft that they take time out of their busy lives to come hang out with you - we all know they could be doing lots of things more interesting than that. Putting some effort into being a better developer is instant karma in my book.

If you know me from a users group or conference or something and you need a reference for something, let me know. I know you are the type of person I would want to work with and I have no problem sharing that knowledge with others.



 
Categories: career | ug

A short description of how I use SQLite to do unit tests that want data access.
 
Categories: article | database | sqle | tdd

Yesterday afternoon, I was talking with one of my co-workers, Michael. I was yammering on about how much I liked SQLite for unit testing and how much faster in-process databases engines were for applications that didn't need all the features of relational databases.

Then he mentioned SQL Server Everywhere Edition. It's in process, light weight (the same configuration as what runs on Windows Mobile), and free to distribute. I don't think it supports views or stored procs (installing it now, so I might edit this later) but I avoid those types of database dependencies anyway.

SQL Server Everywhere Edition sounds exciting for a number of reasons.


 
Categories: database | sqle

Last night I was working on something and suddenly found myself needing about 30 really simple ActiveRecord classes. I figured it was about time to stop writing these manually each time.

Looking at the CastleProject.org site, and seeing that the status of ActiveRecordGenerator was frozen, I briefly considered writing my own little tool (or just modifying ActiveRecordGenerator as needed) to do the job. After another 10 minutes, I finally broke down and made a CodeSmith template (we've got CodeSmith, but for some subconscious reason I keep avoiding using it.)

This was fairly straightforward, and after 20 minutes or so, I had the template I wanted, and started generating classes. After another 20 minutes I had added some things I missed the first time and everything was great.

After completing this, I looked at what I had done, and found myself thinking: this is alot of cruft.

Let me mention that all 30 classes had basically the same set of properties. I briefly considered writing a generic class, but didn't think there would be a way to get the name of the class into the '[ActiveRecord("MyTableNameIs")]' attribute. That, and a small handful of special rules, were the only things different about these classes.

I was thinking: A lisp-like macro would have been really useful. Why don't we have lisp macros in OO languages like C#? I've always fealt (but not agreed) that it's because OO leads you to composition instead of code generation. I could have written one base class with the properties I wanted, then 30 derived classes with the right names and attributes. That is still too much typing, though, and I would have used code generation anyway. I chose not to relate these classes, as they are not really related in this domain anyway, only functionally and structurally related.

I am not sure what the best answer to this type of design problem is, but I know I haven't found it. Code Generation is a jack-hammer in the face of the problem of code duplication caused by imperfect design. It gets me through the barriers, but the barriers were trying to tell me something.

Frameworks and tools (like ActiveRecordGenerator, or even better - Streamlined) that generate applications based on meta data are becoming very popular. Are these tools just reactions to the lack of good DSL tools or lisp-macro-like facilities - i.e., why am I writing my C# application in Code Smith templates and not in C#?


 
Categories: design | architecture | refactoring | agile

August 3, 2006
@ 07:21 PM
Miguel de Icaza made this statement on his blog. I wish he would elaborate. I have a few not very serious reservations about what little I know about Avalon at this point, but I am not seeing the simmilarity to j2ee. Is it just the complexity/surface area? If so, then I think the statment:

We will have to wait a couple of years for the "Rails" of GUI toolkits to come into existance. In the meantime programmers will pay for their sins.

is off by some years. Frameworks like rails are becoming commodity. Someone will have this out in no time. Just take the top off Monorail or add a new template for generating XAML views and some better tooling to the SCSF.

I would rather have rails for GUI apps than rails for web apps. Therefore Avalon on rails is a net gain to me, and others I'm sure.

I wish Miguel would elaborate a little.


 
Categories: wpf

August 3, 2006
@ 06:25 AM
My friend Camey is disappointed and surprised at Washington's decision to uphold our ban on Gay marriage. I'm not surprised at all. Surely the logic in this is obvious, especially to someone trained in reasoning and logic, like the Right Honorable Justice Madsen. It's just like I was explaining to someone the other day, that the global decrease in the number of pirates has resulted in global warming. Just as the pirates were keeping temperatures nice and cool, laws like the ban on Gay marriage are what keeps families happy. See: look at everyone - they are all so happy :-)

I am sure that when Justice Madsen was "developing the child abuse component of the Family Violence Project for the City Attorney’s Office", she must have seen that the vast majority of cases of child abuse are caused by gay marriage. You can't argue with experience!

Not to mention the procreation part: "...promote procreation and to encourage stable families." I mean, let's be honest, don't we all procreate better knowing gay and lesbian people aren't allowed to be legally married. Get ready for a tidal wave of procreation, now that it's safe from the dark spector of gay marriage.

I am going to do my part and make sure my judges and representatives know how much I value their logic and reasoning. Level heads like these are what got us through unfortunate things like the Salem Witch Trials, and the Spanish Inquisition, and led to the introduction of the concept of pi being equal to 4.

Remember, our taxes paid for all those people to pontificate, rule on, implement, and enforce these and other wonderful laws. Let's make sure we continue to get our money's worth.

Only by our speaking up, even if it's with the softest of voices, will our wise elders realize how important their wisdom is to us and what things we would prefer them to spend their time and our money on.



 
Categories: politics

August 2, 2006
@ 11:09 PM

I went to dotnetusers.org's meeting tonight for a WCF presentation. The presentation wasn’t as deep as I had been hoping. I am trying to get back into this stuff and need some oomph. After seeing more and more really awesome presenters, I am really starting to hate power point.

There were a few more people than at ssound.net in Olympia, but if we keep things going at ssdotnet, we can take 'em.

Ted Neward was there and some other people I almost recognized from somewhere.

Jason Haley indicated he was going, but I don’t know what he looks like (ok, look, there is a picture here…but I don’t think I saw you.)

For a large chunk of my developer career (from about 1999~2004) I was really, really interested in distributed systems. I remember when the ATL developer’s mailing list morphed into the SOAP mailing list (or maybe I morphed into someone reading the SOAP mailing list.) I loved COM+. I loved web services. When I first heard about Indigo, I was soo excited.

Then something kind of weird happened. I started seeing people actually building apps with XML Web Services. They sucked.

The last straw is still unfolding into my life. At work we are doing this huge, uber-high-stakes integration project with a third party application. The API blows chunks. I don't (really do) want to get into details, but someday, after I have filled my lungs with this, I will have some stories to tell, I am sure.

This is a high-visibility project and my boss is heavily leveraged. He (we) need this to work out well - but I just know something is wrong. All the signs are there. The first sign was when I saw they had a XML Web Service (...kind of thing....ahem) that returned a "cursor" (and I knew the backend database was Oracle...hmmm...cursors...Oracle...web services...)

Other signs:

  • They've been talking/planning/meeting 20+ hours a week about it for almost a year, but ask any two people and you'll get 3 different answers about what they are doing and how it all works. The tracking error grows geometrically as you move away from the source.
  • Every developer looks at the service interface and sees something different (I call them bad XML web services, but someone else might call it floor wax.)
  • I sense a lot of apathy from some of the people that are supposed to benefit from this.

reduced:

  • Lack of vision
  • Lack of cohesion
  • Lack of perceptible benefit


So what does this have to do with WCF? The reason I am having trouble getting back into this is that it is too far gone from reality. 3 years ago, it kind of sounded plausible that we would have all these people building loosely coupled apps with WS-* and the hundreds of specifications and rules they would have to learn to make it work right. Now...it frankly sounds kind of naive.

WCF makes it really easy to do things really right for Windows developers. For java developers there are things like this too, but when you read white papers from IBM or Oracle, you just know they aren't talking about exactly the same things. There is some kind of disconnect that keeps everybody from agreeing on things and just building stuff - and in the confusion, vendors like ours are born.

Being able to move up the food chain by claiming to support, "integrated, enterprise, solution-oriented, xml, distributed, _standards_based_, web services," is a boon to the sales forces of companies like this. Before they had libraries based on COM, Java, maybe perl or something, the sales guys didn’t know what any if that meant, and everything sort of worked. Nowadays you can put lipstick on a pile of XML pasta and sell it as a feature. All the sales guys “know” what that means, but not the developers.

I know we will be using WCF to unify how we build distributed apps in-house and I know some vendors will do the same thing. But we still have a long ways to go in integrating applications.

 


 
Categories: architecture | design | ug | wcf

August 2, 2006
@ 10:00 PM
I am going to start a link blog - but with a twist: I am only going to post links I saw on other link blogs and liked.

Motivations:

  • My blog reading time is now dominated by links from link blogs anyway.
  • I only read about 20% of the links I see in link blogs, but I think the signal to noise ration when I do is about 1:2 - much better than my normal blog reading.
  • There are lots of great link blogs for .NET developers anyway.
  • I used to post more links / comments here, but now I just e-mail them. I don't want to talk about my weblog at work - it would be kind of awkward - but I want to share links in one shot. No more e-mail + blog post (although I hardly ever post plain old links anyway.)
  • I have 694 things tagged in del.icio.us right now and I'm starting to get del.ja.vu - alot. I need a better way to screen the cream of the crop.
  • People probably don't read anything I write anyway.
  • It will be fun.
I'll set it up and start posting in a few days. It will be a different feed, so I can hand it out everywhere and not be linked back to any point-in-time opinion/rant I had about something.


 
Categories: web | CrazyIdea

August 2, 2006
@ 09:52 PM
 

Definition: When you go to tag a page in del.icio.us, only to find you’ve already tagged the same page in del.icio.us.


 
Categories: