Technology

Reminderer Redux


It’s been a while! I finally have some time to work on Reminderer (a TODO Android app).

Lessons Learned

I’ve spent the past couple of days commenting and refactoring the code, and boy do your programming skills improve in a year.

The current grammar parser has interfaces with only one implementation (unnecessary) and an inconsistent and obtuse design (maintenance nightmare). I built something quickly the first time around but now I’m paying the penalty because its taking me forever to re-understand it.

I keep remembering an article I read a few months ago by a well-respected programmer…the gist of it was that sometimes you need to put away “best practices” in order to “meet the deadline.” That’s true if you code and run, or if you don’t care about maintaining your code. Otherwise, you will have to spend some time on design, documentation, and refactoring with the goal of making the code intuitive. That way you or someone else in the future will have the shortest possible learning curve.

A New Vision for a UI

I’m a hug fan of Emac’s org-mode. For those of you who don’t know what Emacs is, it’s a 30+ year old editor (so yes, I’m a retro geek). Org-mode is a recent addition created by some Google employees that is like steroids to Emac’s outline mode.

What I love about org-mode is

  1. Dynamically create TODO items. It’s a blog post, now it’s a TODO item. Wait, now it’s a finished TODO item. Wait, now the TODO has a sub-TODO. Since it’s a text editor, it’s super-easy to create/edit/manipulate TODOs.
  2. Create an infinite hierarchy of tasks. Org-mode has no limit on the number of sub-tasks, sub-sub-tasks, sub-sub-sub-tasks, etc. (Sub-tasks rock because you can’t complete a TODO until all it’s sub-tasks are done, so its uber-useful for keeping track of projects.)
  3. View upcoming, done, in-progress TODOs at the press of a button. And it’s also dead simple to move them around too.

These are the reasons why I’ve used org-mode at work for the past couple of years.

But enough about Emacs. What does it have to do with Reminderer? Well, Reminderer does Item 1 thanks to the grammar parser and with support for a “share” intent (note to self: don’t forget this uber-important feature). Item 2 and 3 will need to be features.

As of the time of this writing, I spent the weekend refactoring the grammar parser. Up next comes the database and the alarm system. Then the UI.

Advertisements
Technology

Testing for Windows in Emacs


I basically use the same Emacs setup on my work (Windows) and personal computers (Linux). I always wondered if there was a way to have one init.el file to rule them all. But the problem is that while most of the settings in the init.el file are platform independent, there are a few that are not:

  • file locations of certain programs (like aspell)
  • programs that are too much of a pain to install in Windows (like w3m)
  • Windows-specific hacks (like the location of find)

You could have a different file for each computer or you could just test to see if you are running Emacs. Here’s how to do that:

Continue reading

Technology

Programming Android Apps in Emacs


Hell yeah it’s possible.

With yasnippets you can add blocks of code (menus, button clicks, etc). You have to write the macros yourself, of course. But it’s completely possible.

There’s also an android mode to help compile and debug apps.

The only catch is that sometimes the app seems to go “out of sync” with the source. Occasionally, I get wierd errors where there is supposed to be no error—like a findViewById exception on perfectly-formed XML. But the solution is simple:
Continue reading