Estimating Integration times, is it really 3x? [closed] - integration

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I read in a mythical man month that integration takes 3 times the amount of time it took to develop the individual components.
What has you guys experienced?

Yes and no. Integration effort is probably still 3x, but now it's amortized over the whole development process (e.g. early integration, integration tests (esp. in TDD), etc.)
We still have to do the work but it doesn't catch us by surprise anymore.

That was referring to the bad old days when they built all the software components separately and then tried to put them all together. Smart people don't work like that anymore - they integrate continuously.

I would agree, if not higher. Though it really depends on the integration touch points.
I was involved on a project to carry out integration of a number of modules between Siebel and SAP. While both of these products have integration modules available, all the problems on the project (and there were many) were involved in the integration.
It wasn't helped by the fact that the majority of SAP that we were using was in German, and the messages being transfered were in different XML encoding formats (UTF8 / UTF16).
Once we'd got to grips with the intricacies of what SAP wanted to send and recieve, the whole project moved along much quicker.
Key things for a successfull integration project:
Good documentation (in English!) on the integration modules
Good documentation on the message formats
Good project management
The project management bit is important as they supply the pizza, and do show some understanding when you have been working 30 hours straight to get an account name from one textbox on one machine to appear in another textbox on another machine.
Our project lasted over a year. The rest of the configuration of Siebel that we did, which was alot was only a couple of months,
So Integration - 10 months+, rest of the config 2 months.

Integration time depends on a few of factors: the size of the project, communication between teams, and your integration philosophy.
Small projects take less time to integrate. Large, very large, or huge projects will take more time to integrate. I've been on small projects where integration was minimal. I've been on huge projects spread across multiple component teams where integration took a very long time.
Time to integrate also depends on how well you project communication across teams. If your teams are not communicating it can take 3x or more time to integrate and work out all the related bugs.
Continuous integration helps with the perception that integration takes less time. With CI the time to integrate is amortized over the life of the project. But again if you have a poor relationship with the other component teams to total time for all integrations will take non-zero time.
CI is definitely better than the alternative. Waiting until late in the development cycle to integrate is bound to cause you much pain. The earlier you begin the integration the more comfortable each team becomes with the process.

Kind of a side note, there is an interesting talk given by Juval Lowey regarding this. If you have many tiny components, then you increase effort to integrate. If you have only a few large components, you decrease integration, but you have more complex components to maintain. So your effort to integrate is dependent on the architecture and where it balances the number of components to their complexity. A good balance is key, because if you drift too one side or the other, the effort required increases exponentially. If you have 20 components and add a 21st, it's not just 5% (1/20) more complex, because you have to consider the interactions of the potentially other 20 components. So adding one component adds the potential for 20 ways to interact with the existing components. Of course a good design will limit this interaction to as few components as possible, but that was basically why Juval felt it was exponential.

Neil and Markus' answers are spot on. In Windows, we integrate continuously. Our source code control system (we call it "Source Depot") is hierarchical with "WinMAIN" being at the top, and a tree of branches underneath it that general correspond to the organizational structure.
In general, changes flow up and down this tree in a process of "forward integrations" and "reverse integrations". This happens very regularly - almost every day for the top level branches under winmain, and a bit less often for the lower level branches. Each major branch builds fully every day in at least four flavors. The top level branches build in six flavors. A flavor is something like x86/fre, or x64/chk. We also get some daily pseudo localized builds as well.
By "build" I mean build a fully installable Windows client product from source. This happens several hundred times per day.
This works well for us - there are two important goals here:
maintaining good code flow (we call it velocity) up and down the tree. The idea is that any branch is never too different from WinMAIN.
Catching integration errors as early as possible.
Markus is very correct that this amortizes integration costs over the life of the project. For us, this makes the costs a LOT lower than they would be if we deferred costs more toward the ends of cycles. This is how things used to work. Not to air too much dirty laundry, but when I started in Windows about 5 1/2 years ago, getting a build out took a very, very long time. They now happen every day, like clock work. The Windows Engineering Tools and Release group (WETR) gets all the credit for this.
As many others have suggested in various forums - regular integration and full daily automated builds are essential for most projects.
Note, daily and regular automated test are a whole other topic (its a massive effort as you can imagine).

