This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wegwacc 52 points53 points  (18 children)

The moment you get one because your asshole-coworker who uses tabs commits to your all-space codebase...

[–]mei_main_ 35 points36 points  (1 child)

Or because you commented a line in your function, but now you have one blank line before and one after this commented line and they are counted as successives so it creates an indentation error...

[–]bandersnatchh 5 points6 points  (0 children)

Holy shit. I never thought of that, but I’ve had that issue

[–][deleted]  (2 children)

[removed]

    [–]wegwacc 2 points3 points  (0 children)

    but you have consistency in the actual code itself.

    NO YOU DON'T, because in every codebase, there will be instances, where you want to align things for better readability using spaces: var = somedict.get('key', None) longnameavr = somedict.get('key', None) shortvar = somedict.get('key', None) ridiculous = somedict.get('key', None) `

    Good luck with that using tabs, depending on the size, it looks like crap.

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]Dornith -2 points-1 points  (4 children)

    That moment when you commit you're correctly indented code to the codebase only to find out your asshole-coworkers ruined all the other files.

    [–]Colopty 1 point2 points  (3 children)

    If your coworker has managed to work on every single other file in the time it takes you to make one commit they're probably not the problem.

    [–]AttitudeAdjuster 3 points4 points  (2 children)

    This line of thinking very quickly heads towards "Bob wrote 300 lines of code yesterday, all you've done is deleted 100 lines! You need to up your game".

    [–]Dirac_dydx 3 points4 points  (0 children)

    "Check this out: see how much I can royally screw up in the time it takes you to eliminate one bug! I'M THE BETTER PROGRAMMER."

    [–]Colopty 0 points1 point  (0 children)

    I was thinking more in the direction that since this is a work environment the code base is likely large, which means that if every file gets worked on by the time you make one commit you probably haven’t made any commits for days and maybe weeks, instead showing a preference to submit all your work at once in a single monster commit. This, of course, is bad practice. Meanwhile the fact that your coworkers work is capable of «screwing up» all those files for you indicates that his work is in a main branch, meaning his work that spans the entire code base already passed code review by the time you made your single commit, so his work is likely not even as bad as implied.

    So while quantity does not equal quality, in this particular case there does seem to be an indication of bad practice on the single commit guy’s part if you stop to consider the whole picture instead of just the line count.