2009/09/29

Notepad++ a great quick editor for Windows

I've been looking for a free (as a beer) good text editor for Windows, specially for quick editing or viewing a file while navigating. Notepad is "free", but too simple (I know Notepad is not free, but once you have Windows installed you don't have to pay for it separately) and there are really wonderful text editors like UltraEdit but they're not free. JEdit is very powerful and free, and with all the plugins you can download for it you can have almost all the functionality you need, but its startup is a bit slow (at least with the minimal set of plugins that I use); if I must work with an ant file for some hours it pays off, but if I'm only navigating through a directory and making very small and fast modifications to a file, it is too much for me.

Searching through the Internet I found this super text editor called Notepad++. It is open source (GPL), it is blazingly fast and it has a great set of features, from which I would emphasize:
  • Syntax highlighting and syntax folding (syntax highlighting can also be user defined)
  • Autocompletion
  • Multidocument and multiview
  • Powerful search/replace, including regular expression search
  • Full drag and drop
  • Bookmarks
  • Macros (you can record sequences and play them back)
I've been using it for some weeks and I can say it rocks! It's my current Windows quick editor. It can even update quite frequently the view of a log file, not as smoothly as the Unix command "tail -f", but enough for my needs.

It is not such a discovery, though. Once I installed it I saw with surprise that some of my colleagues had been working with it for some time. So if you haven't heard about it and you need a quick editor for Windows, take a look at it!


2009/03/17

Dokan: Filesystem in userspace (FUSE) for Windows

As Wikipedia explains, a filesystem is a method for storing and organizing computer files and the data they contain to make it easy to find and access them.

There are many different filesystems, like ext3 (Linux) or NTFS (Windows), only to name a few. These filesystems allow the usual and necessary file operations we do every day: creating, copying, moving or deleting files or directories, listing directories or showing the content of files. We usually do these operations with "real" files and directories of a hard disk or a USB device, but nothing prevents us from doing them on other kind of systems which have not been prepared from the beginning to be used as filesystems in an operating system. An example of this system would be an FTP server. It clearly organizes like a filesystem, with directories, files, attributes of files and so on. So it would be possible to access an FTP server like a hard disk using your favourite file explorer if you were able to mount a "virtual" filesystem which connects automagically to the FTP server and lists the root files and directories when you go to the root of the filesystem, it deletes a file in the FTP server when you delete it in the filesystem and so on.

In fact, this is not new at all. In Linux, there exist currently many different "virtual" filesystems you can mount to ease the access of different types of resources, be them local or remote. What is more, Linux has a package called FUSE (Filesystem in Userspace), which allows mounting your own filesystem without having to make a device driver and compile it. FUSE is based on callback functions you have to implement that will be called when the different operations are invoked from the operating system. There exist a lot of language bindings for FUSE, so you can write your filesystem in Java, C#, Haskell, TCL, Python and many more (besides C or C++, which would be the expected languages for such a low level based feature). With FUSE, writing your own filesystem for Linux can be a much easier task.

But what about Windows ? A Windows port of FUSE has not existed for a long time and, from what I know, nothing similar was available as open source. But on May 2008 a project called Dokan was released as open source (LGPL). This project is the equivalent of FUSE for the Windows platform. You can download it from here. It has bindings for Ruby and .NET. In Yukoba's blog you can find very interesting contributions that enhance this project, like a Java binding (JDokan), MemoryFS (a filesystem on memory) or JSFlickerFS (a filesystem for managing Flicker albums, written in Javascript).

So if you need to write your own virtual filesystem in Windows, you have no excuse...give Dokan a try!