Category: Productivity

VIM plugins for web development

Recently I bought a new laptop, and while configuring my tools I noticed I haven’t cared about VIM plugins for years. It was the perfect time to have a look at the most interesting plugins.

Firstly I installed Pathogen to manage VIM plugins. It allows you to install other VIM plugins in separate directories. This way you avoid the mess the .vim directory can become.

vim plugins
Regarding general plugins, I installed NERDtree which is a directory tree explorer, ideal to keep a general view of your project. Also installed Airline, that shows an improved status bar with lots of information about the current file. However I couldn’t see it at first and I had to add the following line in my ~/.vimrc file.
set laststatus=2

If we speak about writing code, the most useful plugin you can install is SuperTab, which improves auto-completion with the tab key. This one works really well in pair with Ultisnips, that (as it name suggests) allows you to save snips of code and recall them later. I also added to my list the transparent Skeletons plugin. If you create a new file, this plugin gives you a template to start with, depending on the type of file you created.

Time to have a look at web development. In order to work with HTML, I installed matchit (a classic) but also HTML5, which adds omnicomplete funtion, indent and syntax for HTML 5 and SVG. As sometimes I use less to write improved CSS, I added Less, a single file with syntax.

The PHP programming section is based in the PIV (PHP integration for VIM), which includes various plugins. Actually I disabled some of them, just to meet my needs. Finally I added Syntastic: every time you save a PHP file, it automatically checks it with PHP’s lint (finds grammar errors), PHP Code Sniffer (alerts style errors) and PHP Mess Detector (suggests improvements), showing the results inline.

Am I missing any other basic plugin? I guess not, as with these tools I feel really backed to develop any project.

Update: I forgot to list xDebug (an interface for PHP’s xDebug).

Keeping on your daily routines

tl;dr Use Routinely (android app) to keep your routines. Or Coach Me if you want to be social.

While living in Korea I used everyday ankidroid (an android app for anki) to learn and retain Korean vocabulary. The key point is use it day after day so your don’t forget what you are learning. But after I came to Barcelona I noticed I didn’t keep that routine.

How can I keep a routine? I guessed there should be some kind of app that can help me. After asking about it on twitter and doing some research I listed 4 candidates: Habit Streak, Routinely and Coach Me.

Actually I got more suggestions, but I tried to find an app that perfectly matches my needs: small, with a list of routines (things I should do everyday) to tick, and some kind of alarm that alerts me when the day is over and I didn’t finish all my routines. I didn’t want just another ToDo app. So here goes the review…

routinelyI tried Habit Streak, but found out the UI is really bad (you need to go to a submenu to tick a routine!). So I discarded it and tried Routinely: surprisingly it matches my needs. It is visually clean, with an easy interface; and comes with alarms for every routine and a widget with the number of remaining routines to do.

As I found what I’m looking for, I didn’t review any other app and started using Routinely as soon as I installed it. It’s really helping me to improve my productivity.

Actually a friend suggested me Coach Me, and it looks quite similar to Routinely, but with a social layer (“share with friends”). I guess one or another will be better for you depending on your self-control skills. If you need to show people your skill as a way to force yourself to improve, choose Coach Me. Otherwise Routinely will be good enough.

Tracking your time while working

Years ago, when I started remote-working, I realized I needed to be extremely serious with my work-time. If you work at home it’s absurdly easy to get distracted with housework around you. Or open facebook again (but thanks to a firefox plugin, Leechblock, that never happens again).

hamsterI thought I needed to track my focused time somehow. Despite there are online tools for this task, like RescueTime, I wanted something in my desktop. So I first gave a chance to Hamster-time-tracker. It comes in all linux distros, so installing it is simple, but for the best results I suggest you to set it to run at startup.

The good thing of Hamster is that it’s simple. Choose the task and start tracking. It can show you summaries with all kind of information (useful to report to your boss), but if you need anything more elaborated you can even get the raw data yourself, as it saves the tracking details in an standard SQlite database (in linux, ~/.local/share/hamster-applet/hamster.db).

I used Hamster for years, in a sick detailed way: a kind of micro-tracking. For instance, if I go to the toilet, I stop the clock; if I go to the kitchen to brew some tea, I stop the clock. This way I started to understand how I really work. In my case, in blocks of 1~1.5 hours. Also I realized that getting more than 4~5 hours of real focused work per day is impossible. Finally I understand some days I’m really productive (5 hours) while others I’m not (30 minutes).

Recently I updated my laptop and wanted to test an even better time tracker. With Hamster I can’t create subtasks easily. When working in a project, all of us start defining tasks, and splitting them into subtasks. But it’s also very common to discover, while working on a subtask, that you need to split it again. Or create an extra one, or…

task coachI started using Task Coach, which allows you to split tasks anytime, while tracks the time. You can even track time for a particular subtask or for a task (sometimes useful when you are doing small stuff). You can set tasks as active, inactive or completed, and easily filter them to see the big picture or the detailed view.

Whatever you do, you may want to improve. And the better way is to track how you work, as a first step to have data (metrics) to analyze and improve. In my experience, tracking the time you are working focused helps you to see how well (or bad) are you doing and rewards yourself (or punish yourself) seeing the data.

Links about quality website development

