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.

Sunday, April 11, 2010

The iPad is a Revolution

Having had an iPad for about a week now I'm pretty sure it will change how we interact with computers. It's not the multi touch with a big screen I'm thinking of but the fact that it seems like the first real attack on the overlapping windows UI approach in a very long time.
I've always been a bit sceptical to the idea of having two windows partially overlap like we do in most OS. If you are interacting with one program, it should be filling the screen, if you are interacting with two programs they should share the the screen in way that both of the windows have their share of the screen, having them overlap doesn't make sense. I can't remember how many times I've been upset trying to drag something from a window to a different window that happens to be partially covered by the first one.
There are many programs that solves this locally. My favorite example is Total Commander or Norton Commander. It's remarkably faster to get things done in that kind of environment rather than the seas of explorer or finder windows that tends to occupy the desktop after a days work.
For X environments there have been window managers like larswm and dwm that approaches the problem, but it has always seems like they are fighting a battle they can't win since most applications doesn't play very well with the paradigm. I've always been skeptical to turn into the person running WeirdOS with Dvorak keyboard setup and telling everybody how fast you get things done, since you tend to spend so much time on different computers in you everyday life so you'd better be good with what's most common.
This is why the iPad is very interesting. Suddenly we have a platform with a big adaptation and an OS built in a way where applications are full screen by default. I'm very happy they made it a big iPhone as opposed to a touch enabled desktop MacOSX. The upcoming multi tasking ability will take it closer to a real computer and with a real keyboard and a mouse, it's pretty close to be useful as a desktop OS.
Ironically XCode, the environment you develop for iPad in is the very opposite. It's, from a window point of view, one of the most messy pieces of software I've ever used. It's horrible to use on a laptop with a touchpad since it needs lots of window changes and precision mouse movements and you always end up with a stamp sized editor window for you code in order to fit the other relevant stuff you need on the screen.