Monday 02 September 2013

Recently I read an article about a somewhat curious approach to managing your email inbox dubbed Yesterbox (via SimplicityBliss).

The concept, as summed up by Tony Hsieh, Yesterbox’s creator, is simple yet powerful:

each day your to do list is yesterday’s inbox instead of today’s inbox

Excellent, a finite list of emails to reply to each day :)

This idea sounded intriguing to me, so I thought I would give it a try. It quickly became apparent, however, that it would be difficult to emulate in Gmail (my email client of choice) as there is no convenient way to view yesterday’s emails without performing a custom advanced search each time you want to view your Yesterbox.

The closest I managed to get was to perform an advanced search, filtering by “Date within 1 day of yesterday”. Unfortunately this resulted in emails from the day before and after yesterday being included in the search results. Not what I wanted.

Desired search
The search I wanted to perform with Gmail's advanced search
Closest search
The closest, actual search I could perform using Gmail's advanced search interface, which seems to actually be buggy

I then performed a cursory search on the internet to find a solution native to Gmail, but without luck. The first approach to fixing the problem that came to mind was writing a bookmarklet. So I did that. I like to call it Yesterboxmarklet, a bookmarklet that filters your email in Gmail so that you have a view of yesterday's emails only.

Try clicking Yesterboxmarklet to test it out (you need to be logged in to Gmail for it to work). If you like the results and want to try out the Yesterbox approach for a while to see if it suits you, drag the bookmarklet link up to your browser’s bookmarks bar to save it permanently. Give it a click. If all goes well, voila! Yesterbox in Gmail!

Disclaimer: I've only tested this on the latest versions of Chrome, Safari and Firefox on OS X. It's not perfect and has a few issues. For example, searches on the first day of the month work, but the "after" day in the date filter is 0, not 1. It also doesn't work on Chrome's new tab page, which is a result of security measures put in place by the Chrome team. Also, this bookmarklet went through many iterations and was more a pain to write than I thought. Currently it just opens a new window pointing to a page on this site that runs the below code. Any feedback on this approach or bug reports are most welcome.

 1   (function () {
 2     var now = new Date();
 4     var year = now.getFullYear();
 5     var month = (now.getMonth() + 1); // Javascript uses a zero based index for months.
 6     var day = now.getDate();
 8     var today = year + "/" + month + "/" + day;
 9     var yesterday = year + "/" + month + "/" + (day - 1)
11     var yesterbox = "";
12     yesterbox += "+in";
13     yesterbox += encodeURIComponent(":inbox");
14     yesterbox += "+after";
15     yesterbox += encodeURIComponent(":" + yesterday);
16     yesterbox += "+before";
17     yesterbox += encodeURIComponent(":" + today);
19     window.location.href = yesterbox;
20   })();


Saturday 11 August 2012

I’m currently sitting on a rocking chair, staring out the window at an overcast and drizzly Cape Town winter’s day having just gone through the trauma of experiencing a storm with lightening, thunder and even some hail! Actually, the distress continues (this storm is not over), however, it’s probably expected behaviour in such situations to be brave and forge on. And forge on I shall, but to calm myself down in this predicament a soothing cup of rooibos tea with honey and a session at the terminal pimping my vim setup is in order.

First a new programming font is required. Why? Because I read about one whilst doing something else and became immediately distracted. No doubt a font was found and installed thanks to Dan Benjamin’s Hivelogic blog. I’m saddened that I can’t get hold of Consolas (Dan’s number 2 choice) as it was my favourite programming font on Windows, but Inconsolata is great too and a worthy substitute!

Aah that’s better. Nerves are definitely feeling less jangly and tender, although what is really needed for blissful, Saturday afternoon, procrastination nirvana is a new vim plugin and I think I stumbled across just the one - vim-powerline. Vim-powerline provides you with a nicer looking, more functional statusline. If that explanation doesn’t get the juices flowing, the documentation on Github certainly will and is where you want to look for more comprehensive details on the plugin’s abilities.

