Thursday, February 19, 2009

Chrome Tab Ordering

At home, I'm on a Mac and use Safari - there's a few things I don't particularly like about it, but it feels more native than Firefox, so I live with it and fire up Firefox when I need an alternative.

At my last workplace, I had a Suse 10.X machine and a Windows XP machine. I grabbed Chrome as soon as the first beta came out (the employer blocked chrome soon after in a fit of enterprise-control-freakery) and the fetaures I liked the most were:
  • Stability: Seemed (totally subjective!) to crash a lot less than Firefox. In fact, the whole app (th sirst beta that is) crashed only once, individual pages died more often.
  • Memory Use: It Seemed (again, that subjectivity, but hey, subjectivity rules the world when it comes to users perceptions!) to use less memory than Firefox - I'd be restarting Firefox to free up memory every week or so, with Chrome, never (although I think it did use more memory to start with, it didn't peak like Firefox did).
  • New Tabs (Control-T and "Open in New Tab" appeared next to the tab I was looking at.
Now this last feature really hit me hardest - It made me realise what was bugging me about Safari at home - I would end up with loads of tabs and have to rearrange them or spin back and forth looking for the one I wanted, wasting lots of time and getting frustrated. I want this feature in Safari! I even filed a bug report with Apple!

Eventually, I compiled my own GTK2.X and got Firefox 3.0 going on the Suse box - I found Ctrl-Tab, Tab Popup and most importantly, Tabs Open Relative! When I got a new machine and couldn't get Chrome, I could run Firefox and found that it's stability and memory use were hugely improved (again, subjective) and I got the tab opening behaviour I wanted!

Now, I have all these plugins on my Mac, but Safari still feels better somehow. Then along comes the release of Safari 4.0.

Once your tab bar is full, the last tab in Safari now has a pull down menu showing all the tabs, with the non-visible ones marked, but the last tab itself shows the last tab you looked at in the stack of "excess" tabs - Pick another from the menu and it stays on the last tab till you pick a new one or open a new tab.

Now, this isn't ideal for me, but it's does seem to work for me. I can change between tabs and still see the last one I was looking at, or use Command-{} to flip back and forth.

I still want to have my tabs open next to the current tab, but I'm coping OK with Safari 4.0's approach.

Wednesday, February 18, 2009

Java Logging!@*#%$*(%!

Hasn't this been done to death?

So why can't I leave it alone?

'Cause every time I go to use a logging framework, typically for some debugging, I'm amazed at how overly-complicated and under-featured they are.

So, I typically end up using log4j, or something wrapping/derived from it. Then I go to do some debugging and think, "Oh, that's a bit expensive to leave in there, I'll have to put a logger.isDebugEnabled() on the front of it" - and then I've just doubled the amount of space in my debugging code in order to be more efficient.

So I write a wrapper around Log4J that takes varargs and only concats them if debugging is on and Voila!, yet another custom logging framework.

Can anyone tell me what they use, that is succinct and efficient?