While I have not used spec for work before, I followed the hype for several months, and really like the idea.
Overall this workshop, while was the first one of its kind, really "moved" me to actually apply spec to my current Clojure work. In both areas: open source and products for customers.
I believe a "needs improvement" feedback is the most useful one, so don't take it as something I did not like, but rather something others can benefit from in the future attending this workshop.
All that follows is definitely connected to the way I learn things, perceive and digest the information.
It could be related to the fact that English is not my first language, although I feel it quite well, but spec speaks these (and other) verbs:
- check
- conform
- valid(ate)
- assert
- instrument
- describe
- form
- exercise
- sample
- generate
- explain
The biggest problem I have when learning spec is the "making sure"
group verbs since (besides the instrument
) they are very related
in either meaning or function or both.
I could follow a lot better if the distinction of this first group of verbs were clear from the start. Preferably with an in place examples of each. We did go through all of them during the workshop, but it was not easy nor simple to load the problem to my head making the neuron bridges between these verbs on the way.
It would really stick if there were real world examples of certain spec concepts. For example we informally discussed spec versioning and Alex mentioned that while developing datomic, specs, when changed, get a new name. I will not forget that since this is a very concise example with 3 very interesting concepts: spec, datomic and versioning.
Another example could have been something like a client request to the program that goes through (s/conform ...)
.
Or a more practical example of s/fdef
's :fn
part. clojure.core/subs
is a great example, but another, more "involved"
function example, would solidify the concept. For example a function that transforms data after an external system call,
or a functions with a go
block, etc..
Not a lot of them, but an example overview of where spec would be used with a sample app architecture such as this one. This is a little connected to "Practical usage": i.e. let's say we have a client request flying into the program:
- here I would s/conform it
- here I would make sure things are s/valid?
- here I would not use s/conform or s/valid because ...
- here I would create a response and validate it
- for this I would write a test and run it with clojure.spec.test/check
- etc.
Would be great to have a small reference app that we can "make better" during the workshop. This is not instead of the labs, those were great.
This is minor but a simple visual would help here to underline the difference and collaboration between spec and test.check. The usage I think could be clearly shown in a "Reference app".
There were a lot of material to share, and this is the first run and rushing through it is understandable.
At times I could not switch quickly enough between the concept
and the example
. This could be caused by me trying things in REPL
as we went along and looking at the source code, but I feel a bit more time to explain the concept before the example
could help keeping me on board.
--
Overall it was a really good (almost) 5 hours of geeking out + a fantastic discussion at the end with the spec future, versioning and spec application cross systems / platforms.
Thank you!