Reviving this blog

Yeah, I know, I kinda left this blog die a horrible death. I stopped having time with changes at work (more responsibilities), bigger family (new baby) and various computer problems.

With the new year coming up, I decided to revive this blog. But there will be one major change: I’ll be using mostly Java instead of Ruby.

Amongst other things, this decision comes from:

  • having to learn a new language at work;
  • having played with libgdx and Android Studio;
  • simplicity on Windows (my main computer);

Portability will still be really important for me. Java already works nicely on a wide variety of OSes.

Let’s hope that the blog will stick this time!

Thanks for reading,


Introducing RTasker basis and vision

For the first project for this blog, I wanted something simple, quick and still useful. I decided to work on something that would allow me to manage recurrent tasks in Google Tasks since I could not find any simple way to do it. This is how RTasker (Recurrent Tasker) got created. In this quick post, I simply want to outline my vision for the project and a few more details about it.

Like most of my personal projects, this will be a Ruby command line application, only tested on Linux. One of the reasons why I want to do a command line application is to be able to run this as a cron job on my RaspberryPi.

The project is hosted on GitHub at calestar/RTasker. I’ll host the continuous integration/testing on Travis and code coverage reports on Codecov. I find that both of these are super easy to integrate into a public GitHub project, have nice features and are free.

I want to keep this project as straightforward as possible. I’ll limit the configuration to two files: one for the secret keys for Google Tasks, the other one for the tasks. Since the data to store the keys is really simple, I’ll use a simple YAML file. The second file, containing the tasks, will be a DSL-based file. This will make it easier to handle special cases. Amongst other things, I want this file to contain:

  • The time when the task is due (in a perfect world, this would be written in English as much as possible, like “last day of every week” or something);
  • The time before the task is due I want it created by the tool;
  • A category, name, basic things like that.

As for the command line tool part, again, I want to keep it simple. I’ll go with two simple commands: check and ensure. The check command will do as it names implies: check if all the needed tasks exist. The ensure command will create all those that do not exist. These two should be enough to handle most cases I need.

Right now, I plan on supporting only Google Tasks for the management of the tasks. Once everything works with local files, I’ll move the file containing the description of the tasks on Google Drive.

If you have any idea that could make this even more useful, feel free to comment. You could also directly create an issue on GitHub, or better yet, do a pull request 🙂

Thanks for reading,  Js

First project: Handling recurrent tasks in GoogleTasks

When I started this blog, one of my goals was to push myself to work on more personal projects. While setting things up for the blog I wanted to start tracking things I need to do using Google Tasks but had trouble handling recurrent tasks. Basically: they don’t support recurrent tasks.

That gave me the idea for my first little project: a simple script to handle recurrent tasks. Basically, I want to go for a flow that roughly looks like:

  1. Build a configuration file to describe the recurrent tasks I want; In there, I’ll describe at least:
    1. The task, aka name, description, etc.
    2. The period (every month, every first Monday of the month, etc.) and the deadline;
  2. Have a script to ensure that the tasks that are currently needed are created (or completed already);
  3. Run said script in a cron task on my RaspberryPi;

I did try to find a clean way of doing this. Some people do it through recurrent events in their calendar, but I really wanted tasks, not a weird workaround. I know I could use some other tool, but I’m trying to get in touch with Google services and I felt like this was a nice-enough reason to start looking into these.

Once I get the basic flow working, I’ll also be able to piggyback on this small project to do a little something with my GPIO setup or play with an Android App. I’ll see once I get there, there are still quite a few things I want to do before getting to these subjects.

I haven’t even created the GitHub project yet, I’ll do this and the basis of the script this week and update my blog next week!

Do you know of anything that allows recurrent tasks in Google Tasks? Is there anything you’d like in a tool like this?

Thanks for reading!

* Update: more information about the project in a new post: Introducing RTasker basis and vision

Why I use Ruby?

A few years back, for whatever reason, I needed a command line tool. Therefore, I started looking at the few of the scripting languages I knew about: Bash, Perl, Python, and Ruby.

Writing anything complex enough with options and everything is a pain in Bash, so I forgot about that one fast enough. Then I looked at Python and Perl … something about the feeling of the language, the way to use it and the code conventions broke the deal for me.

Even now that my job requires that I write in Python, even with the knowledge of the tools and libraries around the language, I still don’t like the language, the tools, and environment. In all honesty, it could have something to do with the fact that I use it on Windows … I assume even Ruby on Windows would be a pain.

Finally, I discovered Ruby. My first introduction to Ruby was through Build Awesome Command-Line Applications in Ruby. The book is basically a guide of how to write good command line applications. The author shows a few ways to handle command line applications in Ruby and ends up showing GLI. That library is the reason why I started investigating Ruby a bit more.

While playing with GLI to try to get a grasp of the library and the language, I bought a few more books and started to use Ruby for every little project where I could see it fit. A small list of the books I have can be found in the On my shelf (Ruby) section.

I’ve been using Ruby ever since, for every little thing I need to do. While I was writing my Master’s thesis, I even had a Rake script (think of it as a Makefile for Ruby, written in Ruby) to build every chapter and target different mediums.

I got lucky enough to be able to sneak a bit of Ruby in one of my past jobs. It was a C++ header parser that was used to analyze the classes and generate C++ classes to introspect the analyzed classes. For example, given a class:

Once the tool ran correctly, it would generate wrapper classes that would basically allow two things:

  1. Call methods by name;
  2. Access any member by name;

So you could run something that looked like:

It was used for generic serialization/deserialization of complex types. It worked quite well, for all the types we needed (native types, vectors, lists, arrays, other custom types, …). I was using treetop to parse the files and some custom code to generate the outputs. The parser did have a few limitations, mostly around C++11 constructs. But we simply decided not to use these in the parts of our codebase that needed the analysis.

I think that this is the gist of my first few experiences with Ruby. And you, which language do you really like/dislike? Why ??