Humility Finds Me in a Japanese Ryokan

I had the pleasure of visiting Japan for RubyKaigi 2010 and a week's vacation at the end of August, squeezing a rich microcosm of the country's electric energy, serene grace, warm mirth and artful cuisine into my short time there. I enjoyed myself immensely, but I felt compelled to share this particular little nugget of social calamity, for whatever reason.

I was self-conscious before even arriving to spend a night in Hakone in a lovely traditional Japanese inn (Mikawaya Ryokan, recommended if you find yourself in the area), as a foreigner not speaking Japanese, traveling alone -- usually not accepted in luxury ryokan -- unfamiliar with the highly refined etiquette and customs of the setting, bearing tattoos in the public bath. A hostess showed me around upon arrival, taking care to try to explain things to me and give subtle warnings of faux pas to avoid, and I changed into my yukata and read a book in excited anticipation of kaiseki to be served sharply at 6:00. At some point, I left my phone sitting atop a door frame running LCD Clock, as practically no one had the number of my rented SIM card in Japan.

Naturally, in the midst of being privately served my elaborate multi-course dinner, all of the elements of which I still cannot identify but savored without prejudice, one of the only people who knew my phone number in Japan, well, called. The forgotten phone vibrated and fell to the tatami-covered floor in an unceremonious cacophony, the dreadfully out-of-place artifact of technology sending the decorous old woman in care of me into momentary panic as I profusely sumimasened and gomen nasaied. Seconds lingered like uninvited in-laws as she picked it up and handed it to me, holding it as if it were a dead animal, as though pleading for me to just make it stop. After I snuffed it out and we both had a moment to collect our wits, smirks grew on both our faces, turning to laughter and bringing great relief as the only language common between us.

I try hard to be considerate and culturally sensitive. I can relate pretty well with the Japanese value of not causing inconvenience for others. What can you do but laugh when it all just caves in?

The Japanese in general are as kind to foreign strangers as locals of any place I've been, even in oft-prim Tokyo, and I never felt unwelcome. Going to Tsukuba for RubyKaigi added a third dynamic to the trip: beyond bustling, image-conscious Tokyo and the mountain getaway of Hakone, Tsukuba felt like regular people letting their guard down, a science center and college town with punk teenager hangouts and boisterous locals not hesitant to roll drunkenly into the yakitori place on their way home and be tacky. I dare say a tinge of Japanese redneck.

RubyKaigi was an outstanding tech conference. Bright, quality community without a load of hot air. I was blown away by the dedication of the organizers and the fine job that they did running a bilingual conference, for a pittance of a fee. Getting away from the duties of work, and then escaping to a mountain spot lost in time set the stage perfectly to think freshly at RubyKaigi and be inspired by the spirit of open-source camaraderie and innovation. I do increasingly miss strong tech community in Bangkok.

My first real vacation in at least a couple of years has given me some perspective, and it's time for some realignment.

Not a Bad Half-day's Work

Finally getting this posted a week late. I'm looking forward to returning to Chiang Mai for awhile next year, staying longer and taking some time off from work. There's a lot more to see than the comforts of boutique hotels :-)

Today I cooked breakfast as the Bangkok sunrise bathed my condo in its glow. Gathering my things for two weeks' wandering and a visa run, I took to the property management office an assortment of fruit that I was gifted with and had to leave behind, and set off to catch my flight to Chiang Mai.

Arriving around lunchtime, I had a pleasant conversation over coffee with some European travelers who gathered as strangers around the available table at an airport shop. Already the different vibe here was apparent -- a maturity and calm contentedness without the posturing often seen in foreigners and Thais alike in cosmopolitan Bangkok. As we all fanned out from our fleeting encounter, I hailed a cab to reach my fine accommodations. Rubbing my eyes from too little sleep or perhaps a distrust for the immediate sensation of comfort I felt as I stepped inside, I was graciously welcomed by the staff of U Chiang Mai and shown to my room.

Wearily I stepped into a shower that seemed to wash away hours. I donned a robe and cracked open my laptop to check in on the afternoon of work ahead. Seizing the "anytime, anywhere" breakfast as opportunity for a convenient meal, I received a delectable spread of eggs benedict, sauteed mushrooms, a croissant and toast, yogurt, fresh fruits and orange juice. Best Western breakfast I've been served in Thailand hands down.

Eventually I dressed, in order to move outside and round out the day's work from the spacious daybed on my balcony. Opening a beer as the evening sun's last rays glinted upon the surface of the slate-black pool below, I closed the laptop, opened a guidebook, and waited for my friend to arrive with the night's plans.

