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
Search - "pep8"
-
So I need to let off some steam, let me know if you think I need to calm down. Personally I'm just having a hard time understanding my team lead.
So I've been trying to update our codebase for the past two months so we run tests against the latest versions of each respective major browser. I've also been trying to cleanup our code and split it into logical modules.
Need I add, according to Bitbucket, I've written over 80% of our code on our 4 projects with 4 team members including myself.
He's out for a week, so I decide it's fine time to get some work done -- which is ridiculous in itself. I finish, add unit tests for crap I missed because he kept shutting down my PRs for shit he couldn't understand.
He tells me on Friday, when he got back, that he'll be declining my pull requests because my code is too complex -- my team lead -- thinks list comprehension and OOP in Python is too complex. Doesn't understand why we need to have pep8 lint tests, or why we can't just export one giant monolithic client package with over 3k lines of code.
Is it worth arguing or should I just let my department head know I can't work on this team anymore? He won't get talked to or fired, he's been at my company for 6 years and he's in the inner circle.6 -
So recently my open source project took off and got trending on GitHub (680 starts and 225 forks). This was the first time a project of mine really gained some traction and invested more of my time and weekends to maintain this project - I wrote comprehensive docs, contributing guidelines and reviewed PRs and made sure I commented on every single one of them. Sure, it isn't easy to review 50 PRs a day after coming home from work but the excitement of seeing this project becoming trending fueled me.
First 2 weeks it was good. I would come home from work and have dinner and sit down to maintain the project. Whenever contributors would be stuck, I would help them and write comments on each PR.
But the problem started since last week. People just really want to see their contribution activity graph get populated and hence they would make stupid PRs and literally no one followed contributing guidelines - I mentioned in that that the code should adhere to Pep8 styling but no one gave a shit. Each day I would spend reviewing PR with crappy formatted code and no sign of Pep8, and even some will just file PR and add a fucking docstring to every function or add paragraph of comments. Also, the PR quality was bad with unsquashed commits amounting to 10 or 20 or even sometimes 50.
I wrote the contributing guidelines doc and in that I mentioned every source that contributors could find helpful like how to squash commits, how to file a PR and Pep8 and not to write useless comments. Seriously people, grow up!6 -
Fuck pep8 in general. Fuck harder anything to do with line limits. Fuck with a rusty spatula those who tie it into their git precommits or CI tests.
What's that, it's 2018 and even the shittiest walmart-tier computers have 1080p OR BETTER at a 16:9 aspect ratio?
"lol, 80 character line limit."
Eat a bucket of rancid dicks.
Oh, and since we're forcing you to be so economical with your characters, we're going to force four space tabs. Yknow, rather than simple single tab characters, which could mean everyone can set their preferred level of spacing without bloating the code with whitespace.
Because, yknow, it's entirely reasonable to chew up 1/8 of a line because you're editing a function inside a class definition. God Almighty forbid you try to do a for loop inside that function! Fuck you!
"Oh but you can't have two editors or terminals open side by side without that limit!"
BULL FUCKING SHIT. Here's my shitty 1280x1024 display on my shitty computer with two Sublime editors open side by side. You'll notice the break is at 100 characters. You'll notice I don't have to scroll horizontally to do two things at once. You'll notice I even have room for COMMENTS!
If your code standards require you to make your code *less* readable and *less* clear and take up *more* space to accomplish the same tasks, YOUR CODE STANDARDS SUCK!
Enough with this stupid meme. We're not in the 80s anymore and it's high time to start fucking acting like it.7 -
You know it's been a good day's work, when you look at the code you've written and part of u just feels like touching yourself.4
-
I have to create python parser (3.6) using code provided by client (2.7), that they used in their company, and it is full of crap like:
if a==1:
if not b:
c = [1,2,3]
if a==2:
if not b:
c = [1,2,3]
if b:
c = [1,2,4]
Or:
text = ""
for i in something:
text += "real text " + some_string + " \n"
text += "another line " + some_string + " \n"
text += "and another " + some_string + " \n"
text += "and so on " + some_string + " \n"
... (many lines instead of one appended text block)
Of course above variable names are just for shortening code, but there are variables like oo, ooo, var_ or var__... cause you know, PEP8 does not exist.7 -
When I was starting with Python at work I was very confused about identifying what is function, class, module, object instance, etc. just by name so I asked my colleague with PHP background to follow PEP8 and use meaningful names for objects. He's like okay and the next day I find this:
class vv(models.Model):13 -
I swear this mofo runs all of my code through pylint, he comments about every PEP8 inconsistency and every formatting decision he doesn't like.
Same guy also got in a small debate with one of our converts from the older project where they used C#, because he still writes everything in Windows-style CamelCase. After that, when we needed to decide on a password for a shared thing, I came up with "camel_case".1 -
PyCharm's Warning: "Function name should be lowercase for PEP8 naming conventions."
Do Python developers not like camel case function names?4 -
!rant
I'm a rather young developer, self-learned everything and started when I was 13 (now 20) but I still feel like I'm a total beginner since I have not yet mastered the things I am OK at.
Php (laravel, since it makes things much easier), js (jquery, bad at vanilla, have used angular and ember but not mastered), node, linux, html, css, photoshop, illustrator, sql, mongo and windows servers
I know little about many things, can create things that are asked of me but the methods I use are rather bad imo.. ex: I finish coding a section of a site, but when I need to add a new feature I find myself rewriting most of the stuff to add the new feature and in the end still feeling like the code could be optimized further, even though I have no idea how.
TL;DR I write bad code, but things work as long as I am monitoring them. I know little about alot of stuff but mastered none of them.
What should I do? Go to school for programming?8 -
Guy blackmails the whole scrum team that he wants to work on a python user story, because he loves python and that's what he's good at.
Then in a week writes about a hundred lines of code, didn't hear about pep8 and complains about the speed of the code.
Used re.seach instead of re.match. In half an hour there is a 100x speed-up. He loves python.3 -
first some background. I'm an intern coming in on the end of my internship (tomorrow's my last day). I've been working on a reasonably important project, more specifically a restful API. We have automation set up so that any commits to master on GitHub are pushed out into a live, accessible version. Some guy (let's call him dumbass) joined our team last week, and has had a few ideas
Dumbass: *opens pull request to my repo*
My boss: *requests changes*
Me: *requests different changes*
(All this before even testing his code, mind you)
Dumbass: *makes requested changes*
Me: *approves changes*
A day passes
My boss: *approves changes*
Me (not even 10 seconds after my boss approved changes): *requests more changes*
(Still haven't tested his code, I just ran A PEP8 compliance test)
Dumbass: *MERGES CHANGES TO MASTER*
Literally EVERYTHING breaks because he was importing a module that's not available
We don't notice until later that day (I'm still working on writing the tests for the automation, for now changes get put on live version even if everything breaks -- tool is still in beta, so everyone working on it (a whole 3 people) knows to TEST THEIR SHIT BEFORE MERGING TO MASTER.)
WHY EVEN BOTHER WITH THE PULL REQUEST IF YOU WERE GOING TO MERGE TO MASTER YOURSELF ANYWAY??!??!??
My frustration cannot be properly conveyed through text, but let's just say this guy's been there a week, I already didn't like him, and then he fucking does this. -
When you realise that PEP8 uses spaces instead of tabs.
All these years of Python experience vanishes in a second.3 -
When the code reviewers ask for waYyYyY too much testing information and you end up doing all the QE heavy-lifting.....
-
if reverse_engineering > coding_from_scratch:
more_fun()
else:
also_fun_but_not_so_l33t()
resp = input('anybody feels the same?')
# hopefully pep8 compliant1 -
Imagine the nooblet hell it would create if Python would throw actual errors all over the place if pep8 has been violated...
If only...
sidenote: I post this rant because I had to help my girlfriend and her project partner (for her study) because partner refuses to write readable code (no comments in the code at all as well) and both refuse to write in compliance with pep8 "because it's useless"5 -
When using python, almost every other linter/formatter shoves down pep8 down my throat.
I used autopep8, which has NO CONFIG FOR USING TABS. FFS. The only solution I could find is disabling indent reformatting. How is this a solution at all?
Then I found black. Black is a piece of shit. Let's move on.
Now, I use yapf+pylint. This is basically clang-fomat for python. I love it, it does exactly what I expect it to do.2 -
Code review time.
"How come this line has been removed? PEP 8 likes to have two lines between imports and the first bit of code"
What I replied: Thanks. I'll put it back.
What I wanted to reply: Go fuck yourself you anal moron, who the fuck gives a shit about bollocks like that. We got fucking proper work to do, so get the fuck over yourself, let the fucking PEP shit lie, and make some fucking USEFUL comments.5 -
Hello, I am doing master in Pharmacy, but I like programming and consider to switch or connect somehow industries. I could write simple scripts and small programmes in Python, but I want to write code with good practice from beginning.
So my question what should I know and put in use, maybe some resources if someone has them or just terms for further search. At this moment I use gitlab for VCS (my commits sucks and my whole usage of Git sucks, but at least I use branches), I am trying to separate control from model (MVC but I guess I do it poorly), also I use keepchangelog rules for changeling, and semantic versioning for versions, PEP8 and Pokemon names for my variables and functions as it helps read code later.7