Chris Tankersley

Chris Tankersley is a husband, father, author, speaker, podcast host, and PHP developer. He works for InQuest, a network security company out of Washington, DC, but lives in Northwest Ohio. Chris has worked with many different frameworks and languages throughout his twelve years of programming but spends most of his day working in PHP and Python. He is the author of Docker for Developers and works with companies and developers for integrating containers into their workflows.

twitter: @dragonmantank


Education Station: Autoloading Your Code

By Chris Tankersley

Broadly speaking, autoloading is a mechanism for the loading code into your program on demand. If you look at a single request in your application, chances are it needs a different set of classes than another request. Where a “Login” action may use a controller, database class, and an authentication layer, a “Logout” action may need nothing more than the controller itself.

Published in Under the Scope, September 2020

Education Station: Effective Data Typing

By Chris Tankersley

In our documentation at work, there are a few places where we list things as strings but look suspiciously like Boolean values. This realization sparked a discussion at work around data types, but not the one most developers tend to have. This discussion was not about strict versus dynamic typing, but more about what kind of data should something be.

Published in Data Discipline, August 2020

Education Station: Writing Concise Code

By Chris Tankersley

There is a huge emphasis put on the code maintainability, and for a good reason. The programming industry is rife with what we like to term “legacy code,” which boils down to code that solves a business problem, but we, as the current maintainers, do not understand. No language is safe from this problem.

Published in Warp Driven Development, July 2020 —Available for Free

Education Station: Calling all Callables

By Chris Tankersley

When facing a challenging problem, you want a flexible codebase that adapts quickly. Object-oriented programming facilitates it by giving you the power through inheritance, encapsulating code in reusable objects, and generally making them work for your application as you see fit. However, we can find flexibility in other programming approaches.

Published in Advanced Design & Development, June 2020 —Available for Free

Education Station: Anatomy of a Web Response

By Chris Tankersley

Last month, we looked at HTTP requests and how a user agent asks for a specific resource. How do we provide an answer? Web servers send it back in an HTTP response. Let’s look at the parts of a response, how to indicate success or failure, and how to build the response body.

Published in Unsupervised Learning, May 2020

Education Station: Anatomy of a Web Request

By Chris Tankersley

One of the things that drew me to PHP during my formative programming years was the quick turnaround time for trying something. You type something into an editor, save the file, and refresh your browser. Through the power of the web, your browser presents you with an error saying you mistyped a function name. Welcome to ninety percent of my day!

Published in Machine Learning and OpenAPI, April 2020

Education Station: Development Environments

By Chris Tankersley

One of the initial draws for PHP was and has always been, the ability to be quickly set up and have a developer get code working through a web browser. While something like client-side JavaScript can be done with nothing more than a browser, many other languages still need help to serve a webpage. That may come in the form of frameworks, like Flask in Python, but most languages need additional dependencies or scaffolding to work.

Published in How Magento is Evolving, March 2020

Education Station: Integration and Functional Testing

By Chris Tankersley

Previously, we discussed unit testing and why it can be useful. Unit testing can help make sure the public-facing APIs for your classes are easier to understand. It helps map out the dependencies of your classes, and—more importantly—it helps ensure behavior does not change from release to release. Functional, or integration, testing allows you to put multiple systems together and validate how they interact.

Published in Cultivating the Developer Experience, February 2020

Education Station: Unit Testing Basics

By Chris Tankersley

Recently, we’ve discussed principles for writing clean code in your php applications. Testing is a valuable technique to help you produce and maintain a codebase, but it can be daunting to learn. In this article, we’ll start with unit testing. Let’s look at how tests help during the design phase and in maintenance, what unit tests are, and how to use PHPUnit for your test suite.

Published in New Habits, January 2020 —Available for Free

Education Station: Dependency Injection, Part Two

By Chris Tankersley

Last month, I talked about the basic idea of what dependency injection is and its importance. Now that we’re more familiar with it, we’ll look at examples of using dependency injection for managing object coupling, moving object creation externally, and keeping your classes concise.

Published in Expedition PHP, December 2019

Education Station: Dependency Injection, Part One

By Chris Tankersley

Design patterns provide useful approaches for solving common problems in application design. Dependency injection is a powerful one, but it is also challenging to understand and apply. In this article, we’ll cover what it does and how to use it properly.

Published in Object Orientation, November 2019

Education Station: Overriding Composer

By Chris Tankersley

Composer is one of the most influential tools to have come out of the PHP ecosystem. Not only did it help revolutionize the PHP package ecosystem by making it easy to autoload code, find packages, and keep track of dependencies, it also stands as one of the best package managers from any language, hands-down. Python’s pip, NuGet for .NET, Rust’s cargo, and Go’s dep all pale in comparison to the stability and simple usage of Composer.

Published in Coding Without Fear, October 2019

