2004-06-30

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?

94 Comments:

Blogger Hristo said...

I'd like to mention the negative side of the tool question too. A tool can be limiting and enslaving. A tool can make a developer more productive in the short run, and less or even unproductive in the long run.

Look at all the "easy to develop in" "visual" tools that alienate people from sound development practices. Each and every one of us has seen the ugly "thick GUI" antipattern over and over again. The main reason people do code like that -- Delphi, Visual Basic, Visual C# and other graphical designers.

Look at all the fancy debuggers inside the IDE-s! People make it easy for you to fix your code when they should be making it easy NOT to write broken code in the first place.

Ahh that was a good rant. I feel better now.

8:44 pm  
Blogger boko said...

Yes, complex IDEs with GUI editors gives you false feeling that everything can be done with "just few clicks" (even they advertise it loud). There are difference between novice and experienced programmer - the former believes that this is all he needs to solve ANY development task and to complex build enterprise app for a month, while the second knows that such tool(s) could be just a precondition. Such believes are extremely dangerous if they are shared by the managers as well. The false believe that "a magic tool (usually complex and expensive CASE) will save the project", can ruin the whole company if the project is crucial. And it's not isolated case, a lot of managers share such believes even after few failures - they seek the reason for failure in the tools(language, IDE, technologies), but still continue to believe that next time they will find such "real_magic_box".
Anyway, my post was not about these blind believes and wishful thinking. And I didn’t mean that Java or Java IDEs are such magic tool. Purposely I didn’t mention GUI editors and wrote about refactoring and testing. My only concern is to make quality software and this software to be really soft. All tools have limits and we have to live with this. My main idea is that some tools are more mature and helpful than others. Such mature tools encourage me to do more brave refactorings and as end result I start really to believe in XP virtues. Thus, the dogma “if it works, don’t change it” loses it’s weight and software becomes really SOFT.

9:59 am  
Anonymous Anonymous said...

Great article! Thanks.

10:09 pm  
Anonymous Anonymous said...

Thanks for interesting article.

3:41 am  
Anonymous Anonymous said...

Nice! Nice site! Good resources here. I will bookmark!

12:52 am  
Anonymous Anonymous said...

I see first time your site guys. I like you :)

10:39 am  
Anonymous Anonymous said...

Excellent website. Good work. Very useful. I will bookmark!

7:16 pm  
Anonymous Anonymous said...

FA89sq You have a talant! Write more!

5:56 pm  
Anonymous Anonymous said...

4ggfdM Hello all!

3:33 am  
Anonymous Anonymous said...

nXY2aq The best blog you have!

6:25 am  
Anonymous Anonymous said...

GnCBj6 actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

6:27 pm  
Anonymous Anonymous said...

Good job!

11:38 am  
Anonymous Anonymous said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

4:17 pm  
Anonymous Anonymous said...

Wonderful blog.

5:18 pm  
Anonymous Anonymous said...

Thanks to author.

6:21 pm  
Anonymous Anonymous said...

Good job!

7:08 pm  
Anonymous Anonymous said...

yyGdXw write more, thanks.

11:18 am  
Anonymous Anonymous said...

Magnific!

4:45 am  
Anonymous Anonymous said...

Nice Article.

5:19 am  
Anonymous Anonymous said...

Magnific!

7:10 am  
Anonymous Anonymous said...

Good job!

8:20 am  
Anonymous Anonymous said...

Wonderful blog.

8:48 am  
Anonymous Anonymous said...

Wonderful blog.

9:18 am  
Anonymous Anonymous said...

Hello all!

9:49 am  
Anonymous Anonymous said...

Good job!

10:23 am  
Anonymous Anonymous said...

Thanks to author.

11:05 am  
Anonymous Anonymous said...

Hello all!

11:45 am  
Anonymous Anonymous said...

Thanks to author.

12:19 pm  
Anonymous Anonymous said...

Wonderful blog.

12:49 pm  
Anonymous Anonymous said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

1:24 pm  
Anonymous Anonymous said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

2:02 pm  
Anonymous Anonymous said...

Build a watch in 179 easy steps - by C. Forsberg.

