Friday, April 01, 2005
Code organization

I had plans to posting about code organization this weekend, and saw Scott Hanselman posted on the same topic. Moving to svn gave us a chance to really review how we were doing things, and we changed alot. In the past, projects I have worked on have always been very tightly coupled to the file system. Not that its a bad thing, well it is, you just don't notice it until you see the other side of the fence.

After trying to read pretty much everything thoughtworks on the subject, and really giving a ton of weight to the How to setup a development tree set of posts from Mike Roberts, we came up with a very generic structure that is similar to what Scott posted. It looks something like this :

(VC) = under version control

  • Solution Folder
    • .svn ;)
    • _versioning (VC)
    • build
    • lib (VC)
    • src
      • Project (VC)
        • _versioning (external)
      • Test Project (VC)
    • tools (VC)
    • buildfile.build (VC)

The tools folder carries complete versions of tools needed to build or run a given solution (eg : nant), and the lib folder houses all referenced dlls, which projects reference by relative path. In fact, everything about the setup is relative now, so a developer can go from creating a branch, to having the branch checked out to a new folder and built in under 10 minutes.

So how does your source tree look?



Blog update this weekend

I will be updating to a newer version of DasBlog this weekend, so there may be a little bit of blog downtime. After I update the bits, I will also be changing my permalink structure. The new DasBlog bits allow the entire site to use named permalinks instead of the guids you usually see around here. When I flip that switch, though, all of my posts will look new to your aggregator again, so I apologize in advance for filling up your aggregator with some old posts.



 Thursday, March 31, 2005
Cruisecontrol.net followup

After creating the new build file, the next natural step for me was setting up the build server. The build server's job is pretty simple, make stuff, and report on that stuff. In my case the stuff is a complete deployable versioned set of assemblies, and some test assemblies. There are a number of benefits to using a build system to automate and report on builds, and I have outlined some in my previous article, but expect more on that soon too. In our case, the build system will be running Cruisecontrol.net, pioneered by the thoughtworks wizards.

So what does it take to actually setup cruisecontrol.net? With 0.8, not a whole heck of alot. Download the binaries, extract them, and add a vdir to the webdashboard folder. Then create a ccnet.config file that looks something like this prototype I created, and sit back and watch your builds fly. When that's not enough, you can even add some flare to your builds :)



Another blog for your blogroll

Another developer that I greatly respect, and sometimes come out of offices with boxing gloves on being separated by an analyst, has resurrected his blog, now on blogspot. Jason is a great developer, and although we sometimes have very passionate theory discussions, I think we both see alot of value in "creative debates". His last blog died off a little prematurely.. hopefully this one will be around for a while. Welcome back Jason!



 Tuesday, March 29, 2005
Nant and subversion

Spent this weekend playing with nant again. A while ago I wrote an article on using a number of tools for builds, and really since then have been hands off on our build. It's good that it ran for almost a year without any serious maintenance (besides deleting old builds), but it also means I didn't get a chance to stay up to date on the products. Well, a conversion to svn will change that. Once I had my head wrapped around svn enough, it was time to move on to the builds.

Expect many more details on this, but I wanted to share my prototype build file. I created it this weekend for the del.icio.us.net. api/app I'm working on. One of the major goals of these build files were to move the coupling of the build from the dedicated build machine, to the project itself. This allows anyone on the team to build with the same build procedure the build machine uses, as well as (in a crunch) make a full releasable build from their machine. This is of course only in the work files, but the prototype I made over the weekend is a good starting point for anyone looking for setup a build. The biggest changes to the old build were a) use 100% relative paths (I can have 50 copies of the source in 50 diff locations, and the build will work 100% in all of them) b) remove web projects (same as last ().. yay no more being tied to IIS) c) simplicity rules. I think I attained all of these. You can check out the prototype build file here.

Editing a build file isnt enough either. So then I moved on to ccnet. I will give more details on that in an upcoming post, but feel free to check out the ccnet setup here. If I find 100 builds today I'll have to put it under sspi though :) Sorry for the off port numbers. I need more IPs (anyone know a way to NAT based on host headers without a 5k$ cisco box?)

