The Limber Lambda

Binary or not?

Posted in Administration by Eric Smith on August 10, 2008

Recently after listening to an episode of Hanselminutes it occurred to me that a measure of whether or not you’re a Unix geek is how often you see this kind of thing:

In short, if you don’t see it at all or have never noticed strange characters at the start of your text file, you’re likely to reply “to hear the sea?” to the question “what’s your favourite shell?”.  In that case, do yourself a favour, go under the bonnet a little and learn about byte order marks (it’s all about enrichment).

Further, if it interests you enough, you may find yourself checking out the hex equivalent of your text file–how you go about that is very telling.  Hanselman belied his roots by doing this:

debug Foo.txt (and then enter ‘d’)

On the other hand, having a rather more unixy background, I would do the following:

xxd Foo.txt

To be honest, debug wouldn’t have occurred to me – if I had not had cygwin installed, I would probably have ended up downloading a (free/share-ware) editor that provides such a feature.

One less visual annoyance

Posted in Administration by Eric Smith on August 7, 2008

My take on this issue may not apply to everyone, but everytime some little app decides to contribute to the “system tray balloon tooltip” party I feel obliged to click on the damn thing just to get rid of it.  In a world where there is way too much clicking to start with, I’d rather not care.

Here’s how to suppress balloon tooltips:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"EnableBalloonTips"=dword:00000000

You may ask: “Will a dword:00000001 get them to come back again?”.  I tried–doesn’t seem to work.  Evidently the presence of the entry suppresses them.  Go figure.

To/Not to Design for Test

Posted in Development, Methodology by Eric Smith on August 6, 2008

Recently someone raised what appears to be a contentious issue, that is, is it acceptable to “design for test”.  Personally, initially a proponent of the “don’t-prop-your-code-up-for-the-sake-of-tests” department, I am becoming more inclined to agree with the author of said posting.  Being able to completely isolate an object for the purposes of testing is a beautiful thing, but sadly it sometimes requires a whole lot of P.T. in the form of dependency injection frameworks and the like–we’re currently feeling this pain on a big project we’re working on.

Tagged with: ,

One for the hidden gems department

Posted in Development, visual studio by Eric Smith on July 29, 2008
Code Margin

Microsoft does it again by including something really useful in their editor but neglecting to let anyone know about it.  For those of you who miss the 80-column (or n-column as the case may be) text width guide from the old Borland editors, just apply the following registry change for the same in VS 2005:

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor]
"Guides"="RGB(192,192,192) 80"

As can be seen, the colour of the guide can be specified, as well as the number of characters at which it should appear.  Digging a little deeper, doing the following will also work; rendering multiple guides:

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor]
"Guides"="RGB(192,192,192) 80 120"

My favourite IDE

Posted in visual studio by Eric Smith on January 17, 2008

Understand, the title is tongue-in-cheek. Visual Studio 2005 is great, but it can also be fairly frustrating. I’m referring, in this case, to a rather annoying piece of behaviour with regards to how the Solution Explorer initially presents projects. Projects are expanded by default, showing all constituent files, and naturally, if your solution contains alot of projects, each with many files, a nice, succinct overview is something you have to work hard for by explicitly (mouse-work) collapsing project nodes. Guess what? There is no way to configure this–at least not using a built-in facility. And there’s no keyboard shortcut or menu item to “collapse all” either.

The good news is … someone has written a macro for this. It seems to be heavily plagiarised but isn’t rocket science–still I’d rather copy-and-paste VB Script with my eyes closed than actually care about the aesthetics.

Tagged with:
Follow

Get every new post delivered to your Inbox.