Archive for the ‘Event’ Category
Posted by jpluimers on 2018/05/09

If you haven’t been in the software development arena for the last 50 years, then watch this and learn all “modern” stuff has been around for ages:
Most if it comes from the era of Algol, make, AWK and the famous Structured Programming book (which is not about procedures, but about control flow).
So watch Procedural Programming: It’s Back? It Never Went Away – Kevlin Henney [ACCU 2018] – YouTube
Slide deck: Sideshare: Procedural Programming: It’s Back? It Never Went Away – Kevlin Henney [ACCU 2018]
Then read [WayBack] ISBN 9780122005503 – Structured Programming (A.P.I.C. studies in data processing, no. 8)
Via: [WayBack] Kevlin Henney – Google+
–jeroen
Read the rest of this entry »
Posted in Agile, Conference Topics, Conferences, Development, Event, Paradigms, Software Development | Leave a Comment »
Posted by jpluimers on 2018/05/02
Cool tool that integrates into the Delphi IDE: [WayBack] Dproj changed or not changed? Normalize it! | The Art of Delphi Programming
Via: [WayBack] Introducing DprojNormalizer: http://www.uweraabe.de/Blog/2017/01/18/dproj-changed-or-not-changed/ – Uwe Raabe – Google+
Note there is also RadCLI that requires Python and does it via the command-line:[WayBack] joshkel/RadCli: Command-line utilities for RAD Studio / Delphi / C++Builder
DprojNormalizer supports Delphi XE7 and up.
Updates at [WayBack] Downloads | The Art of Delphi Programming: DprojNormalizer
Note that it requires an elevation to Administrator for installing. If you run Delphi as a normal user, then afterwards you need to register the package yourself, for instance with a batch file like this:
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\18.0\Known Packages" /v "C:\Program Files (x86)\DprojNormalizer\DprojNormalizer240.bpl" /t REG_SZ /d "Dproj Normalizer" /f
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\19.0\Known Packages" /v "C:\Program Files (x86)\DprojNormalizer\DprojNormalizer250.bpl" /t REG_SZ /d "Dproj Normalizer" /f
Adjust your BDS and DllSuffix in the BPL file names using the table at Delphi version info table: C# Builder, Delphi 8 through 10.2 Tokyo and Appbuilder.
If you want to temporarily disable it:
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\18.0\Disabled Packages" /v "C:\Program Files (x86)\DprojNormalizer\DprojNormalizer240.bpl" /t REG_SZ /d "Dproj Normalizer" /f
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\19.0\Disabled Packages" /v "C:\Program Files (x86)\DprojNormalizer\DprojNormalizer250.bpl" /t REG_SZ /d "Dproj Normalizer" /f
If you want to re-enable it: remove the values under Disabled Packages.
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 1 Comment »
Posted by jpluimers on 2018/04/05
For a very long time I’ve discouraged people from using non-ASCII characters in identifiers. It still holds.
In the past, transliterations messed things up. Even with increased support for Unicode, tools still screw non-ASCII characters up.
Delphi is not alone in this (the most important one is the DFM view as text support), see this report: [RSP-16767] Viewing a form as text fails with non ascii control or event names – Embarcadero Technologies (you need an account for this, but the report is visible for anyone):
Viewing a form as text fails with non ascii control or event names Comment
Steps:
- create a new VCL forms application
- drop a label onto the form
- change the name of that label to lblÜberfall (note the U-umlaut)
- switch to view as text
- exp: DFM content shown as text
- act: first line is shown incorrectly (see screenhsot)
–jeroen
Source: [RSP-16767] Viewing a form as text fails with non ascii control or event names – Embarcadero Technologies
via: [WayBack] Code of the day – – Thomas Mueller (dummzeuch) – Google+:
function TNameGenerator.StrasseToStrasse(const _Strasse: string): string;
begin
Result := _Strasse;
end;
…
Strasse := StrasseToStrasse(_Strasse);
Read the rest of this entry »
Posted in ASCII, Conference Topics, Conferences, Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Encoding, Event, Mojibake, Software Development | Leave a Comment »
Posted by jpluimers on 2018/02/01
One day I must re-publish these papers:

[WayBack] GetPublished – Author Information
From the referencing pages:
Intermediate paper for Delphi programmers starting to use Linux. It explains how to use and integrate Linux and Kylix with Windows and Delphi.�
As a Delphi developer, you will find C# easier to learn than you might have thought. Get a head start with this revealing presentation.�
This session describes COM, CORBA and SOAP, indicating what they share, what sets them apart, and how you can choose among them.�
This session provides a demonstration of ReCruit, including a discussion of its development and deployment process. ReCruit was built using Delphi and InterBase.�
–jeroen
Posted in BorCon, C#, Conferences, Delphi, Development, Event, SOAP/WebServices, Software Development | Leave a Comment »
Posted by jpluimers on 2018/01/31
Of the things not possible with generics in Delphi, I already wrote about Impossible: Property using Generics in Delphi.
Now it’s time to write about simulating a free function with generics as this is impossible:
function CreateManaged<T>(const value: T): IManaged<T>;
Usually I create a static record method for these, as records do not have VMT overhead, less RTTI overhead and I’ve been used to see records as helpers for other types long before helpers initially were introduced in Delphi 8 to extend classes..
Spring4D has an excellent example of such a record workaround in the Managed.New<T> commit:
type
Managed = record
public
class function New<T>(const value: T): IManaged<T>; static;
end;
...
class function Managed.New<T>(const value: T): IManaged<T>;
begin
Result := TManaged<T>.Create(value);
end;
It basically is a factory for classes implementing the IManaged interface.
In the mean time, Managed has been renamed to Shared but the above code shows my point.
–jeroen
Reference: [WayBack] Class Helpers documented in Delphi 2007, introduced in Delphi 8
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 5 Comments »
Posted by jpluimers on 2018/01/04
A few people recently discovered the beauty of record helpers:
Record helpers can help any value type (which includes enumerated types) so you can add functions to enumerations.
Class helpers can help class types.
There are no interface helpers and likely won’t be there for a long while.
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Power User, Software Development | 2 Comments »
Posted by jpluimers on 2017/12/27
It’s too bad that you need workarounds to get ByteStrings working on mobile devices as there are APIs there (like shaders) that work best with them.
There was a nice discussion on this last year at [WayBack] I miss AnsiString on Mobile…not only for Internet but for Shaders also.// FMX.Context.GLES.pasconstGLESHeaderHigh: array [0..24] of byte =(Byte(‘p), … – Paul TOTH – Google+ based in this code example in the FMX library undocumented unit FMX.Context.GLES:
// FMX.Context.GLES.pas
const
GLESHeaderHigh: array [0..24] of byte =
(Byte('p'), Byte('r'), Byte('e'), Byte('c'), Byte('i'), Byte('s'), Byte('i'), Byte('o'), Byte('n'), Byte(' '),
Byte('h'), Byte('i'), Byte('g'), Byte('h'), Byte('p'), Byte(' '), Byte(' '), Byte(' '), Byte('f'), Byte('l'),
Byte('o'), Byte('a'), Byte('t'), Byte(';'), Byte(#13));
There are more than 500 places in the Delphi library sources that uses this construct and even more that do other fiddling (like [WayBack] TEncoding.GetBytes) to get from strings to bytes.
I wonder if by now we still need the workarounds that Andreas Hausladen provides:
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Encoding, Event, Software Development | 6 Comments »
Posted by jpluimers on 2017/12/21
I started this post as “A case against FreeAndNil” but soon found out about [WayBack/Archive.is] A case against FreeAndNil – Community Blogs – Embarcadero Community.
Recently I was refactoring a bunch of code that was classed based to become interface based.
The old code had a lot of references to classes like this:
FMyField: TMyClass;
The compiler had detected those as compiler errors so now they were like this:
FMyField: IMyInterface;
But the compiler would still happily compile code (for instance in destructors) containing:
FreeAndNil(FMyField);
The only way that FreeAndNil can be implemented is with an untyped var parameter:
Read the rest of this entry »
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 14 Comments »
Posted by jpluimers on 2017/10/31
A few tricks to write long strings to files when the Delphi debugger cuts them off (just because they like using 4k buffers internally);
TStringStream.Create(lRequestMessage).SaveToFile('c:\temp\temp.txt')
TIniFile.Create('c:\a.txt').WriteString('a','a',BigStringVar)
TFileStream.Create('c:\a.txt', fmCreate or fmShareDenyNone).WriteBuffer(Pointer(TEncoding.UTF8.GetBytes(BigStringVar))^,Length(TEncoding.UTF8.GetBytes(BigStringVar)))
They all work form the debug inspector, but they do leak memory. See comments below.
Via:
–jeroen
Read the rest of this entry »
Posted in About, Conference Topics, Conferences, Delphi, Development, Encoding, Event, Software Development | 6 Comments »