A Leanpub Podcast Interview With Nick Hodges, Author of Dependency Injection In Delphi

17 min readMay 27, 2017

Nick Hodges is the author of three Leanpub books, including his latest, Dependency Injection In Delphi. In this interview, Leanpub co-founder Len Epp talks with Nick about his career, which includes an education in classical language and work as a naval intelligence officer, his books, and at the end he talks a little bit about his experience as a self-published author.

This interview was recorded on March 9, 2017.

The full audio for the interview is here. You can subscribe to this podcast in iTunes or add the following podcast URL directly: http://leanpub.com/podcast.xml.

This interview has been edited for conciseness and clarity.

Len: Hi, I’m Len Epp from Leanpub, and in this Leanpub podcast, I’ll be interviewing Nick Hodges. Nick is based in Gilbertsville, Pennsylvania and is currently director of product management at Embarcadero Technologies. He’s also a conference speaker, a blogger, and of course, a book author. You can follow Nick on Twitter @nickhodges. And you can read his blog at codingindelphi.com/blog.

Nick is the author of three Leanpub books on the Delphi programming language, Coding in Delphi, More Coding in Delphi, and most recently, Dependency Injection in Delphi.

In this interview, we’re going to talk about Nick’s really diverse career, which includes an education in classical languages, and work as a naval intelligence offer, and eventually work as a software development manager.

We’ll also talk about his work on Delphi, and his role in the Delphi community, his books, and at the end, we’ll talk a little bit about his experience using Leanpub to self-publish.

So, thank you very much Nick for being on the Leanpub Podcast.

Nick: You’re very welcome, it’s my pleasure.

Len: I always like to start these interviews by asking people for their origin story. As I mentioned in the intro, you’ve had a pretty interesting past doing lots of different things. I was wondering where you got started being interested in software?

Nick: Probably back in the mid-70s in seventh grade. We learned BASIC, which was the classic BASIC with line numbers. 10 LET A EQUAL 1, 20 FOR A = 1 TO 1000 DO THIS We used a computer at the University of Minnesota; I grew up in the suburbs of Minneapolis, and it was the old - the original modem, where you took the phone and jammed it into cups on the thing. I think it was 300 baud and we used one of those little TTY machines and the tape and everything like that.

My friends and I loved programming so much, we actually started writing BASIC, very basic — lowercase basic — adventure games. Like you’re walking down the street and something happens to you. Do you one, do this? Two, do that? That was about the extent of our skill in building games, but that was the thing that kind of got the bug in me. And then I kind of lost that as I went through high school and into college.

And then I joined the Navy, and on my second tour of duty, a friend of mine gave me a copy of Turbo Pascal 5.5, and a book — a big, thick book by Tom Swan. And that’s when I really started in earnest with Pascal, and then of course followed that on with Delphi in 1995. I’ve been doing Delphi ever since — both as a naval officer, and as a consultant and a developer and all kinds of different roles with regard to programming.

Len: I think people would probably be interested in hearing about what it’s like to do a tour of ship duty in the Navy.

Nick: It’s not as bad as it sounds. You get to go to a lot of cool and exotic places. I’ve been almost all the way around the world. I sailed all over the Pacific. We worked hard, we worked 15, 16 hour days. Flight ops were going on all day, and I was an intelligence officer, so I would brief and debrief pilots on what they did when they were out flying and what they saw and who they worked with, and all that kind of thing.

And we watched Top Gun about 700 times. I don’t know why, but they played Top Gun continuously on the TV screen on the ship. I was aboard the USS Midway.

Len: So an aircraft carrier?

Nick: Yes, an aircraft carrier.

Len: That’s really fascinating. I’m curious about a couple of things — how often did you get to disembark?