Adventurous first day in Northern Thailand? No. Rejuvenating to pamper oneself with a boutique hotel once in awhile? Oh, yes.

Using Mercurial Queues and bitbucket.org

Bitbucket is a new social code hosting site for Mercurial (Hg) users, allowing them to view and interact with one another’s distributed revision control repositories. It’s no stretch to say that it’s inspired by the excellent GitHub site for the Git SCM. Being a fan of the simplicity and elegance of Hg, I’ve been waiting for someone to do this for awhile.

Bitbucket is quite young and still in public beta, and they’re working rapidly to make improvements and squash bugs, but they already have plenty of novel features working. One of the coolest ones that caught my eye is support for patch queues a lá Mercurial Queues. I had a little trouble figuring out how Bitbucket handles patch queues at first, at it’s not documented in their help yet, but with the help of developer Jesper Noehr I was able to work it out. So until those official docs are published, I hope this guide can help some folks.

Capistrano, Mercurial and Password Prompts

So I’m using Mercurial for version control on a Ruby on Rails project, along with Capistrano for automating deployment and running remote tasks. These are great tools and I’m finding that they work well together with the Mercurial SCM module by Matthew Elder introduced in Cap 2.0.

I came across one problem though: my repository is hosted over HTTP because I don’t want to give everyone access to a shell account for SSH, and the hg SCM module didn’t support prompting for passwords (whether you’re using HTTP authentication or SSH without a public key). This effectively meant that if you wanted Cap to deploy from a repo served in either of these ways, you’d need to put your password in plain text in your Cap recipes.

I don’t like the idea of that, so I created a patch to fix it, along with another minor point or two that I found, and added some unit tests. You can get more details and take a look at the patch on the ticket I submitted. It’s been committed, so if you’re using Capistrano from SVN, you’re set, just svn up.

If you’ve installed Cap from a gem and want a quick fix, you can replace mercurial.rb in your installation with the one attached to this post. On my system, it lives at this directory path:

/usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy/scm/

This will probably work with Cap 2.0, though I’ve only tried with 2.1. The Mercurial module hasn’t changed much.

I should note that on my systems I’ve had to set the option for requesting pseudo-ttys in my recipes, or else Mercurial tries to run non-interactively and password prompting won’t work. If you have that problem, use this:

default_run_options[:pty] = true

If anyone comes up with a nice way to load the new stuff as a monkeypatch in a project, I’d love to hear about it. I’ve been unsuccessful at trying to hook it in through recipes or the Capfile, and it’d be nice to have some way of doing that while waiting for the next gem release. I’d rather not ask my team to check out Capistrano from SVN or run around modifying their installation if I can avoid it.

Update:
And, in short order, Cap 2.2.0 has been released. The fix below is rolled in, so just gem install capistrano and you can forget about the rest!

Pylons Talk at the January Cambridge Python Meetup Group

I’m a little late in posting this here, but I’m giving a talk on Pylons, a rapid-development web applications framework, for the local Python users group this Wednesday evening.

The talk will primarily be comprised of an overview of the framework and the components that it brings together. Pylons’ use of existing libraries is great for code reuse, flexibility, and simply using the best tools out there, but it can make the initial learning curve a bit steep.

So, if you’re curious about Pylons or are looking for a MVC framework for building web apps and services in Python, come check it out.

You can find a full description and RSVP at the official Meetup page, or on Upcoming if you’re into that sort of thing:

http://python.meetup.com/181/
http://upcoming.yahoo.com/event/407810

The slides for the presentation, as well as an HTML export of the outline (with lots of reference links) are attached to this post. I’ve now embedded the presentation from Slideshare behind the cut. You can download the complete Keynote file with presentation notes there.

Pimping Your Trac on TextDrive, Part II

Apologies for taking so long to post Part II. I had hoped that the templates for the Tags Plugin would be ported to Genshi, or that I’d have time to do so myself, before finishing. Unfortunately neither of those things has happened, and in fact the entirety of trac-hacks.org was down for several weeks. That would have been rather annoying when trying to work through this article…

In Part I, we covered the installation of Trac on a shared host at TextDrive by setting up a user-local Python environment. That, along with PEAK‘s setuptools, made it trivial to install a spanking new version of Trac and its prerequisites (along with a few optional niceties). We also saw a simple authentication set-up, and how to make sure tracd and its HTTP server get restarted if a system reboot is necessary.

Now in Part II we’re going to look at administering and extending Trac with some plug-ins, ranging from small and simple to large, complex tools. Some serve utility functions such as providing attractive web-based frontends for various aspects of Trac configuration, while others add wholly new capabilities to the system. Fortunately, thanks to our preparations in the last article, installing plug-ins is quite easy.

