In Ruby, you have a choice: define classes or modules either inline or nested within another module. While both approaches achieve similar results, there are key functional differences to consider, making nesting the preferred approach. The Subtle Distinction in Referencing Let’s look at an example using User and Admin::User classes: module Admin class Nested #…
Category: articles
An easy way to have a local “Github Copilot” for free
I tried copilot some time ago and it wasn’t really good with Ruby, so I abandoned it, and I wanted to try it again, but didn’t want to pay for it so I simply gave up. Then I found out about this amazing plugin for VSCode that does most of what copilot does, the plugin…
When Kubernetes is not the right choice?
As with anything in the technology field, there is no one size fits all solution… And even kubernetes solving a big amount of problems you might have when exposing and scaling your application, it also brings some problems that you need to weight before deciding if this is the right technology for you or not….
Rails from “zero” to kubernetes – ingress reverse proxy
Following up on the ‘Rails from “zero” to kubernetes’ series, we’ll see today how to expose your service to the internet, since I think we all agree that mapping directly the port of your rails app to the internet is not a really wise choice.
Kubernetes has a “simple but works” solution called ingress, ingress is an HTTP proxy, it will work as a reverse proxy for HTTP and HTTPS for any service that exposes one one port.
Rails from “zero” to kubernetes – horizontal autoscaling
Following up on our previous post, we’ll now make kubernetes work for us, and automatically scale our application.
One of the really cool kubernetes features is the ability to automatically span new pods for your deployment based on the CPU usage of your pods. This is kinda simple, but very useful.
Rails from “zero” to kubernetes – a service to access your pod
In the previous post, we created our first kubernetes pod, but one important part is missing, it is not possible to access that application, we’ll solve this with a service now….
Rails from “zero” to kubernetes – first pod
Last year I wrote about using docker-compose to have a test/development environment similar to your production environment (you can check the post here) My environment kept growing and becoming more complex, and I started using docker swarm to deploy the applications, and after some time I started using kubernetes, I’ve learnt something about kubernetes in…
Beware of Date.yesterday on your code (A timezone history)
This post is the write-up of how I fixed a production problem that happened a few minutes ago, and can probably save some time for you too, so read this and remember for your next code that deals with time
How to create a request scope for your rails application
Some time ago I missed one of the cool features from the time I worked with JavaEE, that was a request scope for some variables.
I know the instance variables on controllers do a great job simulating it, but I needed to access context in a completely different part of the application, that wasn’t always called from controllers, variables that should be scoped to that request.
So I thought, I could create something like that for my rails app.
6 Lessons From CrossFit That will help your developer career (Or any other career in the matter of fact)
I work as a developer since 1997 (yes, it’s been a long time), and I try to bring most of what I like to my day to day life and if for any reason you follow me on Instagram you know that I’m kinda addicted to crossfit, of course I’m not an athlete, but I’ve found ways that crossfit teaches lots of people skills that I think are really useful in business and life.