Thoughts on Software and Technology

Comments Provided by Google+

Comments have been turned off on my blogs for months, and I’ve been happy with the result. Gone were both the SPAM comments and the less than useful comments. There is a full discussion of my reasoning in a Google+ post, should anyone be interested. Recently, I learned that one could add embedded Google+ Comments on any page. Naturally, this appeals to me since I send my users to G+ to comment anyway. This...

Using RSpec With Mixed Random and Ordered Tests

I prefer to have my RSpec tests ordered randomly to ensure we have condition independent code. Back in July, RSpec 2.11 was released, which added support for the –order argument on the commandline. Now you can add “–order rand” to your .rspec file and have all your tests run at random. But what if you want some tests run in order? Easy, run your specs with ‘rspec spec/path/to/spec...

Turning issues into pull requests

For the past several months, I’ve been using a nice feature that I’ve recently found out that many others don’t know about, so thought I’d draft it up.1 You have an issue in Github, so you do some work, then you issue a pull request to fix that issue. In Github, that means you actually have two issues in your issue list, the original issue, and the pull request. Well, did you know that you...

Heroku, UTF-8, and DATABASE_URL

Recently, I’ve been fighting with Ruby 1.9 and encoding in a Rails 3.1 app that we’re running on Heroku. The strange thing is that encoding was working fine on any local system we would try, but would break on Heroku while rendering views with the error ActionView::Template::Error (incompatible character encoding: ASCII-8BIT and UTF-8) There are suggestions sprinkled all around the web on how to deal...

Server specific banner using RMagic gem

So, I have a complicated Rails project. I have a local server, a remote dev server, a remote staging server, and a production server. Recently, I had a situation where the dev server was shunting traffic to the production server and I didn’t catch it. What the hell?! Why aren’t my changes showing up?! So, I made a banner that said “Dev Server.” That was pretty useful, but then I thought it...

« Previous Entries

Powered by WordPress | Designed by Elegant Themes