Easy way to hide PHP warnings and errors in WordPress

Sometimes you have a plugin or a theme in WordPress that has a php warning, but it is highly dependent on another piece of code that you cannot fix without doing some intricate code forking.

For example, earlier today, I got this warning message:
Warning: count(): Parameter must be an array or an object that implements Countable in /wp-includes/post-template.php on line 284

First of all, that is quite possibly the most poorly written warning/error message. No one can easily understand this message without immediately copying and pasting it into Google. Which is what I did. Luckily, I found a simple solution for hiding warning messages like this.

Add this to your wp-config.php file:

define('WP_DEBUG', false);

Here is a way more aggressive version if that doesn’t work:

define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );

That’s it. w00t!

Why you need to change strategies for your audience

I recently came across this article about Jérôme Brochot, a French chef based in Montceau-les-Mines, France, who won a Michelin Star, but decided to give it back. It must have been a difficult decision to forego the honor that comes with attaining a Michelin Star, but it also shows a clear constraint that Jérôme established—he identified the audience that he wanted to serve.

Food at Le France Restaurant by Jérôme Brochot in Montceau-les-Mines, France.

By maintaining and growing a Michelin Star restaurant, Jérôme would have continued investing in high quality ingredients and techniques to cater to a wealthy clientele. However, since the surrounding town was slowly declining and its residents unable to afford the luxurious cuisine, it became increasingly difficult to keep the restaurant full. I would imagine that it is extremely difficult to continuously acquire new customers for high end restaurants; especially when local residents cannot afford such extravagance.

Sometimes being too fancy is a detriment. A simple cuisine that encourages regular customers might be the best strategy for building a sustainable business—especially since convenience might trump uniqueness. This usually explains why most restaurants cater to the tastes of local residents.

Clearly defining and understanding your audience is a key skill that I am working hard to improve. A while back, I wrote on Medium how Michelin stars are a great mental model to use when thinking about design. And this article made me re-think some of my original thoughts. I’d like to add a new caveat.

Everything does not need to be a 3 Michelin Star experience

I think that a lot of first time designers and product managers get caught up trying to make every feature “special.” And while this is a noble goal, I would counter that everything doesn’t need to be unique. It’s okay that a feature simply follows the styleguide that we have established.

The second order repercussion that junior PMs and designers do not easily recognize is simple: By having so many unique features, it will be difficult to establish clear user flows and a design paradigm that is consistent across different features/product lines. Paradigms and standards exist for a reason—they simplify the development of ancillary features and options.

Use the 3-Michellin Star experience for core, differentiated flows that make you 10x better than the competition. For other features, sometimes the simplest solution is the best solution because it is consistent, simple, and familiar for your audience. Don’t let your ego get in the way of quickly presenting a simple solution to your intended audience.

3 reasons why I love “Walk on Water” by Eminem

This is my favorite song of 2017. I like how it is both reflective and honest. There is a new sense of self-awareness and humility from Eminem that emerges from the angry and rebellious version of him (aka Slim Shady) that we fondly remember.

2017 has been a highly introspective year for me full of change and acceptance. I’ve changed a lot over the past year more-so than I realized. I’ve also accepted a lot of my shortcomings. No one is perfect, even though we all strive for perfection. Plus, we all have critics—people who judge us or criticize us for those shortcomings.

Eminem’s song is a verbal assault directed at those critics and a plea for others to just accept him for who he is. It’s easy to criticize others who are taking action, but really hard to take action ourselves.

This song captures my 2017 so very well. It’s easy to sit on the sidelines and critique. A respected mentor of mine always discussed the difference between talkers and do-ers. 2018 is going to be an incredible year of do-ing.

There are three main sections of this song that resonated deeply with me:

1. I’m only human

(Beyoncé:)
I walk on water
But I ain’t no Jesus
I walk on water
But only when it freezes

‘Cause I’m only human, just like you
Making my mistakes, oh if you only knew
I don’t think you should believe in me the way that you do
‘Cause I’m terrified to let you down, oh
If I walked on water, I would drown

Beyonce’s choruses throughout the song build up to this final and full chorus as she highlights the imperfection of being human.

We aren’t god-like, we are humans. I am far from perfect. I know this. I have made my own share of mistakes. But there are so many people who believe in me so much. And I thank them for that, but I’m so scared of messing it all up and letting them down. It’s what fuels me, but keeps me a bit anxious at the same time.

