Railsware Blog

on product management, engineering, design, culture and many more...

Flexbox as a solution for browser reflow optimization

Flexbox as a solution for browser reflow optimization

While we’ve been developing one of our products (Mailtrap), we needed to create 2 column page layout with inner blocks stretching down to the whole height of browser window with sticky footer and header. The page layout looks like this: This layout has several nesting levels which makes it more complicated …

Make AngularJS 1.0.7 work with Jasmine 2.0

Make AngularJS 1.0.7 work with Jasmine 2.0

During setup of Jasmine 2.0 for AngularJS 1.0.7 application it turned out that they are not compatible. The reason is that Angular 1.0.7 is compatible with the older version of Jasmine – 1.3. And there were several breaking changes in Jasmine private API which was used by AngularJS. There were …

Rails logging into several backends

Rails logging into several backends

Sometimes, it’s required to setup Rails logger for storing logs into several backends. In our case we decided to use Loggly, but also wanted to leave old file-based logging. Despite the actual solution is very simple, it’s hard to find it. The best match on StackOverflow suggests to create some …

Creating custom HTML elements with Web Components

Creating custom HTML elements with Web Components

Web Components Web Components are a collection of standards which are currently actively supported by google and mozilla teams. The core idea is that they allow us to bundle markup, styles and javascript functionality into custom HTML elements. And great thing about these new elements is that they fully encapsulate …

Share Rails configuration to Javascript

Share Rails configuration to Javascript

The usual way of storing Rails configuration data are YAML files. In one of our previous posts, we talked about proper way of dealing with Rails configuration. Nowadays, Javascript applications built on top of RESTful API are common practice, and in cases like this configuration data might be duplicated across …

BDD-style testing in Swift with Sleipnir

BDD-style testing in Swift with Sleipnir

Introduction In Objective-C people use different frameworks to write BDD-style tests for their code. Some of them are: Cedar Kiwi Specta With the inroduction of Swift we’ve decided to create BDD-style testing framework in pure Swift. After a couple weeks of implementation we are making the first public version of …

Creation of pure Swift module

Creation of pure Swift module

If you have already started playing with swift, you probably thought about how to include third party libraries into your project or how to distribute yours. Apple provides a mechanism to distribute code via frameworks (eventually, for iOS too), so making a custom framework, which will include both ObjC and …

Composing functions in Swift

Composing functions in Swift

In Swift – the new programming language introduced by Apple – functions are first class citizens. This basically means, that a function can be passed as a parameter, returned from another function or assigned to a value. It allows us to do a lot of useful stuff with them. Function …

Global variables in Swift are not variables

Global variables in Swift are not variables

The title sounds pretty strange, but I will explain what it means. While playing with Swift I’ve faced weird behaviour, a feature in fact, which isn’t covered in documentation (at least I didn’t find any references!). UPD: shame on me, how could I miss this? Global constants and variables are …