pro-tip for indentation style
Style 1: bad
docker_or_rpm_images.update(self.qualified_docker_images(self.image_from_base_name(image_base_name),
"v" + openshift_image_tag))
Suppose during a refactor we rename
docker_or_rpm_images
-> images
, result: images.update(self.qualified_docker_images(self.image_from_base_name(image_base_name),
"v" + openshift_image_tag))
Bad indentation... this style is painful to maintain.
Style 2: better
docker_or_rpm_images.update(
self.qualified_docker_images(self.image_from_base_name(image_base_name), "v" + openshift_image_tag))
Suppose during a refactor we rename
docker_or_rpm_images
-> images
, result: images.update(
self.qualified_docker_images(self.image_from_base_name(image_base_name), "v" + openshift_image_tag))
We still have a long and apparently complicated line, but this time the indentation stays consistent, no need to update adjacent lines to the one that was automatically changed with the rename.
For more details:
https://youtu.be/ZsHMHukIlJY?t=17m7s
http://www.slideshare.net/Kevlin/seven-ineffective-coding-habits-of-many-programmers/27
http://www.slideshare.net/Kevlin/seven-ineffective-coding-habits-of-many-programmers/27
(post content extracted from a PR I was reviewing recently)