I document things happening to me, write about myself and on professional topics.

datarockets/infrastructure v0.2.2

nginx-ingress upgraded to 0.10.0 (nginx’ version is 1.21.1)

cert-manager upgraded to 1.4.1

k8s/basic

  • It is possible now to use service_accounts parameter for k8s/basic module in order to configure annotations for service accounts. It is useful for AWS’ managed cluster in order to link service accounts with IAM roles and policies.
  • cert-manager no longer create separate ingresses to server ACME challenge in order to acquire the TLS certificate. nginx-ingress can’t merge different ingresses for the same host without a special setup.

How Does a Rails App Know Client's IP

The story started when a colleague of mine asked about a weird error he got from Rails:

ActionDispatch::RemoteIp::Ip
SpoofAttackError: IP
spoofing attack?!

When I tried to help I learned how does Rails (in fact, Rack) “calculate” client’s IP. The problem is that our app might sit behind a number of proxy servers managed by us and by other people. I learned that there is an algorithm in HTTP protocol to get trusted client IP in those cases.

Lightning talk from Minsk.rb 17 (in Russian):

Show Me Your Code

A lightning talk on Minsk.rb on how to show examples of your code when you apply for a job (in Russian).

Quick summary:

  • Send a link to GitHub, not a zip archive or Google Drive shared folder.
  • Make sure you have a great commit history.
  • Clean up your code (remove commented code, remove debug output, etc).
  • Give context about the code in readme or code comments, highlight most interesting parts.
  • If your project is under NDA make an extract that shows something about your skill.

Growing Rails Apps

We have everything to write Rails app from scratch very fast. But development becomes slower and slower over time. And Rails itself doesn’t promote patterns to write bigger apps efficiently.

There are common problems in big rails apps like tons of files in app/models, hundreds of lines of code in controllers. And there are ways and patterns to mitigate this and I’m showing them.

Slides: growing-rails-apps.pdf (on Speaker Deck).

Rails: The Good Parts

Developers nowadays tend to blame Rails and DHH because they encourage bad practices that lead to a bad code. This is true but there are many good things in Rails we rarely use that help us to write good maintainable code. I show bad examples in popular opensource projects and show you features of Rails that can be used to avoid their mistakes.

Dima is on stage, red panda on slide looking suspicious, speach buble says "1097?"

Photo by Taras Bovt.

Slides: rails-the-good-parts.pdf (on Speaker Deck).