Importing to BitBucket

When bitbucket added git to their code hosting service, I signed up to try out the service. Primarily since they offer unlimited free private repositories, which is perfect for one-coder projects like this blog. Each repository also gets a wiki and an issue tracker.

Creating an account was straight forward, I then had to import my self-hosted git repository to bitbucket. This wasn’t too difficult, after opening port 9418, which is used by the git protocol, I did the following.

1. Let git know that I wanted to export my repository

cd /var/local/git/foo.git
touch git-daemon-export-ok

2. Run the git daemon, temporarily.

git daemon --base-path=/var/local/git --export-all

You could run it idefinitely, but I’d rather it run when I need it to.

git daemon --base-path=/var/local/git --detach --syslog --export-all

3. Import the repository into bitbucket with this repository URL.


Once the import was successful, I stopped the git daemon. The final thing to do, is update any repositories that used my local bare repository as the origin to use bitbucket as the origin. In each repository, I had to edit the .git/config file and update the origin url to something like:

url =


Frustration with Drupal core growing

When a prominent developer and contributor lashes out that Drupal is in dire straits, you better listen.  You ought to read his critique of how Drupal core development is stalling, or at least stuck in the mud.  That can’t be good news for anyone looking to upgrade to Drupal 7.  My thoughts after the quote.

In addition to the half-baked, single-purpose product features mentioned above, Drupal core still carries around very old cruft from earlier days, which no one cares for. All of these features are not core functionality of a flexible, modular, and extensible system Drupal pretends to be. They are poor and inflexible product features being based on APIs and concepts that Drupal core allowed for, five and more years ago.

Where would Drupal be if they had worked more closely with the PHP community early on?  I have no idea, but a lot of PHP programmers have looked down on Drupal because most of the codebase can be messy, with poor API design decisions, overuse of globals, and leaky separation of concerns. Along with Drupal eschewing Object Oriented Programming and resulting best practices, its no wonder that talented developers would choose to use a framework like Zend, Symfony, or Cake to build a complicated website.  It sounds like a lot of short cuts and idiosyncrasies are now baked deep into Drupal core, and ripping them out too much work for core developers.

I’ve always thought that Drupal’s greatest strength is certainly not the great design of its codebase, but the Drupal community and ecosystem. A contrib module usally exists for many common website needs, like managing redirects, creating useful URLs for content, integrating with analytics,  and plugging in 3rd party commenting systems.  On top of that, there are super-modules like Views, Panels, and Context, which let you prototype and build parts of a website without having to write any code at all.  The Drupal community has solved a lot of problems through determination and individual brilliance, but that model can’t be sustainable in the long run.

Is there a solution?

Drupal core should cater to programmer’s needs, via coherent APIs and pluggable subsytems.  A complete rewrite of core, or even big parts of core, would be a waste of time. Drupal would stagnate while other frameworks kept improving.  I think Drupal 8 should seriously consider using a framework like Symfony2 as the foundation for core.  I mention Symfony because it has an EventDispatcher component that can replace most of Drupal’s magical hooks system.  The next release of the Zend Framework will have a similar component. A tested framework, used not just by content management applications would expose developers to a wider range of best practices, particularly around configuration management, deploytment, and unit testing.

Contrib should cater to site builders needs and focus on adding features on top of core that they want.  Modules in contrib can improve faster to meet user needs, fix bugs, and innovate.  This is an idea proposed in the discussion linked above. Moving as many modules as possible out of core also makes Drupal leaner.


A Sneak Peek at Upcoming Linux Mint 11

Linux Mint, an ubuntu derivative, posted a preview of what’s included in there next release, Linux Mint 11. It sounds like they are positioning themselves as a nice alternative for users who don’t like Unity or the new Gnome interface, and users who can’t run the newfangled UIs.

One of the most noteable features of version 11 will be the retention of GNOME 2.32. It will be the foundation for the same desktop layout users know and love, including Compiz and Metacity.

A Sneak Peek at Upcoming Linux Mint 11


Using Disqus for Comment

I'm testing using Disqus for commenting here.  Drupal's core comment module is adequate but Disqus provides a number of features, particluarly integration with Facebook and Twitter, that would require more work otherwise.  There's even a Disqus module that integrates the plugin as a block. While it doesn't integrate with Mollom, it does integrate with Akismet, but the latter is only free if you do not display advertisements.  I'm curious to see if it has ANY spam blocking built in.


Habari Project impressions

I have to admit that i jumped over to using Habari for my blog mainly based on how well designed and obejct oriented the underlying API seemed from the documentation. Coming from looking at Drupal code all day, which is painfully NOT Object Oriented, yes with capitals, the code is more readable and, so far, less mysterious.