Edit : Bug in copyWebFiles. Copy task should just copy **, but that path should be in the basedir= of the fileset, and remove the flatten attribute. I'll edit the file when I get home



 Monday, March 28, 2005
Subliminal message in music

Misleading title. Sitting here listening to an live acoustic version of Sublime's boss dj, where Brad continually sings "It's so nice, I want to hear the same song twice. Think I will...



 Wednesday, March 23, 2005
Podcast for that other language

I've always been interested in learning more about that other language (java) (well, I guess that would be platform), but have never found the time to sit down and learn it. Probably since I have enough to learn on this side of the fence as it is :) I've always got time for a new podcast or two though, and that's where Zdot comes in. Zdot is a java podcast by Tim Shadel, which (so far in my listening experience) focuses on the lower level code. I've listened to the first three so far, and really enjoying the intro to java. I actually understand some of the concepts of spring now, and I think I need to go back and listen to this dnr again to put things in perspective. I look forward to catching up on this feed and learning a bit about the other side of the tracks. I'm REALLY looking forward to making it to his svn show.



 Tuesday, March 22, 2005
Local share access with no network cable

I was in a situation today where I needed to have some boxes talk to a local share on their box, while disconnected from the network. Who knew it wouldn't work out of the box (besides those who have tried before :). When you disconnect the network cable, windows decides that even local shares are inaccessible. This is a similar problem to the one Dave Burke had for his code camp 3 presentation. Had I turned to his blog first, I would have seen the reply from Robert Hurlbut on the loopback adapter, but I didn't, and found this post instead. Once I made the change to the registry, it worked perfectly (after a reboot that is).



Future, Past, and Present

Future

SBC points to a series of articles on the future of software development by Ralf Westphal. I have had my reservations about software factories, but they have really been based on a misunderstanding. Ralf makes a very good argument on why we software development might be heading in that direction, as well as some tips for current software developers so they make it through the transition. I think we are a ways off from his predictions, but it is definitely interesting, and something I want to follow very closely. I agree with many of his analogies, but am leery about some of the changes. I guess only time will tell.

Past

I was looking for some new podcasts this weekend, and found at least 1 gem. Adam Green has started a podcast about the history of software, and so far it's really fun and interesting. I have only listened to the first show, but really enjoyed it. The context of the conversation were some framers of our industry sitting around talking about naming products like dBASE, Lotus, and Friday. Can't wait to finish catching up on this one.

Present

Tonight Christopher Bowen, senior architect for Monster.com, is speaking at the CT .net developers group about unit testing and whidbey. If you are local, definitely make sure to check it out. I'll be there, and I hope to even drag a couple guys from my office.



 Monday, March 21, 2005
Engadget podcast returns

The engadget podcast quickly became one of my favorites late last year as Phillip and Lenn always covered very interesting topics, in a very renegade sort of way. It was a great show, and I was a bit upset when it just disappeared one day, no word, no more audio, nothing.

