Monday, April 19, 2010

Another Pet Peeve

Editors that automatically introduces a closing bracket or parenthesis when typing an opening one. I just get the impression that I delete (or forget to delete it so my code gets wrong) more than half of the times it happens. When modifying old code, which seems to be what most coders actually do, it always get in my way.
Typically you have something like:
float temp = a * b + c;
and you realize it bugs if the result gets negative so you want to modify the code to:
float temp = std::max(a * b + c, 0.0f);
For these situations you always end up needing to erase that stupid autogenerated parenthesis when wrapping up the previous expression in a new one. I also often find myself creating my expressions from the inside out as opposed from left to right when typing new code and then it's just getting in my way.

For me it seems like a stupid micro optimization based on the idea that you spend more time creating new code than working with old that makes the programming editor behave differently and confusingly from almost any editor without giving any noticeable speed improvements. In order to motivate a change the expected result of typing (like visual assist does when suggesting function/variable names that changes the behavior of the tab or space key while suggesting) you'd better get a noticeable improvement. In this case I think it's getting in the way most of the time.

1 comment:

  1. I don't know which editor you're using, but switch it off! :)

    ReplyDelete