Your Life in Weeks

A few weeks ago a friend of mine posted a picture on his Facebook page, showing a visualization of this life in weeks. He had seen a similar post by another friend of his. The visualization came from a post dating in 2014 on the blog, WaitButWhy.

From the post:

It kind of feels like our lives are made up of a countless number of weeks. But there they are—fully countable—staring you in the face.

The goal is to give you a visualization of time. Doing so helps your brain comprehend things properly when it comes to time and your life. It does this, in my view, in two ways.

First, it forces you to ask questions about the important moments in your life. What truly is a defining moment? Matriculation of schools as a kid, changing jobs as an adult, getting married, death of family, etc. I have mixed feelings that there is such a long chapter from me joining Wizards, but at the same time, it’s that way because my life has reached a very happy stable point. I shouldn’t seek change for change’s sake.

Second, it is about visualizing things properly. As a kid, the time we spend in a school feels like forever. The time I spent at college felt like a long time, but in truth, it is nearly a blip on my life’s grid here. So it helps give you a concrete view of how your life is defined through the lens of time.

Sometimes life seems really short, and other times it seems impossibly long. But this chart helps to emphasize that it’s most certainly finite. Those are your weeks and they’re all you’ve got.

Given that fact, the only appropriate word to describe your weeks is precious. There are trillions upon trillions of weeks in eternity, and those are your tiny handful.

Your Life in Weeks on

Initially, after seeing my friend’s Facebook post; I printed out the graphic planning to do my own coloring on it for visualization as he had, but I kept holding off for a few days. I just couldn’t motivate myself to figure out the week counts, etc. Then the idea of doing it in the browser came to me.

Yesterday morning, with the house quiet, I decided to code a digital visualizer. In all, it took me about 3 hours, but I reached a minimum viable product looking something like this:

Seeing my life laid out like this was a good thing. I’m a fairly optimistic person and looking at this I realized how much of my life is left ahead of me. To think about all that I’ve done and experienced in my life up to this point, and (hopefully) there is so much left ahead! It lives me feeling emboldened and excited.

Sure, I’m in my late 30s. When I was a teen, I would have seen myself as a grown up closer to death. I don’t see myself that way now. Obviously perspectives change with age.

I am very glad to have gone through this exercise to see what my life looks like. Seeing it from my finished project was rewarding for the few hours of work.

The above graphic is generated off of the following formatted list:

6/1/1987,c,Moved to Kansas
8/1/1989,c,Elementary School
12/1/1989,c,Moved to Orlando
8/1/1994,c,Gotha Middle School
8/1/1998,c,Edgewater High School
8/1/2002,c,Georgia Tech
12/1/2004,c,Left Georgia Tech
5/16/2006,c,Moved back to Orlando
10/22/2006,c,First date with Katie
3/16/2007,e,Mom died,#000000
7/28/2007,c,Work as a web developer
8/5/2009,c,Worked for
12/12/2011,c,Work at Wizards of the Coast

Each row is a format of “[Date],[Type],[Description],[Color (Optional)]”

  • Date – Self explanatory
  • Type – Either ‘C’ or ‘E’. C is the marker for a new chapter, which defines the color until the next chapter. E is for the event, which is a singular box.
  • Description – The text description for the entry
  • Color – An optional entry. You can choose your own color, if not it picks from a predefined list that tries to maximize visibility.

The above image is fairly opaque to look at. The actual implementation in the browser has it such that I can mouseover the first cell of each color block to see a tooltip of what that block’s description is.

I coded the implementation in PHP to generate HTML and CSS. It took me nearly three hours, all told. I had spent some time thinking it over ahead of time, but only the minimal amount of my pre-thinking ended up being useful as I was about 2/3rds through before realizing I had to re-frame my week thinking for this.

My biggest gains from this exercise were experimenting with CSS’s grid functions, which aren’t something I have any experience with. Additionally, working with dates is always a challenge when coding, and this was no exception.

As I mentioned above, I had to realize that the grid displayed on screen was not a weekly view of calendar years but instead (in my case) it is shifted to be the first event in the list. For me, the first week of each row is week 42 of the calendar year since I was born on October 22, 1983.

I’m not linking the implementation, or sharing it. I wrote it as a coding exercise for myself. I’ve shared the link privately with some folks, but I am not going to be sharing it broadly as I have no desire to further develop or maintain the project.

WordPress: Post Types vs. Post Formats

I am far from a WordPress expert, as this post will highlight. However, I am a hobbyist and an out of practice one at that. This past week I’ve been messing around with the template here on the site.

In doing so, I ran into a problem and it took me a while to google properly and figure out the issue.

