Smart Bear Software

Smart Bear Company Site  

About

  • Code review tips, software development topics, and random thoughts from the folks at Smart Bear Software.

Subscribe

Search

FAQs

Tweets

August 13, 2010

Reviewing File Versions in ClearCase

(This blog entry is part of a series of entries describing some of the new features in Code Collaborator v6.0. The series content is listed in this entry.)

When I talk to customers or prospective customers who use ClearCase the first question I always ask them is: "Are you using base ClearCase or ClearCase UCM?"  The answer is important because it determines the features available in the integration that our peer code review tool, Code Collaborator, provides for ClearCase users. 

Most folks who are using ClearCase UCM tend to create code reviews based on a UCM Activity.  So we have full support for doing that from our cross-platform GUI, our command line interface (CLI), and our Visual Studio Add-in.

If, on the other hand, you are using base ClearCase, the situation is a bit different because Activities aren't available to use as a change list.  Our integration makes it easy to add locally modified files to a code review, but that's only useful if you want to do the review before checking in the files to ClearCase.

In an environment where code is reviewed after check in, the model we frequently see is that the check in was done on a specific branch.  So what you would want to be able to do is create a code review based on the changes made since that specific branch was created.  Or, another common approach is to create a review based on the differences between the contents of the specific branch and the branch into which the changes are about to be merged.

Unfortunately, our integration does not have support for creating a code review based on the differences between two branches (or labels, or anything else) in ClearCase.  The reason is that the file diff output from ClearCase's cleartool utility is, quite frankly, not very useful.  There is not enough context information in it to create a useful display within our file comparison utility.  (Side note: in our integrations with version control tools that do provide adequate file diff information, Code Collaborator does allow creating a review based on the differences between branches, dates, tags, etc.)

The solution we provided was support for adding specific versions of files from base ClearCase to a review.  That solution existed prior to v6.0, but was limited to an addversions command in our CLI - useful, but not as user friendly as we would like.

As a result, the ability to add specific ClearCase file versions with our cross-platform GUI has frequently been at the top of the voting out on our user feedback forum.  I'm happy to announce that beginning with v6.0 the feature is now available in our cross-platform GUI:

AddVersions
You pick the files that you want and then the cross-platform GUI displays those files followed by two columns: "After" and "Before."  You have to fill in something for the After column - it's the only way Code Collaborator will know what version you want reviewed.  The Before column is optional.  If you don't specify anything then we'll ask cleartool for the predecessor to the After version of the file.

Filling in version strings for a large list of files can be tedious, so there are some controls that expedite the process.  Under the list of files there are two Autofill controls, one for After and one for Before.  In addition, the After Autofill has a predefined value that you can select: local.

Local

We use "local" to refer to, well... the locally checked out or sync'ed version of the file.  For example, if the local file hello.c is checked out from /main/9 then specifying "/main/9" as the After version is the same as specifying "local."

As an example, I created a branch called TASK_1 and I have made some changes to each of the files on that branch - as shown in the ClearCase Explorer: 

Cce

To create a code review that shows the differences between the selected files on the TASK_1 branch and the versions of those files that were used to create the TASK_1 branch, I would specify "local" and "/main/TASK_1/0" :

Task1-0

If, however, I plan to merge TASK_1 back into /main and I want a review that shows the differences between TASK_1 and the current contents of /main I would specify "local" and "/main/LATEST" :

Main-latest

For me, this feature totally rocks because it makes it so much easier to demonstrate the value of Code Collaborator in a base ClearCase environment.  But what matters is: how well does this work in the real world?  If you have feedback, please leave a comment or drop us a line at support at smartbear dot com.

July 19, 2010

Smart Bear Software is now SmartBear Software

For a few years now, Smart Bear Software has officially been part of AutomatedQA (best known for TestComplete for automated testing and AQtime for performance profiling). And last fall, AutomatedQA bought Pragmatic Software, makers of SoftwarePlanner for development and test management.

Now we are truly uniting the three companies. The new company will be known as SmartBear Software. While our name has changed slightly to SmartBear Software (SmartBear being one word now), we can assure you that our commitment to providing you with powerful, easy-to-use software remains unwavering.

How will this benefit our users?