Nick: Probably about once a month, we would pull into a port. I wasn’t on board during anything really interesting. So we usually had a pretty regular schedule, and probably spent no more than about 28 or 30 days at sea. Although, some of my friends who were in the Navy back in the original Iranian hostage crisis during the Carter administration, who were at sea for eight straight months, without pulling into a port. That was back in ’79, I guess. And so that was a big adventure for them, I’m sure. I don’t think the ship smelled very good after that.

Len: I can only imagine. I don’t know the details about the Midway aircraft carrier, but I’m curious — I’ve heard about the aircraft carriers where they’re floating cities with two nuclear power plants and things like that. Is this along those lines?

Nick: No actually, the Midway was christened in 1945, right at the end of World War II. And it’s originally a battleship hull. Which is curious, and has led to some interesting history for the ship. But she saw combat action in Korea and Vietnam, and then again in the Persian Gulf War. And she has only two catapults and three wires, which is unusual.

Most of the big aircraft carriers have four catapults and four wires. But she did the job, and got the job done. We flew F-18s and A-6s off of it. She’s sitting in San Diego now as a museum. And curiously, the ticketing system that I worked on, as one of my jobs, is the ticketing system that they use to admit people to the tours on the USS Midway.

Len: And you studied classical languages, I believe, in college?

Nick: I did.

Len: And then it was after you’d joined the Navy that then, I think through a Navy training, program you got some formal IT training?

Nick: I did. In the mid-90s, I went to the Naval Postgraduate School, which is far and away the best-kept secret in the Navy. Because you go to school full time, you’re paid your regular pay, and you don’t have to wear your uniform very much, which is nice. You wear business attire to work, to school. And it was great. You were just a full-time student, and you didn’t have to worry about money like you did back in college when you were a kid.

And I studied Information Technology Management, right as the internet was bursting. I remember the IPO of Netscape occurred right as I was nearing graduation. And I set up an httpd server on my computer at home, with my open IP address, and just ran my own little website there. Back in the day when it was UNIX running the internet.

It was really a great time to be in school for Information Technology Management. Delphi came out. It was a great time for programming. Things were really bursting. The PC revolution was really at its height, and it was a really good time, and really fun. I made some good friends and learned a lot. It was really great.

Len: I’m going to ask you a few more questions about that a little bit later, but I want to start talking about your books. But you have a blog, which I enjoyed reading in preparation for the interview, and I have a very selfish question, totally switching gears, which is that — you have a funny blog post, where you talk about 50 things you don’t like. And you list the Lord of the Rings books. I was wondering if you wouldn’t mind explaining, because they’re so popular, it’s a -

Nick: Oh I know. I really want to like them, I do. I’ve tried so hard to read them. But I just can’t get past Tom Bombadil. Every time I try and read them, I get to Tom Bombadil, and I have to put them down. I apologize to all of those people that are listening who love Lord of the Rings. The movies were fun. But the books, I just cannot get past Tom Bombadil.

Len: It’s one of the reasons I was interested when I saw that in the list. I’ll say this, I guess providing cover for any angry fans, because they’ll be more mad at me after I say what I’m going to say. But they’re poorly written. My brother feels a little bit more strongly about this than I do. But I kind of agree.

Nick: Very heavy. Very heavy and dense. And I don’t know how to describe it, but yeah, well I’m glad you said that, it makes me feel better.

Len: I’ll get the angry Twitter messages.

You’ve got another post, where you talk about how people are going to have to pay for bug fixes going forward, and you talk a little bit about the history of things being taken away — like free support and stuff like that. And I was wondering if you could explain what you were getting at in that post?

Nick: Well the title was meant to be a little provocative. I don’t think people are going to necessarily enjoy paying for bug fixes. But I do think that the industry is moving into a subscription model where you pay annually, and you get everything that the company releases.

For instance, in our case, we can do multiple releases per year with features in them, and not have to worry — this is getting a little esoteric, as I’ve probably said in the post, but you don’t have to worry about revenue recognition, which is a big problem for businesses, particularly public businesses. But for private businesses as well.