Just for reference, here I’m writing down some interesting links I’ve recently seen about quality while developing and maintaining websites.

That’s enough to keep me busy for months. But these days I’m also trying ideas, using CSS3 and HTML5 features, so I’m using a lot what it could be the best website with compatibility features.

Deal with soft SPAM

Adverts are everywhere. And they try to get your focus at all prices. I hate that. Even these days, that in theory they send you proper tailored adverts matching your needs, I get annoyed… because actually you just get SPAM.

Moreover, in Internet we have something that I call “soft SPAM“, that basically doesn’t sell you anything but disturb your focus. I’m speaking, for example, about the “Who to follow” block in twitter or “Recommended pages” in facebook. It might be useful when you create a new account, but it is totally disturbing in your normal live activity.

Do you want to remove the “who to follow” block on Twitter? Just use Addblock (a plugin for Firefox, Chrome, etc that you MUST have) and create a new filter, with the following line:

In case you want to remove Facebook’s “Recommended friends/pages” block, just use:

After that, you live will be a bit easier ;-)

Focus on week basis

Sometime ago I decided to arrange my free time during the week (mostly evenings) with my hobbies and things to learn. I set each week day with an activity, like Monday for climbing, Tuesday for composing, etc… It doesn’t really work. The problem is that you have to wait a full week to do the activity again, so you lose the focus. And if you miss the day for some external reason, the problem is worse. Moreover, this method only allow you to have 7 different things to do, and if you change one, you have to remember the change…

So I had an idea: a single subject for each full week. On Sundays, in a relaxed way, I can decide the subject for the new week. And it’s not a problem if one day I can’t do it, because the idea is to try to focus on that subject as many days as you can, during that week. For example, this week subject is “Learn Blender“… so far so good, despite I’ve just spend 2 hours fixing a bug in this website (that is, something not-related to Blender).

For the future, some examples of subjects I have in mind:
– Refresh my C++ programming, maybe take part in a contest, or read some open source code (i.e. Inkscape code).
– Compose 8 songs, based on the I Ching’s 8 trigrams.
– Explore all the menus of Inkscape.
– Do something with my first bought domain,
– Help a friend to create a website for displaying Hex game records.

Facebook, or waste your time channel surfing

Have you ever feel how fast the time goes by when you do some channel surfing on TV? “I spend 2 hours in front of the TV, changing from one channel to another, and finally I’ve not seen anything at all”. I had this thought of “wasted time” while surfing on Facebook recently.

Fb, the origins
I logged in on Facebook some months ago, but I didn’t understand the meaning of the website at first. I came from social websites that focus on one thing, like Flickr (pictures) or (music listened), so it was a bit weird to see a social website which end is the social relation itself, without a “theme”. Moreover the only friends you are supposed to have there (and to let them see your profile) are just the friends you currently have in Real Life, so basically Facebook aims to be a copy of Real Life society. So don’t expect new friends, just expect to see what your current Real Life friends are doing… but basically you can do so with other methods, like IM. I mean, when I use Internet, I don’t expect to see a mirror of Real Life, I expect to see different things, improved things… or just surf Wikipedia.

Fb, closed to foreigners
Another surprising thing is that your profile is private, a random net user can’t see it, unless he is your friend. This “closed” philosophy as default annoyed me. It could make sense, to keep your data from public. But coming from websites where you add content, mostly public (like photos in Flickr), and let the world see your stuff, this philosophy is at least paranoiac. Of course you can mark pictures as private in Flickr, and you can open your Facebook profile to everybody, but how many people do so? How many know how to do so? The default settings are the ones that show the website philosophy.

Fb, the false sense of security
Despite it claims for keeping your stuff away from foreign eyes, there are a lot of back-doors to overpass the private settings. The easiest one is just see Mr.X friends list, and look for one with open/visible profile, let’s say Ms.Y… then you can see pictures tagged with Ms. Y, even from the Mr.X picture sets… finally you get full access to Mr.X pictures. Another way is creating an application, using Facebook API: when somebody uses your fancy app, you can get FULL access to all his data, and can (for example) save it in your personal server. So you only need to create a small test app (“How freak are you?”) to harvest a lot of private data.

Fb, trying to create content
Of course in a social website without theme there will be less content created, and user will come back less often. Therefore Facebook staff have to help people to produce content, in order to induce other people to revisite the web often. One way is acting as an “aggregator” (gets content from other web2.0 places, like Flickr or, and publish again in user’s page). Other is creating an API to create applications. 3rd part developers come to create apps, salivating by the amount of possible users for their apps, and Facebook is happy to see more stuff in his system. I created a couple of Facebook apps and I can claim that their API is a torture. Basically they don’t let you use libraries, like jQuery, so you are forced to write old style code. Later you discover you can ignore it and create an iframe for your app… so that means your app is not a real Facebook app, just a nice Facebook frame that borders you website in your personal server.

Fb, a waste of time
So, I can guess that the 80~90% of produced or pseudo-produced content in your profile (or friends profile) is low quality. Do you really need to know that your old friend from school Harry loves chocolate? Nah!

Of course Facebook has good things: the content aggregator and a way to publish things neither short nor long in a fast way… but for such things you can use a better website, like Friendfeed.