Sergio and the sigil

Uncle Bob shows FitNesse and Slim

Posted by Sergio on 2009-03-28
UPDATE: Steve has published the video of the presentation.

There are still a few seats left for the next Chicago ALT.NET meeting. The meeting is on April 8th and we will have a demonstration of FitNesse by Robert Martin.

FitNesse is used by many people for acceptance testing and many in our group wanted to understand it better. So come and see what this is all about.

Collaborative Acceptance Testing with FitNesse

6:00 pm
Pizza and networking time

6:30 pm

Robert Martin is back, this time to talk about FitNesse, an Acceptance Testing turned into Wiki framework built on top of Fit.

Who else would you want to see talking about FitNesse? Uncle Bob, was one of its creators and is its maintainer. In this session he will explain what Acceptance Testing, Fit and FitNesse are, why they are useful and how to best use FitNesse in your process.

He'll also show off Slim, the new test-system that supersedes Fit and enables a whole hose of new features and capabilities.

Robert C. Martin has been a software professional since 1970. In the last 35 years, he has worked in various capacities on literally hundreds of software projects. He has authored "landmark" books on Agile Programming, Extreme Programming, UML, Object-Oriented Programming, and C++ Programming. He has published dozens of articles in various trade journals. Today, He is one of the software industry's leading authorities on Agile software development and is a regular speaker at international conferences and trade shows. He is a former editor of the C++ Report and currently writes a monthly Craftsman column for Software Development magazine.

Mr. Martin is the founder, CEO, and president of Object Mentor Incorporated. Object Mentor is a sister company to Object Mentor International. Like OMI, Object Mentor is comprised of highly experienced software professionals who provide process improvement consulting, object-oriented software design consulting , training, and development services to major corporations around the world.

7:45 pm

Time for our monthly open discussion. Aside from any specific topic that anyone wants to bring to the group, we can continue the discussion on Acceptance Testing and report the progress on the effort to produce the Chicago Code Camp.

Easy project administration with Unfuddle

Posted by Sergio on 2009-03-08

I don't come out often to sing praises for any product, I'd say I even tend to complain more than anything. That said, sometimes I come across a product that strikes all the right chords.

Recently I started using Unfuddle and ...just Wow! What a delightful experience. I can't say I was exactly surprised because I had heard really good things about it from a few people. Still, it's great to try it and confirm that same impression.

Unfuddle is clearly a product that was built with a lot of love and by people that understand the problem that needs to be solved.

Migrating a project - the Repository

I started moving one of my projects to Unfuddle. I started creating a new project and, with help from their support team, I moved my SVN repository (with the complete log history) into the project's repository.

The repository browser offers all you'd expect from a 1st class product. You can easily navigate the repository tree and go back an forth in the revisions trail. You can see what was changed in each commit, see the file by file diffs, and post notifications whenever a commit happens (great way to trigger your CI process.)

Managing the project

Right now I'm in the process of moving the list of bugs and planned features into the ticketing system. In Unfuddle I can plan milestones and version numbers for my project and associated tickets to them, which will let me see how far the project is from each milestone right in the project's dashboard.

Unfuddle reminds me of Trac, with the important difference that I don't need to go through the pain of getting it up an running and that configuring your project (or as many projects as you want) is much simpler.

One important thing for me in any product like this is the ability to create and maintain documents. This is provided through the Notebooks feature, which allows us to create collections of pages with basic formatting. If you need something much richer, like a diagram, or include an existing Word document, you can attach files to a notebook. A real file repository is probably a feature that could make Unfuddle even better.

Other nice things

I love how Unfuddle allows us to use Markdown or Textile to format pretty much everything that is important, like ticket descriptions and notebook text.

Unfuddle also supports git. I haven't been using git yet, but it's good to know that I'll probably not need to go looking for another service if I choose to migrate to git.

Very important disclaimer

Although I could probably get by with just the free plan in Unfuddle, I received a complimentary subscription to their Compact plan. The only important differences for my use cases would be the number of notebook pages and the ability to attach files.

Resharper an OutOfMemory Exceptions

Posted by Sergio on 2009-02-03

My current project has an interesting story of being converted across platforms and programming languages. I hope I can talk about this conversion process some day (it was not manual).

One of the side effects of mass conversions like this is that the final result tends to carry over some weird patterns. These patterns used to make total sense in the previous programming language, but look very unnatural in the new one.

We ended up with some very large classes inside a single namespace that, while work exactly as in the previous language, cause an unusual amount of stress inside Visual Studio, especially with Resharper (version 4.1) installed. Resharper would halt with OutOfMemory exceptions all the time, until I disabled Code Analysis, arguably one of the most important features of that product.

Finally today a coworker pointed me to a fix for that. I'm still getting the exceptions if I turn on solution-wide error analysis, but I think I can live without that.

I haven't had a chance to try the nightly builds of Resharper 4.5. I have been told that those issues may go away.