This morning, though, I see 1 new post in the Engadget Podcast folder. Thinking it might be the reason the podcast stopped I clicked on it, and low and behold theres a new show! Yay! This time it seems as if it's hosted by Eric Rice, another big name in podcasting. I haven't listened to it yet (or even downloaded it, damnit left my IRiver's usb cable at home), but hopefully tomorrow. although I found some new podcasts last night that I might need to listen to first, so stay tuned for some reactions to some new software related podcasts.



 Sunday, March 20, 2005
Thinkpad for sale

I'm selling my beloved laptop. I thought about using it for beta bits, but who wants to carry 2 laptops. I tried, it's just not good. So instead of letting my old friend gather dust, I figure it's time to send it off on its way.

The specs are below. It is currently loaded with windows2k3, but will either come clean or with windows2k, buyers choice. I purchased it a year and a half ago used, and have been taking VERY good care of it since I purchased it. It is currently covered by IBM ON SITE warranty. The coverage either ends in August or September of 2005, I will validate that tomorrow. The laptop also comes with 2 power adaptors as shown in the picture.

Specs

  • Pentium 4M 1.8 ghz
  • 1 Gig RAM
  • 40 Gig HD
  • 14.1 XGA Screen
  • CD/DVD-ROM
  • Internal wifi
Laptop has usb1.1 built in. I also have a powered pccard for usb2 I will include.

I'm asking 850$ shipped for the package. I would consider trades (or trades + cash), but must either be local (New England/ New York), or have alot of heat or ebay feedback. I would be interested in LCDs, or possibly a beefy desktop/server. Contact tranqy at gmail dot com for more details. (note, thats a Q)



DotNetNuke 3 released

Congrats to the DotNetNuke team who released version 3 of their open source portal framework. I know many sites have have been built with DNN2, and I'm sure this release will have continued success.

Downloaded the source, changed the project type (I'm not sure I'll ever work with another web project), and built first try. A little surprised to see 51 projects, but that speaks to how modular this version is. A quick glance through the code shows some assemblies that have no more then 50 lines of code. I'm intriguing to say the least.

After building, I simply had to setup my virtual directory, provide valid db credentials in the config file, then browse to the site, and the installation was complete. Within a few minutes I was sampling some of the many skins that come in the box. I haven't had a chance to review the built in modules yet, but I also noticed theres already quite a few other modules released here.

I definitely plan to spend a bit more time with this release of DotNetNuke.



 Saturday, March 19, 2005
Subversion merge tools

After a week of playing with svn on and off, I'm convinced it's the right choice for me. Changing my thoughts on version control took a bit, but the optimistic locking style of thinking has quickly grown on me. We are in the final testing stages at work, and I'm hoping we get through the migration next week. Sweet.

One thing we are still looking at are merge tools. Although we expect conflicts to be the exception, we wanted to make sure we had a solid understanding of the merge process, and the tools available to manage it. For those not familiar with how svn handles a conflict, it is actually quite simple. Right before you are going to commit a changeset (check in), you update (get latest) your existing working set. At this time, you are notified if any of the files you are going to commit conflict with existing files in the repository. Physically in your file system, you have a number of files to review: The original file, your changed file, and the file that is currently in the repository.

When you ask Tortoise to update your working set, it will display what has changed, and alert you of any conflicts. Directly from that dialog, you can launch a merge tool to assist in reviewing those files I was talking about. We have been evaluating some tools to be used here, and here are my initial thoughts. I only tested 3 paned merge tools we could find.

Tortoise Merge

Tortoise Merge is built right into tortoise, and certainly should not be shrugged off. It allows for you to see all 3 of the versions very easily, and very quickly pick which version you would like to keep via it's 3 pane layout. You can also directly resolve the changes (which tells svn you are ready to commit) right from within the ui. For very basic operations, this tool does very well.

The tool does have some shortcomings though. It does not allow you to edit the the files manually in case you so wanted. You can also only see that a line has changed, not what in that line has changed. It's a great built in tool for basic operations.

Araxis Merge

Araxis merge is a commercial product with a pretty hefty price tag, but has the features and capabilities to be worth it. It is certainly the most feature rich merge tool I evaluated. Araxis makes it very simple to find all of the conflicts by line, and also notes the exact section of the line that is in violation. The files can also all be edited inline.

Although feature rich and capable, I found the interface clumbsey, and difficult to use. Although powerful, I'm really looking for quick in this instance.

Tortoise settings : "C:\Program Files\Araxis\Araxis Merge v6.5\compare" /wait /a3 /3 /title1:"Mine" /title2:"Theirs" /title3:"Base" %mine %theirs %base %merged

Perforce P4WinMerge

Perforce offers a nice merge tool that works quite well also. This merge tool is free, but I want to read the license very well before I suggest it to the company. The tool is very nice, and simple to use as well. It makes simple work of choosing which version of the file you want to use from all of the available revisions, as well as edit the file inline.

P4WinMerge does not however show where in the line the change is, only showing that the line is different. The only other shortcoming I can think of is there could be some license implications, as I saw a couple posts somewhere about being careful with corporate usage.

Tortoise settings : C:\Program Files\Perforce\P4WinMrg.exe %base %theirs %mine %merged

Guiffy

Guiffy is a java based commercial app with a very reasonable price. Being a java app I was worried about a performance issue that some java ui's suffer from, but was pleasantly surprised with it's performance. It is extremely full featured, closely rivaling the featureset of Araxis. I feel Guiffy does not suffer from the same UI complexities of Araxis, though, presenting your versions in a very clean and easy to understand manner. Guiffy also makes it very simple to choose between your current version, and the version from the repository, as well as edit the file inline.

The only complaint I have with Guiffy is its support for the original file. The only way I could find to see the original file is to right click on the top pane, and choose view parent. The view parent dialog box also does not allow you to use that revision. Although I think it would be a rare occasion you would want to roll to the original version of a file, the only way I could see to do that was view the parent, copy the change, and paste it inline in the merge window.

Tortoise settings : C:\Program Files\guiffy70\guiffy.exe -s %mine %theirs %base %merged

KDiff

Thanks Darrell Norton for pointing out kdiff which somehow flew beneath my radar. KDiff is a cross platform open source 3 paned diff tool. I grabbed 0.9.88, which is dubbed as a "beta" set of bits. After swapping out my tortoise settings, I quickly came to realize this tool is exactly what we were looking for.

KDiff fills in all the holes, where the other apps I reviewed seemed to all miss at least 1 hole, for what I'm looking for. Please remember, the context of this review is quick and easy merge based on a svn conflict. And KDiff fits the bill perfectly. It allows the user to see where in the line the change is, as well as inline editing, while showing all 3 versions of the file right there. In just the first 5 minutes I knew this tool would bit the bill perfectly. The only changes I made to it's out of the box config was changing the font (man I love profont 8pt), and turning off the .orig file creation.

Tortoise settings : C:\Program Files\KDiff3\kdiff3.exe %base %theirs %mine -o %merged

Final thoughts

At this point I am leaning towards recommending Guiffy. I feel it's features, and low cost are a good fit for what we may need. Although not as powerful as Araxis, I think it will be much faster and more intuitive to work in. I would suggest reviewing all of the tools, though, since they all have pluses and minutes that may fit better into your environment.

Wow I'm sold on kdiff. It certainly doesn't have the power of araxis, but it's intuitive interface greatly makes up for it. The featureset is also quite adequate for what we are looking for. I would still highly suggest reviewing all of the tools, but will also say keep kdiff for last, since I really think it will fit the bill in most cases where developers want to review merge conflicts.

Edit 03.21.05@14.32 [Added Kdiff/ Changed Final Thoughts]



 Thursday, March 17, 2005
Going to Teched 2005

I'll be there. After months of persistance, I just got word that my request to go to teched this year was approved. Excellent. I have wanted to go to teched for many years, but never had the chance. This year, though, I'll get to be at the geekfest, and now I'm counting the days.

I haven't added myself to the techedbloggers list yet, but will in the next couple days. And of course I'll need to add the purty image that reminds me everyday that I'm going. I'll make sure to post a picture up (like Dave and Sahil) so if you see me there, make sure to say hi.



March madness baby

I've said it before, and I'll certainly say it again....

GO UCONN!!!!!!

We now return to our normally scheduled nerdy content



 Wednesday, March 16, 2005
Want gmail?

Went to google on another developers PC here and saw something really interesting, a want gmail link. Click it, and low and behold, you can sign up for a gmail account. Looks like the flood gates may have opened, although I still have 50 invites :) Congrats google on launching gmail (probably still beta) to everyone. I use gmail, and have since June as my primary email, and love it. Thanks for the great email service!



 Tuesday, March 15, 2005
