Sneaking a peak at Rails 4
October 15, 2012 § Leave a comment
This weekend I decided to have a go at making an app with edge Rails, aka Rails 4.0.0.beta. I hunted around for a summary of the cool new stuff and didn’t really find one. So, here is the interesting things I hit upon, more or less in the order I hit upon them:
iOS 6 injecting should_group_accessibility_children to POST requests
October 3, 2012 § 5 Comments
After iOS 6 dropped, we got reports that an iPhone app of ours had stopped working after upgrading. We quickly confirmed that this was indeed the case and started to investigate.
Rails, callbacks, workers, and the race you never expected to lose
August 21, 2012 § 38 Comments
Consider a fairly normal pattern in a user model in Rails, sending a welcome email when a user signs up. If you’re interested in keeping your controller actions quick whilst you do this, you would probably queue the email to be sent later, like this:
class User < ActiveRecord::Base
after_save :queue_welcome_email, :on => :create
private
def queue_welcome_email
Resque.enqueue(WelcomeEmailJob, self.id)
end
end
class WelcomeEmailJob
@queue = :normal
def self.perform(user_id)
user = User.find(user_id)
UserMailer.welcome_email(user).deliver
end
end
Straightforward, right? You’d think so, but if you implemented this and ran it in a live system, you would find a small number of ActiveRecord::RecordNotFound
errors cropping up in Resque.
CoffeeScript is Afrikaans Javascript
February 7, 2012 § 16 Comments
A while ago I met a few Afrikaans speaking people, and found out that (being Dutch) I was able to understand them pretty well, despite the fact they were speaking Afrikaans.
Afrikaans is one of the newest West Germanic languages in the world and is primarily spoken in South Africa and Namibia.
The Dutch commander Jan van Riebeeck founded a new colony in 1652 near today’s Cape Town. Since then the Dutch language that the inhabitants spoke started to evolve and developed itself into a new language. This happened because of the influences of other languages that were spoken in South Africa at that time. About 90-95 percent of the Afrikaans vocabulary is of Dutch origin. The other 5-10 percent is copied from languages like Malay, Portuguese, Bantu and Khoisan. Which were the native languages of the inhabitants that were moved to South Africa by the Dutch. It was not until 1925 that Afrikaans was acknowledged as an official language. Before that it was considered to be “kitchen language” for the unlearned and not suitable for use in authorities like government, church and court.
Monitoring a site after launch (part 1)
February 6, 2012 § Leave a comment
A lot of effort goes into launching a project, but often they can be found neglected after launch. We see this more in client projects with a launch date, than with start-ups or any of our internal proprierty work, but the ideas here should apply to all.
It is niave at best, to assume that once launched the project is done – to this end we always encourage clients to budget for work *after* launch. Sometimes this can be a hard sell, because people assume that once something is launched it is done, however argubly this is the most important work to be done. Before launch you are essentially working on educated guesses and experience (or hopefully user testing), but after launch you can see how real users interact with your work and even ask them for feedback.
« Read the rest of this entry »
How cool is Erlang?
January 18, 2012 § 1 Comment
A few years ago it seemed like everyone in the Ruby community was checking out Erlang, I guess they thought it was the next big thing, or cooler than Ruby or something. Anyway that seemed to pass as everyone found Scala and recently it seems Node is the place to be (unless you want to run fibonacci sequences). Actually if you’re super on it, you’re probably writing CoffeeScript, ignoring the fact that its just JavaScript.
Anyway, that all said, around that time, like many rubyists I bought “Programming Erlang: Software for a Concurrent World”, started reading it then realised it was kinda hard, and well I had other things to do. Since then I have actually read it, in fact a number of times, along with various other Erlang books and have decided that it is, well, pretty cool. Here are a few things that I’ve really liked and have found useful even when not writing Erlang.
Arrrrcamp 2011
October 17, 2011 § 1 Comment
Thomas and I just got back from Arrrrcamp, a 1 day, three track conference in the beautiful city of Ghent, Belgium. The focus of the event was Ruby (which we love), Rails (which we adore), Radient (which we have no real feelings for, but are happy to hang out with), and Rum. As you can probably imagine, with that kind of a focus, the conference was a lot of fun!