Spotlight: Andrew Atkinson (Author) Interview and AMA!

A Passion for PostgreSQL Chat
with Andrew Atkinson
@andatki

Andrew-Atkinson

From his early days grappling with Java’s enterprise solutions to his pivotal switch to Ruby on Rails, Andrew has embraced the challenges and opportunities of developing modern web applications. His passion for the Ruby language and PostgreSQL showcases his technical acumen and highlights his commitment to pushing the boundaries of what’s possible in software engineering.

We sat down with Andrew to explore his journey through the realms of programming languages, his insights into the capabilities of PostgreSQL, and his dedication to educating others in the tech community.

WIN!

We’re giving away one of Andrew’s books to one lucky winner! Simply post a comment or a question in his ask me anything (AMA) below, and the Devtalk bot will randomly pick a winner at a time of the author’s choosing . . . then automatically update this thread with the results!


INTERVIEW (abridged)

Introducing Andrew

Andrew has been working with web applications for fifteen or so years. Right now, he’s a staff engineer. “I work a lot with databases, and that includes provisioning new ones and maintaining databases. I also work on the application layer, building features or supporting features, or some of the kind of plumbing things that are needed to maintain long-lived and large monolithic code bases.”

He works primarily with Ruby, Ruby on Rails, and Postgres. He also works with shell scripts and writes SQL as needed for database maintenance and modifications. His role is always changing, though. “Increasingly, I’m working more on the infrastructure-as-code side of things.”

On Becoming a Ruby Programmer . . .

Andrew’s programming path has a familiar theme—he did not start out writing Ruby. “Coming out of college, my first real software engineering job was at a company that was somewhat old and mature at that point. They were very successful in the mechanical engineering space, both with CAD design software and then additional software that they provided that would allow large engineering organizations (companies that build commercial airlines and major automotive manufacturers) to manage all their product life cycles. So they had this enormous Java code base and the technology of the day was a lot of Java enterprise technology, JSPs, a lot of XML. And that was how I really started programming.”

Andrew’s introduction to Ruby was via Rails. He started hearing a buzz about Ruby on Rails in the tech community in the early stages—around v1.2. He started learning Ruby on Rails and the Ruby programming language at the same time and liked what he found. "With the kinds of abstractions that Rails provided, just being able to work with a relational database and get a basic user interface in place allowed developers to build full-stack web applications—and it felt like a huge revelation to me at the time. "

Andrew hasn’t looked back since those early days of working with Ruby and Rails. “I’ve never actually found another programming language that I enjoy more than working with Ruby. It’s expressive in the way that makes the most sense to me, that’s most similar to English. It feels like I have a superpower sometimes where I can go into a Ruby-based code base and I can start to understand it quickly.”

On Deciding to Write High-Performance PostgreSQL for Rails . . .

Andrew’s motivation to write High-Performance PostgreSQL for Rails was two-fold. He wanted to highlight some powerful, yet little-known capabilities of Postgres, and show readers how to use it with a web application to solve real business problems. “In writing the book, I needed to, of course, cover a lot of the nuts and bolts and the things that are going to be really common, but there’s also a lot of energy put into less common usages of Postgres, particularly in the latter part of the book.”

Encouraging people to practice and get hands-on experience was also a focus. “My goal with the book is to expose readers to some of these capabilities and really allow them to get some reps in and get experience using them. Even if you don’t buy the book, you can find the open source Ruby on Rails project, play around with it, and the idea is, Postgres on its own, it’s a database server that’s running and it’s not the whole story. The whole story really is using it with a web application where you’re going to build a product that’s going to support a business. So a lot of the business value is going to be in the problems that you’re solving."

On the Value of Ruby on Rails and Postgres . . .

Andy sees Ruby on Rails and Ruby as a strong backbone for crafting robust web applications, but emphasizes the importance of data—the data itself as well as how you handle and store it. “Whether it’s software as a service, or e-commerce, or social media, you’re gonna need a way to store data. Data is going to become your company’s valuable asset. It’s going to be something that you can’t re-create. Your customers are going to create that data and it’s going to drive their value; the value is going to be driven from them based on their usage. If you have a platform you’re providing that’s very valuable to them, they’re going to use it a lot. And so you’re going to need a place to store your data, and that’s where Postgres comes in.”

On Why Postgres . . .

PostgreSQL is a good choice for new projects—its permissive licensing avoids restrictive fees and allows for greater business flexibility.

“Postgres is not owned by any individual company or even a collection of companies. I think it’s considered to have one of the most permissive licenses, and that’s going to allow a company to avoid having licensing fees that are really just restrictions on how they use it to build their business. So that’s a really important real-world practical reason."

Blend that flexibility with a quarter-century of development and a consistent annual release cycle, and then stir in a vibrant open source community that continuously extends its functionality, and you have a nearly-perfect relational database system.

“From a technology perspective, I think Postgres is considered one of the most reliable and stable databases, and it’s got 25 years of history, at least of development, to back that up. And looking across releases, Postgres does annual releases. That’s also a great release cadence—each year there’s a new version, at least for the last five major versions. So currently it’s on version 15, and version 16 is publicized to come out this fall. Actually, the third beta is available right now, if folks want to try it out. So it’s got a very visible release schedule."

