Archive for the ‘Software Development’ Category
Posted by jpluimers on 2019/10/03
For my link archive:
If you use Threads or global Objects (which are created in the initialization section for example) You have to cleanup/shutdown them in the OnTerminate event of the ISAPI Application. If You destroy/shutdown them in the finalization section in a unit it could end up in a hanging application pool in IIS on shutdown/reuse and some windows event log entries.
//added
procedure DoTerminate;
begin
//free global objects and wait/terminate threads here
end;
exports
GetExtensionVersion,
HttpExtensionProc,
TerminateExtension;
begin
ReportMemoryLeaksOnShutdown := true;
CoInitFlags := COINIT_MULTITHREADED;
Application.Initialize;
Application.WebModuleClass := WebModuleClass;
TISAPIApplication(Application).OnTerminate := DoTerminate; //added
Application.Run;
end.
Source [WayBack] How to properly cleanup/shutdown a Delphi ISAPI (which uses Threads) | Mathias Pannier programmiert
Related:
–jeroen
Posted in Delphi, Development, IIS, Software Development | Leave a Comment »
Posted by jpluimers on 2019/10/03
On my Delphi research list:
[Window Title]
Error
[Content]
Error creating form: Root class not found: "".
[OK]
I think it has to do with form inheritance, but a quick glance didn’t raise any warning signs.
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 1 Comment »
Posted by jpluimers on 2019/10/03
Interesting read: [WayBack] Ubiquity: The End of (Numeric) Error
Crunching numbers was the prime task of early computers. The common element of these early computers is they all used integer arithmetic. John Gustafson, one of the foremost experts in scientific computing, has proposed a new number format that provides more accurate answers than standard floats, yet saves space and energy. The new format might well revolutionize the way we do numerical calculations.
via:
–jeroen
Posted in Algorithms, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2019/10/02
I got an interesting question a while ago: should an application terminate (anonymous) threads or not?
A problem is that a thread might not execute unless you call WaitFor before Terminate is called. The reason is that the internal function ThreadProc does not start Execute if the thread is already terminated.
The ThreadProc in the System.Classes unit is an ideal place to set breakpoints in order to see which threads might start.
Other useful places to set breakpoints:
TAnonymousThread.Execute
TExternalThread.Execute
Execute not being called by ThreadProc is a bug, but it is not documented because QC is gone (taking the below entry with it), it is not in QP and the docwiki never got updated.
Given QC has so much information, I am still baffled that Embarcadero took it down.
Sergey Kasandrov (a.k.a. serg or sergworks) wrote in [WayBack] Sleep sort and TThread corner case | The Programming Works about this bug and refers to WayBack: QualityCentral 35451 – TThread implementation doesn’t guarantee that thread’s Execute method will be called at all .
The really bad thing are the WayBack: QualityCentral Resolution Entries for Report #35451 Resolution “As Designed” implying the design is wrong.
In his post, sergworks implemented the Sleep sorting in Delphi. Related:
Note that application shutdown is a much debated topic. Best is to do as little cleanup as possible: your process is going to terminate soon anyway. No need to close handles or free memory: Windows will do that for you anyway. See for instance:
Related to waiting:
Related to executing:
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Multi-Threading / Concurrency, Software Development, The Old New Thing, Windows Development | Leave a Comment »
Posted by jpluimers on 2019/10/02
[WayBack] The Myth of Advanced TDD
People frequently ask me for “advanced TDD”. I have good news and bad news.
TL;DR:
if you think you need to to “advanced TDD”, then you don’t do TDD.
If TDD hurts, then you need to improve your design or code. It’s like going to the gym: it’s not the exercise that causes the hurt, but the lack of physical condition.
via: [WayBack] “If you want advanced testing techniques, then you’re probably looking for techniques that will make your code worse, not better.” – J.B. Rainsberger @j… – Marjan Venema – Google+
–jeroen
Posted in Development, Software Development, TDD, Testing | Leave a Comment »
Posted by jpluimers on 2019/10/01
Long read worth it: [WayBack] Microservices – Please, don’t | Basho Technologies
This blog post is adapted from a lightning talk I gave at the Boston Golang meetup in December of 2015.
TL;DR
When should you use microservices?
“When you’re ready as an engineering organization”
–jeroen
Posted in Development, Software Development, Systems Architecture | Leave a Comment »
Posted by jpluimers on 2019/10/01
Since each Windows version, Microsoft hides the way to first enable, then configure IIS Logging in a different place: [WayBack] Enabling IIS log files on Windows 7.
That should provide me some guidance on how to find it back when it is not displayed at all.
Related:
–jeroen
Posted in Development, IIS, Power User, Software Development, Windows | Leave a Comment »
Posted by jpluimers on 2019/10/01
On my research list: ApexSQL PLAN analysis tool released in 2017. It requires SSMS which you can get at [WayBack] Download SQL Server Management Studio (SSMS) | Microsoft Docs.
More info:
Via:
–jeroen

Posted in Database Development, Development, Software Development, SQL, SQL Server | Leave a Comment »