The spirit of the tool and craftsmanship.
Part 1 - the tools and how they can give leverage our daily work.
Our tools that we use daily are programming languages, IDEs, scripts, bug tracking systems etc. How they boost our efficiency and productivity depends on 2 main factors: the worker and the tool itself. If the worker is apprentice, don't expect super productivity even if you give him the best tool available. And of course if the tool is crappy the craftsman will have much troubles performing just simple tasks.
As a convinced XP adherent, I all the time refactor the code and (try to) write as much unit tests as I can. In my office I use C++ and MSVC and at home (in my spare time) I use Java and few IDEs, so I can compare the results easily. So lets do some simple refactoring - lets take method rename. In C++ code this is a short (sometimes longer) walk in the hell. You can do this using 2 approaches: old, well known text search or using browse information. In the first case the search will give you probably hundreds occurrences in the files, but you have to open every listed file and to see the context (it could be in a commented code, if the method name is so common as GetName or GetID , only 20% or less of the references can be these that you are interested in) and then to do the renaming manually. This approach involves a lot of boring tasks - opening files, positioning in the right line, is this place really a call to my class or not, if yes - rename it, if not skip it, search next occurrence in the same file and do the steps again, and again and again ... until it's time for lunch. So half a day just for rename a method ( :-( tell this to your manager ). Ok, lets see other approach - it saves you a lot because it finds exactly the places of your class method, it's not so stupid as the text search. But anyway I have to do all manual work as well, just browse info is more precise tool and saves your time. But it's not for free - every time you compile the project, browse info is generated again ... and it's slow. I didn't counted this, but may be Compilations_count * browse_info_rebuild_time > time_spend_using_simple_text_search, so it's not clear which approach is faster. Note that I said faster, not better. There is no better, if huge amount of manual work is involved simply because it's error prone.
Now ... lets try the same in some Java IDE. It's just a developer dream. Right click in the method, choose from the menu Refactoring/Rename and put the new name. The IDE will find all references exactly to this method of this class and will ask you nicely - do you want to do the refactoring? And guess - if you say yes, it will do all manual work instead of you! Fast and not error prone! Big difference, you see. What more you can want? Hm, hay it was just a simple rename, what about more complicated refactorings like pull up method in base class, extract method, replace inheritance with delegation and so on. Guess again - there are some Java IDEs that can do all these refactorings for seconds and very, very safely. If you select a snipped and try to extract method for example, it will analyse the types of variables, the return value of the new method and will replace the snipped with a method call with appropriates parameters and so on. Don't believe it .... - so get JBuilder or JIdea (these are 2 that I'm familiar with) and try.
And this was just about refactoring. What about tests writing? There the situation is not better. In Java IDEs you can use almost the same approach as refactoring - right click over a class name, choose new TestCase and a dialog will appear to ask you which methods of this class you'd like to test. Again fast, intuitive and very, very friendly and helpful. Another page will not be sufficient to describe how painful is the same task in MSVC.
Now lets back on the topic. May be you think I sing spirituals for SUN/Java and curse MS/C++ and I'm trying to involve you in a technology/company war. Definitely NOT - don't get me wrong please. All I wanted to say is that some tools(languages and IDEs) can boost much more your performance and quality of work than others. Compared to old plain text editors that we used decade ago to write code and produce make files, MSVC much, much better, but compared to JIdea or JBuilder for example, it's .. you name it. I hear some angry voices: hay stupid guy, all these problems comes from the languages difference, C++ is much more complex and can not be refactored easy - use C# instead of C++. I'll tell you - I just don't care if C++ is more complex or not - my only concerns as a developer are to do my job properly(means high quality) and fast. If the tools help me in both directions, I will use them doesn't matter which company is behind. If they don't (help me), I don't (use them) too.
P.S. Try to guess which language and tools I'll use in my next project(s)?
insipred of these 2 publications:
The Spirit of the Tool
Aren't C++ Programmers People Too?
Our tools that we use daily are programming languages, IDEs, scripts, bug tracking systems etc. How they boost our efficiency and productivity depends on 2 main factors: the worker and the tool itself. If the worker is apprentice, don't expect super productivity even if you give him the best tool available. And of course if the tool is crappy the craftsman will have much troubles performing just simple tasks.
As a convinced XP adherent, I all the time refactor the code and (try to) write as much unit tests as I can. In my office I use C++ and MSVC and at home (in my spare time) I use Java and few IDEs, so I can compare the results easily. So lets do some simple refactoring - lets take method rename. In C++ code this is a short (sometimes longer) walk in the hell. You can do this using 2 approaches: old, well known text search or using browse information. In the first case the search will give you probably hundreds occurrences in the files, but you have to open every listed file and to see the context (it could be in a commented code, if the method name is so common as GetName or GetID , only 20% or less of the references can be these that you are interested in) and then to do the renaming manually. This approach involves a lot of boring tasks - opening files, positioning in the right line, is this place really a call to my class or not, if yes - rename it, if not skip it, search next occurrence in the same file and do the steps again, and again and again ... until it's time for lunch. So half a day just for rename a method ( :-( tell this to your manager ). Ok, lets see other approach - it saves you a lot because it finds exactly the places of your class method, it's not so stupid as the text search. But anyway I have to do all manual work as well, just browse info is more precise tool and saves your time. But it's not for free - every time you compile the project, browse info is generated again ... and it's slow. I didn't counted this, but may be Compilations_count * browse_info_rebuild_time > time_spend_using_simple_text_search, so it's not clear which approach is faster. Note that I said faster, not better. There is no better, if huge amount of manual work is involved simply because it's error prone.
Now ... lets try the same in some Java IDE. It's just a developer dream. Right click in the method, choose from the menu Refactoring/Rename and put the new name. The IDE will find all references exactly to this method of this class and will ask you nicely - do you want to do the refactoring? And guess - if you say yes, it will do all manual work instead of you! Fast and not error prone! Big difference, you see. What more you can want? Hm, hay it was just a simple rename, what about more complicated refactorings like pull up method in base class, extract method, replace inheritance with delegation and so on. Guess again - there are some Java IDEs that can do all these refactorings for seconds and very, very safely. If you select a snipped and try to extract method for example, it will analyse the types of variables, the return value of the new method and will replace the snipped with a method call with appropriates parameters and so on. Don't believe it .... - so get JBuilder or JIdea (these are 2 that I'm familiar with) and try.
And this was just about refactoring. What about tests writing? There the situation is not better. In Java IDEs you can use almost the same approach as refactoring - right click over a class name, choose new TestCase and a dialog will appear to ask you which methods of this class you'd like to test. Again fast, intuitive and very, very friendly and helpful. Another page will not be sufficient to describe how painful is the same task in MSVC.
Now lets back on the topic. May be you think I sing spirituals for SUN/Java and curse MS/C++ and I'm trying to involve you in a technology/company war. Definitely NOT - don't get me wrong please. All I wanted to say is that some tools(languages and IDEs) can boost much more your performance and quality of work than others. Compared to old plain text editors that we used decade ago to write code and produce make files, MSVC much, much better, but compared to JIdea or JBuilder for example, it's .. you name it. I hear some angry voices: hay stupid guy, all these problems comes from the languages difference, C++ is much more complex and can not be refactored easy - use C# instead of C++. I'll tell you - I just don't care if C++ is more complex or not - my only concerns as a developer are to do my job properly(means high quality) and fast. If the tools help me in both directions, I will use them doesn't matter which company is behind. If they don't (help me), I don't (use them) too.
P.S. Try to guess which language and tools I'll use in my next project(s)?
insipred of these 2 publications:
The Spirit of the Tool
Aren't C++ Programmers People Too?
