Skip to content

The Evils of Global State and Singletons

In this Google Clean Code talk, Miško Hevery presents the evils of global state, how this relates to Singletons, testing and what to do about it.

Questions starting at 31:20 are pretty interesting.

Email Minimalism

For years I have struggled with organising my email in an effective manner.  Most of my attempts until recently involved lots of email folders and mail filters and still I’d have difficulty telling the wood from the trees in terms of importance and feel swamped by the quantity of email.

My most recent system which I am very pleased with so far consists of only the following four folders:

  • Inbox – Only emails with me in the ‘To’ field, kept for three months.
  • CCed – Only emails with me in the ‘CC’ field, kept for one month.
  • Lists – Any emails that don’t have me in either the ‘To’ or ‘CC’ fields, kept for two weeks.
  • Archive – No filters put email in this folder, it is 100% manual, kept forever.

This system has made it easy to filter out the important emails (sent directly to me) from less important emails (which I am typically CCed on) or mailing lists (which seldom require any action).  I use the auto archiving (deletion) feature of my email client which allows me to automatically dispose of emails after a preset period based on the folder they are stored in.

I hope to phase out the archive folder sometime as I use Evernote to store any information I want to be able to find easily at a later date: as a purpose designed note/idea management application it is highly superior for the storing, organising and searching of data.

But I can write that in…

I have lost count of the times I have heard a developer exclaim ‘but I could write that in X days’ when discussing adopting an existing piece of technology developed somewhere else.   This is usually given as a reason not to adopt an existing external solution but to instead write a custom solution with some minor improvement or feature.  There are two big flaws in this line of reasoning.

The first is the assumption that you could create something with the same quality level as the existing solution in the stated number of days; most likely you will be lucky to have a functional prototype with minimal functionality.  It is highly unlikely that you will have produced something that is as well tested, optimised and documented as the existing solution.

Secondly, as developers writing software which we intend to sell to users to pay the bills, we should be focused on the core features that define our product.  It is these core features we should be pouring our energy and time into designing, building and testing.  Developing alternatives to existing technology that is not in our core feature set is a waste of valuable time and energy and will not differentiate our product from that of our competitors.

We should instead be looking to leverage as many established technologies or components as possible when developing new systems as this lets us spend most of our time where it matters most on our core differentiating features.

Journaling @ Work

Over the years at work I have tried various solutions to task management: the mental to-do list, the simple paper notebook, the electronic PDA or Smartphone, to-do software or combinations of the above.  I have until recently not found a solution that lets me list my tasks and record what I actually do each day.

My solution is the humble Moleskine Weekly Notebook (below).  As the name suggests the weekly notebook is a cunning combination of weekly diary (on the left page) and notebook (on the right page).  This allows me to write my to-do list for the week on the notebook page and record what I do each day on the appropriate section of the diary page.

Having my work log and to-do list in the same physical entity has been a real break-through for me as it means I can track my progress towards my objectives and be able to account for where my time is spent each day.  This has allowed me to analyse my working patterns and evaluate what is taking up time that could be better spent working on the tasks in my to-do list.  Being able to record unexpected events that have taken up time e.g. build breaks or sickness has also proven very useful.

What I don’t use this notebook for is an actual appointment diary or strategic to-do list as I have found through experimentation that there is seldom sufficient space for such things.  I have Microsoft Outlook which does appointment and calendar management and Evernote which does high level strategic tasks lists and note gathering.

80-20 Rule Wallpaper

I created the wallpaper below to remind myself about the implications of the Pareto Principle known commonly as the ‘80-20′ rule.  Click the image for the original sized version.