Rockford Lhotka

 Monday, May 1, 2006

One of the most important "features" of CSLA .NET is the vibrant community that surrounds it. I am humbled by, and very appreciative of, the amount of time and effort people put into this community - helping other people more effectively learn and use the concepts from my books.

The most recent examples? Updates to several of the major community contributions for CSLA .NET 2.0:

Permanent links to these contributions are, along with general errata and other information, at the CSLA .NET 2.0 home page:

Monday, May 1, 2006 7:21:14 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Sunday, April 16, 2006

Every now and then I post a list of what I’ve been reading lately. You’ll note that I don’t read all that many computer books. I live computers day in and day out, and when I sit down to read, the last thing I typically want to do is read more stuff about computers (unless it is gaming-related)…


Vernor Vinge - Fire Upon the Deep, Deepness in the Sky and the upcoming Rainbows End


I am confident that Rainbows End will absolutely rock! Vinge has yet to disappoint. Seriously. I’ve read almost everything the man has written and it has always been excellent. This includes True Names, his novella that is wrapped together with a set of mid-1990’s essays on the Internet (which are interesting in and of themselves, especially given the perspective of reading them 10 years later). And of course The Peace War is an absolute must-read (I read it as a multi-part serial in Analog magazine so many, many years ago).


Alastair Reynolds - Revelation Space, Chasm City, Redemption Ark and Absolution Gap


I’ve mentioned Reynolds before, but he’s worth mentioning again, as these are four of the best books I’ve read in a long time. An excellent blend of sci-fi, science, nanotech and a nice, edgy, cyberpunk-ish flavor.


John Scalzi - Old Man's War


Billy Hollis put me on to this author, and he’s quite good. Not as deep or intense as the other authors listed here, but if you are looking for a fun, thoughtful and quick read this is the book for you. I really enjoyed the book, and The Ghost Brigades is on my reading list.


Timothy Zahn - Angelmass


I’m a serious Timothy Zahn fan. He wrote the best series of Star Wars books out there, hands down (it starts with Heir to the Empire). Cobra was an incredible book and social commentary that has been translated into other forms, such as a ST:TNG episode. I see that it is a full-blown trilogy now (I’ve read I and II, but I was much better than II…) I should say too that his Conueror’s series left me cold, so he’s not as consistent as Vinge… Angelmass was a really fun read though, and I recommend it.


Joe Haldeman - Camoflauge


This book is a brain-bender. He had me guessing who was who until near the end of the book. Really enjoyable and thought provoking, and it is a quick read. Haldeman is an excellent author, so make sure to check out The Forever War as well.


Karen Armstrong - A History of God


OK, so this is a college textbook – or at least it is often used as such. But if you are looking for a very thought provoking summary of the evolution of Judaism, Christianity and Islam all rolled into a single book this is hard to beat. It is particularly interesting because Armstrong puts the various events and evolutions of what “god” means and who “god” is into a historical context. She also draws on and compares various conflicting views of theologians, contrasting the interpretations of events and religious texts.


Superheroes and Philosophy, Star Wars and Philosophy


I find philosophy intriguing. In many ways it requires the same type of thought process as software design and computer programming, but it is even more abstract. These two books are part of a broader series (including two books using The Matrix movie), where philosophers write articles about philosophy, using contemporary concepts like superheroes (Superman, Spiderman, stuff like that) or Star Wars to draw out and illustrate their points. I find the approach very accessible and downright fun, because the books draw together two of my interests at the same time.


Sells, Griffiths - Programming WPF


Yes, I do read some programming books :)  At the moment I’m trying to have at least a basic familiarity with WPF and XAML. I am firmly of the opinion that if normal developers ever need to actually see or use XAML that this whole experiment is an utter failure, but for the next few years it is clear that we’re stuck in tag-land… Maybe by version 2.0 of WinFx the tools will have evolved to the point where the technology will actually be useful and productive, and humans won’t be subservient to obscure angle-brackets. In the meantime however, if you are looking to understand how WPF works, you can’t beat this book.


Eric Evans – Doman-Driven Design


This book has been sitting on my reading list for quite a while now, and I’ve finally gotten the time to skim through it. It is very good, and I appreciate many of the author’s points. Like almost all books of this sort (including David West’s Object Thinking), I really like what the book has to say, but don’t necessarily agree with all the conclusions or solutions. All choices are trade-offs, based on a set of priorities. Evans’ choices are all perfectly valid, but don’t always reflect my set of priorities and thus don’t always agree with my choices. I think this is the beauty of working in the computer field – there are such a wide variety of options that you can apply to problems that you can almost always arrive at valid solutions based on your priorities – even while other (equally valid) solutions exist in the same problem space.


