Thursday, February 7, 2008

Clarifying things about CI Factory

For the first time I annoyed someone in my blog. And for starters, such an high profile person as Jay Flowers.
He was a little annoyed about my last post.

Just to clarify things, because I don't want to annoy anyone, here is a little more explanation into the problems I found:
  • before the installation:
    • We don't use Subversion. We are a Microsoft shop, so we are still using Visual Source Safe. I hate it, but that's how it is. CI Factory supports VSS, but it assumes you have a database per project. That is not our case, we have a central database with all the projects. I resolved this problem with a simple hacking into a couple of files. Problem resolved.
    • CI Factory relies on Winrar to create packages to deploy to the project folder. We don't have a license of Winrar. I didn't want to use it, so I wanted to replace it with a free alternative. Enter 7Zip. This took a lot more work, because 7Zip has less options than Winrar and has a curious way of creating SFX, but eventually i managed to do it. Problem resolved.
Edit: None of these are CI Factory problems. They were my problems, and I adapted CI Factory to work the way I wanted. Long live Open Source.


  • after the installation:
    • Trash on the source control - before I even put my source files under source control, I already had 32.498.777 bytes in 507 files under 282 folders. This looks like a lot. In my humble opinion, most of this should not be under source control. Only build scripts, config files and similar things should be there.
    • Project Structure messy - this is tied to the previous item. CI Factory creates the following structure:
      • /<Project name>
        • /Current
          • /Build
            • /lots of folders
          • /Product
            • /Install
            • /Production
            • /Unit Test
          • /Third Party
  • Your code should go under /<project name>/Current/Product/Production. It's just my opinion, but it looks a little hidden. With time you get used to it, but for starters looks like you are digging for your source. And under /<project name>/Current/Build is where I think things get messy. Under this folder are the executables to several programs (CCNet, nAnt, Simian, etc), temporary folders, log files, reports, etc. I know everything is related to build, but it is not organized. If it is not organized, it is messy. And I think support tools should be in Third Party, or something similar.
    • One CCNet server for every project - if you have 30 projects under Cruise Control (as we have), having a CCNet for every project makes it a little hard to maintain everything, if you want to upgrade your server the task is going to take longer and is more prone to error. I know there is upgrade.bat, but I have to run it for every project I have...
    • Replication - taking the example of our 30+ projects, you get several hundred megabytes of replicated stuff across projects. I know hard disk is cheap, but I personally don't like to have things replicated in that manner (and it is a burden to maintain).
In conclusion, if you are starting a new project, you don't have old projects to maintain and you are creating a new structure, give CI Factory a try.
If you already have lots of projects to maintain, CI Factory is not for you.

And that is my opinion.
I think now it is clearly explained.



PS: this reminded me that I forgot to add info about me. Now you can know my face.


Powered by ScribeFire.

Wednesday, February 6, 2008

CI Factory

I tried to get CI Factory to work on my project, but I found some problems...

To help setup me project, I followed this very nice show on dnrTV by Scott Hanselman and Jay Flowers.

Problems encountered:
  • Using VSS and not having my project on the root of the source control
  • Not using WinRAR
For the first problem, I had to hack into Properties.xml and SourceControl.Target.xml under Packages/VisualSourceSafe folder to add a new properties with the full path under VSS.

For the second problem, I hacked into a lot of files to replace WinRAR with 7Zip. As 7Zip has a peculiar way to create SFX files, I had to create 3 batch files to help 7Zip do the task.

After a lot of testing, the project finally build!

But when I say "the project", I should have said "the project skeleton". Without my source code, I'm already worth almost 30MB on disk... no code, only build scripts and support tools. And only Simian!

Problems:
  • you get lots of trash on your source control (build scripts is one thing but the binaries of nAnt, Simian, etc, is a bit overkill)
  • the project structure looks a little messy
  • you have one CCNet server for every project
  • you have lots os replicated things across projects
I decided to quit CI Factory. I think it is too complicated to maintain. There are loads of third party tools to watch out, and you have to change a lot if you already have some projects going.

In a future post, I'll write about our CCNet.

