Count LOC with Notepad++

| category: Programming | author: st

Notepad++ can count LOC (lines of code) of source files and give you the estimation of code size.

Press Ctrl+Shift+F shortcut to start "Find in files" dialog. Select "regular expression" search mode and start it.

Notepad++ LOC count

Some regular expressions:

  • \S+\s*$ -- all non-empty lines
  • ^\s*$ -- only empty (white-space) lines …

Classic backgroud color in Windows 10

| category: My notes | author: st
Tags:

How to set classic background color in Windows 10?

  • Right click on desktop and select "Personalize" menu
  • Set "Background" option to "Solid color"
  • Click on "+ custom color" button
  • Click on "More"
  • Check that "RGB" is set
  • Enter "#336EA5" and click "Done" button

That's all.

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 …