Rwanda, Day 3

I was thoroughly exhausted this morning and slept 2 hours past the time I was supposed to meet the others for breakfast.  Ouch! I finished setting up the developer laptop and used bzr to download the source code for iHRIS Manage to the laptop.  I’ll customize the software for the Ministry of Health using the laptop and then, if we’re able to hire a Rwandan to do in-country development, they’ll have everything ready to go with php-mode set up in emacs and (of course) a link to my PPA so they can get updates easily.  Up till now, I’ve been pretty scared of the customizations they needed since I have to finish them up in the next few days. Once Vanessa started sending them to me, I was really relieved.  Most of it does look pretty simple.  “Add a field here, change a label there.” Speaking of in-country developers, I was pleasantly surprised to find out that dcm and Vanessa were able to find someone with LAMP experience.  One can always hope. In the afternoon I met with the head of IT at the Ministry of Health and installed Ubuntu on the server for them.  He doesn’t know much about Linux but seemed willing to learn.  I’d like to have someone here that I can talk to if we have problems, so I’ve been trying to at least get him or one of his underlings comfortable with Linux. We walked back up the hill to the hotel and dcm soon crashed.  I guess it was his turn to be worn out Overall, I’m really pleased with the way things are turning out.  I came into this really scared, but I’m getting more confidence by the day. One thing I would like to see is more support for Rwanda in Linux and especially Ubuntu.  When I’m setting up Ubuntu, “Rwanda” is not a choice for either the French or English language.  And, despite lots of work being done on Linux translations to Kinyarwanda, where “Ubuntu” is actually a word native to the Language, I can’t choose that language as the default in the installer.  This affects other areas of the installer, too.  When it comes time to pick a timezone, I can’t.  I have to tell the installer I’m in South Africa, which means that za.archive.ubuntu.com is picked for the Ubuntu mirror — a far better choice for the network connections I’ve used is still one of the U.S.-based mirrors.  (I’m not the only one to think Linux distributions should be more aware of Rwanda, either.) Finally, it would be great if RwandaTel or some other organization took an interest in promoting Linux in Rwanda.  They could set up a kernel.org mirror so that I could get my Linux fix faster!

Day Two

(You may want to see my first post on my visit to Rwanda if you missed it.) Right now, I’m sitting in the Sentenary House, the home of the Capacity Project in Rwanda, upgrading a System 76 laptop with Ubuntu Gutsy.  I hope to prepare this laptop for a Rwandan developer for the iHRIS project I’ve been working on.  Of course, that’ll mean Emacs.  I hope to spread the Church of Emacs to Rwanda. In my last post I kind of left you hanging on the Mille Colline.  Yes, I had a coke there but I should tell you how disappointed I was that the movie showed a completely different building then the actual Hotel.  I’m sure they had their reasons (they always do) but I really do expect movies to give me an accurate portrayal of places I’m extremely unlikely to visit.  Just in case, you know, I visit. Also, we had a brush with fame.  The hotel I’m staying in (the Kigali Serena) is where Tony Blair was staying.  For a brief moment, we saw President Kagame rush in and then quickly back out.  I had no time to request an autograph.  Mostly because I didn’t recognize him. Dramatic difference between Kigali and the US: the number of gates and guards.  It seems that every major intersection has one or two men in uniform carrying AK-47s.  Almost every building and home has at least a guard and, unless it is right on the road, a fenced in courtyard with razor wire or shards of glass atop the walls. I remember similar gates and glass-topped walls in Haïti, but the guards are an unsettling addition. Vanessa told me that, in part, the practice started as a way to employ men who have been fighting most of their lives and hadn’t developed any marketable skills.  Fair enough. Another thing about Rwanda is the number of people walking along the road and the street vendors walking about.  Some (evidently) sell SIM cards or minutes for your phone.  This is in addition to a wireless shop on every other corner.  I was amused by the portable phones they carry that look similar to a desk phone, but without the desk. Finally, though I seemed to be on a normal sleep schedule after my first night here, I couldn’t sleep at all last night.  Seriously, I saw the sun rise.  I’m sure part of it was that I was up hacking away till 4 in the morning (“just one more thing”) but, still, right now I’m tired.  Thank God Rwanda’s primary export is coffee.  I need it now!

Ubuntu Packages and PHP

(Hello, Planet Ubuntu Users!  I’m looking for a second MOTU on my php-xdebug package as well as someone to revu my libapache-test-perl package.  Any takers?) Emacs CVS now includes XFT (i.e. smooth fonts) in the main branch, so I’m discontinuing my old emacs-xft-snapshot build.  Still, the other emacs-snapshot package is targeted to Debian and I’m running Ubuntu Gutsy.  So I’ve uploaded a snapshot build to my PPA on Launchpad. One thing that I included is flymake support for PHPCarl asked me earlier today if I knew how to get the compilation mode in Emacs to work with PHP’s lint function to find highlight problems.  I said flymake would be better, but didn’t know how to do that right off, either. After a bit of twiddling, I figured it out and, as a bonus, got compilation mode figured out, too. If you want to enable flymake for PHP-mode (yes, I have a Debian package for that, too) in a version of Emacs you already have installed, add the following code to your .emacs file:

