Filesystem for tags

Posted by thevaw

Some time ago talking about spotlight and google desktop one of my bosses told me that there should be something implemented in linux as a filesystem to find files. We concluded that directories served us well, but now are lacking flexibility as the data grows (number and type). After that not much discussion about that theme was made and I almost forgot it. Two weeks ago I’ve found FuseFS in rubyforge so I wanted to give it a try. Thinking about what to implement as a simple test I came out with the idea of reating that filesystem I were talking with my boss. You can download it here. You must be warned that it is completelly unusable and the code is messy as hell, but perhaps you want to play with it.

It consists in a database that holds file names (and also its path), a command line that adds files and tags to each file and the filesystem where you can search for files. There you have directories that are tag names. If you enter one of this directories you can see files with that tag and other directories (also tags), so if you go deeper in this tags/directories you’ll see files that have all the tags of the path you are in (for example, in /document/work/important/ you’ll see files that have tags document, work and important). To add tags to files you have a command called tfs where you specify a file and a list of tags to add or remove preceding the with + and – (for example tfs somefile +document +work -important). This is the only thing it does. You can not retrieve the files from there and should be lots of bugs, so I said it is completelly unusable.

To make this beast work you’ll need FuseFS, rubygems and sqlite libraries installed with rubygems. You can contact me at jfontanATzoolooDOTorg if you want any other information. I don’t think I’m going to continue this project as I am so busy with others right now but if I see people interested in it I can perhaps take the project again.

Coding editor

Posted by thevaw

Being an amateur programmer makes choosing the editor of choice a very important decision. I’ve been using lots of editors to do my stuff. At first I made in line code in Spectrum Basic and later on using gwbasic, that came with MSDOS. But this was not really editing, just throwing lines hoping that the interpreter did not complain too much.

When I moved to compiled code I first started with PE2 at clipper summer classes I took one year (I don’t know why the hell I took clipper classes at the age of 14). I could not say much about it other that it was the first real editor I tried, it resembled vim a bit. After this I started learning pascal using Turbo/Borland Pascal 6. I really liked the editor, that where the first key strokes I learnt and I used through all my DOS life. My other editor was Dos Navigator embedded editor that had the same key bindings as Borland editors.

Entering in linux world was a bit disappointing as the first time I started it I had only vi to edit files. I couldn’t even find how to exit the editor in a standard way, only killing it! I started to hate vi and clones. I found joe and used along with jed in linux until I started my first (and only) job.

In 98/99 I switched from DOS to Windows and programmed using Visual C++ so my editor of choice in Windows was Visual Studio. I also installed a plugin for it called Visual Assist. It was a joy back then to have that powerful class browser and code completion.

I was living so happy with the tools I was using until I started to work. At job I work as Unix technician so the first thing I made was compiling joe in every computer I had to work with (scripting, editing configuration files and sometimes bug hunting in others code). But after some months I had to work in more machines and some of them had some exotic versions of unix. There was the time when I decide to start learning vi as it was installed in every machine, my work colleages where also happily using vi so this also pushed me to use it. At first it was more a pain than anything else but as I started learning tricks from my work colleages and my experience with it grew I became a happy vim user. I could change things with a few keystrokes, find using regular expressions and even had automatic macros of the last editing command. I also began to use vim in Windows as most of my mistakes in Visual C++ where the text ”:w” at the end of some lines :)

Now I use vim in every platform I touch for code and configuration editing purposes. But I also feel the need of an IDE where to manage the entire project, compile and perhaps debug from it. Recently I brought an iBook and tried TextMate, that impressed me a lot after seeing the rails demo video. I really like it but I do not feel as good with it as with vim. Perhaps is that I do not have the same experience with TextMate and I’m not used to its key bindings but I came back to vim again. I’ve just tried gvim for MacOSX and I am do delighted with its features (like code folding, auto completion and such things). gvim was found after reading this Jamis Buck blog post. I will also try some editors/IDEs commented there but I do not want to sacrifice editing smoothness I have with vim for a fill featured IDE solution. I’ll try to find a way to use vim and also manage my projects but I think I will fall back to shell as project manager and launching vim for each file I want to edit.