Full-Stack Follies

A personal blog about learning full-stack web development.

On Dependencies and Deletion of ActiveRecord Objects

One unexpected error that I encountered while working on my first Rails app was in implementing a delete feature. Basically, the ActiveRecord ORM would not allow me to delete the model instance that I wanted to delete, and threw an exception like this:

Programming Principles: The Law of Demeter (LoD)

The Law of Demeter visualized, beside The Greek Goddess Demeter, where it gets its name

Ruby Refresher: Yield To The Block (...Or Proc, or Lambda)

Lambda vs. Proc at a glance

Bootstrapping a CrowdFunding App on Rails

Crowdfunding is a concept that I’ve loved from the moment that I’ve heard of it. It’s a bunch of small people coming together to create something bigger than themselves. It’s great. Except for the not so great parts. The not so great parts being when a project is funded, but the product never reaches the backers, or when it does reach the backers but not as advertised (see: broken and unfinished). This is in part due to the fact that, aside from basic security checks that the platform initially places on its users, a big part of the crowdfunding model relies on trusting the person that you’re giving your money to to deliver, and unfortunately, with the lax accountability of these platforms, some people abuse that trust. I got to thinking about potentially better ways of doing this.

Weekend Sinatra Project: ScrapSauce (or Making Leftovers Useful Again)

In learning how to program, I’ve amassed a bunch of old code lying around from past projects and courses. A lot of these projects were done with and by friends, half unfinished, with code that was limited by things I didn’t know back then. In a way, they’re leftovers. As an exercise in building a Sinatra app with data persistance, I thought instead of creating something completely new from scratch, it might be nice to revisit an old codebase and extend it, adding a database and server component with my new ActiveRecord and Sinatra knowledge.