The "Have Done" List

One incredibly important insight that I've gained after adopting the GTD approach to my life is as follows. Besides various "to-do" lists, you must maintain, preferably automatically, a "have done" list to review before bedtime.

(or every time you feel like a worthless loser – which is, more often).

I mean, just look at all these enormous "next actions" lists. You close one project, and it immediately entails another one. You tick off an item and feel like a winner for a fleeting moment – but the cunning hydra immediately grows two heads in place of the one you've cut off.

The "next actions" keep adding up.

Munk - Scream

Making a titanic effort, all I have managed to do is to limit the growth. There seems to exist a zero-point energy number of incomplete items, a natural limit that I am not able to break no matter what.

And perhaps that's normal.

But I hoped that getting so many things done was going to make me feel good – and it didn't. Now I seem to understand why.

For God's sake, let your soul rest in peace every night – review the list of the items you've managed to do today. Let yourself understand that you're actually achieving something in this life.

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

On the limitations of infinities

architecture-635687_1920

– Good afternoon, sir. Welcome to the Hilbert's Grand Hotel, where we take pride in being completely sold out all the time and still being able to accommodate any arriving guest. Can I help you?
– Yes, I'd like a room, please.
– My pleasure! Which room number would you like? Leveraging the power of transfinite sets, you can pick absolutely any one!
– Absolutely any? Are you sure?
– Yes, sir. Which room would it be?
– The last one, please.

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Three random facts about humanity

Curiosity selfie near the sand dunes on Mars
Selfie of the Curiosity rover (courtesy of U.S. NASA)
  • The closest distance to Mars is 54.6 million kilometers.
  • The diameter of the landing ellipse for the Curiosity rover was 20 kilometers.
  • If the landing site was the size of a dart board (225 mm in diameter), we would be throwing darts at it being 750 kilometers away.

That's the bare minimum you need to know about the current state of our space technology.

 

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

TaskMan v0.3.0 released!

TaskMan v0.3.0 brings along a lot of new features and improvements!

  • Tasks are now displayed in a nice tabular format.
  • You can also output (or import) tasks in XML, JSON, and CSV formats using the --format flag.
  • Several program parameters have become customizable, see taskman config.
  • Multiple task lists are now supported. The current list name is stored in the configuration file and can be changed using config list or list commands. For most operations, the target list name can be specified explicitly using the --list flag.
  • You can also specify (and filter by) task due dates using the --due flag, including a number of natural language dates like today, tomorrow, or this month.
  • Read-Eval-Print (REPL) mode is now supported via taskman repl (no need to type out taskmanevery time).
  • taskman clear is back! Rather than being a separate command, it is now an alias expanding to taskman delete --all --interactive.

Check it out, provide feedback, share with friends!

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Russian classics

I have just finished reading Nikolay Gogol's "Dead Souls", which act has only strengthened my belief that Russian classics are, in Shrek's terms, like onion. It is praiseworthy that the first couple of layers are removed at school, but a single reading would never be enough to reach to the pulp with its burning yet curative character.

I remember how we, being nothing more than little kids, treated the poem as a shallow, sketchy comedy with bits of sermon here and there, and hated reading "boring" literary criticism. However, it takes a grown-up to understand and appreciate the piece's contemplative power, and to startle at Plyushkin or Manilov's seeds inside their own soul.

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

TaskMan learns command line flags

TaskMan v0.2.0 is a major release that marks a number of changes in both TaskMan's philosophy and public interface.

  • The most notable change is the introduction of command line flags. For example, tasks can now be filtered by their completeness, ID, or description; the user can limit the total number of tasks to display, and / or can skip a given number of tasks in the output.
  • With the introduction of filtering flags, the way set and delete commands work has changed: you can now update or delete more than one task at a time. For example, taskman delete -i 5-10 will delete all tasks whose ID is in the range 5 – 10, and taskman delete --like remember will delete all tasks containing the word "remember" in their description.
  • To prevent shooting yourself in the foot, raw taskman delete and taskman update are forbidden without the presence of the --all flag.
  • taskman clear command is not available anymore. A semantically equivalent command is now taskman delete --all.

