Maintain Color-Coded TODO Lists in Vim

Many Vim enthusiasts use Vim for pretty much all text manipulation in their daily lives. However, the plain text nature of this fantastic and powerful editor sometimes leaves a little left to be desired. For example, it would be nice to have your editor color code certain items in your TODO list for you, e.g. one color for items that are done in your list, another (hopefully a more provocative one) for those that aren’t done. I recently discovered a trick how to kind of make that happen in Vim, and I am sharing that here.

The first thing you need is some type of a marker in front of your rows that you want highlighted, so that Vim has a way of doing a RegEx matching against them. E.g.

[TODO] Write a blog post
[DONE] Goof off
[Nice to Have] Read a book

Here I have marked my rows with [TODO], [DONE], and [Nice to Have]

Next up, you need to invoke the following command in the command line mode:

:highlight MyGroupTodo ctermbg=red guibg=red
:let m1 = matchadd(“MyGroupTodo”, “^\[TODO.*”)
:highlight MyGroupDone ctermbg=green guibg=green ctermfg=black guifg=black
:let m2 = matchadd(“MyGroupDone”, “^\[DONE.*”)
:highlight MyGroupNTH ctermbg=cyan guibg=cyan ctermfg=black guifg=black
:let m3 = matchadd(“MyGroupNTH”, “^\[Nice to Have.*”)

Here is a screen capture of what it looks like in my current color scheme. Keep in mind that the appearance might be different based on what color scheme you currently have enabled, and you might have to change the colors of the matches to better suit your tastes and your color scheme. Furthermore, you can put these highlight and match commands in your .vimrc so that you don’t have to keep doing it over and over.

Being a visual person I appreciate colors and the ease of distinction that they provide. If that’s you, and you use Vim, then this is how you can do it. Look up :h match inside Vim for more detail. Notice that, in contrast to the example in the Vim help, I have used more specific regular expressions so that the entire line is highlighted – you might or might not want that.

A Sample use of Omnifocus for Ultimate Productivity

I have a lot of different interests, and I would like to keep improving my skills in all those areas relentlessly, for various professional and personal reasons.

I have spent a lot of time improving my productivity system that can enable me to actually make concrete, sustained progress in all those areas. Omnifocus is my tool of choice that I’ve settled upon now after trying a handful of other options. I basically follow Rachel Andrew’s suggestion (based on David Allen’s Getting Things Done), but over time I have further refined my system based on what I see/read online and what I discover about my own process and habits through weekend reflections.

My current system is as follows. Every week I’d set up weekly goals, evenly spread across areas such as tech reading, non-tech reading, health & fitness reading, problem solving practice through TopCoder and CodeWars, online courses, physical fitness goals, paperwork, goals related to improving my natural language skills, etc. etc. In the past I used to have some time set aside for all these activities every day, but it wasn’t feasible to attack all of them every day, and a lack of concrete goals resulted in me always missing things and falling behind. Then after struggling with getting everything done for a couple of years, accumulating piles of backlogs, and further inspired by Arnold Schwarzenegger (he has talked about his habit of setting goals a lot at a lot of places, in his books and during interviews), I switched to a goal oriented approach, and eventually switched completely to only using that, which in my case means setting weekly goals in all the areas I would have tried to hit every day earlier, and then try to accomplish those goals at any time during the week.

The advantages of doing this seem manifold to me – first, you have something concrete to show for it at the end of the week (e.g. finished reading this book, added that feature to that codebase, deadlifted these many pounds) rather than saying that you spent 60 hours doing ‘some stuff’ during the week. Second, it is relieving to know that there is nothing that has to happen every day, but rather that you have the freedom to accomplish the goals whenever you get/find time.

This is where Omnifocus comes in. To facilitate the above, I have set up folders, projects, and action items for all these individual goals. Some of them are one-time, some of them repeat with a given frequency (daily, weekly, monthly, quarterly, etc.). I try to use no other lists but only Omnifocus for recording/tracking everything. If I have an item that I am not sure about, or don’t know what project/context that item belongs to, I’d put it in the Omnifocus inbox, to be sorted out later. The weekly goals are reflected as flagged items in Omnifocus, which I can view all together using the context view. I use deadlines sparingly, as suggested by this post, but admittedly some items do have deadlines, and some have to be done regularly (so they implicitly have deadlines or dates associated with them). The items that are overdue or have concrete deadlines get my attention first, and then I move on to working on the flagged items set as  my weekly goals.

In addition to all of the above I have been learning to use Omnifocus contexts more effectively. For the longest time I had contexts in it that might as well just have been projects on their own – e.g. ‘coding’, ‘admin work’. But I realized that it’s better to use the location/place where you’ll get those items done reflected in the contexts. Now I have moved on to using contexts like online, offline, at-home-only, requires desk, outside, treadmill (yes, because I can watch videos from Lynda or Coursera on a treadmill!). I find it so much more effective because being able to knock out similar tasks that can all be done at a given place, in blocks of time, without context switching, is so much easier and more efficient. Finally, I also have one context called most-important-items, which helps me focus my energies on a handful of items (mostly three) at a given point in time. I got this idea from this post.

Our lives are becoming more and more information heavy, and there is a great opportunity to live a very ‘rich’ life in terms of the various things we can do. If we are organized, we can do so easily, effectively, and in a sustained manner.

Best of 2016

As is the tradition of many technologists, I am writing about some of the best things that I discovered or did in 2016. This post is a little bit late, but I discovered a lot of great things in 2016 that I believe deserve to be shared.

Total books read: 50

Best non-technical books read
Michio Kaku – The Future of the Mind: It’s nice to know what science could bring to our lives. Dr Kaku is a visionary and while I find many of his predictions very ‘out there’, he is very comprehensive in his style and claims, which makes his books a delight to consume

Best technical books read
Kenneth Reitz & Tanya Schlusser – The Hitchhiker’s Guide to Python: Best Practices for Development. While not for the beginner, if you use any modicum of Python at your day job and have been churning out code in Python for a while, I highly recommend grabbing a copy. It walks you through some of the best practices as well as the best known and highly used libraries out there, which is a must have in your toolbox

Best technical videos consumed
Kent Beck’s ‘livestorm’ about convex and concave software projects

Best new technologies discovered and used
Docker: containerization is very hot right now
WebSocket: A technology for maintaining full duplex communication between peers
Nginx: A powerful and scalable Web server

Best new languages discovered and used
Lua: A lightweight but very powerful ‘glue’ language

Best new hardware acquired and used
Pok3r keyboard (it has clear keys; and I am not sure whether I like it better than my DAS keyboard with blue keys, but it’s still pretty nice), Steelcase Gesture (finally got onto the bandwagon of expensive ergonomic ‘programmer’ chairs), Amazon Echo

Best new apps discovered and used
Productive (iOS) – a nice way to build habits – you can select one of the built-in habits or add your own, and you can select icons, frequencies, etc. It’s also nice to be able to view stats on the individual habits to see how well you’ve been doing
CleanMyMac (macOS) – does a good job of cleaning up extraneous files left over by installers and the system itself

Best new fitness videos consumed
Fittest on Earth (Netflix) – an incredible, candid look at the Crossfit lifestyle

Best new workout technique discovered and used
Zottman curls – a comprehensive arms exercise that targets both the biceps and triceps

Best new nutritional supplements discovered and used
Creatine and magnesium. I can’t believe I’ve lived this long without these. Definitely game changers

Areas of Technology that I Find Interesting

New areas of technology emerge all the time, and they change the educational and workforce-related landscape along with them. Here’s a compilation of some technologies I’ve been hearing about that speak to me and that I’d love to be able to contribute more toward.
1. Inexpensive space travel- something along the lines of SpaceX’s mission, so that we can become an interplanetary civilization, enabling our posterity to better handle unforeseen calamities and issues that might arise on Earth in the future owing to population growth, fossil fuels running out, etc.
2. Doing big data analysis and data science on data from the environment, and being able to use that analysis for the betterment of the environment.
3. Controlling robots or avatars through our brains, in order to be able to navigate areas impossible for humans to tread, such as radiation heavy areas or deep space. Dr Michio Kaku’s book The Future of the Mind provides an excellent explanation for this use case.
4. Alzheimer’s research. In the book mentioned above there’s a lot of discussion about active research happening toward controlling the growth/ decay of the human brain and what we can do about it.
5. Doing big data analysis and data science on data from the fields of astronomy and cosmology, and being able to use that to explore new territories or provide answers to long-standing open questions in astronomy and cosmology.

What’s next?

Technical Diversification vs Focus

I believe that there has to be a delicate balance between diversifying in the types of technologies one is familiar with and the types that one really goes deep into (the so-called T-shaped career).

Technology is growing at an exponential rate, but you cannot work all the time. You want to have time for family, friends, life and living, and for having some fun. At the same time, as the demands at work change, we have to be able to learn and adapt to new technologies and sometimes entire new technology stacks and ways of thinking. Learning new things also expands our horizons and introduces us to new ways of thinking that we didn’t think possible before.

I propose learning very selective technologies across very varied technologies. Let me explain. I propose learning a single example from many different kinds of technologies. For instance, when it comes to text/ coding editors, there are many out there. Instead of mastering the Vim + Tmux + Zsh stack along with mastering EMacs (both those stacks will get you at the same place), take a pick, and that then becomes your old school programmers’ editor that you can use in any lean, remote environment uniformly to mercilessly manipulate plain text fast. After you’ve done that, move on to an advanced IDE, such as Jetbrains CLion or IntelliJ.

Likewise, learn one todo app really well – be it Omnifocus, Wunderlist, Things, or whatever, but don’t bother learning all of them well. Learn one object oriented programming language, one mid-level language, one concurrent language, one functional language, etc. really well, but don’t read 5 books each on both Java and C#.

There are areas where you should diversify (different programming paradigms), and there are areas where you should accumulate your several thousand hours (text editor) so that you can burn those keyboard shortcuts in your fingers and make those muscle memories. Time and energy are limited resources after all, and as our lives become busier and busier, this kind of prioritization remains the only option, so that we can keep learning the right kinds of new things and keep sailing forward smoothly.

What I Learned in 2015

A bit too late for this kind of post, but I wanted to put it out there anyway. 2015 was once again a great year full of reading, learning, and discovery. Here I summarize all that a little bit. I read 50 books in 2015, which is a personal record. Here’s a list: Books read in 2015. Looking at this list, the lesson learned is to read more technical books (computer science/ programming) in 2016. I watched a large number of technical videos online again – upwards of 50 – with many new Lynda and TUTS+ videos. I got certified in 5 Coursera courses, which is also an improvement over the previous years. In 2015 I did not dedicate sufficient time to open source/ personal side project coding, as reflected on my GitHub account. In 2016 the plan is to correct that and increase the number of contributions throughout the year. Although I did manage to reach out in the community a little bit, visiting Data Day Texas (thanks to work). I met some famous developers and thinkers from the community there, which was fantastic. As far as new technology is concerned I started learning Java 8, which holds a lot of promise for the future. I bought and got into some new gizmos, like always. I even began dabbling into Arduino and IoT, despite initial misgivings. On the personal fitness side, in 2015 I started lifting old-school, with lots of deadlifts, push-presses, clean and presses, bench presses, and squats. I also got started with some recovery techniques like foam rolling and deep tissue massages. It’s been a great thing so far and I plan to continue that this year, hitting more and more personal records. I also got to travel a lot in 2015, exploring a little bit more everywhere. Hoping for more substantial improvements in 2016.

Easy Ways to Help the Environment

I recently read a book on Elon Musk, in which one of the motivations behind SpaceX is revealed. That motivation is, that given that Earth might soon become uninhabitable for humans because of several reasons, we must make it easy and inexpensive to travel to other planets, with a view to eventually colonizing them. That motivation appeals to me a lot, although unfortunately for the foreseeable future I’m not going to be directly involved in any such endeavor.

Continuing this train of thought, one of the reasons contributing to the unsuitability of our home planet to sustain life any further is of course climate change. I also read Unstoppable where Bill Nye (the Science Guy) does a marvelous job of explaining how to use technology for a cleaner environment, at the same time debunking detractors and elucidating why the topic is so important. Finally, Arnold Schwarzenegger recently wrote something vehement urging people to take serious action toward ‘terminating’ climate change.

All these factors made me start looking for ways in which I can contribute every day toward the betterment of our Pale Blue Dot. It wasn’t difficult. I came upon 50 Ways to Help, a beautiful compilation of no-brainers that people can incorporate into their everyday lives in order to make a difference. While some of the suggestions aren’t very practical for my particular profession (e.g., if I shut my computers down every night instead of putting them to sleep/ hibernate, I’d be spending a ton of time every morning bringing them back to the state they were in the previous night in terms of applications open, programs running, etc. Also, I walk to work, and everything else is too far/ too inconvenient to bike, and I can’t use a bike for groceries etc.), most of them are very easy to implement.

As it stands, for now I’m resolved to regularly do the following, as my way of saying ‘thank you’ to our home in the Cosmos:

Use CFLs, don’t rinse dishes before putting them into the dishwasher, recycle as much as possible (was already doing this), eat only vegetarian some days, only launder full loads in the machine, launder on cold or warm (not hot), use fewer paper napkins, use both sides of paper, use reusable water and coffee containers, take shorter showers, take fewer baths, brush teeth without running water, use cruise control, occasionally buy second hand mechanical and electric equipment, buy local (to reduce fuel and pollution needed to get you the stuff), keep vehicles maintained, de-clutter and donate, use e-tickets, prefer downloads over compact disks (who uses optical disks anymore anyway), and go paperless

Earth is our home. And for the foreseeable future, given the current state of technology, our only home in the Cosmos. For better or for worse, Isaac Asimov’s Foundation-level civilizations spreading across galaxies, where space travel is the norm rather than the exception, do not exist, and aren’t likely to exist for a very, very, very long time to come. As Bill Nye would say, let’s treat the planet as our owned house, and not as a rental apartment. Let’s take good care of it. Only good things can come out of a pledge to do something about climate change right now, and we can all make contributions without changing much in our everyday lives.