Finally I felt like I needed to revisit another plugin - vim-rails. This one a classic from the legendary Vim plugin creator Tim Pope. I was missing the enhanced project navigation that this plugin enables with just one command :Rtags. With the help of exuberant ctags this command generates a tags file that Vim uses to allow quick jumping between different aspects of your code base. As an example, hitting ctrl-] with your cursor over a method call will take you to its definition. That is just the iceberg of what this plugin can do, so if you are a Rails developer go and install it and give some of its other features a try.

Alright, I imagine that’s probably enough for now as you are once again breathing normally. Possibly the shallow breaths of someone sleeping? If not, you might want to take a closer look at my Vim configuration which you can find on Github amongst my other dotfiles.

I hope you feel relaxed.


Tuesday 22 May 2012

Recently, thanks to tmux, I have been enjoying the experience of having the majority of my development toolset consolidated within a single terminal window, which provides me with a common, distraction-free work environment.

During Rails development I work almost exclusively within this workspace, but for some reason I have been reluctant to leave MacVim behind and transition fully to a text-only environment. I’m not sure of the cause of this reluctance as I don’t take advantage of any of the extra features provided by MacVim so I eventually took the plunge and started to use terminal vim. I’ve really enjoyed the experience so far, but today I believe I have found a tool that will make it difficult to go back.

If you use vim and tmux then I would highly recommend installing vimux. It is a fantastic vim plugin that allows you to send commands from within vim to another tmux pane in the same window, creating it if it doesn’t exist. One use case of this is to execute the current spec file that you are working on in vim in a new tmux pane and then whilst it runs you are free to navigate the file within vim. That is just one example and if it is not a clear enough explanation of the potential of vimux may I suggest the readme which shows some great examples of how it can be used. However, I read the readme and wasn’t immediately convinced so do yourself a favour and just install it. Copy the keybindings into your .vimrc and just give it a try. It’s great!

As there aren’t any details in this post about my actual terminal configuration and tools, feel free to get in touch if you would like to know more about my current setup.

Buy Quality Software

You won’t regret it

Monday 29 August 2011

I just started looking for some wireframing software to help me design a better user experience for a project I’m working on. I immediately remembered Balsamiq after having only ever heard good things about it and so I navigated over to their website, watched the introductory video, and read up about the features. Then I saw the price: $80…a fairly steep price tag for a piece of software that I only just realised I needed and that I might not use very often, but the thing is, I’m convinced that it’s worth it. Why?

I’ll be honest here and say that I was once a user of pirated software, but became more begrudging of doing so as I began to understand the value of what I was using. My evolution as a computer user is probably a fair approximation of many people’s history with the device; a kid with a PC running whatever software it came with; a student with zero budget where the thought of laying out my own money on hardware was a big enough decision to make me not even think twice about using pirated software if I needed to; a PC user who had just started to earn a reasonable income; and now, a working professional dependent on using a computer on a daily basis.

This evolution has allowed me to come to the realisation that buying quality software is an absolute pleasure. My previous modus operandi when looking for software for a specific task was to spend several hours (or even days sometimes) researching what was out there only to find that most of what I had come across *gasp* costs money. This research would inevitably follow a familiar path, starting with me trying to find the best free version of something that sounded like it might meet my needs (which was almost never the case), and ending in frustration, where I eventually just give up and decide not to pursue whatever it was I had intended to do in the first place. All of this to avoid paying what sometimes turned out to be a trivial amount of money anyway (how often have you agonised over a decision to buy a piece of software that probably only cost the equivalent of a couple of beers and will most likely come in handy every day, only to not buy it and then blow far more than that on a night out).

This all started to change for me when I bought my first iPhone. It was my gateway drug to buying quality software. $1/2 dollar applications were easily discoverable (most as recommendations from current, happy users) and provided utility that far outweighed their cost. It was purchasing these apps that started to warm me to the idea of paying for quality, something that I inevitably do when purchasing just about anything else. The intangibility of software sometimes makes it hard to justify the price, but just stop and think for a minute how much time you spend using a computer. I’m a developer and so for me it’s the majority of my time almost every day. The higher the amount of time spent, the higher the cost is of not using quality software.

Switching to using a Mac turned out to be the next logical step on my journey to becoming a happy software purchaser. The software available for the Mac ecosystem is, in general, extremely well thought through and user-centric. Much of it is also lovingly crafted by indie software developers. The software I have bought so far has been a joy to use and I feel like a more productive computer user as a consequence, which is of vital importance to me. When you start using software that works with you and not against you, you start to experience a new kind of appreciation for software that accomplishes this.

The message of this post may be perceived as: “in order to buy quality software, you need to become some kind of Apple fanboy who jumps at the opportunity to throw money at a problem”. That is not my intention at all. Whichever platform you happen to be on, seek out the opinions of your peers, take heed of the recommendations made by influential members of whichever communities you happen to be involved in and follow your intuition when coming across an “expensive” piece of software that is loved by it’s users. Sometimes the best solution is free (yay open source) and that’s great, but sometimes it isn’t. If that is the case, don’t feel rushed into making a purchase, mull it over for a while and figure out in your own time whether you really need that piece of software, and when you realise that you do, buy it!

Easy on the eyes

Monday 18 July 2011

Hopefully I am self aware enough to identify many of my faults, but one that any reader of the first three posts of this site would have been exposed to would be my somewhat lacking design skills. To resolve this wrongdoing I have taken inspiration from a colour-scheme that I have been using for a while now in quite a few of the applications that I use on a day to day basis (Vim/MacVim, iTerm2 and even OmniFocus) to update the look of my blog (yes, I know the design is still quite rudimentary, but I’ll get there one day).

The colour-scheme is named Solarized by Ethan Schoonover and has been making quite a few ripples amongst geeks on the web. I believe it really started spreading after appearing on Hacker News, but I could be horribly wrong about that. Anyway, regardless of how it came to my knowledge, it is really one of the nicest colour-schemes that I have used for a while. It also comes in a light or dark theme to suit whatever mood you happen to be in at the time (I’m talking about Solarized - the colour-scheme in this instance - not this site).

And so after a few months of use I thought why not apply it to this site to improve its looks somewhat. I think it’s an improvement and I hope you do too. If you spend any amount of time in a text editor/terminal/IDE, I strongly recommend downloading the appropriate theme and giving it a try. I’m sure your retinas will thank you for it. Also check out the official project on GitHub if you feel like porting the colour-scheme to your favourite app and sharing the love.

A CLUG meet up

Future conflict brewing between GNOME and Ubuntu communities

Thursday 10 March 2011

CLUG, the Cape Linux User Group, meets twice a month at the University of Cape Town to discuss the latest news impacting the Linux world. Recently I was lucky enough to attend a presentation given on a topic which is currently being heatedly discussed amongst people in the know.

Context: Linux? Ubuntu? GNOME!?

Linux is an open source operating system similar to more well known offerings such as Microsoft’s Windows and Apple’s Mac OS X. Each of these offers a unique experience which can be largely attributed to each ones representation of the desktop environment (the graphical metaphor used by each operating system to represent a physical desk). For most users of commercial operating systems, like Windows and OS X there is no option given when it comes to the desktop environment; there is no choice in the matter and you use what you get. This is not necessarily a bad thing, but the beauty of Linux is that this is not the case. In fact, almost the opposite can be said to be true for Linux as you are normally overwhelmed for choice. This has often been a stumbling block in the past for Linux’s commercial adoption, but recently with the help of Canonical (a company started by Mark Shuttleworth), a new flavour of Linux called Ubuntu has become extremely popular.

They have done this by making many choices for users that would previously have had to be made by the users themselves. This is not to say that the customisability and power of Linux has been removed from Ubuntu, but rather the whole experience has been made far more approachable for the regular user, whilst still giving the expert flexibility and choice. Since having recently moved to Mac OS X myself, I can say that both offer an equally compelling experience for all spectrums of users, regardless of computer literacy.

One of the major decisions that Ubuntu takes on the users behalf, is which desktop environment to present. As far as I am aware, this has historically been GNOME (arguably Linux’s most popular desktop environment next to KDE), but recently, Ubuntu have begun to build their own desktop environment based on GNOME called Unity, which is becoming Ubuntu’s de facto desktop environment. The current netbook edition of Ubuntu (10.10) already uses Unity by default and the upcoming release of Ubuntu’s flagship desktop edition (11.04) will use it too, completing the transition away from GNOME to Unity. Canonical’s decision to develop Unity rather than putting effort into improving GNOME has been viewed as controversial and seems to be driving a wedge between the two communities, causing uncooperative behavior where previously there was a collective effort towards a single vision. This decision and the ramifications thereof is the topic of contention to be discussed at this particular CLUG meetup.