Mercurial on TextDrive, Part I

The TextDrive theme continues! Trac-hacks.org has been down for a couple of weeks — apparently the maintainer went out of town shortly before the server tanked — so I’m stalling on Part II of my Trac on TextDrive article. Sorry! Plug-in installation is the focus of the article, so it would be rather frustrating to try to follow along when most of the resources are unavailable…

In the mean time, I’ve been trying out Mercurial and really digging it. Mercurial is a distributed version control system, and we’ll talk a little about why you may want such a thing. Also, it’s written (mostly) in Python, and has a very functional Trac plug-in (that incidentally is not hosted on Trac-hacks currently!), so it seems to fit pretty well into our current theme.

Bill de hOra has written a couple of useful articles on Mercurial set-up that are specific to TextDrive, but they’re “terse” by his own words, and the user-local Python environment that we set up earlier affords us a more straightforward procedure. I’ll also try to pick up where Bill left off by briefly covering Mercurial set-up and use with SSH.

But what is this all about, really? There’s been a lot of chatter recently on the rise of distributed VCSes like Bazaar, git, darcs, etc., and I’m not going to go into detail about opting for one tool over another (Wikipedia has a big comparison matrix if you’re looking for a place to start your own research). Rather than sweating the minutiae that separate these tools, readers here would probably be better served by some discussion of why one may want a distributed SCM in the first place. While I haven’t explicitly covered the use of a VCS in the past, the depth of my Trac articles probably appeals more to the beginner than the seasoned (read: impatient) version control user, and someone just starting with Subversion may wonder why he or she should think about throwing it out and starting over. Read on for more, or you can just jump ahead to the set-up details if you like.

Pimping Your Trac (and Python) On TextDrive, Part I

I’m working on a new blog that I’ll actually attempt to publicize, but here’s something to get me moving in the mean time.

In this article, I’m going to present a comprehensive primer for installing and configuring Trac on a TextDrive account, though a lot of the information could be useful to anyone getting started with Trac, or running Python applications on a shared host. In Part II, we’ll extend Trac’s capabilities with some useful plug-ins.

Contents

A Preamble: What’s Trac?

Trac is a web-based tool for simplifying software project management — it’s grown to be rather popular these days, and even if you’re not familiar with it already, chances are pretty good that you’ve surfed across a Trac site at some point. If you use a version control system like Subversion for software or web development projects, Trac can provide you (or a team) with syntax-highlighted browsing of the code in your repository, diff file comparisons between arbitrary revisions, a flexible bug-tracking system, and an integrated wiki to document your project. It’s also highly extensible.

Trac is built with Python, and really, much of the set up in this article centers around setting up your own Python environment. Python is a dynamic, interpreted programming language a lot like Ruby in its elegance and efficiency, but with rather different philosophies. This setup will also set you on your way if you’re interested in web development with Python, with frameworks like Pylons, Django or Turbogears. Python is the bee’s knees, and I’ll be covering a lot more of it in the future.

some site upgrades

The site has been upgraded to Drupal 5.1 and modules have been brought up to date. In theory, this is part of a movement to stop neglecting my blog.

I’m also working on setting up some new modules, including integration of video functionality into the site, so that I can share some recently completed projects. I hope to write how-tos for some of those module configurations, as well as a spam-proofing article I’ve had in mind for awhile now. And I’ll continue updating the audio module tutorial, which I’ve amended with some info for Drupal 5.1.

In other not-so-late-breaking news, Jesse is about to get married.

what we've been doing

Yes, we are actually working on our own company site. Slowly. As we flesh out some copy, we're looking into an identity package so that we can style the site when the content is ready, plus get business cards and all that.

I've implemented a quick-and-dirty issue tracking system for ACS as a proof-of-concept, because I think it's badly needed there. It's built on the drupal casetracker module and is being tested on a current customer project. We're (patiently) waiting on an official sign-off to commence full-on development for them. In the meantime, we've implemented CCK and Views on the staging site, to unlock some of the real meat and potatoes of what Drupal can do.

Jesse has completed work for the launch of paidContent.org, which looks great. He wishes to express his joy to all of you about the migration of their 27,000+ existing entries ;-) He also recently contributed a patch to the Radiant CMS, which powers the new official Ruby site. I think the jury's still out on that patch making it into HEAD...

I had a pretty successful yard sale. Let me know if you need a grill or a dining table. Since then I've been fighting off illness, edumacatin' myself on Ruby over at why's (poignant) guide, and familiarizing myself with the Rails API, in addition to the daily grind. Stay tuned for more... I know you're thrilled.

Syndicate content