Skip to main content

Bienvenue

Ce blog est consacré au conception et développement de logiciels et de bases de données (notamment Microsoft SQL Server et Delphi/Lazarus).

A propos, qu'est-ce que "Arbinada" ? Voir ce lien.

Pourquoi spécifier les noms de modules

Posted in

Dans l'article précédente "Crack C# namespaces in 30 secondes" je vous ai montré comment tomber sur une erreur en C# sans la savoir et donc passer les heures après sur la débogage. Mais en C# vous êtes condamnés à utiliser la directive using sinon le code devient illisible rapidement avec tout ces MySolution.AppModules.Accounting.AccountingType.DefaultValue.

En Delphi et Free Pascal vous n'êtes pas obligés de spécifier le nom d'unité, mais cette pratique vous préviendra des erreur de genre décrit dans l'article.

Voici une exemple simple.

Crack C# namespaces in 30 secondes

Posted in

The namespaces conception in C# seems exhaustive and insufficient at the same time in comparison with strong module notation like in Oberon-2 and even with modular programming like in Free Pascal/Delphi.

Why insufficient? You cannot declare constants and functions within namespaces but you should add a class with constant field or static method for it. It's really sad...

Why exhaustive? The "using" directive with such introduced classes is the source of unexpected errors. Here is an example below.

FGL extension for FPC 2.6.4

Posted in

As Free Pascal 2.6.4 distribution does not include generic tree implementation (there are some limitation of compiler), I use my own named FGLExt for different purposes.

Here are 2 files attached:

  • fglext.pas - implements TFPGTree, TFPGTreeNode and TFPGStack classes
  • fglexttest.pas - some unit tests for it and use cases

FPCUnit: GUI runner improvements

As I'm working constantly with both DUnit and FPCUnit, the differences of shortcuts and ergonomic are significants when running in GUI mode. I.e.

  • "Run all tests" on Ctrl+R is less intuitive and usable that F9 in DUnit. Indeed, I run tests from Lazarus by F9 and would run them all immediately by F9 too.
  • Check box states of selected tests are not saved between the runs so we need to do it every time... very annoying.
  • Cannot close form by simple "Escape" as in DUnit but Alt+F4 or mouse manipulations are required.

To avoid these inconveniences I modified slightly source files of "guitestrunner.*".

"The Agile development is a cancer" (c)

This evident thought started to reach some people who are able to deliver this simple message to the masses.

Erik Meijer: "Agile is a cancer that we have to eliminate from the industry"

But you should understand that Agile is not the cause of problems in the industry, but only the result of inadequate attempts to resolve them in a blunt manner: applying the technology of material production's assembly (Toyota-like Scrum/Canban) for the whole software development process. However, there are two main problems that gave rise this cancer:

Make error "Fatal: Command arguments too long"

This bug is reproduced on Delphi 7 and C++Builder 6 at least (probably in later versions too) when starting Borland make utility. Indeed, the message "Fatal: Command arguments too long" and the real problem are as like as chalk and cheese.

Check the length of your PATH variable. In my case the length was > 400 characters. Deleting some paths reduced the length down to 300-350 characters and solve the problem.

Syndicate content