Our story begins this fateful evening …

… down in the seminar room of UCT’s Chemical Engineering Building, where a projector screen makes its slow ascent into its resting position behind speaker Phil Bull. There is a palpable anticipation in the air as we await the final few stragglers. During this time we settle into comfortable seating, some of us descending into a world consisting of the content being served up by our smartphones, whilst others talk of the evening ahead. Although it has not yet begun, plans are already being made to further discuss the presentation over food and beer later in the evening. Just then an attendee rocks up in a Darth Vader mask and takes a seat. I begin to wonder to myself if this is acceptable attire for CLUG members. No one pays attention to the new arrival so I guess it is safe to assume that anything goes. I start to feel quite at home as the geekiness of the moment starts to envelop me and it is at this point that I’m glad to have discovered such a group.

The talk begins and Phil Bull, an astrophysics PhD student from the University of Cambridge, introduces himself. The topic for tonight is the widening rift between the GNOME and Unity communities. It is discussed from Phil’s unique perspective as an open source community member who contributes to both projects in the form of much needed documentation. From his vantage point, Phil can see the worrying extent to which the communities are becoming fractured, and just how hard this is going to make it for developers to maintain applications that work on both platforms.

Personally he is finding it more difficult to sustain his level of contributions to both projects as the two communities’ ideologies continue to diverge, and he seems to be coming to the sad conclusion that working on both will not be sustainable in the future. The tone of his presentation paints a seemingly bleak future for Linux and the end user experience that it offers, not to mention the difficulties facing developers and other contributors looking to build on the good work done by others. It’s fascinating to see that the open source world is plagued by similar issues to those found in the commercial equivalent.

Phil’s talk ends with a well deserved round of applause. He comes across as an amicable person who is extremely passionate about what he does, and he has a genuine concern about the well being of all parties involved in this latest open source conflict.

It is time for questions and although his presentation was unbiased and non-inflammatory, Phil still jokingly warns us that he is not here to entice a flame war. The questions posed to Phil are challenging indeed, but one of the most interesting to me is to find out which path he will choose considering he made it clear that he can’t work on both projects. His decision - GNOME. Sorry Canonical, but you seem to have lost a good man due to what sounds like a spiteful insistence to split the efforts of the community. Another challenging question arrives in the form of a request to further justify Canonical’s reasoning for their actions. Some in the crowd are unsatisfied with Phil’s earlier explanation given during his presentation, feeling it didn’t fully explain Canonical’s seemingly aggressive move.

Ubuntu, I am your father

“I think I would be better able to provide satisfactory answers to that question” quips a voice punctuated by heavy breathing from the Darth Vader mask, which is removed to reveal none other than Mark Shuttleworth! My timing in attending a CLUG session could not have been better as excitement is now at fever pitch … or perhaps that’s just me and this is just a day in the life of a CLUG member, as everyone seems to look suitably unimpressed. At least the mask-wearing enigma now makes sense to me. Not wanting to sway the direction of Phil’s talk with his presence, Shuttleworth donned the mask in order to hear the thoughts of the community.

Shuttleworth’s mind operates on a level far more advanced than mine and combined with my lack of background knowledge on the subject I find it difficult to keep up, however, his answers are well explained and eloquently expressed, allowing me to keep abreast of the debate. I am instantly convinced by his arguments and happily forgive him and Canonical of any potential wrongdoing, but of course the rest of the crowd was not going to let him off that lightly and further challenging questions are flung his way. Shuttleworth doesn’t miss a beat in answering any of them, and the impression I get from his answers is that they are all personal and not just a representation of his company’s position. He is questioned on many diverse topics: the legal implications of the software licences that Canonical employs (which seem to deprive contributors of their right to own the intellectual property created by their contributions); his opinion on the split in the community and why it came about; Canonicals apparent lack of giving back to the community they are only too happy to take from; and many others.