2:34 pm  
Anonymous Anonymous said...

Ever notice how fast Windows runs? Neither did I.

3:01 pm  
Anonymous Anonymous said...

Calvin, we will not have an anatomically correct snowman!

3:33 pm  
Anonymous Anonymous said...

Friends help you move. Real friends help you move bodies.

4:06 pm  
Anonymous Anonymous said...

All generalizations are false, including this one.

4:39 pm  
Anonymous Anonymous said...

The gene pool could use a little chlorine.

5:42 pm  
Anonymous Anonymous said...

If ignorance is bliss, you must be orgasmic.

6:16 pm  
Anonymous Anonymous said...

Give me ambiguity or give me something else.

6:50 pm  
Anonymous Anonymous said...

Give me ambiguity or give me something else.

7:27 pm  
Anonymous Anonymous said...

I'm not a complete idiot, some parts are missing!

8:10 pm  
Anonymous Anonymous said...

Suicidal twin kills sister by mistake!

8:47 pm  
Anonymous Anonymous said...

Suicidal twin kills sister by mistake!

9:19 pm  
Anonymous Anonymous said...

Suicidal twin kills sister by mistake!

9:53 pm  
Anonymous Anonymous said...

Energizer Bunny Arrested! Charged with battery.

10:22 pm  
Anonymous Anonymous said...

I'm not a complete idiot, some parts are missing!

10:49 pm  
Anonymous Anonymous said...

Build a watch in 179 easy steps - by C. Forsberg.

11:17 pm  
Anonymous Anonymous said...

Calvin, we will not have an anatomically correct snowman!

11:47 pm  
Anonymous Anonymous said...

Calvin, we will not have an anatomically correct snowman!

12:17 am  
Anonymous Anonymous said...

I'm not a complete idiot, some parts are missing!

12:55 am  
Anonymous Anonymous said...

The gene pool could use a little chlorine.

1:26 am  
Anonymous Anonymous said...

Clap on! , Clap off! clap@#&$NO CARRIER

2:04 am  
Anonymous Anonymous said...

Oops. My brain just hit a bad sector.

2:36 am  
Anonymous Anonymous said...

C++ should have been called B

3:06 am  
Anonymous Anonymous said...

Beam me aboard, Scotty..... Sure. Will a 2x10 do?

3:39 am  
Anonymous Anonymous said...

Friends help you move. Real friends help you move bodies.

4:18 am  
Anonymous Anonymous said...

Lottery: A tax on people who are bad at math.

5:02 am  
Anonymous Anonymous said...

C++ should have been called B

5:37 am  
Anonymous Anonymous said...

Suicidal twin kills sister by mistake!

6:15 am  
Anonymous Anonymous said...

Wonderful blog.

6:53 am  
Anonymous Anonymous said...

Save the whales, collect the whole set

7:23 am  
Anonymous Anonymous said...

Magnific!

8:01 am  
Anonymous Anonymous said...

Hello all!

8:44 am  
Anonymous Anonymous said...

Save the whales, collect the whole set

9:28 am  
Anonymous Anonymous said...

Wonderful blog.

10:16 am  
Anonymous Anonymous said...

Lottery: A tax on people who are bad at math.

11:00 am  
Anonymous Anonymous said...

Lottery: A tax on people who are bad at math.

11:39 am  
Anonymous Anonymous said...

Give me ambiguity or give me something else.

1:21 pm  
Anonymous Anonymous said...

Ever notice how fast Windows runs? Neither did I.

2:11 pm  
Anonymous Anonymous said...

The gene pool could use a little chlorine.

3:33 pm  
Anonymous Anonymous said...

Lottery: A tax on people who are bad at math.

4:12 pm  
Anonymous Anonymous said...

C++ should have been called B

4:49 pm  
Anonymous Anonymous said...

Build a watch in 179 easy steps - by C. Forsberg.

5:24 pm  
Anonymous Anonymous said...

What is a free gift ? Aren't all gifts free?

6:07 pm  
Anonymous Anonymous said...

Save the whales, collect the whole set

6:50 pm  
Anonymous Anonymous said...

