ALT.NET: It is not us vs. them…

It is not us vs. them.

One of the reasons I stopped doing any promoting, evangelizing(MS’s term for promoting), or really even any discussing about Linux was because I was sick and tired of the us vs. them attitude of so many.

Ayende is right and I’m sorry if I made it sound like an us vs. them. The point I was trying to make when I said “using Castle Windsor before Enterprise Library’s ObjectBuilder” is that we don’t have to wait for Microsoft’s version of something to mature before we find a good solution to a problem we are having. I’m guessing this is the same thing that Kar was saying when he wrote “NHibernate before the Entity Framework”.

If you are using Enterprise Library’s Object Builder today and it is working for you, I did not mean to suggest that you are not “with us” and that you are “against us”. If you are somehow using Entity Framework in production and it is working for you, again, I think that is great. The point I heard from Kar and what I was trying to expand on is that there is more to the .NET development experience than Visual Studio with no plugins and only the Base Class Library.

I’m of the opinion that if you are using any IoC container that you are probably already what I would consider ALT.NET. It doesn’t matter if you use Windsor, Structure Map or Enterprise Library offerings. You are out there doing something that MS really didn’t provide you tools to do easily in the BCL. I doesn’t matter if it is IoC or MVC in your WebForms or WinForms applications or any other thing that is a well known “better practice”. I view ALT.NET as not letting what is available from MS today or what is coming tomorrow stop you from doing the right thing today.

.NET is MS’s baby in the development world. Anything outside of what MS provides is what I would consider ALT.NET and even some of the things that MS does provide I would consider ALT.NET. F#, IronPython, CardSpace even are MS techologies, but they aren’t very widely used. If you are using them, I’d consider you ALT.NET.

I agree with Ayende when he says:

We as an industry has enough problems with the “We Are A Microsoft Shop, Do Not Write Non Microsoft Certified Code!” apprach, we don’t need it in the other direction.

I view ALT.NET as a label for those who aren’t afraid to use a technology outside of what is provided and supported by Microsoft. It is an attitude I would think many developers would have. Can you imagine getting all of your Java support and code from only Sun? I cannot. Why are so many .NET shops MS only in their attitudes?

Honestly, I don’t think it is a problem entirely with “we are MS only” as much as it is an awareness problem. I think many development organizations simply don’t know about many of the alternatives that are out there. It is interesting because most know that they can go buy a tools suite from Telerik or DeveloperExpress or Data Dynamics and they are told that these will help the quality and power of their product. Awareness here is raised by advertising. But how many development organizations know that using an additional framework like Castle or Spring.NET or even Enterprise Library can help with the underlying design and architecture of the software system which they develop? If I had to venture a guess, I would guess MUCH LESS. Enterprise Library may be an exception there because it does get talked about and promoted by MS.

Am I complaining? I guess only a little. I feel NHibernate was in a similar unknown state just a few months ago. After some articles and much talk on DotNetRocks and seeing it presented at conferences and code camps, now you can’t turn your head in a Starbucks without hearing a developer talking about NHibernate or some other ORM. My current complaint is that some of these other frameworks need the same treatment. Of course I shouldn’t complain. I should do something about it.

Expanding on ALT.NET

Dave Laribee started it.

Kar points out some attributes of the ALT.NET developer.

I’d expand and say ALT.NET also means some other things.

  • An ALT.NET developer has written in Boo, IronPython, F# or some other out of the mainstream language.
  • An ALT.NET developer has used Mono on Windows or elsewhere (Linux, OSX, Solaris, etc).
  • An ALT.NET developer uses a Mocking framework.
  • An ALT.NET developer would be using Castle Windsor before Enterprise Library’s ObjectBuilder.
  • An ALT.NET developer has written code to talk to a database other than MSSQL.

What are you doing right now to become more ALT.NET?

Kar posses the question. I never feel like I do nearly enough. My Mocking Framework usage skills are weak. I don’t contribute to Castle nor Mono as much as I wish I did. What I’m doing right now is creating a DisplayShelf component for MonoRail. I was inspired to do this by CodeMash and I finally had the itch when I took photos of my newborn daughter.

TFS woes

A few months back, or maybe a year+ ago right after Visual Studio 2005 was released, Dianne had mentioned to me that she didn’t like that her team wanted her to use Team Foundation Server. I didn’t know much of TFS at that time. I shrugged and said Subversion and Trac work great for me. In fact my team was afraid of Trac and they opted to buy OnTime for bug tracking and live without integrated SCM. Working with the technology of 1997 was better than that of 1987

An ongoing blog discussion made me think of Dianne and her woes.

It started here:
http://ayende.com/Blog/archive/2007/04/29/CodePlex-TFS-and-Subversion.aspx

