Just a Byte…

I recently started with the Arduino hardware and decided that I needed to create something electronic to command from this specific hardware. Since I am a software geek, I immediately came up with the idea to visualize a byte by using 8 LEDs. I also wanted a simple switch in the design so I could give it some special function, although a single switch isn’t offering very much functionality. So the first design used a broadboard and lots of cables to connect it all and looks something like this:

Byte_bbYeah, that’s a lot of cables. And 8 LEDs, 9 resistors and a switch. It’s nothing spectacular, though. But this design does need to use 9 pins from my Arduino board, making it a bit pin-hungry. You might want to prefer to have all communication to go through a single pin, plus two more for ground and power. But I decided that I just need an experimental thing that would use several pins.

When you look at its schematics, it looks like this:

Byte_schemAnd now, weeks after creating this design, I still wonder why I added a resistor between the switch, pin 12 and ground. Then again, if I would use pin 12 as an analog input, I would not just get a signal when someone presses the button, but also a very low signal related to the number of LEDs that are burning. That’s an interesting concept but I still have to test it.

However, this setup isn’t very practical. All those wires, the LEDs that are a bit loose within the board and the switch that didn’t really want to stay in place made it a bit complex to handle. So I decided to use their services to create a Printed Circuit Board. It would some time for them to fabricate it, though. But still, it would be neat to have some board that I can just click on top of my Arduino.

So, recently I received four of these in my mailbox:

PCBInteresting effect: while the text, logo and instructions are in the front, the actual connections are on the back of this PCB. Did I do this on purpose? No, not really, but I like the effect. It makes the front very smooth, making it even prettier to show. And the logo in the shape of a woman stretching her arms serves the same purpose. Just there to make it look more interesting.

The next step was to add all the LEDs, resistors, the switch and the connecting pins to the PCB. That took some patience with soldiering but I’m happy to say it was a success:

BitsAnd yes, the BytePanel code for this project was also quite easy to write, although C/C++ isn’t really my speciality. (I prefer C# or Delphi/Pascal, although I have plenty of experiences with lots of other languages.)

To get this panel to work, I needed a simple piece of code that would set or reset the specific pins that are assigned to the LEDs. And I need input from one pin to detect if the user presses a button. But to make things more practical, I would need a special class for this whole thing. So it was time to write a whole C++ class including header.

class BytePanel
{
  public:
    BytePanel();
    boolean isPressed(); 
    void reset(); 
    void loopBits(); 
    void loopBitsReverse();
    int next(); 
    int previous();
    void set(byte value); 
    void setValue(int bit, boolean value);
  private: 
    // The current value
    byte currentValue;
    // The pins
    int pins[8];
    // The bit masks
    int masks[8];
    // The switchpin
    int switchpin;
    void update(); 
};

This class would need a constructor with the intelligence to set all used pins to either input or output. It would also need to initialize all variables used, including the counter value which remembers the value of this byte.

Next, it would need a simple function to either set or reset a specific LED. This is what setValue is supposed to do. This method is called a few times, since any method that sets or resets bits will need to call this method for every bit.

The function set is a bit more practical, since it accepts a byte value and sets the LEDs to this specific value. However, it will not influence the current value that it stores internally. I could add this but I feel it would give too much functionality to this simple method. Besides, if I want to be able to set any value to the current value then I would need to create a property to get/set the value, instead of keeping it read-only.

Then a few methods called nextprevious and reset that will display either the next value, the previous value or reset this counter to 0, which means no LED will be burning. They all call the update method which is used to display the current value. Which is practical if you’ve used the set method to override the value.

Two methods called loopBits and loopBitsReverse will just flash each led for 20 milliseconds. The first method goes from low to high and the other from high to low. These are just fine to call when you start the device, so the user gets a visual sign that the device is working.

This class actually makes it quite easy to use the button to increase the byte value. When the device starts, I just loop the bits before resetting the byte. Then, when the user presses the button I will call the next method to move to the next value. However, I also want to reset the byte, and decided that I need to press the button for half a second before it would reset. And to make things complex, the byte should not increase for as long as I keep pressing the button.

Well, this wasn’t that complex after all:

// Now wait for up to half a second.
 int count=50;
 while(count>0){
   delay(10);
   // Did user release the button again?
   if(!panel.isPressed()) break;
   count--;
 }
 // If count is 0 then the user wanted to do a reset.
 if((count==0)) {
   // Reset the byte.
   panel.reset();
   // Wait for user to release the button.
   while (panel.isPressed())
   {
     delay(10);
   }; 
 }

Basically, when the button is pressed, I increase the byte. I then enter a loop that will break if the button is released, or else end when it has counted 50 x 10 milliseconds. In the latter case, the counter will have reached zero, thus I need to reset the byte. I also need to wait for the user to release the button again, else the counter will start at one, not zero. (Because the button is pressed when it iterates from the start again.)

It’s not very complicated to do, as you can see. And of course I could add even more functionality. For example, if the user presses the button for half a second, it should light all LEDs and then move in reverse order, thus every new press of the button would call previous to decrease. Press it for half a second again and it will move forward again. And press it for a full second and it will reset itself.

It’s just one button so I can’t add much functionality to it anyways. But I’m still proud of my first Arduino project. It’s small and it looks nice. I can connect just a battery to it, like in the picture, then press the button to show a specific 8-bit value in binary. And… Well, that’s all, actually. :-)