Education Station: Visual Studio Code for PHP Developers

By Chris Tankersley

Developers are a fickle, passionate bunch. We love to wage arguments over which is the best editor (obviously it’s VIM), what is the best operating system to develop on (Linux), what is the best language (gola…I mean PHP) to use, and even what editor we should be using (we will discuss this in a second). Thankfully we have a plethora of options to chose from, and we can find what works the best for us. This month, let’s talk about Integrated Development Environments or IDEs.

Published in Master of Puppets, September 2019

Education Station: Writing DRY, SOLID FOSS OOP CRUD Code

By Chris Tankersley

It seems like programmers love their acronyms almost as much as the military does. When someone is just getting started in programming, they can be bombarded with an endless list of acronyms that people throw out as best practices and things to follow. Too often, this advice comes with little direction on why or what they are. Why should we follow SOLID principles if someone does not tell us what they are?

Published in Renovating Applications with Symfony, August 2019

Education Station: Abstraction—The Silent Killer

By Chris Tankersley

Object-oriented programming is full of suggestions on how to do things. One of the core tenets of object-oriented programming is abstracting “things”—or modeling them—into code via some idea of nouns and verbs.

Published in Find the Way With Elasticsearch, July 2019

Education Station: Data Structures, Part Two

By Chris Tankersley

Last month I talked about how, despite PHP arrays being one of the nicest things about the language, there were times where real data structures could help. There were various ways to use arrays as more “traditional” data structures, as well as the options provided by the Standard PHP Library, or SPL. If you can install PHP extensions, there is an actual Data Structures extension which implements actual data structures at the C level. This lets you use traditional data structures that can work better than bare arrays or the SPL. This month we will dive deeper into the Data Structure extension.

Published in How to Tame Your Data, June 2019

Education Station: Data Structures, Part One

By Chris Tankersley

I’ll admit, one of the best things I love about PHP is that I don’t have to deal with all sorts of different ways to deal with data. At the base of the language we have nice primitives like strings, integers, floats, and Booleans, and we also have one of the most flexible structures known to programmers—the PHP Array. The array itself wears many hats. If you are coming from other languages, you have to think about the structure of ordered data in a few different ways. The reason for this tends to deal mostly with how we need to represent data and how we manipulate data. Different data has different requirements.

Published in Serverless, ReactPHP, and Expanding Frontiers, May 2019

Education Station: What Went Wrong

By Chris Tankersley

The very first thing you need to do when something goes wrong is to get a good handle on the situation and find out what’s wrong. Many users first instincts are to get frustrated and say, “This is broken!” and expect you to figure it out. While there can be lots of places to look, narrowing down the possible causes can help greatly.

Published in The New Frontend Fundamentals, April 2019

Education Station: Explicit is Better Than Implicit

By Chris Tankersley

The argument over strict typing is nothing new in PHP. When the PHP 7.0 release was under development and the idea of scalar type hinting came up, there were developers on all sides with opinions on how it should work. While PHP 7.0 could introduce backward compatibility breaks, introducing strict typing had the potential to break years and years worth of code. How far the language went with this surfaced a variety of opinions. Let’s look at the benefits of using scalar type hints to clarify the intent of your code.

Published in Building Bridges, March 2019

The Dev Lead Trenches: Finding Someone New

By Chris Tankersley

There will come a time when you will need to add to your team. This can be due to a team member leaving, the workload becoming more than your team can handle, or just because you want to expand what your team does. In any of those cases, you will need to start the arduous task of finding someone new to bring to your team.

Published in Setting Up to Succeed, January 2018

Education Station: Night of the Living Dead (Code)

By Chris Tankersley

Legacy code is an unfortunate fact every developer has to face. Whether you subscribe to the idea that legacy code is just inherited code, untested code, or that it’s code which has reached a certain age, the grim reality of software development is that code lives, for a very long time. See how to tombstone your application to find dead code.

Published in Out on a Limb – February 2019, February 2019

Education Station: DevOps and You

By Chris Tankersley

The tech industry is always awash with new ideas that are actually old. One which gained traction in the last ten years is the idea of “DevOps.” This term is the combination of “Development” and “Operations” and is meant to show these two roles can be combined for more efficiency.

Published in DevOps Depths – January 2019, January 2019 —Available for Free

The Workshop: The Road to 7.3, Part One

By Chris Tankersley

Last month as I was writing “The Workshop: Producing Packages (Part Three)” I had a feeling I would regret the line “This will be the third and final installment in this series.” Sure enough, I have one more topic I want to cover: upgrading to a new PHP version.

Published in DevOps Depths – January 2019, January 2019

The Dev Lead Trenches: Creating a Culture

By Chris Tankersley

