Planet Object Pascal

March 05, 2015

Castle Game Engine news

We're proud to present another game done using Castle Game Engine:) This is an isometric RTS (real-time...

We're proud to present another game done using Castle Game Engine:) This is an isometric RTS (real-time strategy) with some twists (command lines cannot cross). Available to download, for free, on --- for Windows, Android, Linux.

The game was created by Michalis Kamburelis during a 48h gamejam this weekend :) The full source code is available on . Have fun!

#games #gamejam #opensource #freesoftware #gamedev  

March 05, 2015 11:30 PM

Firebird News

Firebird 3 API demo usage with Pascal

Adriano dos Santos Fernandes (on the Firebird Development list): “I just built an example of Firebird 3 API usage with FreePascal. As said earlier, working with input/output buffers directly in non-C/C++ is difficult. This requires auxiliary classes. The others things seem ok and easy to use. We need some new functions in the new API, […]

by mariuz at March 05, 2015 04:00 PM

Nodejs Firebird driver version 0.5.1 is released with support for Service Manager functions

node-firebird 0.5.1 released with the following functions implemented for Service Manager: backup restore fixproperties serverinfo database validation commit transaction rollback transaction recover transaction database stats users infos user actions (add modify remove) get firebird file log tracing List of functions implemeted : // each row : fctname : [params], typeofreturn var fbsvc = { "backup" […]

by mariuz at March 05, 2015 01:34 PM

The Wiert Corner - irregular stream of stuff


When the suggestions from Out-of-Memory in RAD XE7 and -noparser from Tried to patch BDS.exe fails to, then this suggestion by Brian Hamilton on G+ might work:

From a post in the EMB forum, a work around for XE7 is

I follow the hint of Thomas Grusche renaming the following files:

  • Borland.Studio.Delphi.dll
  • Borland.Studio.Refactoring.dll
  • refactoride210.bpl

This makes the XE7 IDE usable again.

Just the refactoring feature aren’t available anymore.

This came out of Paul Thornton‘s fun post:

I just had an idea for a great utility. It sits in the tool tray and monitors bds.exe for out of memory errors. Each time one is thrown it:

  1. Restarts the IDE,
  2. Reports a QC incident,
  3. Sends an email to Marco and Jim

Who wants a copy? :)


-noparser stops error insight and the building of the structure pane.  Refactoring and parameter hints still work.



Filed under: Delphi, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at March 05, 2015 11:00 AM

March 03, 2015

Firebird News

Confirmed date for the next Firebird Developers Day

The 12th edition of the Firebird Developers Day will take place in Piracicaba,SP – Brazil, in 08-Aug-2015, at Espaço Beira Rio (same place as last year). The conference site with all the details will enter online in the end of May.

by Cantu at March 03, 2015 08:19 PM

The Wiert Corner - irregular stream of stuff


Markus Joos started a nice G+ thread on anonymous method formatting which ended up into a discussion of functional programming and a peek into what Spring4D 1.3 can offer.

Note you might need to be part of the G+ Delphi Developers Community to read the thread.


Filed under: Delphi, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development, Spring4D

by jpluimers at March 03, 2015 11:00 AM


Odd that the RAD Studio 2015 Roadmap on the Embarcadero site got published by Brian Alexakis which is relatively unknown in the Delphi community.

I wish that ARC for Windows and Linux x86/x64 were on the list: the first since it makes it so much easier to solve ARC problems in libraries, the second since Kylix had a Linux x86 compiler and an RTL (yes, Kylix didn’t have Unicode nor Generics, but maybe the Linux and OS X targets might be too far apart).

I like that there is a roadmap for 2015. And glad with what is on it: 4K support (hopefully also done for the IDE), C++ LLVM compiler, IDE large memory (though I wonder how they do that), native HTTP (hopefully WinHTTP for SOAP and REST).

In the mean time, Kris Houser has indicated XE8 is in beta. Which is good know as well.


via: RAD Studio 2015 Roadmap

Filed under: Delphi, Delphi XE8, Development, Software Development

by jpluimers at March 03, 2015 08:00 AM

March 02, 2015

Lazarus Team Anouncements

Lazarus Release Candidate 2 of 1.4

The Lazarus team would like to announce the second release candidate for the upcoming Version 1.4.

We would like to invite all users to test this release candidate.
Please read below why everybody really should join the testing now.

New in this Version...

March 02, 2015 05:27 PM

February 28, 2015

twm’s blog

Accessing the clipboard in a Firemonkey application

It just took me quite a while to find this information so I’ll put it here for future reference.

A Firemonkey application can not just access the clipboard, it needs to ask the platform whether it actually has one, then get the service interface and use that.


function TryGetClipboardService(out _clp: IFMXClipboardService): boolean;
  Result := TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService);
  if Result then
    _clp := IFMXClipboardService(TPlatformServices.Current.GetPlatformService(IFMXClipboardService));

procedure StringToClipboard(const _s: string);
  clp: IFMXClipboardService;
  if TryGetClipboardService(clp) then

procedure StringFromClipboard(out _s: string);
  clp: IFMXClipboardService;
  Value: TValue;
  s: string;
  if TryGetClipboardService(clp) then begin
    Value := clp.GetClipboard;
    if not Value.TryAsType(_s) then
      _s := '';

(This is for Delphi XE7.)

TEdit and TMemo have got a CopyToClipboard and PasteFromClipboard method. (Which begs the question: Why not implement a generic function for reading and writing a string rather than methods for two controls? I was tempted to use the Visual Basic solution: Put a hidden control on the form and use its methods. Bad memories awake …)

by dummzeuch at February 28, 2015 07:29 PM

Firebird News

FDB Python driver for Firebird v1.4.4 is available for download

FDB Python driver for Firebird v1.4.4 is available for download Here is the changelog

by mariuz at February 28, 2015 04:28 PM

twm’s blog

Updated dzEditorLineEndsFix

I have just updated dzEditorLineEndsFix to address a small problem: The tool can be too fast so the file is already gone when Delphi tries to access it. It now waits 200 ms after detecting the file creation before moving it. This should solve the issue.

It’s available for download from the dzEditorLineEndsFix page on SourceForge.

by dummzeuch at February 28, 2015 12:33 PM

February 27, 2015

Firebird News

Nodejs Firebird driver version 0.4.0 is released with initial support for Service Manager

