Posts
All the articles I've posted.
-
Keeping Array Elements Unique in Ruby
Updated:Explore different ways to keep arrays unique in Ruby—using `uniq`, `uniq!`, and the `|` operator.
-
Dynamic Full Page Background Images in Rails
Updated:Learn how to set and randomize full-page background images in a Rails app using CSS3 and simple view helpers.
-
Understanding Linked Lists (DSA Series)
Updated:A practical introduction to singly and doubly linked lists—what they are, when to use them, core operations, time/space trade-offs, and modern relevance.
-
Working with Files in Ruby
Updated:Learn the basics of working with files in Ruby: opening, reading, writing, streaming, and querying file objects efficiently.
-
Retrieving a Random Row in ActiveRecord
Updated:Learn different ways to fetch a random row in ActiveRecord, their trade-offs in PostgreSQL and MySQL, and which method to prefer for performance.
-
Recovering a MySQL Root Password
Updated:Forgetting a database password isn’t the end of the world. Here’s how to reset or recover the MySQL root password, with notes for modern MySQL versions.
-
Highlighting Current Link in Rails Navigation
Updated:A look back at techniques for highlighting the active link in Rails navigation, with modern alternatives using current_page? and Stimulus.
-
Centering a Fixed-Sized Element with CSS
Updated:Learn a classic CSS trick to center a fixed-width or fixed-height element using absolute positioning and negative margins.
-
Re-initializing Table Sequences in PostgreSQL
Updated:Learn how to reset and reinitialize table sequences in PostgreSQL safely, whether preserving existing data or starting fresh.
-
Loading CSV Data in Rails: Then vs Now
Updated:A look back at how Rails 2.x apps loaded CSV data into models, and how modern Rails apps can do it more efficiently today.