Friday, February 24, 2006

Difference between free and delete

I stumbled across the following article on www.voidnish.com. It compares the differences between using the new / delete pair and the malloc / free pair. The 'Tip for scalar and vector new/delete' in the article helped me realize why my one DLL had a memory leak when handling char arrays.

Obviously a seasoned C++ programmer would know this, but me being a C# / Java programmer and only a C++ programmer when the situation calls for it, I did not realize that mixing the two ways of allocating memory and freeing them again will have such an effect.

Just another reason I love my C# / Java managed code world ;)

Metamodel Programming

I always used meta data to store business rules e.g. tax rates, commission etc. This allowed the system to be modified and even extended after delivery well into the maintenance phase without too much hassle.

Lately I am gravitating more and more to the idea of having all my logic inside a meta model. This meta model will not only contain business logic but also programmatic logic . The meta model must be able to model the interaction between all the various business objects as well as the presentation objects which will in turn allow me to generate code from the meta model.

There are tools available today allowing this, but they are either too expensive or too bulky. Obviously creating a product to do all of this, the product needs to be very generic to allow it to be usable by the mass market.

Because my projects are medium in size, 5 - 10 developer teams, I do not need the bulky huge be everything to everyone packages. The tools needed in my domain will be fewer but more biased towards the domain instead of trying to have a tool generic enough for all domains.

Luckily for me the chances are very good that I will be trying out this new approach on my new upcoming project. We will have to wait and see how many sleepless nights I will have to endure to make this a reality.

Tuesday, February 14, 2006

Intel Pentium M vs. AMD Turion 64

Being an avid laptop fan, I found this article very interesting. I wondered when AMD will come to the party with some real laptop CPUs, the previous attempts were running too hot for my liking. It seems my next laptop will still be a Pentium M, but it is good to see that AMD is making some progress. The mentioned article is available here.

What I do find very interesting is the advantage the Pentium M has over the Turion when the level 2 cache is used. I suspect the level 2 cache plays a rather prominent role in compiling code, which is way my next laptop will again be a Pentium M.

Monday, January 30, 2006

It gave up the ghost

It seems my Motorola E1000 decided to give up the ghost for a third time. I decided enough is enough and bought myself a new Sony Ericsson W550i. I will now use the USB library to communicate with my new W550i. Maybe I will have better luck with the Sony Ericsson.

Wednesday, January 11, 2006

Motorola E1000 USB Access

I am currently struggling to communicate with my Motorola E1000 cell phone using the libusb-win32 library. Whenever I try to open configuration number 1 the library just stalls until I disconnect my cell phone.

I am able to connect to my PocketPC via the USB successfully, so I suspect my Motorola USB driver is at fault. Unfortunately this means I will have to do some trail an error investigation for the next few sessions.

Tuesday, January 10, 2006

USB Access Library

I downloaded the #USBlib from icsharpcode. Unfortunately the library was not complete enough for my intends and purposes. After browsing through the icsharpcode forums I realized there are more than a few people that would have liked the #USBlib to be a bit more complete.

I decided to complete the #USBlib library to a point where I will be able to use it to communicate with my Motorola cell phone. Unfortunately Mike Krueger decided that all his classes will be marked as internal and not public making my attempt to only extend his existing classes impossible but he did make the source code available.

I copied his code as is into a new assembly and started with extension classes. I did not want to change code on the existing #USBlib classes but again there were some incompatibilities which I had to deal with in the current source code but I kept the changes to a minimum.

I implemented the classes needed to be able to control the USB device according to the USB documentation e.g.So to be able to read and write information to and from the USB device you will need the Device object. The Device object will have a Configuration object. The Configuration object will have an Interface object and the Interface object will be able to create a USBStream to read and write from.

The library is complete enough to play around with, but it still needs some refinement and it needs a help file explaining all the classes.

I have the following files available for download:
Some limitations and dependencies:
  • You will need to install the libusb-Win32 library
  • The current version only works with Framework 2.0 and the Win32 DLL

Monday, January 09, 2006

.NET USB Library

I have been unable thus far to obtain any free Bluetooth library in either .NET or any other language that would enable me to use the Widcomm Bluetooth stack.

The Franson library works sufficiently enough but I do not want to buy a $99 library just for my current freeware project. I am on day 5 of my 14 day trail period so I need to get another way of communicating with my cell phone.

I decided to use the USB port for now. I am developing a cell phone library that will be able to communicate with any cell phone that is compatible with the extended Hayes modem commands. To enable me to test my library extensively over the next few months I will need a connection to my cell phone that will not expire and is free.

I decided to use the #USBlib to communicate with my cell phone via USB. The libary is open source and can be obtained from icsharpcode.

Friday, January 06, 2006

Franson BlueTools

I found a different Bluetooth Library from Franson. Their pricing model is also a bit better, but now I need to develop a commercial application and not a freeware application. There is a 14 day trail available, maybe that will work fine for now.

Bluetooth Communication

I recently became interested in Bluetooth communication between my PocketPC and my Motorola cell phone. I primarily want to be able to send and receive SMS messages from my PocketPC through my cell phone. For some strange reason Microsoft decided that the messaging software supplied with a standard PocketPC will not be able to send and receive SMS messages unlike the messaging software supplied with a PocketPC with cell phone capabilities embedded.

I definitely want to use C#.NET to develop this simple SMS application but now I need some Bluetooth library to communicate with my cell phone.

In my first search attempt I came across a Bluetooth library for .NET created by 32feet.NET, unfortunately this library only supports the Microsoft Bluetooth stack and not the Widcomm Bluetooth stack. My HP iPAQ uses the Widcomm Bluetooth stack and not the Microsoft Bluetooth stack.

In my second search attempt I came across a Bluetooth library for .NET created by High Point Software which supports the Widcomm stack but it is not a free library. I will be able to obtain a free evaluation copy of the library. This copy will pop up a message each time the application connects to the Bluetooth stack. There is also a limited edition of the libraries available but I do not know what the implications are of these libraries.

Thursday, January 05, 2006

What is ...

What is The System Architects blog? The System Architects website's main aim will be to help other system architects with their projects. The System Architects blog's main aim will be to talk about current developments in different projects from different architects. Some of these posts will be upgraded to articles which will then be published on The System Architects