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?

98 Comments:

Blogger Tor Mentor said...

This post has been removed by a blog administrator.

4:25 PM  
Blogger Tor Mentor said...

I can just add, that there isn't any 'extract method' for an assembly language too - there aren't any methods indeed. Nor any testing framework similar to xUnit ( may be AssUnit ) I've heard about. And this is probably so, because the tasks that these languages are designed for are quite different than the ones we're on now.
And about the 'riddle' in the p.s. - many people know the answer. Even more are asking themselves the same question. But it's good that we can choose, isn't it?

4:37 PM  
Blogger Hristo Deshev 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...

Hi sexy girls | sexy webcam videos | live chat xanax cheap xanax buy xanax online phentermine buy phentermine online phentermine cheap tramadol buy tramadol online tramadol cheap levaquin buy levaquin online levaquin cheap norvasc buy sex online
babe online casino online casino online roulette online blackjack online poker online phentermine online xanax xanax buy phentermine phentermine buy phentermine cheap | live chat
for fun

2:31 AM  
Anonymous Anonymous said...

Hi all!. Alone on Valentine's Day? Adult Live Chat & movie pages Try to find partner in your area!
Enjoy

9:19 AM  
Anonymous Anonymous said...

Hello. Use this search engine for best result: BD search Find all you need in your area!
for fun

9:56 AM  
Anonymous Anonymous said...

Hi all!. Use these helpful search engines TFO search & sex and try to find all you need in your area!
for fun

6:03 PM  
Anonymous Anonymous said...

Latest news. Viagra, cialis

viagra
cialis
tramadol

2:42 PM  
Anonymous Anonymous said...

Hi. Use this search engine for best result: BDsearch Find all you need in your area!
Enjoy

1:32 AM  
Anonymous Anonymous said...

http://www.adquity.com

Classifieds for our community. Buy, sell, trade, date, events... post anything. Adquity Classifieds.

http://www.adquity.com

2:03 AM  
Anonymous Anonymous said...

Hey,

What is it with girls fighting?

BigMike


gross-videos.com

3:05 PM  
Anonymous Anonymous said...

You won’t believe your eyes, see the World’s best girls HERE! ...... Try to find sexy partner in your area !
- JOIN FREE - After free registration you can have unlimited access to the huge adult source.
ATTANTION ! Adult only !...... http://searchchat0.tripod.com

8:30 PM  
Anonymous <a href="http://www.xanga.com/buy_levitra">Buy Levitra</a> said...

Great article! Thanks.

10:09 PM  
Anonymous <a href="http://phentermine1.eamped.com">Phentermine</a> said...

Thanks for interesting article.

3:41 AM  
Anonymous <a href="http://search.cnn.com/search?query=site:m1.aol.com/phentermine4">Anonimous</a> said...

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

12:52 AM  
Anonymous <a href="http://m2.aol.com/LorenLynn03/index8.html">Maxwells</a> said...

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

10:39 AM  
Anonymous <a href="http://courses.cvcc.vccs.edu/ENG112_GROSS/_Chat_Room/000008fd.htm">Anonimous</a> said...

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

7:16 PM  
Anonymous <a href="http://paydayadvisors.org">PaydayLoans</a> said...

FA89sq You have a talant! Write more!

5:56 PM  
Anonymous <a href="http://tes.uab.es/MISS/portal_memberdata/portraits/twkgxziok">Auto insurance company</a> said...

4ggfdM Hello all!

3:33 AM  
Anonymous <a href="http://hydrocodone.99k.org/index.php">Hydrocodone</a> said...

nXY2aq The best blog you have!

6:25 AM  
Anonymous <a href="http://users2.titanichost.com/buyviagra/426.html">american heritage life insurance company</a> said...

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

6:27 PM  
Anonymous <a href="http://free.7host07.com/nmcfgy/79.html">all time pga tour win</a> said...

Good job!

7:19 PM  
Anonymous <a href="http://fioricet.clanteam.com/?pharma=317">fioricet information</a> said...

Nice Article.

8:04 PM  
Anonymous <a href="http://celebrex.zxq.net/?pharma=1373">colorado celebrex attorneys</a> said...

Good job!

9:03 PM  
Anonymous <a href="http://m1.aol.com/BrettHead14/335.html">american vendor insurance show</a> said...

Nice Article.

10:06 PM  
Anonymous <a href="http://users2.titanichost.com/buyviagra/index2.html">cheap phentermine at our canadian pharma</a> said...

Good job!

11:38 AM  
Anonymous <a href="http://vicodin.newsit.es/boards-detox-qoclick-shop-vicodin.html">boards detox qoclick shop</a> said...

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

4:17 PM  
Anonymous <a href="http://xenical.newsit.es/nexium-xenical-ed-wetrackit.html">nexium xenical ed wetrackit</a> said...

Wonderful blog.

5:18 PM  
Anonymous <a href="http://tramadol.newsit.es/detox-ultram-tramadol.html">detox ultram tramadol</a> said...

Thanks to author.

6:21 PM  
Anonymous <a href="http://phentermine.whdot.com/index15.html">buy dosage orxc com from link phentermine html via</a> said...

Good job!

7:08 PM  
Anonymous <a href="users2.titanichost.com/amalopra">JohnBraun</a> said...

yyGdXw write more, thanks.

11:18 AM  
Anonymous <a href="http://users2.titanichost.com/popebatret/index33.html">college sex teen</a> said...

Magnific!

4:45 AM  
Anonymous <a href="http://users2.titanichost.com/inoryum/index32.html">donkey having sex</a> said...

Nice Article.

5:19 AM  
Anonymous <a href="http://users2.titanichost.com/hviler/index20.html">animals sex movis</a> said...

Magnific!

7:10 AM  
Anonymous <a href="http://users2.titanichost.com/ansfur/index33.html">latin vids sex</a> said...

Nice Article.

7:43 AM  
Anonymous <a href="http://users2.titanichost.com/olds77/index32.html">household anal</a> said...

Good job!

8:20 AM  
Anonymous <a href="http://users2.titanichost.com/shingro/index32.html">serenna sex productions</a> said...

Wonderful blog.

8:48 AM  
Anonymous <a href="http://users2.titanichost.com/scersi/index12.html">e-mail chat sex</a> said...

Wonderful blog.

9:18 AM  
Anonymous <a href="http://users2.titanichost.com/t1fielde/index22.html">paparazzi sex video</a> said...

Hello all!

9:49 AM  
Anonymous <a href="http://users2.titanichost.com/adjutes/index24.html">barbarian movie sex</a> said...

Good job!

10:23 AM  
Anonymous <a href="http://users2.titanichost.com/adjutes/index2.html">beast beauty sex</a> said...

Thanks to author.

11:05 AM  
Anonymous <a href="http://users2.titanichost.com/shiconta/index19.html">couples sex toys</a> said...

Hello all!

11:45 AM  
Anonymous <a href="http://users2.titanichost.com/gnites3/index12.html">hot sex israel</a> said...

Thanks to author.

12:19 PM  
Anonymous <a href="http://users2.titanichost.com/marymeno/index.html">preparing anal sex</a> said...

Wonderful blog.

12:49 PM  
Anonymous <a href="http://users2.titanichost.com/vadhoms/index5.html">malyalam sex girls</a> said...

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

1:24 PM  
Anonymous <a href="http://users2.titanichost.com/etooking/index.html">new sex ideas</a> said...

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

2:02 PM  
Anonymous <a href="http://users2.titanichost.com/swiseny/index28.html">dokhtar iran sex</a> said...

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

2:34 PM  
Anonymous <a href="http://users2.titanichost.com/Lostsoldier3/index33.html">free porn blondes</a> said...