The release also includes many bug fixes and unit tests that allowed to discover these bugs in the first place.

For more details, see the release's README.md file. The archive can be downloaded here.

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

C#: get all instance fields of a particular type

While working on TaskMan yesterday, I have encountered the problem of how to get the values for all instance fields of a particular type. Giving more context: the future versions of TaskMan will make extensive use of command line flags. For now, I have made up my mind about only a few of them, and declared each flag as an instance field in my main program class (the Flag<T>  is a simple data structure I use to represent a CLI command flag):

At the same time, for one particular purpose irrelevant to the point of this post, I also needed to collect all flags into a collection of the base class type, Flag :

Of course, at first I wrote something like the following code in the constructor:

It didn't look good enough. First, it smells of ugly code duplication – I essentially declare things twice. Second, it's bug-prone: what if I add another flag and forget to update the collection in the constructor?

So that's what I ended up with, Reflection to the rescue:

Note how concise and human-readable this looks using Linq / Lambda syntax! You can even read it out aloud:

  • We ask the type TaskMan :
  • "Get us all your non-public instance fields,
  • where the field type is assignable to a variable of type Flag ,
  • collect values from each of these fields,
  • and cast them to the Flag type". 

Neat.

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Good code commenting practices

Admittedly, there is still an ongoing dispute with regards to what are the good code commenting practices, and whether one should use comments at all. I have first encountered varying views upon this matter at my workplace. This post is the result of my "search for the truth". It doesn't contain any original research (most of the credit goes to all the brilliant authors in the References section), but might be helpful in that it extracts the "juice" of other blog posts and provides several perspectives to commenting: 

  • the pro et contra of code comments;
  • the cases when commenting can (and should) be avoided;
  • how to refactor your code so that the comments are not necessary anymore;
  • the situations when commenting might be appropriate.

Continue reading Good code commenting practices

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

TaskMan goes public

After several days of restless coding, TaskMan's source finally looks like something I might not be ashamed of. So, as promised... This day marks the first public release of TaskMan, with binaries available here:

https://github.com/wh1t3cAt1k/taskman/releases/tag/v0.1.0

Currently, the applications' amazing functionality allows you to:

  • Add tasks with a given description text and priority level;
  • View tasks (different colouring depending on priority, WOW!);
  • Edit task parameters;
  • Mark tasks as finished;
  • Remove tasks one by one;
  • Clear the task list.

I guess you couldn't expect more. To learn more about TaskMan syntax, run the executable with the  --help  flag.

You will need at least .NET 4.5 or Mono Runtime 4.0.0 to run TaskMan: forgive me, but I could not resist using  nameof() in my code.

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

taskman - CLI todo list

Some time ago, while I was still a student at HSE (Moscow), I wrote a simple application in C# .NET to manage my daily tasks in the form of a CLI todo list. It was probably one of my first attempts at turning the knowledge that I was receiving at the University into something useful.

Last week, when I installed Mono onto my Mac, all of my old Visual Studio projects suddenly became accessible again; taskman was among them. Today, it becomes open source in case anyone wants to contribute or use it in their everyday life. With all the wunderlists around you, it is sometimes cool to "look like a hacker" and use a CLI.

http://github.com/wh1t3cAt1k/taskman

It was both funny and nostalgic to look at my old coding and commenting style. It was also a shame to push it onto github as it was, so what you see in the repo has been refactored to a certain extent, with a bit of a new functionality:

  • Shifted towards .NET 4.5 and C# version 6.
  • Command recognition and parameter extraction now uses regular expressions and group capturing instead of direct string comparison and ugly for-loops; all regex are compiled, which means everything still works fast.
  • All informational and error messages have been moved to a specialized static class to avoid magic strings in code.
  • Tasks are now displayed in different colour depending on their priority.

No binaries available yet, but I am going to release them soon after I return back to Russia.

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •