What I'm Aiming For With Codified-Heart-Song

 What I'm aiming for here, in codified-heart-song (pseudo-randomly generated working title for what's to come), is to have the parsed metaData concept from the previous implementation of Wxrd kept while removing the notion of aliases and members, replacing the two with just a single markdown field (so markdown and metadata). 

Since we already copied Wxrd's implementation into MDWxrd, I can start by just deleting everything that doesn't relate to metaData, starting with the lines:


  aliases = {};

  members = {};


Deleting those and saving with CTRL+S in Sublime reruns all my tests (I run jest in --watch mode, see package.json test script). This causes jest to throw issues with line 77, so we simply comment out that entire setAlias method (I leave code in but comment it out when I'm doing these refactors because its easy to undo if you realize a mistake, you can always tidy up later, when everything is working as expected, by removing all code commented out in this fashion but for now I just highlight and CTRL+/ to comment the entire block in Sublime).

Next, Jest yells at us regarding the call on line 26, which is exactly what I love about TDD, the test runner handles all the seeking out of issues, you can just merrily plug away at putting out each little fire as it arises.

Commenting out line 26 gets the basic stub test passing again. Now we are ready to write our next steps, namely verifying that markdown gets set to the value passed in, and that metadata is properly extracted from it.

I tend to do these little bits in twenty to twenty five minute intervals, which may or may not be pomodoro but the word comes to mind as I write this, I just tend to find that little tasks work best for me and that's something of the dev philosophy I want to encourage here within the NWD ecosystem, breaking things into manageable bites that you can leave for others to pick up and continue, I feel this blogging practice is more important than just getting the code done, I wanna build a process wherein we as developers invite others into our own idiosyncratic processes in a better effort to understand how and why great software gets built :)


Thanks for reading, I've checked all changes, as is, from this iteration into the changeset called Remove aliases and membership from MDWxrd implementation

Comments

Popular Posts