Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "pep8"
I just reviewed a resume that has 18 pages. I thought I've seen the worst. I have three stories so hopefully, the people having a hard time finding a job would get something out of this. Some people just don't make sense.
Candidate no. 1: The guy has a specific section for "Personal Details" with information that includes the following:
Nationality: <name of his country>
In the work experience, he indicated his responsibilities and one of them was "protect the name of the company at all costs". Wow, my pee pee hard. He has a shitload of Apple certifications and cancelled an interview before. On the date of his re-scheduled interview, the recruiter couldn't contact him. Probably died from an overdose of whatever drug he was on. Thank god, I did not want to waste both of our time.
Candidate no. 2: One of those "proactive" egotistical junior developers. So eager to trash other languages, elitist little fucks, and one of those "Windows bad, reeeeee" types. He said he only uses Linux but he can also use Windows because he would run a virtual machine in Windows that has Linux in it. Big brain 2020. I checked his LinkedIn profile and voila, the most recent of his activities was a shared post saying it should be illegal to push code that doesn't follow PEP8 standards. I crossed my fingers not to see an "HTML is not a programming language" shit in there.
I checked his portfolio, bloated piece of shit that has one of those rounded boxes in the middle. 50% nothing and 50% box that has all the details. He has menus named "Face" and "Emoji Events". He says there "I'm a pedantic programmer" and right after that statement are grammatical errors in various states of decomposition.
Interview day, he didn't miss the chance to tell me about how he wants everything to follow the standards and that his current company doesn't have good documentation so he's looking for other jobs. Strict about standards such as naming conventions but doesn't know data structures and algorithms. Epic priorities.
"Okay." I give him the assessment exam and left him alone for 30 minutes. I told him that he doesn't have to answer all of it and it's just a way to assess his knowledge (hint: try your best and be honest). I came back and he's browsing on his phone. He said he's looking for answers in SO but the connection went down.
"Okay." I checked the exam, no answers for most of it and the ones with answers are all wrong. Technically, you already cheated and yet you didn't get to answer all of it and you didn't even get anything right.
"Okay." He asks, "Do you use a lot of Math in the project?" I was confused. He then said that the exam has a lot of Math in it. The exam was a basic programming exam - how to swap the values of two variables, data structures, what is the time complexity of this and that, method resolution order, etc.
Candidate no. 3: A "full stack" developer. When you see that title, you know you're in for a carnival ride. Senior developer, almost 20 years of experience, has a Master's degree in a reputable university. Every page has a small box with some artsy style on it and a small chunk of information like where he graduated and shit. It's like a scrapbook of pain. This pattern repeated for the rest of the pages. I feel like I read a whole book and got nothing. Like you can ask me what the book I've been reading all day is about and I can't answer you because I don't fucking know. The amazing part is he would often have titles that look like this:
The fuck? I checked his LinkedIn and of course, I see that "Dear recruiters, if you're looking for blah blah blah, that's an entire IT department" cancer.
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!7
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 not b:
c = [1,2,3]
if not b:
c = [1,2,3]
c = [1,2,4]
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:
Python's inconsistent naming - mainly in parts of the language that have existed since the dawn of time so they don't follow PEP8 or whatever. Especially the `logging` module has far too much camel case1
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
pep8 and linter
On language I never used before,
Made for fun and decided to release it for shit and giggles
PyCharm's Warning: "Function name should be lowercase for PEP8 naming conventions."
Do Python developers not like camel case function names?4
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
if reverse_engineering > coding_from_scratch:
resp = input('anybody feels the same?')
# hopefully pep8 compliant1
When you realise that PEP8 uses spaces instead of tabs.
All these years of Python experience vanishes in a second.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 the code reviewers ask for waYyYyY too much testing information and you end up doing all the QE heavy-lifting.....
Imagine the nooblet hell it would create if Python would throw actual errors all over the place if pep8 has been violated...
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
None really. I just stick with the language's preferred style, such as PEP8 in Python, C++ Core Guidelines for C++, and whatever `go fmt` wants 🤷♂️
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
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