|
Sun Mon Tue Wed Thu Fri Sat
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28
|
A few days ago, one of Microsofts spokes man said that Linux would disappear within a year. He appearently, forgot that Microsoft just moved their DNS servers to a provider running Linux servers, because they are more relyable and cannot be hacked.
However, most of the time, you want to save your changes. A much better mode of working would be the undo&redo mode, which simply means that everything you do is immmediately saved, but it is possible to undo changes as long as your window is open. In this mode of working, an explicite save action is not required. And there is thus no need to have a "Do you want to save" question, when you close a window.
In the absence of a "save" button, changes made to a document of any kind, should be published immediately to other parts of the system. Application in this sense, should be considered as clients of a persistency server, which upon changes made by one client should inform all other clients. Of course, it would be very time consuming for the clients to immediately respond to all published changes. The concept of focus should determine when clients have to update their view. The window that has the focus is leading. The client tide to the window with the focus should have the highest priority. The clients should be given time to update their views in the order that they received focus for the last time. The effect of this is that the whenever the user does not touch the input devices for a few seconds, all of the views will be updated.
Making such a user centered undo&redo interface, would require a completely different Operating system design.
(more on software engineering ideas)
While looking around in some bookshops in the city, Annabel rolled some snow into a big ball of snow. We made a snowman out of it. When we came home, I noticed that all the snow from the grass field in our backyard has disappeared. I remembered that in the morning some boys had rang the doorbell to ask if they could take it. Li-Xia had said yes, but a little later, I had told them no. I wonder if you can press charges for someone stealing snow from your backyard. Can you?
For some reason, this zipping procedure does not work, and today, I found out why it will never work. When I drive from Enschede where I live to Almelo where I work, just before Almelo the highway ends, and two lanes merge into one. But nevertheless the zipping signs, whenever there is a traffic jam, most of the cars will be on the right lane, with a few cars driving on the left lane, which zip right after the second pair of signs, apparently interpreting the rules that you should drive as fast as possible till the second pair of signs and then zipping thereby passing by all cars in the right line. I decided to stay in the left lane, and adjust my speed to the cars in the right lane just around the first pairs of signs, which actually ment driving at walking speed. Soon I discovered that some people behind me had some trouble with my strict interpretation of the rules. Just before the second pair of signs the car right behind me went to the right lane filling up a gap that was left open by a very slowly driving truck. At first I was relieved about him doing this, but than right after the signs, he started driving at the far left side of the right lane, indicating that he didn't want to make room for me to zip. Because, I had moved to the right side of the left lane, the person driving behind me had taken the opportunity to take me over on the right side while using his horn, and leaving me as less as possible space. I felt squized between the two cars on both sides not giving me any room at all. All I could do was break, and let some more cars pass on both sides.
I do not know what would have happened if I had crashed into one of the two cars. Remembering who some people had been shot on the highway in recent years, I concluded that I was a fool with me trying to keep the rules, and that the next time, I should move to the right lane, whenever there are cars behind me that like to take over. Then, I realized that the in the right lane are all people that want to polite, while in the left lane are the people that are impudent. Whenever a traffic jam starts, the people who are afraid to be considered as impudent when they take over others, move to the right lane. As a result of this, the right lane gets full, starts to drive slower, and the queue starts to grow. People approaching the traffic jam while driving on the left lane have the choice to join the long queue in the right lane, or to continue on the right lane. Often because the difference of speed and the traffic behind them, they decided to stay in the right lane, and anyway they are in a hurry. All the cars taking over, only make the right lane going slower. And some feel that because of the "zipping" they should indeed continue till the end before they zip, but they forget about adjusting their speed to the right lane. Anyway, at the end of the left lane, you always find the most impudent and aggressive drivers.
I showed Li-Xia the
chinese text
of the Tao De Ching by Lao Tze. She did not recognize it as such,
but did see that it was a very old Chinese text. She explained that
the words in it are not used nowadays like they are in this text.
She could not give me a translation, but when I showed her a
english translation
she said that it could indeed be translated like this. She explained
that because of the Cultural Revolution she never has read any of
the classical chinese text. I also begin to understand that there
are many translations of the Tao De Ching. I wonder, if there
are any word-for-word translations from Chinese to English.
Because Chinese as a relatively few words, many words have a
very rich meaning, and even the most simple words can thus get
a different meaning when used in a certain context. In this
respect Chinese poetry is much more a playing with concepts than
English poetry, I would expect.
I felt that there was no way left over than to try to convert the files without using Quark Xpress. I searched for conversion programs and descriptions of the Quark Express file format. But again, my search did not result in anything. The only option left, was to reverse engineer the file format myself, and that is what I started to do tonight.
I already had looked at the contents (using bfc.c), a tool which I in the past also had used to reverse engineer the AutoCAD DWG R12 format. From this I already had seen that texts started at 256 byte boundaries. The first program I wrote, was a program which simply dumped the first 30 bytes of each 256 byte block. Studying the output of this, I noticed that the blocks with text were alternated by blocks with binary data. I also noted that the blocks with text did not have a marker (a zero byte, or such) to indicate the end of the text, but instead there was all kind of unreadable stuff at the end. My hypothesis was that the binary blocks would contain some information about the length of the text. I started to look if there was some kind of indication of this, or that there was a way the blocks were refering to this. I noticed that the binary block contained numbers which were just two higher than the number of the block if you counted them from zero. First, I though this was pointing to the next binary block, but it was obvious that this was wrong. Then I noticed that the blocks preceding several blocks of text, had consequentive numbers in it. The hypothesis that these were the numbers of the block containing text, when the blocks were numbered starting from one, appeared to be correct. Then, I also noticed, that these numbers were followed by two bytes, which appeared to contain the number of characters in the refering text block. So that problem was also solved. Furthermore, I discovered that the sequence with numbers was preseded by a number which was equal to six times the number of following text lines. Apparently, this was the number of bytes used to specify the blocks containing the text, and the amouth of text they contained. When I modified the program to read the data like this, it did run correctly, but not through the whole file. Somewhere, there appeared to by a block with binary data that did not match what I had found so far.
I decided to analyse the binary block of data preceding the text blocks in greater detail. I then discovered that the sequence of numbers was followed by a number again, which was a multiple of six again. I also recognized a repeating pattern in the bytes following. It looked like this number specified another block of data. Analyzing this further, I discovered that this pattern was repeated at least once more. My first impression was that this might be information about paragraph and character formating. But, then it was time to go to bed.
Then, I looked at the place where the alternating of binary and text blocks seemed to be broken, and I discovered that there was more than 256 bytes if of formating information. Now it was quite obvious what this extra block of binary data must contain: the rest of the formating information. But, because of the formatting information following the text, it is no longer possible to write a single pass parsing algorithm. The solution to this is simple: just read the whole file into an array of bytes, and parse the info from there, just as I did for my previous reverse engineering job that of figuring out the MS Word 5.0 file format.
It works in the following way. The last four bytes of a block with binary data points to the next block. If the number is negative then the first two bytes of the next block, tell how many blocks are considered as one block. No bytes are skipped at the end of a binary block. That means that a four byte long value can be split over two binary blocks. It also appeared that the text is stored in the order in which it appears in the document. So, it looks like I do not have to figure out the position of all the blocks.
Because the start of the text is hard coded in the program, I think it will not work with just any file.
This morning there was a layer of 5.5 cm (a little more than two inches) of powder snow on the car. On the ground it was only a very thin layer, not even covering the ground. We have had a blue sky the whole day, so most of the snow disappeared before the end of the day. I wonder if it will start snowing again, as they had predicted.
Actually, I am not so happy with the snow. I washed my car two weeks ago. Now there is salt on it again.