Don’t believe me? Go read the instructions for Creating a Content Type. Like Drupal, it depends on function name conventions for some hooks, but beyond that everything else is nicely encapsulated in a proper class.

But I haven’t developed my own plugins yet, although I have an idea for one. My main impressions are from installing it and using it.

The installation itself is very straightforward, at least on par with WordPress. If, like me, you find yourself installing it multiple times, one can Predefine configuration settings and not have to manually enter them each time.

The admin interface is elegant and useful, certainly less cluttered than Drupal’s admin pages. A simple pull down menu in the top left corner of the page lets you add posts, configure plugins, and access other admin functions.

The plugin system is in a state of flux, due to a change in how plugins are defined/discovered by the system between versions 0.6 and 0.7. This means a lot of plugins are available for the former, but maybe not the latter. It’s also difficult to track down a solid list of plugins, so I’ve been using with svn:externals to install and update plugins.


The new "Bytes in the Margin"

Its time to relaunch my blog as Bytes in the Margin. I like the new name, which is not an anagram of my own name. I was inspired by all the notebooks I have from school and work meetings, which are decorated with pen and pencil doodles in the margin.

While the title is new, the content won’t really change, and I’ve left the Feedburner feed at RecordAsIAm still enabled, so hopefully I don’t lose any subscribers.

This also gives me a chance to check out a new blogging/content management platform – Habari Project, which, from looking at the code, looks like a very nicely designed PHP blogging framework. Given that my major point of reference is Drupal, that may not be saying much. If you’re particularly geek, learn Why Habari? or look at how they’ve implemented Plugins


Boliva roundup – Evo wins import election

Yesterday, Bolivians voted wether to keep Evo and the provincial governors in power. I haven’t read up on all the issues surrounding Bolivia at the moment, but the following articles provide some insight. The election confirms his mandate and shows that, at the least, his party gets (forces?) his supporters to show up at polling stations. You think the US is polarized between blue and red states, Bolivia is even more divided than before. They’re going to keep debating wether there can still be a unified Bolivia as we know it.

Blog from Bolivia: The Evo Landslide: How He Won It

None of this gets to the trickier issues of how Morales needs to deal with regional leaders, and a third of the population that does stand squarely against him. That analysis I’ll leave to later. But these statistics do make it clear that Morales has a huge national majority at his side, and one that stretches across a far wider map than many critics would care to admit.

Rival camps in Bolivia both see victory – Los Angeles Times

But his chief antagonists in the rebellious, resource-rich crescent of lowland states known as the “half moon” also savored their triumph. All four opposition governors in the region easily survived the plebiscite in an explicit endorsement of their march toward regional autonomy — a move that Morales decries as a treasonous splitting of the nation.

McClatchy Washington Bureau | 08/11/2008 | Bolivia’s mandate for Morales unlikely to provoke compromise with opponents

At issue is who will control the country’s huge natural gas reserves in the east _ the reserves are the second largest in Latin America _ and who will decide the fate of large tracts of farmland in the east that Morales wants to seize and give to indigenous supporters.

The St. Petersburg Times – World – Bolivia Result Highlights Social, Class Divisions

Morales had proposed Sunday’s recall in a bold gamble to topple governors who have frustrated his bid to redress historical inequities in favor of Bolivia’s long-suppressed indigenous majority and extend his time in office.


Major League Soccer Players by Country of Birth

Beau Dure linked to a file containing a map of Major League Soccer players by the country of birth. Since PDF is about the most boring file format out there, I took the listings and transferred them to a more interactive flash map below. Enjoy!


Linux Package management overview

I have to confess that delegating software installation to Debian and Ubuntu’s apt command is what finally converted me to Linux.  I stillhave a bias against .rpms and building from source based on disastrous experiences hunting down obscure .rpms or figuring out why make would not work.  If you’re trying out Ubuntu or another Linux distribution, you should stop and read download squad’s Package management 101

Package management refers to the way your distribution installs and configures (as well as manages and removes) software applications and libraries on your system. When Windows installs an .exe (which is the closest thing in Windows to a package) it usually places it in a single specific place within a directory. Linux installs across a few directories, leaving many new Linux users scratching their heads as to where their .rpm actually went. Most distributions install the executables in /usr/bin, and the libraries in /usr/lib. You may notice related files in /usr/share or /etc.

In short, you’ll want to let your package manager install and upgrade new software for you.  You don’t have to take my word for it, Thank You, Aptitude!

I’ve long believed that the easiest way to install software on a modern operating system is through a well-designed package manager connected to one or more carefully-maintained package repositories.


Get a gravatar, receive glowing praise from me

I just added gravatar support to my blog, via the excellent and well documented gravatar-cache script. If you register for one, your icon will show up along with comments that you leave here.  Do you need more incentive than that?  I’ll write a post full of praise for the first five people to leave a comment here with their gravatar.