The last time I was in ‘The Crossroads of the West’ it as over 60 degrees and sunny the whole time. I was told by all the locals that this would have been the case again this year if my travels would have taken me there a week prior to my arrival. Instead I was met with highs below freezing and bitter cold wind that reminded me why I live in San Francisco’s eternal fall. It really didn’t matter what the weather outside was doing because inside The Falls Event Center the glow of the WordPress developer community was warm enough to keep us all toasty warm as we gathered for LoopConf 2018.
Food and Fun
Training Day
The set up crew for the Falls Center forgot to percolate a cauldron of coffee for our training class. This was soon remedied before too much dozing off had occurred. Lunchtime brought salads and sandwiches of all sorts. Due to a registration miscommunication, 100% on my end, I ended up getting some salad from the nearby Whole Foods situated on the opposite side of Trolly Square.
There was a speaker dinner that first evening, but since I was not a speaker at this year’s conference I had to make other plans. Very glad I did, as I was able to assemble a few other attendees to get some plant based grub at the simply fantastic Boltcutter. We capped the night off with what has become a traditional visit to the largest collection of whiskeys in the whole state of Utah, Whiskey Street.
#loopconf plant based dinner fun at Boltcutter. @ifyouwillit @CroixHaug @populist pic.twitter.com/PLGQBR2jfz
— Dwayne McDaniel (@McDwayne) February 22, 2018
Day one
We were greeted by a full breakfast spread on Thursday, the first full day of sessions. Everything from yogurt and toppings to eggs and bacon. For me, the best part were these sugared cinnamon toast crisps. Coffee was pretty OK. As a single session track event the snack breaks were well timed and thought out. The morning snack spread had candy and nuts and fruit leather and many other snack goodies.
Day one lunch meant taco bar time! I love a build your own taco lunch. No matter what you dietary preference, there is always a way to accommodate everyone with a taco bar. Black beans, pinto beans, rice and salsa can fuel me any day and I had a heaping helping with the awesome hand made tortillas from Cafe Rio. There was an afternoon snack break as well with iced fudge bars and even more candy abounding.
The lunch at #loopconf is bomb. Build your own tacos from a local spot – Cafe Rio. 🤤 pic.twitter.com/4SQcIp94Z8
— Evan Herman (@EvanMHerman) February 22, 2018
After Party
The festivities were planned for the first night of sessions at LoopConf and was a repeat of the best parts of last year’s event; Board games, Burgers and Beer! The burgers came with choice toppings, fries and frosty milkshakes. They were even nice enough to make veggie burgers on request. Very good eats. The games kicked off early and there were still people playing as they were starting to clean up the room. I got to play the Catan Dice Game, thanks to Mike Demo which is faster paced and I think I prefer it to regular Catan. But I think my favorite find of the night was Ooga Booga which is a nonsense phrase building and memory game. As silly as it is fun, I now have a small group of people I will be greeting with “Ooga booga, ha!’ next time I see them.
Disney Codenames is an intense game. #loopconf pic.twitter.com/9kEvkYVFfi
— Evan Herman (@EvanMHerman) February 23, 2018
WCKaraoke
My quest for the best Karaoke spot that is also close to the hotels is always a challenge and when I found a place in walking distance that was a ‘karaoke lounge inside a dance club’ I thought it would be perfect. Area 51 turned out to be a goth club where the interesting counterculture of SLC gather. Fortunately their staff was good humored and welcomed us ‘normals’ in. Due to the fact it was Thursday, fairly early when we got there and there was a snow storm happening outside we had complete run of the place, so we got to sing many, many songs. Truly a success by any standard of WCKaraoke measure.
@twigpress @brianhogg @WCKaraoke #loopconf #wckaraoke pic.twitter.com/qmhMqhq5WK
— Chris Wales (@chriswales7) February 23, 2018
Day two
The breakfast spread was a tad fancier on the second day as small breakfast tacos with all manor of filling greeted us all.
Don't fear the snow #loopconf friends, the rewards are great pic.twitter.com/UxWjOHV5AS
— Dwayne McDaniel (@McDwayne) February 23, 2018
Snack time meant donut time! It would not be an exaggeration to say you could easily gain five or more pounds at LoopConf if you were not diligent on watching your caloric intake. I rarely feel this temped or well fed at any event I attend.
I'm sorry to all of you remote #LoopConf viewers, but ya'll are seriously missing out on these choice donuts (thanks @dreamhost) and the wonderful snowy atmosphere. pic.twitter.com/2Bq20jvU3i
— Steve Rudolfi (@SteveRudolfi) February 23, 2018
Lunch time brought us salads and sandwiches, identical to the offerings on training day. This time I got served and it was delicious.
Lunch is served and it was great at #LoopConf day 2 pic.twitter.com/Zj12ZWmzeX
— Dwayne McDaniel (@McDwayne) February 23, 2018
After LoopConf Fun
Once the last session wrapped up we were on our own to make our own parties happen. I teamed up with the always on top of it Mike Demo to gather people for some Topgolf fun! If you have never been, this is basically a driving range with RFID enabled balls that automatically keep score for you. All the needed clubs are provided and the staff makes sure that the drinks keep flowing. Though cold and a bit snowy at the start we had a marvelous time. It was a pretty fantastic way to cap off a pretty fantastic event!
The #LoopConf people @Topgolf pic.twitter.com/DeoQJX8YF0
— Mike Demo (@mpmike) February 24, 2018
Sessions
Training Day
WORKSHOP: AUTOMATING WORDPRESS UPDATES
Andrew Taylor
Matt Cheney
I was very fortunate this year to get to assist during training day. Working with Andrew and Matt is one of the highlights of my work life. Getting to help out with testing and unsticking folks in the room who ran into issues going through the exercises was a very interesting set of challenges. Everything from misspellings to too old and un-updatable versions of Node the errors were interesting and all over the place. It reminds me of the old Tolstoy quote “Happy families are all alike; every unhappy family is unhappy in its own way.”
If you were not able to get to the event but still want to dip your toes into the water of automating all the WP updates, you can check out Andrew Taylor’s Github repo.
The Wednesday Workshop is underway! Huge thanks to @getpantheon for making it possible! #loopconf pic.twitter.com/P2GUAb2xIZ
— LoopConf (@loopconf) February 21, 2018
DEVELOPING ON THE FRONT-END: CHROME DEVELOPER TOOLS
Shawn Hooper
Every time Shawn takes the stage I learn at least one new interesting thing. This time out was no exception. It was literally all the things you wish someone would sit you down and explain about Chrome dev tools beyond ‘inspect element.’ I did my best to keep up with the notes, but he moved at epic speed and I am sure I dropped some of what he presented on the ground. There wasn’t any single ‘OMG my life has changed forever’ moment but there were dozens of ‘oh man, I wish I had known that before’ moments. The Chrome team has continued to evolve this treasure chest of developer tools and now I am much more aware of some of the areas I need to drill into on my own educational path.
Raw Notes:
We viewed code
then xdebug
now sites have code running in browser
what do we do?
Chrome DevTools
a pile of new and great features
How to access:
Dev menu
Right Click and inspect
Command-Option-i
The Console allows you to view warnings and error messages
flips to Live Demo
Outputting from console.log()
there are other things this can do like
errors, messages All put out in different colors
Escalate types of messages to the console
Shows number of errors at where thrown, not same error multiple times
Displaying arrays, neat to do
but you can also console.table, puts arrays in tabular MUCH easier to read form, with original output below
Group collapse, upon refresh auto collapsed
Console lets you run a timer as well
console.time() name the thing, you can have multiple
timer.end will show you when the event ended
Option in the gear menu to preserve log
saves things between page navs and refreshes,
console log says in place and appends things to the bottom
Elements Tab:
this tab allows to interact with Dom
Modify CSS and Content
Quickly make modifications experimentally and see exact results
Break when any element is modified, set break point
Not only on the JS code itself, Also on the Dom
Modify CSS
Modify color by pallet
you can preset pallets
Hold down shift and click on color to give you same value in different formats
blue, hex,
Event listeners
shows where this lives
takes you to JS itself when click on sub-links
Accessibility
Role, show alert, shows attributes that accessible tech relies on
You can force state, hover for instance on links
Sources:
view all of the JS and HTML
handy thing, CMD-P search by filename
much faster than going through other routes of subdirectories
Opt-cmd-f
full search for source code embedded,
Under file system tab, add folder to a work profile space
link all the code from browser to the file system highlighting it
Changes saved to local file automatically and instantly
Also you can create breakpoints
this is equivalent to why most people us Xdebug
if trying to find elements on a page, shortcuts exist
look at $ returns elements
$$ returns first instance and all at same time
native, independent to JQuery
Network
Spending more and more time here
See broken assets very quickly
see stalled and
See what is waiting FTFB vs what is taking a while to run
Crome does not auto cache, you can turn it on if you need
as you navigate from page to page, network output stays put
clicking on an item gives you additional things
Headers, Status Code, Remote address and request headers
calling post endpoints
right click on the call and replay XHR
it will run it again and again without having to trigger the call via form or something
copy data uri from any image from here
See various connection option to test different devices
Throttling
from Network can mod speeds to test as well
Application
Can manage cookies very easily, see what is being set
can add new cookies right away
delete cookies and refresh page
Sensors menu
that shows if working rotation, accelerometer
geolocation overwriting
Alerting
Render menu
emulation of various modes
print mode vs display very quick way of working with alternate views
built in auditing exists, built in Lighthouse! FTW!!!
.@ShawnHooper is giving a live-demo master class in advanced Chrome Developer Tools debugging at #LoopConf pic.twitter.com/pHtXFEpFT0
— K. Adam White (@kadamwhite) February 22, 2018
THE BALANCING ACT OF CACHING IN WORDPRESS
Maura Teal
Caching is both a panacea and a Pandora’s Box for performance. If you leverage it correctly your visitors will have the best experience possible. But if you don’t take into consideration all the ‘gotchas’ then you are going to cause some serious issues and unnecessary alerts for your end users. I was very happy that the last point she left us with was, at the end of the day though, no matter how many layers of caching you put in, you still have to write performant code.
Raw Notes:
Caching = data we have given an expiration date to
aslo cache lear events are real
so need to plan for the data to be there or now
want to speed up your site
full page caching
It is a quick win and for basic blogs this is great
authenticated users though, need unique to them content
need to handle caching differently,
also full page caching and constantly refreshing data or live data has own challenges
balance pHP and static assets vs loading in by Ajax
one does not cache all the things all the time
need to focus on different things
Headers, Sidebar widgets, storing rendered data as HTML
Json and remote call result
reusing more flexibly
determine we want to cache
wp cache set
wp cache get
advantage cache groups
expire a whole group but not whole site
Transient API
valid and can wire into object caching
Do we need to cache more?
Dig deep
Performance indicators, speed, CPU and memory use
New Relic is awesome for this
Traffic indicators, specific events (shark tank)
also hour to hour traffic, make sure watching patterns
Watch out for use of external APIs
what if API is down, will that crash site?
Should you cache it?
Browser Cache API
fully front end focused solution
user based applications
is not cross browser compatible, but other options exist
Browser cache is JS api, you can store a lot of things on the end user machine
that is problematic if storing full results
notice that site was asking for large amount of storage on mobile devices example
Cloudflare issues stored improperly same as browser cache
Other lessons
cache warming is real and it takes a while
cache clears mess this up if you are depending on warm caches
could dig yourself a large whole if you are not careful
Understand load testing
knowledge is power
expired is not = to deleted data
transients in WP options table example,
unless there is specific garbage collection the data just sits there
easy to accidentally store things in the DB
cache all you want but you must still write performant code
@mlteal representing #wpaz talking about caching at #loopconf pic.twitter.com/KpSpL8z4MW
— Scott DeLuzio (@scottdeluzio) February 22, 2018
LEADING DIVERSE TEAMS (EVEN WHEN SOME OF THEM ARE STRUGGLING WITH IMPOSTOR SYNDROME)
Chris Lema
Teams need different voices to be heard! If everyone looks the same they are likely to sound the same. We must strive to include people with varying backgrounds and experience in our workforce. The biggest thing I walked away with from this session was the definitions of GAPS, Goals, Assumptions, Parts, and Scope. This is a pretty straightforward way to look at a problem set which forces you to look at the individual parts of the issue, which themselves ultimately make it simpler to solve the overarching issue. This is a great session for any managers who are currently recruiting or will be growing a team moving ahead.
Raw Notes:
For any problem, people will find solutions that leverage their own knowledge and expertise
finance wants new payment terms, marketing wats more clicks, sales wants better leads, etc
if you are all the same will only try to solve issues that same way
$3000 laptops but same company would not buy backpacks and bags
Just get things done, breaking rule, the CEO was shocked the rule existed in first place
some people think acting first and expecting it will work out
others could never dream of such a thing
the more diverse your teams are, the more options and solutions you have
Teams focus on what is going to get done, not how it is going to get done
we assume everyone is on the same page, but that is not always the case
must focus on how as a team
Goals – Objectives and Properties
Assumptions – restrictions
Parts – elements of the problem
Scope – What changes are OK
Representational GAPS
Pull together and have the conversation
if you are only going to look at surface layer fault line you need to drop below
workaholics and life balance people
majority and minority
Majority role is to keep listening
Minority voice has to keep talking until everyone understands that perspective
must think about the way we are thinking based on experiences
we will benefit from opening up a diverse set of solutions
We are all insecure
dealing with insecurity applies to everyone
‘why is that person that way’ comes down to externality and way they have to function on the team, it is driven by insecurity
Talk in private – understand their perspective
Talk all together – huddle up and talk through struggles
Create Stretch Goals – help them grow!
Articulate Roles/Goals – make swim lanes for people
“Dealing with insecurity applies to everyone” #loopconf pic.twitter.com/NThb6SB4kv
— Evan Herman (@EvanMHerman) February 23, 2018
A SOLDIER’S PERSPECTIVE ON MENTAL HEALTH
Scott DeLuzio
No matter who you are or what role you have you will likely hit the hurdle of imposter syndrome or some other mental health concern. You are not alone! I don’t think there can be enough sessions presented on this topic as it is something that affects so many of us. I have never been in military and am glad I have not had the personal loss that Scott has suffered, but I am glad he shared his experiences and mechanisms he has leveraged. The biggest take away from this session was the importance of just listening and having someone to listen when dealing with issues. If you don’t feel like you have anyone to talk with about things bothering you, feel free to reach out to me. Even if we barely know each other or you only know me from my writings, I would still be available to listen if you need a patient ear to bend.
Raw Notes:
Starts with a personal story about the worst day of his life
August 22, 2010
infantry soldier
house searches for insurgents
someone looking for him, which concerned him
bad news, had to be face to face, message from back home
Brother was in an ambush, did not survive
broke down but could not slow down because his unit got attacked and he had to lead
had to suck it up and just deal
hours later flys to main air base, but no one he knew there no one to talk to
couldn’t call home, felt really alone
next day he is escorting his brother’s body home
only had one chance to call home but much later in another country on way back
hometown hero passed away, all the reporters were there asking for information
first thought was ‘screw them’ but then realized they needed the real story
he never really got to grieve
He started realizing events got wiped from his memories
if stress is not dealt with properly your brain will act funny
you might never realize it
Burnout is real
Fatigue
insomnia
forgetfulness
loss of appetite
anxiety and depression
anger and irritability
If you are experiencing this, take a break, seek help
there is no shame in asking for help!
Imposter Syndrome
National Guard === soldier
some people think they are a joke since they are part time
vs active duty are full time
but since had regular jobs and went to school, did other things than soldier
imposter syndrome felt very real
mechanic on board is a great thing in a truck, active duty solders rarely have those skills
he has an accounting degree
never taken a programming class
we all learn to code on our own
Focus on the things that make you unique to be able to do what they do
If able to do the job while incorporating your own unique skills it overcomes imposter syndrome
Helping Others
You’re useless to others if you can’t help yourself
in the service, everyone has first aid kits,
everyone can fix basic injury
can’t help if not safe,
you must put the oxygen mask on first so you don’t pass out when heling others
Failure
I will always place the mission first, I will never accept defeat. I will never quit – part of soldiers creed
we all have a fear of failing
stems from doubt, just means we are afraid to try
What if your plan didn’t work?
Have backup plans, b, c, d…
It’s not failure, it’s a chance to redirect
Don’t give up!
If someone asks for help, don’t be overbearing and command them to do even more things to worry about
be supportive and listen!
Just talking things out helps tremendously
taking it all on by yourself suffering is not realistic
you need to share the burden
the worst idea is to try to go through it alone
Thank you @scottdeluzio for sharing your story at #LoopConf and your perspective on mental health. “The worst idea when you or a loved one is going through something hard is to go it alone,” Take care of yourself and appreciate what makes you unique pic.twitter.com/jNYeMV4YeR
— K. Adam White (@kadamwhite) February 23, 2018
CONQUERING CONTINUOUS INTEGRATION & DEPLOYMENT
Tessa Kriesel
This is not the first time I have seen Tessa talk about this subject and she even gave me a mention recalling the first time she was prepping for delivering this talk way back at WordCamp for Publishers. The initial ask of the audience revealed the truth that most people know what the heck Continuous Integration is, but very few put it into daily practice in spite of the fact they know it is a good idea. One of Tessa’s thoughts on why so many people are in this state revolves around the fact that this stuff gets overwhelming very fast, especially if you try to tackle it all at once. She called for a much more measured approach with many small wins along the way. It is far better to focus in on one small victory and see what improvements that grants before diving in and trying to automate all the dang things. A very solid presentation and one everyone even remotely interested in automation should check out, once the vids are available.
Raw Notes:
about 2/3 of the room knows CI
only about 1/5 use it
she had learned about it some before Pantheon
then she had to learn it deeply when she joined the team
now, a year later she finally feels comfortable with it
She wants us all to get to that point
why is this so important for teams
no matter where you are now, there is a path forward
imagine a new agency,
Rachel starts it up and is only familiar with SFTP
hires dustin, they overwrite each other’s files
bad time
start using Version Control, solved!
New perosn, Alexis, brings in grunt, gulp, sass
David joins and is a stickler for process
makes a wiki and adds slack
adds another member, Lizzie
split into 2 teams and have to strategize communication
then get a very large project
new part time and new contractor
but the contractor is an unknown
they start doing code reviews, using GitHub pull request
then hire Q/A contractor, defines a Q/A process
“There is no single CI and CD process that works for everyone, You are just trying to automate company culture with BASH scripts”
if we are letting automated builds check for errors, we are going to be able to integrate code much faster and better
save time bu automating the mundane things like sending slack messages when x happens
The master has failed more times than the beginner has even tried
You have to fail and you will fail but you will get there
got to keep trying until you get it, worth it
Build Steps: (not sure what is 100% right for you, but these are common ones)
set up containers
install dependencies
Complete task runners
Run automated tests
Behat – quick way to check functionality – if this this, then this should show/happen
Coding Standards
Visual Regressions
Deploy to staging or test
We can make the robots do all this mundane stuff and more
Continuous delivery is getting the code out
Continuous Deployment – auto pushing though a process
What now?
1 Write down steps to creating new project – be very granular
2 highlight problem areas inside your processes that are not right or seem off
3 automate at least one item from step one
4 Automate at least one problem area (this is the hardest one, you need to dig into the problem, see underlying issues)
you can drill into Andrew Taylor’s GitHub repo
Q – on final build process how much time could this save
A – Maybe up to 80%, it is huge and helps a lot
Q – one issue is testing process and spin up to site time adds a lot of time and delay in getting feedback
A – yeah, it takes time but the upside is the automation of getting the details to them in a consistent way
Q – Why does Jenkins make us want to jump into a cold pool
A – It can be super powerful but you have to start from nothing, basically ike building your own CMS, it can be a nightmare but worth it
Q – How do you get buy in from managers who don’t get this
A – this is hard, but researching it and showing how it can save time will be good path, management likes numbers, 40 hours up front saves 100+ hours over the next month, that is a no brainer
CI comes down to automating company culture with bash scripts says @tessak22 at #LoopConf automate all the things! pic.twitter.com/9AbYNURO4r
— Dwayne McDaniel (@McDwayne) February 23, 2018
PROTOTYPING, REFLECTION, AND IDENTITY: UNUSUAL APPLICATIONS OF THE WORDPRESS REST API
Ashley Kolodziej
I am a sucker for a good case study and this talk had two of them, much to my delight. Her ‘why you should listen to me’ part of her intro had jaws dropping around the room and reflected the amazing job the devs and teams working in higher education face on a daily basis. Managing thousands of sites with competing needs and still finding time to do new projects just boggles the mind and I am happy to know people with her caliber of brilliance are taking on these challenges. Her approach of getting real data into a prototype asap should stand as a lesson to us all about the power of leveraging new tools to meet real goals. I hope to hear an updated session about her work on the scheduling app at a future WordPress event.
Raw Notes:
WordPress at Boston University
2707+ WP sites
188 child themes
1 giant MultiSite
one big ol’ framework – that is her
Took her a while before she could understand how the REST API could help
here is how it helped
Lessons learned from Bostonia magazine and using basketball to heal culturally article
Using ritual of the game to deal with issues
somehow she was supposed to translate that to the internet
she drew storyboards
used color cues, audio and other techniques
prompts, supposed to make you think
“One thing that has held you back”
come to a conclusion about what that means
Hard part was how to create a safe space online for this work, online reflections
by the way, in a month under deadline
lot of people are trying to disrupt
felt overwhelms
luckily @desrosj was on the team and stayed calm
“just use REST API for this”
use a custom comment type which gives built in moderation
Ties responses to article, no separate services/databases
separates ‘normal’ comments from response to prompts
makes responses easily accessible to designer to display
Demo time
response from prompt goes to WP admin where moderator moderates
We leave a lot to the robots, but for this sort of thing, can’t rely on them
even a blank answer is valid here for example
What is the best place for reCaptcha anyhow?
need some level of protection, up front it can be a barrier to entry though
also up front, mental reminder that we might potentially release results
don’t want self editing
Final submission and moderation process
reader can opt in and submit responses to share, clear and explained just at end of process
All responses use a rules system to weed out bad words
Human judges if valid content that actually tries to answer the question, then it goes live
REST API gave them
easy access to WP content for designers who code
also Scaffolding for moderating and protecting reader responses
Also, total control over when and how responses are submitted and checked
The ability to bring people together
Second time she got to use REST API was a little more straightforward
Help students plan schedule with complex requirements
course lottery, had to plan multiple backup schedules
could not go ask other student information systems data about the student, out of scope
onus is to put requirements up front for the students to realize
start with some sketched circles and such
Plan and flowchart, lot of logic and boxes
UI required students to understand their own pre-reqs
after some basic wire framing
left side courses right side calendar
but they didn’t have real data to test
wasn’t sure what would be really useful,
answer was to just built the rest of the prototype
Assessing data to Axure prototypes = hard and clumsy
Using JS and the WP REST API talk she saw at WPCampus
Joh Rhea – WPCampus 2017
If you can get WP data using JS, you can do anything
already sing Rest API in project
Worked great, got the JSON and plugged in data and make it easy to get real data
Very nice prototype and instantly see results and filter
Of course had to refine through usability testing
scheduling does work now, a work in progress
Rapid prototyping though made it easier to find flaws and surface issues
Filters and results use real data and are easily updatable
no restrictions to the amount of data you can use
little to no manual data input
good opportunity to pre-vet front end tools used in other projects
SO what? “But I’m not a _____.”
But REST boils down to who you are and your responsibilities
used to mean something different for her than it does today
testing assumptions before building and getting feedback
but ultimately this means you can talk to WP
Learning about the use of WP at Boston University from @ashleykolodziej : over 2k #wordpress sites and counting 😲 #loopconf pic.twitter.com/bx8RycC0wo
— Maura Teal (@mlteal) February 23, 2018
ZEN MODE: DEVELOPING WHILE YOU’RE OFFLINE
John Blackbourn
I, like most of the room, had some serious skepticism about how much you could realistically get done as a dev without the power of google + copy/pasting from stack overflow. Turns out the answer is ‘quite a lot if you prepare for it’. He had the room turn our devices to airplane mode or at least turn off our wifi. I’ll admit this made me nervous. I kept thinking ‘what if I am needed on slack? What if an email needs an immediate reply?’ By the end of the session when I turned my connections back on, I realized that my constantly being online is not really a great way to work all of the time. With enough prep, all my tools and things like documentation will all be present and available. Ultimately any work you do will be more fault tolerant since any service calls reliant on a network to be available will need to be dealt with and not just ‘expected to be working’ in our testing. People need quiet, uninterrupted time to do thoughtful work. Simply turning off wifi is a simpe and effective way to make this happen, but do let your clients and peers know that is your plan, otherwise expect some angry texts and emails when you do reconnect.
Raw Notes:
Sign up for WP-CLI tips
He asked us to go into airplane mode and go offline for the course of this talk
If you have done it:
Welcome to zen mode
Makes some people very uncomfortable
everyone here likely stays connected online all the time
Still need to get stuff done, but going offline he finds relaxing
“I’m going offline for a while to concentrate.”
Let’s get to work
How can we get anything done without wifi?
you need to be prepared – otherwise you can get stuck
1. preparation is everything
right tools
right mindset
Reconnection
First download the internet (don’t do this on your mifi and makes sure you have enough space)
but really, focus on what you are working on
Local environment
Github wiki is all downloadable
down’t have to us the online editor, just pull then push when back online
you can download font libraries locally
Spend time testing dependencies on external hosts before going offline
Is great for figuring how site works if those services go down
improve resilience to network failures for the end users
better user experience as a result
Connect before you disconnect
License checks are a real thing, must check license for Paw for instance, before you can even open it
Open all the apps you need before you go offline
connect and check Google Drive and Dropbox for offline access
email clients, ect
git fetch –all
fetch all the branches on the remote for use locally, one step
Communicate with colleagues and clients
tell them when you are offline, don’t underestimate the importance of this
2. Offline documentation
All of the built in help docs for mac assume you are online, not helpful if offline
Dash for Mac, Zeal for Windows
Docs for many many things that are copied from original sources and auto updates
searchable and integrates with other dev apps
in IDE can highlight function and it pops open right docs around that for instance
Alfred for searching code
awesome alternative to using Google for everything
supports cheat sheets and 3rd party docs, anything on composer site is game
man grep
wp –help
Airplane mode for WP
Stops third party service calls, replaces images with local images
makes a serious performance difference when developing
seeing plugin list in admin offline takes .39s online takes 2.35s in his test
on front end console errors are many from call fails
airplane mode those errors go away, also not awaiting anything, so faster
What if we need those assets?
Mocking not blocking
can do this with local HTTP proxy, return a stored value locally vs online
Charles http proxy
demo
save responses as local file
can get quite granular with paths
You might not immediately think about email you are sending
ideally you want to capture those locally to see they are going out
MailHog does this nicely
email log is a WP plugin, wp-mail capture
also useful for online work too
Mindset
embrace offline,
look forward to it if you embrace it stop fighting bad wifi
being a parent can be more mindful of how focus is spent
change in habits, can look up docs much faster
see the benefits to the end user
more resilient network
wifi off makes the battery last so much longer
wifi radio eats a lot of power
lot of benefits to you
Always be charging, take every chance to make sure top off battery
never know when going to get another chance
Reconnection
likely feel a bit of relief
Avoid the immediate social binge
makes a bad habit of wasting the first minutes online every time
how can you be more productive?
Action points
useful to have notes that remind you of things you need to do online
find problems offline you need to be online to fix, do those first
Backup Plan
what happens when you unexpectedly offline for a long stretch
Write docs!
inline docblocks, stand alone docs, articles, etc
don’t waste tome
non-dev work can be very valuable
realize you don’t always have to be online to bring value
if all else fails, play the chrome dino game
the disconnect.co
new publication you must be offline to read, using new browser tools
all about disconnecting and being offline general interest magazine
Working offline, first key step from @johnbillion #LoopConf (when that fails prepare more selectively) pic.twitter.com/zaUMyZTGfE
— Doug Cone (@nullvariable) February 23, 2018
GLOBAL ADMIN – A DEEPER DIVE INTO MULTINETWORK ORGANIZATION
Felix Arntz
I have never used multinetwork. I am not in a position to ever use multinetwork or even a multisite. But I feel in my current role it is critical to keep up on the use cases and how the core community is tracking these edge but very scale intensive use cases. Felix is a very straightforward presenter but he did go a little quicker pace than I was able to keep up with, so sorry if my notes are spotty below.
Raw Notes:
WP Network multisite
multinetwork is a set of multiple multisites in one setup
ie multiple networks
ie multisite – a singel network
Multinetwork Case Studies
festival producers and promoters
Universities
complex hierarchy with separate owners
WordPress.com
Network
Site Site
But this is incomplete
DB schema
replicating per site same tables
wp_ wp_2_ wp_3_
Global tables
user credentials on WP.org for example are global
Network Utility tables
wp_blogs
_site stores DB information
this schema lets you have multiple networks
all settings will be settings table associates with the network’s ID
Global Scope really only matters when talking about multinetwork
admins in the hierarchy for example
users are not per network
network is the same as global if ou have only one network
WP Core support for Multinetwork
there is available support, the DB supports it
but the code is not super supported
Has wp_network class
lacking support
CUD API for network (R is supported)
No UI
trivial things like user roles that go beyond a single network
other use case specific things you would find lacking
have to hand wire somethings
but there is plugin for it
Multinetwork
get a UI and exposes basic functionality
but still this is basics, just to get started, still need to write your own
If you want to just code this all yourself, there is code on github from other’s projects
Problem: not every network admin should create new networks
goal: Handle this functionality in global scope
how do we do this?
two alternatives
use main network as global scope layer (easy technical solution but conceptually a hack)
Implement missing global functionality (Clean solution, but technical hack)
Washington state has hacked this and it is on Github
WSUWP-Plugin-Multiple-Networks (Github)
vs
wp-global-options (Github)
wp-global-admin (Github)
Disclaimer all these solutions are touching WP deeply, test out before every use it
Future, this is not going in core, plugin only
a regular CRUD API should be integrated to core
Hooks will be introduced
4 talks left! Now @felixarntz with "Global Admin – A Deeper Dive into Multinetwork Organization" #LoopConf pic.twitter.com/EPBecA1AUu
— Steve Rudolfi (@SteveRudolfi) February 23, 2018
WHAT IS SOFTWARE COMPLEXITY AND HOW CAN YOU MANAGE IT?
Carl Alexander
There are 2 Carl Alexanders I know. Both inhabit the same physical body but are pretty distinct people. First there is Party Carl, the man behind the often enjoyed but rarely hash tagged WPDanceParty movement. This is the Carl you see mostly at camps, there to socialize and get everyone celebrating the work we do in a most vivacious way. The other Carl is Work Carl who has a very strict work ethic and who possesses a razor sharp mind that can tackle any advanced subject. I have seen Work Carl talk before but this time around I had to actively google things, like cyclomatic complexity, while he was speaking to attempt keep up with him. My dancing shoes make me glad it was not just Work Carl at the camp, but am so, so grateful that I got to learn from him during this session.
Raw Notes:
Super easy to lose control and let your code get really messy
complexity is not a ting we focus on at the front
we initially worry about it just working
not worrying about our future self
cyclomatic complexity
Better known of the approaches measurements
Linearly moving through a piece of code
use control flow graph so it looks like a circle of boxes and flow shown
count edges and nodes
see the paths in the code
this is a lot of work and nobody wants to do it normally
Alternative
always count the initial function
then each ‘if’ and ‘or’ as complexity
But what does that number give us?
1-4 low complexity
5-7 moderate complexity (this is where things get dangerous, brittleness in the code show up, can feel like losing control
8-10 high complexity – the function still works but you should be on high alert
10+ Ludicrous complexity – unusable, want to stop and refactor, fix it
issues with cyclomatic complexity
treats ‘if’, ‘while’, ‘for’, ‘case’ as identical statements
a look is the same 1 to 1000000 times
an if statement alters the path in the code, values change and behaviour differs
it also does not account for nesting
3 linear for loops are NOT the same as 3 nested loops but the model evaluates them as the same complexity
complex code is often complicated, but those terms don’t mean the same thing
we confuse them a lot
it is not hard to follow complicated code, use vardumps and some die statements and it makes sense
Second measurement meath
NPATH
solves the shortcoming fo cyclomatic complexity
from a single paper in the 80’s, hasn’t caught on as a mainstream thing
count the number of singular execution paths in the code
How many unique paths there are in the code
Statements are multiplicative
adding paths through the code multiply
2 * 3 = 6
Conditionals are dangerous
You should rarely have 2 conditionals
what if you had a dozen?
4096 unique paths through your code
how many paths through your code should you have?
tools warn about 200 paths
50 paths is more reasonable
But how do we get there?
break large functions or methods into smaller ones
6 if statements = 54 unique paths
not easy to split a function into two right at the mid point
Code that logically goes together
date objects exampled
But are we just hiding problem by doing all this?
whole point is to do this at the function and method level
not the whole of the codebase
correlates with a better code base though
makes more robust and less brittle
calculating complexity value is not practical
need tools that scan your code
CLI tools
great starting point, run locally well and fast
PHP code sniffer
PHP mess detector, not as well known
detects problems with your code
supports both measurement methods
other tools continuously reads code
enforces code quality
Codacity
Code Climate
Scrutinizer
all offer a free tier for OSS projects
complexity isn’t that complex
intimidating topic, but does not need to be
CS scientists used very technical dense language
the theory itself is not that hard to understand
All about the size of the functions and methods
graphs are not really needed to understand this
@twigpress this guy!
What a good developer and teacher. Go Carl! #wplife #loopconf @loopconf pic.twitter.com/5S4Q75HtPf— Chris Wales (@chriswales7) February 23, 2018
BROWSER SERVICE WORKERS
Brian Thompson
Brian and Pantheon go back a ways. Legend has it he was the one that figured out that if you chain enough commands together you can make Composer run on Pantheon, giving rise to the Composer plugin for Terminus. He was also on the team that converted their entire deploy process to leverage Slack. They even did a whole webinar about this a while back. Given that this was Brian’s first ever WordPress conference I could not wait to see what he had cooked up. The short answer is it was mind blowing. I included the links below for his ‘magic trick’. I hope he leaves this up indefinitely as this is a shining example of the power of the browser side service worker and what it can do for the end user. Let’s stop dropping orders on the ground and keep that promise that we will ‘just take the order’ if at all possible.
Raw Notes:
imagine a colander store,
sells things
Katy Perry pushed people there
shark tank effect
caching with CDN prevents overwhelmed from anon
but put in cart fails
Page could not load
nobody happy
turns a good thing, referrals, into a nightmare, down servers
the problem, this fails to uphold golden rule of commerce, always take the order
W3C calls them Web Workers
Google says Service Worker though
long running background tasks in the browser
not tied to other aspects
Emphasis on ‘app like’ experience
not an app you download
but a website that installs as a native mobile app
this hidden gotchas
very early days still
Directories are important
JS in a theme for instance
service workers are scoped to the directories in which they live
got to get them to top level so they are scoped at that level
many people putting them in root level
Only working over HTTPS
no hard requirements but this is true
this presents challenges for local setups
must have valid cert, no self signed SSL
Browsers realized this and added extra domain that browser recognize
localhost is also a safe one
whether you can trust your local machine is up to you, but browser does
kinda have to cross your fingers since it is so early
error handling is not there yet
can’t even do retried yet
Supported browsers
Chrome, best support for any browser
Firefox, also good since 45
but during his prep he found out he had accidentally disallowed service workers from side effect of plugin, no way to tell which one though, still early
Opera has full support
Safari has limited support, still coming along
IE – nope (not even 11, no plans to support)
good news is degrade gracefully, just don’t get benefits, no penalty
Edge – does but not by default
Now onto code
maybe a dozen new lines
register the service worker
then listen to install event for when it gets fired by the browser
Cache-array on the local browser
hard to manually get things into a browser cache and back out safely
this approach just caches like Varnish and gets full page
you can get fancy and listen to a fetch event
intercept fetch requests and take control of what the file should be
even with a CDN it is still multiple milliseconds for roundtrip
This route is instant from local
Magic that takes place in the spectator’s hands is so much more powerful – Shawn Farquhar
Open up chrome
go to live-wp-serviceworkers.pantheonsite.io
https://live-wp-serviceworkers.pantheonsite.io/slow.php
loops a billion time and inside that it loops a billion times
this forces the Page Could Not Be Loaded
https://live-wp-serviceworkers.pantheonsite.io/slow.php?help
this loads a real page and says SLOW LOADING PAGE… This page is taking awhile to load…
Gives a better experience
turn off wifi
Actually loads something, it should not be able to!
this is preloaded on browser memory
Full circle, how do we make sure we always have the user have a good experience
using a service worker they can still complete the order with order confirmation page, browser is having issues so leave browser open message
because of service workers we can see 500s and reroute to a better experience route, customer service
convert a loss sale to a happy customer
he is open sourcing his work at MindGrub on service workers
github.com/Mindgrub/always-on-wp-plugin
The penultimate #LoopConf 2018 talk: "Servicing Your Website Visitors With Browser Service Workers" w/ @rvtraveller26 pic.twitter.com/3SIfGZHI8e
— Steve Rudolfi (@SteveRudolfi) February 23, 2018
Wrapping Up
There are few other events I can name that have this caliber of speaking track and have such a wonderful sense of togetherness at the after parties. It is truly some of the best and brightest of the whole WP world in attendance and backdrop of a Salt Lack City makes for a delightful stomping ground. If you missed this years event, you can catch all the recordings as soon as they are posted, but there is no way to replicate the amazing hallway conversations or comradery that emerged from this event. Make sure you get on the info mailing list so you can get your tickets as soon as they go on sale for LoopConf 2019!
Reflecting on a wonderful #loopconf experience as I travel back to Phoenix. So professionally run and full of fantastic people and discussion. Thank you so much @loopconf & @ryandonsullivan! pic.twitter.com/xgX6KlSiTK
— Maura Teal (@mlteal) February 24, 2018