Skip to content

I love writing code!

Dear Reader,

If you do what you love, you’ll never work a day in your life.

— Marc Anthony

I love writing code. I love writing code that makes computers do things. I discovered this love when I was 14 years old and it has never left me.

These days I get paid to write code, It is awesome. Even so, I’ve written code when I didn’t get paid, I’ve written code that I can’t/won’t sell, I’ve written code that no one else will see, just for the sake of writing code. I LOVE WRITING CODE.

Because I love it, sometimes I am overzealous in the pursuit of writing code. I’ve worked 80-120 hour weeks before. (Whether for my employer or for my own person projects does not matter.) I’ve stayed up all night writing code, I’ve sat down in the morning to write code, looked up only to find that I had forgotten to eat a meal, take a shower, or even interact with another human that day. It’s not the healthiest thing I’ve done but it was fun! It was fun because I LOVE WRITING CODE!

I’ve been told personally, privately and by some less than clever people in sub-textual tweets that I need to stop working more than 40 hours a week because I am setting a bad example for others. Newer programmers who may not know how to balance their life might see me talking about coding straight through the weekend  and think that it’s ok. I wonder, did anyone ever tell Freddy Mercury, you need to stop playing instruments, singing, writing songs, and performing because you are setting a bad example for others? Did anyone tell Sir Edmund Hillary that mountain climbing was an unhealthy lifestyle and that he should stop glorifying it?

I get it, I am blessed. (I am not privileged because of my birth. I am not lucky. I am blessed by God) I get paid to do something that I love. If you are not in that position, if you program computers and then go home and have other interests, that’s wonderful, more power to you. I celebrate you because programming allows you to live the lifestyle you choose. But don’t come down on me because computers are my other interest. Don’t tell me that I can’t continue chasing a problem long after you’ve given up and gone home because this isn’t your passion, it’s your paycheck. Honestly, that’s your problem, not mine.

If I decide to put in an 80 hour week because the problem I’ve been given to solve is interesting,  you don’t get to decide if that’s healthy or not. You don’t get to tell me to stop because my work ethic is setting a bad example for others.

For 12+ years now I’ve been helping people become developers, and become better developers.  I’ve advised countless people to ‘follow their passion’, well, this is what that means. I am following my passion. If you are blessed to love programming as much as I do and you get paid to do it, pull out all the stops, chase that problem for as long as it takes. When you solve it – and you will solve it – smile at the inner peace you have because you solved it in large part because you love what you do, and persisted in doing it long after others gave up because they have other interests. Be proud of yourself, because you really are living the dream.

Until next time,

I <3 |<


Dear Reader,

Those that don’t know me well will probably be surprised to hear me say that I am an introvert. All my life I’ve had a very small circle of friends. Even though I am a very public figure these days in the PHP community, I still maintain a very small group of close friends.

I consider a lot of you my friend.

I consider many of you my good friend.

There are however, only three, that I consider my close friend. Those three are Adam Culp, Keith Casey, and Paul Jones.

  • Adam is my practical friend. I lean on him a lot for daily advice. I always appreciate the advice and help Adam gives me, even when I fail to say as much.
  • Keith is my smart friend. I introduce Keith to people as “Scary Smart”. If you are privileged enough to get to know him as well as I do, you’ll learn that’s not a joke. I am truly honored to be allowed to call this man my friend.
  • Paul however, is my best friend. Over the course of ten plus years, Paul and I have forged a bond that holds strong no matter how far apart we are. Paul is my wise friend. I turn to him for advice on the hard problems and he never fails to help me work through my issue.

I don’t say thank you enough to these three gentlemen for the footprint they have each put on my life. Adam, Keith, Paul, thank you. I do however, thank God on a daily basis for bringing you into my life.

To all the rest of you who consider me a friend, thank you as well. So many of you have touched me in so many different ways that I can’t list you all.

Until next time,
I <3 |<

Thank you Derick Rethans for 15 years of XDebug

Dear Reader,

There are a handful of tools that have actually changed how many of us code PHP. XDebug is one of those tools[1]. There is no doubt of the impact that XDebug has has on PHP developers and PHP projects.

Recently, XDebug turned 15. (If you don’t know what XDebug is, start with this SitePoint article about Xdebug) This means that the man responsible for XDebug, Derick Rethans, has been supporting XDebug for 15 years, for free. XDebug is open source. Derick maintains it, answers questions about it, spoke at conference about it, and generally done everything he can to help anyone who is having an issue with it.


Thank about that. How much code do you have that has lasted fifteen years?

So on this the (close to) anniversary of this product, many of us in the PHP community decided to do something to show Derick how much we appreciate it. Those that know him know that Derick loves a good Scotch. So we decided to buy him some. Originally, I was just going to buy him the most expensive bottle I could find and be done with it. However, my friend James Titcumb stepped in. He knew the owner of the shop that Derick buys his Scotch. He contacted the owner and we gt a quick education in Scotch. tl;dr, expensive doesn’t always mean good. He picked out a selection of bottles that he knew met Derick’s high standards.

On April 26th, 2017, James met Derick at the retailer and here is the video.

