Railsware Blog

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

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 …

ChainFlow – refactor your data processing

ChainFlow – refactor your data processing

TL; DR; This article describes how to refactor and improve readability of complex data processing with syntax similar to Haskell do-notation and State monad. Motivation Latest project I’ve been involved in deals with a lot of data processing. Typical case was a method that receives a data chunk and chains …

Creating books with GitBook

Creating books with GitBook

If you are doing some books/docs writing or attempting to create your first book, you might get interested in this exceptionally nice tool – gitbook. It is a technical book building tool that allows you to embed code samples and exercises, and then generate a great online book that can …

Pitfalls of Rspec boolean matchers

Pitfalls of Rspec boolean matchers

Rspec provides a bunch of build-in matchers. They include matchers that help us work with boolean values. But not always these matchers are safe to use. be_true and be_false matchers I guess everybody used RSpec matchers be_true and be_false. There are a few examples with them:

but it’s good …

Time-comparison-in-Ruby

Time comparison in Ruby

I believe every ruby developer has faced time comparison issue at least once and tests are one of the possible areas where it may happen. RSpec message like this may confuse:

What’s wrong? Investigation Let’s create two Time objects:

At the first glance, they are equal. But it’s …

Interconnecting Elixir nodes

Interconnecting Elixir nodes

Elixir is a functional language built on top of Erlang VM. Therefore it uses Erlang mechanism for communication with nodes. Erlang has one simple rule: everyone connects to everyone. It provides a simple authentication mechanism by tokens called cookie. In this article I want to show how to use remote …

Creating and using Clang plugin with Xcode

Creating and using Clang plugin with Xcode

This tutorial describes how to create Clang plugin and covers the next things: environment setup basic plugin setup setup Xcode project for plugin development warnings reporting errors reporting Xcode integration interactive hints for errors/warnings riddance tl;dr Clang Rocks!!! You can find the plugin here. Intro While working on BloodMagic, I …

RW podcats

Ruby and Web Podcast

For our Russian-speaking readers, we will now be also sharing a weekly podcast by Alexey Vasiliev and Alex Chaplinsky about Ruby and web technologies. Enjoy! This week talking about: DevDocs – multiple API documentations in a fast, organized, and searchable interface. Token Based Authentication in Rails A List of Deprecated …

iOS acceptance testing with Calabash and Rspec

While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It’s called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations. The only drawback we found significant is lack of native …