Neal Stephenson – The System of the World


Stephenson rocks. I do believe he is the most talented author writing today, in terms of his mastery of language and ability to paint the most exquisite mental images with his writing. He’s also perhaps the most dense author going; in that there’s no wasted space in his books. Unlike most books (even most of them listed here) where you can often skip a sentence or even a paragraph now and then without losing the story, with Stephenson you can’t ever skip anything. You can’t gloss over anything. You have to take the time to read, comprehend and remember what’s been said, because everything becomes important later. I love it!! This book is the last of a trilogy, and the trilogy is a “prequel” to Cryptonomicon (which you should really read first though). I’ve been working on the trilogy for a very long time now (months), savoring every bit of it.


Whether you like these dense pseudo-historical books or not, I strongly recommend reading Stephenson’s Snowcrash. This book, along with Gibson’s Neuromancer, really defines the cyberpunk genre – at least for me.


Anyway, that’s what I’ve been reading lately. Of course my reading list is long, and seems to grow longer faster than I can read. Hopefully in a few months I’ll have ploughed through a few more books to list in another entry.

Sunday, April 16, 2006 11:56:08 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, April 12, 2006

I don't know how long this behavior has existed, but the other day I ran into an interesting (and unpleasant) side-effect of Microsoft's focus on security. I am guessing lots of people have run into this before me, but it was frustrating nonetheless.

It turns out that when you download a zip file with IE onto an NTFS drive, IE kindly puts a note in the file system indicating that the zip file came from an untrusted source (the Internet). When you unzip the contents to an NTFS drive, Windows kindly propagates that note, so all the unzipped files are marked as having come from an untrusted source.

In many cases you may not notice this flag. But if you unzip a VS 2005 solution like this and then try to open it VS will tell you it came from an untrusted source – possibly causing you some issues.

So of course the first question I asked was “how do I get rid of this note/flag so I can do my work?” There are some answers however.

You can go file-by-file and open each file’s properties dialog. Then you can click a button to mark it as trusted. You can’t do this at the folder level, only file-by-file. So this is pretty useless for a large number of source files.

You can copy the zip file and/or the unzipped contents to a FAT drive and back to your NTFS drive. Since FAT can’t store this metadata about the files, it is lost and your files are “fixed”.

You can use Firefox to download the zip file in the first place. Firefox doesn’t collaborate with Windows to protect you, so these security features (which I think are good in general terms). I’m not too thrilled by this discovery actually, as I think it illustrates a security hole (of sorts) in Firefox – at least as compared to IE.

I think you can mark the zip file as trusted (through its properties dialog) before unzipping the contents. Unfortunately I haven’t tried this (I actually stopped with using Firefox, because it did solve my problem :) )

Wednesday, April 12, 2006 5:34:54 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, April 7, 2006

Most people are aware of DotNetRocks. But fewer people are aware that the talent behind DotNetRocks has started a new venture: DNR TV. It is kind of like DotNetRocks, only with live video of the computer screen during the conversation. I recently recorded two episodes on CSLA .NET 2.0 for DNR TV:

Look for more DNR TV episodes on CSLA .NET 2.0 in the future.

Friday, April 7, 2006 9:48:59 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, April 4, 2006

Apress has made the beta ebook of my VB book available at

Tuesday, April 4, 2006 8:22:45 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, March 31, 2006

During the early banter-and-have fun part of my recent dotnetrocks interview I dissed TDD (Test Driven Development, not the text translation service for the deaf). Of course this wasn’t the focus of the real interview, and prior to sitting down behind the mic I hadn’t thought about TDD at all, so we were all just having some fun. As such, it was flippant and it was short - meaning I was having fun, and that I surely didn't have the time or opportunity to really express my thoughts on design or testing. That would be an entirely different show all by itself.


Nor do I have time to write a long discussion of my thoughts on design, or on testing, just at the moment. But I did respond to some of the comments on Jeffery Palermo’s blog – and here are some more thoughts:


As a testing methodology TDD (as I understand it) is totally inadequate. I was unable to express this point in the interview due to the format, but the idea that you’d have developers write your QA unit tests is unrealistic. And it was pointed out on Palermo’s blog that TDD isn’t about writing comprehensive tests anyway, but rather is about writing a single test for the method – which is exceedingly limited from a testing perspective.


