Derik Whittaker

Syndication

News


Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
If you cannot do a source pull and compile you are doing it wrong!

I know this may seem like old hat to many, but trust me not all organizations/projects are setup to allow you to easily pull the code from your source repository and compile.  I know it is sad, but if you ask me, this is just the tip of the ice burg in terms of what is ultimately wrong with our profession.

For those of you who may NOT think that pulling and compiling is absolutely necessary let me ask you one thing.  What value are you providing your organization if a someone who is new to a project (could be new employee, new team member, or even someone with a new computer) cannot pull and compile your source code in about 5 minutes?

Here is

What does a ‘bad process’ look like? (These are in no particular order)

  • User must download all code from source repository
  • User must install various 3rd party libraries
    • User needs to find out who has the tribal knowledge on what libraries need installing
    • User needs to first find these to install.  These may be on the company network, the internet, or god help me, on someone’s computer
  • User must ‘configure’ their workstation to install
    • This can be setup registry settings
    • Create config files with correct values
  • User must know which order to build the source
  • …. I am sure I missed some, but you get the point.

What does a ‘good process’ look like? (These are also in no particular order)

  • User must download all code from source repository
  • User needs to open a readme.txt file (or something like this).  This file should tell the person EXACTLY what needs to happen to build. 
    • In most cases it should simply be.  Click the ‘build source.bat’ file
    • In some cases where the user MUST configure their environment the file will walk them though it step by step.
    • In some cases where the user MUST install software the file will tell them EXACTLY what needs to be installed and where to find it.  Ideally the installers will also be in the source tree (can be in another location, it does not have to be next to the code).

How do we get to the point were there is ‘good process’?

  • All source must be inside your source control system
  • All installer files must be inside your source control system
  • You need to create a single click build file (use what ever build technology you want)
    • There must be an option for this file to build your ENTIRE environment.
      • Includes building the DB if needed
      • Includes creating folders on the drive if needed
      • Includes setting registry keys if needed
      • ….
  • You need to create a Readme file of some sort that tells the user what they need to do to get up and running

Plan and simple if it takes you more than 5 minutes to get a new developer up and running you are doing it wrong (this time does not include installing things like your IDE, or ‘developer environment’).

Every development shop MUST strive to simplify all process and move away from ‘hack and crap development’ and towards ‘professional development’

Till next time,


Posted 03-13-2009 1:38 PM by Derik Whittaker

[Advertisement]

Comments

Curtis Allen Gibeaut Jr. wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-13-2009 3:55 PM

It would even be better if the install was slipstreamed into the build process.  That way all 3rd party installers were kicked off verifying that they are installed on the machine prior to the source build.  But that's just me.  

DotNetShoutout wrote If you cannot do a source pull and compile you are doing it wrong! - Derik Whittaker
on 03-13-2009 4:45 PM

Thank you for submitting this cool story - Trackback from DotNetShoutout

Steve Evans wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-13-2009 5:34 PM

With the power of build scripts like Nant and MSBuild (and their associated community driven projects to extend them) it should be entirely possible to build a script that will verify 3rd party components are installed (if they need to be).  If they don't need to be installed, they should be in the pull from source (at least referenced as an external resource like with svn:external).  At the very minimum the script should contain a target to verify everything exists on the machine as it should.

But you're completely right that the only thing a developer should do after pulling the script is modify properties saying where installed tools are (like where the osql.exe is since not everybody keeps default installs...).

Billy McCafferty wrote S#arp Architecture 1.0 RC 2 Released!
on 03-13-2009 6:33 PM

Hoping we're in compliance with Derik's OSS suggestions , S#arp Architecture 1.0 RC 2 has been

James wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-13-2009 6:40 PM

Common sense advice, but almost every company I have joined has done this poorly, some of them considered to be innovative leaders in their field :)

Often fell to me because no-one wanted to do it, but there's nothing a little MSBuild/NAnt hacking can't fix, and once people have gotten used to being able to do a fresh checkout and build, they can't live without it.

It's amazing how many subtle deployment / file versioning bugs get squashed by any developer being able to do a complete build of the system from scratch easily, and being able to determine whether an issue was introduced by their changes or no.

KG2V wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-13-2009 6:52 PM

what do you do about per seat licensed 3rd party products, where you have to install them, and enter a product key?