node-firebird 0.4.0 released with initial support for Service Manager . For the moment only Backup Service is implemented Firebird.attach(options, function(err, svc) { if (err) return; svc.backup( { database:'/DB/MYDB.FDB', files: [ { filename:'/DB/MYDB.FBK', sizefile:'0' } ] }, function(err, data) { console.log(data); });

by mariuz at February 27, 2015 05:07 PM

February 26, 2015

The Wiert Corner - irregular stream of stuff


When developing mail sending software, you don’t want all your test mails to proliferate in the world.

Luckily there are some SMTP servers and services that allow incoming mail, but don’t forward them:

I got two of them from the interesting Stack Overflow question How to Debug/Monitor SMTP Communications? and later I also found about development smtp server for windows.

Note that I also like smtp-cli that Tripp Lilley suggested in his answer: though not a server, it is a nice command-line tool for testing SMTP servers (for instance to see if you got the above servers/services configured right on your client side, or if you have configured your own SMTP server correctly).

The cross platform monitoring tools tcpdump and wireshark (formerly etherreal) are great tools, they are usually way too deep for most of the SMTP problems I encountered. But when the going gets tough they are invaluable, especially Wireshark as it has a great feature Following TCP streams.

I wish there were similar servers and services for POP3, that would have helped a lot with a Delphi Indy project I developed a while ago (:


Filed under: Communications Development, Delphi, Development, Internet protocol suite, SMTP, Software Development

by jpluimers at February 26, 2015 05:00 AM

February 25, 2015

Firebird News

NodeJS C++ client node-firebird-libfbclient v.0.0.13 updated with 64 bit fixes

Firebird C++ NodeJS module is updated with 64bit fixes: Please use this version  if you are on 64bit os : npm install -g firebird-libfbclient

by mariuz at February 25, 2015 08:11 AM

February 24, 2015

Firebird News

Adminer (Database management in single PHP file) with Alpha support for Firebird

Steve Krämer contributed Firebird Adminer driver I’m proud to release a first version of my Firebird-Driver for Adminer. Thought, it’s a pre-alpha version. But it’s a first tool for all of those who are looking for a solution right now

by mariuz at February 24, 2015 05:09 PM

Qt 5.4.1 and Qt creator 3.3.1 Released

Qt 5.4.1 and Qt creator 3.3.1 released with many fixes and enhancements

by mariuz at February 24, 2015 01:29 PM


Updates to LHelp the CHM help viewer for Lazarus

LHelp is the help viewer that is included with Lazarus to view the chm files usually included in releases.

Some time ago some changes were made so that when F1 is pressed and LHelp is started, LHelp would load several help files such as the Lazarus Component Library(LCL) the Runtime Library(RTL) the Free Component Library(FCL) and several others. This is nice because then it's possible to search all the open files for keywords.

The down side to this is that every time a chm is loaded, the Table of Contents updates and the default page of the help file was rendered. So it was very visible as each help file was loaded in LHelp and not very pretty.

Additions the the protocol used for communication between LHelp and Lazarus, made by Reinier Olislagers, allowed LHelp to load the files while it was not yet visible and then be shown afterwards. This worked well but there was a long delay in the time F1 was pressed and the time LHelp became visible. Almost ten seconds on a modern multi-core desktop computer.

Investigation into the cause revealed a couple of slowdowns. The major cause was the speed at which the IPCServer.PeekMessage routine was polled. Only every 200 milleseconds. Sending commands to open 10 files would take 2 seconds. Also it used the syntax if IPCServer.PeekMessage(5) then ... which was not ideal. Changing this to while IPCServer.PeekMessage(5) do ... allows it to handle another message immediately if one is available.

Another factor was the way that Lazarus looked up the chm files to open. It would collect all files in any folder that could contain a chm file without using a file mask. Adding a mask for *.chm files sped this up significantly.

Speedups in LHelp were implemented by adding BeginUpdate and EndUpdate to the protocol. This allows chm's to be loaded without rendering the default page for each chm as it's loaded. When the last EndUpdate is sent, the final requested help topic is the only one rendered.

All of this results in a startup time of ~2 seconds. A big improvement over 10 seconds. The changes are committed in the svn version of Lazarus and will be available in Lazarus 1.4 Release Candidate 2

by (Andrew Haines) at February 24, 2015 02:40 AM

February 23, 2015

Delphi Code Monkey

Awesome new IDE plugin : Test Insight

This plugin is awesome: Test Insight

Go download it now.  It works with DUNIT, DUNIT2, and DUNIT/X.

Do you know what this little image represents?  It represents a whole new level of "flow state" for Delphi developers who want to practice TDD.

You need this. You really need this. Unless you don't ever write tests. In which case,  you should be wearing this:

by Warren Postma ( at February 23, 2015 11:47 AM

February 22, 2015

Firebird News

node-firebird-libfbclient 0.0.12 released with NodeJS v0.12 fixes

C++ NodeJS module is updated with fixes for the Node v.0.12 release. Fix was related to nan version and api changes.

by mariuz at February 22, 2015 06:14 PM

February 21, 2015

The Wiert Corner - irregular stream of stuff

Australian Delphi User Group Members

Melbourne Meeting – February 2015

Monday 16th February

Iterators – Presented by John McDonald

Iterators are a standard design pattern that return a sequence of values. Iterators have one public method – MoveNext, to move to the next value in the sequence and one public property – Current, which returns the current value.… Continue reading ›

by Roger Connell at February 21, 2015 09:58 AM

February 20, 2015

Firebird News

Database Workbench 5.0.10 released

Upscene Productions is proud to announce the availability of the next release of the popular multi-DBMS development tool: ” Database Workbench 5.0.10 “ This release fixes several bugs as reported by our customers. “There is so much new in Database Workbench 5, I don’t know where to start”, says Martijn Tonies, founder of Upscene Productions. […]

by Martijn Tonies at February 20, 2015 04:48 PM

SQL-MVC new release : 0.0.49 on npmjs

The new release brings: Improved Syntax, Quick Tryout in Cloud9 IDE. Please comment on the concept on reddit.

by mariuz at February 20, 2015 04:05 PM

Firebird Foundation Annual General Meeting

Notice is hereby given that the Firebird Foundation Inc. shall convene on Tuesday 3 March 2015 at Noon GMT in the FFMembers mail list forum for its Annual General Meeting and Election of Officers for the new session. Members, please check your email for notifications and links.

by mariuz at February 20, 2015 02:12 PM

Australian Delphi User Group Members

Sydney Meeting – February 2015

Wednesday 25th February 2015 at 6 for 6:15pm start.

Making database revisions easy
– Shane van de Vorstenbosch

This month Shane van de Vorstenbosch will finally stop consuming free pizza and give his inaugural presentation on “making database revisions easy”.  This simple approach can be applied to any type of database and results in an easily managed database revision system combined with the ability to deal with site specific security issues.… Continue reading ›

by Mathias Burbach at February 20, 2015 06:09 AM

February 19, 2015

The Podcast at

February 18, 2015

Firebird News

CodeIgniter 3 (php framework) includes support for Firebird

The Userguide of Codeigniter 3 (still Release Candidate) mentions that now has support for Firebird: Added Interbase / Firebird database support via the ibase driver. This means that the installation package CI 3 includes it, although you could previously use Firebird in CodeiIgniter 2 by the driver developed by Carlos García ( ) . […]

by mariuz at February 18, 2015 05:22 PM

Apple Yosemite (OSX 10.10), SuperServer, and StartupItems

There seems to be a small problem with Firebird on Yosemite (OSX 10.10), it looks like Apple have finally deprecated StartupItems, and currently SuperServer uses this to start itself on reboot.

by mariuz at February 18, 2015 04:54 PM

February 17, 2015

Firebird News

The Lazarus team would like to announce the first release candidate for the upcoming Version 1.4.

The Lazarus team would like to announce the first release candidate for the upcoming Version 1.4. We would like to invite all users to test this release candidate.

by mariuz at February 17, 2015 12:30 PM

Australian Delphi User Group Members

Melbourne Meeting – March 2015

Monday 16th March at 6 for 6:15pm start.

Advanced UI Testing With DUnit2 – Jarrod Hollingworth

The UI testing features of DUnit have been greatly extended in DUnit2 and include recording, runtime scripted playback, control inspection, support for modal windows, and improved support for unnamed and non-VCL controls.… Continue reading ›

by Roger Connell at February 17, 2015 05:59 AM

February 16, 2015

Lazarus Team Anouncements

Lazarus Release Candidate 1 of 1.4

The Lazarus team would like to announce the first release candidate for
the upcoming Version 1.4.

We would like to invite all users to test this release candidate.
Please read below why everybody really should join the testing now.

News in this Version...

February 16, 2015 10:43 PM

twm’s blog

On expiring Dirvish images

Dirvish is a backup solution for Linux (and probably other unixoid OSes). I use it to make a daily backup of one server to a different server located in a different building (it’s not the only backup solution we use but the most convenient one because we can access these files easily). Once set up, it runs automatically and I have configured it to send me an email with the result of the backup and the remaining free hard disk space. I’m not the only one who does that.

The backup server has multiple 2 tb disks mounted as a single btrfs volume, so the resulting disk space is huge. The backup has run flawlessly for over a year until now it started running out of space. So now is the first time I have actually to think about expiring old backups. (Bad Thomas, you should have given that a little bit more thought from the beginning.)

The way Dirvish handles expiry is like this:

You specify a default expiry rule and optionally more detailed expiry rules in either /etc/dirvish/master.conf or in the vault’s default.conf file. If you don’t change anything, most Dirvish installations will set the default to +1 year:

expire-default: +1 year

All this will do is add an Expire entry to the summary file of each image. To actually expire anything you must call dirvish-expire, but that call is usually added to cron automatically by the dirvish package via the /etc/dirvish/dirvish-cron shell script:

# other stuff ...
/usr/sbin/dirvish-expire --quiet && /usr/sbin/dirvish-runall --quiet

Now, expiring every image after one year is probably not the best backup strategy. You usually want to keep one copy every week, every month and every year for a longer period, maybe even forever. So more complex rules are required and must be added to either /etc/dirvish/master.conf or default.conf of an individual vault. I opted for keeping Friday backups forever and deleting everything else after 9 months, so the configuration looks like this:

expire-default: +9 months

# keep Friday backups forever
# (for everything else we use the default from above)
#       MIN    HR      DOM     MON     DOW     STRFTIME_FMT
        *       *       *       *       fri     never

The rules follow crontab format, so the line above means:

  • ignore the minute
  • ignore the hour
  • ignore the day of the month
  • ignore the month
  • only for Friday

Here is a good explanation about how these rules work.

Now, since all this does is adding an entry to the summary file of each image, I have a problem: This takes care of all future backups, but all existing images were created with an expire-default of +1 year, so they contain corresponding entries like this:

Image: 2014-02-21_12-00
Reference: 2014-02-20_12-00
Image-now: 2014-02-21 12:00:02
Expire: +1 year == 2015-02-21 12:00:02

So the image was taken on 21 FEB 2014 and will be expired on 21 FEB 2015. That is a Friday backup, so I want it to be kept forever. Other images also have an expire entry of +1 year but I have to free up some disk space and therefore want to expire them after 9 months already.

What this means is that I need to change the expire entry in the summary files. All two hundred and something of them. That’s not something you want to do by hand because it’s boring and error prone.

I could probably write a shell script (but since I rarely do that it would also be quite error prone) or a Perl script (same problem even though I have got more practice with that). So I’ll write a Delphi program and access the files via a Samba share.

by dummzeuch at February 16, 2015 10:11 AM

February 15, 2015

The Wiert Corner - irregular stream of stuff


Talking about Delphi 2007 stuff:

I needed to generate a bunch of groupproj files for Delphi 2007 (I wrote about legacy yesterday), but found out that my GenerateGroupProjConsoleProject was generating too good XML.

So here is the change-set:

Allow generating Delphi 2007 .groupproj files (uses a string search/replace hack as Delphi 2007 uses xmlns=”” which you cannot set manually through the normal IXMLNode ways especially not with ADOM).

TODO: verify if/how the GroupProj.xsd can be adopted to this not so nice XML that Delphi 2007 uses.


via jeroenp / / commit / f7c23ffe4cb1 — Bitbucket.

Filed under: Delphi, Delphi 2007, Development, Software Development

by jpluimers at February 15, 2015 09:17 PM

Andy's Blog and Tools

JSON parser JsonDataObjects is now on GitHub

It all started with a new DDevExtensions feature I’m working on, or was working on before my JSON parser project took over. For this new feature I needed to write and read some information to and from a file. XML was out of question, so I came up with a “one line per entry” format. As the feature grew I “suddenly” needed to write more structured data. After trying to do that in a “one line per entry” format the I/O code became such a mess that I deleted it and came up with the idea to use JSON for the file.

After browsing the web and looking into the different JSON parsers for Delphi, I decided that I didn’t need such complicated and feature rich parsers and it would be fun to write my own parser. So I started, not knowing that my class names would be the same of Delphi’s JSON parser, because I never looked into it before I started benchmarking my parser against it.

And here we are. The DDevExtensions feature is on halt and my brand new JSON parser is available on GitHub. It uses a lot of low level tricks to get as much performance out of the different Delphi compilers and RTL and beats Delphi’s JSON parser in performance and memory usage, by far.


  • Fast dual JSON parser for parsing UTF8 and UTF16 without conversion
  • Automatic creation of arrays and objects
  • Easy access mode with implicit operators
  • Compact and formatted output modes
  • Win32, Win64 and ARM Android support (MacOS and iOS may work)
  • Supports Delphi 2009-XE7

Some internal tricks:

  • Elimination of unnecessary _UStrAsg and _UStrClr calls, reduces CPU locks
  • ARC: Faster ARC handling by doing it by hand without the virtual method calls (RSP-9712)
  • Storing string literals where possible instead of creating a heap string for them
  • Caching the last string literal pointer for faster repeated name access. Broken in XE7 (RSP-10015)
  • Specialized own StringBuilder implementation that doesn’t need to copy the buffer to the final string
  • Fast String to Int64 conversion implemented in assembler for x86 and x64
  • Fast String to Double conversion

by Andreas Hausladen at February 15, 2015 07:21 PM

IDE Fix Pack 5.8 for 2009-XE7 released

A new release of IDE Fix Pack for RAD Studio 2009-XE7 is available. The new version 5.8 is available for all versions including the versions that I marked “unsupported”. So all 2010, XE2-XE5 users can update from version 5.5 to 5.8 what gives them the “EditorLineEnd.ttr” patch.

This release brings a major performance improvement. If you have large packages with dependencies to other large packages, the compiler spends a lot of time in cleaning up the unit dependencies what can result in a long delay (up to 5 seconds) after you hit a syntax error in the active package project. IDE Fix Pack addresses this bottle neck and reduces the delay to less than half a second.

One of the RAD Studio 2009 .NET code patches in IDE Fix Pack caused the IDE to run into a NullReferenceException when started on Windows 8.1. This patch is now disabled if Windows 8.1 or newer is detected.

If you have copied the rlink32.dll from XE7 to an older RAD Studio version to bypass the “too many resources to handle” linker error, the IDE Fix Pack will now skip its own rlink32.dll patch as it isn’t necessary for XE7’s rlink32.dll.

Some people had problems with installing IDE Fix Pack because the installer is compiled against rtlXxx.bpl and vclXxx.bpl. And if those packages aren’t in the PATH environment variable the Installer failed with the usual standard Windows error message. To work around this issue and not to increase the IDE Fix Pack’s installer’s file size (I know, who cares), I have rewritten the installer in plain “old” WinAPI.

The new IDE Fix Pack changes the behavior of the [F6] (IDE Insight) key in XE5 and newer. If you press [F6] in the editor, IDE Fix Pack will now call “SelectAll” on the IDE Insight edit control so that you can overwrite the old edit text without doing the selection yourself.

IDE Fix Pack Downloads:

Name IDE Version File Size Downloads Added
IDE Fix Pack 5.8 2009 (UP4) IDEFixPack2009Reg58.7z 177.14 KB 17 times 2015-02-15
IDE Fix Pack 5.8 (unsupported) 2010 (UP5) IDEFixPack2010Reg58.7z 173.03 KB 21 times 2015-02-15
IDE Fix Pack 5.8 XE (UP1) IDEFixPackXEReg58.7z 158.89 KB 17 times 2015-02-15
IDE Fix Pack 5.8 (unsupported) XE2 (UP4+HF1) IDEFixPackXE2Reg58.7z 232.42 KB 16 times 2015-02-15
IDE Fix Pack 5.8 (unsupported) XE3 (UP2) IDEFixPackXE3Reg58.7z 184.57 KB 11 times 2015-02-15
IDE Fix Pack 5.8 (unsupported) XE4 (UP1) IDEFixPackXE4Reg58.7z 185.27 KB 15 times 2015-02-15
IDE Fix Pack 5.8 (unsupported) XE5 (UP2) IDEFixPackXE5Reg58.7z 184.41 KB 11 times 2015-02-15
IDE Fix Pack 5.8 XE6 (UP1) IDEFixPackXE6Reg58.7z 305.73 KB 21 times 2015-02-15
IDE Fix Pack 5.8 XE7 (UP1) IDEFixPackXE7Reg58.7z 316.38 KB 77 times 2015-02-15

fastdcc Downloads:

Name IDE Version File Size Downloads Added
fastdcc 5.8 2009 (UP3) fastdcc2009v58.7z 76.4 KB 3 times 2015-02-15
fastdcc 5.8 (unsupported) 2010 (UP5) fastdcc2010v58.7z 80.42 KB 3 times 2015-02-15
fastdcc 5.8 XE (UP1) fastdccXEv58.7z 82.34 KB 3 times 2015-02-15
fastdcc 5.8 (unsupported) XE2 (UP4+HF1) fastdccXE2v58.7z 106.5 KB 4 times 2015-02-15
fastdcc 5.8 (unsupported) XE3 (UP2) fastdccXE3v58.7z 116.65 KB 2 times 2015-02-15
fastdcc 5.8 (unsupported) XE4 (UP1) fastdccXE4v581.7z 112.49 KB 4 times 2015-02-15
fastdcc 5.8 (unsupported) XE5 (UP2) fastdccXE5v58.7z 113.53 KB 2 times 2015-02-15
fastdcc 5.8 XE6 (UP1) fastdccXE6v58.7z 141.13 KB 2 times 2015-02-15
fastdcc 5.8 XE7 (UP1) fastdccXE7v58.7z 150.11 KB 16 times 2015-02-15


  • Fixed: IDE Fix Pack tried to patch the fastdcc32/64/aarm.exe if it was renamed to dcc32/64/aarm.exe (XE6-XE7)
  • Fixed: Windows 8.1 compatibility with .NET code patch (2009)
  • Added: Compiler cleanup code performance optimization for large packages (2009-XE7)
  • Added: If XE7’s rlink32.dll is detected in older Delphi versions the “too many resources to handle” patch is skipped
  • Added: IDE Insight [F6]-Key calls SelectAll (XE5-XE7)
  • Improved: IDE Fix Pack StringLists use CompareStringOrdinal instead of CompareString
  • Changed: Installer/Uninstaller doesn’t require rtl.bpl/vcl.bpl in the PATH anymore

by Andreas Hausladen at February 15, 2015 02:59 PM

February 14, 2015

The Wiert Corner - irregular stream of stuff


Marketing blast of the past via David Millington – Google+.

I got most of the Delphi versions from D2-D6 on PC Plus magazine cover CDs, an English magazine also published in Australia. I wouldn’t be here now if I hadn’t had access to those free copies of Delphi when I was a kid.

and this one:

It came with a promotional copy of Borland Delphi… and unlike other “promotional” software often distributed on the cover disks of popular computer publications at that time, this one had absolutely no restrictions and was fully functional.

From a really nice article by Simon Stuart.

Who thought that he was ever at the Basic side of things (:

And of course it ends with correct Delph-ee pronunciation to be right: the community at large has spoken.

Given this week went very different than I anticipated, here is a much shorter story than I hoped for. I’ll focus on the early days, you can read on the later and current days here on my blog.

My own early Delphi life

For me, my Delphi life has been pretty straight forward. It started with the early days and Turbo Pascal leading to Delphi.

The Turbo Pascal days

I already wrote about my early programming days where I learned Turbo Pascal at school around the age of 14. I admit that back then not all copies were ehm “boxed”. Most of them actually came through the university channels (but technically I wasn’t a student yet).

A few years ago, I wrote about my university and early BBS/fidonet/email period as well (with gMail on a VAX/VMS being an alias for Gold Mail) which started my programming career as well: I’ve been an independent software developer since 1989 (the Dutch Trade Register keeps records for a long time).

I didn’t mention my Fidonet Pascal.028 and Fidonet Pascal activity, did write about my email and compuserve activity but forgot to mention one of my first Public Domain tools written in Turbo Pascal for Windows: the Shoot! screen capture tool.

My email activity got me into contact with lots of interesting people all around the world, like Peter Sawatzki from Germany.

Note this was back when the Internet wasn’t called as such, there was EARN (now TERENA) in Europe interconnected with BITNET in the USA. Tools were like LISTSERV for mailing lists, BITNET Relay a.k.a. Inter Chat Relay Network and TRICKLE file distribution by email – hello UUENCODE! – the SIMTEL20 software archive and lots more.

The email combined with my CompuServe activity (way before the Google indexing days) got me into contact with the Borland R&D team and TeamB members. That was about a year before the Borland/Turbo Pascal 7 launched and shortly before I started working for Bolesian (yes, Bob Swart and me were colleagues there). I left Bolesian because a combination of software development lead wanting me to move from a Pascal gig to a C++ gig and the company got acquired almost over night by a huge firm turning the employees from a vibrant bunch into grey numbers practically over night. Within 3 months after I left, the core of Bolesian quit and formed Everest (now part of TSS) saving the unique aspects of the team.

I took Peter Sawatzki to the 1992 Turbo Pascal 7 launch event in Frankfurt (it was the first time we met in person after having had email contact for years) where we had a really nice chat with Anders Hejlsberg (I keep using all the tools and platforms he helps creating) and Zack Urlocker.

That was also the time when the Language Manager of the Dutch Borland office went back to his journalist passion, and I got invited to do many technical presentations for them. I visited lots of conferences (the Borlando 1994 conference my first USA one) where I met Masoud Kamali who started the famous EKON (Entwickler Konferenz) in Germany. I spoke on all but one there.

The really cool thing is that people still use Turbo Pascal: there is a even a nice VM with MS-DOS running Turbo Pascal.

My early Delphi days

Borlando was actually leading to Delphi (then dubbed Delphi 95 even before Microsoft decided to call the Windows for Workgroups 3.11 successor Windows 95): some portions of Delphi were already shown at Borlando.

It was a great conference, with a marvellous vibe next to great technical sessions. The off-conference was just as important as the sessions. I enjoyed listening to the Pascalettes, bumping into the TurboPower Software crew live and meeting people like Julian Bucknall, Philippe Kahn, David I and many others.

Live conferences still are an important part of gaining knowledge. I’ve spoken on many of the Borland/Inprise/CodeGear organised ones, and a lot of other conferences too. Talking with real people still beats any and all virtual conferences (: Hopefully a USA conference will be organised some day again, as the non-USA conference (in Europe there is EKON, BeDelphi, IT-DevCon, DAPUG etc and other continents have interesting conferences too), but the times of global Delphi related conferences are over just as some other global IT-related conferences died.

Back then, Turbo Pascal wasn’t the only thing is my toolbox, and nowadays, Delphi isn’t either. The real charm of a good toolbox is to be able to choose a combination of tools best suited to get a job done.

Delphi versions I really liked in the early days were 2, 3, 5 and 7. Using them, I slowly but steadily began to like the non-UI part of software more than the UI part. Which means coding a lot, as opposed to double clicking and throwing in a bunch of lines on the forms’ code. That’s where agile aspects (unit testing, design patterns, etc) pay off a lot too. As a bug hunter and problem solver, I love the improvements of the debugger and tools like ModelMaker Code Explorer (which I take any day over the built-in refactoring tools) or CodeRush (that is still there for .NET).

Hopefully the acquisition of Castalia and Usertility will improve the stock support in Delphi. On the other hand, it will make it harder for the 3rd party market to come up with something similar.

Later Delphi life

You can read most of my recent Delphi history at my blog that started in 2009. Before that, I was co-owner of Oosterkamp training | consultancy (now known as NForza) doing Delphi and .NET work for years and organising Delphi post-launch events for most Delphi versions until about 2009 (a few years after I left and they started to focus more on .NET than Delphi).

I’m still using Delphi. In my contract life not as much as I would like: it is harder to find Delphi contracts near to where I live (say within an hour of one-way travel). Since I became legal guardian of my brother in 2004, I’ve favoured contracts closer to me. Most of the longer contracts around here that involve Delphi parts use older versions of Delphi and recent versions of .NET. The shorter contracts though tend to have more freedom of choice for recent Delphi versions.

In my non-contract life, I use Delphi a lot. It is still one of the most productive tools around, and I love the surge of new open and closed source projects like Spring4D.

I’m picky, and quality of Delphi still varies (though since about Delphi XE2 most of it consistently is above Delphi 7 level). For things that cannot be ported to Unicode, I use Delphi 2007, but my Delphi version of choice currently is Delphi XE6: a nice balance between features and issues, though size is a big issue to me especially on SSD.

A few of my big wishes for Delphi:

  • undo/redo in the designer (that would be a big improvement for the vast majority if Delphi users)
  • helpers for interfaces (this would enable to write LINQ for Delphi)
  • fix incomplete RTTI
  • ARC compiler for Win32 in addition to the non-ARC one (this would making debugging of ARC stuff a lot easier and faster)
  • ARM+x64 Linux and x64 Mac compilers (for server side stuff)
  • more open and stable Embarcadero sites (docwiki, Quality Portal, Forums, etc)

It will be very important for Embarcadero to focus on the things 3rd parties cannot do or can only do with a truckload of effort: IDE, Compilers, Debugger proxies, base RTL, interop. That will keep a healthy balance between Embarcadero and the 3rd party vendors.


via: OTAPI – Delphi Week – Where My Delphi Life Began.

Filed under: Delphi, Development, Software Development

by jpluimers at February 14, 2015 11:00 AM

February 13, 2015

The Wiert Corner - irregular stream of stuff


Normal people would give Valentine presents today.

But 20 years ago, Borland thought it was a nice idea to release Delphi. Then a revolutionary new tool and lots of scepticism. Now – after 20 years – still going strong, despite all kinds of funny things that management at Borland, InPrise, etc did and the wild ride the market had.

Happy birthday Delphi!


Filed under: Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development

by jpluimers at February 13, 2015 11:01 PM


After a hectic week bringing back memories from a long time ago, I remembered the really early Delphi days.

Long before QC2747, back when it was still called AppBuilder, several people – including me – made the wish for an undo/redo functionality on the Delphi compuserve board.

Back then, the argument was that the designer needed to be restructured to do that. Now that it has – to accommodate FMX – and it is time, especially for the vast majority of Delphi users primarily using the designers to get work done.

So my wish, after 20+ years of Delphi use:

Please bring multi-level undo/redo functionality in the Delphi designer (form, datamodule, etc).


Filed under: Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development

by jpluimers at February 13, 2015 11:00 AM

February 12, 2015

Firebird News

Firebird Lua+ffi binding – A complete ffi binding of the Firebird client library.

Fbclient – A complete ffi binding of the Firebird client library. This is Work in progress In the meantime, you can use the old fbclient which is stable and complete. Also you can contribute on github. ps: i find the code quite clean and readable

by mariuz at February 12, 2015 08:41 AM


From Delphi to D

You can take D as easy bridge to learn C++, or you can take D as modern programming language and replaces the ancient Pascal or even C.


“Class References” in Delphi/Pascal

SuperClass = class
    x: integer;
    constructor Create(value: integer)
      x := value;

SubClass1 = class(SuperClass)

SubClass2 = class(SuperClass)

MyMetaClass = class of SuperClass;

//Assigning MetaClass of subclass, 
//compiler only accept classes that derived from SuperClass

   MC: MyMetaClass;

   MC = SubClass1;

//Creating object

   MyObj = MC.Create(10);

You can use classinfo, but is not a really like metaclass in Pascal but

it help you porting your projects

class SuperClass{
    int x;
    this(int value){
        x = value;

class SubClass1: {

class SubClass2: {

Classinfo metaclass = SubClass.classinfo;

//Creating object

myObj = metaclass.create();


You must have a default constructor to create it “this”, if no, myObj

will be null, and object not created

You can not use constructor with parameter like

    myObj = metaclass.create(10);

here you can assign to “mc” any class, not like Pascal that check if it

derived from class defined


You can use Associative Arrays (AA) of your enum.

enum MyEnum (A, B, C)

bool[MyEnum] mySet;

or you can make alias for it

bool[MyEnum] MySet;

MySet mySet;

mySet = [A: true, B: true];
mySet[b] = true;

//Notice "in" operator in D meant the key is exists, not meant exists and equal to true
if (b in mySet){


Private, Protected, Public

class MyClass{


Not like Pascal, Every method is virtual until you mark it as final.



String index started from 0
you can use length to get size

int i = s.length;


s = "Hello ";
s = s ~ "World";


import std.string;

p = s.indexOf(".");


You can use slicing, because string is array of char

t = Copy(s, 1, 5);

In D

//Like this
t = s[0..5];
t = s[0..$]; //to the last of string

Notice that if you make range from x to same value it will return slice of empty string

t = s[2..2]; //Return empty string in t
t = s[2..3]; //Return one char index by 2


You can use the powerfull templates, this example make it clear to understand

  generic TList<T> = class
    procedure Add(Value: T);


  TIntegerList = specialize TList<Integer>;
  TStringList = specialize TList<string>;  

In D language

class List(T){
  void add(T t){
    //adding t

class StringList: List!string{


debug, release, version(windows)



debug writeln("Hello debug world");

//only for windows platform

You can define it also like this example

import std.stdio;

    debug = level1;
    debug = level2;
    version = beta;

void main()
    debug(level1) writeln("level1...");
    debug(level2) writeln("level2...");
    version(beta) writeln("it is beta version");

And you can use “static if” to check condition at compile time, and stop the compilation useing “static assert”

struct MyType(T)
    static if (is (T == float)) {
        static assert(false, "float type is not supported");



You dont need add help of class, just add global functions with paramter type of your class as first parameter.

class MyClass{

void doSomething(MyClass obj, int x){


MyClass obj = new MyClass;


Note: You can not access private or protected members on MyClass.

by Zaher Dirkey at February 12, 2015 07:11 AM

February 11, 2015

Dr.Bob's Delphi Notes

Delphi 2007's Indy 10 version of IdHTTPWebBrokerBridge.pas

Does anyone have a unit called IdHTTPWebBrokerBridge.pas as part of Indy 10 that can be used with Delphi 2007? I'm asking, because for a Delphi 2007 Indy 10 stand-alone HTTP SOAP server, I would like to use this unit.

by (Bob Swart) at February 11, 2015 05:00 PM

Delphi Code Monkey

Toronto Delphi User Group Meeting

I'm the speaker at the upcoming February 24th Toronto Delphi User Group meeting.

The group had been a bit idle for some time, and we're re-launching it.  Probably not every month, but we'll see what demand and attendance calls for.

Location : Toronto Northern District Library, 40 Orchard View Blvd.
Time: 6 to 8 PM
Date: Feb 24

Please RSVP at the TDUG blog, here:

The TDUG blog post is here.

Delphi at 20: A Retrospective

My talk will be about 20 years as a Delphi Programmer.  It will be a Retrospective with a bit of a Forward Look as well.   I think Delphi is a young, and rapidly growing technology, but I also happen to have a rather large amount of experience as a user of the product, and as a passionate advocate of Delphi.  
It's  time to look back, and time to look forward.  Bring your own retrospective goggles.

by Warren Postma ( at February 11, 2015 12:14 PM

February 10, 2015

Firebird News

FBMon a command-line tool written in Python

IBPhoenix announce the availability of  FBMon (a command-line tool written in Python that allows you to work with Firebird Monitoring Tables) on its next Developer DVD due out in February.

by mariuz at February 10, 2015 02:45 PM

The Podcast at

Deep Dive into Futures and the Parallel Programming Library

To follow-up with my Parallel For Loops skill sprint last week (lots of good resources there), today I did a deep dive into the Parallel Programming Library (PPL) including Futures, Tasks and custom thread pools.

Here are the slides:

And you can download my Tasks and Futures sample to see how to create, start, check and cancel both Tasks and Futures. Check out the C++ Parallel Examples to see how to use Futures and the PPL in C++.

Until the replay of my Skill Sprint is posted, you can watch this video from Allen Bauer covering the Parallel Programming Library Architecture from CodeRage 9.

Be sure to sign up for and check out the other Skill Sprints.

by Jim McKeeth at February 10, 2015 02:16 PM

The Wiert Corner - irregular stream of stuff


Russel Weetch last week posted a few pictures of Kylix related T-Shirts (wow, I had forgotten that Kylix was released back in 2000!) about Living la vida Linux.

To which I commented:

Kylix was great. But too late and aimed at a Linux desktop market that never took off. Who’d imagine then that a semi-open system based on Linux and JVM would power most of the mobile world and a closed system based on BSD would generate a huge part of the paying app world?


via Sorting out my T-shirt shelves and there, amongst my old surfing ones, I found….

Filed under: Delphi, Development, Kylix, Software Development

by jpluimers at February 10, 2015 11:00 AM


Interesting, I never knew that Process Monitor has had an API to send messages to, but it has had this ability for almost 5 years: See the I/O You Caused by Getting Your Diagnostic Tracing into Process Monitor | Wintellect.

I did know about OutputDebugString and the DBWIN protocols, but this was new.

The ZIP file for Process Monitor is offline (but you can find it by searching for, and contains .h files and a .NET example.

Thanks Oliver Giesen for the Delphi translation!


via: Interface unit for sending debug messages to SysInternals ProcessMonitor « bl.OGware.

Filed under: .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development

by jpluimers at February 10, 2015 05:00 AM

February 09, 2015

The Wiert Corner - irregular stream of stuff

The Wiert Corner - irregular stream of stuff


With the common-place of High DPI it is surprising the IDE hasn’t gotten more love in this respect.

The VCL can do it (Dalija Prasnikar knows an awful lot about Delphi High DPI), but the IDE can’t yet (it is *****^H^H^H^H^H very irritating that you need to login to see quality portal reports though apart from Google not being able to index them: the main reason I don’t file bug reports any more – QC is no alternative as it it is more or less defunct – but I digress).

With Delphi turning 20 years old this week, hopefully Embarcadero comes out with official steps to make recent versions of Delphi XE* High DPI aware.

Right now there is only some hearsay it might work: Does anyone have idea about how to make Delphi IDE (XE7) support High DPI…



High DPI awareness is must have feature for XE8.

Not only for Delphi IDE, but also for VCL and FMX frameworks.

via Dalija Prasnikar – Google+.

Filed under: Delphi, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at February 09, 2015 06:37 AM

The Podcast at

Factorials, Combinations & Permutaions

This is some code I wrote a long time ago as part of the TDAG mailing list. It calculates Factorials, the number of Combinations and Permutations. This is the mathematics, it calculates the number of Combinations and Permutations, it doesn’t create each different Combination and Permutation.

They take Cardinals as parameters because it doesn’t make sense to accept negative numbers. Keep in mind that factorials get big really, really quickly, so if you use too large of numbers then it will overflow even the Int64.

unit FactCombPerm;


// Parameters are Cardinal because Int64 isn't Ordinal
//  Besides, Factorial(100) will overflow Int64 already.
function Factorial(const ANumber: Cardinal): Int64; overload;
function Factorial(const ANumber: Cardinal;
                   const AStop: Cardinal): Int64; overload;
function CombinationUnOpt(const ACount, AChoose: Cardinal): Int64;
function Combination(const ACount, AChoose: Cardinal): Int64;
function Permutation(const ACount, AChoose: Cardinal): Int64;


function Factorial(const ANumber: Cardinal): Int64; overload;
// n! = n * (n-1) . . . n(2)
  lCtr: Cardinal;
  Result := 1;
  for lCtr := ANumber downto 2 do
    Result := Result * lCtr;

function Factorial(const ANumber: Cardinal;
                   const AStop: Cardinal): Int64; overload;
// Factorial with a stop point (needed in the optimized Combination routine
// if no AStop is specified then is the same as Factorial
  lCtr: Cardinal;
  Result := 1;
  if ANumber >= AStop then
    for lCtr := ANumber downto AStop do
      Result := Result * lCtr;

function CombinationUnOpt(const ACount, AChoose: Cardinal): Int64;
// n!
// n_C_k = ----------
// k!(n - k)!
  if AChoose < ACount then
    Result := Factorial(ACount)
      div (Factorial(AChoose) * Factorial(ACount - AChoose))
    Result := 0;

function Combination(const ACount, AChoose: Cardinal): Int64;
// n!
// n_C_k = ----------
// k!(n - k)!
// with optimizations even!
  if AChoose < ACount then
    Result := Factorial(ACount, succ(ACount - AChoose))
      div (Factorial(AChoose))
    Result := 0;

function Permutation(const ACount, AChoose: Cardinal): Int64;
// n!
// n_P_k = --------
// (n - k)!
  if AChoose < ACount then
    Result := Factorial(ACount)
      div Factorial(ACount - AChoose)
    Result := 0;


My original optimization had a bug in it, but Bryan Mayland fixed it for me. This is old code, and there are probably some options to optimize it better. I’d love input, suggestions, etc.

by Jim McKeeth at February 09, 2015 02:56 AM

February 08, 2015

Castle Game Engine news

Integration with Google Play Game Services (leaderboards, achievements and more) on Android!. And biling...

Integration with Google Play Game Services (leaderboards, achievements and more) on Android!. And biling (in-app purchases) on Android! And immersive mode (100% fullscreen  on Android 4.4)!

New option android_project was added to our build tool to support custom Java and manifest code in your Android project. We have a new game that actually uses this feature to integrate with Google Games to register highest scores (Google automatically makes a leaderboard from it), and achievements. Also it uses biling (in-app purchases) and immersive mode (100% fullscreen on Android 4.4)!

February 08, 2015 10:05 PM

February 07, 2015

Firebird News

FirebirdSQL official github umbrella

Adriano created the official firebirdsql umbrella on github , it is now filled with the Firebird core mirror.

by mariuz at February 07, 2015 10:09 PM

Fbx has firebirdsql extensions for #golang database/sql package

Brent Rowland announced: Fbx – general purpose extensions to golang’s database/sql for Firebird.

by mariuz at February 07, 2015 09:31 AM

Optimistic Case-Insensitive String Hash

A trivial way to turn a case-sensitive String hash function into a case-insensitive one is to to pass a lower-case (or upper-case) version of the String. However, in our days of Unicode strings, this is not innocuous… Running a quick benchmark on SimpleStringHash (a FNV-1a derivative), I got the following figures (execution time, lower is better): SimpleStringHash(…

by Eric Grange at February 07, 2015 09:00 AM

February 06, 2015

הבייט הלבן


אחד הדברים שהכי רציתי לרספברי פיי החדש (כלומר, החדש אצלי, לא הדגם החדש…) היה התקנה נורמלית של סביבת הפיתוח Lazarus לשפת Object Pascal. אחרי הרבה עבודה שחורה, וכמה טקסי מאגיה שחורה עוד יותר, זה הצליח. מה זאת אומרת התקנה נורמלית, ולמה זה טוב? מערכת ההפעלה Raspbian מגיעה עם מפענח פייתון מובנה, והצלחתי להתקין בקלות את … להמשיך לקרוא פייסקל

by עידו גנדל at February 06, 2015 09:56 PM

XE Plus Pack – Release 17

After a much longer testing phase than expected, the newest release of XE Plus Pack for Delphi XE6 and Delphi XE7 is now available for download.

XE6 Plus Pack – Download for XE6
XE7 Plus Pack – Download for XE7

The main new feature for Release 17 is the ability to quickly generate and apply all of the required icon and splash images required for a mobile (iPhone or Android) application.

Image Generator

This new feature is called Image Generator and is accessible from the Project menu in the IDE. It is only available when a FireMonkey project is loaded within the IDE.

Image Generator - Design

You have the ability to add use three elements to compose your splash images.

  1. App Icon
  2. Backgroun
  3. Company Logo

Image Generator - Output

Once the images have been generated, you can review the final creations before applying the images to the correct elements in the active project. The images are applied for All Configurations. It does not support selecting whether to apply the images to Debug and/or Release. An enhancement for the next release – if deemed necessary.

The details of the design can be save to an “xeppsettings” file in the same folder as the project. Currently this is a binary file, however it will be changed to an XML or text readable file for easier use with source control.

More information about the Image Generator expert will be available soon.

View Units Dialog

An enhancement has been made to the View Units dialog which is updated due to the Visual Forms feature. This new dialog now gives the option of viewing either the selected files thumbnail (if available) or all available thumbnails. Additional options will be added to the View Units dialog in future releases.

View Units - Single View

To toggle the thumbnail view mode, use F8.

View Units - Thumbnail View

by JED at February 06, 2015 01:15 PM

The Podcast at

DelphiWeek and CodeBattles

I hope you are all as excited about DelphiWeek as we are. On Wednesday we have CodeBattles scheduled. These are a fun way to show off your programming skills. We all use a Google, DocWiki and Stack Overflow during programming. The coding challenge isn’t a trivia competition, but an opportunity for you to show off your problem solving skills and use some of the latest features in XE7.

It will take place Wednesday 11-Feb-2015 from 8 AM to 10 AM PST. All coding will be done online during this time window via GoToWebinar.

The scoring is a combination of points based on features implemented and public voting. David I. is planning to make plaques to send the winner. I think it would be great to hang a plaque in the office with the winner’s names too.

If you want to take part in the CodeBattle, complete this short survey with your information. We are considering working with both teams and individuals, if we get enough sign ups for both. So far we already have a few individuals. It is open to all Delphi developers everywhere. Even if you are not comfortable with English, we can chat via Google Translate.

Interested? Sign-up today!

by Jim McKeeth at February 06, 2015 06:53 AM

February 05, 2015

Firebird News

Firebird Server for Android started using remote interface

There are several patches landed in svn tree that enables firebird to have a full build (server is with remote interface) on android. It was possible before to have a firebird embedded build.

by mariuz at February 05, 2015 07:40 PM

Firebird – where we stand and where we go

The virtual session that Dmitry Yemanov gave last year in the 11th Firebird Developers Day is now publicly available in YouTube. The audio is in English, and there are subtitles in PT-BR available. In this video, Dmitry talks about the most recent developments done in FB 3, comment about the reasons for the delays of the releases, […]

by Cantu at February 05, 2015 04:44 PM

Pascal Warrior's journey

Comparing FPC CGI vs FPC Embedded Web Server Application

Recently, I just tested and quite satisfied with its service. Despite free, you get a full blown OS with address that can be accessed publicly for hosting your web app. Suddenly, I think this is a good time for comparison game again.

The red corner will be FPC CGI runs though Apache and the blue one will be FPC Embedded Web Server. The source is hidden (it's my private project that eventually will be a commercial web), but the tested page is a simple templated page. The testing is done by with following result:
Quick analysis shows that embedded web server serves slightly less requests than CGI on Apache. Scrolling down a little it also shows that Apache serving time is 2 - 2.5 seconds per request, while embedded web server is consistently serves in 3 seconds per request, with 3.2 seconds in the first request probably due to loading. Scrolling down again is what surprises me. The CGI has several failures while the embedded web server successfully delivers all the requests. Note that to be fair all resources (CSS) is served by the CGI as well, just like the embedded web server.

The conclusion is, embedded web server does its job well, despite it doesn't support Keep-Alive header (for persistent connection) yet. It serves a number of requests similar to Apache and it delivers all requests completely. It seems to be good enough for small to medium traffic web applications.

by (leledumbo) at February 05, 2015 12:04 PM

The Wiert Corner - irregular stream of stuff


On my research list, by the maker of DeHLEduka+ | YAPB.

Would be cool to make a mobile version of that some day.


Filed under: Delphi, Development, Software Development

by jpluimers at February 05, 2015 05:00 AM

The Podcast at

Interview with Darren Kosinski

Talking with Darren Kosinski from the Embarcadero R&D team and his role in the FireMonkey platform. Also a brief introduction to the Parallel Programming Library, and Delphi Week 2015 (Feb 9th – 13th).

Darren Kosinski

Talking with Darren Kosinski from the Embarcadero R&D team and his role in the FireMonkey platform. Also a brief introduction to the Parallel Programming Library, and Delphi Week 2015 (Feb 9th – 13th).

by Jim McKeeth at February 05, 2015 12:22 AM

February 04, 2015

It's a blong, blong, blong road...

Two Decades, Eh?

Well, well, well, it turns out I’ve been working for myself for two decades now! I left Borland in January 1995, thinking I could manage maybe about 5 years if I was lucky and did well before I got another full time job. And now we’re in 2015! How time flies when you’re having fun :o)

Oh yeah, and a couple of weeks after I left my last employed job Delphi 1 came out, and that was awesome too! And my oh my, it’s nearly the 20th anniversary of the launch date of this great programming language: Feb 14th 1995.

To celebrate this milestone, Embo is hosting an online Delphi Week leading up to the Feb 14th launch date anniversary, Feb 9th to 13th. You can read more about it on this community news post and this community event post. Do read up on it and try and join in – it should be fun :o)

by Brian Long ( at February 04, 2015 02:43 PM

Delphi Code Monkey

Odds and Ends: Another CodeSite thing and a thought about the 20th birthday of Delphi

I think I forgot to mention a lot of features in my CodeSite review, but there's one that just made me so happy. I actually smiled. While coding. I know eh?

  Imagine this. I'm persisting some complex structure as XML and writing that to the DB. Writing that big mess out to a plain text log file quickly gets you into that "Drinking from the Firehose" mess.  But what if your viewer just showed a quick summary like "Variable = <?xml version .....".  Then you click it, and you can inspect that row "zoomed in", using the Inspector.

Here is a sample:

Now, instead of feeling like I'm drinking from the firehose, I feel like the guy who can pick exactly the rows he wants, and find the items inside he needs.  You really need to try sending giant blobs of text to CodeSite, as ONE CodeSite.Send, and using the Inspector pane, to realize, hey, there is NO reason to use anything else for logging.

It's that good.

I suggest that you have specialized DIFFERENT sets of IFDEFs and use these giant dumps to codesite, only when you need to use them, like this:

   CodeSite.Send( 'LoadSomething',  AXMLString  );

Delphi 20th Birthday Party Coming Up

Hey folks, did you realize that Delphi is going to be 20 in a few weeks?  You know what would be a good idea to celebrate? Find your local Delphi user group or meet-up, and join them for a beverage, at some point in February 2015.  I plan to do just that in Toronto.

Update:  Register now for Delphi Week 2015!

by Warren Postma ( at February 04, 2015 12:27 PM

Australian Delphi User Group Members

Brisbane Meeting – February 2015

Thursday February 5th at 5:30pm to 9pm.

Jim Gilmour will give two talks on the day:

– Demo the features of Castalia, the well known IDE editor plugin, with
features like advanced syntax highlighting, code navigation, code analysis
and refactoring. Castalia was recently aquired by Embarcadero so there’s a
good chance you will see it in future Rad Studio versions.… Continue reading ›

by Eivind Bakkestuen at February 04, 2015 12:07 PM

February 03, 2015

The Podcast at

Parallel For Loops

Parallel For Loops are a hassle-free way to supercharge your program with the Parallel Programming Library. The syntax is similar to the standard For loop, with the advantage of each iteration running on in a different task on the thread pool. This allows multiple iterations to run at the same time, taking advantage of the multi-core and hyper-threaded architecture common on laptops, desktops and mobile devices today.

Here is the replay of the Skill Sprint:

Here are the slides:

Update: I was chatting with Allen Bauer today and he mentioned that while you technically can use Queue and Synchronize from within a Parallel For loop, he wouldn’t recommend it because it will dramatically reduce the speed of the loop. It is still faster than a linear loop, but not as fast as it could be. I’ll leave these examples here, but keep that in mind when optimizing your parallel code.

Here is the syntax in Object Pascal. The stride is the first parameter is it is optional. It controls how the iterations are grouped when being sent to the CPUs. Min and Max are your usual start and stop range for the loop. The last parameter is an anonymous method that represents the code to be executed on each iterations. It takes an Index parameter that is either an Integer or Int64 that provides the value of the current iteration.

TParallel.For(Stride, Min, Max, procedure (Idx: Integer)
  if IsPrime(Idx) then
    TInterlocked.Increment (Tot);
    TThread.Queue(TThread.CurrentThread, procedure

Here is the C++ code syntax. It takes a event instead of an anonymous method.

// . . .
TParallel::For(NULL, Min, Max, MyIteratorEvent);
// . . . 

void __fastcall TFormThreading::MyIteratorEvent(TObject *Sender, int AIndex)

There are some great blog posts and videos on the Parallel Programming Library

Stephen Ball has a series of blog posts on the Parallel Programming Library, including a Quick Introduction and one on managing the thread pool. As Stephen points out, while you can customize the thread pool, that doesn’t alway mean you should. Malcolm Groves also has some great blog posts on PPL.

Danny Wind has a great Code Rage 9 session on the Parallel Programming Library (be sure to download his samples). David I. did the C++ version.

Allen Bauer, our Chief Scientist, also has a CodeRage 9 session on the PPL Architecture.

If you want to take advantage of the new C++11 Lambda syntax on Win64 and mobile, then check out this community article or watch this CodeRage 9 video snippet. Get Bruneau and David’s code for C++ and Parallel libraries.

Update: Keep in mind that a Parallel For loop isn’t always the best performance option, but it is really easy to use. Check out Stefan Glienke’s Stack Overflow answer for an alternative using the PPL TTask for even better performance.

by Jim McKeeth at February 03, 2015 02:11 PM

It's a blong, blong, blong road...

Off to Australia to talk at ADUG Symposium 2015

I’m delighted to be able to announce that I’m off to Australia in March to do some talks at the ADUG Symposium 2015!

It’s a long way to travel, but I’m really looking forward to talking to the ADUG members about Delphi XE7 in both Melbourne and Canberra.

I’ve got a couple of talks scheduled in. I’ll be talking about consuming Android OS features that are outside the scope of what the FMX framework wraps up, and also looking at creative debugging techniques.

Hopefully I’ll manage to shed the jetlag in the few days prior to the event, when I shall be enjoying the delights of Melbourne, and then after the 2 events I’ll soak up Canberra before returning back to normality.

Thanks for inviting me along, ADUG – I can’t wait to join you in Australia!

by Brian Long ( at February 03, 2015 01:39 PM

Delphi and Android services (part 3)

Once upon a time I uploaded a Delphi sample app to the Google Play Store, written in Delphi XE5 and implementing an Android service. I wrote about the published app in this post and supplied the source in this follow-up post.

There was an issue that’s been hanging around with that sample project. When pulled into Delphi XE7 and updated so it all compiled nicely, it didn’t play ball when deployed. Instead it hung.

I’ve eventually worked through the to-do list enough to take a look at the problem. For one reason or another starting the service in the OnCreate event handler caused an issue thanks to some required thread synchronisation, which no longer functions as I wanted it to.

I’ve worked around the problem by very slightly delaying the service starting by use of a one-shot timer. Then the form setup is done and dusted by the time the service is invoked and all seems to be well.

An updated download archive is available here, which contains the original Delphi XE5 project and a Delphi XE7 equivalent, which should now be functionally equivalent.

by Brian Long ( at February 03, 2015 01:12 PM

Delphi and Android services (part 2)

It’s been a while now since I posted up the link to my Delphi service example on Google Play.

I mentioned at the time that it was not a trivial exercise and was somewhat imperfect in implementation (although I’d done my best to disguise this fact). Indeed you only really see an issue if you are looking at the logcat output from the app (either using the command-line adb logcat command, or using the deprecated DDMS tool or the replacement Monitor tool). Alas the app dies while endeavouring to tidy up for exit…

I also mentioned at the time that I was hoping to work out some scheme to remedy the situation before releasing the example source, something to do with pride or perfectionism or some such… Anyway, with the day job, the evening job, the prep work for last week’s Be-Delphi 3.0 event in Belgium my plans haven’t been accomplished and I have still to work out if it’s feasible to clean up the shutdown part of the sample. All my current efforts have come to little in resolving it.

So, given that there have been a number of requests for the source I have now made it available at this download link. This is the same as the sample online other than it has no splash screen. This example is free of a splash screen to simplify the example and leave it clearer. There are a couple of examples that incorporate a splash screen and have similar custom build steps available in my CodeRage 8 session files.

Please note that the archive has a Readme file in it, and you should take the time to read through this file carefully as it explains the non-standard build steps required to get the sample successfully built for deployment. If you don’t follow the Readme file, then you’re unlikely to get any joy with the sample at all.

For your convenience I include the text of the ReadMe file below.

As you will see, since Delphi has no catering for building Delphi services or broadcast receivers, I’ve had to go “round the houses” to do it, using Java stubs, and pertinent thread-switching between the Java and Delphi threads.

As you will also perhaps appreciate, I don’t recommend this as a productive way of building an Android service. However if you need to add a service to a Delphi Android application, then this approach allows you to do so.

But… as of the time of posting there is a still the small matter of a (slightly brushed under the carpet) death-by-tombstoning bug on shutdown. If any keen reader can work out a clean way of closing I’d be most obliged to hear of it!


When the small Java source files get compiled, the Android dx tool expects them to be compiled by the JDK 1.6.x compiler as opposed to the JDK 1.7.x compiler. If you have JDK 1.7.x installed, you hit a problem with dx reporting:

bad class file magic (cafebabe) or version (0033.0000)

However, to avoid forcing a reinstall of JDK 1.6 you might like to modify my build.bat batch files and add in extra command line switches to the javac.exe command-lines. You need to insert this after the javac.exe command to force Java 1.6 byte code output, which is digestible by the Android dx command:

-source 1.6 -target 1.6

[Update 2 – Feb ‘15]

There has been a longstanding issue with my service sample, which I originally wrote for Delphi XE5.

The issue was that when updated and tested in Delphi XE7, it hung on startup with a black screen. This was rather disappointing.

Unfortunately I’ve been very much tied up with stuff and haven’t managed to get to looking into the problem up until now. Anyway, Aleksey N’s comment (below) put me onto the way of getting it to work. The OnCreate handler now triggers a timer to start the service, after the initialisation process.

The download sample project now incudes both a Delphi XE5 and a Delphi XE7 project. Enjoy!

Service example
This project implements an Android service along with a couple
of broadcast receivers to catch and respond to intent messages
flung around the system. The service and receiver classes are
implemented as extremely shallow Java classes, which need to be
compiled and converted to an appropriate executable format
(dex), and then merged into the other dex code deployed with an
Android app.
The Java code calls into native Delphi code to implement
the "business end" of the service and receivers.
Build the Java support files:
In the project's java directory are some source files:
 - java\src\com\blong\test\
- java\src\com\blong\test\
- java\src\com\blong\test\
These need to be compiled to .class files, archived into a .jar
file, converted from Java byte code to DEX (Dalvik Executable)
format and merged into the normally used (by Delphi's Android
deployment process) classes.dex.
To set this up, follow these steps:
 - Ensure the useful subdirectory of Android SDK's build-tools
directory is on the system PATH (e.g. C:\Android\android-sdk-
windows\build-tools\18.0.1 or C:\Users\Public\Documents\RAD
 - Ensure the Java Development Kit's bin directory is on the
system PATH (e.g. C:\Program Files (x86)\Java\jdk1.6.0_23\bin)
 - Run a command prompt in the project's java subdirectory and
ensure you can successfully launch each of these:
    - javac
- jar
- dx
 - Review the build.bat file and ensure the environment
variables are set correctly:
    - ANDROID needs to point to your Android SDK base
directory, e.g. C:\Users\Public\Documents\RAD Studio\12.0
\PlatformSDKs\adt-bundle-windows-x86-20130522\sdk or
    - ANDROID_PLATFORM needs to point at an installed SDK
platform installation, e.g. %ANDROID%\platforms\android-15 or %
ANDROID%\platforms\android-17. Check for one that is installed.
    - DX_LIB needs to point to the lib subdirectory under the
Android SDK build-tools directory, e.g. %ANDROID%\build-
tools\18.0.1\lib or %ANDROID%\build-tools\android-4.2.2\lib
    - EMBO_DEX needs to point to the Delphi-supplied Android
classes.dex file, wrapped in quotes to take care of any spaces
in the path, e.g. "C:\Program Files (x86)\Embarcadero\RAD
 - Run build.bat
 - You should now have a new file in the project directory tree
called java\output\dex\classes.dex
This file replaces the supplied classes.dex and has the Java
service and broadcast receiver compiled classes included in it.
Set the new classes.dex for deployment:
Open the project in the IDE
Choose Project | Deployment
Note that the classes.dex file from the project's
java\output\dex directory is set to be deployed.
You must ensure that the default classes.dex file is de-
selected. As you switch configurations, this de-selection will
be lost (the file will be re-set to be deployed) and will need
to again be de-selected. This is an IDE bug with Delphi XE5 RTM
and XE5 UP1 and is logged in Quality Central as bug 118472.
Register the service:
This has already been done for this demo. It involves the
 - Open the Android manifest template,
AndroidManifest.template.xml, which is generated on first
compile, from the project directory
 - Add in a description of the service in the application

<service android:name="com.blong.test.SampleService" />
Build the Delphi Android application library:
In the IDE choose Project | Compile ServiceApp (or press
Deploy the library to an Android application package (.apk):
In the IDE choose Project | Deploy
Install the app on the device:
In the IDE choose Run | Run Without Debugging (or press
This will implicitly do the compile and deploy steps above, so
they are actually optional.
This step will uninstall the app if already installed and then
install the newly built version.

by Brian Long ( at February 03, 2015 01:03 PM

while true do;

New On Line Training “Update to Delphi XE7″ february 10-13

Update to Delphi XE7

Just a quick note to inform you about the new online training “Update to Delphi XE7″.

The training will be 22 hours long, and is divided in 4 session each (5.5 hours).

More information at the official landing page:

See you on line



by admin at February 03, 2015 11:57 AM

The Wiert Corner - irregular stream of stuff


Cool: this makes it way easier to do repeated Delphi installs for testing purposes:


There are many more parameters in Delphi sorcery: Unattended Delphi installation – how?, but the above is already a good start.

Thanks Stefan Glienke for having shared this!


via: Delphi sorcery: Unattended Delphi installation – how?.

Filed under: Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development

by jpluimers at February 03, 2015 05:00 AM

February 02, 2015

Firebird News

Firebird for Android is coming

shell@hwH30-U10:/data/local/tmp/firebird/bin $ ./isql employee Database: employee SQL> show version; ISQL Version: LI-T3.0.0.31567 Firebird 3.0 Beta 2 Server version: Firebird/Linux/ARM (access method), version “LI-T3.0.0.31567 Firebird 3.0 Beta 2″ on disk structure version 12.0 SQL> Alex.

by Cantu at February 02, 2015 07:02 PM

The Wiert Corner - irregular stream of stuff


Because of Delphi sorcery: New dynamic array type in Spring4D 1.2, I updated this article from 2009: Delphi operator overloading: table of operators, names, and some notes on usage and ‘glitches’.

When I wrote the original article in 2009 the in operator wasn’t documented to be overloadable.

It is overloadable, and newer documentation includes it:

In addition I clarified a few things better (like not needing to return Boolean for comparison and set operators) and fixed a few typos and links.

The glitches are still there, so I’ve kept those.


Filed under: Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development

by jpluimers at February 02, 2015 03:15 PM

Australian Delphi User Group Members

Brian Long to appear at the ADUG Autumn Symposium 2015

The Australian Delphi User Group is proud to announce that world renowned Delphi expert Brian Long (UK) will be appearing at 18th annual ADUG Autumn Symposium this coming March.

Brian will be presenting on two topics: “Employing and enjoying Android OS capabilities” and “Creative Debugging Techniques”.… Continue reading ›

by lachlangemmell at February 02, 2015 02:19 AM

January 30, 2015

The Podcast at

Delphi Hackathon

How are you Delphi programming skills? Want to visit Fortaleza, Brazil? I’m sure it is especially nice if you are in the northern hemisphere right now since Brazil is enjoying summer while we are stuck in winter.

Next week Hack’n Fortes is hosting a Delphi hackathon / programming marathon. Registration is closed, but you can always head down to watch. If Brazil is a little far away, we have an online Code Battle planned for Wednesday the 15th as part of Delphi Week 2015! #DelphiWeek

by Jim McKeeth at January 30, 2015 09:47 PM

January 29, 2015

The Wiert Corner - irregular stream of stuff


Unit testing has been here for a long time, and so has Unit Testing in Delphi. Below a summary of historic links together with some notes on how the state of affairs changed over the years.

Charlie Calvert

I’ll start with one of the first large Delphi Unit Testing articles was a paper by Charlie Calvert summarizing the state of the art on Delphi Unit Testing in 2004. It is present in the wayback machine as DUnit Talk and on his site.

Note that the site is sometimes slow or hard to reach. Since his evangelist days at Borland/CodeGear, Charlie has moved through a few evangelist jobs at Falafel and Microsoft and finally went back to his old profession: being a great teacher – this time at Bellevue Collegeoften using script based languages and cloud computing, with less focus on his web-presence.

Many of his IT books (during his writing period, he wrote both as Charles Calvert and Charlie Calvert) are still relevant though.

DUnit; Juanco Añez

Charlie’s paper describes both NUnit (the .NET unit testing framework) and DUnit (originally by Juanco Añez as a 1-on-1 port from JUnit in 1999, the Delphi 5 era, back when Charlie was evangelist at Borland) with some sample code at charlie’s sourceforge site.

Back then, both the paper and the sample code were very welcome, as there was virtually no DUnit documentation (apart from the README and Juanco’s InPublishing articles about Extreme Testing and Extreme Testing for Delphi programs) and people tended to stick to their development stack (so there was not much mixing of the Delphi, Java and .NET world, luckily times have changed).

Around 2006, DUnit maintenance started to slow down, and – though still part of Delphi – around 2008 it completely stalled on CVS and SVN. But a fork appeared: DUnit2.

Juanco also developed a Delphi friendly build tool called WANT (after Ant, and NAnt), which now is at, but development also came to a halt in 2008 and the forum in 2010.

Mocking in Pascal and Delphi

Unit testing often requires mocking to simulate real world objects. There are about a dozen mocking libraries available for NUnit.

For Delphi, Kylix and FreePascal, PascalMock used to be the mocking library, but it too halted, probably because back then RTTI was only available for published members and there was no way to automatically mock new classes and create instances of them on the fly .

Since Delphi 2009 however, RTTI has broadened a lot, and Delphi XE2 introduced TVirtualInterface in 2011 to implement SOAP consumer clients in Soap.RIO.pas. A great article about that is TVirtualInterface: Interfaces without an Implementing Class.

So I was glad that – after in 2011 a getting started guide and coverage by Nick Hodges in Delphi Mocks The Basics appeared, the DelphiMocks got officially announced in late 2012: VSoft Technologies Blogs | Introducing Delphi Mocks.

DSharp has some mocks too that bind with DUnit.

mORMot has their own mocking classes based on their own virtual class factory and a nice discussion with the DSharp author.

See also: unit testing – What is your favorite Delphi mocking library? – Stack Overflow.


But first about DUnitWizard, which still is part of Delphi too. And there is DUnitWizard documentation!

Basically it is a wizard that allows you to select the project and source file for which you want to generate a unit testing skeleton unit.


DUnit2 is an improvement over DUnit: it improves both speed and structure, for instance allowing for “Early Exit”. The original aim was to merge back into DUnit, but that didn’t happen because DUnit2 also stalled in 2008. It does however have a better GUIRunner, so that might be worthwhile for future frameworks.

DUnit and DUnit2 are both used to test the tiOPF framework. The tiOPF is a native Object Persistence Framework for Delphi and FreePascal.

DUnit2 is also used to integrate into OpenCTF. With OpenCTF, you can test components (including Forms, Frames and DataModules) as well as classes. It tests all kinds of “obvious” things when using Delphi in a RAD way.

Remote testing your GUI using DUnit and automation

With the added RTTI in Delphi 2010 and up, you can now even remote test your GUI: André’s Dev Blog: Remote Control: automated GUI test with Delphi and DUnit. The proof of concept code is at


DUnitX is a complete rewrite, but has a DUnit compatibility layer.

A few main aims of DUnitX are to have it attribute based (for easier configuration), allow – like NUnit – any class to be a test fixture (added benefit of being attribute based), support for new features (collections, inversion of control, attributes) allowed by recent language improvements (generics, anonymous methods, attributes).

Another aim is to support NUnit XML output to make it easier to integrate with Continuous Integration systems (like Continua). On my research list is to check if DUnitX can be ran through the NUnit GUI Runner.

VSoft is actively maintaining DUnitX, introducing it in VSoft Technologies Blogs | Introducing DUnitX – A Unit Test Framework for Delphi.

The open source Delphi Unit Test project uses DUnitX as a foundation of their test suites.

Note the “new” Delphi language features (introduced in Delphi 2009, more or less stable in Delphi 2010 and having become more stable with every new Delphi version) has brought a plethora of new possibilities. Back then, I was hoping for fresh new libraries to come out, and indeed some of them have, of which a very incomplete overview:

There also used to be DeHL by Alex Ciobanu, but that development stopped around mid 2010 (the WiKi got removed at the end of 2010, but version r528 still has the WiKi). The same holds for his project delphi-coll – Generic collections library for Delphi 2010 and XE which stopped

German DUnit walk through

If you can read German, or can use Google translate, there is a good German walk-through on how to use DUnit (old broken link). Recommended!


TSynTest is a very light weight framework not compatible with DUnit or DUnit2.

It is used to test the synopse mORMot, another OPC framework for Delphi.

Sidestep to FreePascal

On the FreePascal side, there is fpcUnit, which is used to test the FreePascal database components. fpcUnit is an independent port of JUnit to FreePascal, so it is like DUnit, but slightly different, as described in Introduction to unit testing with Lazarus | The Programming Works.

fpcUnit is very similar to DUnit, but a lot less similar than DUnitX. For now, DUnitX cannot be used in FreePascal.

For FreePascal, there is also FPTest, which is a port of DUnit2 to FreePascal and used to test the FreePascal port of tiOPF (both now maintained by Graeme).

Mocking and Stubs

These are much related to unit testing, and you should read Martin Fowler’s article Mocks Aren’t Stubs before getting started.

Some frameworks are mentioned in these SO questions; more on those in a later blog post:

The Delphi Mocks Open Source Project on Ohloh.

Stubs and Mocks for Delphi with mORMot – Synopse.

Delphi Mocks: The Basics.


Filed under: Agile, Delphi, Dependency Injection, Design Patterns, Development, FreePascal, History, Inversion of Control / IoC, Pascal, Software Development

by jpluimers at January 29, 2015 05:00 AM

January 28, 2015

Australian Delphi User Group Members

Sydney Meeting – January 2015

Wednesday 28th January 2015 at 6 for 6:15pm start.

List Processing with Generics and Anonymous Methods: Functional Programming in Delph – Colin Johnsun

In many Delphi applications, it is not uncommon to find code used to manipulate lists of things. It could be a list of numbers or strings or even a list of TPersons or TAccounts.… Continue reading ›

by Mathias Burbach at January 28, 2015 09:02 PM

January 27, 2015

The Wiert Corner - irregular stream of stuff


Thanks Uwe Raabe for sharing

This sounds interesting:

</rumours on>

As the page then read:

Castalia for Delphi is not currently available. Thank you for your interest.

Copyright © 2013 Jacob Thurman


via: This sounds interesting:

Filed under: Delphi, Delphi XE7, Delphi XE8, Development, Software Development

by jpluimers at January 27, 2015 11:00 AM

January 26, 2015

Firebird News

Firebird JDBC driver Jaybird 2.2.7 is released with a few fixes

The Firebird JDBC team is happy to announce the release of Jaybird 2.2.7. This release contains a few fixes .

by mariuz at January 26, 2015 09:57 AM

January 23, 2015

Firebird News

CopyCat Developer 3.7.1

Microtec is pleased to announce the release of CopyCat Developer version 3.7.1! CopyCat Developer is a Delphi components library encapsulating a database replication engine with support for Firebird, Interbase, MySQL, MS SQL, Oracle, PostgreSQL, SQLite and NexusDB. For more information, please refer to our site: The changes in this release are as follows: – XE7 […]

by jonneve at January 23, 2015 07:38 AM

January 22, 2015

The Podcast at

Looking at Radiant Shapes

I’ve been playing with Raize Software‘s new Radiant Shapes components this week. These are the brand new primitive shape component set for FireMonkey on all platforms: Windows, OS X, iOS and Android. I’ve been a long time fan of Raize Components because of their attention to detail and high quality. Radiant Shapes continues this tradition.

Radiant Shapes PaletteRadiant Shapes is made up of 35 reusable shape controls that are all pretty flexible. If you caught Ray Konopka’s RAD In Action: Seeing is Believing on Data Visualization then you have a pretty good idea the importance of using primitive shapes like these to communicate useful information to your users, especially in mobile development.

All of the shapes include useful design time menus to make common changes quickly and easily. You can probably get away without using the Object Inspector for a lot of your common tasks. They also have various customizations that make them very flexible.

One thing that is interesting is they introduce the idea of a TRadiantDimension they allows you to specify some of the sizes as either absolute pixels, or as a scale factor. This gives great flexibility in how they behave when resized.

Ray Konopka introduced the Radiant Shapes during CodeRage 9 with a couple great sessions. You can catch the replay for both Object Pascal and C++.

I really like the TRadiantGear component, so I decided to play with it in detail. You can specify the number of cogs (teeth), their size (as a Radiant Dimension) and the size and visibility of the hole. Just like all the other shapes, they handle hit tests correctly, so at runtime, you can click between the cogs of the gear and it doesn’t produce an onClick event.


Just for fun I put down three gears and used LiveBindings to connect a TTrackBar.Value to their rotation. A little math in the OnAssigningValue event and I had all the gears rotating in unison. The fact that the gears stayed synced up, and the teeth meshed perfectly was really impressive.

procedure TForm4.RotateGearBigAssigningValue(Sender: TObject;
  AssignValueRec: TBindingAssignValueRec; var Value: TValue;
  var Handled: Boolean);
  Value := TValue.From(-1 * (Value.AsExtended / 2 + 18));

procedure TForm4.RotateGearRightAssigningValue(Sender: TObject;
  AssignValueRec: TBindingAssignValueRec; var Value: TValue;
  var Handled: Boolean);
  Value := TValue.From(-1 * (Value.AsExtended + 18));

18 is the offset for the gears (360° / 10 cogs / 2 (half offset) = 18) and the 2 comes from the big gear being twice as big (20 cogs), then the -1 is so they rotate the opposite direction.

Overall I am impressed with the Radiant Shapes. Something I would like to see include a polygon component where I can specify the number of sizes. You can do that with the star and gear, but a flexible polygon would be nice. Also, the shapes can be rotated with the rotation property, but it would be cool if there was a way to rotate it in the designer too. That might be a big undertaking though.

You can buy the Radiant Shapes from Raize Software for $49, which gives you a 1 year subscription for updates. I did get a complimentary copy from Raize Software to review them.

Be sure to join Ray on Friday the 23rd as he is featured in the Embarcadero Technology Partner Spotlight.

by Jim McKeeth at January 22, 2015 11:30 PM

Australian Delphi User Group Members

Melbourne Meeting – January 2015

Monday 19th January  at 6 for 6:15pm start.

Compression Techniques  in Delphi – A discussion on members’ experience with various compression options available for Delphi.

This month four different compression components were presented and by four different presenters.  As is typical, each of the solutions discussed have their own strengths and weaknesses. … Continue reading ›

by Roger Connell at January 22, 2015 10:07 PM

The Wiert Corner - irregular stream of stuff


Wow: I feel like having lived under a stone for 8 years, as RosettaCode has been alive since it was founded in 2007 by Mike Mol.

The idea is that you solve a task and learn from that, or learn by seeing how others have solved tasks or draft tasks.

So in a sense it is similar to the Rosetta stone: it has different languages phrasing the same tasks.

There are already a whole bunch of languages on RosettaCode (of which a few are in the categories below), and you can even suggest or add your own languages.

When you want to solve tasks, be sure to look at the list unimplemented tasks by language that leads to automatic reports by language (for instance two of the languages I use most often: C# and Delphi).

I’m sure there are lots of programming chrestomathy sites, even beyond the ones, and it feels very similar to programming kata sites.


Filed under: .NET, APL, Awk, bash, Batch-Files, C, C#, C++, COBOL, CommandLine, Delphi, Development, Fortran, FreePascal, Java, JavaScript/ECMAScript, Lazarus, Object Pascal, Office VBA, Pascal, Perl, PHP, PowerShell, PowerShell, Prism, Scripting, sed script, Sh Shell, Software Development, Turbo Prolog, VB.NET, VBS, VBScript, Visual Studio and tools, Web Development

by jpluimers at January 22, 2015 05:00 AM

January 21, 2015

The Podcast at

Episode #55 – Interview with JT

An interview with John Thomas “JT”, Senior Director of Product Management over RAD Studio and Delphi with Embarcadero Technologies.This episode was recorded almost a year and a half ago, right after the XE5 release added Android support, but is still a relevant conversation today.

It is 2 weeks from our last episode, so we are going to try and keep it at an episode every 2 weeks for now and see how that goes. Also we are moving to Soundcloud for audio hosting.

An interview with John Thomas “JT”, Senior Director of Product Management over RAD Studio and Delphi with Embarcadero Technologies.This episode was recorded almost a year and a half ago, right after the XE5 release added Android support, but is still a relevant conversation today. It is 2 weeks from our last episode, so we are going to try and keep it at an episode every 2 weeks for now and see how that goes. Also we are moving to Soundcloud for audio hosting.

by Jim McKeeth at January 21, 2015 09:33 PM

The Wiert Corner - irregular stream of stuff


Uwe Raabe was the first one to suggest that it might just be so that Castalia got acquired by Embarcadero. In the thread rumoured Usertility might as well been, or that Jacob Thurman might be responsible for IDE stability.

So today

These seem to be the hard facts:

  • Castalia and Usertility are now owned by Embarcadero
  • Jacob Thurman keeps involved but it is unclear if he is employed by Embarcadero


Filed under: Delphi, Delphi XE8, Development, Software Development

by jpluimers at January 21, 2015 07:38 PM

Firebird News

Database Workbench 5.0.8 released

Upscene Productions is proud to announce the availability of the next release of the popular multi-DBMS development tool: ” Database Workbench 5.0.8 “ This release fixes several bugs as reported by our customers. “There is so much new in Database Workbench 5, I don’t know where to start”, says Martijn Tonies, founder of Upscene Productions. […]

by Martijn Tonies at January 21, 2015 02:13 PM

Firebird and CMake

Now it is possible to build Firebird with CMake. CMake build system was commited to Firebird trunk: See the 60531 and 60531 commits.

by mariuz at January 21, 2015 01:03 PM

Australian Delphi User Group Members

Melbourne Meeting – November 2014

Monday 17th November at 6 for 6:15pm start

Using Delphi Styles – Damien Bootsma – Embarcadero

Damien calls in to see us in Melbourne from time to time and in November the subject matter of his presentation was “VCL Styles”.

A number of VCL style files are shipped with Delphi ( .vsf files in   Redist\styles).… Continue reading ›

by Roger Connell at January 21, 2015 09:01 AM

Melbourne Meeting – December 2014

Monday 15th December at 6 for 6:15pm start

Lets Move an Application To FireMonkey – Roger Connell – Innova Solutions

A look at ActionLists and ImageLists in the Dunit VCL Form and converting such forms to FireMonkey.

Roger wants to have access to the Green Light DUnit testing interface when he comes to debugging his libraries in the new compiler environment {$IFDEF NEXTGEN}.… Continue reading ›

by Roger Connell at January 21, 2015 09:00 AM

Firebird News

SQL-MVC, alpha release write web applications in SQL instead of JavaScript or other.

SQL-MVC, alpha release, request for comments. Hi all, I have released a new concept in web application frameworks, using firebird and node.js, and would appreciate any comments, especially on the concepts behind it. In brief: Paradigm inversion – write web applications in SQL instead of JavaScript/or other. How does SQL-MVC work? The compiler takes […]

by mariuz at January 21, 2015 08:58 AM

The Podcast at

Run Outside the Handler or Making a Non-Blocking Call

Have you ever had some code you wanted to run outside of the event handler that causes the code to run? If not, then this blog post isn’t for you. I’m not here to debate why you would want to do that, or if it is a good idea or not. I just know there’ve been times I’ve needed my code to run outside the event handler, or just a bit later.

One use case example: You are calling a slow routine (Network I/O maybe) and don’t want to freeze the UI while you wait for it to execute.

Still with me? Good. What I used to do was drop a TTimer on the form and set the Interval to 1, then enable it to trigger the code to run later. This worked, but it was messy. You had a timer to deal with, and you had to remember to disable it in the event handler, so it didn’t run multiple times. You also could have used a TThread, which may have been a better solution, but still seemed kind of messy, especially if you wanted to update the UI from your code.

Thanks to the new System.Threading library introduced with XE7, I’ve created a simple procedure that makes this a breeze to do. I call the procedure NonBlocking, but you could just as easily call it RunALittleLaterRunOutsideHandler, etc.

uses System.Threading;

procedure NonBlocking(const Proc: TThreadProcedure);
  TTask.Create(procedure begin
    TThread.Queue(nil, Proc);

All this does is create a task, and then inside the task queue an update back to the main thread to execute the code that is passed to this procedure as an anonymous method. You could easily just write this code inline, but I thought it worthwhile creating a procedure to handle it for me.

Lets look at a normal execution scenario:

  ListBox1.Items.Add('Before Handler');
  ListBox1.Items.Add('After Handler');

procedure TForm1.EventHandler;
  ListBox1.Items.Add('Inside Handler');

When this is run, our ListBox1 will look like

  • Before Handler
  • Inside Handler
  • After Handler

which is what we would expect. Now when we introduce a call to our new procedure in the EventHandler:

  ListBox1.Items.Add('Before Handler');
  ListBox1.Items.Add('After Handler');

procedure TForm1.EventHandler;
  ListBox1.Items.Add('Inside Handler 1');
  NonBlocking(procedure begin
    ListBox1.Items.Add('Outside Handler'); // This will run last
  ListBox1.Items.Add('Inside Handler 2');

Our ListBox1 will look like

  • Before Handler
  • Inside Handler 1
  • Inside Handler 2
  • After Handler
  • Outside Handler

Notice that Outside Handler was the very last line added, even though it is written between Inside Handler 1 and Inside Handler 2. It even occurs after the After Handler line. Also, this works across all platforms: iOS, Android, Windows and OS X.

Everything before and within the call to NonBlocking will execute in order, but the code within NonBlocking will execute after the code that comes after that anonymous method.

If you have a ShowMessage or something else that blocks the UI thread in the event handler, then the code you passed to the NonBlocking procedure will be executed early, which is fine since the UI thread was already blocked.


by Jim McKeeth at January 21, 2015 12:31 AM

January 20, 2015

The Wiert Corner - irregular stream of stuff


This used to be a great Delphi-only feature that I missed in Visual Studio, but I found the downloadable free extension Favorite Documents extension.

It is a by Sergey Vlasov, who has a whole bunch of free and paid Visual Studio add-ins, extensions and tools.


Filed under: Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio and tools

by jpluimers at January 20, 2015 05:00 AM

January 19, 2015

Firebird News

Firebird 2.1.x series discontinued EOL

Accordingly to its release lifetime policy, Firebird Project notifies that the Firebird v2.1 series has reached its end-of-life and thus will not be maintained anymore. The last official release in this series, Firebird 2.1.7, which has been announced in December 2014, will be available from the “Discontinued Versions” section of the download area.

by mariuz at January 19, 2015 05:40 PM

Delphi Code Monkey

Debugging, Inspection, and Logging: Tools and Techniques (Why I like CodeSite)

I'm going to talk about the importance of logging, and in particular, why I like to use CodeSite in my Delphi applications.  Before I do that I want to place logging within a context. It is a tool, among other tools, available to you, to give you insight into your running code, so that you can observe the behaviour of your application, determine the correctness of your application, and even, give you some ability to reason about how to fix it, just from the output of the logs.

Fixing performance problems, validation problems,  exception mis-handling problems (catching things you shouldn't catch, not catching things you should catch),  detecting and fixing thread deadlocks,  problems with control painting, or high level user interface behaviours like persistence of user customizations to the application's grids or toolbars, are things I've never found any way to wrap up in unit tests and then fix.  Attempts to do it that way have just wasted time and money.

First I'll say that I wish I found and fixed all my bugs by wrapping all my application code in unit tests, and that TDD is so wonderful that nobody needs logging, and nobody ever needs the Debugger. Ha. What a laugh.  I'll bet TDD people are keen on TDD precisely because they have, and still do, spend a lot of precious time in the Edit-Compile-Debug cycle.

Logging can be a way to reduce the amount of time you spend in Edit-Compile-Debug.

So, let's take it for granted that any bug that can be found by TDD practices probably should be found that way, and perhaps have been found that way already, and that leaves behind the bugs that don't get caught that way.  For those bugs, there are three main debugging techniques that I rely on:

1.  Making effective use of the Debugger, especially the advanced Breakpoint properties.    Some people seem to think this is the only way to find and fix problems though.  Set a breakpoint. Inpect a variable value.  Step into and out of a complex code path.     Yes, using a debugger is a critical part of being an effective developer, but sometimes, you can spend a long time chasing bugs, and even finding where a problem is.   There are a lot of features in the debugger that, if you use them correctly can reduce the time to find your problems. One of them is the advanced features in the Delphi breakpoint settings window; Conditional breakpoints, and even non-breaking breakpoints, which can be used to generate some log messages without modifying your code:

2. Code Inspection.  Read your code. Without running any code, and without even much searching, it is sometimes possible to locate the code that is malfunctioning and find the repair that is necessary, without even running the debugger, by a combination of good code reading skills, and a good working knowledge of where in the code you might go to look and do some code inspection.  The question is, how do you find the code that was running right when the problem you experienced was happening.   I find inspection useful only after my code is instrumented with trace logging, or when the failure happens in an area where I have just been, and made changes. My mental process is usually to detect all the cases that I have to handle, and see if all the states are detected properly, and then correctly handled.  Many bugs can be found by determining that a correct bit of code to handle a particular scenario either doesn't exist, or can't possibly be run (even if it exists) because the code that detects it is not correct.  I find in custom-control work, for example, that states like Disabled, and Hot state handling (the less common states for a control) are where a lot of the bugs in my custom controls lurk.   Another kind of inspection that I like to do is reviewing the version control logs and looking at what's changed today (especially when I'm part of a team working on the code). Sometimes by reviewing the version control logs, and source code diffs, I can quickly zero in on a change that caused a problem.

3. Trace Logging, also known as "Debugging by Print Statements".   There are a wide variety of techniques for logging, and CodeSite, my topic today is just one of the available ways to do it.  A classic one, one I've used for a long time, is to use the Win32 API function OutputDebugString.  You can see the messages from these right in your IDE, or using the free SysInternals DebugView tool which you can download from Microsoft. Another way is to roll your own little disk based logging library.   I think we all think logging libraries are not very difficult to write properly, until we've written one.  Open a file, append a line of text.  If you don't have to worry about multi-threaded logging, and multi-process logging, perhaps you might make due with a pretty simply logging system, it probably has a global Critical Section that blocks every thread in your app for the 300 microseconds that it takes to write a log message, and that's probably fine for your needs.   Probably most Delphi developers who have been working for a while have their own favourite logging system.  I have my own:

  • I like one file per day, named in the form YYYY-MM-DD.log and I like logs to auto-clean after some sensible period like 30 days. That way if I turn on logging at a client machine, it's never ever going to fill the hard disk with my logging messages.  
  • I also like to have multiple levels of logging, at least three;  Information, Warning, and Error.   I like the message to have the timestamp first, and the severity indicator second, followed by some kind of area or scope name, and then the message.   Something like this:
   2016-01-16 08:03.02.123 [I] [NETLISTENER]  Listening on port 8081

  • Typically my logging library has a simple API that I don't have to think about. My own home-brew logging system is built around a function called Log:
    Log( lvInfo, 'Listening on port %d', [ FServer.Port ] );

  • If I'm in a module I might have a log method that is private to the implementation section,  that adds the facility (section) of the application, the 'NETLISTENER' above, and invokes a global callback function, if it's assigned:

procedure Log( LogLevel:TLogLevel; FormatMessage:string; Args:array of const ); inline;
   if Assigned(Logger) then 
     Logger( 'NETLISTENER',  LogLevel, FormatMessage, Args);

What I wish is that I didn't have to wrap Log messages I only want on sometimes in any explicit {$ifdef}.  I'd love it if I could declare inline functions as conditionally "no-op", so that I could switch out all the logging calls in my application in some non-logging build, just like Assert can. If I was using C++ this is a place where Log() would be a macro, instead of a function.  Although I don't much like having to do it this way, I often find myself going back and conditionally defining my log messages, like this:

{$IFDEF LOG_NETWORK}Log( lvInfo, 'Listening on port %d', [ FServer.Port ] );{$ENDIF}

So I have my own logging library, and you have yours.  Is Logging like Lasagna, something you should always make yourself, and not go for a ready-made?  No.  I think there's a time and a place for both things in your tool-chest.

Sometimes I will use my own home-brew logging system, and sometimes CodeSite, and sometimes both, even in one codebase.   Already having a logging system in place, of sorts, isn't a good reason to ignore CodeSite.  You might find your existing ad-hoc system, and CodeSite actually combine pretty seamlessly.

Why CodeSite?

If logging to a file is a few lines of your own code, and that doesn't require CodeSite, why do I find I like CodeSite so much?

Well the first thing I do in any codebase that has its own logging functions, is wire up CodeSite to my own internal logging system's handler function.

Just add CodeSiteLogging, to the uses clause, and call CodeSite.Send, and you've got the lovely Code Site live viewer application up on your screen.   Live Viewing rocks.   But then, OutputDebugString can enable the "live viewer" built into your debugger. So why is CodeSite's live viewer better than just adding an OutputDebugString call to your logging handler function?   It's easier to read the live viewer window's output, and easier to find stuff I care about.  This is the one area where all homegrown or the IDE-built-in OutputDebugString systems tend to fall apart, in my experience, is in finding the messages I care about and ignoring the ones I don't care about.

 Another less common problem, is having to read several logs separately and combine them manually in my head.  Code-site has a dispatching (routing) system that can combine messages from multiple applications and multiple machines, into a single log file.  It also has ways to help me find the needles in the haystacks.  I can use CodeSite to arrange live logging scenarios that help me see what I want to see to fix a particular problem, in a distributed multi-application multi-machine scenario.   If I have to manually collate and combine results from multiple log times, that decreases the overall efficiency of the log file as a tool.  I could have a server log, and two client-side application logs, and have to go find a message at 11:32:17 AM in several different logs. Now I need to check if all my computers are synchronized correctly, so that I know if 11:32:17 is slightly ahead or behind, for computer 1 or computer 2.

Another area where CodeSite really shines, is as an IDE wizard for adding logging messages quickly to your application. When I need to quickly add a lot of instrumentation (new trace messages) to a huge area of code, as an exploratory step, and then quickly take it all away.  The CodeSite MethodTracer will automatically instrument an entire area of your code, including all calling functions in a call tree, and even insert {$IFDEF CODESITE_LOGGING}..{$ENDIF} block around the generated CodeSite.TraceMethod function calls.  Seeing what functions call what functions in a structured way can be very enlightening. Adding the execution times for functions, even more.

Here goes, a few clicks...

Hey, presto, millisecond time-elapsed values, just what I wanted..

The more complicated the data types you work with, the more a tool like CodeSite helps.  You can send a whole record or object off to CodeSite, and then worry later about finding the values you need out of the object.  When I'm working with a graphical control, this kind of time-series inspection is exactly the ticket.  With a debugger you get a current value. With a logging tool, of any kind, even the roll your own kind, you get a series of points of information over time.  The question for me is, do I want to spend a lot of time implementing logging features, or do I want a tool that adapts quickly to a variety of ad-hoc logging tasks over time, quickly.

Here are some of the tasks that I find I use CodeSite for instinctively, due to the efficiency of working with the live-viewer, and the variety of tools and facilities in CodeSite:

1.   Anything you install into the IDE itself, I prefer adding logging and instrumentation, and then I visually watch my log output, and when this stuff misbehaves, I can see why it's wrong from the output of the logging screen.  Seeing your messages INSTANTLY on screen is essential here.  For IDE wizards or component debug logging, opening a file and searching in it is a waste of my time, so a live-viewer logging solution is the only sensible choice.

2.  Any graphical drawing code, whether part of a component I plug into an IDE, or even the custom paint code inside an application context (whether the custom-draw events of a control, or a control like TPaintBox that is all about owner-draw).  It's just useless to inspect this stuff with a debugger, and OutputDebugString techiniques are not good enough for my purposes. The ability to send a TRect, or a TPoint to CodeSite and visually see it are very useful:

3. Any time I want to have expandable, collapsible tree view of log messages, giving me better organization than in a flat log viewed in notepad. In the screenshot for the previous point, did you notice how there are little icons before each of the log messages?  There's a little icon for entering a function. Another little icon for exiting a function.  Next there's my Origin = message.   I know that somebody set Origin and it's AFTER the exit of HasGlyphFor, but must be inside some other context that doesn't have logging.

4. Any time I have a system that has multiple programs, parts, pieces, services, runs on more than one computer.  Honestly, I rarely co-ordinate logging from multiple sources, but when I do, it's like when I need to use the remote debugger, it can be a life saver on those days.

5. Any time I need filtering, organization by categories. Particularly nice is the Auto Organize feature, if you make use of the Category field in your log messages, something I urge you to do.

6. Any time I want to quickly instrument (add a lot of logging) that I might later revert out of my working copy.  I use the CodeSite Method Tracer for that.

And now, if I have convinced you to try adding some more logging to your application, or to try out CodeSite, which you may have already (at least the Express edition) if you have a modern version of Delphi.  CodeSite Express was first bundled with Delphi XE, and is still bundled today in Delphi XE7,

Now that I've stated why I love logging, I would like to discuss why logging becomes less useful to me than it could have been, no matter what tool I use, whether it's my roll-my-own file based loggers, or a tool like CodeSite.  Yes folks, there are ways to do logging more and less effectively.

The Cardinal Sins of Logging

Logging is not a panacea.   Making good use of logging tools is harder than it looks.

You can make your life easier by doing the right kinds of logging.  I advocate a restrained, controlled approach, with a retrospective phase where you look at how you log and modify your approach if the approach is not paying rich rewards.

1. Logging too much.   A log that contains 100 messages per second, or a log that contains 1000 useless messages that convey nothing to me, with one message in there that might tell me something interesting, is the most common form that logging fails.   Curating your log messages is something of a skill, and removing useless log messages is something I think you should be even more ruthless about than removing dead code (commented out) or useless and wrong comments.   If you can not use your logging facilities to see problems, because of all the noise, you need to do a reduction of logging.  In logging, often less is more.  If 99% of your log is noise, you may as well rip it all out and start over.

2. Not having ability to filter your logging.   Maybe you added 500 log messages to your system's logging last year due to a bug you had that day. Now those messages are useless to you. The two ways I filter my logging are by category, and by severity.  Category is a thing in my head that is coarser than unit scope, and finer than binary module scope.  In a scientific application that deals with some kind of hardware communications, I might split the scopes up to Communications, Analytics, Database, and then various user interface Category values for parts of my GUI.  The category concept is about grouping your log information to keep irrelevant details apart.   The second thing is severity. Sometimes Information messages should be suppressed and so instead of just turning logging on and off, it could be set of Off, All Messages (Verbose), Normal (Warnings and Errors), or Quiet (Errors only).

3. Logging only to disk and never directly to screen.    I find locating logs on the disk, opening them in an editor tool, and finding the rows that are recent and relevant a complete waste of my time. In fact, I find I ignore logs completely if I don't have a live viewer. Even if you didn't want to use CodeSite, at least adding an OutputDebugString line to your own in-house file logging code is friendlier in use than having to stop what you're doing, go browse in the windows explorer and find a log and then find the content in it.

4. Slowing down your end user's experience or otherwise degrading the application's primary role, due to logging. Your logging solutions, whatever they are, should be possible to turn off, and should not consume memory, or slow the user down, when turned off. If they do, and you can't fix it any other way, you should IFDEF the logging OUT of the code.    In some systems, logging is not worth doing do disk, until a serious fault occurs.  Then, and only then, perhaps some context may need to be written. In high performance applications, I have designed a circular buffer based trace logging system, that logs only to memory in a circular buffer. Then when some fault occurs that justifies the expense of persisting the log content, I save the incident file, with the preceding recent information and warning messages, from the circular buffer.   Or I append the recent in-memory records to an exception traceback (which I might generate using JclDebug or MadExcept), for purposes of automated bug reporting.   This approach is more appropriate  to some application domains, than a simple disk based logging system.

5.  Not cleaning your logs up or having a good log rotation and log naming system.  I have seen log systems that are a pain to leave turned on for any length of time because they fill the user's disk up with gigabytes of noise, and they don't neatly switch files per calendar date, making it hard to keep a recent amount (say the last 7 days) of log data around, while wiping out data that is so old as to not matter any more (say, greater than 7 days).

6.  Omitting Log headers.   My favorite practice is to have daily files with the date in the file name, and the first line in the file should be the executable name (with full executable path) and the version. Something like this:

*** C:\Program Files\MyApp\MyApp.Exe Version

Going to Production - CodeSite works there too.

CodeSite is fully capable of working in a production environment, I just haven't used it much for that yet, as I also have my own, or my employers production file based logging code.  Whatever logging system you use in production, remember before going to production, to add a way to configure your logging subsystem,  and then have some configuration user interface, at a minimum, perhaps you will want the options to turn it off completely, or set a logging level (Verbose, Normal, Quiet).

Going to production doesn't cost anything either, since the tools, including the dispatcher, live-viewer and file-viewer are freely re-distributable.  That's awesome.

My CodeSite Wish List : Greater Ability to withstand a Drink from the Firehose

"Drinking from the Firehose" - scene from UHF (1989)

Notwithstanding my advice above about logging too much being bad for you, there have been times when I wanted to generate a giant pile of log messages and then filter the data later.  CodeSite is the best tool for that job that I have found yet, as well.  I have found it's best to turn off the auto-scrolling feature in that case.    What I wish that I had was a technique that lets me see only new errors as they occur, leave the auto-scroll turned ON and showing new error messages, and hiding all messages of severity less than error, until I pause the logging, and want to "zoom in".   With auto-scroll on, and a high enough message send rate, I feel a lot like the kid in the movie clip above.  Michael Richards (and Weird Al) should have got an Oscar for UHF. There is no justice in Hollywood.

 Express versus full CodeSite Studio

CodeSite Express comes bundled with your XE through XE7 versions of Delphi has enough to get started with adding CodeSite.Send() stuff to your code, and includes enough Live Tracing functionality that you really should be using it.

The ability to send much more than just strings, the ability to send whole objects or collections in at a shot, are worth the upgrade alone.   The high precision timing stuff and the TraceMethod technique are only available in the full Studio edition.  There are even a few cool things in the full featured product list that I haven't used yet like conditional sending (SendIf).

by Warren Postma ( at January 19, 2015 07:17 AM

January 14, 2015

The Wiert Corner - irregular stream of stuff


One of the features that bites me over and over again is the ZEROBASEDSTRINGS that got introduced in Delphi XE3 and is by default ON in mobile compilers and OFF in Desktop compilers.

Back then, Mark Edington showed a small example of the effects:

and then explained:

The XE3 RTL source code has been refactored to be string index base agnostic. In most cases this is done by utilizing string helper functions which are always zero based.
When it is necessary to traverse a string, the Char[] property is often used to access the individual characters without concern for the current state of the compiler with respect to zero based strings.

In addition, the “Low” and “High” standard functions can now be passed a string variable to provide further flexibility as needed.
When zero based strings are enabled, Low(string) will return 0,  otherwise it will return 1. Likewise, High() returns a bounds adjusted length variation.

The problem is the non-existent forward compatibility of the other compilers (Delphi XE2 and lower).

So if you have library code that needs to work in Delphi versions, you cannot use the High and Low to make the code ZEROBASEDSTRINGS neutral.

Many Delphi developers regularly skip many Delphi versions, so these are still popular:

  • Delphi XE1 and XE2 (the last 2 compilers before Delphi really started to support mobile)
  • Delphi 2007 (the last non-Unicode Delphi compiler)
  • Delphi 7 (the last non-Galileo IDE)

The result is that library code is full of conditionan IF/IFDEF blocks like these:

Fix: this works only in XE3 or higher: “for Index := Low(input) to High(input) do // for ZEROBASEDSTRINGS”


via: Mark Edington’s Delphi Blog : XE3 RTL Changes: A closer look at TStringHelper.

Filed under: Ansi, Delphi, Delphi 2007, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Encoding, Software Development, Unicode

by jpluimers at January 14, 2015 05:00 AM


A First Look at Devart’s “new” EntityDAC

One of the newest ORM entries into the commercial market is EntityDAC from Devart.  If you are a Delphi developer you have probably heard of Devart, even if you haven’t actually used one of their products.  The company has been developing Delphi based technology since 1997 when they released their Oracle Data Access Components (ODAC).  Devart has specialized in data access related technologies, and since Delphi has predominantly been used to develop database centric applications, if you haven’t heard of Devart, chances are you were living under a rock somewhere.

While there are numerous ORM/OPF solutions available for Delphi, only a few use the latest language features of Object Pascal.  hcOPF, TiOPF, InstantObjects, DObject were all conceived prior to the appearance of generics, anonymous methods, and the new RTTI which has opened the door to dependency injection, and other modern best practices previously not available to Delphi developers.  That is not to say that none of these frameworks have adopted newer language features, just that they were not initially written with them or require newer versions of Delphi.  mORMot is an exception.  Of the current ORMs (if I missed one please let me know), only TMS Aurelius, DORM and now EntityDAC require a later version of Delphi (2007 and up).

In August 2014, Devart released the first version of EntityDAC for the Delphi platform.  EntityDAC builds on 18 years of expertise Devart has acquired developing database drivers and other ORM related products such as LinqConnect, EntityDeveloper (a designer for DB models) and dotConnect.  There have been several updates since it’s release, so unlike many open source solutions, you know it is actively being improved.

EntityDAC uses an object TDataSet descendant to present data, and recommends the usage of data aware controls to enforce validation so for Delphi developers used to using TDataSets it is as close to a drop in replacement as you can get.  EntityDAC supports Lazy Loading, Code-First, Model-First, or DataBase-First design, and is well documented.

One of the coolest features that I always wanted to implement for hcOPF was visual object design.  A complementary product; Entity Developer is bundled with EntityDAC.  It allows you to reverse engineer a database and create Delphi business objects as well as designing them from scratch.  It can then generate your model code so you can immediately start consuming your business objects.  Entity Developer is a Visual Studio shell based application that is also capable of using T4 templating supported in that IDE, so you can tweak the code generation as you see fit.

One of the questions I debated with other developers when I first wrote hcOPF was whether the ORM should support PODO (Plain Old Delphi Objects aka TObject descendants) as well as those descending from my base class ThcObject.  Limited RTTI precluded that possibility back in Delphi 3, and I have even interfaced ThcObject to experiment with enabling developers to use RefCounted PODO objects.  With EntityDAC you can use either TObject or TEntityObject as your base class.  It also supports using Delphi attributes to determine the database mapping or XML files.

Not only is the solution very flexible in terms of the workflows supported, the getting started Wizard makes it easy to get an application up and running,  and an example app showcases some of it’s capabilities.  The icing on the cake has to be LINQ which enables you to remove the SQL from your code and the coupling to the database it represents.

While I would love to dig deeper into EntityDAC, this is already getting to be a long post so perhaps I will write subsequent ones if there is enough interest.  Suffice to say, if you are looking for a commercial ORM solution backed by a company with almost 20 years experience in delivering high performance database centric solutions, I would recommend evaluating EntityDAC.

by Larry Hengen at January 14, 2015 03:19 AM

January 13, 2015

Firebird News

Firebird Spanish Community Site updated

Disisweb team have updated the website Firebird in Spanish. This year 2015 we celebrate 15 years of serving this website, so we will be creating new sections and redesigning the news sections and articles. Some sections are temporarily disabled, but are already running the news sections and items correctly. In addition, we are very aware […]

by mariuz at January 13, 2015 03:38 PM

BigChimp passed away on 4th december

Just read on the Lazarus forum that Reinier Olislagers better known there as BigChimp passed away on december 4th. A big loss for the Lazarus and Firebird community, he will be sorely missed.,26726.0.html He was very active in the Lazarus Database forum answering many questions also he contributed to many projects :turbobird , sqldb […]

by mariuz at January 13, 2015 02:42 PM

Castle Game Engine news