Live data from Hacker News

Boring Python: Code quality

b-list.org

231–232 of 232 posts

Re: Boring Python: Code quality

#231
post #227
post #140

Earlier quoted context omitted.

> It's easy and rises code quality Absolutely not. This leads to testing being invasive and driving the design of your software, usually at the cost of something else (like readability). Testing is a tool, you can't let it turn into a goal.

Could you elaborate with python-oriented examples? I tend to agree for static typing languages like Java — to fully test you have to go a total DI path. It leads to bloat and additional layers. I don't see anything similar for python because you have to do nothing to bring your code into a test environment. > Testing is a tool, you can't let it turn into a goal. Yep, and I use testing as a tool to be sure we ship qua…

My examples are just personal anecdotes, you can dismiss them by saying "our team won't make the same mistake".

If your goal is 100% coverage then it will turn testing into ritual and only give you the illusion of quality. Instead of testing inputs and edge cases, you will focus on testing lines of code.

There's a good illustration of uselessness of 100% coverage in one of Raymond Hettinger talks: https://www.youtube.com/watch?v=ARKbfWk4Xyw

> I use testing as a tool to be sure we ship quality code

I suspect we have different definitions of quality, and your might include testing, so I doubt I will be able to convince you.

Re: Boring Python: Code quality

#232

Earlier quoted context omitted.

No. Seems they changed the default ordering

Hi! I said this with more certainty than I should have. Software can always have bugs! For reference, I wrote isort, and my response came from the perspective that I have certainly worked very hard to ensure it doesn't have any behavior that is random or non-deterministic. From your description, it sounds like someone may have turned on force-alphabetical-sort (if this is in a single project). See: https://pycqa.gith…

I upgraded the underlying docker image… so python version and all dependencies got bumped. I did not change any configuration or script.

I now use version 5.6.4, from 4.3.4. In the end we passed a flag to keep the old behaviour, but in my mind behaviours shouldn't just change.

Post reply on HN