It escalated here:
http://ayende.com/Blog/archive/2007/04/29/TFS-Zero-Friction-and-living-in-an-imperfect-world.aspx

Roy kept responding:
http://weblogs.asp.net/rosherove/archive/2007/04/29/what-source-control-tool-do-you-use-and-more-on-tfs-vs-open-source-tools.aspx

So did Oren:
http://ayende.com/Blog/archive/2007/04/29/TFS-Vs.-Open-Source-tools.aspx

It seems to have digressed into an Open-Source vs. Closed-Source discussion at this point. Honestly, I can’t see any of Roy’s points. They all seem to be excuses. I tend to agree with Oren on every point. Of course, I am biased toward the open-source world as well.

Camel Humping

Ask and I shall receive.

I linked to Scott Cate’s Resharper praise on Friday. Today I’m greeted with a pleasant surprise. Someone else must have been reading Scott Cate’s blog because that crazy guy over at Developer Express seems to have implemented the feature. Happy day!

Oh No! I may have to get Resharper just for this one feature

Oh No! I may have to get Resharper just for this one feature.

http://weblogs.asp.net/scottcate/archive/2007/04/13/resharper-don-t-develop-with-out-it.aspx

Are you listening Developer Express? I tend to prefer CodeRush/Refactor!Pro to Resharper. I’m just choosy like that (my mom didn’t choose Jiff).

I’m talking about the CamelHumps feature that gets used in the Find search boxes, specifically for GoTo File or GoTo Type. This feature is basically like its identical feature from IDEA. I first saw it demoed at CodeMash and I started to druel a little bit. I’m not sure but maybe SonicFileFinder could be improved to support this feature. I’m also not sure that CodeRush doesn’t support it already and I just don’t know it.

According to this I can get ALMOST the same feature using sonic file finder by typing just a few more keystrokes M*S*T for MySearchText instead of just MST. But these features are pure cake and * is an expensive keystroke. I want my pure cake to be moist and smooth. I don’t want to have to type these wildcards.

GAH! According to this, SonicFileFinder already supports what I am asking for. Why has this not worked for me? I swear that I have tried it.

*GASP* I am a fool. I’ve been confusing CodeRush’s Quick Nav feature with SonicFileFinder. SonicFileFinder is VERY nice.

I’m not afraid to admit I’m foolish, so I’m posting this anyway.

Mono SVN repositories moved

Mono finally closed their main SVN for anonymous access and added a new host for anonymous access. I have a bunch of different mono projects checked out in my /opt/mono/src directory and honestly I like to follow trunk for a number of them. I don’t want to recheckout all of them again so I came up with this little shell script/oneliner.


for i in `grep myrealbox */.svn/entries | awk -F/ '{print
$1}' | uniq` ; do pushd $i ; FROM=`svn info | grep URL | cut -d' ' -f 2 ` ; TO=`echo $FROM | sed -e 's/svn:\/\/svn.myrealbox.com/http:\/\/anonsvn.mono-project.com/'` ;svn switch --relocate $FROM $TO ; popd ; done

I hope this helps you.

its a week for great quotes

“you can build LINQ to NHibernate extensions and get all the goodness of
the LINQ language/compiler/intellisense work using NHibernate”
— Scott Guthrie http://elegantcode.com/?p=539

I don’t
like the implication that unit testing is a “team system” feature.
Whether you “test first” or “test later”, I think everybody pretty much
now agrees that you need to perform automated developer testing sometime, no matter what kind of work you’re doing. ”
— Scott McMaster http://softwaredevscott.spaces.live.com/Blog/cns!1A9E939F7373F3B7!332.entry

“TDD is cost effective when and if the effort you put into writing the
tests is less than the corresponding effort would have been for the
manual unit testing and additional debugging that you dodge by having
comprehensive unit test coverage. Add in the hard to quantify
advantage from the qualities of orthogonality that TDD all but requires
(testability design is mostly about creating orthogonality between the
pieces). ”
— Jeremy Miller http://codebetter.com/blogs/jeremy.miller/archive/2007/03/22/More-testing-code-than-production-code-is-typical_2C00_-but-don_2700_t-let-that-stop-you.aspx

Microsoft and Open Source

from Ayende and Hammit

http://elegantcode.com/?p=539

I don’t normally link things that are covered by others with far more reader than I have. This is so important to .NET developers everywhere. I feel I must spread the word however possible.

Take, for example, MSUnit. Boo. Hiss. That was a big miss. Can’t they be easier to run in the UI? Where are all of the baked in Asserts from NUnit?

Or take MSBuild. No please, take it. No out of the box task to Zip files? C’mon.

I hope all .NET Developers are aware of this trend and if they aren’t, they should question whether nor not they can call themselves developers.

with lots of unreadable code