Thank you!

  • First and foremost, thank you Derick.
  • Second, thank you James Titcumb for going above and beyond on this project. Y’all really have no idea what he did to make this happen.
  • Third, I gotta say it. Thank you to the lovely and talented Kathy. It is hard to describe how difficult it is to live with someone like me who randomly sit up and shouts “I HAVE AN IDEA”. Yes, sometimes, she buries her face in her hands and weeps. Most of the time though, she supports me, she encourages me, and she helps me. This time, she worked with James to get the Scotch paid for. (Moving that amount of money across the pond is not as easy as you might think it would be.)
  • Finally, but not nearly the least important, thank you to the entire PHP community. When I setup the GoFundMe, I never expected to actually hit the $5,000. I would have been happy with hitting $1,500. As of right now we have hit $5,100! (I’m trying to figure out how to close the GoFundMe!) :)

    Part of the deal I offered companies was that if anyone donated at least $100, I would list their logo and link in this blog post. Here are the people and companies that rose to that level.

    Make sure you say thank you to these individuals and companies.[2]

All told, 151 people donated to make this happen!

So that’s it. We had some fun, we raised some money, we said thank you to someone who has given so much to all of us. Once again, thanks Derick. :)

Until next time,
I <3 |<

p.s. I will provide a full accounting of all funds raised when I get home from traveling.

[1] The other two, IMHO, are PHPUnit and Composer.
[2] If you are on this list, you probably noticed there re no logos. This is my fault, not yours. Basically, I lost them in all my recent travels. PLEASE send to me again via email and I will update your entry.

“Uncle Cal’s Career Advice for Developers” book has been released

Dear Reader,Book cover for Uncle Cal's Career Advice for Developers

This past year at php[tek], it was my honor to be the closing keynote speaker. I wrote a talk just for tek called “Uncle Cal’s Career Advice for Developers”.  At the end of the event, since I never release my slides, I offered a free copy of the transcript to anyone in attendance. I sent that out about a month ago. Now I am finally getting around to publishing it for everyone else who may want it.

Two Options for Career Advice

I’ve packaged the book two ways.

For those of you who were at tek, I hope you enjoyed the talk. For those that weren’t there, you can still get the advice.

Until next time,
I <3 |<

Silly WordPress Tricks, Part I: Exporting Blog Posts as HTML

Dear Reader,

I’m making some changes to my blog. Specifically, I am moving most of my Public Speaking blog posts to my mailing list. I’ve got more of those than I realized. Being a program, my thought process was of course “Why spend an hour copying and pasting all of these posts when I can spend two hours and write a script?” :) So I wrote a simple script using WP-CLI to gather the information. So I hammered out some bash to get the job done. I am proud that other than wp-cli, I did not have to resort to any additional PHP code to do the job. It was tempting at times, but I did it.

Yes, I am aware that wp-cli will export to a WXR file. I wanted something simpler.

No, this is not a complete solution. It doesn’t deal with attachments, comments, or metadata. I don’t need those for this project.


This bash script will export all of the blog posts in a given WordPress category into individual HTML files.  There is no templating to control how they are output, it is not that smart. It takes no parameters, everything is hard coded.


  1. You have wp-cli installed on your machine, it is named wp, and it is in your path.
  2. You have a WordPress blog

Here is the script. Below, I will break it down line-by-line in case it’s not clear.


mkdir -p $HOME_DIR/blog/$CATEGORY
cd $WP_DIR
for LINE in $(wp post list --category_name=$CATEGORY --fields=ID,post_name --format=csv| tail -n +2); do
        ID=$(echo $LINE | cut -f1 -d,)
        SLUG=$(echo $LINE | cut -f2 -d,)
        TITLE=$(wp post get $ID --field=post_title)
        POST_DATE=$(date -d "$(wp post get $ID --field=post_date)" +"%Y-%m-%d")
        AUTHOR=$(wp user get $(wp post get $ID --field=author) --field=display_name)
        echo "Processing $TITLE"
        echo "<h1>$TITLE</h1>" > $HOME_DIR/blog/$CATEGORY/$SLUG.blogpost.txt
        echo "<strong>Author: </strong>$AUTHOR</storng><br />"  >> $HOME_DIR/blog/$CATEGORY/$SLUG.blogpost.txt
        echo "<strong>Date Published : </strong>$POST_DATE<br />" >> $HOME_DIR/blog/$CATEGORY/$SLUG.blogpost.txt
        wp post get $ID --field=post_content >> $HOME_DIR/blog/$CATEGORY/$SLUG.blogpost.txt

2: This is the home directory. A directory named blog/CATEGORY will be created under this directory. It is set to the user’s home directory.

3: This is the root of your WordPress installation.

4: This is the category that you want to export.

5: Create the directory to hold the posts

8: Get a list of the post IDs for the given category. Execute lines 9-18 once for each post. The wp command in the for loop will return a csv list of ID and post names. (the slug)

9: Get the post ID from the CSV line using cut.

10: Get the slug.

11: Use wp to get the title of the post.

12: Use wp to get the post date. Use date and a format of YYYY-MM-DD to strip off the time.

13: Use wp to get the author id and feed that to wp to get the author’s display name.

14: Let the user know what we are currently processing.

15: Output the Title of the post as an H1

16: Output the By-line.

17: Output the post date

18: Use wp to gather the content of the actual post and output it.

Lather, rinse, repeat.



This is one of those “gets the job done” scripts. It is brittle and it is fragile. There are a lot of ways to break it and there is zero error-handling in it. All that having been said, it gets the job done. More importantly, it illustrates one of the cool things about wp-cli, scriptability of WordPress. I live in the command line, wp-cli has quickly become one of my most used tools. This, however, is the first time I’ve used it as part of a larger script. I think that’s cool. :)

Until next time,
I <3 |<