
Presenting “the promise and peril of Agile and Lean practices” at WordCamp Nashville 2016
I’ve spoken at WordCamp Nashville every year since it started in 2012, and it was an honor to be invited back again this year. In preparing my talk, I wanted to share my experiences, both good and bad, in bringing Lean and Agile practices to different organizations over the years. Adopting these practices can lead to enormous benefits in quality, customer satisfaction, and developer happiness. But they can also involve very painful transitions, they can go very wrong if not done carefully, and some practices don’t translate well to the world of consulting and freelance work. The challenge was to present all these considerations, in 40 minutes, which doesn’t really allow time to explain a whole lot about actual Agile and Lean practices! My goal was to explain just enough about Agile and Lean – what they have in common and how they are different – and give some real life examples of what to expect if you try them in various kinds of work environments. The audience had great questions for me and I got really good feedback after the talk, so it went well. Here are my slides (they’re also embedded below).
As always, the after-party was great. It was at The Family Wash this year, and I saw a lot of familiar faces. Nashville is starting to feel like a 2nd home.
Something to think about @mtoppa #wcnash pic.twitter.com/fs0fFyFZg0
— WordCamp Nashville (@WordCampNash) September 17, 2016
What makes a job enjoyable? Getting rewards for efforts, which doesn't mean just getting paid it means getting respect @mtoppa #wcnash
— WordCamp Nashville (@WordCampNash) September 17, 2016
"The beginning of a project is a dangerous time to make promises." –@mtoppa #wcnash #coneofuncertainty
— Christina Blust (@christinablust) September 17, 2016
Multiple projects and multitasking can end up making you spend 20% longer on the different projects you are working on @mtoppa #wcnash
— WordCamp Nashville (@WordCampNash) September 17, 2016
Key to success in both lean and agile practices: inspect and adapt! @mtoppa #wcnash
— WordCamp Nashville (@WordCampNash) September 17, 2016
Getting set up for the promise and peril of Agile and Lean practices session @mtoppa #wcnash pic.twitter.com/370jtISio3
— WordCamp Nashville (@WordCampNash) September 17, 2016
I'm up next at #wcnash! Come learn how to decide if Agile and Lean practices can help your WordPress business pic.twitter.com/roQUZLPpK3
— Michael Toppa (@mtoppa) September 17, 2016
Can't miss this one. If you are at #wcnash this is a talk you'll want to attend. https://t.co/9NeIZUeAQC
— UpThemes (@upthemes) September 17, 2016
Here are my slides:
There were a bunch of excellent talks this year. I especially enjoyed these two:
Great #wcnash keynote by @Zengy with tips on being a successful WP entrepreneur pic.twitter.com/G88EDvKj9b
— Michael Toppa (@mtoppa) September 17, 2016
Great idea from @Zengy: at a group dinner, everyone gives up their phones. First to reach for theirs pays the bill. pic.twitter.com/dwNUhobT7p
— Michael Toppa (@mtoppa) September 17, 2016
Great tips on WordPress freelancing from @nathaningram at #wcnash pic.twitter.com/3iMUlaIrKo
— Michael Toppa (@mtoppa) September 17, 2016
I also had time to do some exploring around Nashville. Since it wasn’t my first time there, I skipped most of the touristy stuff. I spent most of my time in the Germantown neighborhood, where the WordCamp was held this year. Here are some pictures:

Mike Toppa speaking at Boston PHP
Yesterday at the Boston PHP meetup I gave a talk on Dependency Injection for PHP. It went really well and I got a bunch of great questions at the end.
Our speaker Mike Toppa will first review some key concepts for object oriented programming in PHP. He’ll then discuss the benefits of writing small classes, how to do class auto-loading, and explain how to get your objects working together through the use of an injection container. He’ll also cover more advanced techniques for managing multiple object dependencies, dynamic dependencies, and dependencies within dependencies.
For a preview of the talk, here’s a short interview I did with Matt Murphy, who is one of the Boston PHP organizers, and my slides are below the video.
Last week Thomas Fuchs wrote an excellent post on how to write a great error message. He shows plenty of examples of all-to-common terrible error messages, and has solid advice on how to do it better.
For me this sparked the question, why has the software industry been so bad at this, and for so long? When I was in grad school, I made money on the side teaching people (mostly middle-aged) how to use their home computers. When I went to visit one of my clients, she was visibly shaken as I walked in the door. She told me she just got a message saying she had performed an “illegal operation.” She was genuinely concerned that it might have been automatically reported to the police. I had to explain to her that “illegal” had a different meaning to programmers, and it had nothing to do with criminality.