;; Flymake PHP Extension (require 'flymake) (unless (fboundp 'flymake-php-init)   (defun flymake-php-init ()     (let* ((temp-file (flymake-init-create-temp-buffer-copy                        'flymake-create-temp-inplace))            (local-file (file-relative-name                         temp-file                         (file-name-directory buffer-file-name))))       (list "php" (list "-f" local-file "-l"))))) (let ((php-ext-re "\\.php[345]?\\'")       (php-error-re        "\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)"))   (unless (assoc php-ext-re flymake-allowed-file-name-masks)     (add-to-list 'flymake-allowed-file-name-masks                  (list php-ext-re                    'flymake-php-init                    'flymake-simple-cleanup                    'flymake-get-real-file-name))     (add-to-list 'compilation-error-regexp-alist-alist                  (list 'compilation-php                    php-error-re  2 3 nil nil))     (add-to-list 'compilation-error-regexp-alist 'compilation-php)     (add-to-list 'flymake-err-line-patterns                  (list php-error-re 2 3 nil 1))))

Now, whether you’re using the emacs you started with or the latest emacs-snapshot, you need to tell emacs to use flymake on PHP files.  Add:

(add-hook 'php-mode-hook (lambda () (flymake-mode t)))

to your .emacs file and you’re good to go.

Ubuntu Emacs + misc.

I have been having a lot of fun with my Launchpad PPA. In addition to org-mode, I’ve packaged color-theme and a snapshot of the Unicode+XFT branch of Emacs using the package name emacs-xft-snapshot so it doesn’t conflict with existing packages. I also put a package for PHP’s Xdebug (which does a decent job of profiling PHP code and can be used to make pretty call graphs) and one for eMusic/J.

24” and snow

It snowed yesterday. The snow is mostly gone now (though the remains of a mini-snowman are still there), but yesterday also brought a nice treat for me: a 24” flatscreen. I had an old 17” CRT, but it was losing focus and I was going crazy trying to use it. The new screen lets me run XP for testing under KVM and still have plenty of real estate left over for real work. I’m in a two foot version of heaven.

Evidence Based Scheduling

I thought Joel Spolsky had jumped the shark when he revealed that he was using a language that his company had developed: “Wasabi, a very advanced, functional-programming dialect of Basic.” Ok… Guess who I don’t consider an authority on anything but Excel and MS DOS any more? (I am not alone in this thought.) Still, he is a great thinker and, I imagine, a great manager. He still has good ideas. And this article on Evidence Based Scheduling is very, very attractive. If I started doing more detailed planning up front for any task I was going to do and gave those tasks estimates, I could easily fit that with the time tracking that I already do and come up with decent estimates for my time. Right now, I when I look at a days worth of tasks in Planner, it looks something like this:

@9:00 Finish up Database creation for iHRIS @10:30 Read up on how to use i2ce @13:00 Create simple address book in I2CE @19:00 Paint Kitchen @20:00 Refactoring Code @21:00 Notify Users of Move

If I add an estimate for each task, then I’ll be able to use Joel’s Evidence Based Scheduling pretty quickly. Of course, it is designed for teams of people, but, I have a feeling it would be useful for just one person, too.

Thank you Sacha Chua!

This past year or so, I’ve been working at home with my four children (three school-age, and home-schooled). Besides the kids, who really aren’t that bad, I have the struggled to avoid the distraction that is the Internet. I instinctively compare myself with my heros, and, of course, my heros always win the comparison. Sacha Chua is one such hero of mine. While seeking out ways to be more productive, the gregarious filipino has evangelized PlannerMode like no one else could have. I’ve always admired her energy, drive and focus. She seems to accomplish so much, so easily. I have potential, but I’m have an extreme lack of focus. Finally, this week, while being distracted, I came across this on Digg: “Plan your day the night before” Doh! It finally clicked. I saw how everything I knew about planning would actually work. I had found the missing ingredient. I did it that night. I planned my next day’s tasks. Until then, I’d been using Planner primarily to keep track of the billable hours I worked. This week I finally understood how to really use all the scheduling and planning aspects of Planner. I had tried it before, but it didn’t work — because I didn’t do it the night before. Maybe someone said it and I missed it. Maybe I wasn’t properly motivated before. Doing it the night before means I’m anxious to get to the things I’ve scheduled. I’m motivated to do them because my subconcious has been dwelling on them for eight or so hours. Sacha Chua has been writing about using PlannerMode and Emacs for productivity for some time now. Shes written a lot of code snippets and done some heavy lifting with PlannerMode itself. Finally, she is combining her enthusiasm, her skill at writing, and technical saavy to write a “Wicked Cool Emacs book” that will cover PlannerMode, OrgMode as well as many other bits of Emacs. I wish I could pre-order a copy now!

Emacs, IRC, and libnotify

After I first saw libnotify with ircII, I thought “I can do that in Emacs!” This past weekend, I finally got around to doing it. (Note that for this demonstration, I send myself a stupid message from… ircII.) Here’s the magical bits:

(defvar mah/erc-nick-notify-last '(0 0 0))  (defvar mah/erc-nick-ntify-delay '(0 5 0))  (defvar mah/erc-nick-notify-cmd "notify-send")  (defvar mah/erc-nick-notify-icon    "/usr/share/icons/default.kde/48x48/apps/edu_languages.png")  (defvar mah/erc-nick-notify-timeout 10000)  (defvar mah/erc-nick-notify-urgency "low");  (defvar mah/erc-nick-notify-category "im.received");    (defun mah/erc-nick-notify ()    "Notify me when my nick shows up.  This function should be in  the insert-post-hook."    (let ((now (current-time)))      (when (time-less-p mah/erc-nick-notify-delay                         (time-since mah/erc-nick-notify-last))        (setq mah/erc-nick-notify-last now)        (goto-char (point-min))        (when (re-search-forward               (concat "^\\("                       "\\(<\\([^>]*\\)\>\\)" ; <someone>                       "\\|"                       ;; Don't match if we're saying something                       "\\(\\* " (regexp-quote (erc-current-nick)) "\\)"                       "\\)"                       "\\(.*"                       (regexp-quote (erc-current-nick)) ".*\\)")               nil t)          (let ((msg (concat                       (when (> (length (match-string-no-properties 2)) 0)                        (concat "<b>&lt;" (match-string-no-properties 3)                                "&gt;</b> "))                      (match-string-no-properties 5))))            (shell-command (concat mah/erc-nick-notify-cmd                                   " -i " mah/erc-nick-notify-icon                                   " -t " (int-to-string                                           mah/erc-nick-notify-timeout)                                   " -u " mah/erc-nick-notify-urgency                                   " -c " mah/erc-nick-notify-category                                   " -- "                                   "'" (buffer-name) "'"                                   " '" msg "'")))))))  

Weekend Update

First, to any OpenWeblog users: you can now tag your entries. This is like categorization, so, if you’ve been looking for a way to catagorize what you write, you have it now. Second, I’m recruiting old college buddies to start keeping a weblog on here.  First up are and .  I hope to get them sharing more and recruiting their friends.  We’ll turn this place into LiveJournal for people over 30!  So, if you’re over 30, start up an OpenWeblog account. Fine, you can start one if you’re under 30, too.  And you don’t have to be an old college buddy.  I don’t even have to know you. Third, I went to the book release party in Philly with some people from Harrisburg.pm this weekend for Higher Order Perl.  Great fun.  You know that many geeks are socially awkward, right?  So what happens when they get together for a party?  Well, they don’t do regular introductions, for starters.  Instead of saying “Hello, I’m X, who are you?”  you point and say “I don’t know you! Who are you?” That, and, a couple of these people (mjd included) have started having kids, so they tote their child along and they make great conversation pieces.  I wish I had brought and Lily.  (She didn’t like that idea — said it would be unfair to leave the other three children with our neighbors that long.) With YAPC in a couple of weeks, it was a really good thing that I went to this book party.  Many of the people there are going to YAPC, so it was good to get acquainted with some of them before hand. I actually drove the Harrisburg.pm people. I had volunteered my minivan and it worked out nicely. Except for the fact that the darn thing started to overheat just as I pulled into the parking lot to pick them up. That’s ok. The problem was a hose with a small breach right near the connection to the radiator cap. Unscrew the clamp, cut the hose, screw clamp back onto the (slightly shorter) hose and away we go. Somehow, in the hour or two between Harrisburg and Philadelphia, I got nominated to do a talk on Catalyst this coming Wednesday. For those more familiar with Java or Ruby, this is like Struts or Ruby on Rails, this is an MVC framework like those, but better since a) Catalyst learned lessons from Struts, Ruby on Rails, and Maypole and b) its in Perl! It should be obvious by now that I’m in love with Perl (and Emacs, but that’s a story for another time). And if my ardor needed any more fuel, hanging out with Perl Geeks did it. See, geekiness about free software, Perl, Emacs, etc. isn’t really about the technology. Tech is just a conversation piece — a shared passion. The real fun comes from geeking out with other people. Wonder if I can find any Emacs geeks…