Archive for the ‘Software Development’ Category
Posted by jpluimers on 2020/02/26
As this is still an issue with current Delphi versions: every now and then it looses which designers are needed for a frame:
[WayBack] What is the easiest way of getting Delphi to accept a newly added file as a frame and to treat it as such? – Stack Overflow (by Brian Frost)
<DCCReference Include="x\y\z\myFrame.pas">
<Form>frameMy</Form>
<FormType>dfm</FormType>
<DesignClass>TFrame</DesignClass>
</DCCReference>
Then check your .dfm file to see if it starts with the correct inherited or object as per Delphi – TInterfacedDataModule revisted – use ‘inherited’ in your .dfm files when your datamodules look like forms in the designer.
Oh and at design time, be very careful embedding frames. Better not to do it at all and for certain: do not embed frames in a nested way: [WayBack] Frames in 10.2.2 Hi Has anyone else had issues with frames under 10.2.2? The project seems to have lost its links to the frames? If I went to the Too… – Vince Bartlett – Google+
–jeroen
Posted in Delphi, Development, Software Development | 1 Comment »
Posted by jpluimers on 2020/02/26
This post is a reminder to myself that not all mappings from XSD to programming languages are possible.
There are many impossible cases, so this is just a general reminder.
A Delphi specific case for instance is the mapping of enumerations: one reason is that XSD enumerations are case sensitive, but the Delphi language is not: [WayBack] Using XML Enumerations with Delphi XML Data Binding Wizard – Stack Overflow.
More generic examples from my answer to the above question:
- In XSD you can derive from an existing type in two ways: extending it and limiting it. Object Oriented languages only allow you extend when deriving.
- Delphi is not alone in these kinds of limitations. Generating wrappers from XSD schema’s is the field of specialized tools, even in the Java or .NET world.
I’ve seen horrible things with wildcards that are sort of mappable to Java, but not to C#. This could likely go on for much longer…
–jeroen
Posted in C#, Delphi, Development, Java, Java Platform, Software Development, XML, XML/XSD, XSD | 2 Comments »
Posted by jpluimers on 2020/02/25
I missed this one, so I was glad I archived it because I was curious for Daan van der Werf – Delphi op de werkvloer “Groothandel & Magazijn”.
So here it is: [WayBack] Delphi Conference 2018 – Barnsten.com, with fixed and archived links where possible.
Presentations and code from the Delphi Conference 2018
…
- 09:30-10:30 – Keynote: Marco Cantú – Product Manager Delphi – “Delphi 10 for Windows 10 and beyond”
- 10:30-11:30 – Brian Long – Creative Delphi Debugging Techniques
- 11:50:12-40 – Brian Long – How to Access the Android API
- 11:50:12-40 – Bruno Fierens – A RADically new way to develop modern web applications
- 13:30-14:20 – Roald van Doorn – Continuous delivery with existing VCL Applications
- 13:30-14:20 – Daan van der Werf – Delphi op de werkvloer “Groothandel & Magazijn”
- 14:30-15:20 – Danny Wind – Micro Services and Progressive Web Apps (PWA) Delphi
- 14:30-15:20 – Bob Swart – Delphi en FireDAC Enterprise Connectors
- 15:40-16:30 – André Mussche – De opkomst van spraakherkenning
- 15:40-16:30 – Marco Cantù – RAD Server In Depth
–jeroen
Posted in Conferences, Delphi, Development, Event, Software Development | 2 Comments »
Posted by jpluimers on 2020/02/25
Food for thought: what is the hardest thing in your sprints, why, can you make it less hard?
[WayBack] One Story Per “Sprint” – John Cutler – Medium:
Delivering a “potentially releasable increment” after N days is not “hard”. It is not rocket science. (Almost) any team can do it.
Via: [WayBack] One Story Per “Sprint” – John Cutler – Medium – Marjan Venema – Google+
it is not funny to always feel behind; that it actually is detrimental to productivity to focus solely on efficiency, working hard and being hero’s; that it might be a good idea to start with changing your perspective and doing something which has a chance of being successful (doing a single story) and build from there.
It is not about looking busy, but it is about getting things done without having any fears.
–jeroen
Posted in Agile, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/02/25
Reminder so self: [WayBack] sglienke / Spring4D / source / Source / Reactive / Spring.Reactive.pas — Bitbucket fragments:
type
TInterlocked = SyncObjs.TInterlocked;
TInterlockedHelper = class helper for TInterlocked // TODO: move to Spring.pas
class function CompareExchange<T: IInterface>(var Target: T; const Value, Comparand: T): T; overload; static;
class function Exchange<T: IInterface>(var Target: T; const Value: T): T; overload; static;
end;
{$REGION 'TInterlockedHelper'}
class function TInterlockedHelper.CompareExchange<T>(var Target: T;
const Value, Comparand: T): T;
begin
Result := Default(T);
PPointer(@Result)^ := CompareExchange(PPointer(@Target)^, PPointer(@Value)^, PPointer(@Comparand)^);
if PPointer(@Result)^ = PPointer(@Comparand)^ then
begin
if Assigned(Value) then
Value._AddRef;
end
else
if Assigned(Result) then
Result._AddRef;
end;
class function TInterlockedHelper.Exchange<T>(var Target: T;
const Value: T): T;
begin
Result := Default(T);
PPointer(@Result)^ := Exchange(PPointer(@Target)^, PPointer(@Value)^);
if Assigned(Value) then
Value._AddRef;
end;
{$ENDREGION}a
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/02/24
From quite some time ago, but still very relevant as encoding issues keep occurring:
A while ago, I saw the text “v3/43/4r” in a document.I know it comes from “vóór” (the acute accent emphasises in Dutch), and wonder which encoding failure was applied to get this wrong.
Source: [WayBack] Which encoding failure did encode “vóór” into “v3/43/4r”? – Stack Overflow
From the [WayBack] answer by rodrigo:
- ó: is U+00F3, and occupies the same codepoint (0xF3) in a lot of different encodings (most ISO-8859-* and most western Windows-*).
- In CP850 the codepint 0xF3 is ¾ (U+00BE), that is the three-quarters character. It is the same in other, less used, codepages (CP775, CP856, CP857, CP858).
- The ¾ is sometimes transliterated to 3/4 when the character is not directly available.
And there you are! “vóór” -> “v¾¾r” -> “v3/43/4r”.
The first part (ó -> ¾) is the usual corruption of ANSI vs. OEM codepages in the Western Windows versions (in my country ANSI=Windows-1252, OEM=CP850). You can see it easily creating a file with NOTEPAD, writing vóór and dumping it in a command prompt with type.
–jeroen
Posted in CP850, Development, Encoding, Software Development, UTF-8, UTF8, Windows-1252 | Leave a Comment »
Posted by jpluimers on 2020/02/20
From an interesting discussion at [Archive.is/WayBack] FaceBook: Delphi developer thread by Jarto Tarpio with some measurements by Jarto Tarpio and André Mussche.
- Manipulation of strings and lists in Delphi have high memory allocation/deallocation rates, so HTTP related services with high call rates are affected more than regular services
- FastMM:
- conditional defines that can help are
NeverSleepOnThreadContention, UseSwitchToThread, and UseReleaseStack then measure.
- has one huge advantage: It’s very, very good at keeping memory fragmentation at bay
- default settings are for applications that use lots of CPU, but have no really high memory allocation/deallocation rates
- has very good debugging facilities
- Under
FullDebugMode address space is never released back to the operating system so once the address space has been exhausted there is very little room to manoeuvre.
- TCMalloc:
- is very good at multi-threaded memory management with high allocation/deallocation rates
- needs to be persuaded to releases memory to the OS:
it only releases to the system under two occasions: Freeing another part of the memory, or asking it to release all parts marked as freed.
- has no debugging facilities
The differences make it a challenge to integrate in your development and deployment process: because of the debugging facilities, you’d like FastMM in all your environments, but TCMalloc in multi-threaded environments with high allocation/deallocation rates.
One possibility is to have your CI environment deliver both in all stages, run all tests on both, then choose the final one depending on your run-time configuration.
That gives a burden on configuring your Continuous Integration, but the gain might outweigh this cost.
Relevant links from the Facebook thread:
–jeroen
Posted in Delphi, Development, FastMM, Software Development | 5 Comments »