Matthew Lang avatar

Matthew Lang

Family guy and web developer

What's Your Notifications Strategy?

At any one time there are usually three devices sitting on my desk. A laptop, a phone and a tablet. They all have different apps running on them but some of the apps they use are for the same service. So for App.net I have an app running on my laptop, but a different app running on my phone and tablet.

Here's the problem. I haven't really paid too much attention to configuring notifications for each of the apps so sometimes I end up getting multiple notifications going off on the different devices for the same event. For example, in App.net when I get a new follower, I get an email notification in my phone as well as a notification from Felix, and also a notification on Felix on my tablet. Just little bit overkill if you ask me.

So here's my question to all of you. What's your strategy for dealing with notifications on multiple devices?

I sit in front of my laptop for most of the day, so ideally most of my notifications should come through there, but then what notifications should I enable for my phone? Are there any type of apps that you recommend I should completely silence?

If you've got any thoughts on this then please reply back to my original post on App.net or drop me an email here. I'd be really interested to hear your views on this.

Don't Wait

My wife mentioned the other day that she was thinking about her New Year's resolution for 2014. I said to her, "Did you keep last year's resolution?". "No", was the reply. In fact she freely admitted to never keeping resolutions.

"What's stopping you from starting now?", was my next question. It got her thinking and she's decided to start making plans now to implement some positive changes to her health and fitness.

Why do we feel the need to wait for a milestone to pass before we start something? New Year's resolutions are never kept. I never kept mine. In fact, it was only a few of years ago when I abandoned the whole idea of starting and keeping a New Year's resolution. I do keep a theme for the year that I can group goals under, but that's all it is. A theme for the year.

Don't wait.

Start now.

Write down what you want to achieve next year now and start making a list of next actions towards making those achievements. Do it now.

What's the point in waiting for a holiday or birthday to roll by before you start taking action? Age is just a number and so is the year. There's nothing special about them that will make you achieve your goals.

Get the notepad and pen out and start that list now. Start working towards your goals now. Get the jumpstart on the year and start it knowing you've already achieved something before the this year is finished and that the next achievement is just around the corner and not 12 months away.

New Year's Day is just another day on the calendar. So is today. Don't wait for the end of the year. Start now.

Am I Doing This TDD Thing Right?

I've been building web applications in Ruby, on a full-time basis, for a couple of years now. During this time I've been exposed to a number of different testing strategies and approaches. Test-Unit, MiniTest, RSpec, Cucumber, Steak and many more. I've used many of these test frameworks to some extent, but despite the many choices I have in this area, I'm still befuddled by the right tools to building a web application in Ruby using test driven or behaviour driven development. The Rails framework has shipped with Test-Unit for years but the most popular testing framework is probably RSpec.

In order to quell my confusion, I thought I would expand on the three approaches that I have used most often in my time using Ruby.

1. The True Agile Approach

Perceived by some as the holy grail of testing, and in some cases with an equally preachy opinion, is the true agile approach. Being part of an agile team with a customer on hand to flesh out user stories, daily stand ups, retrospectives. Just about everything that embraces an agile approach to building software.

In this approach, test driven development and behaviour driven development tools reign supreme. If your approach is TDD, you'll most likely be using RSpec or Test::Unit for testing all aspects of your web application. If your approach is BDD, then it's Cucumber all the way. This is pretty much a no brainer really. With so many hands available for development, it makes sense to always write tests first.

2. The Solo Developer Approach

The true agile approach is fine when you're part of a team, especially when that team advocates pair programming and you have a customer on hand to flesh out user stories. What if you're a developer with your own product or service though? You understand the business domain enough to eschew the behaviour driven development approach but you still want to test your product?

I had this problem with the early iterations of Journalong. I understand the business domain, so is it really necessary to use a BDD approach? Can I simply just switch to a TDD approach with Test::Unit or MiniTest?

I'm still on the fence about this.

3. The Side Project Approach

This is simple, and I embrace this approach 100%. No testing framework or just enough tests to handle the complicated stuff. Hacking on your own ideas is a good time to really explore the frameworks and languages you are doing. Getting these setup correctly with all the proper test frameworks can be a chore though. If it's just an initial idea or throwaway solution you're working on then why bother investing the time in writing tests?

