zverok's space

SAVE UKRAINE
I don't build systems. I imagine them, then write them.

Writing

I write a lot but quite irregularly. Fiction, poetry, magazine articles, blog posts, Twitter. The book and Substack/blog are my current main focuses.

You can also check some of my old fiction/poetry (most of it is in Ukrainian and Russian, though).

“41 Ruby Intuitions”—book in progress

Gaining architectural insight from looking at code as text

The main topic of the book is looking into the ways of code writing that allow creating lucid code. Lucid code conveys its intention and means in the most humane ways possible. I’ll be exploring the ways of thinking that Ruby programming language, “designed for developer’s happiness” teaches, and how paying attention to singular (code) phrases allow one to write better.

Blog

Note: Most of my writing is currently first published at Substack. You can subscribe by email or read it on the web.


To not become "old news," I write to the Ruby community in days of war Russia leads against my country.

I write to Ruby community in days of war Russia leads against my country.

A slightly unusual story of a fail I am not angry with.

Using the idea of a phrase-level expressiveness to design a succinct and unobtrusive query language.

Final part of adventures in understanding, explaining, and challenging the facts that should be obvious.

Further adventures in understanding, explaining, and challenging the facts that should be obvious.

Adventures in understanding, explaining, and challenging the facts that should be obvious.

I spent 24 days digging into the code of {Shan, Shui}* Chinese painting generator and lived to tell the story.

A few days ago, I stumbled upon an article about small JS debugging techniques—right when I was in the middle of debugging my JS hobby project. There is a lot of cool stuff there, but one that stru...

Or, How AI Could Help Coding

On challenges of designing the "query language" for a human-readable encyclopedia.

Some time ago, I wrote a Twitter thread about one of the unseen hard problems in software development—access to the common knowledge. Since then, a few things happened to me, one of the most impor...

Last week I posted an errhm Tweetstorm making a few quite important points: Some of the hardest problems to bring in the software development ecosystem are those that "intuitively" have ...

I spent a year building a spellchecker, and all I got is some grumbling to share. When I started rebuilding the world’s most popular spellchecker, I had several goals. But the main one was: unders...

Hunspell is the most used spellchecker in the world. It is built-in Mozilla Firefox, Google Chrome, Libre/OpenOffice, MacOS, Adobe products, and whatnot. Thus, Hunspell dictionaries are the most c...

This is a part of the ongoing “Rebuilding the spellchecker” series, dedicated to explaining how the world’s most popular spellchecker Hunspell works, via its Python port called Spylls. You can star...

This is the fifth part of the “Rebuilding the spellchecker” series, dedicated to explaining how the world’s most popular spellchecker Hunspell works. Today, we talk about edit-based suggestions. ...

This is the fourth part of the “Rebuilding the spellchecker” series, dedicated to explaining how the world’s most popular spellchecker Hunspell works. Today’s topic is suggest! Quick recap: I...

This is the third part of the “Rebuilding the spellchecker” series, dedicated to the explanation of how the world’s most popular spellchecker Hunspell works. Quick recap: In the first part, I’...

This is the second part of the “Rebuilding the spellchecker” series, dedicated to the explanation of how the world’s most popular spellchecker Hunspell works. Quick recap: In the first part, I’ve ...

How I decided to write a spellchecker and almost died trying TOC for the entire series (work in progress). A few years ago I had a fun idea for a “weekend project”: pure-Ruby spellchecker. Ruby i...

Just yesterday I suddenly understood that there is a small neat trick, allowing to provide friendly error messages for missing method parameters: # default way to do things: def read_data(file) ...

Well, the title says it all! But let me explain. Last week, I stumbled upon a new APL apology post. It struck some deep chord in me and gave me an impulse to make another attempt to understand thi...

A short preface: I am writing in Ruby since 2004. For last 5 years I am also participating in language development, documenting new and old features, proposing some (several got accepted) and divin...

It happened so that this blog was started almost 3 years ago with post about exercise in imitating pattern matching as a Ruby library. That was fun, but ended in a sad realization: All in all, ...

Imagine your friend, thinking about learning programming, or switching to new languages, asks you: OK, I’ll give your beloved Ruby a try, point me to the language reference, I want to taste it....