I love how Beyonce’s harrowing words and beautiful voice paints a gloomy, yet etherial portrait of those unachievable expectations that other people place upon us. Ironically, from my experience, trying to meet the unreal expectations of others often causes me to make mistakes.

2. This used to be fun

It’s true, I’m a Rubik’s, a beautiful mess
At times juvenile, yes, I goof and I jest
A flawed human, I guess
But I’m doin’ my best to not ruin your expectations and meet ’em, but first
The “Speedom” verse, now Big Sean
He’s going too fast, is he gonna shout or curse out his mom?
There was a time I had the world by the balls, eating out my palm
Every album song I was spazzin’ the fuck out on
And now I’m gettin’ clowned and frowned on

I love the first three lines. I’m a mess, I goof and I jest, and a flawed human, I guess. What a great lyric and rhyme.

I have tasted success, but now I have to go through the painful process of building myself up again. With each new journey, you learn about a new space/a new industry and you inevitably have to start at the most logical position: the bottom.

It used to be fun, because I was lucky. I hope that luck strikes again, but at the same time, it isn’t too fun being at the bottom. I know that the journey up is fraught with obstacles. And I will make every effort to climb out of it. This used to be fun. But now, others have such high expectations of me.

3. Speaking of high expectations

(Eminem:)
Why are expectations so high?
Is it the bar I set?
My arms, I stretch, but I can’t reach
A far cry from it, or it’s in my grasp, but as
Soon as I grab, squeeze
I lose my grip like the flyin’ trapeze
Into the dark I plummet, now the sky’s blackenin’
I know the mark’s high, butterflies rip apart my stomach
Knowin’ that no matter what bars I come with
You’re gonna harp, gripe, and
That’s a hard Vicodin to swallow, so I scrap these
As pressure increases like khakis
I feel the ice cracking

The curse of high expectations is that they are oftentimes unreachable. The curse of low expectations is that they oftentimes result in mediocrity. Which would you rather have?

I personally choose high expectations. But that means that I have to be okay with knowing that these expectations will be just a bit out of my reach. And that there is a possibility that I will fail. That I will reach out and feel those expectations slip out of my grasp.

But it is okay. Because as I plummet, I know two things. 1) that I’ll probably be screaming the whole way down and 2) that the true friends that I have will be there with open arms to catch me. They usually are the ones who cheer for me to succeed and they are the ones who pick me up when I fall.

I’m excited for 2018. I fell down quite a bit in 2017. I wandered a bit aimlessly trying to find a problem that would interest me. To all of those folks who messaged me, who wrote me emails, and who graced me with a cup of coffee or a glass of wine, thank you. I made it through 2017 because of you. I felt the ice cracking, but I also felt your outstretched hands.

I walk on water only when it freezes and with great friends by my side.

 

“Walk on Water” by Eminem full lyrics:

(Beyoncé (Eminem):)
I walk on water
But I ain’t no Jesus
I walk on water
But only when it freezes (fuck)

(Eminem:)
Why are expectations so high?
Is it the bar I set?
My arms, I stretch, but I can’t reach
A far cry from it, or it’s in my grasp, but as
Soon as I grab, squeeze
I lose my grip like the flyin’ trapeze
Into the dark I plummet, now the sky’s blackenin’
I know the mark’s high, butterflies rip apart my stomach
Knowin’ that no matter what bars I come with
You’re gonna harp, gripe, and
That’s a hard Vicodin to swallow, so I scrap these
As pressure increases like khakis
I feel the ice cracking, because

(Beyoncé (Eminem):)
I walk on water
But I ain’t no Jesus
I walk on water (shit)
But only when it freezes

(Eminem:)
It’s the curse of the standard, that the first of the Mathers disc set
Always in search of the verse that I haven’t spit yet
Will this step just be another misstep
To tarnish, whatever the legacy, love or respect
I’ve garnered?
The rhyme has to be perfect, the delivery flawless
And it always feels like I’m hittin’ the mark
‘Til I go sit in the car, listen and pick it apart
Like, “This shit is garbage!”
God’s given me all this, still I feel no different regardless
Kids look to me as a god, this is retarded
If only they knew, it’s a facade and it’s exhaustive
And I try not to listen to nonsense
But if you bitches are tryin’ to strip me of my confidence
Mission accomplished
I’m not God-sent
Nas, Rakim, Pac, B.I.G., James Todd Smith, and I’m not Prince, so