I don’t want to get into the minutiae of it, but it’s just very complicated to release new features and ship products with those new features in it, over the course of a year. And subscription models allow you to ship features, and not worry about all of that kind of thing. Because the revenue is spread out over the year, regardless of how you ship the product, and what form you ship the product. As a result, you’re sort of paying for the bug fixes, because you’re also paying for the features that you get as part of the subscription.

And I confess, the title was a little provocative. But, it was an interesting blog post to write, because it did suddenly occur to me that I probably won’t mind, or don’t mind paying an annual subscription for a good set of software. Like the Adobe stuff is pretty great software for the subscription model, and you’re not paying that much.

Len: I’ve got a subscription that I use — Audition, Adobe Audition — for editing podcasts. And I remember, myself, when monthly subscriptions for software started becoming a thing, that at least I was aware of, it bugged me a bit at first, but you get used to the slowly warming water. So, over time you can actually come to see some of the advantages of it, and see it as more of a bath than a boiling frog or something like that.

You got involved in Delphi pretty early on, is that correct?

Nick: I did, I was on the original Delphi beta.

Len: I was wondering if you could explain a little bit what makes the Delphi programming language unique, to those who aren’t aware of it, and just your interesting story about how you got involved so early?

Nick: Like I said, I started out with Turbo Pascal for Windows. That was the first version I bought, back in Borland’s heyday. And Pascal had always been overshadowed by C++ back in those days, but I enjoyed Pascal a lot better, because I thought it was a much cleaner language. I enjoyed the readability of it. I like begin ends better than curly braces and whatnot. And I feel like it was very strongly typed, which I really appreciated, as I was learning. And that was back in the day when strongly typed languages were new.

And I was at the Navy Postgraduate School, which is in Monterey, California — which is another reason it’s the best-kept secret in the Navy, because it is absolutely gorgeous there. I don’t know if you’ve ever been out to mid-coast California. It’s just beautiful there. It’s about 85° and sunny, 90% of the time. And then it rains for one month, and then it’s 95° and 85° and sunny again.

So it is a beautiful place, and of course it’s about an hour south of Santa Cruz — and Scotts Valley, where Borland was headquartered. I made some friends at Borland up there, as I became more involved in the Pascal community. And they had a picnic for their online CompuServe people, if you remember CompuServe — the online service from way back, where you had a number instead of a user name.

And I met the then-product manager, who asked me what I was doing as a thesis at the Navy Postgraduate School, as part of our conversation. I said I was doing it on software development processes using RAD Tools. And he goes, “Oh [we] should put you on the Delphi beta.” And so, he got me on the beta, and the rest is history from there.

I went on to become a Team B member, which provided online support. And then I became a Borland Advisory Board Member, setting up and managing and running the annual Borland Conference. And eventually I became an employee.

Len: And in your current role, do you do any coding? I think you’re managing a set of products?

Nick: I’m the product manager for all of the Embarcadero tooling. So that means I’m the product manager for Delphi, C++ Builder, InterBase and RAD Server — RAD Server’s our newest product. It’s a REST service server.

Len: I’m curious why you decided to start writing books.

Nick: That’s a good question. I started out thinking to myself that, I’d written tons of blog posts, I’d written a lot of articles. I’ve spoken at conferences. And I finally decided that I had something to say. And so I decided, “Well, I can write a book.” And then, once I found out how easy it was to self-publish, I thought, “Well I’ll go ahead and write it. And if I sell one copy, I’ll be happy.” And fortunately for me, I sold quite a bit more than just one copy. And that certainly piqued my interest in writing another one. Which I did, and then now I’ve written a third one.

Len: Your latest book is about dependency injection in Delphi. I was wondering if you could talk a little bit about what dependency injection is, and why it’s important?

