25 Jun 2016
Reading time ~1 minute
What I Did
- Got commenting and replies working on Haxxor-News.
What I Learned
- Stabby lambda syntax allows for an object called a Proc/lambda to be called with
- Due to HTTP’s statelessness, hidden data form fields allow for desired attributes to be passed into the params hash. One must be careful, though, because hidden form data is easily tampered with.
- In order for a resource to potentially belong to two different resources, one ought to implement polymorphism in the concerned models. Polymorphism allows for parent models to be referenced by a common characteristic.
- Recursion is very effective for nested replies, opposed to keeping track of descendants and ancestry and using confusing logic to hack a view away. As soon as I noticed myself duplicating code to render replies, I knew something was wrong, i.e. code smell was very prominent. As a result, I’ve become good friends with partials and recursively rendering them.
What I Still Don’t Understand
- What is the difference between adding an index or declaring a field when creating a table within a migrate file? I guess I still have much to learn regarding migration files and migration related commands.
What I’d Like To Learn
- I’d like to gain insight into how developers deal with leaving markup to a bare minimum. I’m sure that my decision to bloat up my views with
<hr>tags is nothing short of atrocious. Surely, I don’t need professional FED chops - just a bare minimum to get by…