If you have an integration phase towards the end of your project on you project plan you are doomed and x3 is not too bad.
You should rather go for continuous integration, where you have, say every 2 weeks, a release with some integration before it.

Related

Empirically estimating a project duration [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
What are common empirical formulas that can produce a rough estimate of project duration for waterfall methodology ( up to 20% fluctuation is acceptable). If it helps in narrowing down the answer, you can assume that following is more or less known :
Number of devs is known and fixed, most devs are above average in terms of know-how, however some learning about domain-specific issues might be required.
Known and fixed max. number of app users.
Technology stack to be used is reasonably diverse (up to 4 different languages and up to 6 various platforms).
Interfacing to up to three legacy systems is expected.
Please feel free to provide estimate methods which cover a broader scope than the above points, they are just provided for basic guidance.
Do yourself a favor and pick up Steve McConnell's Software Estimation: Demystifying the Black Art. If you have access to past estimates and actuals this can greatly aid in producing a useful estimate. Otherwise I recommend this book and identifying a strategy from it most applicable to your situation.
Only expect to utilize 70% of your developers time. The other 30% will be spent in meetings, answering email, taking the elevator, etc. For example if they work 8hrs a day, they will only be able to code for 5.6 to 6.5 hours a day. Reduce this number if they work in a noisy environment where people are using the telephone.
Add 20% to any estimate a developer gives the project manager.
Lines of code is useless as a metric in estimating a project.
Success or failure depends on concise requirements from the customer. If the requirements aren't complete, count on the customer being not happy with the finished product.
Count on the fact that not all of the requirements will be dictated by the customer. There will be revisions to the requirements throughout the project.
Step 1. Create a schedule that is as granulated as is reasonably possible.
Step 2. Ask the people involved how long their features will take.
Step 3. Create an Excel spreadsheet which maps predictions to actual times.
Step 4. Repeat steps 1-3 for all new projects. Make use of an aggregated mapping from previous instances of step 3 to translate developer estimates to actual estimates.
Note that there are tools which can do this for you.
See also
Evidence-based-scheduling.
This project is not going to be cheap...
Number of devs is known and fixed,
most devs are above average in terms
of know-how, however some learning
about domain-specific issues might be
required.
This is a good thing. You don't want to flood the number of developers into the project. Though if you go above around 10 people, do count every 2 as only 1, as the rest will go up in overhead. Unless you can split the task into something that can be handled by two totally separate teams. Then you could have a chance of getting some traction.
Known and fixed max. number of app
users.
This means that you can with more certainty land your architecture early on, as you can estimate how much effort you must put into scaling your solution. This is a good thing. Make sure that you work within these limits and never ever fool yourself into thinking "it's fast enough". It almost never is if you doubt that it could be too slow...
Technology stack to be used is
reasonably diverse (up to 4 different
languages and up to 6 various
platforms).
This isn't as important as to do your people know this stack/set of languages? If there are any learning involved, raise the estimate x2 or x3 if you don't perform a proof of concept up front to learn the technology. Or even better, take the pain and get some coursing. If the language for implementation or technology to be used is unknown, then it is quite likely that you will misuse the technology and do things that will screw stuff up.
Make sure that the technology is proven or you'll end up getting bitten by it.
Are the source available for the tools/technology?
Do you get support?
Do you understand the product and or used it before?
Have the customer used it before?
If too many of these questions get a no, add some (or a lot of) additional time to the sum.
Interfacing to up to three legacy
systems is expected.
This is really a kicker. For legacy integration ask yourself:
Has anyone else integrated with them?
Do you have access to people with knowledge of these systems?
Do they intend to share this knowledge with you?
Do you have to wait for changes being created in these systems?
Are there test systems available for you to use?
Are there development systems available for you to use?
Again, if too many of these questions has a "no" on them, then be afraid. You should also know that actual integration takes about 3-5 times longer than you actually think.
This isn't a project that I would have given a table grabbing estimate for. Do yourself and your customer a favor and do this by the hour. If not, you will as times go by start cutting corners to cover up your lack of progress/underestimation... And both you and your customer will suffer.
There are many cost estimation software tools that can greatly ease the pain of cost estimation, we use ProjectCodeMeter. I know these tools are not perfect, but they do save time getting started by pointing towards the right direction.
Try this list of estimation tools on Wikipedia.

Cost, schedule, quality: pick two [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
We have heard the adage, "Cost, schedule, quality: pick two." It has been my recent experience on big government projects that quality often suffers due in part to schedule constraints. In fact, sometimes project managers choose schedule with little apparent regard to quality and sometimes little regard to cost.
Are you asked to compromise? What are your experiences in commercial worlds? When you are the program manager - perhaps you are self-employed or work on projects at home and on weekends - and you control cost, schedule, and quality, do you "pick two?" Do you have favorite parts of your development methodology(ies) for which you never compromise (e.g. automated testing)?
Finally, which development methodology do you suggest for a team forced to choose schedule and cost over quality? Thanks in advance.
I suggest we vote up well-reasoned comments.
It's been my experience that rather the opposite is true: concentrating on quality (especially early on) tends to reduce cost and schedule. From what I've seen, I'd say most projects that have serious overruns do so mostly because they get close to what they thought was the end, and they find that their code doesn't work. At that point, they try to fix things by putting in lots of extra time debugging and such, but it's really too late to do much good. Worse, they have to undo quite a bit of what they did, because some parts depend on poor design decisions elsewhere and such.
"Cost, schedule, quality: pick two."
That's the traditional statement, but aren't there four parameters not three? There's low-cost, short-schedule, high-quality, and high-quantity: you can maximize any three of these if you can sacrifice the fourth.
Are you asked to compromise? What are your experiences in commercial worlds?
When someone asks something of me, my cost is fixed (i.e. my rate per hour or per year), so ignoring costs.
The quality varies somewhat: some kinds of reliability look for additional written design and documentation associated with the software, whereas for other types of software they might say "as long as the software works we don't mind whether you write any documentation". I always experience an implied minimum quality level (e.g. any/all noticeable-at-runtime software bugs must be fixed).
I tend to insist on short schedules: other people might have long-term, multi-year plans, but I typically "sign up" or commit to doing something for the next few days or few weeks: longer than that and I'm not comfortable estimating it (and it probably isn't well-defined).
Therefore, the sacrifice is quantity: I want people to give me a little bit at a time, preferably one job at time (see also the words "sprint" and "iteration").
When you are the program manager - perhaps you are self-employed or work on projects at home and on weekends - and you control cost, schedule, and quality, do you "pick two?"
I sacrifice schedule; I don't care how long it takes, so long as:
Cost is fixed/zero (i.e. I'm the only one doing it, pro bono)
Quality is acceptable
Quantity (or functionality) is as planned
I may reach a point where I run out of schedule, i.e. I decide that I can't afford to continue working on the project: at which point I sacrifice (the remaining unimplemented) quantity. Planning for this eventuality, it may be relevent to remember that it's sometimes better to have finished 50% of the project than to have half-finished 100% of the project (i.e. better to have half the functionality finished and usable than to have finished nothing).
Do you have favorite parts of your development methodology(ies) for which you never compromise (e.g. automated testing)?
Source code that's tidy enough for me to understand: software runs as expected on the computer only because I was able to, first, run it in my head.
Also I insist on testing software. It doesn't have to be unit-tested (instead, system-testing is OK) but in spite of my bravado about about its running in my head I won't guarantee anything that isn't tested. My boss used to say, not "you get what you expect" but "you get what you inspect".
For a long-running project, the tests need to be automated. I'm willing to refactor (see point 1 above) and I therefore need to run regression tests. If the tests were manual then the cost to run them would be proportional to the amount of code, so the time required for testing would increase as O(n squared), i.e. it would be too expensive if it weren't automated.
In my experience, you will always be asked to compromise something. It will differ based on different clients.
You can personally refuse to compromise on certain aspects, but sometimes the only way to do so will be to change projects or jobs.
SCRUM and other methodologies are ways of managing the compromises and making them apparent to your managers and clients. They do not prevent compromises.
Lastly, remember that these are not binary attributes. You will balance how much "quality" can be compromised in different aspects of your project (DB vs GUI, Reporting vs Computation etc), and balance that against speed and cost. You don't "pick two." You make thousands of different decisions to meet the needs of your client or manager.
I recommend Scrum. It's an agile development framework, focused on iterative development phases, whereby at the end of 3-4 week development intervals, you have a tangible product at the end of each 'sprint'. Then at the end of each sprint, you go over as a team what worked last round, what can be improved, and you mitigate any changes in requirements you may have.
It's really good in a government environment where people change their minds all the time as they come to a better understanding of what they want from developers, in terms of what the final product should look like, because if the product lead completely changes his or her mind, the developers can still have a sense of accomplishment for having handed off a deliverable that should be usable.
http://en.wikipedia.org/wiki/Scrum_%28development%29
SCRUM with adequate SCRUM software.
SCRUM is an agile Software Development methodology where all the tasks of a project are simplified down into task-groups called sprints. It's an excellent way to keep track of all of the tasks for a specified person, and the number of hours of project planning it's saved is is absolutely invaluable.
Give it a go - you wont turn back, I'm sure.
If you're choosing schedule and cost then worrying about methodology is the wrong thing to do. Go code. Code as fast as you can. Feel free to do dirty hacks that work, so long as they allow you to make the schedule without bringing on additional developers. Remember, if quality actually doesn't matter then maintainability and testing is not really important since those are both quality issues.
Somehow, reading that, I doubt that you actually want to ignore quality completely :)
I live in the world of the classic waterfall SDLC, and we have client-driven deadlines. So for us, schedule is top priority. Cost isn't really so important to us because we estimate and bill the client before work begins. To balance the two and still achieve decent quality, we developers try to overestimate the amount of work any change will take, giving us adequate time and resources to do the job well. It's a bit slimy but it's a good workaround.

Inducting Fresh Computer Graduates as Programmers [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
What are the key practical concepts that a fresh graduate should be educated with when he starts with his first programming job and how soon should you expect him/her to be productive and actually deliver the code you expect ?
source control and testing
Get them started with checking out code and writing unit tests first, learn what its about, and then go from there.
Yeah, that's a subjective question. We have done several summer and during-school internships as well as hired recent grads in CS.
If we start with a student who knows:
An OOP-ish language (Java, C#, VB.NET, C++)
How to fire up a compiler/debugger
How to work with our Source Code Control
Then given a defined problem domain with prerequisites (for example, for a recent intern, the problem domain was "adding autogenerated annotation metadata to TIFF files using self-describing barcodes"), the student needed to therefore know
How to generate and parse XMP
How to read/write metadata into TIFFs (we have tools for that)
How to read from a barcode scanner
Write unit tests
We saw progress in a week and saw demo code in a month. This was all within expectation. I mostly let him work on his own, but stepped in and course corrected some of his style and coding practice.
The important part of this is how goals were set and met. I made the important parts crystal clear (ie, requirements) and left the less important parts up to his design. After all, who wants to do paint by number all the time? For setting goals, I try in general to follow the SMART guidelines. A good goal is
Specific
Measurable
Avhievable
Realistic
Timely
It's very important that the project has a good feedback loop for communication. We were somewhat wanting in this regard.
Don't assume anything.
I made it through college without source control. Testing was stepping through the code with the debugger. No paperwork was needed for any assignment.
These 3 things are vital for production-grade code.
Just my thoughts and experiences:
Mentor. Assign a senior or lead programmer to mentor them. Not everyone is geared for this sort of assignment and a good mentor makes a difference. We have a mentor assigned to every new programmer - regardless of how long they have been coding - just to get the new employee familiar with our systems.
Start small. Depending on how your organization / team / etc is configured have the new grad start on some small maintenance projects, with a mentor reviewing their code and guiding them.
Get them training in the development environment your shop works in - expect that they will know a little about a few languages but that most of their development experience will be with school projects - not exactly solid production code. They will need a solid base to work from in the environment you use.
Code review and best practices - give them guidelines and make sure that they stick to them - if you are not using best practices internally, then start. Makes a huge difference when a large development group is involved. Review code frequently - this does not have to be a large group of developers in a meeting - one on one reviews, informal inspections, etc work wonders.
Develop an environment of cooperation - allow developers to mingle and talk and brainstorm - give them the opportunity to discuss ideas and thoughts that might not be related to the code at hand - they will rely on each other more then plants in the cube farm and production will higher quality. Allow them to read blogs and sites related to their craft - sights such as this one, coding horror, hacker news, etc. Support them going to local user groups and developer conferences.
Productive? That depends on the individual - some new graduates will never be productive coders but might be productive analysts or managers - some will be code machines out of the gate but will quickly churn out 1000 lines of maintenance nightmare code where 20 would suffice. I would say a fresh programmer out of school should be productive in 6 to 8 months - this is to say up to speed with you average programmers on staff, able to take a new project for your product, design and implement it, and able to handle any maintenance task required. It takes time to get the experience required to be productive - experience that can only come from actually developing in a production environment.
First: If you are a fresh graduate or a skilled developer - you always can gain new experience. So developers should be ready to always learn.
For the question: If your dev-team Practices Test-Driven-Development the first thing should be to show him how to write tests and how it can be useful.
Naturally the freshman should be able to use version-control, so if he relly has no skills at version-control a short introduction for this should be made.
Here are a few things I've found to be important for recent grads as well as new hires that have experience:
be proactive about including them in the corporate culture, don't assume they will fit in on their own
include them in meetings even if they are only there to listen
encourage them to interact in meetings when appropriate
be careful when dismissing their ideas as bad I've seen this discourage people from mentioning good ideas later down the road
Use of source control would be first on my list as very few schools need or rely on this. Really sit down and explain how to use the product you use and why it is necessary. Then for at least the first month, make sure to frequently check to make sure they are using it.
Next would be basic database skills. I've yet to see anyone come out of school really understanding how to query a database.
Third would be an introduction to your database and code base, explaining how things are done and organized and why.
Fourth, testing procedures and policies including how to do a code review, unit testing, QA etc. Tesing is not something that most students need to worry about either.
Fifth, assign a mentor if at all possible, someone the new person can go to for advice, to ask questions about company basics. You probably need someone to give them the basics of professional behavior as well. What is acceptable in terms of dress, attendance, etc.

Re-write access adp / sqlserver to C# .net?

I am a non technical person and have a small company who has been supporting my companies software for a number of years. The solution works well and permutations of the solution has been with the current IT service provider for over 15 years. I recently got a more established IT firm to do a general audit on the software. The current solution uses access as a front end with sqlserver 2005 as the database. The company who did the audit presented a list of faults amongst others that the technology is outdated, the solution is not scalable, bad design, non user friendly interfaces, tables not normalised, tables has no referential integrity, non use of proper coding standards and naming conventions, no application security only database security etc. The firm who did the audit proposed that the solution must be re-written and offered to do so. The current service provider aknowledges some of the findings but assures me that it poses very little or no risk to my business. To re-write the application will cost a lot of money. I am in a difficult situation and would appreciate some technical advice. I basically need to know if my business is at risk running on the current technology. I have a maximum of 70 concurrent users working on the system at a given time
Well, if you value Joel's word, i would say that you are indeed, risking alot here.
Rewriting stuff was and will never be a safe thing to do for a company.
To boil it down into simple terms, ask yourself these questions:
Are you having problems with the software currently? Are users complaining about the user interface, or is it particularly hard for new users to pick up the software when using it? Is data being lost or corrupted at any stage, or are you having problems retrieving reports from the database?
Do you currently, or in the future are you likely to need modifications? If your software is badly written, modifications will be more costly, and more likely to break the application and cause downtime in general.
If the answer to both questions is no, then you likely don't need to rewrite the software. You have to remember that good software developers see badly written software and want to re-write it properly - as well as this, there is money for them in developing the software, so their view isn't totally unbiased.
Like others have said, re-writing a system has its own share of risks - old bugs that were fixed a long time ago can rear their heads again, new bugs can be introduced, the developers of the new system can totally miss the point and make the system less usable than the previous system.
If there are problems with the current system though it may be worthwhile to consider having the system re-written by competent developers - if you opt to go this route however, make sure to get feedback from your current users, especially the 'expert' or 'power' users, to ensure that the system will fulfill all of their requirements.
Before you go view your problem from the technical perspective, you must assess how critical the application is to your business. It sounds as though you have a functioning application. If it delivers consistent behavior AND you have no need for upgrades / new development, you may want to leave it alone. We software developers love to complain about everyone else's code, re-write other's work with "elegant" solutions. That means money.
However, you have an investment that may need maintenance, and when you have the underlying code and database in dis-array, you will incur more cost because the application does not lend itself to be modified. You'll want to get a feel for how much change you need to support. Given that it has been in production for 15 years you've had a good run, so you don't have much risk there.
To do a re-write will cost you, because you need to recreate what the app does, and since the supporting database and program seem to be "de-normalized" and unstructured, it's going to a big effort. There are advantages to have a clean database model because it will be easier to do reports, export to Excel, etc. AND should you want to modify it the developers will have an easier time figuring out what to do.
To spend money to get what you already have requires that you challenge the firm to detail what additional benefits you'll receive. Are these benefits beyond what you're getting today, and will this firm deliver on their promises? Will your company be better off if the database is "normalized" but you receive no other benefit than what the current app gives you? Keep these in mind before you make the jump to a new platform.
Fix the problems in the existing app. It will be much cheaper, can be done incrementally, and if done properly, will result in a more maintainable app.
The suggestion to replace the ADP front end sounds like pure prejudice/ignorance to me -- they don't sell Access development so they want to build you an entirely new app.
On the other hand, the advice about the back end sounds like something that you shouldn't wait to fix (though it could require a lot of work, since existing data likely won't fit proper RI).
The front end and back end problems are two separate issues, and can be handled independently (though the app may need to be updated to reflect changes in RI -- impossible to say without a case-by-case evaluation).
I would hire a competent Access developer with ADP experience to handle the project. This will be much cheaper than the complete rewrite and you won't sacrifice any functionality, nor will you re-introduce bugs that have already been addressed in your existing app. It can also likely be done incrementally (depending on what the problems are and how they need to be solved).
The suggestions offered by the "more established IT firm" are pretty common for access/sql server projects. The suggestion is almost always re-write them as web applications.
I just did this myself last year -- took an MS Access front-end/SQL Server back end application, and rewrote the access part as a C#/ASP.Net website. We enjoyed better performance and more flexibility as a result of the switch, but the old front end had been around long enough that we never did get back all of the functionality that we used to have before the rewrite.
If you're actually seeing 70 concurrent users, and none of them are experiencing performance issues, and your corporate network is secure enough, then you may lose more by rewriting the application, at least in terms of functionality. On the other hand, this may be a good chance to evaluate "what works" and "what could work better"--and enhance workflows.
Excellent use of coding standards doesn't necessarily translate to an excellent application.
What prompted the audit? Does their solution address this issue?
Let's do the math:
People: 70
Avg. Hrs Using software/Day: 2 (Conservative)
Salary/Hour: $8.00 (Really Conservative)
Business Days/Year: 250 (Took out weekends & vacation/sick)
Cost of labor using application: 70 * 2 * 8 * 250 = $280,000 / Year (Could go over 500K)
How much improvement can you get? 5%, 10%, 25%
How much will the new application cost? 50K, 100K, 200K
If you are able to save this time, will your users be freed up to do revenue generating activites or will they just have more time to surf the web? You may want to create some worker efficiency factor: 90%, 75%
Simple answer... Most of the "risks" of using Access are surmounted by using SQL server as the backend. You already said your current solution works.
So it boils down to your future plans. If your existing application isn't missing any functionality that can't be provided via access I would just stick with what you have.
If you need new features I would consider a few things.
Are they something Access can't provide or do well (ex: Internet-facing Solutions)?
What is the potential benefit reaped by having the new features?
What is the potential cost incurred by not having the new features?
Can you put a dollar figure on 1 & 2?
How much to develop the solution in Access?
How much to develop the solution in C#
In other words, always do the CBA :) Better yet, do you own CBA, then ask both companies to provide you with one, and compare for fun. In the worst case you might get your existing company to come down on their price to retain you as a client.

Nightly Builds: Why should I do it? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Why should I do Nightly Builds?
You should do nightly builds to ensure that your codebase stays healthy.
A side effect of doing nightly builds is that it forces the team to create and maintain a fully automated build script. This helps to ensure that your build process is documented and repeatable.
Automated builds are good at finding the following problems:
Somebody checked in something that breaks stuff.
Somebody forgot to check in a necessary file or change.
Your build scripts no longer work.
Your build machine is broken.
Doing this nightly ensures that you catch such problems within 24 hours of when they occur. That is preferable to finding all the problems 24 hours before you are supposed to deliver the software.
You should also, of course, have automated unit tests that are run for each nightly build.
I've personally found continuous integration to be better than nightly builds:
http://en.wikipedia.org/wiki/Continuous_integration
I even use it on one man projects, it's amazing how fast you can expose issues and take care of them right there.
I've been doing build engineering (among other things) for 16 years. I am a strong believer in build-early, build-often, continuous integration. So the first thing I do with a project is establish how it will be built (Java: Ant or Maven; .NET: NAnt or MSBuild) and how it will be managed (Subversion or some other version control). Then I'll add Continuous Integration (CruiseControl or CruiseControl.NET) depending upon the platform, then let the other developers loose.
As the project grows, and the need for reports and documentation grows, eventually the builds will take longer to run. At that point I'll split the builds into continuous builds (run on checkin) that only compile and run unit tests and daily builds that build everything, run all the reports, and build any generated documentation. I may also add a delivery build that tags the repository and does any additional packaging for a customer delivery. I'll use fine-grained build targets to manage the details, so that any developer can build any part of the system -- the Continuous Integration server use the exact same build steps as any developer. Most importantly, we never deliver a build for testing or a customer that wasn't built using the build server.
That's what I do -- here's why I do it (and why you should too):
Suppose you have a typical application, with multiple projects and several developers. While the developers may start with a common, consistent development environment (same OS, same patches, same tools, same compilers), over the course of time their environments will diverge. Some developers will religiously apply all security patches and upgrades, others won't. Some developers will add new (maybe better) tools, others won't. Some will remember to update their complete workspace before building; others will only update the part of the project they're developing. Some developers will add source code and data files to the project, but forget to add them to source control. Others will write unit tests that depend upon specific quirks of their environment. As a consequence, you'll quickly see the ever-popular "Well, it builds/works on my machine" excuses.
By having a separate, stable, consistent, known-good server for building your application, you'll easily discover these sorts of problems, and by running builds from every commit, you'll be able to pinpoint when a problem crept into the system. Even more importantly, because you use a separate server for building and packaging your application, it will always package everything the same way, every time. There is nothing worse than having a developer ship a custom build to a customer, have it work, and then have no idea how to reproduce the customizations.
When I saw this question, first I searched for Joel Spolsky's answer. Bit disappointed, so I planned to add it here.
Hope everyone is aware of Joel Test on Careers.
From his blog on The Joel Test: 12 Steps to Better Code
3. Do you make daily builds?
When you're using source control, sometimes one programmer
accidentally checks in something that breaks the build. For example,
they've added a new source file, and everything compiles fine on their
machine, but they forgot to add the source file to the code
repository. So they lock their machine and go home, oblivious and
happy. But nobody else can work, so they have to go home too, unhappy.
Breaking the build is so bad (and so common) that it helps to make
daily builds, to insure that no breakage goes unnoticed. On large
teams, one good way to insure that breakages are fixed right away is
to do the daily build every afternoon at, say, lunchtime. Everyone
does as many checkins as possible before lunch. When they come back,
the build is done. If it worked, great! Everybody checks out the
latest version of the source and goes on working. If the build failed,
you fix it, but everybody can keep on working with the pre-build,
unbroken version of the source.
On the Excel team we had a rule that whoever broke the build, as their
"punishment", was responsible for babysitting the builds until someone
else broke it. This was a good incentive not to break the build, and a
good way to rotate everyone through the build process so that everyone
learned how it worked.
Though I haven't got an opportunity to make daily builds, I'm a great fan of it.
Still not convinced? Check out the brief here in Daily Builds Are Your Friend!!
You don't actually, what you should be wanting is Continuous Integration and automatic testing (which is a step further than nightly builds).
If you are in any doubt you should read this article by Martin Fowler about Continuous Integration.
To summarize, you want to build and test as early and often as possible to spot errors immediately so they can be fixed while what you were trying to achieve when you caused them is still fresh in your mind.
I'd actually recommend to do builds every time you check in. In other words, I'd recommend setting up a Continuous Integration system.
The advantages of such a system and other details can be found in Fowler's article and on the Wikipedia entry among other places.
In my personal experience, it's a matter of Quality Control: every time code (or tests, which can be seen as a form of requirements) are modified, bugs might be creeping in. To ensure quality you should make a fresh build of the product as it would be shipped and perform all the tests available. The more often this is done, the less likely bugs will be allowed to form a colony. Therefore, daily (nightly) or continuous cycles are preferred.
In addition, whether you restrict access o your project to developers or a larger group of users, a nightly build enables everyone to be on the 'latest version', minimizing the pain of merging their own contributions back into the code.
You want to do builds on a regular schedule in order to catch problems with integration of code between developers. The reason you want to do this nightly, as opposed to weekly or on some longer schedule, is that the longer you wait to discover these kinds of problems, the more difficult it will be to resolve them. The practice of doing a build on every check in (Continuous Integration) is just taking the nightly build process to a logical extreme.
The side benefit of having a repeatable build process is important in the long run as well. If you work on a team where there are multiple projects going on, then at some point you will need to be able to easily recreate an old build, perhaps for creating a patch. :(
The more you can automate the build process, the more time you will save for each subsequent build. It also takes the build process itself off of the critical path of delivering the final product, which should make your manager happy. :)
It also depends on the size and structure of the team(s) working on your project. If there are different teams relying on each others API, it may make a lot of sense to have nightly builds for frequent integration. If you're hacking away with only one or two team mates it may or may not be worth it.
Depending on the complexity of your product continuous integration may or may not be able run a full test suite.
Imagine Cisco testing a router with the literally 1000s of different setups to test. To run a full test suite on some products takes time. Sometimes weeks. So you need builds for different purposes. A nightly build can be the basis for a more thorough test suite.
I think they are very important especially on projects with more than 1 person. The team needs to know ASAP if someone:
checks in a bad file
doesn't check in a file
...
Any build automation is better than no build automation :-)
Personally, I prefer daily builds - that way if the build doesn't work then everyone is around to get it fixed.
In fact, if at all possible then Continuous Integration builds are the way to go (i.e. a build on every check-in) as that minimizes the amount of change between a build and so makes it easy to tell who broke the build and also easy to fix the build.
Well ... I guess it depends a lot on your project, of course. If it's just your hobby project, with no releases, no dependencies, and noone but you submitting code, it might be overkill.
If, on the other hand, there's a team of developers all submitting code, automatic nightly builds will help you ensure the quality of the code in the repository. If someone does something that "breaks the build" for all others, it will quickly be noticed. It is possible to break the build without noticing, for instance by forgetting to add a new file to the repository, and nightly builds in a centralized location will detect these quite quickly.
There are of course other possible benefits, I'm sure others will supply them. :)
Nightly builds are only necessary for significantly large projects (when it takes too long to build it often throughout the day). If you have a small project that does not take long to build you can build it as you get functional pieces of code done so that you know that you did not mess anything up in the procees. However, with larger projects this is not possible so it is important to build the project just so that you know that everything is still in working order
There are several reasons, some will be more applicable than others
If your project is being worked on by two or more people
It's a good way to grab the latest version of code that you aren't working on
A nightly build provides a slice in time of the current state of the code
A nightly build will give you a stable build if you need to send code to people
Nightly builds aren't always necessary - I think they're only really useful on big projects. But if you're on a big project, a nightly build is a good way of checking that everything is working - you can run all your tests (unit tests, integration tests), build all your code - in short, verify that nothing is broken in your project.
If you've got a smaller project your build and test times will be shorter so you can probably afford to do more regular builds.
Nightly builds are ideal for performing static code analysis (see qalab and the projects it collects stats from if you are in java world). Unfortunately, this is something that's rarely done.