PS: if you want to see the changes I made to CI Factory, drop me a line.


Powered by ScribeFire.

Project Structure (re-revisited)

In the past few weeks, I've been researching what is the best structure for a project.

I found these aproaches:
  • SubVersion
    • /myproject
      • /trunk
      • /tags
      • /branches

Your development is done in “trunk”. When you want to do a release, you create a branch, for example “myproject/branches/release2.0”.
The development is still done in “trunk”. In “branches”, you only do maintenance.
If you want to label a particular development stage, you create a tag: “myproject/tags/RTM”
An advantage of SVN is that it stores only the deltas, so you don’t have everything replicated.

  • Microsoft Team Foundation Server
    • /MyTeamProject1
      • /Development
        • /FeatureBranch1
          • /Source
            • /MyApp
        • /FeatureBranch2
          • /Source
            • /MyApp
    • /Main -Can contain solution (.sln) files
      • /Source
        • /MyApp1 - Contains MyApp1.sln file
          • /Source - Contain folder for all source
            • /ClassLibrary1 - Contains ClassLibrary1.csproj
            • /MyApp1Web - Contains Default.aspx
          • /UnitTests - Container folder for unit tests
            • /ClassLibrary1Tests - Contains test project and code
            • /MyApp1WebTests - Contains test project and code
        • /SharedBinaries - Shared binaries e.g. libraries
        • /SharedSource - Shared source code
      • /Docs - Contains product documentation
      • /Tests - Container for tests
        • /FunctionalTests
        • /PerformanceTests
        • /SecurityTests
    • /Releases
      • /Release1 – Maintenance
        • /Source
          • /MyApp
      • /Release2 – Maintenance
        • /Source
          • /MyApp
      • /Release3 – Current release lockdown
        • /Source
          • /MyApp

I think this was inspired by SVN. All your development is done in “Main”. When you want a release, you branch it to “Releases”.
If you want to develop a special feature, or test another approach to your code, you branch it to “Development”, but your main development branch is in “Main”.

  • Tree Surgeon
    • /TestProject
      • /lib
      • /src
        • /Core
        • /TestProjectConsole
        • /UnitTests
      • /tools
        • /nant
        • /NCover
        • /nunit

This is an approach started long time ago. It doesn’t account for project releases, or other branches.

I think I’ll adopt TFS. But using VSS:
  • $MyTeamProject
    • /Development
      • /TestingIdea1
        • /Source
          • /MyApp
      • /TestingIdea2
        • /Source
          • /MyApp
    • /Main
      • /Source
        • /MyApp
          • /Source
            • /ClassLibrary1
            • /ClassLibrary2
            • /ClassLibrary1Tests
            • /ClassLibrary2Tests
        • /SharedBinaries
        • /SharedSource
      • /Docs
      • /Tests
        • /FunctionalTests
        • /PerformanceTests
        • /SecurityTests
    • /Releases
      • /Release1 – Maintenance
        • /Source
          • /MyApp
      • /Release2 – Maintenance
        • /Source
          • /MyApp
      • /Release3 – Current
        • /Source
          • /MyApp

The problem is that everything is replicated when you do a branch… oh well, as they say, hard-disks are cheap…

I’m still trying to get CI Factory to work. More of that in another post…



PS: This is a re-repost. Only ScribFire didn't messed the layout... and mine doesn't have the option the remove this irritating line...
PS2: Broken again... ARGGGHHHHH

Powered by ScribeFire.

Why I hate SAP

SAP is a kind of dinosaur, except for being extinct... unfortunately, if I may add.

I cannot conceive of a corporation, in 2008, that still uses a licensing method of the XX century...
And to use an idiotic piece of software that requires Visual Studio 2003...

And in 2006, their official response was:

"SAP currently has no plan to release a .NET connector version that will support Visual Studio 2005. A road-map regarding .NET connectivity to SAP systems will be published soon."

ARGGHHHHHH!!!!

Friday, February 1, 2008

Microsoft after Yahoo

It's official, Microsoft wants Yahoo under its belt.

Microsoft offers $44.6 Billion for Yahoo - Engadget

Powered by ScribeFire.