But what’s more important: I now have a piece of electronics which I can use to write software for! For example, I could use a serial connection to send bytes from the computer to display as bits on this device. Maybe even make it communicate with a second Arduino device so one will send values that the other will display.

And I have three more PCB’s that I can use to create three more of these simple devices. 

The Arduino and the Raspberry Pi.

As you might know, I’m a software engineer. Senior, even. Creating software isn’t just my daily work, it’s also my most favorite hobby, and I invest a lot in my own personal knowledge. I’ve been using a legal Delphi version since 1995 when Delphi 1 was marketed. Before that, I owned a Borland Pascal 7 compiler, allowing me to write both MS-DOS and Windows applications. (End before that, I owned Turbo Pascal 6.) The same with Visual Studio, which I owned myself since the first .NET version was sold. I did skip version 2005, but purchased the 2008, 2010 and the latest 2012 versions, just to keep up with the latest techniques. I also have a license for SQL Server Developer and I use Altova’s Mission kit on a regular basis too to create XML schema’s and to process XML files by using style sheets.

But all this is just working inside the box. You do something on the computer and when people ask me what I do, I have to turn on my computer or laptop, start whatever I’ve created that I can show and once the demonstration is done, I can close it all up again. And after many years, I’ve decided that I need to work “outside the box” too! I need something I can show without the need of my computer, but it should still work together with my computer. And thus I arrived at the Arduino and the Raspberry Pi.

So, let’s start with the Raspberry Pi:

OLYMPUS DIGITAL CAMERA

Basically, it’s just a mini-computer which you can use to run Linux. And by using Linux, you could create all kinds of applications by programming them in C++, Python, PHP or any other development system that is available for Linux, and which can be ported to the Raspberry Pi. (Because it uses an ARM processor, which you can also use for mobile phones and cheap tablets.)

But when you look at the little board above, you will notice it has a bunch of pins available, which you can use to connect all kinds of hardware to this little board. And no, it already has a port for USB devices and a HDMI connector and even has a SD card reader so that’s not the kind of hardware that you need to connect. So, what kind of hardware can you connect?

Actually, anything you like! But you will have to be aware of the programming to send signals to the connected hardware and make sure you use the right voltages, else your hardware might burn up. You could, for example, connect a LED light to two of the pins and send a signal to one of those pins every second for half a second. You would then end up with a flashing light.

However, the 3.3 volts the Arduino provides is a bit much for a LED light so chances are that it will break with a final flash. So you need to take more precautions and add a resistor to the setup to lower the voltage. And maybe you want to do more than just create a flashing light. You could add a switch button to turn it on and off manually. Or maybe add a light sensor so it only turns on when it gets dark. Maybe you want to create a warning signal, telling you when your computer overheat by adding a thermometer circuit to your setup. And maybe add a motor and some wheels so your computer can drive around.

But to do all that, you would need something to create your electronics on. A printboard would be nice, but would require soldering, thus you can’t re-use any parts once you’ve used them. Thus you could use software like Fritzing to first create your electronic designs, which you can then put on a broadboard with all more components:

OLYMPUS DIGITAL CAMERA

yeah, that’s plug&play. :-) On the top left you see three light sensors. Next to it a bunch of resistors and a collection of LED lights. On the bottom the broadboard which you can use to plug them all together. And you’ll probably want a bunch of other electronic parts like condensators, wires, buttons and a lot more. All inexpensive parts that you can buy in the average electronics store. (And often used with model trains…)

So, you can use the Raspberry Pi to create your own light system, but isn’t it a bit overkill to use a whole computer just to switch on a light? Yeah, sure. Which is why the Arduino board happens to be a nice, and less expensive alternative:

OLYMPUS DIGITAL CAMERA

On the right you’ll see the Arduino Uno, which is a programmable board with just a little memory and a bunch of holes that you can use to connect your hardware. The Raspberry Pi has pins, but the Arduino has holes, which makes it easier to plug in wires.

On the left, a special Ethernet shield, which happens to have lots of pins in the bottom to connect to the Arduino board. It’s basically an extension to connect your Arduino to the Internet, so it could, for example, send or receive commands from any computer. And this is what makes the whole device very interesting! You can “talk” to it over an Internet connection.

However, to make the shield and board work together, it needs to use some of the pins that you might want to use for your own experiments instead. So there’s an Arduino board with a build-in ethernet connection:

OLYMPUS DIGITAL CAMERA

And yes, above the board you’ll see a LCD screen that you could use to display messages. You also see an IC that can be used for some simple processing of your signals that you’ll be sending over the wires. And two optocouplers that can be used to isolate two systems with different voltages, yet allowing signals to be sent between them.

The Ethernet board does lack a USB connection, though. Then again, if you want to create your own internet-enabled electronic device then this is just more than enough as the foundation of your project.

There are also several other types of Arduino boards, each with their own special properties. I don’t have those yet, though.

The Arduino is very useful for projects that don’t need a lot of coding. Otherwise, the Raspberry Pi would be a better solution. The Raspberry Pi can, for example, be used as a web server, allowing you to send much more complex signals than the Arduino can handle. Plus, you can connect a monitor, keyboard, mouse, hard disk and other devices to your setup, like this interesting monitor:

OLYMPUS DIGITAL CAMERAAnd yes, it could be possible to use this monitor from an Arduino board but the amount of programming you’d need would be huge, and the amount of memory the Arduino has would not allow you to do something complicated. So, if you want to create a photo frame with a special remote, the Raspberry Pi would be more practical. If you want to set the lights on your model train station based on the amount of light outside, the Arduino would be better.

The Arduino has another advantage, although the Raspberry could make use of that option too. The Fritzing software allows you to design something and show what it would look like on a board. Say, for example, that I want to manage eight LED lights by using a switch. For example, a binary counter which displays it’s current value as a byte value. As an electronic schema it would look something like this:Byte_schema

In the above schema I use nine pins from the Arduino to handle all lights and the switch. And yes, I could have used just one if I added an IC and some additional components but I want to keep this extremely simple. Besides, using an IC means that I would have to use serial communication between the Arduino and the board, while I want this project to do things parallel.

But above schema is interesting but you might want to build it so you can test if it works. You should also build it so you can test the code for the Arduino which should do some action based on pressing the button. This has not been defined by me so I could use this all, for example, with an Ethernet board and have a computer send or receive a byte value to the board when I press the button. 

Anyways, the Fritzing software can display me what the board would like, although I did show all wires reasonably neat around the board:

Byte_bb

But once my design is finished, I don’t want to lock up my broadboard just for this project. I might want to create another thing next, thus I would need my board and my components. So, the solution would be to have a circuit board printer for just this project, which would look something like this:
Byte_pcb

A simple design, which fits a single side of a board, allowing me to add the components that I used on the broadboard before. A bit of soldering, adding a few pins to connect it to the Arduino board and I would end up with an interesting device, which still needs some code to operate the lights. But hey, this is the hardware side, allowing me to show something outside the box!

The next step would be writing the code for the Arduino itself, which should turn on or off some of the lights based on certain conditions. And it must respond to a button press. But what this project is going to be, I don’t know yet. A connection with a web server, having some kind of communication between my board and the web server would be something interesting to show. It would allow me to go back to the box, design something and then show the result on my Arduino board, which could be build in some black box with just the LED lights and the switch visible.

