LIFELINE OF COINCIDENCE


blog by Anton Katunin
programming related 

Meta presentation

at Melbourne Ruby meetup


Growing Rails Applications in Practice

by Henning Koch and Thomas Eisenbarth

A quick read which I would recommend to every mid rails developer and higher. It's common for developers to outgrow their tools. Rather than learn new skills, people start to blame the tools. Your heard those people: "Rails does not scale", "ActiveRecord is antipattern" etc. The books show few patterns which allow to build big Rails application with only small changes to standard 'Rails way'.

The book recommends active_type gem. I would recommend other gem active_interaction instead. active_interaction gem is more superior in my opinion and I've successfully used it in multiple projects over the last 2 years.

As for the CSS structuring, BEM is definitely a good choice to get control over your styles. Only issue with it, if not enforced it loosed its value, so every developer should be very diciplined to follow BEM.

There is only 1 option which is better than BEM, it's css modules. I only used it with ember.js, not Rails though. It automates steps that you have to do with BEM. However css modules require deep integration into the tools you use, which makes it harder to bring into the project.


The Art of Readable Code

by Dustin Boswell & Trevor Foucher

This quick and easy to read book I would recommend to every developer. It talks about all the little things which are often neglected and what developers deal with every day. Naming methods and variables, extracting business logic, code comments, aesthetics and code readability.

This knowledge is language agnostic and the best mastered over reading lots of code, or reading this book :)


Parallel rendering in Rails

Discussion on Reddit

I will continue to expand the features in the pagelet_rails gem. Since it offers a new way of composition in Rails I've found that there are so many new things we can do. In this post, I will focus on the parallel rendering. Yes, that's right, parallel rendering in Rails. Although, it may sound advanced the concepts behind it are extremely simple. This post however is only relevant to web page rendering.


Improve perceived performance of your rails application with minimum effort

at Melbourne Ruby meetup

Download Slides PDF or read more

Links:


Favourite gems

from Rails Camp 19

I've been asking people for the gems they would recommend to others at Rails Camp 19. This is a compiled list of answers.


Math challenge

Last friday one of my friend gave me a math challenge. You've given four numbers 6, 6, 5 and 2, you need to find 3 math operations to get 17 as a result. You have to use all four numbers and only once each. Order of numbers can be any.

I couldn't figure it out in my head so have to write a ruby script to iterate over all combinations, which turned out as a great coding exercise.


Bystander effect

The bystander effect, or bystander apathy, is a social psychological phenomenon that refers to cases in which individuals do not offer any means of help to a victim when other people are present. The probability of help is inversely related to the number of bystanders. In other words, the greater the number of bystanders, the less likely it is that any one of them will help.

-- Wikipedia


Kelly's 14 Rules & Practices

Skunk Works by Nickolas Means


Ruby Inline Tests

Did you know you can inline tests with your ruby code in the same file?

After reading the title Embedding a Test Suite in a Single-file Ruby App (Part 1) I thought: aha! finally somebody has done it and used ruby data block to store tests. However I was disappointed as there was another approach, which I think is less elegant.

Below I show you a proof of concept of embedding tests in ruby code.


Rails as a static site generator


Looking for static site generator? Look no more, use Rails!


Embedded widgets with Ember.js

at Melbourne ember.js meetup


Ruby Community

at BrisRuby meetup


Last 2 year

at BrisRuby meetup


Debugging Poltergeist and PhantomJS

Recently at Opensight we had weird issue with our integration tests. When we run single test it succeeds, but when whole suit it fails.

It was failing on the same "terms and conditions" page where we expect 'Accept' button: could not find element Accept

click_button 'Accept'


Circular dependency in Rails

This is an interesing bug I've encountered this week. While our Rails application was working in development it was completely broken in UAT environment (which is 99% production like)

We were getting Circular dependency detected while autoloading constant error on all of our reports.


Multiple logins at once with Browser Profiles

Do you:

  • share same computer and login with other family members
  • or you are testing website with login

Then you should know what browser profiles are.


Differentiate your gem

Are you tired of seeing yet another project on github while there are ten others which do exactly the same thing? In this post I suggest we start to diffirentiate our projects.


Comparison in Ruby

at BrisRuby meetup


Speed up POW DNS Lookup

I'm using POW as a proxy to my local dev server in development. That gives me nice local *.dev domain names. However I've noticed that it takes 10 seconds to load a singe page in Chrome. Of course, I thought, It does like 80 requests as each asset is served as a separate file in development. But after investigating it a bit more DNS lookup for each request was 3 seconds and for some reasons it was like that for every single http request.


Report rake (>=0.9) exceptions to NewRelic

NewRelic service is great for application monitoring and errors tracking. However it doesn't track rake exceptions by default. You can use AirBrake gem and service, but sometimes it's too much for you. Fortunately with a bit of ruby it's easy to do it yourself.


Zeus with RubyMine 6.0 Momiji

The first version of RubyMine with Zeus support was released last week. This is a small tip how to get it working.


My last three projects - wins and failures

at Brisbane Web Design meetup


Order of columns in table index matters (postgres)

Today was trying to figure out why my query was running very and very slow.


gem install mysql2 - fails with MySQL 5.6.12

If you installed the latest mysql with homebrew, my version of mysql was 5.6.12. I couldn't install mysql2 gem

gem install mysql2


Quickly open files in iTerm with RubyMine on MacOS

You can use RubyMine for editing but still run tests in terminal. With this tip you can click path in terminal and open that file in RubyMine.


D3.js workshop

at CampJS

Presentations

Examples


Nested Resources

at BrisRuby meetup


Dragonfly gem

at BrisRuby meetup


Keyboards

slides.pdf


Jewelry Box

slides.pdf


Slim Part 2

at BrisRuby meetup