I have spent much time talking about creating and managing a working team, but there is one important piece I’ve left out of the puzzle until now—creating and crafting a culture that makes people want to work on your team and stay on your team. If you have a company culture which does not attract people, employees will be hard to find.

Published in Better Practice – December 2018, December 2018

The Dev Lead Trenches: The Talk

By Chris Tankersley

About the only thing that makes me upset as a lead developer is people that do not play ball. I am completely for questioning authority, asking questions about workflows, and having ideas on making what we do work for everyone, but it really bugs me when someone doesn’t even try to work with the team.

Published in Generics and Project Success – November 2018, November 2018

The Dev Lead Trenches: Burning Out

By Chris Tankersley

The tech industry is a double-edged sword. On the one side, we (generally) have well-paying jobs with nice perks, but on the other, we can easily slip into not only boring, repetitive work but figurative death marches. The former is used by most companies as an offset to the latter, but that rarely works out well. This leads many developers to come face-to-face with burnout. Burnout is unhealthy for any individual, but it will kill your team’s productivity, increase turnover, and make it harder to recruit as people learn about the environment at your company.

Published in Internal Journeys – October 2018, October 2018 —Available for Free

The Dev Lead Trenches: How Long Will It Take?

By Chris Tankersley

This month, let’s discuss what we can do to help come up with better estimates. I hate estimating, but it is an unfortunate part of software development. We cannot come up with schedules without estimates. My boss wants to know I’m not wasting his time when I say something will take 40 developer hours. I want to make sure my team is doing things in the best possible order and not waiting until the very end to deliver a big feature.

Published in Magniphpicent 7.3 – September 2018, September 2018

The Dev Lead Trenches: From Issues to Code

By Chris Tankersley

Everyone on your team should have a good idea of the actual problem or feature they are working on before any code is written. Once the issue itself is ready to go, the work can begin. Every company will be slightly different in how they want to handle actual commits, but this month I will detail the most common workflows I use with teams to manage changes to a codebase.

Published in Masterful Code Management – August 2018, August 2018

The Dev Lead Trenches: Issue Workflows for Teams

By Chris Tankersley

Issues and issue tracking are central to your team’s communications about what’s getting worked on and needs fixing. Having a clear and agreed upon standard for working with them will keep your team focused and productive while minimizing misunderstanding.

Published in Navigating State – July 2018, July 2018

The Dev Lead Trenches: What Not To Do

By Chris Tankersley

Over the last nine months, I have talked about all of the things you should be doing as a technical and developer lead. There are many things that you should be doing, and I hope that so far the advice has helped. These are some of the habits and problems I have seen as developers move into the more managerial role a lead developer actually is.

Published in Command and Control – June 2018, June 2018

The Dev Lead Trenches: It’s Toxic

By Chris Tankersley

The tech industry is a relatively young industry, and in many ways, it shows. In one of my favorite books, Hackers: Heroes of the Computer Revolution, Steven Levy talks about the birth of the open source industry going back to the late fifties and early sixties. Many of his descriptions of programmers then are not vastly different than programmers today. These problems are not technical and can drive good programmers away. What can we do to avoid these issues?

Published in Treasure, Old & New – May 2018, May 2018

The Dev Lead Trenches: Ongoing Education

By Chris Tankersley

As a development lead, one of the best things you can do for your team is encouraging and fostering an environment of ongoing learning. There is an entire world of developers out there who stagnate in their jobs because they don’t learn anything new. It does not have to be a whole new language, but every developer should be learning constantly. There are a few ways you can help with this.

Published in Testing in Practice – April 2018, April 2018

Reviewing Code

By Chris Tankersley

Code reviews are one of the best ways to help a team ensure they’re writing the best code possible. In all of the jobs where we have done peer-lead code reviews, we have caught more bugs and had better discussions about code than in places or times where we just hammer code through the approval process. I know, I know; we all write beautiful, bug-free code, so why go through the hassle of a code review?

Published in Long Running PHP, March 2018 —Available for Free

The Dev Lead Trenches: Coming Aboard!

By Chris Tankersley

The need to onboard new hires is one of the most significant reasons why adding workers to a project does not actually increase the project’s productivity. It takes time to get them up to speed with how the system works, what their role is, day-to-day workflows, and a host of other things. The goal of any new hire, even ones where you aren’t trying to fill in gaps during emergencies, is to get new hires as productive as possible as quickly as possible.

Published in Know Your Tools, February 2018

The Dev Lead Trenches: Measuring Success

By Chris Tankersley

There will come a time, probably once a year per team member, when you will have to assess how well a team member is working. Are they contributing overall to the team? Are they making their goals? Do they know what their goals are? Are they pulling their weight? For as long as there have been companies, there has been a need to quantify how well an individual employee is doing. “Gut feeling” is not the most accurate way to do this. There are also many ways which do not work in real-world situations.

Published in Talking Code, December 2017