I want to be a good developer and develop solutions that are thoroughly tested but when was the last time you just hacked on a bit of software to try something out? If I know enough of the framework and language to get by then I don't bother writing tests. It might take me an hour to come up with something or half a day, but if that's all it takes then why bother getting all the correct bits in place to test it.

There's definitely a time and place for testing strategies in development, where you're part of a team building a product or building a revenue generating product or service on your own, testing strategies can give us the confidence we need to ship code on a frequent basis.

For my own ideas though I would rather roll my sleeves up and get into the parts of the code I know or even try new things with a part of the language or framework I haven't used. Kind of like code exploring, filling in the blank edges of the map if you like.

Curtis McHale has invited his readers to write about their blogging history, so here's mine.

My initial dip into blogging was about 5 years ago with the then rising star of blogging platforms, Posterous. I started a blog with the great intention of posting at least once a week. What I was going to write about I was unsure which in turn led me to actually posting to my blog very infrequently. A bit of a false start then.

MindMapSwitch

With no fixed topic in mind and a checkered past of a software career with no expert knowledge in any one programming language or framework, I looked back at the other skills and experience I earned from my career. One particular topic jumped out at me. Mind mapping. This was the moment when my mind mapping blog, MindMapSwitch, was born.

I ran the blog on Posterous and kept the blog going with frequent updates in the region of once a week. After 18 months of posts I got to the point where I simply couldn't write anymore about MindMapSwitch. Rather than struggle on with finding new content on a limited topic with a limited audience, I decided to cease writing anymore posts for MindMapSwitch. The blog itself was eventually removed from the Internet with the shutdown of Posterous but I do have a back up of MindMapSwitch's posts.

From that point I moved on to focusing my attention on my own two blogs. I kept a blog for short essay style posts and I kept another blog for link posts. Both were initially hosted on Posterous, but I did move the blogs to Octopress for a short time and then onto Squarespace for a while.

Back to Octopress

At the start of this year I decided to bring the two blogs together and migrate back to using Octopress again. The pull to writing in Markdown and having more control over my blog was what I actually wanted rather than trying to dissect the templating language of another blogging host.

Faced with the start of a career working independently, I wanted my blog to the first thing people would see when they searched for me. At the same time I committed to writing an article every week day. Since doing this I've been steadily churning out content that been increasing my audience on a monthly basis.

Time for the stats

I used Google Analytics for over four years for my blogs, but since deleting my Google account, I've had to move to a different service for collecting my web traffic stats. I settled with Github's Gauges service in April this year. Although I've lost the stats from my Google account, it hasn't been until this year that my traffic stats have started to get really interesting.

Since April I've managed to increase my visitors and page views each month and last month I broke the 1000 page views milestone in a month. I'm also using my stats to spot patterns in popular content that I should consider writing more about. Popular content over the last few months have included articles on productivity, text editors and using Octopress, but by far my most popular post is about switching to Feedbin.

Where to from here?

So where do I go from here? My posting schedule of short essay style posts on the weekdays is working well for me, so I'm not going to change that anytime soon. I also usually post short link posts on a Monday and Friday which I will continue to do. I've got plans to include popular content pages for my blog and also write more technical posts around programming and software development.

I suppose the key thing is that I have found something that works. I'm happy with my posting schedule, my content and my choice of blogging tools.

I'm just another person trying to carve out a niche on the Internet really with their blog. As long as I'm gaining more and more interested readers, I'll keep posting.

Getting to Know Projects in Sublime Text

When I started using Sublime Text 2, I didn't use Sublime's projects feature. This year though, I've started to really get to know my preferred text editor and since then I now save all my code as a project in Sublime. It really does have some great advantages and with a little time it can make working in Sublime a better experience for you.

Sublime's projects are typical of projects in other text editors and IDE's. You open the folder that contains your source code with Sublime and then you can save that source code as a project.

When you save your code as a project you end up with two files. The first is the project file which contains references to folders for your project, project based settings and build commands for your project. The second file is the workspace. This is simply a file that tracks what layout you're currently using and what files you have open in each pane. Using the workspace file means that you can switch to another project, do some work and then switchback to your original project knowing that the layout and files you had open will be restored back to the state you left them in. Handy.

