Convenient list to decide what to put in your version control system: Delphi File Extensions – Delphi Programming.
–jeroen
Posted by jpluimers on 2014/12/10
Convenient list to decide what to put in your version control system: Delphi File Extensions – Delphi Programming.
–jeroen
Posted in Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/12/01
After speaking on EKON 2014 and ItDevCon 2014, the last month has been extremely busy on both the work and family side of things.
So it took longer to write my review of the Delphi Cookbook by Daniele Teti, Packt publishing (ISBN 978-1783559586).
Before the review, first two ways to see for yourself if you’d like the book:
Daniele Teti has a Table of Contents on the page where he introduced his book, but that ToC is a bit poorly formatted, so I included a better formatted one below.
Some other reviews of the Delphi Cookbook also make an interesting read (I read them after writing my own):
Before the review a disclaimer. I bought the eBook version before Packt publishing asked for reviewers. They sent me a paper copy for free (which somehow took 2 weeks to arrive). I read about 25% of the book before the two European Delphi conferences, and the rest over the last two weeks.

I’ll try to keep this to the point, as too much detail would be killing. And I’m not writing a book here (:
So lets start with what I like:
I want to stress the last: Daniele Teti did an excellent job on this.
When writing a book or teaching material, it is hard to strike balances between the kinds and diversity of topics, the depth and order of the topics, and choosing between what to cover and how to cover it.
The way the chapters a built together with a variety of interesting topics per chapter, a great mix of chapters, and the various topics building (but not too much relying) on previously covered topics is really great. The whole book shows that Daniele is a great teacher. Well done.
Then a few things I dislike:
The dislikes are minor compared to the likes, so here is the…
I didn’t buy the book by accident: knowing the presentation and teaching style of Daniele, I was expecting a nice mix of topics explained in a light and fun way. The book surpassed those expectations by far.
So any Delphi programmer should buy this book. If not for using right now, then for getting some ideas, and reading the various topics later.
Below some suggested combinations for using this book various Delphi audiences.
Buy this book. It gets you inspired, even if only some of the topics are suited for real beginners. Then get the books below, read them and get back to the Delphi Cookbook for more inspiration:
Buy this book. Consider buying Coding in Delphi by Nick Hodges.
Also read Coding in Delphi by Nick Hodges.
I know few people that master all Delphi topics well (I’m not one of them: especially on the mobile side I’ve still a lot to learn). Even for gurus, I think this is a nice book, especially considering the price.
–jeroen
Synchronizing shared resources with TMonitor
Talking with the main thread using a thread-safe queue
Synchronizing multiple threads using TEvent
Displaying a measure on a 2D graph like an oscilloscope
–eof–
Posted in Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 5 Comments »
Posted by jpluimers on 2014/11/20
Please someone add the Software on a String blog to DelphiFeeds (:
Great article on testing implementations of interfaces in a generic way. With examples in NUnit and DUnit.
How do I test an interface? Should I even do that? | Software on a String.
And then Stefan Glienke made a great comment at https://plus.google.com/u/0/+MarjanVenema/posts/Dgb8WADLwXZ making the DUnit implementation even easier:
But even if you go without that extra base class the cool thing is that you don’t need to restrict your classes to be a TInterfacedObject but specify the interface they need to implement (yay, compiletime type safety) and then you can get rid of the Supports call and directly assign the result of the ctor call to the sut variable.
–jeroen
Stefan’s code:
Posted in Delphi, Delphi 2007, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/11/13
Steve Maughan posted a great question on G+ last week:
The resulting thread is full of people answering with their favorite JVCL and JCL gems.
Recommended reading!
–jeroen
via JCL & JVCL – What are the Real Gems in these Tool Sets I’ve just installed JCL….
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 1 Comment »
Posted by jpluimers on 2014/11/11
One of the things a lot of Delphi users want is to be able to automagically remove unused units from their uses lists and projects.
The short answer is: you can’t.
The long answer starts with: you can’t fore a number of reasons.
Similar reasonings hold for many other development environments. Plain Windows EXEs and DLL dependencies. .NET projects and assembly dependencies, etc.
The first reason is that each unit (module, assembly, or other dependency) can contain global code to be executed at unit start/load or finish/unload.
So even though you do not reference anything inside that unit, the initialization and finalization sections can be run.
Removing the dependency from your units and project, kills that functionality. And might break all sorts of things.
Sometimes you have subtle load order dependencies of units. Those should be rare, and if they are there, should be enforced by the affected units themselves. But everyone knows those subtle dependencies are more often a by product not enforced by anything than coincidence.
So if you start removing references, the load order might change, and subtle bugs may occur.
In other words: test, test, test and test your codebase before and after removing unit references from uses lists.
If you understands the dependencies of initializtion/finalization or load order, you will get interested to know what units are actually being used.
The ultimate source for this would be the Delphi compiler. Bad luck here: you cannot use it as the IDE and command-line interfaces don’t offer a hook to it to do just this.
So you need alternative parsers that can help out. The answers to How to remove unused units from all source files on Delphi XE2 describe a few and they all have the same drawback: they are not the Delphi compiler, so they are a rough approximation of what the compiler would do.
And even if the approximation would be perfect, they all suffer from the same thing the compiler suffers from: you can only have one set of conditional defines, platforms, etc at the same time.
There is lots of code for which the usage is conditional, but where the uses list does not reflect this.
Optimizing uses lists to eliminate unused units seems a simple thing at start, but isn’t.
The best way to keep those optimized is to prune them while developing. So if you remove code, try to remember cutting down the uses lists by hand.
And then test, test, test and test your codebase.
–jeroen
via: ide – How to remove unused units from all source files on Delphi XE2? – Stack Overflow.
Posted in Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 8 Comments »
Posted by jpluimers on 2014/11/07
While researching the manifest problem I will post about next week, I made a short list of free Windows Resource Editors:
All other resource editors I found were not free, and someof them not maintained for an even longer period than the free ones.
–jeroen
Posted in Delphi, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Power User, Software Development, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | 4 Comments »
Posted by jpluimers on 2014/11/06
The last couple of weeks I taught two sessions at both ITDevCon 2014 in Milano, Italy and EKON 2014 in Köln, Germany.
The EKON materials are slightly more up to date and elaborate (sessions there were 75 minutes), so below are all the links.
Notes:
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 1 Comment »
Posted by jpluimers on 2014/11/06
Two interesting links today about Delphi and Batch files.
–jeroen
PS: If you want to see some serious Batch file and PowerShell related scripts, then read through the Build Automation part of my session materials I posted to ITDevCon and EKON session materials on Delphi Unit Testing + Build Automation and Continuous Integration on-line.
More details are in the batch files here:
and PowerShell scripts here:
Posted in Batch-Files, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, QC, Scripting, Software Development | 7 Comments »
Posted by jpluimers on 2014/11/05
Vin Colgin posted on G+:

The kind of text that the Delphi IDE often removes in a .dpr file.
FastMM4 and lines in the *.dpr
I’ve got an old problem, in which the IDE will take the lines required out of the “uses” clause in the *.dpr. Something I’m sure we’re all aware of, but is there a solution to keep it from doing it?
The comments indicate the problem is less severe in more recent Delphi versions:
Daniela Osterhagen Actually it has become much better. The IDE doesn’t meddle as much with the DPR files as it used to.
One option for solving this issue is adding a new unit as the first entry that permanently stays there and moving the ifdef to that unit.
That’s what I did a long time ago and even put on-line, and even put it on-line at CodePlex as FastMM4BootstrapUnit.pas (now moved to bitbucket as FastMM4BootstrapUnit.pas). Too bad CodePlex and BitBucket are not indexed on Google, so I commented this:
I’m using a FastMM4BootstrapUnit for that at the top of my DPR; it looks like this […]
It will eventually end up at my BeSharp.net repository any way.Let me know if you need it there soon, and I can probably get something published after the Entwickler Konferenz next week.
So various people are now using this:
- Vin Colgin: very nice. Thanks for the tip!
- Warren Postma: This works fine for me in xe6 and up.
- Bruce McGee: Nice. May I steal this? And by “steal”, I mean giving credit in the code comments.
Since I could use this unit during my EKON 2014 talk about Delphi Unit Testing, I expedited the publication:
And explained the usage in this Unit testing session session materials.
Note: this file isn’t indexed either (as BitBucket doesn’t allow it), but since the repository will be git based in the foreseeable future anyway, I can then move it to GitHub which does allow Google to crawl the master branch.
–jeroen
via FastMM4 and lines in the *.dpr I’ve got an old problem, in which the IDE….
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 5 Comments »
Posted by jpluimers on 2014/11/04
Normally you would not want to use a reserved word as an identifier. But sometimes it can be very convenient, for instance for a code generator that wraps remoting calls or does ORM.
Both Delphi and C# have an escape for this:
The prefixes are to tell the compiler knows you really know what you are doing, and are using a reserved word as an identifier.
The cool thing: in the Run Time Type Information (Delphi) or Reflection (C# and VB.NET) you will see the names without the prefix.
Some examples from StackOverflow: Read the rest of this entry »
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Conference Topics, Conferences, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Event, Jon Skeet, Software Development, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 7.0, VB.NET 7.1, VB.NET 8.0, VB.NET 9.0 | Leave a Comment »