Too bad it would still need a cable to my router, but there are possible alternatives. For example, there’s also a WiFi-based option, or something with Bluetooth. Or perhaps even with a GPS module and then sending SMS messages. There are a lot of options for me to work outside the box with just these components!

By the way, since the Raspberry Pi has a build-in USB connector, I could just use a WiFi USB dongle instead of the Internet cable to make it a wireless device…

Time for a new web server…

Today I’ve received my new computer, which will be used as a Datacenter/web server. It’s an Asus P6-P7H55E and I will install Microsoft Windows 2012 Datacenter on it. It will be used mostly for my personal web experiments but it will be linked to my domain names.

I’m using Windows 2012 simply because I’ve received a license for this operating system as part of my MSDN subscription. It’s not meant to be used as a production server but as a development server, for testing purposes. I’m a Senior Software Developer so its perfect for me. I already upgraded it’s memory to 8 GB and wonder if the 512 GB disk space will be enough. Then again, I have plenty of external hard disks that can be used for extra storage.

It has an Intel Pentium E5800 onboard, which happens to be pretty decent. The system won’t be very powerful but then again, I don’t expect many visitors either. Those who do visit are most likely visiting my sites that are hosted somewhere else, like this blog. But for experimental purposes, it’s great. I hope, since I still need to set it up correctly. :-)

I won’t be hosting my blog on it. My blog is nicely hosted on WordPress itself. I’m also not going to use it as mail server, since I use Google Apps for that purpose. And no, if I ever create a useful site that attracts hundreds of visitors every month, I’m probably not going to host it on this server either. Just my personal experiments, although these will be accessible from the outside.

The content of this web server won’t be very valuable, since I will do development on my other systems. And important data will also be stored on my other systems. I am considering to change my previous web server to an SQL Server system, almost completely dedicated to maintaining the more important databases on my system. Since my old web server will not be accessible from the outside, it would make my databases a bit more secure, although it also means that I have to keep two computers running continuously.

For now I still have plenty to do. It still sees only 4 GB RAM instead of 12 and it doesn’t seem to know it has a dual-core processor. And the remote desktop services aren’t operating properly yet. Plus, I need to give it a fixed IP address. And then I’ll have to migrate all projects that I consider important. Finally, I’d have to adjust my router to make sure the new web server will be used. And lots and lots more…

For now, I’m busy! Please, do not disturb… :-)

Creating a nice CGI landscape.

I want a new background for my desktop system. But it’s a dual-monitor system with two monitors with 1920×1200 resolutions. This means that I have to make a very wide image. So I decided to make a wide landscape image. But I don’t want a bunch of trees, some mountains and water, but also some models inside the image, doing something. So I’ve decided to make it a hunting scene. On one side, Raevin with a dangerous gun who is hunting a Brontotherium on the other side. So I first need to create and pose them in Poser. And to make it easy, I just put them both in a single model. I can split them again once it’s imported in Vue. So, here are the models:

Main charactersOf course, I will make them look at one another in Vue. As I said, I will split it in Vue. Just needed to create a proper pose first.

The next step is starting Vue, set the image to 4800×1500 pixels which is the proper scale for my two monitors. I will have to re-size it later on to 3840×1200 to make it fit perfectly, but the larger resolution will also allow me to cut out part of the image as separate images. But size won’t be enough. I need to pick a proper atmosphere, the flow of the landscape, the trees and grass I want and of course I want to add water since that big monster would look nice with his body partially reflected. It also means adding some small splashes and ripples.

So, the atmosphere first. It should be sunny and a bit cloudy, but no real visible clouds. A nice sunset would look great. So I start with this:

Atmosphere

Next, I need to decide where I want the models and have decided to place Raevin on the left, so the prey is on the right. The sunlight from behind will make his shape a bit darker, thus more menacing. The same will be true for Raevin, but I will add a second light on Raevin so she becomes more clear in the image.

But before adding the models, I need to decide on the landscape. I want a few mountains in the background. I also want the animal standing in a lake, so I need water on the right side. But Raevin needs to be on dry land, preferably grassy. So, let’s add some terrain, grass and trees for in the distance.

Plains