For one, our community of users has grown to more than 75,000 software developers and testers with the formation of the new company. We look forward to helping you take advantage of this much larger SmartBear community for expert advice, more support, knowledge sharing and of course improved software quality. Keep an eye out as we start to share tips and tricks, white papers, and other best practices that we hope will help you produce better software.

The combined company is also much better equipped to push product development forward. We are already working on a bunch of new ideas that will not only make it easier for our products to work together, but also put great new functionality in the hands of our users. Stay tuned – you will hear much more from us about automated testing, test management, code review, performance profiling, and development management.

Why did we change our name? About-us-message

As AutomatedQA, Smart Bear Software and Pragmatic Software worked together to become one company, we had to select a name that we felt reflected our brand values: to be community-focused and offer innovative tools that are highly functional and at the same time actually affordable.  Now that we have tools that support the immediate needs of both developers and testers, we needed a name that wasn’t tied to one particular type of product. And SmartBear is a great name! So we chose the name SmartBear Software to represent us all going forward. We hope you like our decision! 

Here’s the new logo:

Sb-newlogo

What do you think? Just a few minor adjustments to the original Smart Bear logo, which we thought was pretty cool to begin with, if we do say so ourselves.

Visit our existing Community page to learn how you can follow us and communicate and share with one another as we continue to add to our products, enhance our web site, and grow our community involvement.

If you want more details regarding the announcement, click here, and stay tuned for some exciting product news in the days and weeks ahead.

Are you curious about all the other tools that are now a part of the SmartBear family? Have you ever needed to better manage your manual tests? Or communicate in an organized way with a development team about requirements and issues? Or even find performance problems and bottlenecks within your applications without modifying the source code?

Then check out any of our tools for free (and tell your friends!):

What’s your take on the new SmartBear? Let us know: leave a comment, tweet us, or drop us a line.

July 13, 2010

Rational Team Concert Work Flow Support

In our peer code review tool, Code Collaborator, our support for the native version control system (VCS) in IBM's Rational Team Concert was initially pretty minimal: using our Eclipse plug-in you can right-click a change set, choose the Add to Review context menu entry, and then Code Collaborator would add the content of that change set to a code review. 

That's useful in some contexts, but we can do better. Rational Team Concert provides much more than version control; of particular interest is its configurable work flow feature. As the status of a work item changes, the Rational Team Concert server can provide notifications to third-party code.

Ah... now that sounds interesting.  :-)

Will has created a plug-in for Code Collaborator that runs on a Rational Team Concert server. You can configure your work flow so that when the state of a work item changes, the plug-in gets invoked.  The plug-in will create a review over in Code Collaborator, using the information from the work item.

What Does the Plug-in Do?

The plug-in creates a code review in Code Collaborator that corresponds to a work item in Rational Team Concert. It uses the work item number and summary as the title of the code review.  At present, it also inserts the URL of the work item in the code review title, but we'll probably change that.  If the userid for the owner of the work item is found in Code Collaborator, then that user will be set as the review author. 

Likewise, the Rational Team Concert users who are listed as "approvers" in the work item are automatically added as reviewers in the code review. Finally, any change sets from Rational Team Concert's VCS that are associated with the work item are added to the code review. 

The end result is an entry in the "Links" tab of the work item:

L1 

The really slick part, though, is that if you are using our new Eclipse plug-in, you can double-click that entry in the work item's Links display and the code review opens up right there in Eclipse.

One final note: you can configure the plug-in so that subsequent changes to the work item cause updates to the code review over in Code Collaborator.  For example, if additional change sets are added to the work item, then those change sets will be added to the existing code review for that work item.

How Do I Install It?

The first step is to download the plug-in's .zip file from our web site.  Then unzip as described in the documentation, being certain to use the directory name ccollab-update-site.  Note also that the documentation requires you to copy the file com.smartbear.ccollab-profile.ini into your RTC server installation.

Finally, from within the Rational Team Concert server administration user interface, request a Server Reset. This is necessary because otherwise the server will not "recognize" that a new plug-in has been added.  And remember, all you did was request a Server Reset - it won't actually happen until the next time you start the Rational Team Concert server.

How Do I Configure It?

This is a two step process.  From the perspective of the Code Collaborator server, the Rational Team Concert server plug-in is just another client application.  So you'll need to specify which Code Collaborator server it should attach to along with user name, password, etc.  Instructions are here.

