3 ms·
Well done. Shows either you're a very intuitive dev, or Django is a very intuitive tool. Maybe both. These problems I think are more to do with inertia and not
by rikatee 6y ago
Well done. Shows either you're a very intuitive dev, or Django is a very intuitive tool. Maybe both.
These problems I think are more to do with inertia and not having best practices in mind. It's easy to do CharField and not thing about TextField.
Plus over time requirements change, so when a model was created maybe the kwargs were perfectly valid - but over time as refactors occurred tech debt crept in.
- golergka 6y agoThis makes me curious; wouldn't it be possible to write an automated linter or static code analyzer that would catch and automatically fix these issues? In Node environment, I think that I would be able to come up with an ESLint plugin. Doesn't Python ecosystem have something similar?
- rikatee 6y agoI think not because a think the bot cannot know is "why". An anti-pattern may be done for solid business reasons. It's Django Doctor's job to say "x could be y" and it's the dev's job to approve/reject the advice based on what the dev knows about the business and problems being solved.
- danielvinson 6y ago> An anti-pattern may be done for solid business reasons. This is why linters let you ignore lines/files.
- rikatee 6y agoon the roadmap is config file but for now devs can just ignore the advice :)
- cridenour 6y agoI mean this whole game is an ad for their linter.