Code Hannah


Adventures in Learning Full Stack Web Development

JavaScript's Switch to the Rescue

Conditional statements (if...else) execute code if a condition is true. If the condition is false, another statement is executed. In JavaScript, you can also use a switch statement to evaluate multiple conditions against the same expression. This post will explain when you should use a switch and how it works.


Multi-Tenancy in Rails with Apartment

I’m working on a Rails app for nonprofit management that features multi-tenancy. This means that a single instance of the application will support multiple isolated users. Today, we’ll discuss how to configure multi-tenancy using the Apartment library with sessions.


Theodora: Starting an Open Source Project

I’m building an open source rails app aimed at empowering nonprofits to efficiently manage government grants. It’s called Theodora 👑. Large nonprofits often have a structure where one adminstrative organization distributes grant funds across multiple smaller nonprofits. This structure is (sort of) similar to how fast food 🍔 chain businesses are affiliates of a central corporate office.


Recursion Excursion

Recursion is the computer science concept of solving a problem where the solution depends on solutions to other instances of the same problem. With recursion, you can take a complex problem with multiple repeating steps, break it down into one small problem, and then feed the solutions of the small problems back into the original function. In order to avoid an infinite loop, you include a base case that signals your function to exit the loop and begin taking all of the solutions to the smaller problems and unwinding them to reach your final solution.


What is HTTP?

The client needs data from the server the and the server needs a way to present the data to the user on the client. They both need each other. And, if it weren’t for HTTP, they wouldn’t know how to communicate. Communication is a major key in any relationship, so it comes to no surprise that in 1991 Tim Berner’s Lee created the HyperText Transfer Protocol(HTTP) for communication between the client and server.