UPDATE: I installed version 4.5 (build 1169.15) but it didn't help me. The only thing that changed was the layout of the error screen :) But I know my project is a tad extreme and I deserve to be punished for it.

One less diacritical mark to annoy me

Posted by Sergio on 2008-12-26

Being a Portuguese-speaking person living in the US, one of the things you have to get used to is the keyboard physical layout and key mappings. You know, Latin-originated languages tend to have thôse wéìrd chãraçtërs, which are really just diacritical marks applied to regular characters to differentiate words (sometimes it changes the pronunciation, sometimes i doesn't.)

To accommodate the extra characters, many countries define their own standard for physical keyboard layout. In Brazil the standards body is called ABNT and they came up with the layout that you can see below. It's a mild variation from the one used in the US and works well if you type in Portuguese most of the time.

Even when I was living in Brazil, when I started using computers at home and at work, it was easier to find a keyboard with a US layout than one with the ABNT layout (this situation has changed now.) I chose to stick to a keyboard with the US physical layout and, when in Windows — which was most of the time anyway — apply the US-International key mappings.

What happens when you use the US-International it that some keys become dead keys and when you strike them no characters are echoed. The OS waits for the next key(s) to decide what to print. For example, if I type [ " ][ a ][ b ][ c ] without the US-International mapping, I get (unsurprisingly) "abc. With US-International on I get äbc. I'd have to type [ " ][space][ a ][ b ][ c ] to get the intended text. Other dead keys are [ ' ],[ ` ],[ ^ ],[ ~ ].

Of all these dead keys, the ones that hit me the hardest are [ " ] and [ ' ] because I use them all the time when writing source code.

Where am I going with all this?

As of January 1st 2009 all Portuguese-speaking countries will start complying with an agreement that will cause some orthographic changes in the language. One of the new rules is that the umlaut (those two dots above some letters) is being dropped from the language.

I'm so happy with this decision that I simply could not wait until the US-International key mapping gets updated in some Windows update super Tuesday. I decided to take matters on my own hands and yank that nasty thing off my system.

How to create/edit keyboard layouts (mappings)

Microsoft published a cool little tool called Keyboard Layout Creator that allows you to create or edit the keyboard layouts.

It doesn't get much simpler than that. I installed and run this program. Then I loaded the existing US-International layout and saved it as US-International-No-Umlaut. Mousing over the ["] key would reveal that it indeed is marked as dead and show all the available combinations.

From there I just needed to right-click that key and un-check the option that was setting it as a dead key.

The next step is to compile the new layout into a DLL and create the setup package for it. That is done by the menu option Project > Build DLL and Setup Project.

After running the produced setup program, I could just go into the regional settings of my system and select the new layout (mapping) as my default setting.

If you are another Portuguese-speaking programmer and don't feel like going through the same steps, you can just download the setup files I created.

Now I just need to get rid of that muscle memory that I acquired after all these years.

Presentation Remote

Posted by Sergio on 2008-12-20

In the last few months I have been using my MacBook to give presentation, both at work and not. I've been meaning to buy one of those presenter remotes. I even got to borrow one and tried it once and I must say it worked pretty well.

Then I remembered that the MacBook came with that useless remote that I had forgotten in a junk drawer somewhere. Well, that remote happens to work well with more than just Front Row. I heard it works with Keynote for presentations. I don't use that application and I'm not planning to buy it since Powerpoint 2007 works very well for me on my PC and I'm too cheap to buy Keynote.

I typically save my PowerPoint presentations to PDF and show them on the mac using Preview (a simple PDF viewer). The remote does not work with Preview out of the box but I found this little freeware called iRed Lite that can make the apple remote control just about any application, as long as the application is controllable with AppleScript, which most apps are.

The only problem was that iRed Lite came with support for Preview but it did not work well for the full screen mode, which I needed. Time to get my hands dirty with AppleScript.

The idea here was to bind the commands associated with the left and right arrows of the remote to the keys PageUp and PageDown, respectively.

The iRed Lite utility allows you to edit each command by assigning a keystroke or an AppleScript snippet. Initially I tried the keystroke alternative but I could not figure out how to send a PageDown or PageUp to the application because on the keyboard they are Fn+UP and Fn+DOWN and Fn was not available in the utility. The AppleScript ended up being rather minimal, as seen in the screenshot.

For the Next Page command I entered:

tell application "System Events" to key code 121

For the Previous Page command I entered:

tell application "System Events" to key code 116

You can find all these key codes in the file /System/Library/Frameworks/Carbon.framework/Frameworks/ HIToolbox.framework/Headers/Events.h provided you installed the developer tools from the OS X installation DVD, i.e. you have Xcode installed.

Wow. All this trouble to save $50? I guess I just liked the fact that I found a use for that remote. Now I just need to hack a laser diode inside the remote to use as a pointer too.