“And of course, it’s open source, so anyone can track what’s happening in there. There’s also a rich open source community of folks extending Postgres with more and more functionality. That opens up the door to all of this innovation around different use cases and different integrations.”

On Maintenance . . .

Building something new is fun and exciting, but then comes the maintenance—it requires work and continuous assessment and adjustment. When it comes to keeping your database running smoothly, Andrew has these thoughts. "Like anything in life, everything has a point of failure. As my family uses things around our house, things start breaking. Things are breaking all the time, like bathroom faucets and scratching the floors, so things require maintenance to work at their best. A portion of the book is going to be, ‘Okay, how do you maintain your Postgres database?’ You’re not a database administrator; possibly, you’re an engineer on a team. What are some of the symptoms you might see from a database that requires some maintenance? And then how do you go and perform the tasks needed to make it run optimally? And that’s gonna be all kinds of things, like your tables and your indexes.

“And then, once you’ve tackled that and you have an idea of how to make your database run optimally, what if you’re still starting to see a really high amount of usage on your database server and you’re wondering, ‘What do we do about this? How do we keep things running optimally?’ It’s not really a maintenance problem. Well, you might want to look at your queries. Maybe you can write your queries more optimally. And so that’s going to be this kind of back and forth."

On How the Book Came to Be . . .

Some authors start out with an idea and then shop it around to publishers. Not so in Andrew’s case—he was approached by a publisher. But the publisher that approached him is not the one he ended up with—here’s why in his own words.

“An acquisitions editor from another publisher, not The Pragmatic Programmers, reached out to me on LinkedIn after the Postgres New York conference and said, ‘Hey, have you ever thought about writing about Postgres? It’s something that we want to publish more on. And I saw that you gave this presentation. I saw that you blog about this topic.’ And I was jumping up and down. I was excited because I was like, ‘Hey, this is cool.’ I think of blogging as mostly: I write some blog posts and no one reads them. I would sometimes share them with my colleagues, but it was never really a commercial thing. You could almost think of it as journaling, but it was a way to organize my own thoughts and engage a little more with the things I work with each day. But at that moment I realized, hey, this actually could be a thing, it could be part of my career, the idea of writing within the technology space."

“Another thing that came together for me was, as I become more senior at companies (I work as a staff software engineer now), as I’ve gained more experience, but really all of my career, I’ve always enjoyed both sharing and also education of other developers because I guess I’ve always identified with the struggle of the learner. And I’d like to think I have some ability to empathize with the learner and think about their challenges and help them unlock what they’re struggling with, whether it’s getting over a hump or building some skills or whatever it might be. So I was very flattered and I started thinking about, oh, I could write, maybe I could get into education, let’s see where this goes."

“So I went through the proposal, submitted it, and I was really excited to see that it was accepted. As a first-time author, I also did a lot of research on what are some common things first-time authors run into. What are some things to know about? And I realized this is going to be a huge amount of work. I have a full-time job. I’m a dad, I have young kids. I have a family, my spouse doesn’t want me to be completely unavailable to her, which is extremely fair and appropriate. So I needed to advocate for myself and make sure that I found the best fit possible. And I found the idea of taking the proposal and even considering other publishers. And once I read that, the first publisher I thought of was The Pragmatic Programmers because I have been a Ruby on Rails developer most of my career and I’ve purchased four or five PragProg books over the years and certainly know that they are, you know, one of the best publishers in the Ruby and Ruby on Rails community and really well known.”

On the Ideal Reader . . .

The ideal reader for High Performance PostgreSQL for Rails is a senior Ruby on Rails developer familiar with PostgreSQL but not deeply versed in advanced database operations like writing optimized SQL queries or managing high-load environments.

Andrew says he envisions a developer who "uses Postgres, but doesn’t really use it much beyond Active Record. They might be currently facing, or plan to face, a more demanding technical workload, more usage of their application, and they’re wondering, ‘What are we going to do? How are we going to scale up? I might know a lot of things about how to optimize my source code, but I don’t really know much about how to write optimized SQL queries, how to use the query planner, how to create efficient indexes. What does it mean to scale beyond one instance? How do I do that with Active Record? How do I manage a high-growth table? How do I do database maintenance?’”

Andrew sets the stage about what he assumes you already know but also helps you set up your environment and get ready to start coding. “So in the beginning of the book I try to call out exactly what the assumptions are about what the learner knows already. And then there is a lot of setting up your development environment, setting up Postgres, setting up this Rails application. So it could be useful to newer folks to Ruby on Rails, but it’s not really an introduction book to Postgres or to Ruby on Rails."


Now that you know Andrew’s story, add High Performance PostgreSQL for Rails to your library today! Don’t forget to use coupon code devtalk.com to save 35 percent on Andrew’s ebook:

High Performance PostgreSQL for Rails

book-high-performance-postgresql-for-rails


Follow Andrew Atkinson:

Website, andyatkinson.com

X, @andatki

Mastodon, @andatki

Linkedin, andyatkinson

Slack, postgres channel


YOUR TURN!

We’re now opening up the thread for your questions! Ask Andrew anything! Please keep it clean and don’t forget: by participating you automatically enter the competition to win one of Andrew’s ebooks!

2 Likes