Nick: Dependency injection is just a way to write loosely coupled code. It’s really a $25 term for a 35 cent definition. And the definition really is: don’t create or make anything new up yourself. Allow the caller to do that. And always ask for what you want, don’t create what you want yourself. That pushes the creation of things way back into what’s called the composition route of your application. And that causes your code to be very loosely coupled, because its dependencies are on interfaces, instead of implementations.

Len: And as I understand it, part of the purpose of loose coupling is to ensure that you don’t have to make changes in two places, when you could otherwise make them in one place?

Nick: Yes, well that’s kind of it, too. A properly coupled, very loosely coupled system means that if something breaks over in section A, and you make a change to fix it, it doesn’t affect something over in section Z, which is far apart. If you’re tightly coupled, oftentimes a change in your code can ripple through the codebase to many places that you don’t expect.

So, like you pull on your ear, and your foot pops up. You don’t want that to be the case, right? You don’t want to pull on something in one part of your program, and have it break something in another part of your program. So properly coupled, loosely coupled code allows you to ensure that changes to the code don’t affect other modules.

Len: You talk in the book about a concept, which I hope I pronounce correctly, “connascence”. I was wondering if you could explain a little bit about that.

Nick: In its simplest form, connascence is just a definition for coupling and levels of coupling. I think there’s nine levels of connascence. Did I get that right? Do you remember?

