terça-feira, 21 de setembro de 2004

Realization...

When you read that Apple is hiring a "USB Firmware Engineer", you know you aren't on the right job.

quinta-feira, 16 de setembro de 2004

Giving quake a second chance

That's right! I am digging up quake 1 source code. Why? Because I can't make it work out of the box with my new X, kernel, gnome, etc.


I am insane.

Google Labs is hiring...

And they sure know how to select its personel! They set some math puzzles to solve on a ad in London. I spent 40 min on it and got it to work... that was sweet. Later, I'll tell more about this.

Oooh the joy!

Day of the Tentacle and Sam & Max on my Zaurus! I love you ScummVM!!

quarta-feira, 15 de setembro de 2004

Mood: understood

Finally my guilt has been thrown out of the window: I am a procrastinator, and I am damn proud of it! What made me admit it publicly? This article, Structured Procrastination, made me realize that my lack of concentration, my dismotivation of doing some important stuff (like actually to do my MSc. Thesis) is not bad!

Some crazy thoughts...

At work, I usually deal with an IDE for Java (Eclipse in my case) and some office tools (OpenOffice or Microsoft Office running on CrossOver) all the time. With both sets of software I create and refactor artifacts for the company I work.


These kinds of applications suffer from a common problem: its user (me). I am full of bugs and I do make mistakes (thanks God!).

Both sets presents me with some undo-redo use cases. However, that doesn't prevent the fact of screwing a week's worth of work my deleting some random file.


For this problem, misuses of "rm -f" command, there exists Version Control Systems (VCS) as in CVS, Subversion, BitKeeper, ClearCase, VSS, etc. For my needs of dealing with ASCII files such as source code, texts and scripts, the present VCS options rock!


But what about those more complex, binary (some even proprietary) file types? Dealing with hard drive bloat on CVS repositories with huge .jar files are some of my deepest concerns as a not so expert CVS sysadmin.


With this I come to the question: if most productivity applications have undo-redo functionalities, what keeps them from implementing diff and patch? Isn't that the true mean of the Memento Design Pattern?


Ok, ok! That's not so simple... as my Operation Research teacher used to say: "that's what separates mathematical and engineering thoughts". He used to tell us a joke: a Mathematician and an Engineer were asked to do a simple task - boil some water. Both picked up the kettle, filled with water, turned on the stove and waited for it to boil. Then, they were asked to repeat the task after some time. The Engineer took the warm kettle, turned on the stove again and put it on. The Mathematician simply said: "Ha! That's trivial! Simply throw way the water and repeat the previous stated algorithm."


To use Memento directly to solve this design problem would require the application to hold in memory every state of the objects that the user interacted with to flush only with a save operation. I am remembering Eclipse right now...


But I think that there must be a way of achieving this. Let's start by enumerating some basic use cases.


First, the application should register some kind of service in the VCS that should be able to do the diff, patch. It should also present in its UI a merge helper.


Maybe the solution is to simply not have a "save" operation. Just "checkpoint" or "flush". It should keep in memory the last n object states modified by the user in a queue. When the n+1 object state is added, the oldest one should be flushed to the VCS. Think of this as a light commit.


This would work ok with the current CVS implementation if a text editor handled this. But I think VCS would make some ground breaking things if it was dealt in the file system level and the application diff/patch service be assigned to the OS

Imagine mounting CVS as a fs! This would make some Nautilus screenshot really worth viewing!


Yes, this is a crazy thought.

Ah... the feeling...

... of reading a 1 year old code and realizing you got way smarter. I sucked!