slimCODE

commUNITY
Welcome to slimCODE Sign in | Join | Help
in Search

slimCODE, aka Martin Plante

Life is made of little annoyances

I'm battling with a small focus issue with both the slimSEARCH and slimLAUNCH windows. Sometimes (that begins badly), these windows appear without the focus. It generally happens only the first time you use the hotkey, though not always. Worse, the code does not remember an open window, so it doesn't make sense for me, the developer, that this happens the first time only. I suspect something to do with the "active application" versus the "active window".

This small annoyance is a good example of the very little things that can degrade usage of a computer. While developers put a lot of efforts on the obvious aspects and features of an application, sometimes a minor splinter will make your computing life less enjoyable.

Take Visual Studio .NET for example. This a huge, no, wait, immense, gargantuess piece of software. Microsoft and its developers should really (really!) be proud of this product (or these products, as there are many flavors of VS.NET). Still, I'm battling with it very often. I'll give you a simple example: I like to put member variables at the end of my classes, and avoid at all costs useless initializations. To make sure I do this, I put a comment after the member, stating what I expect the default value to be, like this:

    private bool m_mustBegin; // = false
    private bool m_mustEnd; // = false
    private Regex m_searchExpression; // = null

Well, when using the refactoring tools to add a base class or interface implementation, it is added at the end of the class. I can live with this. What frustrates me is that VS.NET can't figure out the comment belongs to the member, and does this:

    private bool m_mustBegin; // = false
    private bool m_mustEnd; // = false
    private Regex m_searchExpression;

    internal void Something()
    {
      throw new NotImplementedException();
    } // = null

As you can see, the "// = null" comment is not kept with the "m_searchExpression" member. So, when cutting out the new method to move it to a better place, I have to make sure to select at the correct char positions, instead of just selecting the last 3 lines. I won't throw away VS.NET for that, nor hunt for those overweight/overpriced refactoring solutions, but it's an annoyance I have to live with.

Another example, with Windows Media Player. When maximized, the upper-right corner looks like this:

The buttons seem to go all the way up. Nevertheless, if you move the mouse from left to right at its topmost position, you won't hit the buttons. If you're not careful, you can be trying to click the minimize button in vain. The buttons seem to react only after the first pixel. Worse, if you move the mouse across the minimize button from down to top, you can see the minimize button getting focused:

But if you moved all the way up, the button remains blue but clicking it does nothing. You're actually clicking the caption bar (try a double-click to confirm). I hear you say "Come on, that's such a minor glitch!". I agree, but I get caught about twice a day, trying to minimize or close Windows Media Player, having to click a little bit lower a second time.

 

Published Tuesday, February 06, 2007 4:56 PM by slimcode
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

TommyCarlier said:

About the Visual Studio problem: you could try to put the member variables in a region. Like this:

#region member variables

bool m_mustBegin; // = false

bool m_mustEnd; // = false

Regex m_searchExpression; // = null

#endregion

February 7, 2007 1:57 AM
 

slimcode said:

I have a love/hate relationship with regions. More than often, they're in my way. Very rarely do I find myself really appreciating a region. I like them for hiding stuff, not grouping stuff.

February 7, 2007 3:59 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit