//
you're reading...
Fun

Ways to embarrass your boss using WordPress

For those of you who have had the opportunity to have a tour of our Portland office you know well enough that we enjoy a fairly relaxed work environment. A lot of that is due to the open mindedness of the founders Dan and Ian who are a couple of grown up kids at heart. When I was interviewed for the position of lead developer on digitaltrends.com I was asked how I felt about jokes in the workplace and if I was easily offended. I warned them that given the opportunity I could be quite crass. After a year or two I was able to gauge how far I could go with these guys and still keep my job so when April Fools came around this year I jumped at the opportunity to see how much I could mess with our CEO Ian Bell.

So I feel that some back story is in order here to give this better context. At my previous place of employment I established a bit of a reputation for coming up with some zingers for april fool’s jokes. One of my favorites was a company-wide and quite sincere appeal to switch from open source solutions (the LAMP stack in particular) to one that specialized in Microsoft technologies like IIS, ASP, .NET, etc. If you think it’s hard keeping a straight face while telling a really funny joke imagine writing several paragraphs advocating IIS to a bunch of linux nerds and managing to sound dead serious. I needed to come up with a way to uphold my reputation here at DT.

In the past I have implemented easter eggs for some of our writers. These slight modifications are sometimes fun and light hearted. One example that was well received was the random appearance of a Necron Monolith while navigating the admin pages of our WordPress site. Whenever the image of the monolith would appear it would lazily move across the page and then teleport away leaving you with sense that you might have only imagined it so you dare not mention it to anyone for fear it would not happen again. We are big Dawn of War fans here at DT by the way. In the more recent past there was an incident involving provocation from a member of the editorial staff who made a number of disparaging remarks about the development team. I won’t go into specifics but alcohol was involved and we devs were left feeling undervalued and underestimated. That changed quickly. In short order, that person found himself randomly landing on my little pony websites and painfully ridiculous youtube videos when he thought he was clicking on a link to edit a post. After a couple days of dramatically suppressed productivity and resigned penitence we finally removed the punitive easter egg and allowed the editor to continue with his life. We experienced no further provocation.

So back to April Fool’s, it was time to target a single user on the frontend of the website. This presented some interesting challenges given the cache-heavy nature of our site. The trick was to modify the experience for a specific user without those pranks propagating to everyone else visiting the site. Fortunately we have a method for injecting user specific javascript and html into our frontend in a way that allows us to do full page caching and still get a dynamic experience for logged in users. I am planning on writing a post to expand on this functionality in the near future but in summary when a page is loaded on our site a static page can be served out of our cache and on page load an ajax call is made to retrieve information about the logged in (or not) user. This allows us to inject extra links for administrators as well as generate javascript tailored to a specific user that gets injected into the DOM. This was the perfect way to piggy back a little bit of mischief.

April 1, 2013 9:15AM: This is about the time I am enjoying my first cup of coffee and browsing the headlines on Reddit. Not today. On this particular morning I am scrambling to write a block of javascript that would only get injected into the DOM of one Ian Bell, CEO and fearless leader of Digital Trends. Within 10 minutes I have the code written and deploy it to the production servers using ominous and ambiguous descriptions in my git commit messages. At this point I have brought the other developer, Richard, into the circle of trust and informed him something interesting was about to happen. For the next hour we collectively suppress giggles in unbearable anticipation.

April 1, 2013 10:00AMish: Right about the time we have started getting into our groove and nearly forgotten about the abomination we released into the wild Ian emerges from his office and with a serious and determined expression on his face is beckoning us all into his office to address a very serious matter. As we enter his office he is explaining to us that we have been ‘hacked’ and we need to do damage control. I have a completely straight face as I realize I was about to enjoy the fruit of my labors. Ian brings up the front page of the website and scrolls down pointing out the various examples of defacing that the homepage has undergone. Select words in the titles and excerpts have been systematically replaced with less savory alternatives. Headlines for all of the editorial masterpieces and their blurbs look as if they have been edited and revised by a ten year old doing adlibs. Words like ‘the’, ‘he’, ‘which’, and ‘and’ have been replaced with other words which if your mom heard you say them she would come at you with a bar of soap destined for your pie hole. He gets halfway down the page before I start laughing and inform him that he has been the sole target of the defacing. We all giggle for another half hour at least after Ian’s solemn vow to retaliate.

Fast forward a month and a half and still I wait with baited breath for the hammer to fall. I am reading my aggregated RSS feeds one day and something catches my attention. The onion has published a javascript library that has only one purpose… to annoy Ian Bell. Always one to push my luck and put my employment status at risk for a good laugh I deploy this delightfully immature snippet of javascript into Ian’s personalized javascript and again I wait. Halfway through our morning triage meeting we are interrupted by the CEO who has once again fallen victim to our mischief. He recounts his phone meeting with our chief editor during which as he scrolls down the page of the website the obnoxious sound of flatulence erupts out of his speakers, into the phone, across 3000 miles of mountains and farmlands and into the New York office of the chief editor. The response from New York is simply “Are you ok?” More laughter is had and I suspect behind those calculating eyes Ian is planning something unspeakable for me.

So the lesson to be learned from this is that when you want to prank someone specific on a high traffic production website make sure you do so in a way that will not get cached. Also make sure that if you are going to consider using these antics on your own employer, be reasonably assured he/she can handle a little humiliation and won’t replace you with a slightly less mischievous developer.

Advertisements

About Brandon

Web Applications Developer for Digital Trends. I build applications and platforms of all shapes and sizes. http://realmofzod.com http://twitter.com/realmofzod

Discussion

One thought on “Ways to embarrass your boss using WordPress

  1. Well done 🙂

    Posted by Daniel Bachhuber | May 14, 2013, 8:05 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: