Archive for May, 2009

AccuRev 5.0 — Some Features of the New Architecture

May 29th, 2009

The new AccuRev beta release is customer’s first look at Version 5.0 of the AccuRev server.  The key new element has been porting the AccuRev server to an ODBC database.  Initial reports show that this will provide enhanced scalability and more flexible IT architectures that large AccuRev deployments have been looking for, without degrading the one-user path length. While the functionality will be familiar to any post-R4.5 customer, there are many enhancements and bug fixes that have migrated into 5.0, making this an even larger improvement from R4.0 than it was from R3.0.

The first database supported by AccuRev, and the only one supported with the beta test of Version 5.0, is the PostgreSQL DBMS.  PostgreSQL (pronounced “post-gress”) is a sophisticated DBMS with good concurrency support for complex locking models, rich support of database features, and broad platform availability.  The postgreSQL.org site contains lots of ancillary material, including a list of books on PostgreSQL for the interested developer.

One of the features of ODBC database support is the ability to use familiar database tools to create reports and real-time dashboard data.  The AccuRev server schema is very complicated with multiple databases, many tables, and complex fields.  To simplify reporting, we have developed a database View for this blog post that abstracts AccuRev database internals into a more user friendly form, perfect for use with report generation tools.  This database view will be available from the AccuRev User Forums, and will be updated to include other features based on customer request.  The database is not directly customer accessible for modification and users should not make modifications or additions to the AccuRev database. Fortunately, Views in PostgreSQL are read-only, which is another safety guard against accidental database modification.

Tools such as Crystal Reports® or BIRT™ provide user interfaces for report generation that work directly with tables in a relational database.  They provide a simple drag-and-drop, wizard driven, interface, making report generation and formatting much simpler than coding SQL statements directly.  Business Objects (owned by SAP, and maker of Crystal Reports) and Actuate (BIRT provider) both have real-time update report tools, for creating near-real-time dashboards.  These are not covered by this blog, but would use the same PostgreSQL view.

The first report we want to develop is one that shows the transactions in a stream, broken out by users.  I like this graph because it shows exactly who contributed changes to a particular release candidate. We used Crystal Reports to generate the template.

Crystal Reports Transactions Template

Crystal Reports Transactions Template

All the “action” is in the design area at the bottom.  We used the Group wizard to add the name, sum the number of promotes, and generate the graph.

Crystal Reports Change Contribution

Crystal Reports Change Contribution

Another report is the rate of changes to a series of streams.  This shows the rate of instability in a project, which might not be reflected in the issue tracking system.  Here we show the number of transactions in a series of streams each week, for the past ten weeks.

CrystalReport Rate of Change Template

CrystalReport Rate of Change Template

And we’ve limited the report to just show the three streams of most concern.

Crystal Reports Stream Changes

Crystal Reports Stream Changes

In conclusion, Version 5.0, coupled with AccuRev’s new Web User Interface, is an exciting new version of AccuRev that promises to provide benefits to the AccuRev community, both large and small, for a long time.

Vlad Romanescu &

Rob Mohr

Persuading Your CFO to Buy in a Recession

May 6th, 2009

If you are having trouble convincing your CFO to spend money on capital expenditures in this challenging environment, you are not alone.  Forecasters are projecting a significant decrease in capital spending for 2009, which is making buying new software and hardware very difficult to get approved by senior finance executives.

So how does a software development manager convince a CFO to spend money on new software and equipment?  CFO’s are seeking ways to increase the efficiency of how organizations deploy resources as well as how to control costs.  So focus on the Return on Investment (ROI), or net cost savings from the increased efficiencies, when you try to convince your CFO to approve a purchase.

The following is an example in which a company is determining whether to hire a new engineer or buy new software and hardware for the team whose productivity needs to increase 20%:

Assumptions

  • Cost of software and hardware to be acquired – $50,000
  • Size of team – 5 engineers
  • Increased productivity from acquisition – 20%
  • Average fully loaded cost of an engineer – $125,000

Cost Benefit or ROI

Based on the assumptions above, if the team were to increase its productivity by 20% without purchasing new software or hardware, they would need to add one engineer (20% x 5 engineers) at a fully loaded annual cost of $125,000.  Accordingly, if it is expected that the workload of the team is going to increase by 20%, it becomes an easy decision: spend $50,000 on new software and hardware instead of hiring a new engineer at a cost of $125,000, for a net cost savings of $75,000.

The typical CFO is also likely to question whether demands on the QA team will really increase and when the timing for the purchase of new equipment has to be made.  When this question comes up, and it will, you can now argue that if demand actually stays the same or decreases, you will be in a position where you can reduce headcount by 20% (a savings of $125,000) without losing any capacity.  This is the beauty of focusing on the efficiencies created from deploying new software and hardware

Summary

Engineering budgets are dominated by personnel costs.  If you focus on the efficiencies that will be created from deploying new software and hardware and tie it to either being able to cut headcount or not having to hire new staff, you will almost always be able to convince your CFO to open up the purse strings!

