When Mike McNamara joined Target six years ago as its chief information officer, the Minneapolis retailer was mostly outsourcing its technology team, which powers everything from the Target mobile app to the barcode scanners used in stores. The retailer also was still recovering from a massive data breach in 2013, in which cyberthieves gained access to payment information of 40 million customers.

McNamara, 57, plans to retire next year, saying Target's technology team of more than 4,500 employees is on stable footing. Less than 7% of work is now outsourced, compared with 70% before he took the helm. It also has built a tech platform that is adaptable and more secure, and placed a greater focus on recruiting women and people of color. After the stress test of last year, when customers flooded Target's website and mobile app during the height of the pandemic, McNamara said he feels confident Target's tech team will be able to respond to whatever the future holds.

Q: How was Target's technology department when you arrived?

A: If you believe that technology is really important, then you don't give it to someone else to do. If you think it's a strategic priority for the business, then you are going to do it yourself. That's driven a lot of what we have done over the last few years. We had to build a team internally and had to replace all of the outsource operations that we had, and then we had to really, really focus on creating just a great technology platform for Target's future.

Q: How does diversity fit into Target's tech future?

A: It's so important that if you are building software for America and for the American consumer that the team looks like America and the American consumer. That wasn't a reality when I joined, but it's more so the reality today. Target is an immensely diverse company. … But you looked into the technology team within that and it looked like technology throughout the rest of the industry which was largely very male-dominated and not a lot of underrepresented minorities. It really was just putting a focus on it and treating it like any other business outcome. … We ditched the prerequisite of having a four-year college degree and more specifically a four-year computer science college degree so now we find talent everywhere, and it's been fabulous.

Q: What are some interesting technological advancements — for example virtual fitting rooms — that you think could improve customers' in-store experience?

A: We've had virtual reality now for many years, but it still hasn't become a thing for consumers particularly when it comes to retail yet, but it will. … It's the same with RFID [radio frequency identification] tags. Target already does that of course through all of our apparel and home and it helps us manage all of our inventory and it helps us manage to make sure that stuff is on the shelves for our guests. I think we are maybe slightly ahead of the curve with that, but again I see that being far more ubiquitous within retail over the next five or 10 years.

Q: How does Target help the technology team be creative?

A: One of the things that has changed the most out of my career in tech is the balance between drudgery and creativity. When I used to program, getting a piece of software live was a horrid experience. You have to deal with a ton of infrastructure, a ton of testing. All of the work that was done in Target was to remove that drudgery and automate a lot of what used to take a lot of time. That means that software engineers can just focus on being creative. They can focus on building new features and functions for our guests and for our team members … like all of the work we did for contactless drive-up last year.

Q: Can you give an example of some of the team's creativity at work?

A: Demo Day is a great thing we do each quarter. Pre-COVID we all put down tools for the day and set up what looked like a science fair with 60 or 80 booths and 60 to 80 product teams to show off what they have done in the last quarter. It's just amazing. … They keep Target fresh and exciting and inspiring.

Q: What role do you think technology played in how Target responded to the pandemic?

A: Target had an extraordinarily strong year. … That wouldn't have happened if we hadn't made the investments in technology and if we hadn't actually made the investments in our supply chain. When COVID hit, our business went bananas. Between mid-March and early April last year, our digital business grew three years in three weeks, practically. … But we honestly just turned up the volume to 11 and we left it there all year long. … Guests needed different things during COVID and local governments needed different things during COVID, so we had to create apps to help us manage the number of people in our stores at any given time so that we could maintain social distancing. One app we built, which helped the team members do that, had a little A.I. algorithm in a camera above the entryway that counted the guests in or out.

Q: Are some of the changes we saw during the pandemic long term?

A: I think the convenience of same-day delivery, of being able to drive up into the parking lot and be able to open the trunk of your car and have your goods put in the back — I think all of those things will remain ever popular. I'm sure there will be more variations of fulfillment options. The important thing is the ability to respond to the consumer and to the business environment as it comes along.

Q: Why retire now?

A: This was always the plan that I was going to come to America — I moved here from London — I was going to come to America for a fixed period of time. I actually overstayed what I originally agreed to do because I loved it so much. And our business … it's robust and it's been doing really well and we have a great technology team. We got a great technology platform. So I can't think of a better time to hand it over to somebody else who would bring fresh ideas and fresh energy to it.