Skip to content

Instantly share code, notes, and snippets.

@jtanner
jtanner / blog.md
Last active August 29, 2015 14:21

SpinGo <3 Scala

At SpinGo, we've been building our software on Scala, a staticly-typed, multi-paradigm programming language for the JVM. We've enjoyed it and would like to share our experience.

Why did we choose Scala?

Two years ago, the entire backend was written in CakePHP (with the traditional server-side-rendered); we've felt that the rich-client / API approach to writing software can offer far better user experience; additionally, tracking some amount of state in the browser can make many interaction patterns drastically simpler to implement. Our PHP stack had become tremendously difficult to maintain; it lacked Unit tests, the coding style was heavily imperative, and 500+ line methods were less rare than I'd like. Further, PHP did not meet many of our specific list of desirable features in a programming language, namely:

@jtanner
jtanner / watcher.js
Created September 2, 2011 15:56
jQuery Watcher Plugin
// Original plugin by Rick Strahl via
// http://www.west-wind.com/weblog/posts/2011/Feb/22/A-jQuery-Plugin-to-monitor-Html-Element-CSS-Changes
//
// Modified by Joe Tanner @ https://gist.github.com/1188995
(function($){
$.fn.watch = function (props, func, interval, id) {
/// <summary>
/// Allows you to monitor changes in a specific
/// CSS property of an element by polling the value.
@jtanner
jtanner / .autotest
Created May 21, 2009 16:25
For use with the autospec command included with the rspec gem (on osx)
#!/usr/bin/env ruby
require 'autotest/redgreen'
module Autotest::Growl
def self.notify(title, msg, img)
system("growlnotify -H localhost -m '#{msg}' --image '#{File.expand_path(img)}' '#{title}'")
end
Autotest.add_hook :ran_command do |at|
response = [at.results].flatten.join("\n")
@jtanner
jtanner / Webrat checkboxes
Created May 19, 2009 14:48
How to setup many checkboxes with webrat
<label>
<checkbox .../>
Name of checkbox
</label>
check "Name of checkbox"