Thursday, October 29, 2026

Excel is not a database.

 The reasoning goes like this:

  1. Excel can have lots of tables.
  2. A database has lots of tables. 
  3. Therefore Excel is a database.

When Excel is used as a database it is the root of all evil.

The problem is that it is easy to make a table in Excel. The problems get worse when...

  • You add more "related" tables into an Excel spreadsheet. 
  • Your table becomes very wide or very long or both.

You can imagine one Excel table having a part number of a component and a description, cost, weight etc of the component. Then on another table you could have a list of assemblies which show which components are used in each assembly. But if the component part number changes you have to make a search and replace operation hoping: 

  • that you don't miss any (because
    of human error or formatting differences)
  • you don't change any text which should not have been changed

I repeat, the problem is that it is easy to make a table in Excel. In other words you can make it without having to think hard about your objectives, about what the data is you are trying to represent.

I'll go into more advantages of a database over Excel in future posts, but here is the first:

If you make a table in (for example) Access you can force 

  • the format 
  • the uniqueness of rows. 

The idea to remember is force. In Excel it is hard to protect you data like that. In Access (for example) it is a built in.

Here is an example of a table:

 

Let's say that the first column of the table must always be 8 characters long and all the characters must be decimal digits as shown above. We can force things so that these rules are respected by clicking on the design view icon...


 ...and setting the first columns properties as shown below:

 


 So if you don't type in exactly 8 numerical digits you will get this sort of message:


 Actually if your codes are numerical there is another way to do the input checking, but I wanted to illustrate the general idea first.

I'll cover that in the next post...

 

 

 


Sunday, September 20, 2026

How to design user interfaces for CAD users

 If you create programs for CAD operators, AutoCAD or Inventor to name just two, it is important to get the interface correct. It is tempting to think that you know what is best, but unless you involve the user in the design you will almost certainly make something which annoys/irritates/angers/misleads them.

Whether you use AI and or C++ or C# or Python... the following tips apply.

Tip 1: Ask the end user what he thinks the interface should look like.

Your job is to make the life of the designers easier. Ask them to sketch out what they think the interface should look like. Some of what they ask may be wrong or impossible, but the act of trying to specify their ideal form/dialog will clear up their own ideas, as well as yours.

Tip 2: Get to know what physically your program will result in.

For example if your program will create a new electric motor then understand, at least at a simple level, what the components do. Without that knowledge you are isolated from the actual work which the program should perform. If you conceive of the job as just a list of input numbers and strings you will have no idea of the relative importance of the inputs, what they represent physically. You will also not understand what physical limits there are on these numbers (maxes and mins for example) and strings (component part numbers for example).

 Tip 3: Give visual feedback in the user interface.

Have a preview of the component the software will create when the user clicks on the OK button. When a slider is dragged then the user should see the model change. It may not be practical to show the whole model, but a simple preview could give real time feedback as the slider is changed. 

A preview can also show obvious errors in the choices of the user. With just numbers and text on the dialog errors may hard to catch.

It is also nice, if the preview is in 3D, for the user to be able to rotate and zoom the simplified preview.

Tip 4: Make the preview measurable in a CAD system. 

(This trick I have found very useful, more for the developer than the user.) I'll explain: My 3D previews of components and assemblies are actually 3D skeletal DXF files. These files are to scale. I have a method which shows the preview DXF in the form/dialog.

I create the DXF in memory, but have a button on the dialog which says "Save DXF..." This means you can actually open the preview in (for example) AutoCAD to check the measurements of the component. 

As I said, this is more for the software designer than the user, but it has saved me much time and allowed me to find and correct dimension bugs much quicker.

(The images below are very simple invented parts, I cannot show real complicated parts for NDA reasons.)


 

 



Thursday, April 9, 2026

Artificial Intelligence for Insects

 

A while ago I wrote these posts on how to implement neural networks on the Arduino. You can now get hold of neural network libraries for the Arduino, but the idea of my post was to explain really and in detail how neural networks worked with concrete functioning code.

And someone pointed out that there was not enough memory on a standard Arduino Uno V3 to make a really big useful neural network. That is true, but I bet we could make an insect sized brain on an Arduino!