April 2007 Entries

DLR and IronRuby

 

Today at Mix the DLR was announced along with Silverlight. IronRuby is on the list to be one of the languages that will make the initial release under the DLR. If you're interesting in poking around with the early bits of the DLR, check the 2.0 Alpha release of IronPython. Hammett, any chance MonoRail is going to take advantage of these new features/languages?

Software Evolution

 

There has been a discussion going on the Central Iowa Java User Group discussion board recently and I think it’s worth noting. The discussion started off as a standoff between SOAP and REST. The gist was that SOAP brings too much extra “gunk” to the table and REST is all about the HTTP protocol, clean and precise. The REST folks feel that SOAP fills the gap for tool vendors (which it does) followed by a statement that went something like “…SOAP is CORBA in an XML tuxedo…” That put a smile on my face, thanks Brandon. I think both have their place, I'll leave it at that.

The topic soon took a turn where the question was raised about enterprise ready solutions. This time it was CSV and FTP and why these technologies maybe inadequate? Why are we coming up with replacements for them that may be more cumbersome? I think the answer is simply evolution. There is nothing inherently wrong with FTP or CSV, however giving a specific problem domain; they may not be an appropriate solution for various reasons. Many times our industry creates new solutions with an aim at providing more robust solutions – solving new problems in new environments, many times by building layers on top of existing technology. Obviously there are bumps along the way and over time solutions that don’t work will evolve into extinction or something that can be truly usefully within our industry. What are your thoughts on the topic?

Tailing your log file

 

In Unix we have tail -f which will allow a user to see during real-time the values that are being committed to a log file. I tend to use log4net as my logging utility, however I can't always use a console appender to view your log in real-time. On Windows, a good replacement is called Tail for Win32 which allows you to do the same thing, and also colorize the output based on keywords. A nice little tool.

Vim Commands

 

The other day I mentioned there are a ton of keyboard commands within Vim. This can initially make usage difficult if you're not familiar with the bindings. I've put together a simple sheet of basic commands you can find here. If you know of a good command that you think belongs on this sheet let me know and I will add it.

Choosing a Text Editor

 

By and large I live in Visual Studio day in and day out. I picked up a copy of the Pragmatic Programmer back in 2000 and I continue to re-read it every so often, it’s a treasure trove of great information, I highly recommend it if you haven’t read through it before. One of the points Dave Thomas and Andy Hunt make in the book is to pick a text editor and know it well. The goal here is being proficient and learning the keyboard binding that your text editor provides can further improve your daily efficiency. Think how often any given day you are reading through code in one form or another. Notepad is not an acceptable option here, period.

Jeremy Miller and Jean-Paul Boodhoo have discussed switching from mouse driven work to the keyboard in attempt to gain efficiencies. Using the mouse simply slows you up.

Over the years I have looked at a lot of different editors, trying to weigh out their various features they provide, for a long time I was a fan of SciTe. However, time and time again I keep finding my way back to Vim (Vi Improved). Vim and the GVim (graphical) counterpart provide a tremendous amount of keyboard bindings; in fact, there is even a separate command mode for specific keyboard shortcuts (a lot of keyboard shortcuts too!). By keeping my hands on the keyboard I’m not wasting short cycles of time moving back and forth from the keyboard and mouse every so often. I remember using Vi back in college, and I never got comfortable with Emacs – entirely a personal preference although this has been a heated debate for several decades. I said earlier that Notepad is not an acceptable tool, as an example Vim and GVim will provide a type of intellisense through a simple <Ctrl> N keystroke. In fact, Bram Moolenaar, the author behind Vim has created a video titled 7 Habits For Effective Text Editing 2.0.

So now I can edit various files with this powerful text editor, but of course what about my IDE, which is what I said I spend most of my time in throughout the day. What about my email, the time I spend in Word, or SQL Server, this of course is normally where a breakdown occurs, in a sense. We tend to learn new keyboard bindings to do different things in different applications. Enter NGEDIT Software; they have produced Vim emulation within Visual Studio, Outlook, Word, and SQL Server Management Studio. Now my keyboard binding can be the same across the majority of applications I am in! If you have a Gmail account, you will note that Google provides the standard keyboard navigation through the use of the j and k keystrokes, which is rooted in Vim. Vim uses the / key to begin a search within an open document, Firefox supports this as well. The more consistent I keep my keyboard environment across the applications I use the faster I am. What editor do you use? Here is a nice Vim cheat sheet if you're looking for a new text editor to try.

April Fools

 

Nice one Google.