Verbose Logging

software development with some really amazing hair

14 May 10

10:00 AM MDT

Posted in Programming

Find queries missing indexes in your Rails application

Rails developers aren’t exactly known for getting their indexes right (or even at all) on their databases. Granted, databases are a tough subject, and some people and companies make their living dealing with only databases, and some only with one database (like MySQL or Oracle). If you coming to web development with no formal background in databases, and it’s all new to you, then it’s totally understandable to maybe forget about indexes initia...


Read the full article

Comments

20 Apr 10

05:41 PM MDT

Posted in Programming

Getting rid of transactions for the poor man

A quick post for today. Want to get rid of transactions from ActiveRecord for something? Here’s a cheap way to do it. It only works for MySQL obviously, but you can roll your own if you are on postgres. I’ll make it a bit less crappy and make it a gem or something.


Read the full article

Comments

14 Feb 10

08:00 AM MDT

Posted in Software

My Watch List, Into 2010

Lots of interesting things are afoot, and I try to keep track of them. Here’s what I’m watching. Rails 3 Lots of new changes are coming with Rails 3, and it’s pretty exciting. I wrote about some of the cool ones here. Rails is shaping up to be faster, more modular, and generally better and easier to work with. With all the smart people working on it, you don’t have to look very hard to realize this is going to be a big release, and is only goi...


Read the full article

Comments

06 Feb 10

08:00 AM MDT

Posted in Software

Rails 3 release notes: What does it mean to you?

The Rails 3 Beta got dropped a few days ago, and the release notes for Rails were put out a bit before that. The list of changes is long; this is a big release. There’s a lot to sift through, a lot to change to upgrade your existing application, and a lot to learn whether you are upgrading or starting a new app. The big question is: WTF does all this mean to me? Don’t worry, I’m going to tell you. If you want to read the full release notes, go...


Read the full article

Comments

04 Dec 09

04:24 PM MDT

Posted in Software

Rails 3: pwning Rails 2 since 2009

Yehuda Katz’s slides from SD.rb on Rails 3. I can’t wait! Vaporware To AwesomeWayne’s World Salute to Javascript! Scha-wing! Turn it on, or view outside your feed reader.View more documents from Yehuda Katz.


Read the full article

Comments

21 Aug 09

08:00 AM MDT

Posted in Programming

respond_to with respond_glue: override respond_to

So check this: you have a nice little Rails app. You have some stuff for a JSON API type system. You’ve got an STI setup with the Widget model class and the more concrete FancyWidget and WeirdWidget classes. You’ve got a WidgetsController, and the corresponding FancyWidgetsController and WeirdWidgetsController Yay. It works. You can deal with both types of Widgets using JSON. Now you need an HTML interface to it. Fine, you can just throw in a ...


Read the full article

Comments

14 Jul 09

08:00 AM MDT

Posted in Programming

role_on: Really Simple Roles (for Rails)

I looked at a few role systems for Rails, but never found what I wanted. They were all object based systems, never just “allow a user with this role to do this action”. Either that or I never found the systems that did that, or totally missed the docs on how to configure those systems to do what I wanted. Well, actually acl9 seemed to do that, but whatever. So I made role_on The instructions are on Github, so I won’t repeat them here, but it’s...


Read the full article

Comments

12 Jul 09

01:04 AM MDT

Posted in Links

Useful links of the evening

Ruby on Rails content_for Project: Builder RSS pauldix-feedzirra Basic Rails association cardinality Nested Object Form with has_one Relation


Read the full article

Comments

14 Jun 09

08:00 AM MDT

Posted in Programming

Debugging cucumber on rails

I like frameworks, but sometimes debugging them is more entertaining. I don’t know why I didn’t think of this method before, but mischa on github has a great little repo showing how you can do it. The README Usage: Add: require ‘ruby-debug’ require ‘cucumber_rails_debug/steps’ To features/support/env.rb Then use: Then debug # opens the debugger or Then what #prints out params, url and html Check it out here


Read the full article

Comments

11 Jun 09

08:00 AM MDT

Posted in Programming

Riding rails with selenium

Selenium is a suite of tools to automate web app testing across many platforms. Cucumber is a BDD framework that allows you to write things in English (or whatever language you want, really), and have that execute as code. Put those together with webrat and rspec and you have a pretty mean stack to test your ruby on rails web application with. Sort of. I’ve been having some problems with it, getting it set up, but it’s coming along. This isn’t...


Read the full article

Comments