Subscribe to
Main blog
Tumble Log

Category Archive for 'Code'

app_version Updated

I have updated my app_version Rails plugin to support getting build numbers from Git. This is of necessity a little kludgy. The plugin allows you to specify either ‘git-revcount’ or ‘git-hash’ as the build. ‘git-revcount’ will set the build number to the number of commits on the current Git branch and ‘git-hash’ will set the […]

Read Full Post »

app_version plugin is now hosted on GitHub

I recently changed hosting providers and I am still in the process of moving everything over. One headache that I don’t need is recreating all of the Subversion repositories that I had hosted on the old service. So, I have decided to move the code for my app_version plugin to GitHub.

The plugin’s code is now […]

Read Full Post »

OOP is a tool

I spotted this comment to a lengthy article about the proper use of inheritance in Object Oriented programming:

On one of the ‘communities,’ someone had a sarcastic response to the Final == Good article: To boil the article down: OOP is hard. Let’s make it as non-object-oriented as possible so that […]

Read Full Post »

Creating a ‘returning’ macro in Lisp

I have been reading Practical Common Lisp and learning quite a lot in the process. However, I began to see a pattern emerging in the code that deals with objects that is also very common in Ruby. The pattern emerges where you have a class and you want to perform some initialization beyond what the […]

Read Full Post »

I have a Rails application with a small SOAP service that is used for integration. Today I updated the site to Edge Rails and noticed a ton of strange errors related to ActionWebService. The first error looked like this:

Expected app/controllers/my_controller.rb to define MyController

I remembered hearing that ActionWebService was going to be moved out of […]

Read Full Post »

New Rails Plugin: App Version

A while back I began refactoring reusable pieces of code in my Rails applications into plugins. Overall this has been a successful strategy for keeping my application codebase clean. I have decided to release some of these plugins as open source in the hope that they are useful to someone else. The first plugin I […]

Read Full Post »

It turns out that I have more to say on the topic of what Rails can learn from other frameworks. This time I have a solution for implementing a cool feature from Django in Rails. With Django a single web site is composed of a “project”, which contains the configuration and settings, and many “applications”. […]

Read Full Post »

Object Caching in Rails

Earlier this month Pat Eyler asked “What can Ruby on Rails learn from other web frameworks?”, and there have been surprisingly few responses. I think that most people find it difficult to criticize a tool that they really like. Or, it could be that Rails does so many things well that the average user doesn’t […]

Read Full Post »

Would You Like XML With That?

Jamis Buck says in a post at The Rails Way that it is “trivial…to make your application into a web-service. There’s really very little reason not to do it.” I can think of one very good reason not to turn every controller into a web service: if you don’t need web services then that […]

Read Full Post »

Mapping WordPress URLs to Typo

I recently moved my fiatdev.com from WordPress to Typo. As part of the move, I wanted to make sure that all of the WordPress URLs continued to work. I started out trying to do this with mod_rewrite, but had some problems making it work the way I wanted. In the end, I used mod_alias RedirectMatch […]

Read Full Post »

Older Posts »