Opening Projects

Let's start with opening projects. You can open a project from the command line by using the project switch from Sublime's executable.

>> subl --project deathstar.sublime-project

Nice, but a tad too much to type. Rather than keying this out when I need to open Sublime, I prefer to alias the opening of a project file into a command that I can remember.

>> sds

Typing these three letters into my terminal to open a project is much easier than trying to remember where the project is and the correct switch for opening a project in Sublime. Now that we have our project open we can start tweaking the project file itself to make suit our needs.

There are three sections to the project file:

  1. Folders - You can define a single location for your project or multiple folders that make up a project. This also include filters on files and folders you might want to apply to each folder in this section.
  2. Settings - The settings in the editor can be changed on a project basis. If a particular language for your project requires different settings, e.g. tab size, you can define these here and the changes will take affect when you open the project.
  3. Build Systems - I tend not to use this, but you can keep a number of different terminal commands here that you can tell Sublime to execute without having to switch to the terminal.

Using Folders

Let's take a look at the most important section which is folders. Although this section is only small it can make a big difference to the way you work with your project and with Sublime.

The project file is just JSON and is fairly easy to follow even if you don't have that much experience with JSON.

{
  "folders":
  [
    {
      "path": "/Users/darthvader/code/deathstar-reactor"
    }
  ]
}

The path setting points to the folder that contains the files for your project. Most of the time you might just have one instance of this in your project file, but Sublime does allow you to have more than one folder in your project file.

{
  "folders":
  [
    {
      "path": "/Users/darthvader/code/deathstar-reactor"
    },
    {
      "path": "/Users/darthvader/code/deathstar-superlaser"
    }
  ]
}

I've been using multiple folders for a couple of projects now. I'm rewriting an application just now that uses multiple folders. For that project I included the old source code and the new source code in the same project so that I can refer back to the old code to lookup any old code.

Which leads us nicely onto names. Having multiple folders in your project can be confusing, especially when projects might have similar folder names or even the same name. To get round this, you can also define a name for each path in your project that will appear in the sidebar. This makes navigating code in your sidebar much easier.

{
  "folders":
  [
    {
      "name": "DeathStar - New & Improved Reactor",
      "path": "/Users/darthvader/code/deathstar-reactor"
    },
    {
      "name": "DeathStar - Superlaser x10",
      "path": "/Users/darthvader/code/deathstar-superlaser"
    }
  ]
}

Perhaps the most useful feature of the projects file though is the ability to exclude files and folders from your project. You are not going to need to see all the files and folders in Sublime when you are coding, so these filters are a great for excluding logs, temp files and other automatically generated files that are not typically needed in Sublime.

Excluding files can be done like this:

{
  "folders":
  [
    {
      "name": "DeathStar - New & Improved Reactor",
      "path": "/Users/darthvader/code/deathstar-reactor",
      "file_exclude_patterns": [
        "*.log",
        "*.pid",
        "*.tmp"
      ]
    }
  ]
}

And excluding folders can be done like this:

{
  "folders":
  [
    {
      "name": "DeathStar - New & Improved Reactor",
      "path": "/Users/darthvader/code/deathstar-reactor",
      "folder_exclude_patterns": [
        "tmp",
        "log",
        "solr"
      ]
    }
  ]
}

Switching Projects

Now that we have our project file setup we can get on with using it.

Because I now have a projects file for each project I work on in Sublime, I find it much easier now to simply switch to the project I need to work on, do the work, and then switch to another project. Switching between projects is as easy as Cmd+Ctrl+P if you're working on a Mac or Ctrl+Alt+P if you're working in Windows or Linux. This brings up a list of projects that Sublime nows about and lets you switch projects without leaving the application or returning to the terminal.

The benefit of this is that I only have one window open for Sublime and I can stay focused on the code that I am writing for that particular project. Having multiple projects open is distracting to me and puts me off my work.

I'm not currently using the settings or build systems for a project, but I am looking into running tests from within Sublime and adding these to my project files as build systems.