Save the whales, collect the whole set

7:32 pm  
Anonymous Anonymous said...

Save the whales, collect the whole set

8:20 pm  
Anonymous Anonymous said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

9:10 pm  
Anonymous Anonymous said...

Thanks to author.

9:47 pm  
Anonymous Anonymous said...

online dating scams and daniel http://loveepicentre.com/taketour.php sex dating in dunken new mexico

10:23 am  
Anonymous Anonymous said...

tribbing dating http://loveepicentre.com/ whoi is zac efron dating

11:40 am  
Anonymous Anonymous said...

ebook affiliate program http://audiobookscollection.co.uk/de/Joint-Cognitive-Systems/p111695/ bestselling ebook [url=http://audiobookscollection.co.uk/fr/A-Man-s-Guide-to-Pregnancy-How-to-live-with-a-Pregnant-Person/p107117/]ebook and q a[/url] kamsutra ebook free

7:14 am  
Anonymous Anonymous said...

going rogue ebook http://audiobookscollection.co.uk/fr/Problem-Driven-Management-Achieving-Improvement-in-Operations-Through-Knowledge-Management/p227858/ biological science 1 and 2 ebook [url=http://audiobookscollection.co.uk/de/Religion-and-the-Politics-of-Tolerance-How-Christianity-Builds-Democracy/p197487/]ebook format convert[/url] the drawing of the dark ebook

6:20 am  
Anonymous Anonymous said...

ebook publishing standards http://audiobooksplanet.co.uk/Shooting-Incident-Reconstruction/p197564/ medical ebook free download site [url=http://audiobooksplanet.co.uk/es/The-Richest-Man-In-Babylon/p21987/]nora ephron ebook heartburn[/url] redemption ebook

8:10 pm  
Anonymous Anonymous said...

ebook parallel universe time travel relativity http://audiobooksplanet.co.uk/fr/Intrepid/p30086/ ebook on ethanol [url=http://audiobooksplanet.co.uk/Real-World-Adobe-Photoshop-CS2-Industrial-Strength-Production-Techniques-2005-publication/p214665/]ebook turner diaries[/url] the secret rhonda byrne ebook

6:50 am  
Anonymous Anonymous said...

ebook vs paper books http://audiobooksworld.co.uk/Markus-Raab/m83557/ free ebook demand studio secrets [url=http://audiobooksworld.co.uk/de/authors/?letter=D&page=5]self defense ebook tutorials[/url] how to writean ebook

6:12 am  
Anonymous Anonymous said...

ebook menage a magick http://audiobooksworld.co.uk/Eleanor-Robins/m34291/ schwartz surgery ebook download [url=http://audiobooksworld.co.uk/When-Lightning-Strikes-1-800-Where-R-You/p224713/]promedia ebook reader[/url] ebook the verdant passage download

7:02 pm  
Anonymous Anonymous said...

