Posts

Code examples from Delphi Event-based and Asynchronous Programming Book

Image
  A little birdie once told me that having code examples from my book in a friendlier form would be highly appreciated. Of course I heard the friendly chirp  So here it is! The full list of code examples from the book Delphi Event-based and Asynchronous Programming is available for you to download from my GitHub page: https://github.com/dalijap/code-delphi-async

Are const parameters dangerous?

Image
Marco Cantu's recent blog post The Case of Delphi Const String Parameters opened a can of worms. A very, very old can... The presented behavior is not something new, and it is certainly not a compiler bug. It is just the way reference counting works. A pure ARC problem—one instance of something is destroyed when the other one is created and assigned, because the const parameter did not trigger the reference counting mechanism—this is why const is used for speed optimization in the first place. The same thing that happens with strings happens with reference-counted objects, but it is easier to see what happens with objects in the same kind of code. You will need a form with a memo and a button to test the following code: type IFoo = interface function GetCount: Integer; function GetNumber: Integer; end; TFoo = class(TInterfacedObject, IFoo) private FNumber: Integer; public constructor Create(ANumber: Integer); destructor Destroy; override; f

Just released: Delphi Event-based and Asynchronous Programming - Complete version - 291 Pages

Image
 Delphi Event-based and Asynchronous Programming https://dalija.prasnikar.info/delphiebap/index.html Event-based programming is everywhere. Nowadays, you can hardly write any kind of application without leaning on events and messages. This simple, yet extremely powerful mechanism is also the cornerstone of asynchronous and multithreaded programming. Without events, we would not know when some task was completed. But, asynchronous and multithreaded programming consists of more than just handling multiple threads, protecting shared resources, and synchronization. It also includes designing and understanding program flow. That design aspect is often forgotten, taken for granted, and solving all the fine-grained nuances of multithreaded programming hogs the spotlight. Without understanding asynchronous flow and the bigger picture it can be hard to properly solve all the other issues, including multithreading. What used to be plain spaghetti code, now becomes temporal spaghetti. You can los

You already purchased Delphi Event-based and Asynchronous Programming Part I?

Image
Thanks to all of you who purchased the incomplete pre-release version (179 pages) of my eBook! After a minor delay, the full version is here! You can download it through the same PDF/epub/mobi links that you have received earlier from FastSpring via email. The subject line of that email message was: "Your Delphi Event-based and Asynchronous Programming - Part I Delivery Information". If you have any problems, feel free to contact me via the contact form on my site. Thanks again! Happy Holidays to you all! 

Just released eBook: Delphi Event-based and Asynchronous Programming

Image
 Delphi Event-based and Asynchronous Programming  I just had to do it... Go with the flow! It's the Black Friday / Cyber Monday "season", so I had to rush the book offer  The book was actually scheduled for release in early December, but then the Black Friday deals started popping up all over the place... pressure was building... and I finally caved in! I cut the darn thing in two, and decided to offer Part I at a discount, and will give Part II for free to all Buyers. Not really a 97% BF discount but hey... Junior is still studying, and we still have to pay the bills (Corona doesn't help, either)! So, here it is!  I hope you'll like it like you did Delphi Memory Management! https://dalija.prasnikar.info/delphiebap/index.html Event-based programming is everywhere. Nowadays, you can hardly write any kind of application without leaning on events and messages. This simple, yet extremely powerful mechanism is also the cornerstone of asynchronous and multithreaded prog

New Book In The Press!

Image
 Delphi Event-based and Asynchronous Programming  About to be released by the end of the month, Delphi Event-based and Asynchronous Programming brings you the following in about 260 pages: Event loops Messaging systems Asynchronous programming Removing Application.ProcessMessages and moving tasks to background threads Threads in general Tasks Futures Thread safety Communicating with the GUI And more... Stay tuned  Just released eBook: Delphi Event-based and Asynchronous Programming

DelphiCon 2020: Windows VCL Panel

Image
Join Ian Barker, Marco Cantù, Alister Christie, Victory Fernandes (Vic), Dr. Holger Flick, David Millington and me at Windows VCL Panel. We will talk about the best Delphi core feature, you all know and love, VCL framework. Scheduled for November 18, 2020, 5:00 pm CET https://delphicon.embarcadero.com/talks/windows-vcl-panel/ DelphiCon 2020. is starting in less than 8 hours. But there is still plenty of time to review the schedule and pick what you like. https://delphicon.embarcadero.com/