In the beginning… there were query components 🤔

Rails Days 11–12. Passing data using a query string/component. PLUS Graph algorithms

Query strings/components begin with a question mark

Yesterday, we created a simple todo list app in Rails. It was pretty straightforward and simple, except for one complication. We needed to add a button that hides all of the completed tasks. In today’s web climate, i.e. the frond-end framework world, this would have been a breeze, but we were challenged to to it using just rails.

Query strings, or query components allow us to send data, like variables, in a URL/URI. So in short, we were able to hide the completed tasks by sending a hidden variable to the controller and rerender the view with only the non-completed tasks.

It’s always nice to learn something new and interesting, and I’m looking forward to learning about more query string use cases in the future.


Graphs: directed and undirected

For the past two days we have been learning about graphs and how they can represent our nodes and their relationships. We practiced adding nodes to their neighbors and vice versa.

If I understand correctly, graphs are a way of representing data structures but aren’t a data structure themselves. Basically a node that has references to other nodes (multiple other nodes as opposed to a singly linked list).

Anyway, that’s it for today. This week we’re working on projects to prepare for the belt exam on Friday. Let’s hope that goes well.


I am looking for an opportunity to join and contribute on a tech team, and I’d love to chat. I’m on Twitter, LinkedIn, Medium, Github or plain old email @ leibelhecht@gmail.com. My Portfolio is at leibelhecht.com