Ping -> PONG, we will use this technique later

TLDR: a full code snippet at the end of the article.

If you ever had a chance to work with WebSockets in Ruby close enough to handle disconnections, then you should know, that a package for working with WebSockets — ActionCable — has a peculiarity, or better to say — a defect that happens in scenarios such as Internet connection loss. The main problem behind the defect is that ActionCable out of the box does not know (read as: does not react) to the loss of connection by the client quickly enough.

The easiest way to reproduce this nuance is…

During my career, I had a chance to work with different developers. Besides that, I was able to watch a probation period for a lot of new interns to the companies. Based on my experience I’ve built a list of sins that, almost every junior Ruby on Rails developer had made (or currently do) through his own career.

We read Medium stories not only for the knowledge, but also for strange memes.

1. Don’t blindly follow TDD

Testing is a very common approach for projects built with Ruby on Rails.

And all Ruby/Rails learning courses promote the idea of writing TDD as a commandment. …

Source code lives here.

Tor provides a SOCKS proxy so that you can have any application using the same to connect the Onion network. The Tor Browser also provides the same service on port 9150. In this post, we will see how can we use the same SOCKS proxy to access the Internet.

Before the start, we need to install Tor to use it as a proxy.

# For Debian-like distros, you can find a guide over here.
brew install tor

Then launch Tor. The default port is 9050.

brew services start tor

Basically, Net::HTTP doesn’t support SOCKS proxy out-of-the-box (the same issue…


I’ve switched from Web Development to Data Science and today it automatically means that I had to become a Python programmer.

That’s good (I know for this, I don’t get likes from Rubyists), but Ruby is also trying:

Ruby is (for now) not a Data Science centric language with a very large established library. We don’t have such ecosystem as SciPy in the Python. I do not see for this any serious reasons, except for historical. This is my pain.

Lol. Why do you even try to use Ruby for Data Science tasks?

The reason is very simple. Because I love to use Ruby and love his syntax. …

Vlad Dyachenko

24 y.o. Lead Software Engineer; github: wowinter13

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store