When is Microsoft going to get off of this “without writing any code” kick? I am sick of sitting through Microsoft presentations where someone writes some XAML or ASP.NET and makes a bunch of changes and says “Look, we did all this without writing any code!” Should I try to coin a new term which is only 1 vowel different from the term which comes to mind? BILLSHIT!!!

XML is code. The Java world has known this for years. XML Hell is a very real thing in the Spring, Struts, Hibernate past of Java. Many of the new things in Java have been a move away from the XML hell of a few years ago.

So when I see a blog post about InfoPath saying “…without code!” that has a snippet like this…

[code]
concat(substring(concat((sum(../my:group1/my:group2/my:TotalMinutes) –
sum(../my:group1/my:group2/my:TotalMinutes) mod 60) div 60, “:”,
sum(../my:group1/my:group2/my:TotalMinutes) mod 60), 1,
(sum(../my:group1/my:group2/my:TotalMinutes) mod 60 > 9) *
string-length(concat((sum(../my:group1/my:group2/my:TotalMinutes) –
sum(../my:group1/my:group2/my:TotalMinutes) mod 60) div 60, “:”,
sum(../my:group1/my:group2/my:TotalMinutes) mod 60))),
substring(concat((sum(../my:group1/my:group2/my:TotalMinutes) –
sum(../my:group1/my:group2/my:TotalMinutes) mod 60) div 60, “:0”,
sum(../my:group1/my:group2/my:TotalMinutes) mod 60), 1,
(sum(../my:group1/my:group2/my:TotalMinutes) mod 60 < 10) *
string-length(concat((sum(../my:group1/my:group2/my:TotalMinutes) –
sum(../my:group1/my:group2/my:TotalMinutes) mod 60) div 60, “:0”,
sum(../my:group1/my:group2/my:TotalMinutes) mod 60))))
[/code]

…it makes me want to kill Microsoft employees and the idiot managers who buy into this BILLSHIT. It must be geared toward managers and inexperienced developers. It is all lies. Please stop the lies.

What is wrong with the above? Well, it looks like code to me. If it walks like a duck and talks like a duck… we get python duck typing. If it looks like code and smells like code (and yes, it is major code smell) … it must be code!

Why is this code smell? Well can I just look at that insane expression and know what it does? Nope. It is a fine example of dailywtf worthy unreadable code.

It is code. It is bad code.

Microsoft reinvents the wheel, again.

 

I am totally excited to see the wheel reinvented again. I’m so happy that
Microsoft has put their huge workforce of programmers to go and create
something which already exists.

The first blog post I read this morning is a link from Sam Gentile’s New
and Notable
on Entity
Client
. What an utter waste of time this is shaping up to me. I
get it. Microsoft wants LINQ to be awesome. Guess what? It
already is! So what is this Entity Client that has got me all worked
up? Well, in an nutshell, Microsoft REALLY likes NHibernate. But
NHibernate is OMG VIRAL LGPL Open
Source. This kind of open source gives Microsoft open sores. So
what is the north west Vatican(Redmond)
response when someone doesn’t agree with your religion? Call them a
heretic and if it is a really good idea incorporate it into your own religion.
Microsoft can’t use NHibernate. Why? … Here is a list of
reasons why:

  • Microsoft has a serious case
    of NIH syndrome
  • NHibernate sounds like
    Hibernate and that is Java and Microsoft isn’t allowed to do anything
    Java. Remember that law suit?
  • Hibernate Query Language
    doesn’t look enough like SQL Server’s SQL implementation
  • Adopting something great from
    the .NET community is a sign of
    weakness. Microsoft must pollute and confuse the solution space
    instead. See NUnit vs. MSTest, Nant vs. MSBuild, NDoc vs.
    Sandcastle.

Ok, so the above is a bit over the top, but I think I make
my point. The world would be a better place if Microsoft stopped
reinventing the wheel and just embraced existing libraries as the standards
they are. What really set me off was this bit of the blog post

EntityClient employs its own language, Entity SQL. An
Entity SQL query needs no change in order to work over different store
implementations of the same model. That is achieved through EntityClient’s
pluggable architecture.

 

This sound exactly like NHibernate to me.

While NHibernate doesn’t seem to have nearly the usage of NUnit, Nant or NDoc,
I have no doubt that the NHibernate community will continue to thrive, even
with the release of excellent tools from Microsoft for use with
EntityClient. NHibernate already has many excellent tools and it is here
today.

One huge difference between EntityClient and NHibernate is that EntityClient is
not a full ORM. It seems to be only the Dialect and Driver part of
NHibernate. From the same post

EntityClient does not attempt to materialize objects out of
the result set. Instead, it returns a plain DbDataReader for which those
applications may implement their own specialized object materialization, or
consume the DbDataReader directly.This does still sow confusion into the Data
Access space. My recommendation: Just ignore it. Go use
NHibernate (or CastleProject’s ActiveRecord).