And connascence is — the concept of coupling. I thought it was important. I read, actually, a book by [Meilir Page-Jones{(https://www.amazon.com/Meilir-Page-Jones/e/B001ITVFZQ), years ago — it was written in late 80s, I think, and he talked about connascence. It was the only place I’ve ever seen it. And then I did a little research, and there was a website called connascence.io. It discusses the concept of connascence, and I thought it was important in a book about de-coupling to talk about the definition of coupling, in ways that coupling can be more complex or less complex.

Len: It sounded like a really good concept.

I see something about a reference to the first five levels. So there are at least five.

Nick: I think it’s nine. I’m embarrassed that I don’t remember. [Nick was correct, there are nine levels — eds.]

Len: About your books, and that decision to start writing. I was wondering why you chose Leanpub?

Nick: Well, I chose Leanpub because it was pathetically easy to use. That’s the main reason.

Len: Well that’s good to hear.

Nick: I started out writing my books in Scrivener because my dad has used Scrivener for many years. And Scrivener would not allow me to post formatted code. Obviously if I’m going to post a book about Delphi, I need to be able to format code inside — post code chunks, and chunks of formatted code inside the book. And I started hunting around, then I ran across Leanpub.

And Leanpub uses, I believe, Pygments as its code formatter. And it had Delphi as an option. And then I discovered that everything was written in markup. So I didn’t have to worry about Word documents or anything like that. And I found a decent markup editor, and I just started writing.

And it was really, really easy to do — the publishing side of the book. I tell everybody that asks that 97% of the work is writing the book, and 3% of it was doing the self-publishing part of it, just because Leanpub’s so powerful and easy to use. I don’t want to sound like a commercial, but I am kind of a -

Len: That’s okay, thanks.

We do use Pygments for code. One thing that you mentioned in the beginning of your first book, Coding in Delphi, is that you intended to update the book as the technology evolved. I was very happy to see that that was at least your intention, because that is, for us, a canonical use of something like Leanpub, where you can issue releases whenever you want. And in particular, for technology books that might be about something that’s evolving — then having a kind of living book, is something that we believe in.

Nick: Yes, that’s very powerful. And I haven’t taken advantage of that as much as I could, because I also publish my books hardcopy. Well, paperback anyway. And so I haven’t wanted to get those two out of sync too much.

But I have made corrections to the books and published new versions. A couple of new versions of particularly of Coding in Delphi. I think I’m going to publish a new version of Dependency Injection in Delphi, because I want to include the bio of my tech reviewer in it, and I neglected to do that. So it is a nice ability to be able to republish very, very easily and very quickly.

Len: I’m sure some of the authors or aspiring authors listening might be interested to hear about how you went about making paperback copies of your book, and getting them up on Amazon.

Nick: I used CreateSpace, and I used the printer-friendly version that you guys provide. Which is very, very useful. It literally took me an afternoon to put the book up on CreateSpace. I bought my own ISBNs, which is kind of a racket if you ask me. But I think I have 100 ISBNs that I had to — you either buy them in the groups of 10 or 100 or 500 or something like that.

And given that each individual book version — the MOBI, the EPUB, the PDF, and the print book, have to have their own ISBNs, I’m the proud owner of 100 ISBNs. And just getting the ISBN in there, getting the cover worked up — the back cover, the side panel, and all that was pretty easy, mainly because my wife and daughter are very good at it, and they help me with that kind of thing. But even the CreateSpace part was pretty easy, and particularly since you guys provided that printer-friendly version, which is very helpful.

Len: Yeah, we have a print-ready PDF output option that we developed over time, in connection with the authors who are using it, because they wanted something where they could just click a button, and then that’s what I upload to Lulu or CreateSpace or whatever. That was our goal.

Nick: One of the things that the print-ready version does, is it provides differing margins on even and odd pages. And it ensures that chapters start on the right, and all that kind of stuff. And it’s very nice. Very well done.

Len: I’m curious if you’re the type of author for whom contact with readers is important? Did you encourage people to contact you if they found typos or had suggestions?

Nick: I did. I put my email address in the book, I believe. I hope I did. If I didn’t, it’s nickhodges@gmail.com.

Len: Have your received a lot of emails over the last couple of years?

Nick: I have. Between the email and the Google+ group that I’ve formed for my books, I’ve gotten quite a bit of feedback from my customers. And they’ve been pretty happy with the book. [I’ve gotten] a lot of positive feedback from it. And not too many typos over the course of the books, but -

Len: And how did the Google+ group work out?

Nick: That was really nice. I still get people joining up almost every day. I’ve got over 1,000 people there. And I just keep them updated on the news. People ask questions, anything that’s going on. Every time I publish. Every time I’ve published a new book, I’d put it in there, and that’s helped. It’s just a nice little community of people.

The Delphi community is a vibrant development community. It isn’t as big as it used to be, but it’s certainly still very vibrant and vocal — and maybe virulent at times too…

Len: My last question is, if there were one thing we could build for you, or one thing we could improve — is there anything you can think of along those lines?

Nick: I would like a WYSIWYG Markdown editor — as contradictory as that seems. Markdown is supposed to be human-readable. But it would be kind of cool to have a WYSIWYG Markdown editor, or Markua for you guys. But that’s not a small undertaking, I’m guessing?

Len: We do definitely want to have a WYSIWYG editor. It’s interesting that, for people who are accustomed to markup, writing in Markdown, or Leanpub-Flavored Markdown, or in the future, in Markua — it just comes totally naturally to them, and using Leanpub is the easiest, greatest thing.

Nick: Indeed it is.

Len: Well it’s easy and good. But, for non-technical people, even hearing words like “Markdown” or “markup” or anything like that is really daunting. It just immediately — the way a lot of non-technical people relate to technical things like that — it invokes a negative feeling about what you would have to face in order to learn it, and then do it. And we really want to be welcoming to everyone. And so having a WYSIWYG editor is something that we definitely want to provide for people, so that Leanpub can be a place for everyone, not just really smart programmers.

Nick: I understand. You want to expand your market, that’s good.

Len: I wanted to say, thanks very much Nick, for being on the Leanpub podcast. I really enjoyed this.

Nick: You’re very welcome.

Len: And thanks for being a Leanpub author.

Nick: You’re very welcome. I’m pleased to be so.

Len: Thanks.




Leanpub is the best way in the world to write, publish, and sell ebooks. Publish in-progress, serial and complete ebooks in PDF, EPUB and MOBI.