On 12 January Serge Pilko, Embarcadero MVP and founder of Softacom, a world leading Delphi software development services and software solutions provider, published a video of his interview with Alister Christie, author of the legendary “Code Faster in Delphi” and the creator of hundreds of videos that have shown many of today’s Delphi developers around the world how to program and accomplish things with Delphi.
Table of Contents
Download Code Faster in Delphi for free here
Alister also has an upcoming book, “Code Better in Delphi”, scheduled to hit bookstores soon.
We have chosen to publish the transcript of their conversation in a three-part series of blog posts, of which this is the third.
Alister Christie And Serge Pilko Talk Delphi, Part 3 of 3
Alister So it’s a fairly easy read, and I’ve been trying to write short books. If you look at the old Marco Cantu books, they’re 800 pages or something like that, especially, they’re huge tomes. And you know, back in the day big books sold, but now I think the trend is for shorter books on targeted topics. So, there’s now books on design patterns and memory management and writing high-performance applications and stuff that are available. So you don’t get this huge book which kind of covers everything and only a little bit of detail. You get these highly targeted books on very specific topics. So you get to learn something in great detail rather than having to sort of work it out or for yourself, which is really good. I think that’s a really positive thing that’s happened over the last… probably starting with Nick Hodges’ books, Coding in Delphi, and then you know, More Coding in Delphi, and then there’s the Dependency Injection book. So, and yeah. You know,[inaudible] has written books and Primož Gabrijelčič has written a couple books and yeah, there’s now [inaudible] on all sorts of topics. So…
Serge You’re my hero because you have to be such a self-motivated guy for writing a book because I have a similar dream, but I have such a lot of professional, like routines, like daily routines. Of course I will spend my time with family, relatives. I don’t know how you can do that, especially, but you even have cows and dogs, I don’t have cows…
Alister Yeah, I have the advantage that I have a regular job now as well. So I’ve got all the time for tinkering with projects. In theory I’ve got a lot of time. It doesn’t seem to materialize, I seem to be spending a lot of time doing chores and, now I’ve got a two-year-old son, which is, you know, I’ve got a lot of time with him, which is good.
Serge Okay. Talking about “Code Better in Delphi”, you mentioned the better cleaner code, but did you have an experience, like a migration like from a Delphi legacy project to up-to-date Delphi because it’s a little bit like migration and the better code and refactoring are similar things, so maybe there was an insight or idea for the book.
Alister Yeah. Certainly a bit of code is generally easier to migrate because it’s generally more consistent and, and what have you. So yeah, if you’re doing, you know, if you’re trying to convert unicode using strings as byte arrays, that’s not a bad practice to begin with, but you have to now port a whole heap of code to use, T-bytes or something like that rather than strings. I’ve worked on lots of projects for… you know, writing to the new versions of Delphi, all from the BDE to using FireDAC and what I was doing at the moment, the real estate project I’ve been working on for the last two decades, more than. It’s in Delphi 11, but the database is all just string fields. So I’m just, I’m in the process of… I’ve written some scripts and things like that to convert that to use wide string fields and wide number fields and that kind of thing. So that’s, that’s working, but the interesting thing about that application, because it was FireDAC and I wasn’t sure what database to support, so I basically supported them all. So in its current state, it’s Postgre or Maria DB, SQL Server, SQLite, Firebird, InterBace, it runs quite heavily talking to any of those databases.
Serge There’s all these things and all these difficulties with the strings, for example. Imagine, is it possible to develop this real estate program from scratch using another technology? How many years will it take?
Alister Yeah. If I wanted to rewrite, I don’t know, it would take years. It would be many years, yeah.
Serge The main benefit of Delphi is that we can still use stuff from 90, 98, and it’s still the same application.
Alister There was a project, when I got on board originally it was written in Dataflex and then it was imported to Delphi because you know, Dataflex was a bit of a dead end. I don’t know if anyone remembers, it was kind of a databasing language.
Serge Anyways, this is the same. If we’re talking about Delphi, it’s the same forms. Not like in Visual Studio, we started with WinForms and then we cannot switch to WP because there’s two different animals. But in Delphi we can migrate up to date and keep up to date version.
Alister Yeah, nightmarish if you’re doing Microsoft technology, even Java or Android, they have really large changes that require you to rewrite your application. But you can take your Delphi 1 project and it will quite possibly compile quite happily in Delphi 11, because of all the backward compatibility that’s been maintained. It’s quite crazy, you might need to install a BD or something like that to get it working. The Delphi project I’ve worked on, was originally written in Delphi 1, might have been Delphi 2, I took over it in Delphi 3, and I’ve kept it… I’ve skipped a few versions here and there, but it runs in Delphi 11. It’s probably a couple of hundred thousand lines of code. It’s not huge, but t’s significant.
Serge If you are not calculating the lines of the components, just your…
Alister Oh yeah. It’s millions and millions of lines of code, you can’t do… there’s QuickReports and Getit Express and no, I wouldn’t want to write those from scratch. Delphi allows small teams to be highly productive. And the fact that you don’t have to throw out your code every five years means that you can basically stay ahead of the… You look at these really large projects and they have hundreds of developers working on them and you think, does it really need that many people
Serge Anyways, that’s why we love Delphi.
Serge Was it in Android Studio?
Alister No, it was Eclipse. So this is going back quite a while. And I just found programming Java painful, because it was so verbose. You had to write, even though it had garbage collection, so you didn’t have to [inaudible] anything, you just end up creating so many classes to… You create a class and you need to plan, you have to create classes to pass into the constructor. And always, everything’s an object. Whereas in Delphi you can have standalone functions and things like that. That can be just as quite economic and easy. I found Java, let’s say a third of your code is meant to be in your material, your memory management. And so in theory, that would all be gone in Java, but I just found I was writing more code in Java than I would the equivalent in Delphi. I certainly have not done C# for 15 years, but I did a little bit of C# for a .Net framework for Windows mobile phones… but I quite liked .Net.
Serge But the interesting thing is that Delphi is most stable if you are talking about… if you compare with Microsoft technologies, because with Microsoft it’s a new technology each two years, three years, you know?
Alister Yeah. You’re looking at a serious rewrite every, every five years. And you probably wouldn’t have any code left after 10 years. I mean, if you’d written it in Visual Basic, I mean and then Visual Basic .Net, and then port it to C#, and then Winforms WPF, and then… whatever their current…
Serge Yes. What about the risk management for the decision-makers when they’re thinking about life cycles, if their software in five, 10 years, what will happen?
Alister Yeah. I mean, people think going with Java or C# is the safe option cause you know, so many people are using it, but this is not necessarily the case in terms of… if your code is going to last decades… I don’t know what Delphi’s gonna be like in ten years’ time, maybe it’ll be gone, maybe we’ll all be programming in LISP, and REST, or one of the new languages that’s popular. But Delphi’s got a huge track record, right? You can take programs that are 20 years old and recompile them without very much effort. Sometimes no effort in the latest version.
Serge New hardware, new operating system, but it still works. yeah.
Alister Yeah. I mean Delphi 1, you would have been doing that Windows for workgroups or something like that. It’s Windows 3.1. You can take that application and run it on Windows 11, or recompile it and run on Windows 11. And once you run it on WIndows 11 a 16-bit application is not supported at all anymore. And I think [inaudible]. But yes, you could recompile it and it’ll probably run. In terms of, as you say, risk management, I think the biggest complaint I’ve seen is finding Delphi developers. And this dichotomy of… there’s Delphi developers saying there’s no jobs and people with Delphi projects saying there’s no developers. It doesn’t quite…
Serge That sounds strange, we have a project but we don’t have Delphi developers, and they’re talking about “we cannot find the work” with Delphi. We have to connect them to each other somehow.
Alister So I think in this day and age, you know, it’s definitely possible to outsource projects to other countries and or parts of projects. If you can write a detailed specification for something, then, because of the collaboration tools out there.
Alister People work all over the word now, so you don’t necessarily have to have someone in your local country to work on a project. It’s interesting. I was working on a project where most of the team was in another city. It was about a two hours’ drive from where I live, but I was actually working in the Wellington office working so I was a remote worker but I was still commuting to work, and they had this weird thing where they had a physical Kanban board which I didn’t have access to. So it was quite weird. But anyway, there was an instance where remote work did not work very well, but I think in this day and age I think the Covid pandemic has demonstrated that people can work from home…
Serge They are doing almost everything from home…
And I think shops and all the retail stuff ground to a halt but the IT stuff , they just carried on as normal.
Serge There’s a lot of risks for commercial real estate, because it’s not such a [inaudible], nowadays.
Alister It’s interesting what’s going to happen to the leases [inaudible], generally speaking. They may have a three year lease or a nine year lease or something like that on a commercial property. It’d be interesting to see what happens with a lot of companies that are IT-type companies, even companies that aren’t IT-type companies but everything can be done by IT, to the office workers. Whether these offices, a lot of offices are just going to disappear and people are gonna, you know, come into the office one day a week or something like that, and work from home the rest of the time. And so a lot of these commercial premises are gonna be… there’s not going to be any real estate anymore. So
Serge Let’s make a little bit different… let’s say change to the conversation. Do you have a launch date for your book? Do you have a deadline for yourself?
Alister I don’t have a deadline, no. Probably if I had a publisher, I’d have a deadline and that would kind of make me work towards it. But the text is mostly written. I just got a few sections I want to finish off. I’m going to keep thinking of more things I want to mention, like I added a few paragraphs on peer review and pair programming and things like that recently. And yes, it’s a much bigger topic than Code Faster and more opinionated as well. I found it a lot harder to write, it’s probably going to be missing all sorts of topics, but there’s going to be a lot in there, and a lot of Code Faster.
Serge Okay. Are we talking about the Spring, or it will be in Summer? When will it be ready, what do you think?
Alister Yeah. It’ll be finished in the new year, sometime next year it’ll definitely be finished.
Serge But that’s twelve months.
Alister Exactly. So, I could get it done in a few months, in a couple of months, or it might take six months, but I think it’ll be out within six months,
Serge I want to suggest to you to get a couple of copies, free copies of your book. Maybe we can create some contests. And, like an investment let’s say, what do you think, maybe the best questions about Delphi, RAD Studio, some development…
Alister Oh, I’ll leave that up to you. I’ll let you work it out, but yeah, some…
Serge In this case, if you publish the contest rules in the description to the video, we will try to create something interesting. And it’s a long-term contest because we don’t know when the book will be ready, but anyway… Let us know when it will be ready because we also will announce it in all our marketing channels for free of course. We are also creating a Delphi environmental ecosystem because every year when we have such new events, like a new book will be like an event, in 2022 in this case.
I want to tell you best wishes because you need a lot of strength… because it’s interesting, it’s like this book “Zero to One”, it’s a lot of people just thinking, just starting, but they cannot finish. But you already have proven experience with the first book and I believe that you are making the second one and we are waiting for this book, of course.
Alister Finishing the book, actually writing, finished writing the text, and then you get people editing it and going through, and proofreading and all that kind of stuff. That takes quite a while for people to get through it. And you don’t want them all going at once, you want…. So I have the book in a Google document. And so people can go through and make comments and stuff, and then I can make changes as they go. And so it’s kind of an integrative interactive process updating the book. And I don’t want everyone going through all at once. I want people to go through sort of semi serially, so that people aren’t making the same… finding the same mistakes, so to speak. So everyone contributes new ideas and stuff around the same idea, but I haven’t gotten around to fixing. That’s their process and then you’ve got cover design and just getting all the formatting sorted, so that you don’t have a bit of text in a page break in the beginning of the next page, you know, you try and get everything looking appropriate and stuff like that. That all takes time as well. And getting all the footnotes sorted, then references. So just getting the text finished is not actually finishing the book. So I’m probably about 90, 95% complete when writing the text, but editing it will take time.
Serge But this is five percent, it’s like five percent.
Serge Anyway, I want to say good luck with this five percent, it’s very important, I guess, mentally I think it’s important because I know each author can get some concerns about his book or anything else. This is why I want to tell you good luck with your…. And of course there is the timing because I’m not sure how long people will be ready to watch us together. That’s why thank you for coming and thank you for your time, because you know, we are on two different points on the globe, it’s like my morning, but it’s your night.
Alister Yup. Maybe 11:00 AM for you and 9:00 PM for me.
Serge I’ll see you in the next event somewhere. Maybe in some conference, maybe we will build something together. Some educational event or something like that.
Alister I’m certainly happy to come back and talk about different topics or something more specific. We’re not going to get really weird tangents, random paths.
Serge Great. If you want to add something, you can send some info to the Delphi community, because we will share this of course, we do everywhere.
Alister Indeed. Oh, well just, you know, if you want to find out more about my videos, then you come to LearnDelphi.tv, and my book is obviously available to purchase there. Likewise with the commercial videos, which, if you want to learn the VCL and ridiculous details in it, it’s quite good. They’re a little bit out of date now, the VCL ones I recorded were for Delphi XE3. So I need to record a new part for some of the new components.
Serge You have to migrate your videos.
Alister Yeah, I’ll probably just do another video, another series because I’m recording them and they’re still perfectly valid, there’s no content in them that’s been superseded. It’s still… every example will still work in Delphi 11. So there’s this… 20 new components and themes as well. You know, visual styles, which I don’t cover. And at some point, I may do a series on FireMonkey as well. But FireMonkey is a bit daunting. That’s a big, big topic.
Serge That’s a totally different universe, and as a framework. Okay. Thank you
Alister Thank you for your time as well.
Serge That’s our first such person-to-person meeting, an event. Thank you for coming. See you in our next educational or informational events. Bye bye.
Alister Thank you. See you later.