It’s still far from perfect but it has a lot of potential  But you will also notice that I have water on the complete foreground, but I want to keep Raevin on dry ground. That makes it a bit complex, but it’s still easily solved. Also, I want to have the animal on top of some rock too, even though that rock would be submerged. It just adds more realism. So, I need to import both now, split them and make some adjustments while placing both on flat rocks. So, let’s first show Raevin in this environment.

Adding RaevinWell, I don’t really want Raevin to hunt this animal. She’s cautious but she has a different target. A lot of improvements are still needed, though. For example, I want some bushes in the image too. But first, that animal… And I have to remember to put a rock beneath his feed and to add splashes because he’s walking through water.

Adding Animal

This is promising to look very nice already. However, trees! I am going to add a third rock, place it behind Raevin and I will add trees to it, so she’s slightly hidden. No good hunter would be on open terrain where any possible prey or dangerous animal could see them…

However, I’ve noticed that the atmosphere seems to degrading with every new preview I render. It seems to be getting brighter and brighter. So I just load the atmosphere again before my next preview. And yes, this could be a bug in Vue, or maybe a problem with my graphics card. I will have to look into that one day. However, for now reloading the atmosphere works just fine, as shown in this preview:

Preview 1The next step is fine-tuning the complete image. Raevin needs to be a bit more shiny, and I don’t like the way her gun looks. So I need to fix her textures, or materials. But the problem is that this image is becoming a bit slow to use, so I will use a trick to speed things up. First, I will save this scene so it’s safe. Then it’s time for a new preview. (I will also add a second light just to highlight Raevin.)

Preview 2

And now it’s starting to look better already. The shiny cybernetic limbs of Raevin are a bit shiny in this preview, but I don’t mind. It adds an extra dimension to the image. It’s time to render this image at its full resolution and highest quality. Considering the amount of objects and reflections in this image, I guess it will take a few hours to finish. First I need to save it and then I’ll start rendering around noon. It will probably take most of the night to finish.

And indeed, the next morning I can see the result. Raevin is really having shining cybernetic limbs, which look very interesting. Not a good thing for a hunter, though. Unfortunately, she seems to be floating a bit above the grass so I might have to adjust that. Maybe I should also change the reflectiveness of her cybernetics. The extra rock with the trees is missing some grass, so I might want to add that too. And the mountains in the background you can see lots and lots of houses. It’s really a lot. It turns the setting away from prehistoric times, which is what I like about it. The brontotherium looks great, though. See for yourself!

Raevin and BrontotheriumUpdate

After considering the above image, I decided that a few details had to be changed. First of all, the background just didn’t look natural enough. The sun is shining very pretty but there are too many houses. Another problem is the shininess of the cybernetic arms and legs, that are too distracting. And there’s a bald spot on the ground where grass is supposed to be.

Rendering a final image is very time-consuming and I knew it would take about a day for the render to be complete. But since I wasn’t happy with the above image, I did render it again with some different details. The scene, lighting and models are still the same, except for the textures of the land and cybernetic limbs. This should be a much better result:

Raevin and BrontotheriumUpdate 2

I’m still not very happy with the final result. Raevin needs to be even lower and she should be aware of the beast that’s about to charge at her. So I turned her around a bit. I also changed some of the bushes in the foreground and added additional plants on the right so the “cameraman” would be hiding behind these.

This minor adjustment resulted in the following image, which is supposed to be the last version:

Raevin and Brontotherium II

 

The challenge for the CART system.

In The CART datamodel I displayed the datamodel that would be required for the CART system. Basically, the data model would store the items, transactions and contracts while the templates will be stored in code, as XML structures that are serialized to objects and back again. As a result, I would split the relations from the data, thus allowing me to avoid regular updates to the database structure. All that I might want to update are the templates but even that might not be required for as long as the software will support “older versions” of those objects.

But serializing those objects to and from XML isn’t as easy as it seems. Since I’ve separated data from relations, the data itself doesn’t know its own ID. Why? Because the ID is part of the relation, thus I would not need to store it within the XML. (It would be redundant.) But if I want to use these objects through a web service, having the ability to send this ID to the client is very practical, so I can send back changes through the same web service. I would need the ID to tell the server what to do with which object.

Thus I’ll end up with two methods of serializations. One is just to serialize the data itself. The other is the data plus its ID. And now I will have to decide a way to support both. Preferably in a simple way that would not require me to generate lots and lots of code.

In the data layer, I would split up every object into a relation and a data part. The data would be stored as XML within the relation object. To make sure the relation object will be able to expose the object, I would need to give it a DataObject property that would be the data object. It’s get/set methods should connect to the XML inside, preferably even by using an object as buffer so I don’t have to serialize it over and over again.

In the business layer, I should not have an XML property, nor should I have a DataObject property. The data fields should be there, with the ID. And basically, I would need a mapping to convert between the data layer and the business layer. The trouble with this approach is that I would define all data twice. Once in the data template and once in the business layer. That’s not very smart. I need to re-use things…

I’m considering to add my serialization method for the data templates. This means that I will include the ID within the template, so it becomes part of the object. All properties would be defined as data members, including the ID. That way, the ID is sent from the business layer to the client. But to store the template in the relation object, I would need to create my solution.

One solution would be by implementing methods to convert the data to XML plus a constructor that would accept XML to create it. It would also mean that I need a way to recognize each object type so I can call the proper construction and probably inherit a bunch of code or write interfaces to make objects more practical to be called upon. It would be complex…

Another solution would be by defining my own attributes. One would be for the class name, thus allowing me to find classes based on this custom attribute. The other would be for the property and my code would just use all of those to generate the XML or to read it back again. This too would allow custom field names. It would be a cleaner solution since I would define the template as just a bunch of properties. Which, basically, they are.

But this second solution is a bit complex, since I still need a way to call the constructor of these specific classes. So I’ve opened a question on StackOverflow, hoping I will get an interesting answer that would solve this easily. Why? Because part of being a good developer is to ask other experts for possible solutions when yourself don’t have a good answer! :-)

The CART datamodel

Well, my back problems made me think a lot about the CART system that I’ve mentioned before. And it made me consider how I need to handle the difference between plain data and the relationship between the objects. Because the most troubling thing I had to deal with was that I did not want to change my datamodel for every new item that I want to store. So it made me think…

The CART system is mostly created to handle relationships between items, transactions and contracts. It’s not about handling of the data itself. Actually, the system doesn’t even care about the data. All that matters are the relationships. Data is just something to display to the user, something to store but normally not something that you’ll need to process very often at the data layer. So, considering the fact that you can serialize objects in .NET to XML data, I’ve decided to support a basic structure for my Garage Sale project for all the items, transactions and contracts. And each of them will contain a Data property that has the serialized data, that I could convert to data objects and back again.

This idea makes it also more clear where the templates are within my system. My templates are these object definitions! I will have a very generic database with a very simple layout, and I can generate a very complex business layer around this all that I can change as often as I like without the need to change my database model. As a result, I might never have to change the data model again!

Of course it will have a drawback, since the database will contain serialized objects. If I change those objects, I will also need to keep track of the changes in those stored structures and either update them or keep up multiple versions of those objects. Updating those structures would mean that I have to create update apps that know both the old structures and the new structures. It should then convert each old structure to a new structure. Maintaining multiple versions might be more practical since that would leave all old data intact in your system. Anyways, it’s some added complexity that I’ll have to consider.

But now, my datamodel as created by Visual Studio 2012 by using the Entity Framework:EF-CART

 

So, what do you see?

  • The DataObject is the base class for any CART object. It has a unique identifier, a name that can be used to show the related object and a Data property that will contain an object as XML.
  • DataItem is a generic item class, containing an additional description just for more practical reasons. When a user wants to select an existing item, having a description makes it possible to avoid reading the object within the data.
  • The Collection table is just an item with an extra bonus. It can contain multiple child items without the need for any transactions. Actually, this is just a shortcut solution to allow more complex structures within your items. For example, you might create a complete Household collection containing husband, wife, four children and a dog. And although you could link them together by using transactions, having them in a collection just saves the need to create those transactions.
  • DataTransactions is the base class for the transactions, having a sender, receiver and subject item connected together. It also has a link to a rule and a timestamp, indicating when the transaction tool place. (Or will take place for future transactions.)
  • IntegerTransaction is just a basic transaction with a multiplier. This way, you don’t have to add a lot of transactions when your customer buys ten bags of flour.
  • DecimalTransaction is also a basic transaction that will handle items that can be traded in all kinds of different numbers, including fractional amounts. For example, the price of a product, or it’s weight, length or light intensity.
  • DataRule is the basic contract type. It’s a collection of transactions that are all related to one another. For example, the sale of a product would result in a sale rule.
  • The Contract class is more than just a rule. It’s a rule that can contain child rules, thus allowing structured contracts that are made up of several subcontracts. These are used when you have to deal with complex
    situations, like mortgages. A mortgage would include a rule for purchasing a house, a rule for lending money and paying it back, plus other rules for all kinds of insurances.

