Currently playing with some sample programs that I
downloaded from this site. I must
say these programs are very good for making kernels.
11:57 AM
Speculation
One thing I noticed with COM's IUnknown is the
QueryInterface member function. COM specification details
say interfaces totally decouple objects from each other,
objects pass information by means of wires connected to
each other. But, I think COM has made a mistake when it
used refids to query an interface, this method resulted to
an effect that made clients know who its objects are. Same
problem again: a web of inseparable objects.
12:45 AM
Have been playing Atheos' libgui and so
far
I'm
getting
a
lot of compile errors. It looks like libgui is heavily
dependent on a win32 version of gcc, plus, some of the
header files seem to point to a win32 include directory. My
guess is thatlibgui was developed initially from a DOS
based compiler. And coverting it over to linux would
require a herculean task. I dunno, I'll find out as soon as
they start talking about the things I reported.
1:40 AM
Code Reuse Rant( please ignore )
On another topic, all this research I've been doing only
made me realize that code reuse is still far from being a
real solution. Looking at
some of the major milestones, like how K&R had their
version of code reuse by means of built-in and user-defined
libraries, one might think that libraries was the solution,
Unfortunately it wasn't because most programs had the
tendency of becoming monolithic.
Then comes Stroustrup's inheritance which was
supposed to cure the monolithic disease by means
modularization using classes, forcing developers to reuse
code by coupling objects together forming a heirarchy or
web of classes. Well, I think it wasn't the solution too
since it only made classes interdependent making it
impossible to divide the classes into smaller pieces.
Then comes MS with their version of COM which was supposed
to improve code reuse by means of contract programming.
Well, I think it failed too for the same reason that its
achilles heel was the interface that bind the components. A
bad interface design
could really make components pretty much have the same
problems as interdependent classes. Also, component
techonology somehow raised the learning curve to a level
where it takes a newbie about 6 to 12 months to learn all
the interfaces and classes. Then it would take years of
practice just to become a COM expert.
There's a new one called factoring which was supposed
to cure interface design problems. This one is still
relatively new on my radar, so I'll just skip this one
until I get more information.
Somehow, with all these variety of approach in achieving
code reuse are IMHO, still not enough to be even treated as
a practical solution. I'll be waiting for that day when
code reuse will just be as easy as a walk in the park.
myca%factory.listobjects<enter> obj1 obj2 obj3 obj4 myca%obj1.name<enter> JoeObject myca%obj1.memberfunc<enter> role run sleep move detach myca%obj1.role check streams for virus patterns myca%obj1.run friday the 13th erased iloveyou erased myca%(2) Objects must be persistent, like it should be able to write its core memory data into secondary storage.
typedef struct
{
struct IFooVtbl *pVbtl;
} IFoo;
typedef struct
{
//Unknown
HRESULT (*QueryInterface)(IFoo *, REFIID, void**);
ULONG (*AddRef) (IFoo *);
ULONG (*Release) (IFoo *);
//IFoo methods
HRESULT (*SetValue) (IFoo *, int);
HRESULT (*GetValue) (IFoo *, int *);
}IFooVtbl;
void KFoo()
{
IFoo *pFoo;
HRESULT hr;
int res;
hr = CreateInstance(..., &pFoo);
pFoo->pVbtl->SetValue(...);
pFoo->pVbtl->GetValue(...);
Release (pFoo);
}
Clippings
RP No. 1 in 'knowledge jobs'
Work, 1:00 PM
Just came in from the company sponsored lunch, announced
was the openning of the LA branch and jobs are in the
process of getting filled.
1:50 PM
So far, still in design mode. Just started using the Visual
Modeler and progress is very s-l-o-w, I'm still trying to
figure out how UML is
supposed to make this easier. But, I
must say that this tool is good and it would be much better
if it has all the features I need, like class diagrams and
ability to accept program code.
I'm definitely impressed by the methods of software design
in UML and
it's obviously right to do OO design using UML.
Way to go Rationa
l!.
Work: 2:30PM
Have been tracking down the people who wrote the code that
I will be modifying. Asked them a couple of questions 'bout
what will happen if I do this and that and other sorts of
stuff.
Work: 12:10PM
Still not convinced, I went to the designer and picked his
brain a little more and found out I overestimated the work
just a little bit. Now I'm back in the cube and really sure
what he really wants. In this work/business, everything and
everybody has gotta be in synch in order to make it work
the first time.
Work: 11:15AM
Just noticed in the spec a module will have to be modified.
So I went to the person who made the module, sat down for
30 to 45 minutes and talked 'bout the implications of the
spec. We managed to find a way on how the modification will
be performed and at the end of the short meeting, finally
agreed where the modifications will take place. Now I'm
back at my cube and will now perform the invasive surgery
of adding a new feature to the code.
10:00 AM
Been lookin' at the things I want to do and so far
everythings workin' out fine. It looks like everything I
need to know seems to be in place and at this point it's
just a matter of putting the design down in document form
and start bangin' and diggin' code after that. What I'm
thinking is using the object modeler from Microsoft
Enterprise edition to document the API. I'm thinking of
using the term "kit" instead of module or API.
There are two or three possible ways this would go when I'm
done with the kit, one is creating a kit about graphics
stuff. That would be the application, window, view, etc.
And all that GUI stuff which I'm already familiar with. For
me, there's just too many GUI toolkits out there that it's
just a waste of effort to try and make another GUI toolkit,
but, I dunno, it depends, if the existing GUI APIs have
good multithreading support then I'll use it. The second
one would be a set of tools for threaded objects, a thread
development toolkit would be the other way. The third is
basically build a kit about sockets, mail, etc.
At this point, the urge to code is so great that it's like
I'm on top of a giant wave. But, I'll just keep on
designing and documenting, gotta hold on until I get the
design in place. So far, the classes I made are already
helping me make my work a lot easier. Pretty darn nice
isn't it?
Work:
Got a very good spec from the designer plus some pick-your-
brain stuff. The designer is very good and I must say he
definitely knows what he wants. I'll just dig the code and
submit for approval, then that's it for the day. So far,
everything is going smooth at work, I know what they want
and they seem to get what they want from my work. I think
that's a very easy thing to do.
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!