-
There's no place for Test-Driven Development (TDD)
Test-Driven Development (TDD) doesn’t make sense to me, especially when requirements change frequently. -
Why does target="_blank" have an underscore in front?
Ever wondered why you need the underscore in
target="_blank"
to open a link in a new tab? -
Writing software is like spreading butter on bread
A slice of freshly baked bread is filled with thousands of pores. The problems these pores represent can be covered with a thin layer of creamy butter - just like your program. The smoother your butter, the more polished your software seems. -
Notes from the Opening Keynote by David Heinemeier Hansson at Rails World 2024
During DHH’s Opening Keynote of Rails World 2024 in Toronto, Rails 8 beta was shipped with Authentication, Propshaft, Solid Cache, Solid Queue, Solid Cable, Kamal 2, and Thruster. -
How to add Mission Control to your Rails app and protect it with Basic Auth
Mission Control is a powerful tool for monitoring and managing your Rails jobs in real-time. It offers insights into your app’s performance and errors. In this tutorial, I’ll show you how to integrate Mission Control into your Rails app and secure it with Basic Auth. -
I built a flag matching game in 6 days. It was played more than 45k times in 2 weeks
I built a flag matching game called Flag Match in 6 days that was played more than 45k times in 2 weeks. -
How to build and deploy a Telegram bot with Kamal
There are many great tutorials on how to write Telegram bots, but almost none of them cover how to deploy a Telegram bot. In this article, we will write a simple Telegram bot and deploy it with Kamal. It will run in a Docker container exposed via Traefik.
-
Cloudflare Tunnel: a free ngrok alternative for exposing local Rails apps to the internet
Imagine you want to test a new page that you just wrote the code for against a real mobile device. You don’t want to push it into production without testing it. You somehow need to expose your local Rails server to the internet so that you (or anyone else) could test it before it goes live.
-
Coffee World Rush: a leaderboard for coffee drinkers all around the world
Hey there, coffee lovers! Are you someone who can’t start their day without a cup of joe? Well, you’re not alone! I also love coffee. Coffee brings people together from all corners of the globe, and now there’s a fun new way to celebrate our shared love for this drink. -
I built a word-matching game called Matcharoo
I’ve spent more than 20 years studying English. I’ve experimented with a lot to expand my vocabulary. I’ve played games, used flashcard apps, watched movies, and read books. I’ve even made an effort to commit dictionary words to memory. However, it was tedious and took too much time. I therefore made the decision to develop a tool to assist me in learning similar English words. -
Using Overmind with Foreman as a fallback for Rails 7.1+ apps
When you generate a new Rails 7.1 app, you have a binstub called
bin/dev
. The binstub is responsible for launching your development tools defined inProcfile.dev
. By default, Rails uses Foreman to start your app. Overmind is a better alternative to Foreman. Your project can support both at the same time, so your team won’t hate you. Here’s how. -
How to generate sitemap.xml for your Rails 7.1+ app with Kamal
Rails doesn’t offer a default solution for generating sitemaps. By using Kamal and an external dependency, it is trivial to add support for sitemaps to your Rails 7.1+ project. -
How to enable the Traefik dashboard in a Rails 7.1 app deployed with Kamal
Kamal uses Traefik as the default load balancer. Traefik comes with a default dashboard that is disabled by default. With the help of the dashboard, you can check your current active routes, enabled services and middlewares, and more. -
How to opt out of the cache with Hotwire's Turbo Drive in Rails
When using Turbo Drive and clicking a link, sometimes you don’t want that link to be pushed onto the navigation stack. Modals, slideovers, and temporary screens require this kind of behavior. With just a few lines of code, Turbo Drive makes this a reality.
-
Making PostgreSQL work with Kamal and a new Rails 7.1 app
While working on provisioning matcharoo, a Rails 7.1 app, with Kamal, I hit a problem. Bundler wouldn’t let me deploy because of the following error with the pg gem:Can't find the 'libpq-fe.h header
. -
How to run your Turbo Native Android app on a physical device locally
While working on the Android app for matcharoo using turbo-android, I hit a problem. My app would load in the Android Studio emulator just fine, but when I connected my Android phone via USB, the WebView wouldn’t load my web page. -
Embarking on an indie dev journey
My 10-year professional programming career has entered a new chapter. Getting laid off not once, but twice in the first half of 2023 was a wakeup call. It made me realize that I want to be the captain of my own ship. -
🇦🇪 Dubai
Prior to going to Dubai, I already had certain expectations. That said, I didn’t expect that my first experience would be falling for a scam. Well, kind of. You see, as a Ukrainian citizen, I can visit the UAE without a visa. However, I was dumb enough to pay some agency to provide me with a tourist visa. When I had paid them the full amount, I realised that was a mistake. When I asked for a refund (30 minutes after my payment), they refused.
-
🇵🇭 Cebu. My longest journey abroad so far
Cebu City is the 2nd largest city of the Philippines. It is located on Cebu island and it’s the oldest city of the country. It’s similar to Metro Manila in a way that Cebu City is just a piece of the puzzle in the bigger picture. Many smaller cities comprise Metro Cebu and Cebu City is just one of them.
-
🇺🇦 Lviv
Lviv is probably the only place in Ukraine that I really wanted to visit. You see, I come from Eastern Ukraine where culture is influenced by Russia. The language we speak is Russian. On the other hand, Lviv is western Ukraine. It is influenced by Poland, Hungary and other western countries. People there speak Ukrainian. Lviv is also the most touristy city of Ukraine, so I had to go there…
-
🇳🇱 Amsterdam
Amsterdam feels like Asia without steroids. I didn’t realise it when I was there but it becomes more evident as I’m typing this post. Let’s analyse why that is so.
-
🇳🇱 Rotterdam
The Netherlands is a country that I had always wanted to visit. In my head it was a little paradise, where people follow the rules, nobody knows trouble and cycles all day long. Did it live up to the expectation? Rotterdam will tell.
-
🇵🇭 Manila. Chrismas and my future prospects
As you might have noticed, I’ve been a frequent visitor to Manila. In fact, every year I spend more and more time in the Philippines. One might think that there’s not much to speak about anymore. Wrong. This time I’ve gotten to experience a beautiful holiday called Paskó (Christmas).
-
🇵🇭 Legazpi
Legazpi is a city in the southern part of Luzon island. Its population is nearly 200,000 people, so it’s considered low for the Philippines. The reason why people go here (including me) is Mayón Volcano.
-
🇵🇭 Bohol
Bohol… what a wonderful island. With each visit I get to know the Philippines better and better. It’s interesting that I’ve never managed to leave Luzon (the island where Manila is). So this trip allowed me to visit my first Philippine island (2nd out of 7641).
-
🇵🇭 Cavite province
Cavite is a big province in Luzon, Philippines. During this trip I was lucky enough to visit Bacoor, Maragondon & Kawit.
-
🇵🇭 Baguio
Baguio is a big city in Luzon, Philippines, which is famous for its cold weather, mountains, strawberries and… lions. Why lions? I have no idea, but they have a huge lion head somewhere (and I didn’t stumble upon it)!
-
Untangling the “love” Ruby tongue twister
I found an interesting Ruby tongue twister:
ruby -e ' %%%%%%%%%%%%%%%%%%%%%%% public def /*; self end public def _*; self end {}./{//}./$\,//./,//,$, $.._$,,%,?,,?,,$_,$?,?? //=~$/&&__=-11+_=$.+111 $><<<<-"<<<"<<<<-"<<"<< <<< << ($`<<_-3<<_<<_+7<<-~__) $<&&$><<$/&&?&&&%&&&&?& %%%%%%%%%%%%%%%%%%%%%%% ' love
-
🇵🇭 Tagaytay
The main point of interest in Tagaytay, Philippines, is obviously the Taal volcano.
-
🇵🇭 Manila
Manila still remains the city of contrasts. Somebody lives in expensive condominiums.
-
🇹🇭 Bangkok
I’ve got a strong idea: I need to spend these winter holidays in Asia, away from the snow and cold weather. Bangkok’s capital, Thailand, was perfect for that.
-
🇵🇭 Manila. First impressions. Food, life and traffic in the Philippines
Manila is truly a city of contrasts. Posh tall buildings border with shabby huts. I turn my head to the right only to see how actively the city is being built. Construction never stops, so does progress.
-
🇺🇦 Kyiv trip
Ukrainian winter. It’s really cold outside.
-
🇵🇹 Lisbon business trip
I haven’t travelled for a while. However this year is lucky for me so far: I travelled to Lisbon.
-
A bit of bacon, lettuce and tomato
While browsing the source code of the Ruby’s virtual machine I stumbled upon an easter egg.
-
Ruby's exception to message mapper
Exception to message mapper is a Ruby library bundled with the standard Ruby library distribution since Ruby 1.1 (released in the 20th century). It was written by Keiju ISHITSUKA and apparently meant to be used internally, to simplify Ruby’s stdlib source code. But since it’s available in the stdlib, it’s also available for us. You may be wondering what this library is about. Well, guess what?.. It maps messages to exceptions!
-
🇺🇸 Internship in San Francisco
During my internship at Bugsnag I took some pictures of the city. My bicycle was my companion. I cycled through many neighbourhoods of San Francisco and even managed to cycle to neighbouring towns. The quality of the photos isn’t astonishing. My second companion was my Chinese smartphone. That’s why.
-
JavaScript eval tricks
By default,
eval
evaluates code in the current context. -
Ruby eval tricks
Greetings upon thee! Let’s evaluate some code for breakfast, cousins.
eval "100 + 1\n (42 + 100)" #=> 142 eval "100 + 1\n + (42 + 100)" #=> 142
-
Various ways to count digits in a Ruby integer
The most obvious solution is to convert it to string and count characters. Boring.
-
Blocks in Ruby are always there
You probably know that even if your method doesn’t accept blocks, you still can pass them.
-
How to safely enter passwords in a terminal
Sometimes command line programs allow you to pass passwords to switches. For example, MySQL:
mysql -u user -p password
. However, if your shell records history, you’re risking to store your password in a plain text file. There’s a way to avoid this. Depending on your shell add the following line. -
How to say “I love you” in Ruby
Can you untangle this?
?===?=??===?=:?===?=??===?=:?===?=??===?=:?===?=.iloveyou!? ?===?=:?===?=??===?=:?===?=??===?=:?===?= #=> true
-
Pulling through a Ruby exception
Pry and IRB both have an interesting property. In these consoles, there’s a possibility to correctly define a method or a class and get an exception. All in the one go. I’ll be using Pry for the demonstration.
-
Difference between frozen Ruby objects across versions
Users of
Object#freeze
should know that the behaviour of this method has been changing over the Ruby versions. Let’s compare it. -
So what is “binding.pry” exactly?
The very first feature that you learn about Pry is undoubtedly “binding.pry”. You put it here, there and everywhere; you’re happier than you’ve ever been before. In simple words: “binding.pry” makes your life a lot easier. But, have you ever wondered what “binding.pry” is? It appears so simple that you don’t even think of the details. When I first started to use Pry, I simply cargo-culted it. “binding.pry” seemed to me like some mysterious sorcery. Obviously, that’s not true, but when you learn something new things always appear more mysterious than they really are. By the end of this article you should have a solid understanding of one of the oldest and most interesting features of Pry.
-
🇺🇦 How I cycled to a football match between Metalist and ETM in Vysoky
A month ago I bought a cheap used mountain bike. I’ve already cycled two times (to be more precise, three times, including the time I tested it after the purchase). Why did I buy a cheap bicycle? The thing is that I wasn’t sure if I really enjoy cycling. It turned out that I enjoy it.
-
🇺🇦 Euro 2012. Ukraine – England. My trip to Donetsk
I was lucky to visit Donetsk on the 19th of June. I went to a Euro 2012 football match between the Ukrainian and the English national football teams. I went to the match with Kyrylo (namesake), a friend of mine.
-
🇺🇦 How I went to IT Jam 2011 in Odesa
I would like to say sorry in advance for the poor quality of the photos, inadvertent canted angles and other possible bloopers. To begin with, I don’t have the skill to take good quality photos. Secondly, I haven’t had any experience with the photo camera I brought with me (as the result, I had no idea how to configure it). Thirdly, the photo camera leaves a lot to be desired. An important notice: it’s better to prepare a cup or two of your favourite drink before reading this, because it’s a long story.