random thoughts

WAN DHCP mystery on Tomato software

Lately I’ve been messing with my home network - long story short I ended up buying new router because my old Buffalo WZR-HP-G300NH was starting to having problems with wifi signal strength out of the blue. So I ended up with NetGear N300 v2 running Tomato by Shibby and a smaller one TP-LINK WR710N for the other room. And here is the kicker - none of routers was able to obtain IP address on WAN port via DHCP (after cloning mac address of wan port, as mac was filtered by my Internet provided).
WAN DHCP mystery on Tomato software

How I failed to create Vagrant-based Ruby On Rails environment

Did you ever tried to solve a problem of unified development environment? It’s hard. I mean - seriously. ‘It works on my machine’ - how many times did you heard that?

So you have Vagrant or Docker or maybe some other brand-new-solution. With Vagrant you basically build a whole VM environment, with Docker it’s another story (assuming you’re running linux).

How I failed to create Vagrant-based Ruby On Rails environment

Extracting form objects in practice

Did you get to the point where your model is over 1k lines longs and moreover stuffed with various concerns? If so - maybe it’s time to think about extracting so called form models (Ruby/Rails community always have fancy names for most simple things :p).

What is a form model? It’s simply a Ruby class (d’oh) that encapsulates logic related to a single operation. Dead simple example that comes to mind is some kind of a sign up process that exists in almost every web application.

Extracting form objects in practice

Vagrant setup for multiple subdomains application (dev box)

Problem

Build a vagrant development environment that will serve an rails application that works on multiple subdomains. Moreover that application consists of multiple smaller apps that all are running with a single domain.

Vagrant setup for multiple subdomains application (dev box)

Rails 3.2 to Rails 4.1 upgrade

Let’s talk about pretty tedious task - upgrading rails, of course it can be interesting experience, but if you have relatively large application to upgrade it can be cumbersome, here are my thoughts after doing through process of switching Rails 3.2 to Rails 4.1.

Rails 3.2 to Rails 4.1 upgrade

Why my code is so darn slow?!

-> Slow code? <-

Ruby is very pretty, and unfortunattely it can be very slow. Beautiful syntax and flexebility of this language has its price (well, it’s not so bad compared to other interpreted languages anyway).

Let’s go over few (totally random) things that might cause performance issues.

Why my code is so darn slow?!

How to protect your website against spammers

-> Spam <-

When you’re running community-driven website sooner or later you will have to fight back spammers. There can be different kind of spammers, but the main question here is - how do we stop them from flooding your precious site?

How to protect your website against spammers

Working remotely

I must say time flies really fast. It’s been a while since I started my journey with working remotely full time. After moving from Warsaw to Cracow I’m working in Warsaw after all. I’m really happy that remote working (in general) is getting more and more attention (I guess you already read Remote?) and that companies start to see that huge office space isn’t always what makes employees happy ;).
Working remotely

My Gems of 2013

I noticed that I ‘starred’ over 320 gems on rubygems.org. So I decided to do some cleanups there and while I’m at it - share with you few real gems that I like to use. So here it is - my tiny list that I called “My Gems of 2013”, mainly because it sounds catchy; a little bit of marketing didn’t killed anybody yet, I think.

I tried to avoid some, well, really obvious choices (like rspec, mocha, sidekiq, devise, resque, carrierwave, etc. - you get the idea) so maybe you fill find that one precious, very special thing that you will love ;-). Here we go.

My Gems of 2013

Yet another chruby user

Few days ago I notice that RVM took over 8GB of my disk space for various gemsets/rubies. RVM in general is a beast (20k lines of shell script, you kidding me?!) and I used it since I started my journey with RoR, it was great (hey, you can support rvm 2.0 if you want/can) but I decided it was time to look for an alternative. It was nice meeting you RVM, but it’s time to move on.
Yet another chruby user