C++Builder: using variant type variable to store Delphi interface

| category: Programming | author: st
Tags: ,

Delphi case

Delphi supports interfaces natively. Any variable of variant type can store an interface like any allowed data types.

program IntfDelphi;

{$APPTYPE CONSOLE}
{$R *.res}

uses
  Classes, SysUtils, Variants;

type
  ITest = interface(IInterface)
    ['{BEDC5E17-2C40-4F7C-8C78-34448F5CE146}']
    procedure Foo(const Msg: string);
  end;

  TestImpl = class(TInterfacedObject, ITest)
  public
    procedure Foo(const Msg …

Create live USB stick on Debian

| category: My notes | author: st
Tags:

Debian distribution doesn't have USB startup disk creator software. However, you can make live USB stick based on Live-DVD ISO from command line.

sudo dd bs=4M if=///.iso of=/dev/sdX && sync

where sdX is the USB device name. Don't use trailing digits like sdb1.

Example

sudo dd bs …

How Model Driven kicks off Agile

| category: My notes | author: st
Tags: ,

The text below is not mine but I completely agree with author, after many years in software engineering using models to generate programs, components and codes. See also Geniel Lamp tool and my presentation "[MDA/MDD approach - Relation to the software development life-cycle](https://www.researchgate.net/publication/287201275_Architecture_of_enterprise_automated_information_system_-Layers_and_levels_-MDA_MDD_approach_-Relation_to_the_software_development_life-cycle".

The …

Using Delphi library with C++ Builder

| category: Programming | author: st
Tags: ,

Since early XE versions C++ Builder supports Delphi units directly added in C++ project and compiles them as well as C/C++ source. However, this approach has several drawbacks:

  • Usually, Delphi files are stored in separated folders of other applications and packages. So your C++ project will point to many …

Happy tickets benchmark

| category: Testing | author: st
Tags: , , ,

Some countries have integer numbers printed on the transport tickets, for example, in ex-USSR. The ticket is "happy" when the sum of the first half of digits equals to the second one. Then you should eat it and make a wish.

Example:

123456 and 111222 are not happy tickets
123123 …

Installing Delphi 7 on Windows 7/8/10/Server 2012

| category: Programming | author: st
Tags:

How to install and use Delphi 7 and help files on Windows 8/10 or Server 2012.

Installation

Start Delphi setup and install all required items including help files.

In Windows 8/10/Server 2012 or later (should work on Windows 7 too):

  • Create the shortcut to Delphi32.exe
  • Open …