Ever notice how fast Windows runs? Neither did I.

3:01 PM  
Anonymous <a href="http://users2.titanichost.com/pyzoid/index19.html">bottems bum sex</a> said...

Calvin, we will not have an anatomically correct snowman!

3:33 PM  
Anonymous <a href="http://users2.titanichost.com/pyzoid/index14.html">boy anal sex</a> said...

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

4:06 PM  
Anonymous <a href="http://users2.titanichost.com/selli83/index18.html">african lesbian sex</a> said...

All generalizations are false, including this one.

4:39 PM  
Anonymous <a href="http://users2.titanichost.com/numdaso/index24.html">japan sex teen</a> said...

Good job!

5:12 PM  
Anonymous <a href="http://users2.TitanicHost.com/beveris/hydrocodone-properties.html">hydrocodone properties</a> said...

The gene pool could use a little chlorine.

5:42 PM  
Anonymous <a href="http://cialis.whdot.com/index18.html">cialis generic ultram pills</a> said...

If ignorance is bliss, you must be orgasmic.

6:16 PM  
Anonymous <a href="http://web.archive.org/web/20070818073944/xanga.com/buyultramonline">cheap ultram</a> said...

Give me ambiguity or give me something else.

6:50 PM  
Anonymous <a href="http://users2.titanichost.com/numdaso/index29.html">irish sex sites</a> said...

Give me ambiguity or give me something else.

7:27 PM  
Anonymous <a href="http://users2.titanichost.com/febisko/index17.html">bestiality sex sites</a> said...

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

8:10 PM  
Anonymous <a href="http://users2.titanichost.com/topletrufus/index16.html">geisha sex doll</a> said...

Suicidal twin kills sister by mistake!

8:47 PM  
Anonymous <a href="http://users2.titanichost.com/yetzeit/index21.html">ardcore anal sex</a> said...

Suicidal twin kills sister by mistake!

9:19 PM  
Anonymous <a href="http://users2.titanichost.com/brittanyrogers/52-0411.html">all girls sex</a> said...

Suicidal twin kills sister by mistake!

9:53 PM  
Anonymous <a href="http://users2.titanichost.com/glicia80/index29.html">sex blue gay</a> said...

Energizer Bunny Arrested! Charged with battery.

10:22 PM  
Anonymous <a href="http://users2.titanichost.com/reekello/index21.html">dbz sex games</a> said...

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

10:49 PM  
Anonymous <a href="http://users2.titanichost.com/tortene/index33.html">older sex free</a> said...

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

11:17 PM  
Anonymous <a href="http://users2.TitanicHost.com/kiderg/cocaine-fruit-europe.html">cocaine fruit europe</a> said...

Calvin, we will not have an anatomically correct snowman!

11:47 PM  
Anonymous name said...

Calvin, we will not have an anatomically correct snowman!

12:17 AM  
Anonymous <a href="http://users2.titanichost.com/cuhozhilov/index28.html">first porn</a> said...

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

12:55 AM  
Anonymous <a href="http://users2.titanichost.com/robertf/index3.html">psp video anal porn</a> said...

The gene pool could use a little chlorine.

1:26 AM  
Anonymous <a href="http://users2.titanichost.com/maxeevich/index25.html">absolutely free sex porn movies and v</a> said...

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

2:04 AM  
Anonymous <a href="http://users2.titanichost.com/dityroe/index18.html">lille sex shop</a> said...

Oops. My brain just hit a bad sector.

2:36 AM  
Anonymous <a href="http://users2.titanichost.com/liperwo/index35.html">australian sex movies</a> said...

C++ should have been called B

3:06 AM  
Anonymous <a href="http://users2.titanichost.com/dasistorama/index31.html">free simpson porn videos</a> said...

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

3:39 AM  
Anonymous <a href="http://users2.titanichost.com/rego07/index16.html">china girl porn</a> said...

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

