November 29, 2013

new opportunities in life

As of today I’m no longer an employee at weluse GmbH. It was a fun time but like all fun times it’s time for a change. After deciding to apply for a position as software developer at mindmatters I’m really happy to announce that I’ll be joining them starting December 2013. That’s like next week ;) Aside from being a little nervous because of, well, change I’m also extremly happy that I’ll be joining a team of highly skilled people, working on interesting and demanding projects. Read more

November 20, 2013

deploying with mina using gateways

Capistrano allows you to deploy through a gateway server using a :gateway attribute. When migrating from capistrano to mina you might wonder how mina does this. Mina relies on a properly setup ssh config file, in particular the use of ProxyCommand. For example lets assume you want to deploy to intranet.example.com using a gateway at gateway.example.com. Your mina config will look something like this: require 'mina/bundler' require 'mina/git' set :domain, 'intranet. Read more

October 24, 2013

NVidia keeps crashing my system.

Approximately two months ago my 42 months old Mac Book Pro started randomly crashing on me. According to the stack trace the GPU driver was at fault. At first I ignored the problem because it only happened once a day, but slowly the frequency increased to 3+ times a day. Sometimes in quick succession. And it’s hard to work that way. I consulted the mighty google just to find out that the NVidia GT 330M used in my mid 2010 Mac Book Pro is known to be faulty. Read more

October 4, 2013

A note about the past

To enjoy the memories of life is to live twice Marcus Aurelius Looking back at my past I can’t help smiling. All my decisions, good and bad, have helped me to become who I am now. Because of those decisions I now have these memories I value so much. What a great gift life is.

August 4, 2013

let SQL do the work

Today I want to share an example of a simple optimization I’ve recently made for multiple reports I’ve had to generate. It basically boils down to moving work to your SQL server (your SQL server is awesome at crunching huge amounts of data). Here’s the full story: For four years now I’ve been developing the Festivalmanager - a web based management software used for internal attendances at the Wacken Open Air Festival. Read more

May 12, 2013

cancan considered harmful

TL;DR overwrite as_json on all your CanCan Ability classes. Since I’ve started using squash for bug tracking I started noticing exceptions which prevented squash client from transmitting exceptions to the squash backend. The exceptions squash was rescueing made squash raise a new exception! Digging through the stack traces it became obvious that Ryan Bates cancan is the root of all evil. To reproduce fire up irb and paste the following lines: Read more

May 6, 2013

syncing database content with mina

Imagine you are working on an application which is already in production, or being used by a lot of people. While you’re working on a new version, problems occur in production, which are hard to reproduce for you because all you’ve got on your local machine is a static dataset. Often you’ll find yourself creating database dumps from production and importing them on your local machine. A repetitive and somewhat time consuming task. Read more

March 29, 2013

Asset Pipeline and I18n using i18next

About one year ago I wrote about i18n and the rails asset pipeline with jQuery. Last week I took the time to update my jquery-localization-engine to support i18next instead of jquery-localize. I also added support for an external service, Copycopter. Copycopter enables you to update your localizations without being forced to redeploy your application. The new package is called rails-asset-localization. So far it’s working really great. To summarize - the upsides Read more

March 15, 2013

Dynamic Model validations with Ruby on Rails

Ruby on Rails 3 made dynamic validations really easy. Yet I feel like most people follow bad advice when implementing dynamic validations in rails. If you read posts on Stackoverflow you’ll find something like this: class Project < ActiveRecord::Base validates_presence_of :name, if: :name_should_be_present attr_accessor :name_should_be_present end # ... class ProjectsController < ApplicationController def create @project = Project.new(params) @project.name_should_be_present = true if @project.save # snip else # snap end end end The more complex your validations get e. Read more

© Raphael Randschau 2010 - 2022 | Impressum