free lua ebook http://audiobooksworld.co.uk/Spitfire-Flying-Legend/p145332/ non fiction ebook specials [url=http://audiobooksworld.co.uk/de/authors/?letter=F&page=4]ebook rebranding[/url] ebook the hr audit
[url=http://audiobooksworld.co.uk/fr/authors/?letter=L&page=5][img]http://audiobooksworld.co.uk/image/3.gif[/img][/url]

8:08 pm  
Anonymous Anonymous said...

palm treo free gps software http://buyoem.co.uk/product-19812/Symantec-Endpoint-Protection-11-0 open source version control software [url=http://buyoem.co.uk/de/category-5/PC-Diagnose]mda compact iii software upgrade[/url] dvdx software
[url=http://buyoem.co.uk/product-37280/TreeGenerator-2-0]TreeGenerator 2.0 - Software Store[/url] share pod software
[url=http://buyoem.co.uk/de/category-10/Internet?page=5][img]http://buyoem.co.uk/image/4.gif[/img][/url]

2:59 am  
Anonymous Anonymous said...

computer software courses http://buyoemsoftware.co.uk/it/product-36430/Benthic-Software-PLEdit-6-0 blind password software [url=http://buyoemsoftware.co.uk/product-10015/Gammadyne-Mailer-31-0]simply accounting software canada[/url] best cooking software
[url=http://buyoemsoftware.co.uk/product-14304/PassMark-PerformanceTest-v6-1]PassMark PerformanceTest v6.1 - Software Store[/url] palm treo hotsync software
[url=http://buyoemsoftware.co.uk/de/manufacturer-9/Autodesk][img]http://buyoem.co.uk/image/7.gif[/img][/url]

11:04 am  
Anonymous Anonymous said...

sync treo contact windows mobile software http://buysoftwareonline.co.uk/product-37387/DVDInfo-Pro-4-6 simple floor plan architecture software [url=http://buysoftwareonline.co.uk/product-16221/BluePhoneElite-1-1-Mac]orthodontic dental casts software[/url] good free quilt software
[url=http://buysoftwareonline.co.uk/category-100-111/System-Tools?page=3]System Tools - Software Store[/url] garmin gp60 software
[url=http://buysoftwareonline.co.uk/news-22/Google-Apps-grows-up-and-ditches-beta][img]http://buyoem.co.uk/image/5.gif[/img][/url]

5:29 am  
Anonymous Anonymous said...

gps 6515 software http://buysoftwareonline.co.uk/it/product-14376/Librarian-1-0-Pro-Mac garmin 18 software free [url=http://buysoftwareonline.co.uk/es/category-100-104/Extensiones-de-programas]slotcar software for linux[/url] smith mint budgeting software
[url=http://buysoftwareonline.co.uk/de/category-200-204/Software-Plugins]Software Plugins - Software Store[/url] mfc8600 xp software
[url=http://buysoftwareonline.co.uk/es/product-37356/UltraEdit-32-Professional-13-2][img]http://buyoem.co.uk/image/1.gif[/img][/url]

6:39 am  
Anonymous Anonymous said...

[url=http://certifiedpharmacy.co.uk/products/cefadroxil.htm][img]http://onlinemedistore.com/7.jpg[/img][/url]
pharmacy help desk phone list http://certifiedpharmacy.co.uk/products/zyvox.htm new jersey board of pharmacy [url=http://certifiedpharmacy.co.uk/catalogue/k.htm]paxil pharmacy online[/url]
rosemont pharmacy vera bradley http://certifiedpharmacy.co.uk/products/neurontin.htm pharmacy locator [url=http://certifiedpharmacy.co.uk/products/confido.htm]confido[/url]
ford pharmacy deerfield http://certifiedpharmacy.co.uk/products/hangoff-helper.htm what courses consist of for pharmacy technician [url=http://certifiedpharmacy.co.uk/products/ranitidine.htm]pharmacy mur assesements[/url]
pharmacy college ranking http://certifiedpharmacy.co.uk/products/clarinex.htm pharmacy online uk [url=http://certifiedpharmacy.co.uk/products/toprol-xl.htm]toprol xl[/url]

3:25 pm  
Anonymous Anonymous said...

[url=http://englandpharmacy.co.uk/products/viagra-soft-flavoured.htm][img]http://onlinemedistore.com/1.jpg[/img][/url]
institute for the certification of pharmacy technicians http://englandpharmacy.co.uk/products/vantin.htm photo machine pharmacy [url=http://englandpharmacy.co.uk/products/desyrel.htm]us pharmacy schools[/url]
charleston west virginia pharmacy robberies november 2007 http://englandpharmacy.co.uk/products/uroxatral.htm business per forma and pharmacy residency program [url=http://englandpharmacy.co.uk/products/cleocin.htm]cleocin[/url]
james i harrison pharmacy school auburn http://englandpharmacy.co.uk/products/actos.htm plan 040 wellpoint pharmacy medical [url=http://englandpharmacy.co.uk/products/rave--energy-and-mind-stimulator-.htm]next day delivery online site pharmacy generic azithromycin[/url]
percent problems in pharmacy math http://englandpharmacy.co.uk/products/casodex.htm maryland board pf pharmacy cds number [url=http://englandpharmacy.co.uk/products/desyrel.htm]desyrel[/url]

9:28 am  

Post a Comment

<< Home