We put the "what to do" in the documentation, and have a process other than that

Derik Whittaker wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-13-2009 7:00 PM

@KG2V

If you have a per seat license, then you need to have the needed info for installing/setting up inside your readme.txt file.  This should also include whom to contact about getting a license.

Community Blogs wrote S#arp Architecture 1.0 RC 2 Released!
on 03-13-2009 7:19 PM

Hoping we're in compliance with Derik's OSS suggestions , S#arp Architecture 1.0 RC 2 has been

KG2V wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-13-2009 8:33 PM

OK, basically, we have to do what we are doing.  We don't call it "readme.txt" It's "How to Install 3rd party controls"

Reflective Perspective - Chris Alcock » The Morning Brew #307 wrote Reflective Perspective - Chris Alcock » The Morning Brew #307
on 03-16-2009 4:16 AM

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #307

Scott wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-16-2009 1:09 PM

This is also my litmus test for Open Source projects. If I do a source get and can't compile after following the directions in the README, I don't even bother with the project.

Brian wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-17-2009 10:10 PM

If you can't open a solution and hit F5 and run the code then you have something wrong.   That simple.  

If a README is present, it's wrong.  

Any 'special' libraries should be a part of the corporate image for a developers machine - a *real* shop isn't going to have umpteen different libraries anyway - they'll have a stack, and that stack will be the standard for every project.

Anything 'special' should be in the pre/post build events.

F5 was invented for a reason.   MSBuild and NAnt should be used for deployment not developer local build/debug sessions.

Garry wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-18-2009 8:15 AM

If you have all your 3rd party tools in your source repo, what techniques are best to keep these tools up to date. Is it best to use the latest on a new project and leave the older projects with previous versions? Or is it best to update all 3rd party tools every time a new version comes out? Any thoughts anyone.

Derik Whittaker wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-18-2009 8:29 AM

@Gary,

The way that we work it is that we have a 3rd party folder, under that we have a folder for each product, and under that we have a version for the folder

Library -> NUnit -> 2.4.8

However, our current mandate is that EVERY project/module use the same version and we only upgrade when there is a valid reason and when we do update we update ALL projects.  But this only really applies to deployable assemblies like structuremap, or log4net.

The goal is consistency across our product (which has about 14+ stand alone modules)

Hope this answers your question

Garry wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-18-2009 9:16 AM

It does, thanks Derik.

Software Quality Digest - 2009-03-18 | No bug left behind wrote Software Quality Digest - 2009-03-18 | No bug left behind
on 03-18-2009 4:48 PM

Pingback from  Software Quality Digest - 2009-03-18 | No bug left behind

Derik Whittaker wrote Ivory tower policies or mandates are counter productive
on 03-19-2009 7:31 AM

I am sure that most of you have heard the term ‘Ivory Tower Architect’ and most of have a mental image

Community Blogs wrote Ivory tower policies or mandates are counter productive
on 03-19-2009 8:08 AM

I am sure that most of you have heard the term ‘Ivory Tower Architect’ and most of have a mental image

Michael D. Hall wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 03-19-2009 10:54 AM

@Gary

I understand your perspective. Although I think you may be a little dogmatic in your response. My question is, if a developer can identify and defend their reason for a specific tool how do you handle that situation? And that question applies towards tools that can be used by all developers or just for their specific project. And, I've been writing build scripts for over 5 years now, and I can testify that just hitting F5 is not close to adequate for large projects. I am currently sitting on a project that has two Windows Services, an ASP.NET application a console application and a small suite of unit tests that I am trying to fill up. The system uses localization and libraries to be GACed for interop between Classic ASP and ASP.NET. F5 is insufficient for my project purposes about 25% of the time, depending on where a change took place. If in the ASP.NET only, then no problem F5 and run, but anything else I have to refresh my entire development configuration and I would weep if all I had were manual tools.

Raidon wrote re: If you cannot do a source pull and compile you are doing it wrong!
on 08-11-2009 5:41 PM

Give please. If there's one thing I know it's God does love a good joke. Help me! Looking for sites on: Remodeling bathroom cabinets. I found only this - <a href="tsamadou13.gr/.../Cabinets">bathroom Cabinets wholesale</a>. The boy was still there, but he had calmed considerably. Don't let the tacky black and green color scheme fool you. With respect :confused:, Raidon from Indonesia.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)