• Home
  • About
    • Bio
    • CV
  • Music
    • Shows
    • Works
  • Research
    • Works
  • Programming
    • Projects
  • Blog
    • Watson
    • Viget
  • Contact
    • Message
    • Subscribe
    • Availability

Comments

25 Jun 2016

Reading time ~1 minute

What I Did

  1. Got commenting and replies working on Haxxor-News.

What I Learned

  1. Stabby lambda syntax allows for an object called a Proc/lambda to be called with .call
  2. 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.
  3. 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.
  4. 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

  1. 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

  1. 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 <br> and <hr> tags is nothing short of atrocious. Surely, I don’t need professional FED chops - just a bare minimum to get by…


Share Tweet +1