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 4,227 other subscribers

Archive for October 2nd, 2019

How to break a Monolith into Microservices

Posted by jpluimers on 2019/10/02

Long read, worth it too: [WayBack] How to break a Monolith into Microservices

A guide to the common steps we’ve observed in breaking a monolithic application up into microservices

–jeroen

Via [WayBack] How to break a Monolith into Microservices https://martinfowler.com/… – Jeroen Wiert Pluimers – Google+

 

Posted in Development, Software Development, Systems Architecture | Leave a Comment »

Terminate threads during application or not?

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 »

The Myth of Advanced TDD

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 »

 
%d bloggers like this: