If I


"If I" is a one-man comedy special by Demetri Martin. The central theme of the show is organized around the following quote:

The un-examined life is not worth living.

It's very introspective and there are more than a few places that I can relate to. Particularly the fourth meaning of "if" when Demetri talks about using a points system - something I wrote about in "Keeping a Progress Log".


3 tips for overcoming procrastination

My three tips for overcoming procrastination are:

Break large tasks into smaller, actionable steps

Starting any large job can be overwhelming. It's easy to procrastinate when there seems like far too much to do.

A good first step is to break down the task into smaller and smaller pieces until you feel comfortable. Even if the task is relatively simple, dividing things up can help get over the initial hump.

The tasks don't have to be major parts of the project, and depending on the work required,there's usually no need to break every single thing down at the start either. Overly-complicated planning is another way to procrastinate on getting started.

A useful rule of thumb is to make each step a specific question that can be answered with a "yes" or a "no" to signal if it's done. "Organize notes" isn't as clear as "gather my notes for project X into a folder".

Use time boxing

Time boxing is the process of setting aside a set amount of time to work on a task. It doesn't have to be a large amount of time - sometimes working just 15 minutes is enough to break the deadlock and start making progress.

If I've been procrastinating on something for a long time, I'll deliberately keep the time short to get things going. It can be tempting to set aside a couple of hours, but this can make it harder to start as it looks like "plenty of time".

Make time for organization

I often find that when I'm procrastinating it means I don't have a clear enough picture of what I need to do. I might have do some research, read over more notes or just sketch out some ideas to clarify what the outcome should be.

Other times I'll already have the information I need, but if it's not organized where it should be it's off-putting to have to dig around for it.

Setting aside some regular time for organizing projects helps me to keep on top of things. I'm much more likely to start working if I know I can grab a folder with everything I need instead of having to search for things first.

Bonus tip: The two-minute rule

If a task comes up during organization that is going to take less than two minutes, do it there and then. Small jobs have a tendency to pile up and this rule helps to keep on top of them.


PADD

PADD is the first "proper" software application I ever wrote. I was 16 at the time and wanted to create a private diary on my computer, the wonderful Atari ST. Being a huge Star Trek nerd, I called it PADD (Personal Access Display Device).

It looked like this:

PADD main menu

It's not quite on par with the Starfleet version.

Despite its simple looks, there was a fair amount of functionality. It had a working diary, a notebook, an address book, and a lightweight tracker for finances. The application itself also had a login screen to prevent prying eyes, and all entries were stored on disk using a very simple encryption function.

I took some more screens which show:

  • The main entry screen
  • What an encrypted entry looks like
  • The financial screen

Unfortunately I don't have the source code available anymore. My talent for designing interfaces is about the same, but I'm pretty sure my coding ability has improved.


My run recovery routine

I got my start in running through the Couch to 5k program. It wasn't always easy, but it got me running on a regular basis. As soon I completed my first 5k I wanted to push myself further. However, once I started training for longer distances I was much more sore after my runs. Worse still, I was just as sore the morning after.

After a few too many days walking around with stiff legs, I spent some time researching recovery tips. This isn't medical advice, it's just what I've tested and works for me. I kept t simple so that I'd actually follow through with it.

Stretch when my run is done
I do a slow walk for a minute or two and then stretch my quads and calf muscles.
Drink something containing electrolytes
I've tried a couple of different sports drinks, and most don't taste all that great to me. Coconut water tastes even worse to me, but it contains less sugar than the other choices.
Shower
I wait around 30 minutes before showering. This gives me time to cool down so that I'm not still sweating once I'm clean.
Roll my legs with a foam roller
There are some pretty scary looking rollers out there, but so far a simple one has done the trick for me. 60 seconds on each leg is all it takes to work the knots out.
Wear compression socks
This is my favourite part. I got a pair of socks with firm (20-30 mmHg) compression which is fairly tight, but not uncomfortable. Once they're on I'll wear them for the day.
Avoid alcohol for 24 hours
This isn't a strict rule, but I find that booze hits a lot harder if I've run beforehand. It's also a diuretic which will slow re-hydration and recovery. I still have a drink to celebrate finished races though.

Out of all these, I've found compression socks reduce soreness the most - they're like a gentle massage you wear. After races and difficult runs I'll wear a pair of lower pressure socks overnight.


Styling my RSS feed

This is a little xsl stylesheet I put together to make my RSS feed look nicer when viewed in the browser.

RSS feed with styles

Creating the basic feed stylesheet

The full stylesheet lives at https://www.philnewton.net/feed.xslt.xml, but the basics are below:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html"/>

  <xsl:template match="/">
    <html>
      <head>
	<title>rss feed</title>
      </head>

      <body>
	<h1>
	  <xsl:element name="a">
	    <xsl:attribute name="href">
	      <xsl:value-of select="/rss/channel/link" />
	    </xsl:attribute>
	    <xsl:value-of select="/rss/channel/title"/>
	  </xsl:element>
	</h1>

	<div class="items">
	  <xsl:apply-templates select="/rss/channel/item" />
	</div>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="item">
    <p>
      <xsl:element name="a">
	<xsl:attribute name="href">
	  <xsl:value-of select="link"/>
	</xsl:attribute>
	<xsl:value-of select="title" />
      </xsl:element>
      <br/>
      <span>
	<xsl:value-of select="pubDate" />
      </span>
    </p>
  </xsl:template>
</xsl:stylesheet>

The important parts are:

<xsl:template match="/">
This builds the body of the document. It adds a <h1> heading that links to the main site, along with a container for feed items.
<xsl:template match="item">
This displays individual items as post links with the date underneath.

Adding the stylesheet to the feed

The following line goes after the initial <?xml ?> declaration.

<?xml-stylesheet type="text/xsl" href="/feed.xslt.xml" ?>

Adding the feed title

The page title can be added dynamically from the feed by replacing the <title> element with the following:

<xsl:element name="title">
  <xsl:value-of select="/rss/channel/title"/>
</xsl:element>

Tidying up the appearance

This step is totally optional, but I wanted the feed to look a little more appealing. This goes inside the <head> element:

<style>
 html {
     background: #eee;
 }

 body {
     max-width: 64em;
     margin: 1em auto;
     font-family: monospace;
     font-size: 1.2em;
     background: white;
 }

 h1 {
     margin: 0;
     background: #f6f6f6;
     padding: 0.5em;
 }

 .items {
     padding: 1em;
 }

 span {
     color: #aaa;
     font-size: 0.8em;
 }

 a {
     color: #0047b5;
     border-bottom: 2px solid transparent;
     text-decoration: none;
     transition: all 150ms ease;
 }

 a:hover {
     color: #005be8;
     border-bottom: 2px solid #005be8;
 }
</style>

And finally, I added the following to the <head> element to make the feed mobile-friendly:

<meta name="viewport" content="width=device-width, initial-scale=1" />

I don't think that many people actually visit the feed directly, but with this change it's a little friendlier when they do.