Read about:

Posts Tagged ‘Programming’

On “Magical” Ruby and Rails


Giles Bowkett wrote a post which, at the surface, seems to be a harsh criticism of the way that Pythonistas and, in particular, Django developers view Ruby and Rails but is actually much more general — he simply wanted to point out that the entire notion of calling language/framework features “magic” is silly for programmers, who should prefer to be rational than superstitious.

Read the rest of this entry »

Future Ruby – Day 3


Sunday, July 12th, 2009

While the previous two days had already blown my mind, it seems as though the best had been saved for last.  The day’s talks started with Collin T. Miller giving us his thoughts on how we can move away from text as the primary way of encoding computer programs and move towards other encodings that more closely resemble the domains in which we are trying to solve computing problems. While I found his ideas interesting, I don’t think I can agree with his notion that text should be replaced as the primary encoding for programs. I think that text is an excellent way of representing computer programs: it is concise, easy to manipulate, and easy to parse.

FutureRuby – Days 1 & 2


Edit: In my haste to post my write-up of these first two days of the conference, I didn’t do much in the way of linking and I forgot to write about one of the coolest things that happened on Saturday, the flying robot blimp. Bear with me as I edit this post to add some much needed links and visuals.

Friday, July 10, 2009

After work, I walked over to the Metropolitan Hotel to get my badge. My kit included a schedule, a large poster, a crimson t-shirt with black Russian-propaganda style Future Ruby logo, a bottle of water, a pack of matches, a patch with the Future Ruby logo on it (for sewing on to backpacks and the like) and a TTC pass valid for the length of the convention. All of this was stuffed inside of a rugged, dark green bag with the Future Ruby patch sewn on it. This is by and far the best swag I’ve ever received at a conference, ever.

After that, I got dinner and headed down to Unspace HQ for a wicked awesome patio party. Unspace HQ seems like an incredible place to work — prime location, lots of outdoor space, and a pretty nice collection of knick knacks, including a working pinball machine — but it is also an excellent space for a party. The highlight of the night for me was seeing two CF18’s doing a fly-by. Although I’m not a huge fan of military hardware, watching the way that they turned through the air was a unique experience.

I went home early to give myself enough time to commute home and get at least 5-6 hours of sleep for the next day.

Compass: Still going on strong

(Programming, Web Design)

It’s no secret now that Compass is one of my favourite Ruby technologies. I wrote about it in great length on Tenthline’s blog and I spoke about it with Anita Kuno at Ruby Job Fair. It’s simply one of the best web design tools I’ve ever used, bar none. It offers all of the benefits of using CSS frameworks while allowing you to stay in control of your markup.

Radiant CMS in Japanese

(Japan, Programming)

Recently, I started a project to translate Radiant CMS into Japanese.  I started with Keith Bingman’s Radiant fork and added a Japanese message bundle.  Since then, Hirotaka Mizutani has been offering his help with the translation as well.

From Git to SVN


There are many blog posts that talk about how to import a Subversion repository into Git but there isn’t much out there on how to work the opposite way.  After a bit of trial and error, I managed to figure out how to bring a Git repository into SVN and continue “pushing” updates from Git to SVN.

This might raise some questions for fervent Git fans: Why would anyone want to do this? Why not just keep everything in Git?

Here’s a personal anecdote: I developed a plugin for WordPress called GitPress. My initial development was done on GitHub, but in order for my plugin to be available via the WordPress Plugins Directory, I needed to bring everything from GitHub into WordPress’ SVN repository.  Here’s how I did it:

First, we create the initial SVN remote.  By using the standard layout (--stdlayout) and specifying the “gitpress/” prefix, I can easily get tracking branches for SVN branches, tags, and trunk.

git svn init --stdlayout --prefix=gitpress/ --username=enricob

Now, I fetch everything from the SVN remote that I’ve created and see if the remote branches are there:

git svn fetch

Now, when I list my remote branches in Git, I see gitpress/trunk, gitpress/tags, and gitpress/branches.  I create a local tracking branch for gitpress/trunk, which is where I’ll be pushing my changes:

git checkout -b svn-trunk gitpress/trunk

Now that I’m in my new tracking branch, I bring in the changes from my Git repository’s master branch:

git merge -s subtree master

Finally, I can commit my changes to SVN in one squashed commit:

git svn dcommit

I’ve also found that using git svn rebase causes separate commits to be made instead of getting a squashed commit, but the cases I’ve run into are pretty simple so far.

So that’s how I brought my GitHub project into an SVN repository. Hopefully this will help somebody else who might run into the same situation.