After you get that setup, the bigger question is: when in the work flow do you want the plug-in to get invoked?  There is an example in the documentation, but the exact requirements for your environment may vary. 

In my own demo installation, I have added an action to Rational Team Concert's Task work flow: Code Review.  I also added a state called Ready for Review (Click for full-size image) :

Wf

Over in the process customization for my team, I added follow-up actions to invoke the plug-in (lines 8 and 15):

 1 <?xml version="1.0" encoding="UTF-8"?>
2 <team-customization xmlns="http://com.ibm.team.process">
3 <permissions>
4 </permissions>
5 <behavior>
6 <role id="default">
7 <operation id="com.ibm.team.workitem.operation.workItemSave">
8 <followup-actions>
9 <followup-action description="Upload Change Sets on Work Item Save" id="com.smartbear.collaborator.rtc.process.UploadToCollab" name="Upload Changes from Work Item">
10 <StateChangedTo value="Ready for Review"/>
11 </followup-action>
12 </followup-actions>
13 </operation>
14 <operation id="com.ibm.team.scm.server.modifyChangeset">
15 <followup-actions>
16 <followup-action description="Update Reviews for each linked Work Item" id="com.smartbear.collaborator.rtc.process.ChangeSetModified" name="Update Reviews for each linked Work Item"/>
17 </followup-actions>
18 </operation>
19 </role>
20 </behavior>
21 </team-customization>

Selecting the Code Review action for a work item sets the state of that work item to Ready for Review. The plug-in will only create a review if any specified filters evaluate to true - the filter I specified (line 10) is looking for a work item state of "Ready for Review."  The other type of filtering currently supported is on the type of the work item, so you could for example limit the creation of code reviews to just work items that are defects.  We'll probably add more filters in the future.

What's Next?

Create some code reviews... Please!  :-)  This functionality is very new - we need feedback to help us learn which specific use cases Rational Team Concert users want supported.  Please leave a comment on this blog entry, put in an entry on our feedback forum, or send us an email: support at smartbear dot com.

July 06, 2010

The Windows Send To Trick: A Cheap Substitute for a Shell Extension

This post just in from Will West...

Something we've been meaning to get around to for a while is a Plugin for Windows Explorer. It turns out you can fake one pretty well with a SendTo item. All you have to do is make a file in C:\Documents and Settings\YOU\SendTo\ named ReviewChanges.bat with the following content:

ccollab addchanges ask %*

Ww1
Now when you right click on a file or directory you can "Send To > ReviewChanges.bat".

Ww2

And there you have it, a more TortoiseXXX friendly interface for your favorite code review tool.

June 17, 2010

Replay Now Available: Code Collaborator v6.0 Features Webinar

I've had several requests for this, so I'm going to mention it here on the blog.  Yesterday's webinar where I showed some of the new features in Code Collaborator v6.0 is now available for replay.  You can watch it here or download a .zip file for offline viewing here.

I've updated our webinar page - it's currently the first entry in the "Replay" section.

Since not everyone is interested in every new feature, I put together a time breakdown so that you can skip around to just the demos that are of interest to you:

  • (00:00) Introduction
  • (00:48) Review Microsoft Office documents
  • (05:44) Zoom control and comment labels
  • (09:19) Create a review or add files to a review from Visual Studio
  • (13:00) Perform a review from within Eclipse
  • (21:30) Defects visually distinct from comments
  • (23:43) Redact comments
  • (26:21) Compare to latest Accepted version
  • (31:38) User oriented reports
  • (35:15) Per-participant custom fields
  • (37:12) Customizing the word for "defect"
  • (38:20) Additional resources
  • (40:33) Q & A

Additional information about v6.0 is available here.

June 15, 2010

The *Real* Reasons to Use Code Collaborator 6.0

By now you've likely been inundated by our recent blog posts touting the features of Code Collaborator 6.0. But here's a completely different angle on why you should check it out...

  • Increase your "geek cred" by using the latest technology
  • Save trees! Online code review saves paper.
  • Save your sanity! Avoid meetings.
  • If you get it now, you can be the first guy on your block to have it.
  • If you attend the 6.0 webinar, you can become the local Code Collaborator guru on all of the newest tweaks.
  • If you get it now and blog about it, we’ll send you a polo shirt and some Smart Putty.
  • It’s free! For 30 days at least.

