From: Gavin Sinclair Date: 2004-08-28T17:57:08+09:00 Subject: Re: Typos (Was: performance comparison) On Saturday, August 28, 2004, 11:25:43 AM, Alexey wrote: > Seriously though, even after becoming familiar with the syntax and > standard classes to the point where I mostly don't have to think about > them, I still find myself making notably more mistakes in Ruby than in > Java. Hacking out a small script using standard APIs is a bliss, but > adding 15 lines of unit test and 15 lines of code that makes it pass to > an existing project normally takes me 2-3 edit/test/debug cycles just to > get past the typos. Quick as these cycles are, they break my flow. > Simple refactorings (like "rename method") are also painful in the same > way. Programming Java without a *really* good IDE is awful. Programming Java with one is bliss (except for the Java bit, which brings the whole experience back to "bearable"). Programming Ruby without a really good IDE is quite doable. There are certainly difficult aspects to it (especially project structure), and your point about losing flow with minor things is well made. Whenever there's a complex-ish piece of Ruby code I have to do (i.e. susceptible to subtle mistakes and/or unlikely to work first time), I develop it in IRB. Just copy and paste the code into IRB, set up some context (initial data), and run and edit until it works. It then gets copied into the program with confidence. That only feels like one "cycle" - an illusion, perhaps, but a useful one. BTW, word completion (CTRL-P and others) in Vim goes a long way to avoiding typos. Sometimes, however, it repeats them all over the place! :) > I wonder if it's just another stage of the learning curve, or that's how > programming in dynamic language normally feels, or maybe I am doing > something wrong (?) Some people are very good at programming in dynamic languages. You get better with practice. The difference is that the practice is enjoyable :) Gavin