Saturday, December 8, 2007

Thought Snippets for the Week Ending 12/8: Shock absorbers and getting Visual Studio to do VIM's % trick

  • "Software should have shock absorbers and circuit breakers" - Michael Nygard. I think far too often we think about having exception handlers and think we're done. I really like Michael's analogy. It makes the case for a more comprehensive, watching out for the user, software design.

  • By far, the biggest tip I started to employ this week was using "Ctrl + ]" to do brace matching in Visual Studio. For over 5 years I have been using this feature in VIM by pressing the % key. It was a joy to learn that Visual Studio does it as well.


Mike Petry said...

Yes 'Ctrl + ]' has been around at least since VS 6. Actually Python has a superior way to match braces. I will tell you about it sometime.

I agree that handling errors well would be design nirvana. The ability to handle error conditions correctly requires the most intimate understanding of the problem domain.

Speaking of Erlang, exceptions don't work well in multi-threaded programs. Exceptions identify an error state that would have to be handled just like the rest of the application's state. As we move into more functional, declarative, concurrency orientated software applications, error state handling will have to become a first class citizen. And you are right, the net result will be a better user experience.

Jeff Moser said...

Agreed. I'm especially looking forward to seeing how optimistic concurrency will play into the game.

Mike Petry said...

Update - besides IronPython, there is a .NET language that is popular on Mono called Boo that is inspired by Python.
I am interested in looking into Mono on Linux. Mono may mitigate some of the concerns I have with .NET development and platform lock-in.
From what I have been reading, Mono has enjoyed success on Linux (to the chagrin of some of the hard-core penguins).

Jeff Moser said...

Most of my knowledge of Boo came from a channel 9 video. It's definitely a neat idea of having compiler extensions.

I really hope Mono continues to grow as it will hopefully make life easier. Hopefully it doesn't turn into a browser quirk thing though.

Mike Petry said...

I have seen references to gui toolkits like gtk# and gnome# so I would expect the UI elements to differ from Linux to Windows. I think this is good, otherwise it would be like Java. The trick would be to keep as much stuff out of the Form classes as possible, then ports should be reasonable. Basically a C# port is similar to a C/C++ port. You would have to redo the UI's but the core business logic carries over.