Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ltlian21886yJust helping myself with this opportunity to rant about vimming hotfixes on a python server via ssh and using tab without even realizing it which causes it to fail to launch because of mixed tab/indent error.
I get it, it's my fault and python enforces spaces to encourage standardized practices, but goodness it's such a perfect storm of the most trivial cause of "build" error and when I need it the least.
At least now I've learned you can search/replace tabs pretty easily in vim. Before that I was just navigating around trying to find it with the caret, trying to fix it before anyone noticed the server was down. Expert developer here. -
ddephor44466yThe projects style is the preferred. Nobody needs unnecessary reformatting and conversions of parts that you haven't touched, especially not ten times a day on pull and push. It will eventually not change 100% back and forth without changes and nobody needs diffs with changes that did not really happen.
-
@rithvikp Or set up your editor to respect the project's style and stop caring about it.
The EditorConfig project (https://editorconfig.org/) is a good way of having everyone on the team on the same page. -
skalpin526yPython doesn't enforce spaces. It doesn't allow you to mix tabs and spaces. If you use tabs, the whole file has to be tabs.
-
rithvikp2856y@ddephor I only agree partially with you. You should respect the project style because that's important in keeping the code consistent, but if you are working on multiple projects or especially multiple organizations (maybe one for work, the other for fun?), readability takes a hit. Switching between reading code indented at depth 8 (Linux) to a project using depth 2 (ippsample) was a nightmare for me.
-
rithvikp2856y@ethernetzero Applies when I am writing code but not so well while reading code (which is what I am doing most of time these days as an entry level dev :))
-
rithvikp2856y@ethernetzero +1 for EditorConfig though, it sounds like a great util. I should try it sometime
Tabs or spaces?
A script that replaces <your project's style> with <your preference> whenever you pull and does the opposite just before committing.
Spread code not war
rant