Trampoline Systems

* Trampoline Description Here

Trampoline Systems

* Trampoline Description Here


Content

Machines

Ideas, thoughts and observations from Trampoline's technical brains

Open sourcing Pearson’s Correlation calculations

By David MacIver on April 22nd, 2009

As you might recall, I did some articles on calculating Pearson’s in SQL.
It turns out that this is a hilariously bad idea. The performance you get for it is terrible when the numbers get large. Switching to PostgreSQL seemed to help a bit here, but even then the numbers are not great (and we still [...]

david

ActiveRecord-JDBC plugin for working with MySQL master-slave configurations

By craig mcmillan on March 20th, 2009

here’s a little plugin for ActiveRecord-JDBC which enables simple use of MySQL master-slave configurations
active-record-jdbc-mysql-master-slave

mccraig

type discussion on irc (my eyez)

By Jan Berkel on February 5th, 2009

A java programmer, a scala dev and a ruby guy meet on #irc. Says the java guy to the… wait, this is not the beginning of a joke.

jan: Map<String,Map<String,String>> argggghh
thepete: mmm, readable code, yummy
David: Map<String, Map<String, String>> is perfectly reasonable. :)
The real problem is that Java makes [...]

jan

PFY Wanted!

By Jon Cowie on January 29th, 2009

Trampoline are looking to hire a PFY! Working as part of our engineering team, you’ll be helping us grow our infrastructure and supporting a mixture of sales staff, executives and developers in their day-to-day operations. This is a junior-to-mid-level position that would be ideal for a graduate with 1-2 yrs experience who’s keen to learn [...]

jon

java signed types fail

By Jan Berkel on January 29th, 2009

Ok, another fail post, this time regarding java.
Remember, Java has only signed types (int, byte, short, long) - char is the only exception.
WTF?
James Gosling says (source):
Quiz any C developer about unsigned, and pretty soon you discover that almost no C developers actually understand what goes on with unsigned, what unsigned arithmetic is.
Things like that made C [...]

jan

Porting Pearsons to Postgres. Performance?

By David MacIver on January 29th, 2009

I’ve uploaded a version of the Pearson’s Coefficient code which runs on postgresql. You can download it here.I wrote this as an experiment to see if Postgres could help us with some of our MySQL performance woes.
Some brief experimentation suggests that once you fix PostgreSQL’s ridiculous default configuration the performance story is relatively happy. At [...]

david

Has Many + non default primary key loads incorrect data in Rails 2.2.2

By Emma Persky on January 29th, 2009

 
I found an interesting bug in Rails 2.2.2 yesterday. I couldn’t find a similar bug on the rails lighthouse so created a new ticket. What was most interesting though, was how quick the rails core team picked up the bug and assigned it to  someone. 
It turns out that the bug had already been fixed in [...]

emma

Yet another MySQL Fail

By David MacIver on January 26th, 2009

mysql> create table stuff (name varchar(32));
Query OK, 0 rows affected (0.24 sec)
mysql> insert into stuff values (’foo’), (’1′), (’0′);
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0
mysql> select * from stuff;
+——+
| name |
+——+
| foo  |
| 1    |
| 0    |
+——+
3 rows in set (0.00 sec)
mysql> delete from stuff where name = 0;
Query OK, [...]

david

JRuby + Clojure’s Immutable Data Structures = Easy to maintain, application data-model.

By Daniel Kwiecinski on January 22nd, 2009

Implementing an application with rich data-model which can be updated by multiple UI controls, many concurrent threads with undo/redo functionality may be somewhat cumbersome. In order to ease this task, the functional programming paradigm with the immutable data structures turned out to be useful.
Because all good developers are lazy, one should seek for reuse rather [...]

daniel

mysql cast to floating point

By craig mcmillan on January 14th, 2009

discovered another mysql trick
if you are experiencing underflow with mysql fixed point arithmetic, you may need to force a floating point evaluation. cast() does not support cast to floating point so multiply by 1e0 instead
e.g.
select  1000000000000000000000000000000 *  ( 1 / ( 1000000000000000000000000000000 ));
returns the wrong answer, whereas : 
select  1000000000000000000000000000000 *  ( 1 / ( 1e0 [...]

mccraig