Made to Order Software Corporation Logo

error

GRUB error 16

Today I had a problem with one of our computers. It did not want to boot. The boot loader is called GRUB. Most Linux distributions now use GRUB which is much more advanced than LILO and some other boot loaders.

GRUB is great for several reasons:

The assert() macro in C/C++

 

This is a subject that comes back all the time in C/C++ boards.

Should you use assertions?

The answer is clearly yes. But the C/C++ assert() function is usually defined using a macro. Macros have several problems. The most common ones are: they offer no type checking, they do not warn you about weird side effects, they have a different syntax than the C/C++ language itself.

One good thing: for a fast program, the debug code used to check parameters, results, etc. is gone.

One really bad thing: if the expression in the macro has a side effect, the release program is different from ...

HTML Forms and the action attribute

Today I had to debug a set of HTML pages. One feature of a website would not work with Internet Explorer. The code was like this: