Orange and white triangles pattern

What's the Best Way to Learn Webpack?

If you鈥檙e feeling lost whenever you have to add some javascript library to your Rails application, this post is for you! I see a lot of people battling against Webpacker whenever they need to add a new javascript library or have to fix a bug on the asset pipeline. I suffered from the same problems, too. I talked about why this happens on a previous post: 鈥淎dding Bootstrap or Javascript Sprinkles to Rails breaks everything....

June 5, 2021 路 3 min 路 Thiago Araujo
Old man yells at Webpack

Adding Bootstrap or Javascript Sprinkles to Rails breaks everything. What should you do?

Did you spend a billion hours trying to add jQuery, or Bootstrap, or Tailwind to your Rails project, but now everything on the frontend is broken? Or worse: you can鈥檛 even tell whether the frontend is broken or not. It鈥檚 in a unkown state of brokenness. Maybe you just want some javascript sprinkles, but Webpacker makes things so much harder and frustrating. Do you wait until an angry customer complains about the checkout button not working anymore to know which page to fix?...

June 4, 2021 路 3 min 路 Thiago Araujo
A black and white pattern

How should I change production data on a new Rails application?

You need to change production data. You know that doing it manually is unsafe and will definetely cause lots of trouble, like corrupting all you customer鈥檚 data. How else should you do it? You might be spending a lot of time asking yourself these questions: Is there a proper rails way to change data in production? Should I run data and schema modifications in one database migration? Should I run rake scripts in production to modify data?...

April 13, 2021 路 3 min 路 Thiago Araujo
xkcd: The Strong Collatz Conjecture states that this holds for any set of obsessively-hand-applied rules

Collatz Conjecture

The Collatz Conjecture is a simple mathematical problem that still has no formal proof. So it鈥檚 an open problem. This is how it works: Choose any positive integer x. While x > 0, do: if x is even, divide it by 2 (x = x/2) if x is odd, multiply it by 3 and add 1 (x = 3x + 1) The Collatz Conjecture states that no matter what value of x you start with, the sequence will always reach x = 1....

October 15, 2015 路 2 min 路 Thiago Araujo