Of course, if you want the technical reasons, you'll find a great list here

We do hope you can join us on June 16 at 12pm CDT for a brand-spanking-new 6.0 webinar, where Gregg will walk you through all of the cool new features... then you don't have to read all of those blogs! Sign up here.


June 03, 2010

The v6.0 Beta Has Landed

The Code Collaborator v6.0 Beta testing period has begun! The beta program is available to everyone - you can download the bits from our web site. Additional details on the beta program are here.

Our web site also has highlights of the new features and a complete list of features added in v6.0.

If you are already using Code Collaborator you can upgrade just by downloading the new installers and running them!  Of course you'll want to back up everything first.  Or, make a copy of your existing installation and try v6.0 on a test machine. More details on these options are available here.

On June 16, 2010 I'll be doing a special webinar dedicated to demonstrating some of the new features - you can sign up here (it's free!). We'll post a recording afterwards on our webinar page.

If you don't want to wait for the webinar, I've written a series of blog entries that cover most (but not all) of the new features in v6.0:

Most important of all: We want your feedback! Let us know if the beta is working for you or not: send email to support at smartbear dot com. Or use our feedback page. Thanks!

How the v6.0 Beta Program Works: FAQs

Q: How long will the beta program last?
A: Our betas are like the seventh rule of Fight Club -- it goes on as long as it has to.  We expect 2 months, but we won't declare "final" (or "stable" or "GA" for General Availability) until we believe it is stable.

Q: What happens to the v5.0 branch during and after the v6.0 beta?
A: We will continue to fix bugs (but not add new features) and release new builds of v5.0 and you can continue to download installers.  v5.0 installers will be archived forever, even after it is taken down from the main download page.  Contact us (email support at smartbear dot com) if you plan on staying on v5.0 for an extended time even after v6.0 goes GA.

Q: How often will updates to v6.0 be released during the beta period?
A: Every other week or so.  More often if a critical bug is found.

Q: How do I track releases?
A: Same way as with the v5.0 release.  There's the release mailing list and RSS feed.  Also we maintain a complete version history in the manual both on-line and in the product.  Also watch this blog for deeper info.

Q: How do I report a bug / ask about a feature?
A: Same way as always -- report through tech support (email support at smartbear dot com) and/or through Uservoice.  Don't be shy!

Q: Who's allowed to participate in the beta program?
A: Everyone!  It's a completely open beta.  You don't need a special license code.

Q: How do I try the beta on the side while maintaining my v5.0 installation for general use?
A: Full details here.

Q: When will the manual be completed?  Some of the new features are not completely documented.
A: The manual will be updated continuously throughout the beta period.  It will be complete before GA.  Don't be shy about using tech support (email support at smartbear dot com) to ask questions!

Trying Out v6.0 - Server Installation Options

The beta release for Code Collaborator v6.0 is now available (check out the highlights of the new features or browse the complete list).

If you are not currently using Code Collaborator then trying out v6.0 is easy: download it from the web site and install it. No muss, no fuss.

If you are currently using Code Collaborator then you have three options for how to install the Code Collaborator v6.0 server software:

  1. Install the v6.0 Code Collaborator server software into its own directory and start from scratch. This is easy enough to do, but you won't have access to all your existing review and user data, so it's not practical for most situations.

  2. Upgrade your existing Code Collaborator server installation. Also easy to do, but if you decide the v6.0 beta is not what you want, you will have to switch back to the older version, which will involve re-installing and then restoring a backup. So this option is only for those who enjoy the risk of living on the edge. 

  3. Make a copy of your existing Code Collaborator server installation and then upgrade the copy. This allows you to continue running the old version of Code Collaborator in parallel with v6.0.

Option 1 is the easiest: just download and install the Code Collaborator v6.0 server software and you are ready to go. If you are installing onto the same machine as your existing Code Collaborator server software, be sure to specify a different directory, port number, and database instance.

Option 2 is almost as easy: do a complete backup of your existing Code Collaborator server. That's the most important step! :-) Then download and install the Code Collaborator v6.0 server software and when prompted, select the directory that contains your existing Code Collaborator server software. This will cause the installer to upgrade your existing installation.