Moving existing vss version controlled web projects to class lib

Yesterday I played the role of subversion salesman to our development team, and I wish svn had some sort of referral program :) I pretty much have our team sold on the value of svn, as well as moving away from web projects. We still have some learning to do before we implement it fully, but hope to have a sample svn repository setup later this week for a followup meeting. The biggest thing we need to brush up on are merging procedures and tools, since in my demo I was really fumbling around with that.

Out of the meeting, though, I did get the approval to move us off of web projects. So I took my manually modified .sln and .vbproj files and checked them into vss. Everything is working great. Until.... One of our developers was staging his new laptop and needed to get the whole project from VSS. I assumed with no web projects, it would go very smoothly. Nope. Can't get the projects that used to be web projects. Hmm, they aren't web projects anymore, so why not?

Come to find out, besides whats covered here, if your sln was controlled under vss, there are a few more steps that need to be done. Now, I couldn't really find anyone else doing this yet, so do this at your own risk. It seems to work here. The problem comes from the fact that the VS.Net VSS client adds more meta data that needs to be changed/removed. In the .sln file there are some values for SccProjectUniqueName, SccLocalPath, SccProjectName, and SccProjectEnlistmentChoice that need to be changed. I looked at another class lib and made the web projects match, and things seemed to work ok. So the final values looked something like this. (X being the number in the sln file)

  • SccProjectUniqueNameX = Folder\\file.vbproj
  • SccLocalPathX = .
  • SccProjectNameX : Removed the whole line
  • SccProjectEnlistmentChoiceX : Removed the whole line

