Thursday, 4 November 2010
Take 2 Cygwin a day and call me in the morning
For developers who have never ventured out of their Windows environments and in to the world of UNIX based operating systems (like Linux and Mac OSX), the command line is an often under-utilised tool.
This is quite understandable in the case of the Windows command line that lets you relive your early DOS days. With all the lack of power of DOS, the command line was long ago abandoned for many mouse clicks and maybe once in a while a RUN command that is copied straight off the Internet and into the START->RUN control.
For the uninitiated, who have never dropped back to a command line or shell or who never even started there like us oldies, the commands look like line noise. Amusingly enough, those who were not Bourne from a shell probably do not even know what line noise is. Ahh, the days of whistling along to our high speed 9600 baud modems are long and lost along with bulletin boards and green on black screens. Those days are lost because the world has progressed to the point that you need not listen to the squealing down the phone line or force your eyes to work in a Matrix like world.
The good things haven't gone. The powerful languages that let their engineers create low level code like C and C++ are still around. Even if more and more amazing higher level languages appear, there will always be a place for the land of hardcore programming. They are needed. They are powerful tools. Weapons even. When wielded by good software engineers, great things happen. Of course, you do need the high level languages because who really wants to spend all their time perfecting memory management and automation of the reinvention of the wheel.
The other thing that will never leave us is UNIX land. The beauty and capacity of the UNIX tools will never become obsolete. They have been ported to every new environment to follow UNIX and implemented as APIs wherever possible. To live without these tools is for some developers, like cutting off a limb at the neck. It's a horrid disabled world.
Windows is one of these worlds that lacks the default access to UNIX tools. The DOS command line is not a poor substitute because it's not even in the same league. It's like comparing Java as a programming language to pig latin. It's simply a silly and meaningless comparison.
For those of us (usually .NET devs) who must play in an exclusively Windows world, we have a few ways around it. We either have a non-Windows machine at hand or we use Cygwin. Cygwin is a library that provides POSIX functionality in the Windows environment. You install it on any Windows machine (an install that takes at least four coffees) and it gives a UNIX like environment for Windows. The Cygwin commands look like UNIX commands but are actually wrapping Windows system calls that do a similar thing or have been extended to do so.
There are of course limitations to the scope of Cygwin that are based in the fundamental differences between the Windows and UNIX based operating systems. Pretty much, the foundations aren't the same so only so much can be faked. Often that much is enough to provide a developer with these much needed tools.
Now Cygwin on it's own is a nice little tool and a lovely idea but the serenity comes from all the tools that are built on this basic foundation. There are shells that let you believe you could be using bash; text tools like grep; and much more.
The zealots will kick me and say this is a poor replacement in a bad environment. I tend to agree but it's the best thing out there for us .NET devs. How any developer can live without it, is beyond my understanding.
You'll find Cygwin here.
Apple started a user experience trend many iOSes ago when it accepted Settings changes and did not ask for confirmation. Once the chang...
Recently I was asked to disable the submit event being triggered when the enter key is hit in a textbox input. This is for an ASP.NET MVC a...
Five years ago, everybody seemed to want to have the word "architect" in their title. Firstly, they all needed a title and having...
Photo by aeter used under the flickr creative commons license I was recently asked by one of my colleagues at ThoughtWorks, who my female ...