Skip navigation.

Memel

Infinite Power Computing Theory & Practics

STICKY POST

My Twitter

Now you may use this messaging service for more close contacts with me :smile:









Happy SysAdmin Day!

To all of you somehow related to System Administration - have some bear or champagn! Have a nice day!

Не могу больше молчать

Не могу больше молчать когда в очередной раз показывают о страданиях советских людей во время Ленинградской блокады.

Так называемая "блокада" была величайшей во всей истории драмой заложников. Я давно ищу ответы на следущие вопросы:

1. Знало ли советское руководство о приближении немецких войск к Ленинграду хотя бы за неделю?
2. Почему не была проведена эвакуация населения когда немцы предоставили для этого специальный коридор?
3. Стояли ли заградотряды для предотвращения эвакуации через предоставленный коридор?
4. Почему немцы не были впущены в город? Население при этом хотя бы не умирало от голода. А стольких уничтожить, сколько умерло от голода, они не смогли бы чисто технически.
5. Существовала "дорога жизни" по Ладожскому озеру. Почему нвселение не было эвакуировано хотя бы этим путем? Это было не более опасно чем остаться на голодную смерть. Бомбежки зимой и ночью - это советский миф. В те времена это было практически невозможно.

Так почему Сталин сознательно держал людей в заложниках?

Tag-Oriented Programming (TOP)

This is quick dump of thougths, so please don't push me hard.

Object-Oriented Programming (OOP) has one main and big disadvantage. Application object hierarchy is mostly static and must be (well) developed at design time. Even though it reflects the initial problem very well, it's inflexible for future problem changes. In other words OO isn't change-oriented. In real world not many things work that way. That's why I prefer procedural or functional over OOP.

But if we add some sugar to OOP and make objects somehow not strictly connected to the program logic flow, we may overcome that OOP limitation. Let's call it TOP (Tag-Oriented Programming). I found only one mention of this term on Internet, and it was in the project called AJAXTOP. The idea is similar, but not the same. Please forgive me for using this term for my needs.

As it's known, procedural is about Verbs: i.e. doSomething(noun, noun), and OOP is about Nouns, i.e. Something.do(Noun). Now we will try to take advantage of both these camps.

Suppose we have to create an Invoice. Let's define the process (or task) of invoice creation as 'createInvoice'. In p/f (procedural/functional) world there would be a long process, consisting of 100s lines of code and a number of function calls within. Suppose we have:

function createInvoice(var, var, var, ...) {
    prepareForm(var);
    ...
    importOrder(var);
    ...
    checkWithInventory(var); 
    ...
    addClient(var);
    ...
    sumTotals(var);
    ...
    printInvoice(var);
}  


There we have 5 different actions, which may or may not be useful in other processes.

In OOP world there would be 5 objects probably created to supply inteface for these 5 actions:

class Form;
class Order;
class Inventory;
class Invoice;
class Client;


These objects may also be used for other tasks. Then the process of invoice creation could be programmed as follows:

    
    ...
    Form.prepare(var);
    ...
    Order.import(var);
    ...
    lambda = Order.checkInventory(var) {
        Inventory.parse(var);
        ...
    }();
    ...
    Client.add(var);
    ...
    Invoice.sumTotals(var);
    ...
    Invoice.print(var);
    ...


Everything is fine until it must be changed. In both cases changes must be done within the process. Could it be some way to make changes without altering the process code? Yes. Tagging.

In the world of TOP the code of createInvoice could look like follows (in pseudo-Javascript semantics):

object createInvoice(config) {
     tags: new Array();
     
     addTag: function() {....},
     removeTag: function() {....},
     replaceTag: function() {....}
     
     excecute: function(param) {....};
}

Now we add tome tags to the process:

addTag('INVOICE', 'create');
addTag('FORM', 'default');
addTag('ORDER', 'import');
addTag('INVETORY', 'checkOrder');
addTag('CLIENT', 'add');
addTag('INVOICE', 'sumTotals');
addTag('INVOICE', 'print');
....
createInvoice.execute(param);


There also can be an alternative set of tags created, for example:

addTag('INVOICEcreate');
addTag('FORMdefault');
addTag('ORDERimport');
addTag('INVETORYcheckOrder');
addTag('CLIENTadd');
addTag('INVOICEsumTotals');
addTag('INVOICEprint');


We don't mind which set of tags we use and what form of tag logic we would execute. It can be on the client-side, server-side, multiply servers/processors, OPUs (see my previous articles), etc...

Now what about Tags? It might be regular objects, regular functions or whatever regular. These may be either preprogrammed, or created on the fly. It could be even non-existing tag object at execution time, and default or testing/debugging action would be performed in such case. Tags may be freely added or changed at any time, could be read from DB, read from special tag-filesystem and so on. The execution flow order could be any: ordered in some way, semi-parallel, fully parallel.

Now, when we need to change our program logic, we just change the set of tags! However, in case we need to perform some new operation, we'll always have to create a new tag handling object/procedure. But this tag's object logic would be no more so statically connected to an existing object class and our process, as it is in regular OOP.

Tag-oriented programming looks somehow similar to the actors parallel programming model. Maybe I'm not the first coming with this. However, I see not too much speaking about this programming model in a meantime.

Я говорю по-английски почти без акцента!? (I speak clear English?!)

[RU]
Шутка? Не знаю...

Мне вчера это сказал один проезжий американец. Дословно он сказал следующее: "У тебя хороший английский и ты говоришь чисто, почти без акцента". Всё было бы ничего, если бы это сказал англичанин. Но американец!!?

Вот сейчас сижу и думаю - что бы это могло означать с точки зрения американца? У них даже в пределах одного штата акценты настолько разные...

[EN]

"You speak English very well, clearly and almost without accent". It was a note from my american fellow, when he left back home yesterday. Now I got quite into uncomfortable situation. Is it a joke?

What could that mean from american's point of view? What particular accent I don't have, assuming americans speak various accents even within one and every particular state of America!?
November 2009
M T W T F S S
October 2009December 2009
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 29
30