Jim Lynch Codes
  • Blog
  • About Jim

Writings about one coder's stories & experiences.

Accepting Criticism For My Reagent / Re-Frame Challenge

2/27/2018

0 Comments

 
I had passed the phone screen for a chance to work as a ClojureScript developer for a startup in manhattan, and they emailed me a coding challenge. Basically, they wanted me to make a glorified do-to list using reagent and re-frame. This post is to document the feedback from the reviewer of my code and think out loud about what he / she meant by it and what I can do to avoid the same issues the future.

Feedback Letter

​I wanted to pass along some constructive feedback on your Derpframe code exercise. Here are a few (hopefully helpful bits of feedback):
​
  1. We felt the code wasn’t very DRY, probably because you could have used some more abstractions
  2. You left in namespaces that were blank or commented out 
  3. You had the same ID for everything in the product list. We found this confusing.
  4. Lots of (nth item 1) and nested (get)s made things a bit hard to follow.
  5. Various formatting issues made this feel rushed/unfinished.

We did like that you hosted the code to test out and the inclusion of tests. But, on balance the work wasn’t quite strong enough to proceed.

Hope that is helpful to you.

Reflections

I'm still not totally sure what he meant by (1). I did break  break the view elements out into presentational and container components, but possibly  I could have extracted things into smaller functions? They must have thought there were places I was repeating myself. I'm sure (2) could have easily been avoided with an editor that somehow highlights unused namespaces being required. Also (5), the general formatting issues, could have been avoided if I was able to just Ctrl + Alt + L as I do in JavaScript. I really like to tear apart the code in order to modify it, and having to manually move parens around gets tedious very quickly. Not sure why they were seeing the same id for every product (3) since this exact thing was initially giving me an error in the browser console, but I then changed code to force each one to have a unique id. (4) talks about using (nth item 1), and I know exactly where in the code that occurs. It's really just some lost residue lingering from when I had originally designed the app to allow the user to add any quantity of the item to the cart, but then near the end of development I realized the original spec called for only needing to add 1 item to the cart. Of course looking back I can see that if the index is always 1 then it's probably clearer and easier to read if you just say (first item). The nested gets were also changed to get-in's as part of the refactorings in a later commit.

Key Takeaways

If I want to be serious about professionally developing Reagent / Re-Frame applications I should really have a good editor with solid code reformatting tools and use a Clojure linter. Never ever type (nth item 1) with a hardcoded 1 again! Also, try to use get-in instead of nested gets right from the beginning instead of having to refactor them in a commit after the one being looked at by the person judging your code. ;) Stay strong, bend over, and take all the criticism you can get because these are the things that will make you wiser. You'll encounter plenty of "No"s on the the road to greatness. Just try to learn as much as you can along the way.

If you're curious, the code for my project is hosted here.
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    ​Author

    Picture
    The posts on this site are written and maintained by Jim Lynch. About Jim...
    Follow @JimLynchCodes
    Follow @JimLynchCodes

    Want FREE access to
    my daily stock tips 
    ​newsletters??
    Sign up here:

    - Triple Gainers
    - Rippers N' Dippers
    - Growingest Growers
    ​

    Categories

    All
    Actionscript 3
    Angular
    AngularJS
    Automated Testing
    AWS Lambda
    Behavior Driven Development
    Blogging
    Business Building
    C#
    C / C++
    ClojureScript / Clojure
    Coding
    Community Service
    CS Philosophy
    Css / Scss
    Dev Ops
    Firebase
    Fitness
    Flash
    Front End
    Functional Programming
    Git
    Go Lang
    Haskell
    Illustrations
    Java
    Javascript
    Lean
    Life
    Linux
    Logic Pro
    Music
    Node.js
    Planning
    Productivity
    Professionalism
    Python
    React
    Redux / Ngrx
    Refactoring
    Reusable Components
    Rust
    Security
    Serverless
    Shell Scripting
    Swift
    Test Driven Development
    Things
    TypeScript
    Useful Sites
    Useful Tools
    Video
    Website Development
    WebStorm
    Writing

    Archives

    February 2021
    January 2021
    October 2020
    September 2020
    May 2020
    April 2020
    February 2020
    January 2020
    December 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015

    RSS Feed

  • Blog
  • About Jim
JimLynchCodes © 2021