Created
May 24, 2016 15:08
-
-
Save smahood/f6691fb3675ded24bae293a989898cf4 to your computer and use it in GitHub Desktop.
How I Use Devcards
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting a new project | |
- My first code is usually written in devcards. I try to stay in the core namespace until I have a reason to extract something out. | |
- I put each major thought into it's own card and use the docstring at the start to document the basic reasons it is there - at this point | |
I have not determined the implementation, so this is more about documenting the purpose so that I don't lose sight of it in future | |
refactoring | |
- I will usually split each component of each thought into it's own card, using deftest to start documenting assumptions and eventually | |
writing tests for each of them. I have never really been into test-driven development, but I've found devcards to be the first environment | |
where it is something I consider doing. Usually, though, I use the tests to simply document the desired future behaviour and implement | |
the useful tests later. Tests that seem extraneous or pointless once I get to an actual implementation of the component are either | |
removed completely or left as a record of expected behaviour. Devcards makes it so easy to test, though, that it is much more likely for | |
me to actually implement than when I'm working in something else. | |
- I will keep defining sub-components in devcards in the core namespace until I hit the point that I know for sure the name of my | |
real namespace and that the code demands it - with devcards I find I do way less namespace refactoring than without it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment