Ruby best practices: count, length, size

When to use which: Hash size and length both call RHASH_SIZE which is O(1) count is enumerable.count which is O(n) – use only with block best practice: length without block, count with block Array size is an alias for length length calls RARRAY_LEN which is O(1) count is O(n) – use only with block best practice: length …

Continue reading ‘Ruby best practices: count, length, size’ »

Performance problems with FreeTDS

So FreeTDS is the glue between a linux systems and SQL Server, among other things. For my purposes I’m mainly using it to run Rails with a SQL Server backend. My understanding is that the alternatives to FreeTDS are Microsoft’s SQL Server ODBC Driver 1.0 for Linux or, if using JRuby, Microsoft’s JDBC Driver for SQL Server. But why …

Continue reading ‘Performance problems with FreeTDS’ »