4:18 AM  
Anonymous <a href="http://users2.titanichost.com/artinko/index25.html">guji porn punjab</a> said...

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

5:02 AM  
Anonymous <a href="http://users2.titanichost.com/lindafmosley/index12.html">does voluptuous offer better anal&lt;</a> said...

C++ should have been called B

5:37 AM  
Anonymous <a href="http://users2.titanichost.com/tereritoa1/index32.html">funny sex poem</a> said...

Suicidal twin kills sister by mistake!

6:15 AM  
Anonymous <a href="http://users2.titanichost.com/eynol/index24.html">porn on film</a> said...

Wonderful blog.

6:53 AM  
Anonymous <a href="http://users2.titanichost.com/dentouj/index32.html">hentai sex xxx</a> said...

Save the whales, collect the whole set

7:23 AM  
Anonymous <a href="http://users2.TitanicHost.com/almaz/imitrex-advil.html">imitrex advil</a> said...

Magnific!

8:01 AM  
Anonymous <a href="http://users2.titanichost.com/bybonte/index6.html">cesar sex machine</a> said...

Hello all!

8:44 AM  
Anonymous <a href="http://users2.titanichost.com/unareq/index8.html">playboy sex hardcore</a> said...

Save the whales, collect the whole set

9:28 AM  
Anonymous <a href="http://users2.titanichost.com/mezers/index1.html">califonia sex offenders</a> said...

Wonderful blog.

10:16 AM  
Anonymous <a href="http://users2.titanichost.com/deswef/index4.html">cannes sex club</a> said...

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

11:00 AM  
Anonymous <a href="http://users2.titanichost.com/tedethe/index4.html">free friend sex</a> said...

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

11:39 AM  
Anonymous <a href="http://users2.titanichost.com/simpleplayer/index34.html">incest porn movie</a> said...

Good job!

12:27 PM  
Anonymous <a href="http://users2.titanichost.com/sobermi/index19.html">interactive sex games</a> said...

Give me ambiguity or give me something else.

1:21 PM  
Anonymous <a href="http://users2.titanichost.com/clydej/index7.html">violent porn trailers</a> said...

Ever notice how fast Windows runs? Neither did I.

2:11 PM  
Anonymous <a href="http://users2.titanichost.com/xcalomi/index25.html">jons sex movie</a> said...

Good job!

2:54 PM  
Anonymous <a href="http://users2.titanichost.com/ramisew/index35.html">porn animal sex</a> said...

The gene pool could use a little chlorine.

3:33 PM  
Anonymous <a href="http://users2.titanichost.com/hegory/index2.html">best site to report teen porn</a> said...

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

4:12 PM  
Anonymous <a href="http://users2.titanichost.com/sidspros/index33.html">kinky extreme sex</a> said...

C++ should have been called B

4:49 PM  
Anonymous <a href="http://users2.titanichost.com/whitedenster/index13.html">cell phone porn</a> said...

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

5:24 PM  
Anonymous <a href="http://users2.titanichost.com/MarcellaDurant/index14.html">1night standsfor sex</a> said...

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

6:07 PM  
Anonymous <a href="http://users2.titanichost.com/cationie1/index21.html">parent teaching sex</a> said...

Save the whales, collect the whole set

6:50 PM  
Anonymous <a href="http://phentermine.43i.net/797-061107.html">phentermine no prescription needed</a> said...

Save the whales, collect the whole set

7:32 PM  
Anonymous <a href="http://phentermine.43i.net/345-061107.html">cheap mg phentermine cod informative mg phenter</a> said...

Save the whales, collect the whole set

8:20 PM  
Anonymous <a href="http://phentermine.43i.org/152-061107.html">buy phentermine by phone no script</a> said...

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

9:10 PM  
Anonymous <a href="http://users2.titanichost.com/nimytre/index35.html">hunter video sex</a> said...

Thanks to author.

9:47 PM  

Post a Comment

<< Home