The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Delphi’ Category

Interesting game to teach kids to program: Eduka+ | YAPB.

Posted by jpluimers on 2015/02/05

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

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

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

via Delphi sorcery: Unattended Delphi installation – how?

Posted by jpluimers on 2015/02/03

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

Setup.exe /s LANGUAGE=English EN=TRUE DE=TRUE KEY1=XXXX KEY2=XXXXXX KEY3=XXXXXX KEY4=XXXX

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!

–jeroen

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

Posted in Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | 2 Comments »

Update to “Delphi operator overloading: table of operators”: added the `in` operator

Posted by jpluimers on 2015/02/02

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: http://docwiki.embarcadero.com/RADStudio/en/Operator_Overloading_%28Delphi%29.

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.

–jeroen

Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | Leave a Comment »

Some links to Delphi Unit Testing history

Posted by jpluimers on 2015/01/29

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 elvenware.com site.

Note that the elvenwere.com 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 Read the rest of this entry »

Posted in Agile, Conference Topics, Conferences, Delphi, Dependency Injection, Design Patterns, Development, Event, FreePascal, History, Inversion of Control / IoC, Pascal, Software Development | 3 Comments »

Hmmm. Castalia for Delphi: Castalia for Delphi is not currently available. Thank you for your interest. – via Uwe Raabe – G+

Posted by jpluimers on 2015/01/27

Thanks Uwe Raabe for sharing

This sounds interesting: http://www.twodesk.com/castalia/thanks.html

</rumours on>

As the page then read:

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

Copyright © 2013 Jacob Thurman

–jeroen

via: This sounds interesting: http://www.twodesk.com/castalia/thanks.html.

Posted in Castalia, Delphi, Delphi XE7, Delphi XE8, Development, Software Development | 3 Comments »

RosettaCode: cool way to improve your coding skills

Posted by jpluimers on 2015/01/22

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.

–jeroen

Posted in .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 | Leave a Comment »

A few nice G+ threads on Castalia and Usertility being acquired by Embarcadero, and Jacob Thurman staying active on them

Posted by jpluimers on 2015/01/21

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

–jeroen

Posted in Castalia, Delphi, Delphi XE8, Development, Software Development | 3 Comments »

Favorite Documents extension for Visual Studio 2010 and up

Posted by jpluimers on 2015/01/20

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.

–jeroen

Posted in 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 | Leave a Comment »

Delphi: ZEROBASEDSTRINGS and maintaining cross-version Delphi libraries

Posted by jpluimers on 2015/01/14

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:


procedure ZeroBasedTest;
const
S: string = '012';
begin
{$ZEROBASEDSTRINGS OFF}
Writeln(S[1]); // shows "0"
Writeln(S.Chars[1]); // shows "1"
{$ZEROBASEDSTRINGS ON}
Writeln(S[1]); // shows "1"
Writeln(S.Chars[1]); // shows "1"
end;

view raw

gistfile1.txt

hosted with ❤ by GitHub

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”


{$ifdef GX_VER240_up}
for Index := Low(input) to High(input) do // for ZEROBASEDSTRINGS
{$else}
for Index := 1 to Length(input) do
{$endif GX_VER240_up}

view raw

gistfile1.txt

hosted with ❤ by GitHub

–jeroen

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

Posted in Ansi, Delphi, Delphi 2007, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Encoding, Software Development, Unicode | 8 Comments »

Search engines for the Embarcadero/CodeGear/Borland newsgroups

Posted by jpluimers on 2015/01/08

Even though 15 years ago they proudly announced to have archived 20 years of usenet, it is virtually impossible to find usenet groups through groups.google.com, and they certainly do not archive the groups at forums.embarcadero.com (formerly forums.codegear.com and forums.borland.com).

So I found only a few sites that do index the Delphi groups (and they do index more than just the Delphi newsgroups), so if you know more, please let me know!

Posted in Delphi, Development, Software Development | 2 Comments »