Now, as I’ve said before, this datamodel should offer me more than enough structural parts to use for my Garage Sale project. All I need to do is compile it and then just leave it alone. There should not be a need to include anything else.

Well, okay… That’s not completely true, since I might want to handle user accounts and store large images of products. But these things would actually require new database structures and should preferably be part of separate databases.

Looking back at this design, it surprises even me how less data it actually has. But the trick here is that I’ve separated the relationships between objects from the actual data itself. Each object can still contain a huge amount of data. But it’s just not important for the model itself.

Dell isn’t making me happy…

My recent post about my new laptop has a strange twist. I should be using it right at this moment but no such luck. Dell didn’t deliver it. So, what happened?

Well, I ordered this monster laptop on February 23 and I received an order confirmation the next day. In it, Dell promised me to deliver my laptop on or before March 18. Which happens to be last Monday. However, one week before delivery, Dell just decided to cancel my order without notification. I never received a valid explanation, not did they warn me by email about this cancellation. It was just pure luck that I discovered this cancellation on March 13, simply because I kept checking my order status.

Needless to say, I wasn’t very happy about all this. I called their support helpdesk and asked them why they could not deliver my system. And although the person was very helpful to resolve the problem for me, he just could not tell me why it was cancelled. Most likely because the configuration was invalid. But if that was true, the Dell site itself should have made it impossible for me to choose this configuration.

I was left with two options. Either they would refund my money, which happens to be quite a substantial amount or I could order a similar system at that moment for the same price. The helpdesk would try to select a system that would be as similar to what I had ordered and all I had to do was wait a while for him to create a quote for the new system.

When he called back a few hours later, he gave me an offer that was identical to what I had ordered. An exact duplicate, with the same part numbers, the same configuration and exactly the same price. So, the configuration I had selected was valid after all and they’ve canceled my order for some bogus reason. Or maybe they don’t want customers who spend nearly 4.000 Euro’s on a single laptop. I just don’t know why the cancellation happened…

The only difference is that this new order also has a new delivery date. I now have to wait until April 8 before I can use it. Maybe it will be delivered sooner? Maybe it will be canceled again? I don’t know. All I do know is that Dell isn’t making me happy.

So, if you ever decide to order new hardware from Dell, please consider alternative options! I’ve been using Dell computers for a long time and their hardware is great, but these problems with ordering a new system does urge me to look for other alternatives in the future. Such a long time until delivery is just unacceptable.

Update

Dell just emailed me a new delivery date. No, it’s not April 8 anymore. It’s on or before April 19th…

This means that it takes almost two months for Dell to deliver my new laptop.

Update 2

And as it turns out, Dell has even created a new order again. I’ve called their sales helpdesk and had a little talk about it all. They’re having configuration problems with this system, which isn’t surprising considering the extreme power it has. And some parts are missing at this moment, so they can’t assemble it yet. The 32768MB 1600MHz Dual Channel DDR3 is one part that they’re not having. These are actually 4x8GB memory modules and indeed, these modules are a bit tricky.

The other part that’s causing troubles is the 2GB GDDR5 NVIDIA GeForce GTX 675M. Again, a very powerful piece of hardware that I consider a must for my new laptop, especially since I also want to use it for rendering CGI artwork.

So now I’ll just have to wait until April 19th, hoping Dell will decide to deliver even sooner…

Update 3

Dell finally confirmed that my laptop has been produced and it’s on it’s way from Shanghai, China to Europe. I can expect my laptop on monday, April 15. Yeah, that’s almost two months after I’ve ordered it. I have to admit that Dell delivers good quality products, but their delivery times are way too slow.

Update 4

Received my laptop yesterday. WOW!!! Dell is making me happy now…