About The Author

Peter Dreifus was invited to contribute to our Distinguished Lecturer Series because of his experience as a CFO and COO managing finance and operations at software and technology companies.  Mr. Dreifus is a CPA with over 20 years experience and has held a variety of senior finance positions at Escher Group, Ltd.,  Sequence Design, Inc., Avery Dennison Corporation and the accounting, tax and consulting firm Deloitte.

Pattern for Versioning Generated Objects

May 5th, 2009

After building your software, do you check-in your generated binary  files? How about the output from test runs? If your software runs on multiple platforms or your test runs take hours/days to execute, you may want to consider storing the output — especially if binary reproducibility is critical.

Example. Consider shipping an application to a customer who 2 years later reports a defect. Can you reproduce their build “today”? Surely you have the exact versions of source files. But are you using the exact build file? Probably. How about the original version of the compiler? Maybe. But probably not. Don’t forget that your compilers get upgraded too — their optimization algorithms or bugfixes can change the binary execution format of your application. Thus, compiling source from 2 years ago may result in an equally functioning application at the user-level, but at the byte-level, things may have changed dramatically — and at a level where runtime defects (performance/memory) rear their ugly heads.

Myth #1: Committing generated  files results in longer checkout times. No developer wants to checkout source code and wait for or be inundated with megabytes of .o, .class, .jar, .war files that they are either never used or are going to be rebuilt anyway.  The AccuRev Truth: Use include/exclude rules on streams and workspaces to control which streams have access to generated objects and who will receive them during checkout.

Myth #2: Committing binary files slows down your CM system. Traditional SCM systems combine both meta data and content resulting in slower performance over time as the number of files increase (think labeling).  The AccuRev Truth: AccuRev stores meta-data separate from file contents and uses indexes to lookup and retrieve contents.  For example, transactions are labeled not files.  Using a card catalog (index lookup) to find your books is always faster than walking the isles (linear scan).

Myth #3: Storing generated artifacts will bloat the repository. Back in the day of wild-west coding, there was little rhyme or reason for where files were saved in the source tree.  The build system would simply compile the files it found, save the generated output right next to the source file, and as long as everything linked & compiled — it worked.  But in todays complex world of multi-layer software architectures, tiered deployments, mixed technologies, and sophisticated build tools, following a convention is almost a necessity (think  ruby on rails, maven, etc). The AccuRev Truth: Organizing the top-level source tree and configuring your build tool can make it very easy to carve out source vs. binary vs. tests vs. scripts, etc.  Using include/exclude rules, end-users can decide at the stream or workspace level what parts of the file tree need to be visible.

The Pattern. In this pattern for versioning generated artifacts, I’ll show how streams can be used to store generated files only in the appropriate stage of development and prevent unwanted exposure to developers.  Two options are present that can also be used in combination.

Option #1: sub-configurations

Option #1: sub-configurations

Option #1: Store and track generated artifacts as sub-configurations isolated from the mainline.   From a baseline snapshot such as a test build or release candidate, create a new child stream to store the generated artifacts.  Then create a second snapshot that represents both source code and generated artifacts. For a single “configuration” you now have two snapshots – one for source only and a second for source + binary.  Furthermore, you can diff these two snapshots to know exactly how the binary configuration is different from the source configuration.  You might also consider storing compiler files, debugging output, test output,the compilers themselves (!), etc.

Option #2: include/exclude rules

Option #2: include/exclude rules

Option #2: Store and track generated artifacts directly in mainline but exclude them from downstream access using stream-level exclude rules.   The top-most streams that need access to both source and binary will include the majority or entire filesystem footprint in their configurations.   The first stream that does not need access to generated objects will likely be the candidate to set an exclude rule on the folder(s) that contain those files.  The exclude rule is inherited to all children and grandchildren.

When using exclude rules, it is easiest to set a single rule on a top-level ‘./build’ or ‘./generated’ folder rather than creating a rule for each sub-folder in a large source tree.  Traditionally, make based build systems would generate the compiled files in-line with the source code.  Lately, ant based build systems would package all generated artifacts in a separate sub-tree off the root.  Regardless of your build tool, it’s best to have all generated artifacts in their own tree – it makes it easier to exclude as well as safer to clean!

In practice I see both patterns in use and both have equal merit depending simply on the situation at hand.  Option #1 is commonly used when generated artifacts are not to be included in the official release.  For example, transient or secondary artifacts such as test cases, debugging output, reports, etc.  These files are not promoted up to the release stream.  Option #2 is usually used when the generated artifacts are expected to be included in the official release snapshot.  Thus, they are promoted up through the test/build/release streams.  The build system for these types of ‘uber’ configurations may have multiple release targets creating different levels of release packages such as ‘minimal’, ‘app’ , ‘app-with-tests’ and ‘full’.  That is to say, the CM system may have all possible files but you can choose what actually gets deployed.  Ultimately, storing everything in the CM system may likely be the right choice for audit and reproducibility.

/Happy Coding/