WordCamp US 2019 – Room 220 – Saturday

WordCamp US 2019 – Room 220 – Saturday


.
. SPEAKER: Okay. Is that better? That was a really, you know,
turning it on is always helpful. My name
is Tiffany. I will be the host for this
morning before lunch. And we have a few announcements to
start out with before we introduce the speakers. The first thing is if everyone
could please silence their cell phones and anything else that
might make noise during the presentations. And also, if you can move to the
center or make room for people to come in who are coming in
late, even just raise your hand if there’s an empty space. Right
now we have plenty of space. In anybody has any accessibility
needs that they need help with, approach any of us as volunteers
and we’ll be happy to help. After the session — after each
session we’ll have a Q&A. And microphones will be passed
around. So, if you can speak into the
mic, it will help for recordings. And if you could
hold the questions until the end of the session, there will be
time to answer those. Also just a reminder that there
is a contributor day on Sunday and we would love to have all of you come.
And then I think we’ll just go ahead and introduce our first
speaker. Naomi Bush. She’s presenting on working with
WordPress and external APIs. Naomi has been working with
WordPress as a professional developer since 2005 and you can
currently find her at gravity + prowhere she
specializes in using WordPress builders to
deliver customizable at a fraction of the cost. And contributes back to the Core
code, documentation, free plugins,
organizing the WordPress developer meetup, organizing
WordCamp Atlanta and speaking at WordCamps. We’re very happy to
have her here. [ Applause ] NAOMI: Good morning! Good
morning! There we go. All right. I think we need to turn this off
so that we don’t — there we go.
All right. Okay. So, I — let’s see, we still
have some feedback here. All right. Excuse me? Okay. Thank
you. All right. All right. So, I am, indeed, Naomi C. Bush
and I will be your facilitator for this morning’s story time. All
right. As I mentioned, I do work with
external APIs. basically, connecting WordPress with the
outside world. Helping businesses make sure that their
data can get to and from their systems and that they don’t have
any silos. Specifically, my company,
gravity Plus, I build external integrations
for a little form builder you may have heard of called Gravity
Forms. All right. So, since the connection is always coming from
WordPress, that’s how I like to think about it. The connection
comes from WordPress. Then the first thing that I always do is I make sure that I am making
my H — I’m sorry, making my API calls through the WordPress
WordPress HTTP API. Is there anyone here that is not familiar
with the HTTP API? Anyone? Okay. Don’t be afraid. You can
raise your hand. I really can’t see much — okay. There we go.
All right. So, basically, the WordPress
HTTP API is a way for you to make external API calls. It take
yours data, it does a little validation, some formatting, and
it will send the request. It will choose the correct
transport method based on the server that the code resides on.
So, there are multiple ways to send a request in HTTP — in — excuse
me. There are multiple ways to send a request in PHP. The
WordPress API will choose the correct method and then when it
gets the response back, it will do — it
will do some light formatting, okay? That’s basically it. It’s a wrapper around sending
API calls. So, I make sure that all of my
API calls use that API. A lot of people, when they’re working with external APIs, they will go
and just grab, you know, if the API
has a PHP library, they’ll grab that and make the calls directly
through that. But I’ll get a little bit into
why I don’t do that. All right. Okay. And also, if you are
building integrations for public consumption, that is
absolutely the best way to go. Again, because that code is
going to be resideing on many different servers that you do
not have control over, okay? All right. So, Stripe. Stripe
was my very first teacher. All right? Almost eight years ago.
That is write cut my teeth. That is where I learned a lot of my lessons and I am still learning
lessons. Through Stripe. And it’s almost like, who would
have thunk it? Stripe is so simple. If you have worked with
Stripe, you remember Stripe from the very beginning. Beautiful,
beautiful, beautiful API. All right? That’s thousand how it started
out. It was a developer’s dream. That particular API caused know
say, you know what? Life is too short to work with difficult
APIs. Okay? So, back when I was doing client
work, there was an organization that used WordPress and that’s
how they processed their membership dues every year,
okay? So, we were using PayPal at that
time. And we were looking for something a little less
error-prone. Okay? At that time. And so, I heard about this
new payment solution called Stripe. Check would it out. It was for developers. I said,
wow. This is great. We’re gonna use this. Looks great. We were useing Graf day forms
and I contacted rocket genius. Hey, will you build this
integration for us? And their response was, oh, yeah. Maybe.
At some point. Not at this time. And so, I’m like, well, I kind
of need this. So, what did I do? Can anybody guess what did I do?
There you go. I wrote it myself. You know? I just said, okay. And so, the Stripe API, like I
said, at that time, was beautiful. Life was good. All
right? I mean, the documentation. It was just
simple. Beautiful, easy to read. For one, they also used their
own API. And what you find is that when a developer uses their
own stuff, it tends to be a little bit better. Okay? So,
everything that they had built was built on top of their own
API. They had a PHP library. Light? Which was perfect. API
documentation. Very clear, very easy to read, all right? So,
those are kind of hit hadding some of those spots that you’re
looking for. They also, and this was the plus. Who here remembers
Campfire? They had a developer campfire where all of their
developers would hang out and answer questions. That’s how I
got the chance to meet some of them and I ended up actually
working for Stripe for a little bit. And so, life was good. All
right? Life was good. And then, right. Of course, I ran into my first
issue. Excuse me. You guys are not seeing any
slides. There we go. All right. All right. So, ran into my first
issue. So, what happens was, they became popular, all right? And as more and more people
started building integrations for WordPress, what do you think
happened? Let’s see. Can anybody — anybody guess
what happened? Okay. So, if we’re all using the same
PHP library, right? We’re just pulling it in from Stripe using that PHP library, then
we’re gonna have collisions, right? Because it wasn’t namespaced at
that time. My plugin here is, it’s been sailing and working
for so long. And then all of a sudden I get
these plugin errors, your plugin is causing my site to fail
error. Okay. I’m looking and, okay. That’s when you start
looking at the environment. What do I see? I see other Stripe plugins and
we’re all just pulling in the same library. All right? And
so, whoever gets there first, right? They get priority. And
if if I plugin is being loaded second, there it is. Fatal error because of Naomi’s
plugin. It’s the other way around if theirs is loaded after
mine. Okay. that is very simple to fix. All
right? You’ll just check and see if the library already
exists. All right? Could anybody tell me why that did not
work? There you go. Versioning. All right? So, a lot of people at that
time, they weren’t updating — they weren’t updating the Stripe
library, right? It was just an add-on, you know, to whatever other product that they
had. So, they weren’t keeping it updated. So, if I simply checked for, you
know, to see whether that library already existed, well, if they were on
an older version of the library and the features in my plugin
were using a newer version, well, then, we would get an
error, all right? So, I simply namespaced it, okay
it and so, that’s something that I still do. With a lot of the API libraries
that I work with. I have to go in and namespace
them. And sometimes I’ll do it even, you know, just to make
sure that in the future if someone else is building
something, you know, that there are no — no collisions there.
Okay. So, the next issue that I reason
into was Stripe actually stopped
updating their PHP library. Right? They had all these newer
features in their API. And then I wasn’t able to use
them in their library. Right? So, I would have to create, you
know, my own custom functions there. Of course, using the HTTP API.
All right? And this is actually something that you will run into
frequently enough, okay? In my next case study, I’m gonna show you exactly — exactly how I ran
into that again. All right. So, there’s nothing like beating
yourself in the head over an error, you know, when you’re like, what is
going on here? And you come to find out that
the library just hasn’t been updated. Now whenever I’m working with an
API, I always check to make sure it covers the latest API calls.
I’m looking at the commit history, seeing if it’s updated,
looking at the bugs. The issues on GitHub to see if people are reporting bugs and they’re
not being merged in, things like that. All right. So, the good
news is, just to clear their name, after about a couple of
years, they did put a dedicated resource on that and they do keep that
library updated. Okay. So, as I started building more
and more Stripe integrations for other
platforms we found myself writing the same code over and
over and over again. Okay? So, I wanted a way to standardize
that. So, I ended up building my first middleware. Anybody here
not familiar with that terminology? Middleware? Okay. Yeah, it’s basically just a
wrapper around — around the API calls. And, again, I’m basically
taking their API calls and I’m running them through the
WordPress HTTP API. But something actually happened
is that this was actually a surprisingly
educational exercise that I learned help deepen my
understanding of the API, all right? So, I kind of stumbled upon that
and now it’s something that I do for every API that hi encounter. The first thing I do is start
out by writing middleware. Why? Because it make s me intimately familiar with
the calls, parameters and the responses. When I’m writing the
integration between WordPress and gravity
forums forms, I understand what my
calls and responses will be. Kind of like in computer science
school. Anybody here have the exercise to write a compiler to
understand how things work? Anybody? Nobody else wrote a
compile. Yeah. All right. So, here was the next thing they
learned. I also learned that these APIs,
guess what? They could have bugs. I mean, to think, developers
make mistakes. You know? So, ran into a bug with the API. All
right? And once I found that out, that was actually a little
bit dangerous for me, all right? Because then I stopped testing
my points of failure and I’m like, oh, this wasn’t working.
Or it must be a bug with the API. And I report a bug. No,
it’s working fine for us. That was a good reminder for me to
always test your points of failure. Okay? With your API. And so, the first thing I
normally do, because in WordPress, there are going to be multiple points of failure,
all right? The first thing I normally do is test just the API
call and the parameters. No WordPress, nothing else. Just
the API call and the parameters. The way that I started out doing
that was just, you know, basic curl call on the command line
just to make sure that the API does what it says that it does.
Okay? Because that’s another thing you’ll run into is that
sometimes the documentation is just — it’s not correct. Okay?
And so, I used to just use curl. Now I use Postman. It’s pretty
— you know? Why not? Once I know that I’ve got the API call
correct and what type of response I’m looking for, that’s
when I move to WordPress. Okay? And it’s funny because that’s
actually the biggest weakness that I see
in a lot of the API documentation is responses.
Okay? I’ll tell you this, do not trust
the responses in the API documentation. Many times they
are just wrong. Apparently it’s very difficult to keep up with
and to keep updated in the documentation. Responses. I
don’t know why. But all right. So, then I said, I’m sorry, so,
then I test the API call in WordPress. So, remember I said
that I used the HTTP API. And the HTTP API will do some
validation and some formatting. Okay? And that is another instance
where I have beat myself in the head, All right? Over, what is
going on? I know this API call is correct. What is happening? And it will be something, you
know, it will be something that WordPress is doing. Some
formatting that I need to — that I need to adjust for.
Okay? Something that they’re
formatting there. I actually recently had an issue
with Stripe where one of my API calls
— specific API calls for Stripe
Connect was being disconnected. It was only for Stripe Connect,
what is going on? It was because of the WordPress header. The default header that the HTTP
API sends. I think it says like WordPress/whatever the version
is. Something that Stripe was doing on their side, they were
rejecting the call. And the error message was, you know,
unintuitive. It, you know, didn’t explain that. So, that is
something to look out for and that’s why I always test the
API call first outside of WordPress and then I test in WordPress with the
API. Another thing that I learned
with Stripe is that services that use
their own API, going through their
dashboard, all right? With the inspector on can actually be a
great way to find undocumented features. Okay? A lot of times
you’ll find with these APIs is that searching is one
thing that, you know, they’re vague on. If you look although
their documentation, they won’t tell you all of the search
parameters. And you’ll be looking to search
for one specific thing. Gosh, you have to search by
email, just simple things. If you look at the dashboard and
look at the inspector, you’ll actually find a lot of
undocumented things in there. And there are some that I still
use years — years later. And, you know, I love it. Okay. So, if you notice in the
beginning, I said that Stripe was simple. All
right? Well, over the years, that has
changed. We are in the dark ages. All right? Of Stripe. Basically, you know, they’ve
added so many more features, things are
not as simple. The payments — the payments
industry has changed. Basically Europe has GD PR’d
payments. And so, things are a lot more
difficult. And, you know, what was once a simple and a joyous API is now — hold
on. Okay? You never know when something is gonna be changed.
It will be one thing today and, you know, tomorrow it will be
something different. And so, that brings us up to our next
thing: Changes. I don’t know about you, but for me, as a developer who works with
external APIs, that is one of my least-favorite words, all
right? Changes. Because that means that I have to go back in
my code, all right. I have to figure out your changes. Because
you probably don’t have a migration guide. All right? And
I have to figure out, okay. Where do I need to adjust
things? And I actually found myself in
an 8-year-old plugin, all right? That has been working
and running smoothly. And now I’m going back into that code and basically I had to gut it
and completely change it. So, here’s something that I do want
to recommend. There used to be a site. It’s no longer active, but
what they did was they monitored — they
monitored the API documentation for APIs to look for changes and
then they sent you a message. All right. That no longer
exists. If you’re good enough, you can build it yourself. But a
simple way is just to set a reminder. Set a reminder to look
for changes in the API documentation. Another thing that you can do is
sign up for their email list. Okay? If they don’t have one,
ask for one. Years ago I was famous for that. If I went to an
API. They didn’t have any kind of email list. They weren’t, you know, leapting
developers know what was going on, I would ask, okay? It
doesn’t mean you’ll get it. It might take some years to get it. But eventually, you know, if
there’s enough traction, they will come around. Okay? And
another thing that I want to say, when it comes to changes, if
there is anything that is, you know, backwards incompatible,
migrate. Okay? Migrate your customers. And this will be
people, you know, who are building these things for public
consumption. You know? If it’s just your internal
company, you know, you may be able to get away with that. But
if you’re working with customers, make sure that you
migrate them. It’s not that hard, it’s not that difficult.
Honestly, migration routines are probably one of my favorite
things to build. Okay? I love ’em. So, migration, migration,
migration. Okay? That is one thing that will
engender you much goo goodwill with those
that are using your products. Okay. All right. So, this next
one. All right? Podium Anyone here heard of Podiyo?
It’s significant for me because I
spent a lot of my time banging my head with this particular
API. Okay? , you know, what the outside the
documentation is deceptively simple. And you’re like, oh,
yeah, this will work perfectly. And you get in there and you
realize that the API is incorrect. The documentation — I’ll say
the documentation is incorrect and you’re making these calls
and you’re like, what is going on? And then you just start,
you get into that phase where you start
throwing things against the wall to see
what will work. And you happen upon something. Okay. What is
going on? So, with Podiyo, this is the one
where their documentation, the Po PHP
was out of date. I pulled it into my project. Oh, this is
easy. Their PHP library, we’re using
it and then we’re getting bugs. Okay. What is going on here? I
go and look at the GitHub. And I see that some people have
reported some issues. So, I’m like, okay, so, I go in
and I, you know, pull in the changes
myself. And then lo and behold, let me
tell you what happened. They discontinued their PHP library.
How do you do that? Who does that? You know, it would be different
if it was some arcane language. But PHP, come on, now. They
discontinued their PHP library. It has a notice on there on
GitHub and everything. That it is discontinued and they are
going to keep updating their other libraries. But they are no longer servicing
PHP. So, that is one of the reasons
why when I was talking about middleware that I always
recommend that you just go ahead and build your own wrappers.
Okay? Not only are you — are you
using the internal WordPress API, but
you’re also ensur insured against people
doing things like discontinuing their
PHP library. Oh, gosh. All right. All right. So, Salesforce. All right. So, Salesforce is an incredibly
popular CRM. Who here has not heard of
Salesforce? No? Maybe one or two. Okay. So, Salesforce is an incredibly
popular CRM. They are huge. I like to think of them as Medusa.
You cut off one head, I mean, others spawn. Okay? I’ve counted at least ten of
what they call clouds which are their product divisions and I
know that there are more. And I’ll just tell you that I found this out after I got into
Salesforce. So, basically they grow by acquiring other
companies and they figure out later how they’re gonna graft
them in. When someone asks you, do you
work with Salesforce, I say, which one? Because there’s so
many of them. And then you have for some of
them you have two APIs. So, you have an older soap API,
you have the newer REST API that yet
you to they want you to transition to. However, the SOAP API is not completely transitioned to REST.
So, you have some calls in SOAP, and some called in REST. And
sometimes when you go in, the REST API docs will point you back to
the SOAP API docs for figuring things out. So, sounds like fun, right? All
right. So, I would say after this experience, I came to the
conclusion that most API docs are simply mediocre, okay? Live
with it. That’s what it is. Most API docs are just going to be
mediocre. So, you’re going to learn to
bang your head a little bit, all right? We’ll try to do it as
little as possible. But you got to learn to bang your head a little bit and I’ll get to my
last case study. We’ll talk about some other ways to
mitigate that. All right. So, with Salesforce, I’ve worked
with four different APIs so far. And I expect that number to
rise. All right? In each API, has a different
method of authentication. Has a different way of even getting
access to the API because some products, they just will not
provide you access to. Okay? So, if you know Salesforce can
get to be very pricey. Okay? We’re talking about thousands of
dollars per month. And so, and then even with that,
sometimes they will not provide you with access to the API
unless you pay even more. Okay. So, let’s talk a little bit
about — about this. So, I found all of this out
after I took over the Gravity Forms
Salesforce add-on. It had been sitting there for about two
years unmaintained. I came in, I took it. It was still using the
old SOAP API. I mean, it was really out of date. So, I
cleaned that up, gave it a little love and now I’m a Salesforce
person. So, the first API that I worked
with is the simple web, where they give you a form that you
can embed on your site. So, what I did is I just took the endpoint and we post the data
from Gravity Forms it that particular endpoint. However,
since it’s not, you know, not any kind of, you know, official
API, what they have is they have a feature where something goes
wrong. You can get debugging emails. Okay? Which is great.
Which is awesome. Except it’s not because those
debugs emails provide you no useful information. I mean, I
have gotten back emails that simply say: This lead could not
be created. And you know what it says? There for the reason?
Null. Null. So, you know, I try to steer
people away from that API as much as
possible from web to lead. Because there’s like no way for
me to help you if anything goes wrong. Because I get no information.
You know, you can try to contact your Salesforce support person, but,
you know, they — yeah. Sometimes they’re just not —
not that helpful. Okay. So, then the next one which I
found out is their main product, okay? This is after years, you
know. When you get into Salesforce,
we’re talking years of commitment to
learning, all right? And then you still will never, ever learn
everything that there is to know because they acquire these
companies at such a rapid pace, all right? And to, the next one
is their sales cloud, okay? And so, we’re using their REST API
for that one. All right. And one of the things that I found with
Salesforce integrations and other integrations is that some
people like to use user names and pass words for
authentication. Okay? I will recommend as much as
possible, do not use user names and pass
words, okay? If they have it available, always use OAuth,
okay? Always use OAuth. It’s much more secure. All right?
Because they are connecting directly to an application on
their account. They can revoke those things. There are tokens
and keys that will refresh. Okay? So, you know, so that
you’re not storing user names and pass
words names and passwords in WordPress. And so, the third
product that I work with for Salesforce is marketing cloud.
And how I found out about this one was through a customer. So,
a customer came in and said, hey, does this integrate with
marketing cloud? And I’m like, well, does it have a REST API?
Yeah. I think so. And so, I go and look it up and
I find out that the Marketing Cloud API is different than the sales cloud
API. So, no. We did not integrate with
marketing cloud at that time. It was completely different. And
that was one of the solutions that they are really, really
tight on giving people access to. There are no sandboxes, you
know, so you can only test with the
actual deca. And then the fourth one is the
Salesforce par dot. If anybody remembers pardot. It
was another acquisition of Salesforce. It was just par dot. Now it’s just S.E.A.L. forest.
And their API is completely different. Completely different
website, completely different set of documentation. Completely
different way of authenticating, okay? So, that’s what we’ve
done with Salesforce. Salesforce has taught me a lot. A lot, a lot, a lot. All right. So, the next one is I had the
bright idea, you know, I came across
this system here. It’s an open source marketing automation
system called Mautic. Okay, I love open source. Let’s
integrate the two. Very bright idea. Except it wasn’t. And
here’s why, okay? And by the way, Mautic just got
bought by Drupal’s parent company if anyone is familiar
with that. Open source to open source, PHP
to PHP. What could go wrong? Well, open source to open
source. That’s what could go wrong. PHP to PHP, that’s what
could go wrong. And so, what happens is when you have two
open source systems, that means that you basically have control
of nothing. Okay? And when you have control of nothing, the
number of errors and things that can go wrong just — is just
exponentially through the roof. And then when you’re trying to
support that, that is an even bigger nightmare because you
have to determine, okay. Is it on the WordPress site or
the Mautic side? Because people install their own WordPress. People also install their own
Mautic. As a matter of fact, more people are going to install
their own Mautic software than they are WordPress. And Mautic
is not the most intuitive and the easiest thing to get
installed and up and running, okay? And so, this they have an issue
with Mautic, Mautic is built on Symfony, and the errors that you receive from
there, a lot of that is caching. That’s probably the biggest
issue that I see with Mautic is caching. It doesn’t work, your
plugin sucks. It’s broke, you know? Go away. And then I’m like, well, and
so, Mautic used to have a free tier
for their hosting. And so, I would go on the hosted and I
would put the plugin on there and I would say, look. It’s
working here on the host it. So, it must be something with your
Mautic install. So, that’s something to look out
for when you are integrating two open source systems. Okay? Now, here is the — here was —
I’ll say the bright lining in that. And that was because it was
another open source system, it allowed me the opportunity to
contribute, all right? To another open source system
outside of WordPress. So, the things that I found wrong, I was
able to actually fix, all right? So, I was able to go in and fix
the API docs. I was able to go in and contribute to any bugs
that I found. And so, that’s — that’s what
made it good. Okay. Okay. And so, then finally after
working with enough of these APIs, you know, after you work
with enough, you know, there’s only, you know,
two or three authentication methods that you’re gonna run
into. Everything else is pretty much standard. You’re using the HTTP API. You know, there’s just a
standard, you know, standard calls that you’re gonna make
with that. The only thing that differs really is the responses.
And so, after I started writing the same code over and over
again, I said you know what? I can kind of standardize this.
Here I am. I’m using the Gravity Forms API.
Their UI for this. And as you can see, people can
go in, choose their method, their API URL. So, basically I just, you know,
built an — a UI around the WordPress
HTTP calls. Okay? And so, basically it’s just so
that people, you know, no longer have to wait for a developer.
Right? To build them an integration. Just about any API
they can connect through here. If they don’t to want, they
don’t have to pay for Zapier. Here it is
right here. And so, that’s another one of my
recommendations. I get to use a lot of — a lot
of integrations. I try not to fall into the developer trap,
you know, that if I didn’t build it, you know, it’s no good. So,
I try to use other people’s solutions. And some of them that
I run into, the UI is probably one of the biggest issues, okay? And so, I always recommend use
— use the built-in WordPress UI as much as possible. If
you’re integrating with something like a form builder Gravity
Forms that also provides a UI, you know, use that. Use that as
well. And so, with this particular
one, let’s see. You can add your URL. Your authentication method.
And any of your headers. And then you can use a standard
format or you can — you can choose your own, right? So,
there’s a raw format. So, it’s kind of like — kind of like a
Postman if you think about it. A Postman for Gravity Forms.
Okay. All right. And so, one of the things that
we do with this, if anybody remembers
before Modern Tribe integrated with the WordPress REST API, you
know, a lot of people wanted to be able to
submit coast posts and things from Gravity Forms. And so,
that’s what we used there in order to do that. Okay. All
right. Well, thank you very much. I appreciate your time and you
coming to my story time. I hope that was helpful. And that you got some good
information and some things to watch for when you are working
with external APIs. I think now is question time. [ Applause ] Okay. Any questions? I see there’s one back there.
AUDIENCE: Hi. Excellent talk. Right here. NAOMI: I’m sorry. There you are.
Okay. AUDIENCE: So, explain the value
of directly addressing an API as
opposeed to a plugin.
NAOMI: Through WordPress? AUDIENCE: Yes.
NAOMI: Okay. So, if you’re addressing an API through
WordPress, it’s gonna be in the context of a plugin. Right? So,
AUDIENCE: So, you’re talking about APIs to plugin, not other open
available APIs. NAOMI: Yes. So, if you’re
integrating with WordPress, it’s in the context of a plugin or
theme. But probably plugin. You know, any external integration
for WordPress is always a plugin. All right? So, it are you saying — clarify that?
AUDIENCE: Can you address other APIs that are not plugins.
NAOMI: If we define API, basically I’m talking about
these external systems. So, I mentioned Salesforce,
Mautic, Podio, Marketo, a lot of these
other systems. They have APIs that allow you to pull the data
or, you know, send to interact with the data in their system
inside of WordPress. Now, in order to do that, you’re gonna
build a plugin, okay? So, you build your plugin to
make the calls to that API. And yeah. Build a plugin to make the
calls to the API and you can interact with
any — any service that has an API. Okay? AUDIENCE: So, you talked about
kind of brute forcing your way through an undocumented API just by inspecting and. inspecting and do you run into
situations where you use the things that you discovered and
they weren’t documented because they weren’t intended to be used
that way. NAOMI: Yes, I have. Now, some of
them — most of them that I — that I use I did get
directly from the developers. But what you’ll find is that if
they’re using it, you know, for example, in their dashboard,
then it will still be there. If it disappears, I would just
write in and let them know, hey, we were
using this. And sometimes they will put it back. Or they will
tell you a different way to do it. So, yeah. That is one of the
— one of the things that you run into. If it’s undocumented,
then that gives them — that gives them leeway to pull it.
All right? But I tried to use it as much as
possible so that when they see that I’m using, then thing twice about
pulling it. I think there was —
AUDIENCE: Over here. NAOMI: Yes, sir.
AUDIENCE: Thank you for this talk. As an integration
developer, it was incredibly refreshing to hear about the
aspirational documentation and responses that can come back. I was curious to ask for how
exactly you go about using the WordPress
HTTP libraries to use a — as an
OAuth client. Last time I was doing an OAuth integration, I found that most
of the available libraries and
frameworks out there were oriented more towards
authorization rather than connecting into an API and handling the
refresh tokens and all that. I actually ended up not wanting to
use the WordPress API directly and having to implement all that
from scratch. So, I’m just curious if you have
some middle infrastructure library that handles that heavy
lift lifting? NAOMI: Sure. Yeah. So, you know,
I think I’m a little bit different than what I’ve seen. I
don’t know if there are others out there. But when it comes to
OAuth, I did not use a library. I don’t really understand why
people think that OAuth is so difficult to complement
implement. And they always look for a library to use with that.
But, you know, it’s — I find it fairly simple after working with
it. So much. Now, in terms of the WordPress
HTTP API, there really isn’t anything
in that familiar API for OAuth. So, with that, I’m just using it
to make — to make the calls. So, instead of curl or something
else, I’ll use, you know, WP remote
get, WP remote post, or WP remote request. And that’s
basically it. And then when it comes back, you know, you can do your WP remote
retrieve body, you know, retrieve response. But, yeah. So, OAuth, yeah. You know, I
have one that I’ve — that I’ve built that use now. And it mostly works — you’ll
find with some APIs that some of the OAuth
implementations are slightly different. All right? So, when
the response comes back, parameters will be a little bit
different. And I actually found that with Salesforce. So, I started out with Sales
Cloud. I built the OAuth library in the
middle that like you said handled the
refresh tokens and all of that. Handled the getting the
authentication keys back. And I said, oh, great. You know? When
it came time to plug it into marketing cloud, yeah, just plug
it into marketing cloud. But it was actually slightly different.
There was a parameter or two that were different. And so, what I did was I ended
up kind of extracting that a little bit
more so that I could pass in exactly what I needed so that I
could still use the same thing, but then account for some of the
differences. Are there anymore questions?
AUDIENCE: Question for you. As one who writes API
documentation, and you expressed a certain amount of frustration
with that. NAOMI: Yes.
AUDIENCE: Setting aside that accurate and up to date is
assumed. But what would you like to see in technical documentation on APIs
that maybe is missing or something that you’ve found that
— an idea that you have that you haven’t seen out there
already. NAOMI: Sure. So, a clear and
updated list of parameters. That’s one of the big things.
And then errors. Right? That’s a big thing for me is
errors. When you get an error back and you don’t quite
understand. When something is very clear, if you get this
error, this is what this means. That’s very, very helpful. And eliminates the amount of
head banging time. Another thing is, like I
mentioned, responses. You know? Clear responses, you know. I
don’t know. It just seems to be difficult
for, you know, for people to give clear responses. These are
the responses that you can expect. This is the format of
the response. I’ve seen things — and this is why I always have
to do the calls outside of WordPress first because, you
know, parameters will be slightly different. Like
somebody changed something and then different update the
documentation. So, those are the big things,
you know? I think if you have those, then it’s smooth sailing.
You know what the call is. You know what — you know what
method to use. So, whether it’s a get or a
post. And even standardize — excuse
me — standard sigh around that would be great. Some calls or get some calls or
posts. It just doesn’t make sense. Yeah, so, thank you.
AUDIENCE: Hi. Good morning. NAOMI: Good morning.
AUDIENCE: Great talk, thank you. NAOMI: Thank you.
AUDIENCE: My question is a little bit higher level. But I
wanted to get your opinion on your thoughts regarding a
downloadable plugin versus a hosted plugin and whether you
have experienced the opportunity to actually host plugins as
well. And maybe it’s resolved some of
the, you know, pains associated with migration migrations or
versioning and things that have nature.
NAOMI: Sure. So, I have to say, I’ve never really heard the hosted plugin
terminology. So, if I can clarify, do you just mean a
SaaS? Where you’re hosting the functionality on your serve
center okay. So, that was actually — as a
developer, you definitely prefer that. You know? You prefer as
much control as possible. But then the customer prefers as
much control as possible. And so, when you’re talking about things like Salesforce where
we’re in the enterprise, you know, they want control over
their data. A lot of things are sensitive. So, the original Salesforce
add-on, the first versions, the original
Gravity Forms Salesforce add-on, the
first versions of that actually sent
all the OAuth calls to the author’s server. So, all of the OAuth calls went
to the author’s server. And from there, he took and went
did and got all the authentication information. What
happened else he was no longer maintaining the plugin and there
was failure at the sevenner server.
And so, people connected to Salesforce weren’t able to
authenticate properly. I think where it makes sense and you can
get away with it, you know, a SaaS is definitely preferable.
You know, hosting host of the difficult functionality for you.
But I always try to protect the customer as well so that they
know that — they know that they own this, they own their data.
I’m not going to be looking at their data. I don’t have access
to their data. Okay. Yes. So, sorry. AUDIENCE: When you’re working
with an SDK that they eventually just
abandon, do you find it better to shim the pieces that you need
or just go ahead and write your own library for the parts that
you need to interact with their service?
NAOMI: Yeah. I just go ahead and I look at the API calls directly
and then I just map those in WordPress. Rather than trying to take from
theirs. Because — yeah. That’s just for me. Me personally.
AUDIENCE: Thanks. AUDIENCE: Thank you for a very
interesting talk. My question is a little bit more philosophical.
From your experience with working with so many different APIs like
Salesforce, Stripe and others, which one of
those were most pleasant to work with
and why? What developers behind that API
did differently than developers behind other APIs? This is the
first part of the question. And the second part is, how do
we, as developers, avoid building
things that, like so hard to maintain and manage. Like, for
example, the image in Salesforce that has two APIs and
it’s basically a nightmare to work with if you need some portions of one
and some portions of the other. NAOMI: Okay. So, I will say Stripe will
always forever be my shining example. Stripe in the early
days. And there was several things that they did right. So,
the simplicity. And I think a lot of that came from because they were very hands on
in the beginning . when they were trying to gain
traction for their service, Patrick, they would say, hunt me down and meet me in
a coffee shop. And I will get Stripe installed for you right
there. So, it had to be very simple. The documentation was very
clear. There was some documentation that looks like it
was written by developers. And so, I would recommend always
getting another eye on it. Always having someone from
outside of your company try to use — try
to use your API. Try to use your — use your documentation. So,
getting, you know, an outside look at it. And then the third thing that I
believe that they did very, very well
was the developer experience and that was with that chat room. The chat room was awesome. Other
companies have done it. For example, Marketo, they host an
API developer, what do they call it? Webinar or something. Q&A
session every week. Every week you have a place you can go and
ask questions. That’s one of the biggest things that a lot of
people miss. Because you can get really good feedback and see
where people are confused and then be able to address that in
your documentation. So, in terms of developer
experience, you know, I think those are the things that were
done very well. What was the second part of your question, I’m sorry. Okay. All
right. So, you think that covers that? Okay. Great.
AUDIENCE: I have a question on the flipside. So, you don’t have
to name names. But how have you developed a
threshold to nope out and back away. To say, you have done a
great job of when to get creative. But, no, this is not
going to happen. Do you have any reflections on
that? NAOMI: One very clear thing is
if they don’t have a REST API, I back away. So, I’m really not
gonna work with anything else. And I think there is one
particular API that I just simply refuse to
work with. Sandboxes is a big thing. If you can get a sandbox and I
would say the complexity of how to get a sandbox and how — how to log in
to those sandboxes. But yeah, you
know, you can kind of look at the documentation. If they
don’t have documentation, you know, that’s kind of a red flag.
Sometimes they’ll keep it behind lock and key. You’ll have to ask
and they’ll send it out. You know, so, but it’s just, you
know, something to consider. But yeah. REST, really REST is kind of
the, you know, kind of my threshold
there. That’s it? Okay. Thank you so
much. [ Applause ] Just Enough React for WordPress Shannon Smith SPEAKER: Hello, everybody. Welcome to the second session
this Saturday morning. Oh, the mic is not on again. Sorry,
that’s a small detail I keep forgetting. Is that on now? Is the mic on? Okay. Thank you. Okay. All right. We have to run
through these announcements one more time for the second session
and then we’ll let Shannon get started. If you could just make
sure all of your cell phones are turned off and
possibly moved to the middle of the room or just make sure that
there’s room for people who are coming in a little bit late. And if anyone needs any
accessibility and they — if you need anything at all, just let
us know. Just contact someone in a red shirt. There will be a Q&A
after the session. So, if you could hold your
questions until then, we’ll have someone come around with a mic. And also just a couple of
reminders that there’s a contributor day on Sunday and we
would love to have you come to that. And also, if you haven’t picked
up your T-shirt yet, they will be at the swag table in the
sponsor room downstairs on the first floor. And just a quick introduction
for Shannon. Shannon Smith is speaking on
just enough React for WordPress. She is a platform services
specialist with WordPress. com/VIP and delivers solutions
to media, marketing and enterprise. She has over 15 years experience
in open web development. A long-time supporter of
diversity, accessibility and
internationalization, sorry. And was a WordPress Montreal
community organizer for seven years. Shannon is also a hiker, poet
and a mum of four. Welcome. SHANNON: Hi, everyone. Welcome
to just enough React for WordPress. I’m really excited to
be here. And thank you for coming. This is me. Like was just mentioned, I work
at WordPress.com VIP. And my job is to help support
developer developers in how they’re using WordPress
generally and the new block editor as well. And just help
them use it better. But I also have a background in doing a lot of freelance work, which is
what I did before. So, and I have been involved in the
WordPress community for a really long time. And one of the things I really
like about WordPress is that it has a
really nice onramp. You can get started with just a little bit of knowledge and ramp it up
really easily. And so, one of the thins about
WordPress when I just started out is you didn’t really need to
know a lot of PHP. Although, of course it helps. You just needed
to know enough. And that would help you start off maybe just
getting your theme started and then maybe you would write a
couple of functions in a theme. And then maybe you would write a
simple plugin. And then maybe a more
complicated one. And then that could be an onramp
to contributing to the core part, the code part of WordPress
Core. And so, it’s really nice
strategy to get started with something really easy. And so,
what I wanted to do with this talk is do the same thing with
React. Because I think when Gutenberg or what we call the block editor now was
first announced, a lot of developers were worried that
they would have to learn a lot of new technology and they would
be behind. And really, it’s not so dire. And this talk is
intended for people who haven’t used the block editor that much
but really want to get started right away without doing a whole
bunch of coursework and get their hands wet, you know, get
started. And so, this is the beginning of the onramp for
React. That’s what this talk is
intended to be. A couple notes about this presentation. I will
make all the slides available. So, you can — you don’t have to
take too many notes. And on each one, I’ve put little
references and links out so that when these slides are available,
you can reduce use this as a learning
resource. In the spirit of good attribution, but also as a way
to learn more. So, if anything really appeals to you, you’ll
have all that information at your fingertips. So, the new block editor. It was
originally presented as Gutenberg. But now that Gutenberg is just
been added into WordPress Core, we’re just talking about the
block editor. Because it’s just right there. And it’s a new post
and page editing experience that makes it easy to
create rich post layouts and blocks. It’s the newest
evolution of WordPress because it’s not such a big difference,
especially from the user point of view. It just makes
everything really a lot easier. And I like it. It’s a lot of
fun. I use it on my own blog, of course, as well as at work. And so, just a couple of really
nice features is that you can use it
to guide content creation. And you can use it sort of in the
place of or in addition to some of the features that we’ve all used in
WordPress up until now. Custom post types, shortcodes,
meta boxes. Widgets as well sometimes. And that allow you to use
special for sites. It allows you to have control and have a
really universal, professional experience. So, it helps make WordPress like
a really vibrant, easy-to-use,
really performant tool. I hope you have all seen the block
editor. But just to illustrate the concept, I just have a
couple slides of how pretty it looks. Because what it’s allowing
people to do now is do a really beautiful,
magazine-style layout without a lot of code. So, the user really
has a lot of control. They can really produce something really
beautiful. And they don’t need to know a lot to be able to do
that. So, we get nice images. We get beautiful galleries. One of my pet peeves before was
pull quotes. Pull quotes were always hard to sort of organize. They always looked a little bit
off in certain conditions. And now you can sort of move them
around in the editor and just have a really seamless
experience. Which I love. But how does it all work? And how it all works is with
React. I’m going to give you a basic introduction to React for
beginners. React is at the very core a
JavaScript library. So, it’s just a bunch of files that allow
you to do things with JavaScript. But also, it’s a tool for
building user interfaces. So, it’s what powers the backend
editing experience. And React is an open source product. It’s
built by the people at Facebook originally. But, of course, it’s
a community project now. So, anyone can contribute to it. And what it does is it creates
an in-memory data cache and looks
at the differences and puts them into the DOM for easy access.
And uses JavaScript or maybe uses JSX. And, yeah. So, that’s sort of a very simple
overview. And I think it was 2015 at the
State of the Word that Matt said that everyone should learn
JavaScript deeply. But sometimes it’s hard to get started. So, I think when I look at all
the online courses, sometimes it’s hard to see, you know, what
is lesson number 15 gonna bring me? Because it’s hard to see
the final product. But when you look at blocks and you want to
use them right now, you can see the finished product right away.
So, one of the examples I like to use is if you’re using blocks, for
example, for a recipe site, you can see each block is a different type
content. You could have a block say for
ingredients. Another one for directions. One for the main
photo. And then another one for, you know, just a description of your
experience cooking, for example. And all of these pieces can be
different blocks. So, you can use — you can get
started building blocks to do each of those components a
little bit easier than you can learning thousand use React
using one of these online courses. Because you can see the
finished product. You know what an ingredients block is supposed
to look like on your finished blog. And that makes it easier
to build it. Makes it easier to design all the steps that you
can use to get there in the first place. So, blocks can be
seen sort of like plugins. You can put core behavior into
block. Or you can put sort of custom
behavior, plugins into blocks. And what it does is it separates
all of what you’re doing into two layers. An editorial layer
and a data layer. And the way it’s done is that
what the block editor is, is effectively
an abstraction layer between React and the WordPress we all
know and love. So, what’s that we built as a community whether
we built Gutenberg or the block editor. We built an abstraction lay
their makes it easy to use the block editor
with what we already know. And I was really impressed when
I first started playing around with it because it’s pretty
intuitive. It uses the same sort of coding
— I don’t know — strategies that I’m used to as a WordPress developer. And
it’s very intuitive. So, I think it was really well
done. And what it does is it divides
it into two components. This is a diagram that ill
illustrates in one column is the frontend in React. But the frontend is completely
separate. You don’t have a performance hit with the editor,
it’s completely independent and in the backend. But also, if you
were using Gutenberg with a really large team. So, WordPress VIP, we work with
people using Gutenberg in the editorial environment, for
example. And they might have hundreds of thousands of editors
editing content on a single site at any time. And they’re still
able to use this. It’s still a performant system. So, I’m gonna
show you some code bits. But I’m not going to go through it
line-by-line. The point of this is just to illustrate that it
doesn’t take a lot to get started. So, this is how you
would declare a block type. And this is a really simple one.
This is just a hello world block type. And it’s just to show us
different components in it. And it’s only really a few lines of
code. So, it’s possible to create this. I would point you
to the Gutenberg handbook which has some sort of prototypical block models that
you can work with, copy, and also download other people’s
blocks and see what they’re doing just to get an idea of
what’s out there. But basically it’s just these few layers. And once you have this sort of
model set up and there’s also an
entire talk on this also at this Ent. So event. So, I encourage
you to attend that. You can do a lot of cool stuff. These are
some of my favorite thing about being able to make your
own blocks and reuse them. My favorite is reusable blocks.
Because if you have had to copy and paste from an ancient
outdated version of Word and you have to copy this snippet of
text over and over again multiple times, you don’t have
to do in anymore. You can make any block reusable and use it
over and over again. I think the best example is if you’re doing
something like say you’re doing some self-promotion. If you wrote a book, for
example, you could have a snippet
illustrating your book and you can use it over and over again in multiple pages and it’s
just ready for you already over there. Another thing that’s
really cool which is coming in the backend-only
workflow, so working with a team. You can have an editorial
checklist. Make sure everything is properly attributed. Is there
a featured image for this post? That sort of thing. So, that’s
something that’s coming and that’s going to make it really
helpful to have a really professional, smooth-looking
website as well. Another thing you can do is have
an add aware editorial experience. The people adding
the content can see where the ads will go, where
there’s a mismatch, where it can be improved. That sort of thing.
And block-level locking. If you’re doing like a recipe
site, and you want to always have ingredients, directions and
title, you can make sure that the
blocks show up all the time. But maybe you don’t need a pull
quote in that situation. So, you don’t have to include that. So, you can have a lot of
control as a theme developer over what is shown to the user.
And encourage them to fill out all the fields that are
necessary. But take away all the stuff that just adds clutter. And I think Gutenberg’s really
large. So, when it first came out as a
plugin, I, like, ran it through Clock,
which is a little open source application that lets you see
how many lines of code is in something. And it’s kind of
giant. It’s a lot of license of code. But the good thing about using
it right away, don’t need to look at the code, don’t need to
start, you can just start with the plain blocks
themselves. So, even though this can seem
intimidating, it’s not really. So, React itself. Like I said,
React is a JavaScript library for building user interfaces. And it’s using a lot of open
source projects. How is works is that you use
JSON literals. And these are really simple because they’re
declarative and they’re human-readable. So, they really
give you sort of a — something that you can understand right
away even if you’re not quite sure how to put it together
yourself. So, what I’ve done here is I’ve
written a JSON literal for a T-shirt. So, it would be a — this would
be for my company T-shirt, it would have the company on it if
you have a logo. It would be Navy blue, and size
large, and long sleeves, false, Boolean, and you can have a series of
attributes and Boolean features. This is the most simple of a
literal, and it doesn’t do anything. But it gives you an
idea how it’s comprehensible to human beings right off the bat.
And the example before is a real one. And basically it takes your
JSON literal literal — what the people developing the block
editor did, they need tad place to store the literals that made sense, but was also
backwards compatible. It was unique, they put the JSON
literals inside of HTML comments. One of the reasons it
was done, comments are flexible. There aren’t a lot of rules
around what you can put in a comment. But it still maintains
valid code throughout which is very important. And it allows a
lot of flexibility. But still allows you to use —
for it to be backward compatible with all the different versions
of WordPress out there and the different plugins that are in
use and all sorts of different use cases. React organizes its data inside
an object tree. So, it’s sort of in groupings
that identify different parts of the code. So, you can isolate
each grouping. And each grouping is readable so you can sort of identify what’s
happening. Okay. And so, Gutenberg isn’t HTML,
but it’s inside the HTML, which is sort of like the clever way
of making it accessible without damageing the validity
of the code. so… and templates. So, templates can be arranged as
a series of block types. So, like I mentioned before, a
perfect example would be a cooking blog
where you have ingredients directions, photo, et cetera.
But another example that you might see more often is an eCommerce site
where you always want to have a product image, you always want
to have a price, you always want to have a description. And so,
you can organize these things into templates so that the
people using the system have all the right information right at
their hands. But they don’t have a super-busy interface. And, of
course, you can always add things in when you needed to if
you’re the user. So, the template lock property
allows you to do that. allows you to force product price to
always be available. Or in the case of the recipe
blog, the ingredients list. And you can assign temp plaits
to existing post types. If you are assigning existing
post types, you might have one for existing recipes, but also might want to
have book reviews on the website and also some guest interviews,
for example. And these can each be a custom
post type and that will allow you
flexibility to separate them into content
separation on the website, but keep the interface manageable
for the user. And the whole point is to make sure that it’s
compatible with what existed in the past. So, the it allows you to keep
using shortcodes, it allows you to keep using custom post types.
And, of course, it allows you it keep using metaboxes. And I think metaboxes are really
interesting instance to discuss. I’m just going to get to that in
a second. So, shortcodes, you can those. And if you have a shortcode that
exists, you can put it in. And there’s mechanisms for
previewing them in place. There are plugins that already exist
that let you do this now. They’re not necessarily all very
stable right now. But you can still get an idea of
how this is gonna work. Custom post types. You could use blocks for custom
post types right now. So, if you have a site that rely on this,
you can build these blocks right in right away. So, they’re
supported bit block editor, REST API and you can opt out of
this entirely if you don’t to want use the block editor for
specific custom post types. And metaboxes. So, I hear a lot of
people worried that they’ve invested a lot of time into, for
example, a plugin that uses a lot of metaboxes and they’re not
quite sure how to get all of that content into a site that
uses a block editor. And it’s actually not as tricky
as you might think. I’m just giving you a snippet of
code that shows you how easy it could be. Of course, metaboxes
can be complex. Some plugins use a lot of them. But I like to
point to the example of Yoast. Yoast has — Yoast is a really
complex plugin, but it relies heavily on metaboxes. And Yoast right now works with
the new block editor very seamlessly. So, I think if the Yoast plugin
can use it properly, then you can too. And it’s not as tricky or as
intimidating as it could be. And this is definitely one of my favorite things about the new
block editing experience. Especially if you’re a designer
rather than a developer. I’m sure you’ve all seen that one
website where where, you know, somebody’s using a certain
color palette. And then when a user comes in and adds maybe a
heading. And it’s a slightly off-color of
red and it’s so jarring. And this way you can set a specific color palette for a theme right
into the code. And you can see the code just down below. And
it’s just, you know, two lines of code plus a list of hex color
codes. And then you can set up your theme so that the color
choices that are available to users are the on-brand themes
that you want to use. And, of course, you’re not
limiting choice because you still have, you know, the color
wheel option where you can choose anything you like. But
the chances of that, you know, jarring off-brand red being used
are much less. And you still give the user a
lot of ability to customize. And I think the main advantage is
that you can have a really professional look. Because that con sis tensey consistent font and layout
contributes to the user being easy to use
and visit for the builder as well as the user. And I want to
talk about building blocks so you can see what’s involved as
well. So, this is the basic code for a
block. There’s basically a block type
registration. And then there’s the related
functions. And so, just I’m gonna just skip
ahead just a little bit. And this is like the block style.
So, blocks have classes applied to them. Just like many other
WordPress components. So, if you’re a theme designer in particular, you can latch on to
those classes and do exactly the same things you’ve already been
doing. And add, you know, the colors
you wanted, the fonts you want, et cetera. In the example of a
pull quote, make that font larger, make that use
italic or a different font and that’s really easy to do. And
then all you need to do is put your block code and your theme
code together. And then it works really well. So, you can have editable
fields, toolbars and inspectors, you can have dynamic blocks
opinion and once you’ve leveled up past the basic block, past the hello world block, then you
can add in the inputs to make your block really interesting
and to add some of the features that you would see in, for
example, a pull quote. So, color choices, things like that. And
if you’re working with forms, for example, you can build
blocks that include much more interesting input choices. And you can do this all with the
WordPress CLI. So, if you’re used to using that, this is all
you need to type in to get a super basic block. So, it can go
really quickly if that’s something that you’re already
doing. And I think that the best
strategy for getting started is the same
strategy of how you win at Go. so, the best strategy is to lose
quickly the first 50 games. Because it’s in losing that you
acquire the most amount of knowledge. So, the best way to
learn how to use blocks is actually to break some blocks. And so so, that’s definitely how
I used to use WordPress. I had, you know, before I did this as
my job, I had a WordPress site. And basically, assessme
attempted to break it in as many ways as possible to learn how to
worked. And that’s how I’ve learned to use the block editor
as well. It’s easy to see how the blocks
work together when your goal is to break the system rather than
build it. I recommend that strategy. And a
couple tips and tricks. If you want to get started. You can
turn any block into a reusable block. So, again, if you’re on
the — if you have a recipe site, for example,
and you’ve just written a book, or you have some sort of
promotion coming up or an event, you can have one block
that describes, you know, your book. Where you can buy is on
Amazon. Or your event with all the details and just reuse it in
multiple places in your site. And you can may any block
reusable block. And you can take that away if you want to. If
you don’t to want use it anymore when the promotion is finished,
for example. And because it’s being reused throughout, if, for
example, I don’t know your book is taken off Amazon, but you
want to sell it through another service, you can just edit it in
one place and have it updated
everywhere. You don’t have to go through the whole site all the
time. The next thing I’m really exciteed about is something
that’s coming up and that’s the block directory. I’ve sort of a more polished
image of what that might look like. But I really like this
one. And the reason I like it is because it’s just a sketch. And I think this really speaks
to the spirit of open source soft
software because you can get in on the ground floor and affect
how this is going to be built, what it’s going to do and how
it’s going to be built and you can do that now. And I think
it’s big inspiring because all big ideas start small so you
don’t have to arrive in WordPress Core with everything all set up. With your
excellent knowledge in React and PHP and CSS and database
management. Although all of those would be wonderful. You
can start off really, really small. This is a more polished example
of what this might look like. And you can see it’s sort of
modeled on the plugin directory that we
have now. And ideally, all the blocks that people build are
going to be able to be added to any site just through this
interface. I think right now a lot of people add blocks, well,
they use the default blocks. Or they add blocks that are bundled
with a theme. But soon you’ll be able to add blocks individually
and separate out the theme from blocks so you can have a
theme that works well with a certain set of blocks. You can
use the same theme, for example, for a recipe site as
you might with, I don’t know, an eCommerce site. And then use the
blocks that apply to that situation. So, what if you want
to get started doing this now? There’s a lot of ways to do
that. Number one, I would recommend start experimenting,
start breaking things. Second, you can pay attention to
what’s happening in Slack. And whether that’s actually
contributing or just lurking. It’s really informative. And I
think it’s really interesting to see that it’s a project that’s
being developed by actual people. So, that’s something that
arrives fully formed. That’s the beauty of open source, it’s
always a work in progress. It’s always the journey, not the
destination. And you can see how decisions
are being made. You can influence them and contribute.
You can contribute in ways that are code-related. But you can
also contribute to documentation. Make sure that
the codebase is properly commented. Contribute to
translations, contribute to community work, et cetera. And I also wanted to mention,
before I take questions, that WordPress
VIP where I work is hiring. So, if you have any questions about
that at all, please come see me after this talk and I’ll be
available in the hallways to take any questions you might
have about that. And now what I’ll do is I’ll
take any questions from the audience. If you have anything — any
questions about the block editor experience, React in general,
how it’s all put together, how you can get started. I would like to hear from you. AUDIENCE: So, if I’m useing a
metabox now and I switch and start using
a block instead, it’s gonna store that data in the content
instead of in a separate query to the postmeta?
SHANNON: So, what it’s gonna do is it’s gonna store it while
you’re Editing it in HTML comments. But then it’s gonna
add it into the database as well. So, it’s sort of parallel
systems and it depends what you’re doing. And you can build
it in different ways depending on your needs. But it can still
be fully accessible by the API, by the database, by individual
queries after the fact. AUDIENCE: But do I need a
separate — like right now if I do a
metabox, I’m storing that in the postmeta, so, I have too a get postmeta query
in addition to the content query. Do I still have the extra
query or have I saved a query? SHANNON: I would have to see it
to say specifically. I’m not quite sure. It would
depend how you’re doing it. AUDIENCE: And just the last
thing is that the comments that are
stored, the JSON comments don’t show up on the frontend.
SHANNON: They don’t. You can tell people are using them. You
can see the classes. So, you can know if somebody is using — and
I guess in theory you could also remove those if you’re very
concerned about that. But that’s something that’s happening in
the editor layer, not in the frontend. And so, React isn’t
something that’s really operating heavily on the
frontend. It’s really the editor experience. So, it’s really
what’s happening for the user. And I think like because what’s
happening to the editor experience and what’s happening
on the frontend looks similar, it’s hard mentally to separate
those things out. But it really is something that’s happening for editors. Yeah.
AUDIENCE: So, I was interested in knowing more about how you
handle block recoveries. Like when you create a template and
then something changes in that template after you’ve already
created it. So, the user goes to visit the
editor and now they have broken blocks. Or maybe you insert some kind of
block filter and now you run into another example of a broken
block. Like, what do you do to avoid that early on as oppose
opposed to when you’re in mid-change and you cause all these blocks to break?
SHANNON: Well, can you tell me a bit more about — how is the
block break something AUDIENCE: Like when the data
that the editor expects to see is
different from the data that is save saved. SHANNON: That sounds really
specific. I guess, again, I would have to see the code
specifically to be able to comment really on that really
specific situation. I think the best strategy is
always to, you know, build as future-proof as possible. Make
sure like — think in terms of the fact that your user might
take out every block and add in every block. And really, like, I
mentioned earlier, try to break it yourself. Like, if your strategy is that
you’re user might try to break every single thing in this, how
can you make this stronger and more performant,
just better all around? Then you can head off some of
those situations in advance because you’ll be using like
more standardized code. You’ll be thinking in terms of
more edge cases and just building something that’s a bit
stronger in terms of that sort of use case. That’s probably the
best strategy. AUDIENCE: Okay. Thanks. AUDIENCE: So, his case might not
be as edge case as you think. We ran into the exact same thing
where we have a plugin that creates a
block for us. We create a reusable block based off that
have for a template. We reuse that block everywhere
else and if they need to make any changes, we tell them to go
ahead and detach. When the plugin author updates
and makes changes to that, those changes don’t get reflected to the
reusable block. They get reflected back to the block it’s a that’s in place and
that’s where it breaks. So, it is there a way to create a template, a reusable block — is
there way to update the reusable block so that it doesn’t break
the blocks that it’s being used everywhere else? SHANNON: Probably. But I’m not
sure that you would want to in some ways. Because what you’re
doing when you that is breaking the backwards compatibility of all the content you’ve
already created. So, depending on how often you use a reusable
block and what the use case is and where it’s being used, you
might — you might not want to. Or what you might want food is
re-create a different block and use that. Because that would be a — that
would have a better chance of not breaking things. If the
plugin developer always developed in way that would
always update that block, it might have unintended
consequences for users that were not expecting that. And so, I
don’t know if that’s necessarily the right strategy. AUDIENCE: So, basically we’re
breaking the idea of reusable blocks if we create them as a
template with the anticipation that we would modify them later
on. Reusable blocks are just to be created once and not modified again in
content. SHANNON: They’re meant to be
modified again. But if you’re using a plugin to create them, depending on the creation
mechanism, then maybe that — that might like — I mean, a
plugin can be anything, right? A plugin can add any kind of
different types of content. So, it really depends what
you’re doing. But there’s a usefulness in
having those two things separated. AUDIENCE: Okay. AUDIENCE: We have a Twitter
question. Have you used React in blocks on the frontend or have you used React
in WordPress in a theme just on the
frontend? SHANNON: Okay. So, React is
built into the backend. You could come up with a really
ingenious way to edit directly on the frontend and to my
knowledge that isn’t something that I’ve seen yet. But I mean,
there are a lot of clever people out there and they’re probably
doing that. And it would be great in the future if that were
built into WordPress Core. But right now it’s all something
that’s happening in the backend. So, it doesn’t necessarily have
to do with the theme development as
much as WordPress itself before you even get that far. And like, for example, in
WordPress VIP, like a lot of what we’re doing is working with
people with decoupled sites. So, they can use WordPress with the
block editor and use that entirely only for the backend of
their website. And then with the architecture,
build something entirely different for the frontend and
just not use WordPress as all for that if they wanted to. So,
that’s definitely a possibility. So, they really — they can be
very, very separate. Are there any more questions at
all? Okay. If you come up with
questions later on, I’m very happy to take any in the
hallway. Especially if you’re not a big
group question asker. And you can ask me questions on Twitter.
I’ll be here all day and also on Twitter all day. So, please feel free if you have
anything else that you would like to know about. Thank you
very much. [ Applause ] From Developer to Manager — How to Survive Brian Thompson SPEAKER: Hello world low,
everybody. Welcome to the third session this morning. We just have a couple of
announcements before we get started. If everyone could make sure
their cell phones are turned off. And if you want to move
into the middle, we have plenty of seating. That’s not really a
big deal right now if anyone comes in late. After the
presentation there will be a question and answer time. So, if
you could please hold your questions until then, we’ll have
someone go around with a microphone. And also, just a couple of
reminders. There’s a contributor day on Sunday. And everyone is
invited. We would love to have you come. If you haven’t picked up your
T-shirts yet, there are still shirts at the swag table in the
sponsor room. After this presentation, there will be a
lunch. And I believe it’s just downstairs at the bottom of the
escalators. So, I think that is all of the
announcements. And we would like to introduce Brian Thompson. Currently runs the web team at
Mindgrub Technologies, a digital services
agency in Baltimore, specializing in WordPress
websites. His life consists of coding,
managing his team, having some fun playing video games and going camping as far
away from technology as possible. He started working
with WordPress in 2011 as a sys admin managing
servers, WordPress websites run on. In 2012, he began learning
WordPress development. He’s been promoted from intern to lead software engineer and manages
the day to day operations of the Mindgrub web team. And managed the websites and
servers for high profile websites such as charity TV benefit concerts with
audiences of 2 billion people. Welcome, Brian Thompson. [ Applause ]
BRIAN: Good morning, WordCamp. How is everyone doing this
morning? Still a little tired from last night. I know.
Crawling through the tunnels were tough. Thank you, Tiffany,
for that kind introduction. When I was putting it together,
they asked me what they should say. And I included something
about everybody applauding like there’s a TV show, without
realizing I was in a room with stage lighting . And then I freaked out as I
walked in. As a manager, you just roll with the punches. As Tiffany said, I’m Brian
Thompson, the director of web engineering at Mindgrub in
Baltimore, we do tons of open source PHP work. Even before
WordPress I was working with web technology back since
2006 when my middle school teacher asked me if I knew how to delete an icon off
the Windows desktop. That was exciting. You can laugh, that’s
okay. Before a developer for many years. Even as a manager, I
try to find time to write code, for better or worse. And I’m
also on Twitter at conferences. So, my coworkers are sitting up
in the front. They always like to run pool when is I speak at
conferences as to how many Twitter followers I will get
from my talks. The current bar is six. There’s more than six
of you out there in the audience. I can see you. Even
with the lighting. Just saying. And as Tiffany said, baker,
outdoorsman, and a general tech nerd. So, here we are. Imagine
yourself sitting at WordCamp on Saturday listening to this great
talk unaware of what next week will
bring for you. Monday morning rolls around. You have traveled
back to wherever it is where you are headed. Be that here in St.
Louis, another great city in the United States or abroad. You’re drinking your coffee in
your wonderful WordPress mug that you got down and the
sponsor area. And your boss comes up to you
and says, Congratulations. You just leveled up and got
promoted. And as you’re balancing that excitement with
the need to continue drinking more coffee to actually realize
and show that excitement, all the sudden you realize that life as you know it, where
you normally live here, writing code, is about to change. Because as a manager, I maybe
open a code editor once a week. Twice a week if I get really
lucky and we have a holiday where most of the company is out
of the office. Like the day after Thanksgiving. Those sorts
of things. So, what do you do? And I say this having it happen
to me. You know, I lived this life
where I showed up for work one Monday morning and after
previously being asked to write a job description for my
job as a developer, they said, congratulations. You can take
that job description and pass it on to somebody else because
you’re now running the entire team. It’s a team of 35 plus web
engineers who now all report into you. Congratulations!
They’re all awesome, by the way. Especially those who are sitting
right over there. And so, as I was thinking about trying to figure out what do you do? How do I write code to make them
do what I want? And then deal with the bugs that
come from that. I realize I had to start somewhere simple. And I had to go back to
something that I knew fairly well and had done before. And, you know, just a few weeks
prior had been experiencing. And that’s relate management to
something else. And so, just like I look at a coding problem
and I’m trying to write something and I’m like, I don’t
know how to do this. How die make this StackOverflow answer
look like what I need to do? I had to find an an an analogy
for managing people. And my answer is it’s just like
white water rafting. How many have been white water
rafting before? That’s good, 20% of the room before. That’s
impressive. For those that haven’t, I highly encourage it. There’s nothing more fun than
get flipped upside down out of a boat in chilling water. It’s
much more fun when you’re watching your friends do that
and you’re sitting in the boat semi-dry. As I thought about
this, and I figured out how go do I want to get
management into white water rafting, the very first thing that happens when
you go on a white water rafting trip or
start an excursion, and that’s you get
the proper equipment. And so, when you go white water rafting,
they don’t want you to die. Because that would be very bad
for the press. They give you these things,
personal flotation devices, you come up to service level. A
helmet to protect your head, a paddle to move along. Bailing buckets so when you
start to go under water in the boat, you can get rid of that
and they give you a guide. I started with the table of trying
to find equivalent things in the
management world that I would need. What tools is it that I
would focus on? Things like task tracking software. How many
people work out of a ticketing system for their work via
Trello, Atlassian, Jira, any of the other numbers, pivotal
tracker? Almost everybody in the room. How many people use
one of those just to manage what they’re doing in their
day-to-day lives? A couple. Maybe 10 or so in the room. So, one of the things that I did
as a manager as I was first getting
started is I actually made a new task tracking board for myself.
And I started putting everything in it and ranking it with
priorities. As a manager, you’ll find that people like to throw
things at you every which direction. You might be walking
to go get a snack from the break room. You might be just trying to take
five minutes outside to collect your
thoughts and passed two people on the stairwell, each of which
has something they want you to do. Managing it from any phone or at
my desk or shooting an email to
create tickets. It helps me prioritize accordingly. Then I
got into the world that comes from my boss’ boss’ boss, also
known as the CEO. Which is everything has to start
with a spreadsheet. Doesn’t matter what you’re trying to do,
there should be a spreadsheet to track that information. And so,
I took all the information about my team and I put them in a
spreadsheet. Yes, we had a HR system, it had
bells and whistles and whiz-bangs and
it was awful to navigate. And so, I transferred that into
a spreadsheet with everybody’s name, what their strengths are.
With they might need some help or things that might not be good
for them. Puts their salary information there since I’m
responsible for making sure that these people get paid, or
paid by more year-over-year. So, I have all of that information
together and it’s much easier to access. And thanks to the
miracle that is Google sheathe can Sheets, I
can read that, or on Sunday flying home
from WordCamp, I can pull that up and reference it for
everybody on my team. third, I realized that I didn’t
have access to all the things I was responsible for. As part of
the receiving the questions for these people, hey, we need to do
this in this one website. I don’t know how to log in. I
don’t have credentials. I was focused on that other website
over there. And now you’re asking me if I can go look at
something. Or even better, it’s not a developer who is coming to
me. I’m having a project manager
come to me because they’re concerned with the way something
looks and them me to take look at it before they push back on
the developers they’re working with. There are a number of different
password management tools out there. One that I would look for
it let’s you share easily with each other. Last Pass is
popular. I used it for a while. We have since switched to
1Password which I think is nicer. Whether I’m on my phone,
on my computer, on more Xbox at home, I can still get to the
pass words they need. The fourth one out list is the
one that I didn’t really think I needed
until I needed it. And it’s the one that nobody will ever invest
time in despite how much I talk about it and despite me giving
you this warning. And that’s what I call escalation
playbooks. Been a manager now for three and a half, four
years. And over that time things have
gone wrong. Client sites have gone down. People from my development team
have gotten sick or told me they’re
sick at inopportune times. Or just it’s a holiday and the
company is closed. But that client who was allowed to enter HTML into their website
managed to introduce a cross-site scripting
vulnerability or some other problem as they copy-pasted from
one site to the next. And after a couple of times of trying to figure out what to do and
think on the fly while I’m in Disney
World sitting down to dinner with my family and my phone’s
blowing up because I need to have this addressed, my boss
and mentor at the time said, I’ve told you to write things
down before. Why haven’t you made an
escalation playbook? And that got me back into the spreadsheet
world and I created a task in my task tracking software to
put all of this together. And over the past three years, four years, it’s become fairly robust
in how to deal with situations when
they go wrong. And it’s not something I really share. I
don’t even think anybody on my team has seen my part of it. Because it includes notes to me
about when should I get involved? As a manager, you
have all these different things coming your direction. And just
because something is on fire doesn’t mean you’re the one who
has to through a bucket of water on it. You also shouldn’t pour
gasoline on it. But sometimes you have to let people on your
team do things. And so, I include notes to
myself about different situations. People are asking, Brian, how do
you classify whether you should get involved or not? And I’m reminded of a saying
when I was I was taking leadership
training in high school. If somebody comes to you and asks
where do they find the cups in the office to be able to get a
cup of coffee in the morning, as a manager, that’s not
necessarily a question I need to answer. I’m better off directing
them to somebody else. If somebody comes to me
and instead of asking for cups, they’re asking where the band
aids are because somebody just sliced their finger off while
they were trying to cut a bagel for
breakfast, that’s a situation to get involved in. And figuring it
out and equating it to technology, client site being
down I need to be more aware of. Client is upset because the
content on their website is wrong and they haven’t figured
out how to go into the WordPress panel and change it despite
three or four trainings. Or 30 or 40. I don’t necessarily need
to get involved in that. But that said, we do include in
our work escalation playbooks that I think will apply to all of you that we
summary with everybody else on the team and is right there for
people. And they answer questions like, what happens when your client site
goes down? Or more importantly, what
happens when the developer working on the project goes on
vacation and I don’t want to call them? Or what happens when
I’m on vacation and it’s a site that I’ve
actually built? And that manifests itself as the
README. How many people change the README that ships with their
WordPress websites? Not very many people. We’re talking maybe four or
five, especially if I include my team who should have their hands
up. So, when we get into website
development, we instituted a rule that every site has to have
a README. So, that when there’s a fire and you’re on vacation,
or the developer working on it is on vacation, we have the
information we need to be able to help. As a manager, I can get
involved in help, another developer can get involved. Or
even if I just need to put another developer on the
project. If I take into that big long
README and I start to zoom into it some, you can see that it
includes things like the site name. And while I’ve edited out of
this screenshot because I took a screenshot of it from our actual source
control repository, it also includes a description as to
what the site is. And why a client has hired us to
build it for them. What do they see as the priorities? It includes things like how to
set this up to run locally if I need to get it running on my
laptop. What are all of the different steps? Is it more
complex than just pulling the code down and adding a database
to it? Do I need to change certain configuration set settings? Is there an additional service
that it integrates with that I need worry about? If I’m not developing locally,
what are the other environments? If I need to look at the staging
or development website, what are the links to them? How do I
find them? How can I get there? And most importantly to me, how
do I ship changes to that customer’s website? There are a
number of times where I have been pulled into a fire.
Developer has been on vacation. I got involved. I have a fix. It
was two lines. Not that big a deal. Took me, eh, 30 minutes or so to
get there. And I then spend the next hour and a half trying to
figure out how to actually fix the client’s live site and ship
this code to them because I don’t know how to get that code
to their production server. And even if you’re using one of the hosting providers that managings
all of that for you and you’re to the using a cloud server,
there’s still a process. How do we have access to it? Do I need
to be using a particular account because the client gave access
to just one account? We also list out every single integration that a website has.
So, if the client is complaining about their contact form giving
an error, I can actually look at that, or anybody on the team can
look at that and say, well, this site is integrated with HubSpot.
And all the form submissions are going there. Is HubSpot down?
They’re down in the sponsor area, I’m sure that would never
happen to their system. Their status page might say otherwise.
But figuring out what those different pieces are. And on top
that have, we might even link to further documentation. I know
it’s small on the screen. But in the theme section, we actually
point out that there’s additional documentation for the
WordPress theme that we built in the specific
theme directory. Things like how do I compile the SaaS files down to CSS? Are there
other steps that I need to take? And this goes on and on and on
and on. And it seems cumbersome to write
and seems like it’s going to be very
time consuming. But if you start making a habit
of it, you start to get into a lot of copy and paste between
things and you have a template. And alternately, would you
rather spend 30 minutes now, or 30 minutes
while the client is yelling at you that
there’s a problem with their website? On top of that, as a
manager, you get into these situations where everybody’s got
their paddle out of the water. Except for the guide in the
back. That’s the boss. Because he’s the manager. And he understands that going
with the flow can actually be
semi-dangerous. When they — when you go white
water rafting and you’re getting the briefing before you
actually put your boat in the water, they tell you that you
either need to go faster than the
water, or you need to go slower than the water. But you should
never go at the same speed of the actual water. If you’re on
your boat and you’re going at the same speed the water is
going, then the water is in control and
you are not. and the same thing goes for
mangling. In some cases, you need to be
faster than your projects or your people. You need to be
ahead of them, figuring things out. In other cases, you need to go
slower. You’re saying, Brian, I’m the manager. Why should I be going slower
than anybody else? That’s because you need to give other
people the chance to solve problems. You’re not going to
be able to solve all of them. I might not know specifically
how to integrate B hat testing with my
WordPress website. I could go faster and figure that out. Or I
could go slower and let somebody from my team have that
opportunity to be the expert on it. By going slower and letting them
be the expert, I now save myself in the future from having all
the questions come to me. I can pass those questions to
someone else. But no matter what you do, don’t
go at the same speed of your projects or your people. When
you go at the same speed of your projects and your people, you’re
at the same level of your developers. You’re at the same
level of everybody else. And they will take you along for the ride instead of you being in
control. So, it was fun finding all these
white water rafting pictures as I went along. You’ll notice that
this boat is kind of sideways as it goes down the water.
Sometimes that might be considered a problem. It’s always fun to go white
water rafting with new people. This would be the point when
panic is setting in the boat and people are trying to do their
own thing to get things circled around so that they’re pointed in the right direction.
As a manager, we have to get very comfortable with not also
being pointed straight downstream. Going forward is
good. It’s actually quite great. But as a manager, you’ll find
that going backwards is actually
quite common. Things won’t be smooth. You won’t be able to see
where you’re going. And you’re gonna have to sort of go into things as you back yourself
into it. I always shoot for going into
something side waist. I’m willing to go in sideways
knowing most, but not everything. Some situations I do walk into
with a plan. Most situations I walk into
knowing what the problem is and having
some ideas, but not fully having fleshed out that solution. There
is one key to all of this, though. Even if you’re going in
sideways or you’re going into a situation backwards, always make
sure you’re looking in the direction you want to go. So, as
people are coming to you and you’re trying to solve problems,
keep your eye on where you want to be
at the end six months, a year down the road. Making sure that you’re working
that direction. Now, in addition to not always
going forward, there are also sometimes some big rocks in the
way. This is actually a giant rock as you go white water
rafting. And that’s okay. As a manager, we can’t be afraid
to do what we call in the white water rafting industry a bump.
Now, when you go white water rafting, they tell you as you come into
this rock, instinct will take over and everyone will try and
stay far away from it. As developers, we’re like,
oooo… that’s scary over there were
let’s stay away from that. Let’s not deal with that problem right
now. That’s a big rock. Let’s stay away. For those that have
gone white water rafting before, many of you have
learned as you scramble to get away from the rock, the rock
then flips your boat upside down. Now you’re out of the boat
and you have a problem. Instead what they tell you to do is to
actually lean into the hazard. And so, as you encounter
scenarios and you have those big rocks in the development and
management world, lean into them so that you can bounce
off instead of letting them flip you
upside down. Trying to shy away from something or hide from it is only a problem
in the future. And might become a very quick
future. Even with all of this as a
manager, that would be you in the very back with the boat with the white helmet
on. Trying to give direction. How many people have been in a
situation before where only half the boat has had to paddle while
they white water raft? That’s a great feeling when you’re on the
other side and you’re just sitting along for the ride and
everybody else is going forward. As managers, you have to figure
out when only certain people need to
paddle. And by that, I mean, when some
people need to work harder and some
people can coast a little bit. I think one of the big challenges
I face as a manager in the agency world, many of you might face, is you
have that big project and it launches. Being able to let the
developers on that project coast just a
little bit before they jump into the next one. It doesn’t always
work. But having some people and knowing when some things need to
push hard and when some things — it’s okay to let us take a rest and a breather for a
moment and let people collect their
thoughts and come together and have some personal time. This is my favorite white water
rafting picture. You’ll notice there are feet near the top of
the picture. That’s not because I flipped it around. This was
the correct orientation. There are a number of people who are
currently have thundershower heads under water and their feet
above water. That’s never good when you’re white water rafting.
Luckily they have helmets on. As a manager, or when you’re
white water rafting and your boat flips over, you have to
deal with adversity. As a manager, it’s one of the
most difficult things to deal with. Because things won’t
always go well. Despite everything I’ve told you thus far in all of my escalation
playbooks and my Jira project and my
spreadsheets and my mentor and my boss and everything else, things still go wrong. And you’re gonna have some bad
days and you’re gonna have days where you
go home and you’re like, well, that was awful. I don’t want to
do that again. And every time that happens,
it’s always important to bounce back up. What happened yesterday
hopefully won’t happen tomorrow. It’s a new day. And you’ll be doing something
different. Similarly, when you’re white
water rafting, sometimes you get thrown out of the boat. And the
one thing they tell you when you get thrown out of the boat
and you start floating is always keep
your feet pointed downstream. Don’t lead with your head.
Because hitting your head on a rock would be painful. Lead with
your feet. Keep your feet together and just
ride it out as you go along. Everybody’s first instinct as
soon as they get out of the boat and they get their feet pointed
the right direction is to jump back in the boat. Despite the
fact that we’re going through class 4 Rapids and the
boat is about to flip upside down. They want us to stop.
Recognize that you can’t always get back to the comfort of the
raft right away. If things are going wrong, tomorrow is a new
day. It will certainly be different than the day before. It might not be perfect. But
keep yourself pointed in the right direction so that you can
get back in the raft once things calm down. On top of all of that, we have
what every manager loves at the very,
very best. Saying no. It’s like when you’re white water rafting
boat decides they want to go down the 30-foot water
fallfall. That picture is also oriented the correct way. You’ll notice that the boat is
pointed straight down. This is a big thing for people
in white water rafting to do, they travel around the world to
30-foot waterfalls to go face-first into the water. And
sometimes that just seems like such a bad idea. And so, you
have to say no. As a manager, saying no is
painful. We don’t like doing it. And so, the first thing is to
always give a reason. The team that I manage, my
development team, can actually tell when I’m jokingly they
willing them no. Because I’ll tell them no and
then just walk away. Without giving a reason. But it goes over much
differently if I say, no, we can’t do that right now because,
X, Y or Z. It also helps them understand. On top that have, don’t
apologize. Saying sorry as you’re telling
them know just diminished the impact
of your answer. More so than keeping you in control and being
in charge. You don’t always have to have
them like your decision. They don’t have to agree with it. But
it’s your decision to make. There’s no need to apologize for
it. On top of that, provide
feedback. Why am I getting this question in the first place? Is there something that I can
educate them around? Maybe as a manager, you’re in
charge of compensation for your team. And somebody comes to you
asking for a raise. If I put all of these in
practice so far, I say no. I don’t think your performance is
that great. Or the budget right now doesn’t allow for us to give outraces out
raises. We’re trying to collect our nuts, as my boss likes to
say. And then I provide feedback. I think you could do
better jobs here or there to change that answer. Or I could
provide feedback around, oh, no, the way our compensation
strategy works is we only give out raises
in June. Let’s have this conversation then. Here are the
things to focus on as we lead up to that time so that you
can set yourself up for success then. On top of all that have, I also
like to try and cut these questions off before I get them
and making sure that information is front and center for people.
Somebody’s asking me, hey. Can we use this new hosting
provideer? I’ve already set the boundaries and the expectations that, as an
agency, we host all of our websites on Pantheon and that is
the norm. That’s where everything lives. But most importantly of all,
while this might seem very desire, and serve like, I would
like to get back to writing my code now. I never want to deal
with people. What you should remember is that despite how bad
it seems, have fun with what you’re doing. And see the
positive sides of everything. Put a smile on your face even
though water is crashing over the boat. Everyone in the
picture is smiling. They’re dripping wet. Looks pretty cold in the picture
of those people white water rafting. But everybody is happy.
And everybody is having a good time. Even if in the moment they might
think they’re not. With that I’ll open the floor up for
questions. I think a couple of people have
mics that they’ll run around. So, if you want to raise your
hand. We’ve got at least one here and one back there that I can see. Maybe. We’ll come back to you. Yes,
sir? AUDIENCE: Hello?
BRIAN: Hello. AUDIENCE: Yes, hi. I was
wondering, you said you start off with a spreadsheet to
prioritize and list all of your tasks. I was wondering what is
your process of going from the spreadsheet to assigning the
task and make sure it’s complete and make sure the team know what is they’re supposed to be
doing. What the priorities are, there’s a lot going on there.
BRIAN: Most definitely. And there’s definitely a lot of
pieces moving back and forth. So, the first part of it is is
that I try not to get involved too much in the day to day-to-day tasking of the
team. And so, while I might have
access to everything that’s listed for them, their
priorities I let the project management team and the
developers under me at my lead developers handle. Personally, what I do for my
tracking is I try and classify things
into what’s been talking talked about before
as something that is urgent, something that is important, or
something that is both. And figuring out which of those
bubble to the top. So, at the start of my day each
morning, I look at my list what have I would consider top ten
things and I look to classify them. How many of them need to
get done right away? And how many of them are important? And then I try and spend my time
on those that are both. Some things that might be urgent
aren’t necessarily important. Things like refilling the sack
container. It’s empty. It’s urgent they refill it. But it’s
not important. And so, therefore it gets deprioritized lately. On the flipside, something that
is important would be booking my
travel accommodations for WordCamp 2020. Not urgent in the
slightest. So, while it’s important to get that done so that I get the best
rates and I can pick the cheapest flights and so forth,
it’s not urgent to do right now. And so, where those intersect of
things that are urgent and things that are important. Addressing an issue with a
client site that I have somebody on my team working on, but I need to make sure it
gets out of the door today because the client has a big
press conference about it. That’s how I focus my time.
AUDIENCE: Hello. I’m Colin Hughes. I’m a manager of a small product
team at Oracle. BRIAN: Hi.
AUDIENCE: Hey. One of the biggest challenges from me when
I moved from an individual contributor to a manager was
assuming the role of a mentor and a coach. I imagine that challenge was
harder for you going from a single person to the owner of a
team of 35 or so people. How do you establish meaningful
touchpoints with that many people?
BRIAN: Fabulous question. How do I establish meaningful
touchpoints and how do I mentor and guide them? So, the first part of it is I
try and do more walk arounds and just make myself available. For
a while when I first started I had this mindset that I was
going to be this awesome manager and I was going meet with
everybody on my team every week. For 15 minutes. And when you try and schedule
15-min one-on-ones with 35 people,
there just went my Monday and Tuesday. And half of Wednesday. And so, I scaled back from that.
And adjusted it so I met every other week. And then I also put
a couple other people and Divvied them up so that not all
35 of them were coming to me directly for more mentorship and
day-to-day guidance. The other half of that is I try very hard to separate being a mentor
versus being a manager. And so, it is my belief that
mentor mentor/mentee relationship happens outside of
management. I have to want to be a mentor to
somebody. They have to want me to be their mentor. And so, for
all of the people on my team, I might give guidance to them, or
I might give direction. But that’s different from mentoring
them in the sense of let me sit down with you and see what your
problem is and help you work towards a solution. It’s more of a, here’s the
things that need to get done. Or here’s the things you should
focus on. And you should talk to so and so because they’re a
experts and they’re gonna be able to give you direction
there. And sort of balancing how much I
go into with each person. There’s certainly a subset. So, I am official lit director.
The level underneath me, we call lead software engineers. Those people I tend to spend
more time with because they’re the people interfacing with the
rest of the development team on the day-to-day regular basis on
projects. Other questions? AUDIENCE: You mentioned
different tools that you were using — or
different tools. My question is with client or service business
that we are in, a lot of clients push the tools that they prefer
to use or works good for them. And there are just so many
different tool. And different — and sometimes I
feel that we are not being efficient. And I was curious if
you’ve found some tools which are more efficient or something
that has worked better for you in that agency business that
you’re in? BRIAN: Yeah. Definitely. So, from a tooling perspective,
we’re fairly heavy users in the agency world of Atlassian.
Confluence plus Jira. On top of that, we use Jira
Service can have Desk so they can send
requests by email via the tools. And internally, we use Slack. We
do have clients who like us to use their tools instead. I have a client right now who is
a big Microsoft Teams fan. So, if I were to exit out of my presentation here and look on my
laptop, you would see that I have both Slack and Microsoft Teams open so that if
this were a weekday, we could chat
back and forth. But to counteract that and combat that,
I try to have the conversations with the sales team and with our
potential clients if possible about the value of letting us operate in the way
that we do with the tools that we know. If you want us to use VSTS or
Azure DevOps as a code repository, we could. It’s just
not the workflow that we’re normally accustomed to doing.
And therefore, things could make more time as we use those additional
tools. And having those conversations up front and
makeing sure they’re aware of the tradeoffs tradeoffs have
sometimes caused them to say, you can just
use your stuff. We’ll agree to use yours because
you’re a very small piece and we want to get this out the door.
AUDIENCE: Hi, sorry, right up here. I have been a manager for
about a year. And kind of we went through a chaotic situation
where we went from outsourcing everything to having in-house
developers. And in the process of that, we made just some basic
mistakes have been happening. And I’m just wondering — like,
I want to apologize for those as the leader. I should have caught
them in review and so forth. But my team wants to also
personally apologize and feel responsible for them. And I
don’t want them to do that because I don’t think it’s their
fault. Buts I also don’t want to take away their agency there.
Any thoughts on that? BRIAN: So, I always tell the
people that I work with that all of the
victories that happen are because the team did a good job.
All the failures or problems are because I screwed up. And I’m happy to get on the
phone with clients or have those conversations and be the one who takes the brunt
of that. Internally, we will reconcile amongst ourselves. We
will have that conversation. We will work as a group of
coworkers to have accountability and discuss how we’re gonna
prevent it in the future. But outwardly-facing, I try very
hard to make sure everybody is aware and be the face of it if
there’s a problem. AUDIENCE: Hi, Brian.
BRIAN: Hi, Steve. AUDIENCE: So, those of us who
work in an agency know that things get pretty crazy, they
can get hectic. What strategies do you use to, you know, just
not burn out and maintain a nice work-life balance?
BRIAN: That’s a good question. Life is always a bit hectic. And keeping that balance is
tricky. One of the big things that I try
and do is carve out time every day to go for a walk. I’m
fortunate enough to work in an area where we have a couple
blocks of park down the street where I can go to. And if I have
20 minutes or 30 minutes on my calendar, I figured out the
exact path I can walk down the park in
a circle, walk past the dog park
and walk back in the office 28 minutes
later, two minutes to go. That’s my opportunity to clear my head
and come back around to things. The other side is as a manager,
I’ve gotten good at compartmentalizing. At home on
the weekend or at night, take and shut those work
thoughts out and focus on what it is that I’m doing. For any managers that are
struggling to compartmentalize, I would recommend buying a
house. That takes a lot of time and
makes you compartmentalize. That was part of my solution. I made
a large investment in a house to have to focus time. But compartmentalizing and
keeping things separated and put work away as much as you can
when you’re in the tech world. That’s not to say I won’t deal
with something at night if there’s an emergency, or if
someone gets a hold of me. But it’s not my focus of living
day-to-day. I focus outside of that. Another question way in
the back. You have the mic over there. AUDIENCE: Yeah, I was curious
how you adapted to dealing with the people side, not programming
and people and things. But what do you do if there’s conflicts
within the team? Or getting involved. Or if people have
career aspirations to leave the team and it’s growing. You
didn’t always have this great group of developers and things. How do you deal with that sort
of stuff? BRIAN: Sure. Definitely. As a
manager, about a year and a half ago or so, I took the
HR-prescribed performance review system and I threw it out the
window. And I made my own. Where I talked with each of the people
on the team and I had them do some prep work around what is it
they wanted to do. And then once I heard what they were
interested in doing, we had a conversation around how that
would fit in with what we’re doing currently as a company,
what the roadmap for the company looked like, or if it
didn’t fit with the company at all. And having those
conversations with people allowed us to almost
build tighter bonds as a
manager/employee. Because they started to realize that I was invested in them as a
person versus invested in the business. Ultimately, as a
manager, yes, I’m accountable to the business and there are
things that I need to do for the business and I need my team to
do. But as having that closer
relationship with people, it’s allowed for
better resolution to conflicts when they come up. Because they
realize they care about each of them. And even though I’m siding
against them and I’m siding with somebody else, there’s a reason and rationale
for it. All of that said, I think I was a bit more tricky
when I got moved into a management position. Because I got put in a position
managing a team I had been working with. Many of whom I considered
friends who I played video games with at night and that led to fun conversations
around, you’re my friend. You’re friendly. That was a stupid
idea. You can’t do that. And being able to separate that and
getting them to acknowledge, that this is me telling you as
your boss, you can’t do this. We’re gonna go play video games
whether we get out of here after happy
hour. AUDIENCE: You spoke a little bit
about how you prevent burn out personally as a manager. How do you prevent it in your
staff? BRIAN: Preventing burn out in
staff is definitely a challenge. I haven’t fully solved it. I get
better at it the more people work with me because I get to
know them better and I get to know their
personality and how they react to things. One of the things
that I always say to people is that if you need time
off, let’s have that conversation. If you need to get
away. And being able to give people that variation and get them help on a
project, bring somebody else into a project, or being able to
swap people around on projects has served me
there. Clients don’t always like it when I swap developers on
their projects. But then when I have the conversation with a
client of, well, so and so is really burnt out, we have to
bring somebody else in. They’re like, well, I just need the
project finished. I’m like, what happens if this developer
leaves? What’s the alternative? And even when I work — talk
with my boss or the project managers about giving somebody
time off because they’re being burn burnt out or they’re
always burnt out. The conversation always burns down
to, if we push them now and they are totally burnt out, then
they’re gone for good. And I would rather keep them
around. I would rather give them the
time now and deal with the short-term problem versus having
a long-term problem. AUDIENCE: So, along the lines of
being friends with the people that you’re leading, do you have
like specific boundaries that you have in place to make sure you’re being an
effective leader and not just a pal?
BRIAN: Yes. So, I refuse to talk about
friend stuff in the work Slack. We have separate like friend
Slacks set up. And I’m happy so far those conversation there is. But the — I try and keep the
friendly stuff to a minimum in all of the different work
channels. And the most I will try and talk about is
coordinating a time for something if we’re having lunch
together in the break room together. But otherwise I try and keep
those conversations completely separate. All right. I think
that’s everyone. So, lunch is downstairs. Thank you so much
for coming. [ Applause ]

Leave a Reply

Your email address will not be published. Required fields are marked *