#Google Analytic Tracker

Pages

May 28, 2010

My 1st Code Rush Experience – Can I Code Without ReSharper?

I have been a big fan of ReSharper (R#). I started using R# probably about four years ago.  Back then, this tool was magical to me, I didn’t know why MS VS wouldn’t have R# features.

C# 4.0 and Visual Studio 10 are already out.  I notice Code Rush (CR) is gaining popularity.  I tried CR probably about 3 years ago, but I felt CR wasn’t the right tool for me, especially I was heavily relaying on R# code analysis refactoring features. CR may had some code analysis and refactoring tool back then, but I can’t seem to remember much.

About a couple month ago, one of my colleagues came back from the MIX10 and he was impressed by Devexpress demo. He actually got one free license for CR + Refactor Pro. Since I was not in MIX10, I can’t say much about the demo. From words I heard, some guy code a lot faster when using CR while another guy still haven’t finish playing his guitar.  My colleague would like me to try out CR + Refactor Pro.

I was still using R# 4.5, and 5.0 is out. It is about time to see if I should upgrade to 5.0, or try a new tool.  My development team has finished the development phrase, and has moved into the QA phrase. Ideally in this period, we no longer code any new functionalities, other than testing and fixing issues. I think this would be a good time to try a new code aiding tool like CR.

Btw, we try to be as agile as possible. We tested new features in each iteration.  However, our QA team still have to do many regression tests because we don’t have enough automation tests. The QA team is very good at finding issue where developers didn’t thought about. As a result we still have a QA phrase.

What I Want to Talk About

Please assure that I am NOT suggesting either one of the tools (CR or R#) is better than the other. I believe CR and R# have their strong and weakness.  What I like to talk about is my experience of switching from R# to CR.

Why Trying CR

As I said before, I have been a big fan of ReSharper. However, using ReSharper comes in a price.  Here are the issues that I have using R#

  • Averagely I has to restart VS once a day due to OutOfMemoryException
  • R# slows down VS when it tries to analysis large classes

Basically these are the only issues I have with R#. Please don’t get me wrong here, R# is an awesome tool. However it needs a lot of resources to do the code analysis so that you don’t have to keep recompiling to discover your mistake. Unless you are a programming god, who make no mistaking in coding, otherwise you would find R# save you time from recompiling.

I was actually hoping that CR + Refactor Pro would somewhat provide me similar features that I use in R#, and it would also speed up my Visual Studio.

About 3 years ago, my development team were using VS 2005 coding with C# 2.0.  I tried to convince my team member to use R#.  The result… I failed miserably.  R# was very slow. Even now I still try to get my team to use R#, but they refused to use it because they worry it will destabilize VS. This is the same for CR.

Also, I won’t dare to install both CR and C# together. It would be nice to have the best from both products.  However, the last thing I want is a messed up IDE with shortcut key clashing. 

Installing Code Rush

The first time I downloaded the DXperience Product installer, I was confused at first of what I needed to download. I want to download CR with Refactor Pro, but instead, I downloaded the DXperience Product installer, which actually includes all the DX product. I think this is a very nice integrated products installation setup.

Before I start installing, I shut down VS, just like installing R#. Unfortunately the first thing I saw is the following:

1

Not sure why it complains why MS Visual Studio .NET is still running. I checked the Task Manager and found nothing running that may be related to VS (devenv.exe).  I wasn’t too impress. So I had to  log out and log in into Windows. That seems to fixed the issue.

During the installation, I like how it takes ask for your experience level. I saw a number of posts complaining R# has too much dialogue boxes when performing refactoring. I think R# should have a similar feature, that allow beginner to learn the tool though dialogue boxes, and no dialogue boxes display for expert users.

 2

First Thing I See in CR

Great, the installation was successful, let see how this work. What is this red line on the left of my code?

3At first, I wasn’t too sure the meaning of this, but soon I realized it means there are errors in the code. It was confusing because I can’t understand why the entire piece of code are errors.  My solution compiles. I wasn’t too impress about seeing the red line.

In the above example, It is nice that it point out the “issue”, but I don’t really understand what it means by “Complex member”. I think it needs to have a link for me to learn more about what it means.

Incorrect Analysis?

I started getting more confused because CR can’t seem to analysis the solution I was working with.  For example, why would Data.EmployeeName is an Undeclared element in the following screenshot? One possible reason I guess is that CR failed to analysis this data class. This class is a code generated ADO dataset definition. The generated definition is huge, more than 100,000 line of code, I think. From a design perspective, I want to get rid of this class and try other technology like the Entity Framework, but it is too hard to get rid of legacy code!

Anyways, I was disappointed that CR not able to analysis this class properly, but I understand if CR need to analysis this class, it will slow down VS. However, seeing the error indicators on your code while there isn’t any errors really bugs me. That makes the analysis useless because I can’t really tell what is working and what isn’t working. I would rather not see any code analysis.

Btw, R# usually takes about 3 minutes to analysis this data class (if I accidentally navigated to class designer file). So, better remember to add exception file to R# option so that it won’t do code analysis.  Also, if I keep the designer file open for too long, I may run into OutofMemoryException. However, the bottom line is that R# has no problem of analysis the designer code or code that uses the class.

4

Another thing that I didn’t like to see is the following “Member is not implemented” warning. It is true that I didn’t implement anything in this method. However, I have to implement this because the class implemented an interface that requires the following method. I wonder if there an option I can mute this warning.

9 - Cant check the interface

Undisposed Variable Detection

CR can detect if I remember to dispose a IDisposable object. I think R# should have this feature. Good job to CR.

5 - Disposable check

No Linq or Extension Method Supports

It starts hurting my eyes when CR keeps giving me incorrect analysis. Linq and extension method is out for quiet some time, so I was disappointed of not seeing the correct analysis.

11 - Linq not supported

Testing Tools

One of the most use features in R# is the testing tool.  I can’t live without an integrated testing tool in a test-driven development.  With R# 4.5, it even supports native NUnit framework, which I greatly embraced.  In the older version, some of my NUnit doesn’t work because I was using new NUnit feature that R# doesn’t support. With R#, I don’t even need to install TestDriven.

I was also hoping CR would have something similar. Unfortunately I wasn’t too impress when some of the working tests failed to run correctly. Also, why CR would have the “Run test(s)” option when I right click on a private method. The code wasn’t even in a test suite. That’s confusing.

6 - Incorrect Test detection

Alt + F12 Reference Search

Another set of features that I used a lot in R# is search and navigation tool. I know that CR may not be as powerful as R#. When I tried to use the normal Alt + F12 reference search feature, CR failed to find reference call by interface.  Maybe there is an option to turn on search by interface, but I couldn’t find one.

Also, the CR search result does not look appearing with my IDE color schema (screenshot bolow). Maybe that’s why R# would rather has its own search result tab, instead of integrating the IDE color schema in the search result.

7 - busy screen and find all reference is werid

I have to admit that I am so used R# navigation and search tools that I will have to find an exact replace before I can give up on R#. Being an expert user in one tool makes it a lot harder to switch to another tool.

One thing that I find annoying is CR can’t find interface reference call. In R# it can do searches on both search using interface or concert reference call.

Learning from Shortcuts

So, one way to learn how to use a new tool is from reading it shortcut. Like R#, so I printed out an CR shortcuts reference and sticks it on my wall. Of course the list of shortcuts can only help me so much, so I tried to discover new feature from the option menu. Whoa…

8 - complicated screen

I didn’t realized you can customize how your shortcut key can execute. You can decide how an shortcut work if your cursor is at the beginning of a word, in the middle, after and many more.

I am guessing this is for the advance users. You can customize the way that you want your IDE to work. However, I have to debate that is this feature best for the users. I think having this many options can be overwhelming, and it is too powerful. It may cause key clashing with other VS shortcuts. If you didn’t backup your sophisticated shortcut settings and lose it, you can get very upset.

Refactoring

One of the big selling feature of CR + Refactor Pro is that it has many refactoring tools you can use.  From what I heard, you can do a lot more refactoring using CR then R#. However, since I only do C# development, I can’t see much benefit for me, like refactoring HTML.

Another thing I find that weird is the following: Can you consider “line-up parameters” refactoring? I would have considered this is a matter of code formatting. I use R# code reformatting tool a lot.

10 - Formatting vs Refactoring

CR also has code clean extension. One thing I heard a lot from CR fan is the power of the DXperience extension framework.  It has a strong community and it provides many free extension. However, I haven’t realized this power during my CR experience.

Conclusion

So, for the CR fans who happen to be reading this post, you may notice that I have been complain CR and rarely talk about CR advantage.  In the beginning of this post I have mentioned that I am not here to say which product is better or not. I merely want to share my experience. 

I believe CR has many good features for developers. At from what I read online, if you can master CR, you can be a very fast coder. 

For me, I don’t need to be a faster coder, but I do good code analysis tool. R# code analysis, search and navigations feature helps me a lot. In the end, you need to pick the right tool that suit your need.

It may also be a bad time for me to try CR since I was in the QA phrase. It may have been better if I use CR for new development, then I may see more benefits in CR. I have only tried CR for 3 days. So I can’t really do feature by feature comparisons.

The only reason that I was considering switching from the beginning was because of R# performance.  The good news is that these frequent OutOfMemoryException that I got from R# has NOT been crashing the entire VS since version 4.5. I can live with it. Resharper exception can be reported back to JetBrains. That’s pretty cool.

image

As a result, I stick with R# for now.

May 26, 2010

Who are the Business Analysts (Part 3/3)

What did I learn?

In summary, I learn a lot of who are the BA, and their roles in the business world. However, merely attended a two days conference do not make me a BA.  It has given me more ideas if I want to move from a technical orientated career to a business orientated career. Another important thing I learned is that there are many hybrid BAs, existing in between the non-technical and the technical worlds. I find that more people move from technical to more a business role than the other way around.

Do Company Needs BAs?

During the conference, I kept wondering why do company need a BA. The answer is very simple. If a company wants a dedicated person to do business analysis, it hires one.  Typically in a small company, resources are tight, and the employees usually have multiple roles. Most likely there wouldn’t be a single person doing business analysis. As the company grows, employees who are interested in business may move to a more business orientated rule , like project manager. If the company keeps growing, sooner or later it will have dedicated people to do just the business analysis.

Do I want to be a BA?

So, after knowing more about the BA, I asked myself do I want to be a BA, or be interested in moving to the business.  In the current stage of my career, BA is probably not what I am looking for.  Not pointing finger at anyone, people who treat software development as a job rather than a career would tell me they want to get into more a business-orientated such as project manager, product manager, business analysis and etc.  The argument lays on the assumption that non-technical position is more interesting than dry technical position.  A number of engineering friends decided to study MBA or business courses in order to move to a business orientated career.  Unfortunately I rarely hear people moving from a non-technical position to a technical position. Possibly it is easier to do a non-technical job. Possibly it is more fun to attend business meetings, travel to other places, talk to real people, instead of sitting in a office typing your life away.

To me, as long as software development is fun and enjoyable, I will keep doing it.  However, I know that some time I may no longer able to keep up with the changes in the technical world, may eventually move to a less technical position.

Who are the Business Analysts (Part 2/3)

In the conference, there are quite a number of presentations I could choose to go. Here were the ones that I attended:

  1. Collecting, Connecting and Correcting the Dots – Roger Burlton, BPTrends
  2. From Tactical to Strategic: A Business Analysts Path to Leadership – Kathleen Barret, IIBA
  3. Experience Agile: The Lego Game – Kim Szuta & Chris Lavallee, ThoughtWorks Canada
  4. That’s what I said but not what I meant or … Getting the Language right, right from the start – Gale Anshelm, Sierra Systems
  5. Panel – Metrics – What and how do you meansure a BA’s work? How do you know what makes a good BA?
    Moderator: Aman Sidhu, Cenovus Energy,
    Panellists: Marlene Barker, MLB2 Enterprise Ltd
    Andrea Borle, CGI
    Murray Laatsch, Enerplus
  6. Agile Requirements: Critical Success Factors for Acceptance Test Driven Development – Jennitta Andrea, The Andrea Group, Inc.
  7. Requirements Gathering for Business Intelligence and Data Warehousing Projects - Francisco Rios Gascon, RIOSOFT LTD

By all means all these topic are interesting. However, I find that materials presented were general a guideline instead of a “How to”, or “Best Practice”. That is probably the biggest different when compare a technical seminar with a non-technical seminar. Every businesses deal with their own problems. There is no single recipe that would solve the business problems. As a result, a guideline would be more appropriate.  

How to Measure a BA Success

As mentioned before in my last post, one of the most interesting topics is how to measure a BA success. A BA may involve in many aspects of a business. Some BAs have direct influences to the business case, some are indirect.  These aspects may not be quantifiable. For example, if a BA implements new policy that improve the moral inside a company, what metrics do you use to determine how successful the BA did his/her job? If a BA proposes a new features development for a piece of software, which indirectly drives the sale of the hardware , could you easily relate the sale increase of the hardware is due to the BA decision.

In the world, we tries to come up with “thing” to be measure.  Some suggests I heard were: compare the BA with a benchmark, BABOK, PM inputs, objective counts, etc.

Just like everything, we create an abstract of things we want to measure. For me, this is just human nature. In the conference, one of the presenter talks about her company would invest money to figure out how to measure their BA performance.  Unfortunately I found that most of the discussion focused too much on tools and methodologies on how to measure a BA, but not so much on how to improve the BA.

If you step back and think about the reason you hire a BA , the basic reason comes down to the fact that you want to make your business more profitable.  I hope that companies would focus on improving the BA skills, and performance, instead of emphasising the measuring part.

Agile and ATDD

ATDD – Acceptance Test Driven Development

As a software developer, I probably heard this term “Agile” at least one or twice a week. Just last week my team watched an agile development video.

There are many favour of agile software developments. My team is moving from the tradition waterfall software development to SCRUM development. I can probably spend months and months to talk about agile, but that isn’t necessary since you can easily google it.

In the conference, one of the topics presented is acceptance test driven development. Regrettably, I have to express my disappointment in the content that was presented. The content focused too much on “how to write a acceptance test”, instead of “how ATDD improve your software development” or “how to apply ATDD to your software development”.

Instead of presenting what I learned about how to write an acceptance test, I would like to talk about how ATDD is integrated in an agile development. Remember, ATDD is NOT a requirement in agile development, instead, agile development promotes the use of ATDD.

In agile development, it is very important to have fast feedback, and deploy results. With ATDD, it helps to ensure new development does not break old functionalities, and ensure new functionality works. The test is one of the important feedbacks for the development team, or the BA to know the health or your software product.  As your software becomes more complex, more tests will be needed. As a result, your tests need to be maintainable. Many time the tests need to be refactored because the business requirement changes.

Your tests ensure the quality of your software, but you also need to ensure the quality of the tests. Here are some tips:

You want the acceptance tests to be:

  1. Based on business cases – when there is a business requirement, there should be an acceptance test.
  2. Readable – BA needs to understand what the tests do, and Developer needs to read the code easily
  3. Easily to maintain – Business cases changes all the time, the tests need to be easily refactored, or be prepared to toss the tests and write a new one
  4. Useful – Don’t waste time on writing tests that cover the same thing over and over again. Testing scenarios that never happen is useless too.
  5. Can be automated – i.e. Continuous Integration, which is another big topic that can’t be covered here.

Ultimately, you want to test your software as much as possible to ensure it works.

Data Warehousing

Another interesting topic that I attended was about data warehousing.  I won’t get into the detail of what is data warehousing. However, there are two points that I like to share. When you want to develop a data warehouse, please remind yourself these:

  1. You need a business case to create a data warehouse
  2. Use waterfall model, no agile!

The presenter pointed out that data warehouse extracts very specific information from the database. If there is no business case to create, you shouldn’t spend invest resources in creating one.  Developing a data warehousing can be expensive, and you want to do it right in the beginning. It is hard to modify afterward. That also lead to the 2nd point, use waterfall model when developing a data warehouse.  Data warehouse tends to be rigid, changes are very hard to make once it is created. Therefore the waterfall development model works best.

Who are the Business Analysts (Part 1/3)

About a month ago I was given an opportunity to attend the BA World conference in Calgary.  BA, which stands for business analyst, describes those professional who analyze the business. This was a two days conference, and the ticket was around $800 CND. This is rather an expensive conference relatives to my past conferences.

So, why did I paid to attend this conference which has almost nothing to do with programming? Well, I didn’t pay. I was lucky to win a draw for a free ticket in one of the CAMUG (Calgary Agile Methodology User Group) seminars. I would like to thank CAMUG organized the monthly seminar, and gave out free tickets to the conference.

Welcome to the BA World

I had never attending a non technical conference, so this is a totally new experience for me. The majority of my time deals with technical matters.  I kept reminding myself to stay away from being too technical when talking to the people in this conference.

I particularly remembered two things from the keynote that seems to be a recurring challenges for the BA in this two days conferences:

  1. BA has not been receiving the recognition that he/she should have deserved.
  2. BA as a discipline is not well defined, and the BAs need to promote themselves better in the business world.

These two problems puzzled me in the beginning.  However, soon I understood the reason behind it as the conference progresses.

Here are my reasons:
First, BA is relatively a new discipline, and yet people in the business world has been practicing BA. It just that it was not well defined the role of a BA in a company. In another, BA is a very general term describes people who analysis business.  Second, it appears that many company’s employees act somewhat like BA.  In another sense, there is not a need for a specific BA role if everyone in the company does a bit of BA so that company can archive its goal.

As a result, to better define BA as a profession, an organization called IIBA was created.

Role of a BA

In general,  BAs help the company grows.  For example, they do this by providing specific objectives for the company to achieve.  They might help implements polices, business processes to ensure the company stays in focus.

Specifically, BA may do some of the followings:

  • Collect business requirements
  • Linking the people to come to a business solution
  • Implement a new business process or policy
  • Finding new business opportunities
  • Finding opportunites to save company money

Values of a BA

The following diagram shows the values of a BA in an organization

image 

Types of BA

Generalist – This is basically the standard BA. This person oversees the general aspect of a business. A example would be a management consultant.

Specialist – This person has focus on a specific aspect in a business. For example: Data Analyst, Methodology BA, Process Analyst.

Hybrid – This person carries multiple roles in a company. For example, BA/PM, BA/QA, BA/Developer.

My Thoughts

BA as a professional appears to be very general. It almost like if you are doing business, but can’t find a proper title in a company, you will be categorized as a BA.  That’s properly one of the reasons why BA is not that well define.  However, because the profession appears to be very general, it seems hard to measure the performance of a BA.  This has become one of the most interesting questions in the conference – how do I measure the BA performance.