emilybache / GildedRose-Refactoring-Kata

Starting code for the GildedRose Refactoring Kata in many programming languages.
https://youtu.be/Mt4XpGxigT4
MIT License
3.79k stars 5.25k forks source link

Elisp #574

Closed MGadhvi closed 1 month ago

MGadhvi commented 1 month ago

READ ME BEFORE SUBMITTING A PR

Please do not submit a PR with your solution to the Gilded Rose Kata. This repo is intended to be used as a starting point for the kata.

Please provide your PR description below this line

Amended elisp code. Please see latest commit for more details

codecop commented 1 month ago

First review was in #572 . Work in progress

MGadhvi commented 1 month ago

Thank you. Code has been amended. Please see latest commit

codecop commented 1 month ago

Thank you we are moving forward. There is still one thing. Your Gilded Rose update-quality code. Let me try to elaborate. The original code, e.g. https://github.com/emilybache/GildedRose-Refactoring-Kata/blob/main/clojure/src/gilded/core.clj is bad on purpose. We need a port that looks very similar. Your code is something like that

if AgedBrie ...
else if Backstage Pass ...
else if Sulfuras ...
else ...

Also you use min/max. The original code is different:

if not AgedBrie and not BackstagePass ...
if not Sulfuras ...
if not AgedBrie and not BackstagePass ...

And inside it has duplication for the checks >= 0 and <= 50. Further the code needs to check for the exact strings "Backstage passes to a TAFKAL80ETC concert" and "Sulfuras, Hand of Ragnaros"

MGadhvi commented 1 month ago

Thank you. I appreciate the support and guidance

MGadhvi commented 1 month ago

Changes have been made. This has really pushed me to learn elisp better. Please let me know if anything else is needed

codecop commented 1 month ago

Thank you and well done seeing it done.

MGadhvi commented 1 month ago

Thank you and well done seeing it done.

Thank you for your help