Requirements for the file tagger
So I've finally grabbed enough time to work out what I think the file tagger application should look like in more detail, and thought I'd at least blog that much before going on -- as you can see, this isn't going to be an app a week yet (more like a 0.5 app-to-week ratio), and I have no doubt that Dana will think that's evidence of the superiority of the .NET platform, but you and I know he's full of it.
Here's how I envision it:
The central data structure of the application is a list of managed files. These files can actually reside anywhere in the file system; adding a file to the list or removing it has no effect on the actual file. This is essentially a database about the files. We can store the following information about each file:
- Where it is (the filename and full path)
- An optional nickname
- An optional descriptive text
- A list of tags for the file.
In GUI mode, the frame consists of a menu bar, a status bar, and a tab set; the tabs are "Cloud", and "Files". (This bit of the specification may well change after I've implemented the first draft of the program.)
The Cloud tab consists of the current display of the tag cloud; each tag is a link. The Files tab consists of a split screen; on the left is a bar specifying the tags displayed in the list on the right side. The right side is a columnar list with a subset of the information for each file (the name or nickname, at least some of the tags it belongs to, and the description. I guess.)
When I add a file to the database, a dialog needs to appear asking me for more information about it: the nickname, tags, and description. The same dialog is used to edit information about the file. I can add a file in one of two modes -- either the dialog appears immediately, or the file added is added with a provisional tag (e.g. "new-files") and I can go back and organize all the new files at once. From the command line, the second, "silent" mode is the default. From the GUI, I can specify my preference. Note that the monitor application that miechu wrote (see the Jedi forum) could invoke the file tagger in either mode, adding new files to the database automatically after, say, you download them.
Anyway, in the Cloud tab, when I click on a tag, the app opens the Files tab with a list of the files in that tag. I can then edit them, etc.
When I drag a file from the Explorer (or desktop, or whatever) into the application, it depends where I drop it. If I drop it when the Clouds tag is open, then the editor dialog opens for the file, allowing me to specify tags, unless I have specified silent adding. If I drop a file or files onto the Files tab, though, they're automatically added with all the tags currently shown on the Files tab (unless there's no filter active.) That way, when I've got a tag open, it acts just like a folder.
I should be able to drag files out of the app, too. That shouldn't be hard.
OK, what am I missing? Oh, yes -- import/export. Especially export. When I export a tag, I want to get a tab-delimited list of the files in it, say. Or the XML descriptions (optionally, either). And I also want to be able to export the entire tag cloud as a set of cross-linked HTML pages, so that each tag links to a page listing the contents of the tag. How that page should be formatted, I'm not sure -- I guess to make sense, each file should be able to link to some activity, but I'm open to suggestions as to what.
So. That's your challenge. As usual, my main block is that I have specific ideas for extensions to my usual wxPython toolset to make this sort of UI development quick and easy, but I've never had the time to finish those tools (and as we know, I never use a tool if I can make it first. If I knew how to whittle a laptop, I wouldn't even be posting this at all -- it's all I can do to resist rewriting Blogger from scratch before starting, after all.) So the process is delayed.
Incidentally, regarding my last post about deadlines -- when Sunday started, I had two very solid days of work ahead of me, but the deadline was actually Monday morning. I could live with a day's tardiness (translation customers really don't like lateness, but sometimes they just learn to live with it). But when I got into the work, I was totally in the Zone. I've been in the Zone when programming before -- when it all just flows, you instantly comprehend each problem, each snag, each bug, and every line you write works the first time. It's like a religious experience, except that afterwards you have something to show for it.
In the four years I've been translating for a living, Sunday was the first time I hit the Zone. My fingers could do no wrong; I made next to no typos and my typing rate was some unheard of number. I didn't need to look up any words (well, it helped that the source text was very well written and all about XML as used in SAP ABAP). It just flowed. I usually figure on 4000 words translation per day as a full day. My personal record for a day was, until Sunday, about 8000 words. I don't really know. But Sunday, I translated no fewer than 16,300 words. Literally four days of work -- by 2 AM I just wanted to know how far I could take it, and at 6:30 AM, against all expectations, I simply ran out of text to translate. I actually made the deadline.
All of which is a long-winded explanation (as you know, I'm incapable of any other kind) to explain why it is now Thursday and you haven't heard a peep out of me. When one does four days' work in one day, it takes time to recover. Also there were Christmas presents to wrap and still a few to obtain, packages to take to the post office to send out in time for Christmas (largely the presents for our friends in Puerto Rico, along with one package for Hungary which won't make it in time), holiday break camps to schedule with Parks & Rec for the kids, guitar strings to buy, that sort of thing. But now I'm back.
Anyway, Dana, you have your challenge -- can you write the app above in one day with .NET? (Ha, like I can write it in one day with wxPython -- I probably could, but I won't, not this week. I'm still ramping up.) Maybe you could smack me around a bit about that, since I seem to have been relatively unslappable this week.
More tomorrow or on the weekend -- I really want to spend more time with my toolset before posting an app. Specifically, I've been working for a while on a simple resource-like overlay for wxPython which will allow me to express the above UI as XML, then instantiate it as an app. Yes, I know there are such things already for .NET, as painting the screen is kind of the point of rapid app development -- and actually, there's one for wxPython, too. But I don't like it. So I'm writing my own, because by God it's open source and I can. So. More later.
5 Comments:
thanks for using my idea! i'm so psyched. merry christmas
I may have missed the point on this, but doesn't the 'summary' tab of the properties dialog of a file in windows have a 'keywords' field which could be used for this?
Even worse! Someone (with funding I might add) seems to have done this already: http://feeds.feedburner.com/~r/Techcrunch/~3/68071598/
Not as elegantly as I'm doing it, I'm sure.
Seriously: the point is not to be the first -- there are six billion people in the world, and millions of them have computers. It's increasingly unlikely I will ever be the first to do anything.
The point is to do it at all, and to do it with style. That's what I'm doing. Much more slowly than I'd intended, true -- but the holidays intervened (as they do) and I'm only now getting back in the swing.
I'll post the file tagger in another day or two.
Oh -- and the other point is not just to do it at all, but to do it in a way that it becomes trivial the next time. Then eventually you will have an idea and get it out into the noosphere within a day or two, and maybe you will be first.
But increasingly, whenever I have a really jim-dandy idea, I Google it. Very, very often someone has beat me to the punch and I can either use that, or steal all their ideas.
Click and drag to tag != elegance
Select, F6 to tag = simplicity, elegance
sounds like my personal version of elegance won't come around, since explorer extensions are "a pain in the ass"
Post a Comment
<< Home