17 Dec, 2008
Posted by: Matt Williams In: jboss| tips
One, One database record!
Two, Two database record!
Muahahaha!
By default, when using datasources with JBoss, it does a count to validate a connection, both on creation and when it is requested from the connection pool. It looks something like:
select count(*) from x
Now, this can take take a while when working with tables containing 1.8 million rows and [...]
25 Nov, 2008
Posted by: Matt Williams In: ruby| tips
Maybe it’s me. Maybe it’s a feature of ubuntu, but on two separate systems, when I went to upgrade rubygems to the latest via
gem update –system
it didn’t work for me. So, I had to go the more extreme route of:
gem install rubygems-updateupdatee_rubygems
This is mostly for my own reference, it’s not the first time [...]
Ruby’s Object has a method, methods. You can use it to see the methods which an object has. Sort of. In this post I’m examining methods, public_methods, and private_methods as well as some of their implications.
19 Aug, 2008
Posted by: Matt Williams In: rails| tips
This is partly for myself, and partly for anyone after me…..
I have a controller generated via rspec_scaffold — yes, I know, it might not be what all the cool kids are doing, but it works. I also have restful_authentication set up to use rspec. So, when I go to add before_filter :login_required, autotest frowns at [...]
autotest / zentest are really useful tools. However, it’s important to remember to run migrations for the test database — otherwise your tests will fail (miserably!)
I’ve found the following to be helpful for using autotest:
Getting started with Autotest - Continuous Testing
Autotest RSpec Notifications for Ubuntu « My Pragmatig life
13 Aug, 2008
Posted by: Matt Williams In: gotchas| tips
Ruby’s injection is very useful, but if you don’t remember one key fact, you’ll shoot yourself in the foot.