The issue was that I use custom post formats for various things on the site. I have a format for the movie/book/tv reviews, a format for links, the format for normal posts, etc. But I was really struggling to figure out how to get WordPress to change display information for the different things.

The core of my problem was I kept trying to use get_post_type(). Like the definition of insanity, I tried it over and over expecting something to change somewhere.

I did this because in my mind these are different post types. To avoid confusion, I’ve properly referred to them above as formats but in my mind those are different types of posts. However, every time I would try to use get_post_type(), it always only returned ‘post,’ regardless of if I had set it as ‘link’ or something else. So I kept banging my head on my metaphorical desk.

Well, it took until Sunday morning (watching Manchester City vs. Sheffield United) for me to properly Google fu my way to an answer. WordPress parlance is that the above are post formats and not types, and the correct command is get_post_format() (reference link.)

Returns the post format of a post. This will usually be called in the the loop, but can be used anywhere if a post ID is provided.

I wanted to share about this here because the first several answers when Googling don’t highlight this difference well enough or at all. If I lost hours trying to solve this issue, then I’m sure there are others doing the same thing and hopefully I can save someone else a few hours of their time.

My Fixture Picker

As is well known, I am an avid soccer fan. I love watching it and watch games from around the world. On average, I will watch 20+ hours of soccer a week. Admittedly, that time is not focused solely on soccer. I am usually having it on in the background while I do other things.

For example, this morning I watched Arsenal vs. Chelsea, two teams I am not a big fan of, face off. While watching them, hoping for a meteor to strike the stadium, I did a major revamp to a little tool I built that helps me identify games to watch.

Simply titled, “Fixture Picker”, it looks at upcoming matches in a number of leagues and identifies ones which I will likely enjoy watching. It does this in a few ways:

First, I’ve built a database of the teams in each of the leagues and assigned each team two values: My interest in the team and their relative place in the league’s standings. The latter of these is one I hope to automate in the near future, but I haven’t found a data source I can pull this from. So, for the time being, every few weeks I go in and spend 15 minutes updating the various league standings.

The system first combines the ratings of the two teams, and then combines that with looking at the difference between the teams. The idea being I want games featuring higher ranked teams and ones which are closer ranked.

Secondly I have assigned various leagues a modifier. There are certain leagues I am more eager to watch than others.

Next, it looks at if I’m interested the teams (are they my chosen teams in various leagues or do they feature players I am keen on?)

And then out of that there are four classifications which it comes back with:

  • Must Watch – Two top teams in a league where I’m interested in at least one of them.
  • Should Watch – Involves at least one team I’m interested in, or is two evenly matched teams in the top half of the league
  • Can Watch – The vast majority of games
  • Should Avoid – The system sees no reason for me to watch this game

Prior to today, I had imported the calendars of various leagues, and relied on the database of games for looking at the schedule. But this was a manual process and required me to review schedule changes or accept a certain amount of misscheduled games.

This morning’s update was to begin making use of a data source where I could abandon the manually built match database and instead pull from the data source. Needless to say, this is a very exciting update to the system.

Future updates I want to make to my fixture picker:

  • Automate pulling the team’s place in the standings
  • Refine the algorithm for identifying matches
    • Use data from previous meetings
    • Betting data?
    • Flag teams with notable injuries, etc.
  • Improve the looks, it’s very ugly right now
  • Expand the tool to cover more leagues (Mexico, NWSL being the primary two)
  • Add email updates to make sure I don’t miss must watch games

But why?

This isn’t a critical tool. I could easily look at the matches for a day and pick them on my own. This was just a fun side project to give me something to fiddle with and work on.

In many ways I see programming as a hobby and like a carpenter or artist, I just want something to work on and play with. If it ends up being something I can use, then all the better.

PHP to Assign Secret Santa

Because I’m nerdy I decided to write a quick PHP script to handle the assigning of people for my family’s Secret Santa. It’s short, simple, and not-error checked or bug proof in the least.


//Build the two arrays. I could in theory use a single array and double it but I was lazy and just defined it twice.
$giver = array('Rudolph','Donner','Blitzen','Santa');
$receiver = array('Rudolph','Donner','Blitzen','Santa');

//Randomize the two arrays

//We're going to iterate through the giver array for the individuals.
foreach ($giver as $g) {
	//Make sure that the giver and the receiver are not the same person
	while ($receiver[0] == $g) {
		//Shuffle the array to randomize it.
	//Grab the first person off the receiver array
	$r = $receiver[0];
	//Echo out the result
	echo $g." - ".$r."
\n"; //Remove that first person from the array, so we only have ungifted people remaining. $receiver = array_slice($receiver,1); }?>

So nerdy. Maybe later I’ll do it as a javascript snippet.