4 ms·
The guy I work with implemented pep8 tests into unit testing. So now I can't submit code unless it meets stupid criteria like line length and function descripti
by barry0079 9y ago
The guy I work with implemented pep8 tests into unit testing. So now I can't submit code unless it meets stupid criteria like line length and function descriptions phrased very specifically.
He also complains at me for using mathematically named variables in my functions.
I do not believe this is code quality and it just hampers my ability to work.
- vkazanov 9y agoSo... You think that not following language code style guidelines and introducing cryptic ("mathematical") variable names helps you to do your job..? Are you even a programmer? :-)
- criloz2 9y agoplease hear that guy, the code is read much more often than it is written, mathematically named variables are really a bad pattern, that will haunt you and your team in just months, instead of just `v` use `velocity_of_ball`, and stick to the pep8 standards. I come from other engineering background and have known many smart colleagues that code for run many kind of simulation, but after some month don't even them can understand the code
- barry0079 9y agoI'm honestly mostly fine with sticking to the PEP8 standards but not being able to submit code simply because something wasn't written in an imperative mode is absurd to me.
- barry0079 9y agoI'll take these comments to heart and think about it. However when implementing an algorithm I prefer to write out the algorithm in mathematical notation in the comments which will obviously explain the names of the variables. If someone reading the code can't understand it they couldn't anyway. I just find PEP8 very inflexible and my work mate has slowed a one month project down to 4 months and counting with his attitude towards the work and we're massively behind schedule.
- thepratt 9y agoI'm not a python developer by trade, but there isn't anything wrong with pep8 standards. Standards are good, they remove ambiguity and make the code uniform. You shouldn't have to write a thesis of comments to describe what can be done with variable names. The project is taking longer because you are fighting a _standard_ opposed to working with it - swallow your pride and work as a team.
- polygot 9y agoI'm not super familiar with python, but I've tried using a pep8 auto formatter and it seemed to reformat it to comply to standards https://github.com/hhatto/autopep8 https://github.com/hhatto/autopep8 Perhaps that could be useful when having to write pep8 compliant code but don't want to manually format everything.
- barry0079 9y agoI just tried this out. It works beautifully. Thankyou so much.