After doing this and checking it all in it _seems_ to be working. If I find anything else that needs to be updated I'll update the post. Also, for those doing the same thing, the first step of the process is to add the "web" types to the class lib project. Here are the lines I added to my two files.

Added to C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\CSharpProjectItems\LocalProjectItems\LocalProjectItems.vsdir

..\CSharpAddWebFormWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2236|10|#2263|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4534|0|WebForm.aspx
..\CSharpAddWebServiceWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2243|20|#2266|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4521|0|Service.asmx
..\CSharpAddMobileWebFormWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2398|25|#2399|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4571|0|MobileWebForm.aspx
..\CSharpAddWebDataForm.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2380|45|#2381|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4559|0|DataForm.aspx
..\CSharpAddWebUserControl.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2378|55|#2379|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4558|0|WebUserControl.ascx
..\CSharpAddMobileWebUserControl.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2400|56|#2401|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4572|0|MobileWebUserControl.ascx
..\NewHTMPage.htm|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2042|60|#2280|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4528|0|HTMLPage.htm
..\Frameset.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2241|70|#2284|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4541|0|Frameset.htm
..\StyleSheet.css|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2314|80|#2315|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4544|0|StyleSheet.css
..\CSharpAddWebControlWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2297|120|#2298|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4533|0|WebCustomControl.cs
..\CSharpAddGlobalASAX.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2304|160|#2305|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4542|8192|Global.asax
..\CSharpAddWebConfig.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2312|170|#2313|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4545|8192|Web.config

Added to C:\Program Files\Microsoft Visual Studio .NET 2003\Vb7\VBProjectItems\Local Project Items\LocalProjectItems.vsdir

..\WebForm.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3062|10|#3063|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4533| |WebForm.aspx
..\WebService.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3032|20|#3033|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4516| |Service.asmx
..\MobileWebForm.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3127|25|#3128|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4562| |MobileWebForm.aspx
..\WebDataForm.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3094|55|#3095|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4552| |DataWebForm.aspx
..\WebUserControl.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3107|65|#3108|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4544| |WebUserControl.ascx
..\MobileWebUserControl.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3129|66|#3130|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4563| |MobileWebUserControl.ascx
..\StyleSheet.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3072|90|#3073|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4538| |StyleSheet.css
..\WebControl.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3060|130|#3061|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4532| |WebCustomControl.vb
..\WebConfiguration.vsz|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|#3076|180|#3077|{164B10B9-B200-11D0-8C61-00A0C91E29D5}|4540| |Web.config



Alton Brown is awesome!

Alton Brown is awesome. As far as I'm concerned, Good Eats is one of the best shows on foodtv, which also has many other great shows. Alton takes the cake in my mind though. His shows are always filled with fantastic tips, and plenty of science behind how cooking works. Also noticed this morning he runs a blog here, but couldn't seem to find the rss feed yet.

My wife was telling be about this yesterday, and I had to blog it. I haven't seen it yet, and it looks like the episode hasn't even aired yet, but this sounds sooooooo good. I'll be begging for some mac and cheese this week just to try this out. mmmmmm...

Link to fried mac and cheese.. yes, mac and cheese, but fried.. mmmmm