Tagging stuff in the Real World
Posted by Felix Geisendörfer, on Jan 08, 2006 - in Everything else
Deprecated post
The authors of this post have marked it as deprecated. This means the information displayed is most likely outdated, inaccurate, boring or a combination of all three.
Policy: We never delete deprecated posts, but they are not listed in our categories or show up in the search anymore.
Comments: You can continue to leave comments on this post, but please consult Google or our search first if you want to get an answer ; ).
So yesterday I finally decided that it was about time to clean up my desktop (the one my computer rests on) and the book shelfs + storage spaces behind me. So after about an hour and a half (yes it looked pretty messy before I started) I ended up with a good stack of loose papers, magazines, and some other stuff. The problem: A lot if this stuff was just very difficult to group. So normally I would have sorted out bills and account statments put those away in a seperate place and would have hidden the other stuff somewhere in a drawer. But it just didn't feel right because I knew it would take me forever to find this other stuff again when I would need it. So I tried something new.
My first idea was: Wouldn't it be easy to have all of that stuff in a database? I'd just give it an ID (an auto-incrementing number starting at 1) which I'd stick to it with a sticky note and then add a title, date and description for the item. So I could have all that stuff at one central place, sorted by the ID and easily to find by querying the database. Exicted about this new idea I started talking with a friend on ICQ (IM) about it. He thought it was a good idea but after a while it would get a pain to go through a stack of a thousand items looking for ID's and pulling them all out. And even more work to sort all of them back in after using them. So I came up with another idea another idea: How about another field in the database called "location"? This way I could have stuff like bills and account statments on seperate stacks, easy to find and easy to put back.
So the next logical step of course is having a second table called "tags" where I could tag all the items to order them in a meaningfull manner. So I created a table for it and a third table called tags_items which would contain the relations between those two tables. So beeing a lazy person who wants to start with the good stuff right away I used CakePHP's scaffolding functionality to create a quick interface for my database. The two Models I used looked like this:
-
// models/tags.php
-
class Tag extends AppModel
-
{
-
var $name = 'Tag';
-
-
'joinTable' => 'tags_items',
-
'foreignKey' => 'tag_id',
-
'associationForeignKey' => 'item_id',
-
'uniq' => true));
-
}
-
-
// models/item.php
-
class Item extends AppModel
-
{
-
var $name = 'Item';
-
-
'joinTable' => 'tags_items',
-
'foreignKey' => 'item_id',
-
'associationForeignKey' => 'tag_id',
-
'uniq' => true));
-
}
After beeing done with that it took me about an hour to create all items & tags for the stuff I had and to put sticky notes on them, but for the first time I felt like I've created a way of organizing my non-digital stuff in a meaningful manner. So the next couple of days I will write a little CakePHP application that will ease the mangement and search for items. I hope it will work out ; )
So what are you thinking, does this sound like a piece of overdone crab or do you think it could work? How do you go about organizing things 'non-digital'?
--Felix