(Beyoncé:)
I walk on water
But I ain’t no Jesus
I walk on water
But only when it freezes

‘Cause I’m only human, just like you
Making my mistakes, oh if you only knew
I don’t think you should believe in me the way that you do
‘Cause I’m terrified to let you down, oh

(Eminem:)
It’s true, I’m a Rubik’s, a beautiful mess
At times juvenile, yes, I goof and I jest
A flawed human, I guess
But I’m doin’ my best to not ruin your expectations and meet ’em, but first
The “Speedom” verse, now Big Sean
He’s going too fast, is he gonna shout or curse out his mom?
There was a time I had the world by the balls, eating out my palm
Every album song I was spazzin’ the fuck out on
And now I’m gettin’ clowned and frowned on
But the only one who’s looking down on
Me that matters now’s DeShaun
Am I lucky to be around this long?
Begs the question though
Especially after the methadone
As yesterday fades and the Dresden home
Is burnt to the ground, and all that’s left of my house is lawn
The crowds are gone
And it’s time to wash out the blonde
Sales decline, the curtains drawn
They’re closing the set, I’m still poking my head from out behind
And everyone who has doubt, remind
Now take your best rhyme, outdo it, now do it a thousand times
Now let ’em tell ya the world no longer cares or gives a fuck about your rhymes
And as I grow outta sight, outta mind, I might go outta mine
‘Cause how do I ever let this mic go without a fight
When I made a fuckin’ tightrope outta twine?
But when I do fall from these heights though, I’ll be fine
I won’t pout or cry or spiral down or whine
But I’ll decide if it’s my final bow this time around, ’cause

(Beyoncé:)
I walk on water
But I ain’t no Jesus
I walk on water
But only when it freezes

‘Cause I’m only human, just like you
I’ve been making my mistakes, oh if you only knew
I don’t think you should believe in me the way that you do
‘Cause I’m terrified to let you down, oh
If I walked on water, I would drown

(Eminem:)
‘Cause I’m just a man
But as long as I got a mic, I’m godlike
So me and you are not alike
Bitch, I wrote “Stan”

Songwriters: Beyonce Giselle Knowles / Marshall Mathers / Miguel Sijbers / Skylar Grey / Walk on Water lyrics © Warner/Chappell Music, Inc

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Yes, that’s the default first post by WordPress. I’m going to keep it here as an homage to how great projects start… with a simple “Hello world!”

After evaluating a variety of different publishing platforms, I finally settled on the familiar. I used to do a lot of my writing on Medium, which you can still see, but I think that it is time to migrate to a new system.

There are a lot of pros and cons to having your own site like creating my own WordPress theme — and yes, this was hand-coded by yours truly. Two main considerations went into this process:

  • SEO & Control
  • WTF are “Claps”

SEO & Control

There’s not that much that you can do with Medium. It’s great as a way to start writing for someone who doesn’t know either how to code or how PageRank works. Don’t get me wrong; Medium does have two great things going for it: Ease of use (getting started takes about 2 minutes), and distribution (there’s a built-in audience that’s engaged).

But I can code. And I love numbers and data. And I want to customize the hell out of my writing platform. And since I’m planning on dedicating a lot of time to writing over the coming years, it is time to level up and host my own content.

Rand Fishkin from Moz has a detailed breakdown of why you should host your own content.

 

Claps

Maybe I’m a purist, but I loved hearts. One heart, one person. It was a simple concept just like one vote, one person.

On August 10th, 2017, Medium introduced Claps. Maybe this was a way for them to create a metric to adequately pay customers or maybe this was a way to increase overall engagement or maybe this was a way to provide grade inflation on individual posts. A single person can give an article a maximum of 50 claps, by holding down the mouse for 25 seconds over the clap button.

Regardless, I didn’t particularly like it. Even the conversion was wonky. Old articles with 100 hearts by 100 people were now equal to articles with 100 claps by two people. It wasn’t just me, but a lot of folks have routinely criticized this new clapping paradigm.

I don’t want to write for the claps. I want to write for my audience—to give them information that they would find interesting and compelling. I want to write for myself—so I can practice and be a better writer.