Sunday 28 October 2012

CodePro AnalytiX by Google.

Some of my older posts contained my recommendation for The Pragmatic Programmer book. I must say that's a truly awesome book. But it's not for everyone. It's addressed to those who CARE. Care about their work, career, self-development, etc... I'm so amazed by this book, that I'm willing to summarize some of its chapters, but right now I just need to quote single thing:


Now that you have some guidelines on what and when to add to your knowledge portfolio, what's the best way to go about acquiring intellectual capital with which to fund your portfolio? Here are a few suggestions.

Learn at least one new language every year.

Read a technical book each quarter.

Read nontechnical books, too.

Take classes. 


Participate in local user groups. Don't just go and listen, but actively participate. Isolation can be deadly to your career; find out what people are working on outside of your company.


Experiment with different environments.

Stay current. 


Get wired. 


I didn't strip that the-one-and-only point from the comment because it's the one that I find the easiest and most rewarding, yet so often ignored.

I'm proud member of Java User Group Łódź. During the latest prelection, one of the questions asked to presenter has inspired my to find some tool for measuring code metrics... I just wanted to have some fancy tool, that would make me smile and tell me "your code looks great!" ;). So I did what I do in most cases - I went to stackoverflow, and THIS is what I have found.

What made me curious was answer,  that was posted long after question was asked, and yet it has the most up-votes. It was about CodePro AnalytiX by Google - plugin for Eclipse. Wow, that's even more than I was searching for!

Key (at least for me) features:

Metrics: just metrics. Those that seem to be bad, are colored red.



Code Audit: yet another tool like Sonar or findbugs.



JUnit Test Case Generation: This is really cool, try it. How does it work? (from specification):
  1. generates a list of values for the fixture (if the target method is an instance method) and each of the arguments,
  2. determines which combinations of values to use to invoke the method,
  3. computes the result of invoking the method,
  4. figures out how to validate the result, and finally
  5. generates one test method for each combination of values.













Of course in most cases  (sometimes - as on image - it works better) 'tested' is only:
assertNotNull(result);
but even though it works as great stub that can be filled with real testing code.


Similar Code Analysis: Searches for code duplication - works better than WinMerge ;)



There are much more of features that CodePro has to offer, find them by yourself. It's so enjoyable.

One last remark: CodePro has different versions for different Eclipse versions. Latest is 3.7 - for Indigo. But it works good with the new Juno, too - trust me ;)

4 comments:

  1. If You need solution for Project management, to analyze quality of code, please follow the Jenkins documentation. This powerful tool contains a lot of stuff used to analyze project development and provides plugins. Generate important reports for Project Managers including charts. Of course I'm talking about additional functionality used by Jenkins.

    In my opinion Deployment managers are better solution in projects, when team members count is better then 5 people.

    ReplyDelete
  2. I want to use JUNIT testcases generation using Code Pro Analytix. I am trying it by right-click on project->Code-Pro Tools-> Generate Testcases. But it is throwing lot of exception.

    1. Could you please let me know the download link of codepro analytix 3.7 which works?
    2. What Eclipse version should I use for successful JUNIT test generation for the source files?

    ReplyDelete
  3. I was using Code pro 3.6 + Version: Mars.1 Release (4.5.1).

    ReplyDelete
  4. I was using Code pro 3.6 + Version: Mars.1 Release (4.5.1).

    ReplyDelete