From my position as a completely neutral observer overlooking the discussion, I notice the dichotomy that exists between Shuttleworth and his contemporaries. The personalities in the room could not be more polar in nature. Although his peers are equally impassioned and intelligent, Shuttleworth comes across as a powerhouse, full of confidence and conviction in what he is doing.

As the debate rages I reflect on how incredibly smart and enthusiastic this room of people are. Here I am, having fumbled my way into a seminar room at the tip of Africa, which consists of one of the most influential people in open source, battling it out against his equally bright and passionate grassroots contemporaries. Although there are conflicting opinions and seemingly unresolvable arguments, I feel safe in the knowledge that open source can only become stronger with people of this calibre involved in its creation and direction.

Final thoughts

Although I may not have fully comprehended the entire debate, it was undoubtedly fascinating. If you are looking for a far more coherent explanation of Phil’s frustrations, check out his own blog post on the matter. There are also some fiery comments to his post that are worth a read to see the debate in action. Further commentary on Phil’s presentation can be found in the CLUG mailing list archives (Feb, Mar) where the discussion also continues. If your appetite is still not satiated, a Google search for GNOME Shell vs. Unity should do the trick.

I would highly recommend attending a CLUG event if you happen to live in Cape Town or are just visiting. The members are friendly and the topics extremely interesting.

Execution over ideas

Monday 07 February 2011

Lately I’ve been thinking quite a bit about execution over ideas. Not consciously thinking about it, but rather other ideas floating around in my head have sort of massaged themselves together into this one central thought. It is a concept stressed often in technology; one I’m trying to embrace. It’s hard. Especially when there is much to learn and time is so limited.

The creation and planned evolution of this blog feels like an ideal chance to exercise this concept in the real world (so to speak).

For example, I must have drafted up a first blog post a number of times. In fact, if I had to tally the number of initial drafts on my hands I would probably run out of digits. Besides drafting up an initial post, I also had the distraction of choosing how to distribute my thoughts. I tried setting up different blogging engines and even began writing my own one before deciding on the current setup mentioned in my previous post.


When it comes to execution, there is nothing better than being accountable in order to motivate yourself. Often taking into account “the quality factor” is a trick that the mind plays to distract you from executing. It’s often easy to delay doing something until “it’s just right” (a trap I’m frequently caught by). With that in mind I think a bi-monthly post of questionable quality is an achievable goal. The content might not be relevant or coherently explained, but practice is ultimately the only way to better yourself at anything.

A brief history of inspiration

Jeffrey Zeldman is a person that I greatly admire on the web. His fame has been documented elsewhere much more thoroughly than I could hope to achieve here, so I’ll just point you in his vague direction.

The reason I mention Mr Zeldman above is that it is my understanding that his blog started in an iterative fashion, one that I’d like to emulate. It literally started with content first and was then fleshed out from there by adding design and other features around it. An iterative process that over time has resulted in a blog that is followed by many at I personally found that particular insight into how he created his blog inspirational, however anecdotal it might be. It is an approach that fully embraces execution over ideas. Looks like it works pretty well.

A long time coming

Sunday 16 January 2011

As the title states, this blog post has been a long time coming. Too long in fact. I’ve deliberated over using a blogging service (like Tumblr) or building something from scratch using Rails. Neither choice felt quite right. Hopefully I’ve struck a decent balance by settling with Jekyll.

Jekyll is a ruby gem that allows you to write your blog posts in a markdown language of your choice (mine being John Gruber’s Markdown) and insert those posts into layouts. This seemed like a decent compromise. I get full control over the site (styling, hosting, content control, backup, etc) without having to implement something that has been done hundreds of times before to a much higher standard than I could probably achieve.

I’m sure I will become dissatisfied with some aspect of this setup at some point in the future, but for now I’m happy. As a software developer I struggle immensely with prioritisation. Setting up this blog has been a perfect case in point. Sometimes I wonder if I hide my procrastinating ways under the guise of perfectionism.

Hi, I'm Mark

I'm a developer from Cape Town and this is my blog, a little corner of the internet all of my own. It's not very cosy yet, but it's getting there.

I'm a latecomer to the wonders of Rails, a student of Ruby, an agile proponent, a lover of all things web, an Apple enthusiast and, occasionally, a runner.