Option 3 is not difficult, but requires an additional step. Do a complete backup of your existing Code Collaborator server - as with option 2, this is the most important step! After the backup finishes, install the exact same build of the Code Collaborator server software that you are currently using, but if you are installing onto the same machine then install it into a different directory so that the installer will not upgrade your current installation. You will also need to specify a different port number and database instance.

For example, if you are currently running v5.0.5029, then install build 5029 of v5.0 (older versions of the installer are available here). After the installer finishes it will display a web page in your default browser. That web page will have a button for creating the Code Collaborator database tables - do not push that button! You don't want those tables to be created because you are about to restore from your existing database.

Restore the backup that you just created to the new installation of Code Collaborator. Then run the installer for v6.0 and when prompted select the directory that contains the Code Collaborator server that you just installed. This will cause the installer to upgrade that installation.

One final note: if you chose Option 1 or Option 3 then you will end up with two instances of the Code Collaborator server running: one for your older version and one that is running v6.0. If you are running both instances on the same machine and if the operating system on that machine is Windows, then there is one additional step.

The Code Collaborator server installer for Windows always uses the same Windows service name: ccollab-server. This means that after you install a second instance of the Code Collaborator server on a Windows system, the Windows service named ccollab-server points to the new installation. The original installation no longer has a Windows service entry and is therefore no longer running.

This problem is easy to fix. In a command window set the working directory to the original installation of the Code Collaborator server software. Then enter this command:

   ccollab-server /install <service-name>

You can specify anything you want for <service-name> except for ccollab-server. This will create a new Windows service with its own name for your existing Code Collaborator server installation.

June 02, 2010

Customizing the Social Effect

(This blog entry is part of a series of entries describing some of the new features in Code Collaborator v6.0. The series content is listed in this entry.)

Even though we sell a peer code review tool, we're not so arrogant as to believe that tools alone make teams more productive or solve software development problems. It's people that actually write software - not any tool. And if there is a problem with a software development process, it's the people that have to solve it; if there is an opportunity to improve the process, it's the people that have to seize that opportunity.

Tools like Code Collaborator remove friction and grunt work from the process in order to help people create bug free software sooner (among other benefits). 

One of the most interesting parts of working here is that we spend significant time talking to people about how they create software. We use those conversations to guide the obvious things on the product road map (which version control systems to support, etc.) and also to guide the process-oriented features in the product.

And the most important process-oriented feature is: Code Collaborator does not enforce any particular type of process. I don't even think the word "process" is in our owner's manual. The tool does provide a basic work flow, but it can be tuned significantly in order to meet your needs. 

With v6.0 of Code Collaborator, we have added two new tuning features to help an administrator control the social effects of peer code review:

1. Customizing the Word for "Defect" allows you to control what our user interface displays:

Def

In Code Collaborator, a "defect" is anything that has been found during a review that in order to resolve it, you will need to make a change to the file(s) being reviewed. So that's not just algorithmic bugs in the code but anything that requires a change: a missing comment, an unclear comment, an opportunity to refactor, an opportunity to use a different API, etc.

But as the old saying goes, "People are only human," and in some environments the word "defect" has a very negative connotation. We've had customers report to us that users of Code Collaborator were hesitant to enter "defects" into the tool because they thought it would make the author of the code being reviewed "look bad." 

Instead, the defects get entered as comments, which is better than not having them entered at all, but comments are not as easy to track (each defect, on the other hand, is assigned an ID, etc.). This is really a communication issue (more on that topic here), but configuring the tool can help.

So with this enhancement, if a team is more comfortable with the term "Item," or "Finding," or "Entry," or whatever, then they can use that alternate word. Here at Smart Bear, we use the word "Booger."

2. Suppressing the Commit Action Items will remove confusion in environments where committing to a version control server must be done a certain way. Back in Code Collaborator v5.0, we added a feature that will actually commit your code changes at the conclusion of a pre-commit review. After all, the Code Collaborator client tools know how to access your version control server and they know which files were reviewed.

This commit does not, however, happen automatically. So to provide a reminder Code Collaborator creates an Action Item for the author at the conclusion of a pre-commit review:

CommitF

The problem is that in some environments, the administrators of the version control server do not want the commit done other than with their specific tool/process. So displaying that reminder was confusing because users were tempted to use Code Collaborator for the commit. 

Disabling the creation of that Action Item is done via a new entry in the General settings:

Cai