Since my previous article about Ruby 2.5 new #yield_self method I started to use it a lot—in production and experimental code. Here, I just want to share several code samples/ideas of usage, where...

There is one small yet tricky thing when testing some HTTP APIs with RSpec: how to properly and idiomatically test response’s JSON? That’s where you typically start: let(:response) { call_my_api }...

Well, occasional reader of this blog is no stranger to strong statements, so here is one more of them. For a short preface, lets reiterate about one useful Ruby idiom: Kernel#Array method, a.k...

…the name still sucks, tho As you probably have been told, Ruby 2.5 has introduced Kernel#yield_self method, now available in any object. On the first sight, it does nothing fancy: just, as the na...

A few days ago, I’ve posted on /r/ruby announce of some RSpec matchers/plugins library, and it met with a (not very heated, TBH) discussion that I’ve expected, seen several times, and now want to f...

What’s inside: A useful rspec/rspec-its trick for testing methods with arguments + philosophical explanations why I consider such tricks a good thing. The task Currently we are working hard on da...

Japanese translation of this post is available! Recently I’ve read (informative and well-written) article called 7 Gems Which Will Make Your Rails Code Look Awesome, and my eye was caught with...

NB: This small case study was published as pre-RubyKaigi 2017 appetizer for my talk. Wikipedia and its “sister sites” (Wiktionary, Wikivoyage, Wikisource etc.) currently is the most comprehensive ...

TL;DR: This post shows why you probably should consider using “The Last API Wrapper” next time you need to get something from HTTP API. GIPHY’s API is taken as an example. Preface Idea of this e...

Really short version For an “informational” HTTP APIs (like weather, geonames and similars, currencies, movies, transportations and so on) there are typically “wrapper” Ruby gems created. In most ...

What? RSpec API is constantly evolving towards as DRY and readable DSL as possible. Though, there are several things (tricks and additional methods) that could make your specs even DRYer. Warn...

UPD: It was a ton of really heated discussions around this post. I want to emphasize: the text below is NOT a critique of MiniTest. It investigates difference of approaches to Ruby programming: “ge...

Here are (semi)random notes, trying to outline a system of views on controversional “monkey-patching” topic—the views I myself consider sane and reasonable. It may seem other way for you, but it co...

What? In this short post I’d like to show how some of RSpec components (matchers and expectations) can be used for a greater good outside your tests. Like in your normal everyday scripts. Why? T...

When I’ve started to design time_math2 gem, I’ve already had a strong set of opinions in my head, of why and how it should be done. Like: concise set of well-defined operators for math arithmet...

Remember the Reality library? That thing which wants to make the entire world inspectable and computable through Ruby, Wikipedia, Wikidata and other data sources? Like this: E('Eiffel Tower').coor...

This day is a big day for me. With the help of my friends and contributors, I’m releasing in public the thing we’ve worked on for almost a year: reality. It is an ambitious project, trying to make...

Any tutorial and book will teach you there are two sets of similar operators in Ruby: &&/|| vs and/or (and also &/| for bit operations, but that’s not the case today). But typical tutor...

Just a quick reference post. There are several pairs of type coercions methods in Ruby: to_i and to_int; to_s and to_str; to_a and to_ary; to_h and to_hash. What’s the difference and w...

TL;DR: We need DataFrame as a data structure in Ruby. There are several promising candidates but no one with good usability. Some considerations on requirements to good DataFrame library are propos...

We are releasing Infoboxer version 0.2 today – which is still young but already highly useful MediaWiki (including Wikipedia) hi-level data client. Please look at Infoboxer’s showcase to have a fe...

TL;DR: Readme-driven development (writing README and usage examples before the code) is considered to be an effective way for designing a public interface for a new library. A tool for automating r...

Preface: “Thou Shalt Not Complicate” is planned as a series of strong rants on programming in general and Ruby programming in particular. The main thought is dead simple (and already emphasized in ...

I remember times when Wikipedia seemed a new thing (and the times with no Wikipedia at all). Despite all the critique, sometimes reasonable, Wikipedia have grown to be a fascinating source of “comm...

Short Preface Many years ago, when I considered myself a C++ expert (which was presumptous yet excusable for 19 yrs), I’ve liked to think something like “My language is the most powerful and expre...