Archive for the ‘Programming’ Category

Using XPath and Default Namespaces

I had a problem with parsing an XML document that had a default namespace: <books xmlns=”http://someurl.com”> <book> <title>A Title</title> </book> </book> One would expect an XPath query for //book/title to return all titles, but since the namespace is set to an anonymous style namespace I had to redefine the namespace such that: xmlns:pub=http://someurl.com” then [...]

CopyDotFiles.py

I use Linux and other Unices (BSD, OSX) everday and needed a script that would setup my configuration files. In unix most user defined configuration options are defined in a user’s home directory, but I wanted to keep them all under Subversion (version control rocks) and needed an easy way of copying them back [...]

Ben posted his cool Wordpress themed Stylish mod. Stylish is a Firefox plugin which allows users to customize how certain websites look. I also created a mod to make the right reading pane full screen. The source for the plugin can be found here. Screenshot: Update: Had to add #rightSuperHeader

Vim Tag Files

Many people (who do not normally use vim) keep asking me how I jump around source code so fast. It is not really a secret. The first step is creating a ‘tags’ file of all the source files. Grab a copy of Exuberant Ctags and cd your_project_root && ctags -R * Run vim [...]

The Joys of Clearcase

There are many great choices to choose from for Source Control Management software (like Mercurial or SVN). At $work I have to use IBM’s ClearCase (CC). After using CC for the past five months, let me state simply that I would rather use CVS. What are the problems with ClearCase? For starters, CC does not [...]

Development Stuff

This post is basically a reminder for myself. But for those out there that need some background I have added some background info. Ruby is a great scripting language. It is entirely object oriented, has clean code, and is very powerful. The interpreter works great in Windows, Linux, and OS X. OS [...]

APR (Apache Portable Runtime)

I have been taking a look at APR (the Apache Portable Runtime) library that Subversion and Apache webserver use as a helper library. I am impressed with how many features are included: Memory Pools, socket library, shared memory wrappers… Programming in C is low level compared to programming in Python or Ruby. [...]