5 ms·
Just to note that the relative test code to production code ratio in Hashicorp products is 10:1 (10 lines of test for every line of code).
by streetcat1 7y ago
Just to note that the relative test code to production code ratio in Hashicorp products is 10:1 (10 lines of test for every line of code).
- ianwalter 7y agoIs there an article on this or something?
- streetcat1 7y agoYes: @5:40 - https://www.youtube.com/watch?v=yszygk1cpEc https://www.youtube.com/watch?v=yszygk1cpEc
- nullbyte 7y agoEw. I feel bad for their developers.
- exac 7y agoI feel sorry for your employer.
- thewarpaint 7y agoCare to elaborate why? Do you assume the company forces this on the engineering team?
- jen20 7y agoThat seems unlikely to be true (I haven’t measured but worked there). Perhaps it’s true of Terraform where testing is verbose anyway, but it’s almost certainly not of Packer, for example.
- yjftsjthsd-h 7y agoWhy not? Testing packer would mean specifying a large number of machine configurations, building them, and verifying the output images. Why would that be smaller than the actual code?
- jen20 7y agoI just cloned Packer from the master branch, and via a (very) crude mechanism looked at the number of lines of code in `_test.go` files vs the number of lines of code in `.go` files which do not have the `test` build tag, excluding vendored libraries. There are approximately 60,000 lines of test code, vs 149000 lines of non-test code. Other HashiCorp products have a much higher test to production code ratio, but it is by no means uniformly 10:1.