As someone who’s been responsible for my own share of unhandled errors and poor error messages over the years, I’ll share my thoughts on why this happens, and what to do about it:
Many years ago I had a formative experience as a junior developer: I was invited to a professional user testing lab, complete with one-way glass for watching participants. After months of working on the application being tested, and clicking through the same screen hundreds of times myself without incident, I was astonished to see a user completely crash our application in less than 60 seconds.
Also, we developers often make all kinds of implicit assumptions about the environment of the application: database connections, API dependencies, browser versions, etc. We often don’t provide good error handling for when dependencies in the environment fail or don’t behave as we expect.

Error handling is an especially important issue for a consulting company like ours. Nothing will shake a client’s confidence in your ability more than seeing the application you’re developing for them crash with a cryptic and unhelpful error message. How do we address this, and how do we do it without driving the budget for a project through the roof?
I recently moved from Philadelphia to Boston, and my house is currently overflowing with half-unpacked boxes. Despite all the craziness of moving (or perhaps because of it…), I was a speaker at WordCamp Boston this past weekend, and also gave a lightning talk at the BostonRB Ruby meetup last week.
If you’ve followed our blog so far, you may have noticed we talk about both WordPress and Ruby on Rails. While it’s unusual to see a consultancy that develops in these two very different platforms, supporting both gives us the flexibility to choose the platform that best suits our clients’ needs. For applications that primarily need CMS (content management system) functionality, WordPress is a natural fit, while Rails is best suited for highly customized application development. Well known sites with a focus on content, such as The New York Times, CNN, Mashable and many others use WordPress. Twitter was originally developed on Rails, and sites such as Groupon, Bloomberg, Airbnb, and many others also use Rails.
Many consultancies will shoehorn the development of your web application into the one platform they happen to know, even if it’s not a good fit for your needs (this may not be a conscious decision on their part – if they only know one platform well, they may not have the perspective to know whether another platform might be a better choice). For example, WordPress’ Custom Post Types are great for situations where your data can be well represented in the relational database table structure on which WordPress is built, and using them can speed along the development process. But if they aren’t a good fit, then you will likely encounter poor performance when your traffic increases, or have to do custom database development work, which is a breeze in Rails but is awkward and inefficient to do in WordPress.
We also do extensive work in javascript. The ROI calculators we’ve created for Hobson & Co are written entirely in object-oriented javascript, using jQuery and HighCharts (javascript frameworks such as AngularJS or ember.js would have been overkill for this kind of project). Our latest calculator for Greenway Health is a good example.
Regardless of the platform, we take an Agile approach to our work. On the technical side, this means a relentless focus on quality, using object oriented design and test driven development (TDD). My lightning talk at the BostonRB meetup focused on an aspect of this: following the Law of Demeter in Rails application development. Check out my slides.
My WordCamp Boston talk was about the business side of the Agile development process, with a focus on how to build professional, long term partnerships with your clients. I’ve given this talk a few times now, and it’s been a lot of fun to have the opportunity to refine it and keep improving it (I also gave it at the Philadelphia Emerging Technologies for the Enterprise conference and WordCamp Nashville). The video is above, and you can check out my slides.
Here are some tweets from people at each of my talks:
@mtoppa @bostonrb Great talk! I've made egregious violations of the Law of Demeter before that I'm now eager to try and fix (sans #try 🙂
— Rahul Horé (@TheAllBox) July 15, 2015
@mtoppa on Law of Demeter pic.twitter.com/lyS7RrgWEK
— Boston Ruby Group (@bostonrb) July 14, 2015
Eager to explore the Agile Contracts Primer and revolutionize the way we run our projects. Thanks, @mtoppa! @WordCampBoston…
— WP SuperService (@WPSuperService) July 18, 2015
Good talk by @mtoppa making the argument for agile development with time & materials contracts @wordcampboston #wcbos
— Andy Gagnon (@andygagnon) July 18, 2015
Great takeaway from @mtoppa's session on Agile contracts at @WordCampBoston #wcbos pic.twitter.com/UG3VywnnP7
— Amanda Giles (@AmandaGilesNH) July 18, 2015
agree: Having to give an estimate when you know least about the client places all the risk on you – by @mtoppa #wpbos pic.twitter.com/OtQCvJ9jOu
— Daria Mark (@dariamark) July 18, 2015
Agile consulting @mtoppa agile focuses on agreement about collaboration rather than deliverables and deadlines constant feedback = less risk
— Pat Carroll (@PatC508) July 18, 2015
Loving the agile contracting idea presented by @mtoppa at#wcbos. Turns out I've been doing this all along without knowing it's a framework.
— Daria Mark (@dariamark) July 18, 2015
Armchair WordCampers: Plethora of WP knowledge in @wordcampboston w/ @bobbiec @williampd @mtoppa @scottwyden @professor @michaeldcain #wcbos
— David Bisset (@dimensionmedia) July 18, 2015
Cybersource is a subsidiary of Visa, and is one of the largest providers of online credit card payment services. As any developer who has worked with Cybersource’s Silent Order POST service can tell you, it’s not the easiest service to work with. It provides a great deal of flexibility, but that comes at the cost of you having to write a good deal of your own code in order to use it. Setting up automated testing is also extremely difficult.
Last year I completed a Cybersource project for the University of Pennsylvania, and that project provided the inspiration for 2 Ruby gems, to simplify working with Cybersource: Cybersourcery, and Cybersourcery Testing. There’s also a demo project, so you can see an example of how to use them in a Rails project.
The readme files provide detailed documentation of their features and how to use them. So rather than repeat that information here, let’s take a look at why these gems are necessary in the first place. There’s a lot to cover, so I’ll discuss the testing gem in this post, and Cybersourcery in the next one.
Writing tests that can be repeated and automated provides benefits such as improving the design of your code (if you’re doing test-driven development) and catching regressions early (when changes to your code inadvertently introduce bugs). This can be challenging with 3rd party services, as we don’t want to call those services every time we run our test suite. VCR is a gem that helps with this problem: by recording requests and responses, it allows you to play back those responses in your tests, rather than making real-life calls in every test run.
Unfortunately, Cybersource makes this kind of testing especially difficult. There are 3 different servers involved in processing a transaction through Cybersource, and the key difficulty is that one of them is at a fixed URL that is not easy to swap out in the test environment. Cybersource calls this URL the “Customer Response Page.” It is saved on the Cybersource server as part of the merchant profile, so it cannot be updated dynamically. If you are a developer attempting to test Cybersource transactions, this diagram illustrates the scenario:
+ + +
| Developer's | Cybersource | "Customer Response"
User's browser | test server | test server | server
+------------------+--------------------+-------------------+---------------------+
Request credit
card form
+
|
+-----------> Respond with
credit card form
+
|
Submit form <-------------+
+
|
+------------------------------> Process and log
transaction;
generate "Customer
Response" form
+
|
Hidden "Customer <------------------------------+
Response" form is
automatically
submitted by JS
+
|
+---------------------------------------------------> Process submission;
generate response page
+
|
Display <-------------------------------------------------------+
response page
So, what the heck is going on here? The first few steps makes sense, but then when you submit the credit card payment form to Cybersource, things start to seem strange. What happens is that Cybersource sends a seemingly blank page to your browser. But it only appears for a second, as it contains a hidden form, which is immediately and automatically submitted to the “Customer Response Page.” This is the page where users are sent when transactions are complete. You provide the URL for this page when setting up your merchant profile in the Cybersource Business Center. This is a page you create and host yourself – you can use it to show users a “thank you” message, log information about the transaction, etc.
So why doesn’t Cybersource simply redirect to your response page after processing the transaction? Why this peculiar reliance on a hidden form? The reason is that conventional redirects use the GET method, which is meant for idempotent requests. An idempotent request is one that can be safely repeated, which definitely does not apply to a credit card transaction, or logging it. So Cybersource’s forms appropriately use the POST method, which is meant for non-idempotent requests. This is why, if you submit a POST form, and then click “back” in your browser, and try to submit the form again, your browser will warn you, and ask if you really want to submit the form again.
In the case of Cybersource, this is a thorny problem. Trying to do a POST redirect has issues, for these reasons. A redirect isn’t really appropriate anyway: the Cybersource server does some work when it receives the user’s credit card submission (charging the user’s card), and then your response page may also do some work when it receives the hidden form submission (such as logging details of the transaction). These are distinct activities, so – while having two forms may seem odd – it’s a viable solution. Cybersource came up with this before asynchronous requests were a common practice (which is a big part of the reason it’s harder to work with than newer services like Stripe).
The Cybersourcery Testing gem makes it possible to set up automated, repeatable tests in this complex environment. It provides a “translating proxy” server, running on Sinatra, which has middleware to manage the requests and responses between the 3 servers involved in Cybersource transactions. Middleware is especially useful in this situation, as it allows us to modify requests and responses before they reach the application’s code.
In order to explain how the gem works, let’s first take a look at its dependencies:
target_host URL, which indicates where the proxy server should redirect requests. We also need to provide it with a request_mapping, which indicates what strings to find in the requests and responses, and what to change them to. It uses a hash format, so that on requests, the keys are translated to the values, and on responses, the values are translated to the keys.The Cybersourcery Testing gem inherits from the Rack::Translating Proxy gem, and implements the methods described above. Specifically:
For the target_host, we provide the URL of the Cybersource testing site. So if the proxy server is running at http://localhost:5556, and the target_host is https://testsecureacceptance.cybersource.com, requests to http://localhost:5556/some/path will be redirected to https://testsecureacceptance.cybersource.com/some/path. The gem also hooks into VCR, allowing us to record transactions that pass through the proxy server, for use in subsequent automated tests.
This is a simplified version of the request_mapping implementation, using hard-coded values for clarity:
def request_mapping
{
# local test server Cybersource's "Customer Response Page" URL
'http://localhost:1234/confirm' => 'http://your-site.com/confirm'
}
end
A Cybersource transaction in this environment looks like this:
target_host, the proxy server passes the request through to the actual Cybersource test server. If the transaction was previously recorded with VCR, VCR will instead play back the recording of the transaction.request_mapping will rewrite the URL of the form’s action, causing the form to instead submit to the local test server.The upshot is, the gem handles all this complexity so you don’t have to. By following the setup steps in the readme, you can get a robust test environment setup for Cybersource without breaking a sweat. The Cybersourcery Testing gem offers other features as well, such as reporting of undocumented Cybersource errors. Check out the README to learn more!
I posted a message in the WordPress.org support forums a couple months ago saying that I was temporarily discontinuing support for my Shashin plugin. I was single-parenting for over a month, and getting ready to move to Japan.
Unfortunately, I now need to say that I’m discontinuing development and support of my plugins for the foreseeable future. I’m living in Japan until the end of the year, working full time, studying Japanese, and enjoying the unique experience of being here with my family.
My work over the last couple years has involved an increasing amount of time with Ruby on Rails, and currently involves little WordPress work. Also, I never developed a business model for my plugins, which means I’ve spent many hundreds of hours over the years developing and supporting them for free. That’s not something I can continue doing.
I’ll keep the current versions available at wordpress.org and they are also available on github, if anyone wants to fork them and continue their development.
The WordPress community has been a fantastic place for me. Because of WordPress I’ve improved my technical skills, made friends, advanced my career, and had the privilege of giving 7 WordCamp presentations over the last few years. So this was not an easy decision. I hope that in the future I’ll have opportunities to contribute to the WordPress community again.
I’m excited to officially start my new job at PromptWorks next week. The slogan on their website says it all: “we are craftsmen.” If you’ve seen my Clean Code talk, you know what software craftsmanship means to me. An important aspect of it is to keep improving your skills. I’ve been working at PromptWorks on a contract basis for the past several weeks, and I can tell already that I will learn a lot from my new co-workers. They place a strong emphasis on Agile practices, quality, and working at a sustainable pace. I’ve seen enough so far to know that this isn’t just talk, and that their focus is on building long-term relationships with their clients and their staff. They’re also very involved in the local tech community. Among other things, one of them oversees the philly.rb Ruby meetup group.
They’re also supportive of me working remotely while my family and I are in Japan from July – December this year, which is very generous of them (especially for a new hire).
I interviewed with several different companies recently, and for me, the most dreadful part of interviewing is being asked to do live coding. This is sometimes done in the form of a pop-quiz, where I’m presented with some out of the ordinary coding problem, and I’m expected to write code on a whiteboard, or hack together a quick script to solve it. Other times it’s a surprise mini-project I’m expected to do on the spot. Even though I’ve been coding for close to 20 years, and I’ve had plenty of experience doing quality work faster than expected, I’m terrible at these coding exercises.
The issue for me is that they are nothing like doing real work. The only times in my life I’ve had to think up code on the spot for a surprise problem and write it on a whiteboard is in interviews. And in a real job I don’t think I’ve ever had a project dropped on me out of the blue and been asked to code up a solution in an hour or two, with severe consequences if I make a mistake or try to talk to anyone about it.
My thinking process is largely driven by understanding context (the context of the code, and the context of the business problem), and these coding exercises are usually devoid of context. I’ve also trained myself over the years to not just hack things together. I was told in one interview that, sorry, you won’t have time to write tests. Telling me to take my best practices and throw them out the window in an interview strikes me as completely backwards.
How to best interview programmers is a hotly debated topic. Some very respected people, like Joel Spolsky, swear by the whiteboard-coding approach. Others say you’re doing it wrong:
A candidate would come in, usually all dressed up in their best suit and tie, we’d sit down and have a talk. That talk was essentially like an oral exam in college. I would ask them to code algorithms for all the usual cute little CS problems and I’d get answers with wildly varying qualities. Some were shooting their pre-canned answers at me with unreasonable speed. They were prepared for exactly this kind of interview. Others would break under the “pressure”, barely able to continue the interview…
But how did the candidates we selected measure up? The truth is, we got very mixed results. Many of them were average, very few were excellent, and some were absolutely awful fits for their positions. So at best, the interview had no actual effect on the quality of people we were selecting, and I’m afraid that at worst, we may have skewed the scale in favor of the bad ones…
So what should a developer job interview look like then? Simple: eliminate the exam part of the interview altogether. Instead, ask a few open-ended questions that invite your candidates to elaborate about their programming work.
– What’s the last project you worked on at your former employer?
– Tell me about some of your favorite projects.
– What projects are you working on in your spare time?
– What online hacker communities do you participate in?
– Tell me about some (programming/technical) issues that you feel passionately about.
When I became Director of the web team at the Penn School of Medicine, I led an overhaul of how we conducted our interviews, and we adopted questions similar to these. We focused on behavior-description questions, which are actually much more revealing than you might think, if you haven’t tried them before. We also asked for interviewees to bring in a sample of their code, and we’d have them talk us through it in the interview, and answer any questions we had about it. This was an excellent and reliable way to get an understanding of their experience level and getting past shyness and nervousness. For anyone who’s done half-way decent work, they always become animated when showing off work they’re proud of.
For my interview with PromptWorks, they gave me a small project to do on my own time, to turn in a few days later, which is also a good approach. Apart from that, they also had me do a pair programming exercise, which I was worried about at first, but the focus was on getting an understanding of my thought process and overall problem-solving approach, as opposed to how fast I could tear through it, or trying to hit me with “gotcha” questions.
And they hired me, so I must have gotten something right 😉

Giving my talk at WordCamp Lancaster
I’ve lived in the Philly area more than 10 years, and yesterday was my first time visiting Lancaster, because I finally had a good reason to go! I gave a presentation at WordCamp Lancaster. It was the first WordCamp in Lancaster, and had a single track, with web accessibility as the theme:
The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.
— Tim Berners-Lee, W3C Director and inventor of the World Wide Web
There were a bunch of great talks. I especially enjoyed Aaron Jorbin’s and David Kennedy’s:
Wow, really impressive set of 5 lightning talks in a row by @aaronjorbin, with topics selected by the audience #WCLanc
— Michael Toppa (@mtoppa) March 1, 2014
Great web accessibility talk by @DavidAKennedy at #WCLanc. I’m glad he spoke before me – my talk will make a good sequel to his
— Michael Toppa (@mtoppa) March 1, 2014
My talk focused on the language aspects of accessibility, which entailed a discussion of internationalization, localization, and character sets. The title alone was a mouthful: “A11Y? I18N? L10N? UTF8? WTF? Understanding the connections between accessibility, internationalization, localization, and character sets” (slides are below). I managed to make people laugh while discussing character encoding, so I must have done something right.
I learned something about language attributes today at #WPLanc! Very cool. Thanks, @mtoppa!
— Bryan Daniel Peach (@bryanpeach) March 1, 2014
Hey, there's @mtoppa with a mic on his shirt and a podium in front of him. #WPLanc
— Liam Dempsey (@liamdempsey) March 1, 2014
Accessibility on the web with @mtoppa here at #WCLanc pic.twitter.com/jUNrhTtnUf
— Azrael Group (@AzraelGroup) March 1, 2014
I also enjoyed having the opportunity to meet and talk with George Stephanis
(@daljo628S), who organized the WordCamp, Scott González (@scott_gonzalez) the jQuery UI project lead, and catch up with Jason Coleman (@jason_coleman), Liam Dempsey (@liamdempsey), and Eric (@ericandrewlewis).
WordCamp Lancaster also had one of the nicest designs for a WordCamp t-shirt that I’ve seen.
Here are my slides (if you view them on slidehsare.net you can see my notes as well), and hopefully the video will be up on WordPress.tv soon.
I haven’t been blogging for ages – it’s time to fix that. Let’s start with a recap of last night.
The monthly philly.rb meetup at the Comcast Center: how good were the presentations? They were just as good as the view from our room on the 45th floor:

View from the 45th floor of the Comcast Center, where we had the philly.rb monthly meetup
I got a lot out of Nate Olds’ talk, “Refactoring with a View.” A large part of my career has been spent wrestling with big, old, sprawling, messy codebases, so Nate’s real-life walk-through of his strategies for dealing with such challenges was very informative. Check out the February meetup page for more information.
Afterwards, a group of us went to Ladder 15 for beer, where we met up with Maria. She stoically suffered through several minutes of extremely nerdy conversion, before she and I headed to the Boot & Saddle, for a rare evening out without the boys, to see one of Maria’s favorite bands, Cibo Matto. It was a sold out show, and we ended up stuck near the back, but it was still a good time. I tried to take a couple videos, but they didn’t come out. A good introduction to their utterly goofy side is the song Sci Fi Wasabi (I’m Miho Hatori, straight out of purgatory), and their split-screen video for Sugar Water, with one side portraying the visual story in reverse, is quite clever (the ending is in the middle).
I’m presenting at the WordPress ‘Burbs meetup next Monday on Kanban. And on March 1 I’m presenting at WordCamp Lancaster: A11Y? I18N? L10N? UTF8? WTF? Understanding the connections between accessibility, internationalization, localization, and character sets.
These are my notes from today’s Data IO conference
Lucene 4
Solr (Lucene server – managed by the same team as Lucene)
Uses
Old way of system management: active and backup servers, frantically switch to backup when active fails
Common challenges with big distributed system
A common deficiency: sequential consistency (handling everything in the “right” order, when data is coming from multiple places)
Zookeeper open-source equivalent of Chubby
Beware – Zookeeper can be your single point of failure if you don’t have appropriate monitoring and fallbacks in place
I didn’t take notes during those one (a drop of water from the bottom of my glass got under my Mac trackpad, and my mouse was going crazy for a while)
Example IBM sales force optimization
Siemens – compter aided detection of breast cancer
Display ad auctions – how do we decide who to target?
Advertising fraud
Uses
[I’m leaving it most of the details about performance improvements and the roadmap for upcoming refinements – below are other interesting points]