Getting to know how your tools work and making them work better for you is the key to getting the most out of them. Investing a bit of time in organising your code with Sublime's project files make organsing and working with even multiple folder projects a breeze.

Say Hello to Linkalong

I mentioned previously that I was interested in building a replacement bookmarking application for my bookmark collection on Pinboard. I wanted something a little more than just lists of bookmarks, I wanted more information when viewing an individual bookmark. Here's some things I wanted to see:

  • What else have I bookmarked from this site?
  • What else have I bookmarked with similar tags?
  • What did I bookmark before and after this?

In the last few weeks, I've been putting together my own private bookmarking application. So far I have enough functionality that I can use it on a day to day basis and it also includes some end points so that I can integrate it with other apps and services. So without further ado, here's a sneak peak of the sections that make up a bookmark page in my private bookmarking application, Linkalong.

Big title

There's no getting away from the title. It's big and bold. Lately I have been building web sites and applications with bigger text in them. A lot of websites have very small text which I am finding increasingly difficult to read. For this bookmarking application I wanted a big and bold title.

Markdown based notes


I love writing notes in Markdown. Even if my notes in my notebook sometimes have the Markdown markup in them. Crazy, right? Markdown's markup is just second nature now when I am writing. It makes sense then for the notes for my bookmarks to be written in Markdown and rendered as HTML.

Bookmarks from the same site

When I used Pinboard, I had tags for bookmarks from the same site. It allowed me to view all bookmarks from the same site. Although it would be easy to do with tags in my own application, I wanted to list bookmarks from the same site without having to tag all relevant bookmarks with the same tag.

Bookmarks with the same tags

Just like seeing bookmarks from the same site, I wanted to see bookmarks with similar tags.

Nearby bookmarks

Finally I wanted to see the bookmarks that I saved before and after this one. So at the bottom of the page I added links to those respective bookmarks.

Building Linkalong has been fun and it's definitely by no means finished. It's served two purposes for me. It's my replacement for Pinboard and it is a place where I can try out new things with an application that I use everyday. If you're looking for the whole page, you can view a screenshot of that here.

Thanks to Patrick Rhone for his initial indirect nudge to building this.

Switching to Trello for Project Management

I'm halfway through Curtis McHale's book on turning your freelance career into a viable business and one thing that has become clear through reading it is my lack of progress on products and projects. Given that I only use a single list for everything, sometimes projects and ideas get skipped at the bottom of the list. It's the out of sight, out of mind thing. If I'm not reminded of something on a regular basis, I usually forget about it.

In order to make better progress, I'm going to start using Trello for managing projects and future products. I'll still stick a high level task on my master list relating to the project, but all the details for it will reside in Trello.

The reason I picked Trello for this was my familiarity with Kanban boards and some experience I picked up working in an agile team a couple of years ago. Basically the idea of Trello is that you move cards (or tasks) across the board from left to right until the card is complete. In my case my this will be features, bugs, marketing and admin tasks.

Cards move through the following lanes that are typical of Kanban boards:

  • Backlog - All cards start here. Cards are prioritised on a weekly basis with the next card to be done located at the top.
  • Analysis - We do some background work on the card. What does it involve?
  • Development - Let's implement this thing with some nice tests and code.
  • Testing - We test it out in a secure environment.
  • Deployed - Once it's tested and ready, we ship the code for the rest of the world.

Moving cards across the board is a great way to see progress being made, and also with work-in-progress limits, I can stay focused on one or two tasks at a time.

Also I'm currently using Trello with a couple of clients for project management, so the switch from their projects to my own when things are quiet is easy to do and I'll already be familiar with the Trello environment. Seamlessly moving from client work to my own work is important. I don't want to have to adjust too much to a different workflow.

My grass roots approach to work still stands with just a master list for capturing everything and scheduling actions in my calendar. I'll capture a high level description of the project in my master list and defer the details down to cards on the Trello board. Any work I do will be blocked off in my calendar as just "Project X Work" and then when it comes to actually doing that work, I can pick up where I left off on the Trello board. When time runs out, I can leave a note on the card where I left off and move on without losing my place.

It all sounds well and good in theory, but putting it into practice over the next few weeks might not yield the positive results I'm hoping for. Still, I've got to give a try though, right?