Of course you could argue that since the vast majority of applications have no tests at all, that it is a huge win if TDD can get companies to write just one test per method. That is infinitely better than the status quo (that whole division by zero thing) and so TDD is hugely beneficial regardless of whether it is actually the best approach or not. I’d go with this: some testing is better than no testing. But one-test-per-method is pretty lame and certainly doesn’t qualify as real testing.


But the real key is that developers are terrible testers (with perhaps a few exceptions). This is because developers test to make sure something works. Actual testers, on the other hand, test to find ways something doesn't work. Testers focus on the edge cases, the exceptional cases, the scenarios that a developer (typically?) ignores. Certainly there's no way to provide this level of comprehensive test in a single test against a method - which really supports another person's comment on Palermo's blog: that TDD isn't about testing.


Having spent a few months being employed specifically to do that type of QA unit testing I can tell you that I suck at it. I just don't think in that "negative" manner, and it is serious effort for me to methodically and analytically work my way through every possible permutation in which a method can be used and misused. I’ve observed that this is true for virtually all developers. As a group, we tend to be optimists – testing only to make sure things work, not to find out if they fail.


But as someone on Palermo's blog pointed out, TDD is mis-named. TDD isn't about testing (thankfully), nor apparently is it about development. It is, he said, a design methodology.


That's fine, but I don't buy into TDD as a “design methodology" either. You can't "design" a system when you are focused at the method level. There’s that whole forest-and-trees thing... Of course I am not a TDD expert – by a long shot – so for all I know there’s some complimentary part of TDD that looks at the forest level.


But frankly I don’t care a whole lot, because I use a modified CRC (class, responsibility and collaboration) approach. This approach is highly regarded within the agile/XP community, and is to my mind the best way to do OOD that anyone has come up with to this point. (David West's Object Thinking book really illustrates how CRC works in an agile setting) The CRC approach I use sees the forest, then carefully focuses in on the trees, pruning back the brush as needed.


Now I could see where TDD (as I understand it) would be complimentary to CRC, in that it could be used to write the prove-it-works tests for the objects' methods based on the OO model from CRC – but I’m speculating that this isn’t what the TDD people are after. Nor do I see much value at that point – because the design is done, so whether you write the test before or immediately after doesn't really matter - the test isn't driving the design.


But to my mind writing the tests is a must. In the interview I mentioned that I (like all developers) have always written little test harnesses for my code. What I didn’t get to say (due to the banter format) was that for years now I’ve been writing those tests in nunit, so they provide a form of continual regression testing. In talking to Jim Newkirk about TDD and his views on this, he said that this is exactly what he does and recommends doing.


And as long as we all realize that these are developer tests, and that some real quality assurance tests are also required (and which should be written by test-minded people) then that is good. Certainly this is my view: developers must write nunit tests (or use VSTS or whatever), and that I strongly encourage clients to hire real testers to complete the job – to flesh out the testing to cover edge and exceptional cases.


None of which, of course, is part of the design process, because that’s done using a modified CRC approach.

Friday, March 31, 2006 10:05:09 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, March 30, 2006

That was fast! Just this past weekend I was in New London, CT and did a live-in-the-studio interview for dotnetrocks on CSLA .NET 2.0. Somehow I thought it would air in a week or two, but just like that it is online and ready to hear!

While I was there I also recorded two episodes for DNR TV - the new dotnetrocks initiative that includes video of the computer screen. In those programs I walked through the basic structure of an editable root object and discussed how to bind it to a Windows Forms interface. If you want a quick intro into the use of CSLA .NET these should be well worth watching when they become available.

Thursday, March 30, 2006 3:37:42 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

Yea! I have completed the final proof/review of all 12 chapters of the VB book. The Apress schedule calls for the book to go to print next week, which means it should be available in the 2-3 week timeframe (given time for printing, binding, shipping and all that stuff). It is so nice to be done, done, done!! :)

Thursday, March 30, 2006 7:02:20 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, March 22, 2006

I have sent off the final code for the book to Apress, which officially means that I have RTM code at this point. You can go here to download the release code for VB or C#.

As a bonus, I also put a test release of a WCF data portal channel up for download - you can get if from this page.

Update: Today (March 22) I recieved my author's copies of the Expert C# 2005 Business Objects book - so it is most certainly in print. What a joy it is to actually see the results of the past several months of work!!

Wednesday, March 22, 2006 12:38:56 PM (Central Standard Time, UTC-06:00)  #    Disclaimer