Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108304 > unrolled thread

Re: Pylint prefers list comprehension over filter...

Started byChristopher Reimer <christopher_reimer@icloud.com>
First post2016-05-07 15:01 -0700
Last post2016-05-08 09:57 -0700
Articles 3 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Pylint prefers list comprehension over filter... Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-07 15:01 -0700
    Re: Pylint prefers list comprehension over filter... Steven D'Aprano <steve@pearwood.info> - 2016-05-08 22:02 +1000
      Re: Pylint prefers list comprehension over filter... Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-08 09:57 -0700

#108304 — Re: Pylint prefers list comprehension over filter...

FromChristopher Reimer <christopher_reimer@icloud.com>
Date2016-05-07 15:01 -0700
SubjectRe: Pylint prefers list comprehension over filter...
Message-ID<mailman.479.1462658486.32212.python-list@python.org>
On 5/7/2016 2:22 PM, Chris Angelico wrote:
> On Sun, May 8, 2016 at 5:17 AM, Christopher Reimer
> <christopher_reimer@icloud.com> wrote:
>> Since the code I'm working on is resume fodder (i.e., "Yes, I code in 
>> Python! Check out my chess engine code on GitHub!"), I want it to be 
>> as Pythonic and PEP8-compliant as possible. That includes scoring 
>> 10/10 with pylint. Never know when an asshat hiring manager would 
>> reject my resume out of hand because my code fell short with pylint. 
>> For my purposes, I'm using the list comprehension over filter to keep 
>> pylint happy. 
> Wrong thinking. Make it Pythonic - but don't concern yourself with
> pylint's final score. Read pylint's output and learn from it, but
> don't treat a 10/10 score as the ultimate in ratings, because it just
> isn't.
I agree with that in principle. But...
> Also, be sure you read this part of PEP 8:
>
> https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds
Recruiters and hiring managers *are* hobgoblins with with little minds. 
And definitely not PEP8-complaint. :)

When I was out of work for two years (2009-10), underemployed for six 
months (working 20 hours per month), and filed for Chapter Seven 
bankruptcy in 2011, I  only had 20 job interviews during that time. That 
was a learning experience. I did everything possible to present myself 
and my resume as perfectly as possible. When I had another bout of 
unemployment that lasted eight months (2013-14), I had 60 job interviews 
and three job offers to pick from at the end. Of course, that was for IT 
support contracts. Maybe programming jobs will have fewer hobgoblins.

Thank you,

Chris R.

[toc] | [next] | [standalone]


#108348

FromSteven D'Aprano <steve@pearwood.info>
Date2016-05-08 22:02 +1000
Message-ID<572f2aec$0$1583$c3e8da3$5496439d@news.astraweb.com>
In reply to#108304
On Sun, 8 May 2016 08:01 am, Christopher Reimer wrote:

> On 5/7/2016 2:22 PM, Chris Angelico wrote:

>> Also, be sure you read this part of PEP 8:
>>
>>
https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds
> Recruiters and hiring managers *are* hobgoblins with with little minds.
> And definitely not PEP8-complaint. :)

Do you think that recruiters and hiring managers read your code at all, let
alone that they read it will an eye to PEP 8 compliance?

No recruiter[1] will do this. No recruiter will even know what PEP 8 is.
They're looking for technical buzzwords ("ten years experience with
Django"), they aren't qualified to judge whether your Django code is good,
bad or indifferent. That's up to the client.

A hiring manager with a technical background might, once you are in
consideration for the job. More likely they will delegate any judgement to
a technical manager, or programmer, who may or may not be a hobgoblin with
a little mind. There are plenty of programmers who are obsessive about
following PEP 8 even when it makes the code worse:

    mywidget.component['key'] = (mywidget.grippley.count_item(spam or eggs)
                                 + 1)


(I've met plenty of technical people who are opinionated and badly informed,
not just managers. Just last week, I was told by one programmer that
Mersenne Twister, the default RNG used by Python, is well-known to be
biased, and that "everybody knows" not to use it to choose an item from a
list because it is documented "everywhere" as being more likely to choose
the first or the last item than any of the others.)







[1] Sweeping generalisation. In a world of 7 billion people, there's
probably one or two exceptions somewhere.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#108371

FromChristopher Reimer <christopher_reimer@icloud.com>
Date2016-05-08 09:57 -0700
Message-ID<mailman.522.1462726654.32212.python-list@python.org>
In reply to#108348
On 5/8/2016 5:02 AM, Steven D'Aprano wrote:
> On Sun, 8 May 2016 08:01 am, Christopher Reimer wrote:
>
>> On 5/7/2016 2:22 PM, Chris Angelico wrote:
>
>>> Also, be sure you read this part of PEP 8:
>>>
>>>
> https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds
>> Recruiters and hiring managers *are* hobgoblins with with little minds.
>> And definitely not PEP8-complaint. :)
>
> Do you think that recruiters and hiring managers read your code at all, let
> alone that they read it will an eye to PEP 8 compliance?

I meant more than a few technical professionals who got pushed out of 
the job to become recruiters. They tend to ask about everything on the 
resume to poke holes where they can. Each time I tightened the wording 
of my resume whenever they exposed something. If I posted a GitHub link 
on my resume, they *would* check it out. If they know Python, they 
*would* run it.

As for PEP 8 compliance, it was a joke (see the smiley). Laugh, it was 
funny.

> No recruiter[1] will do this. No recruiter will even know what PEP 8 is.
> They're looking for technical buzzwords ("ten years experience with
> Django"), they aren't qualified to judge whether your Django code is good,
> bad or indifferent. That's up to the client.

When I used to apply to Linux system admin jobs, the recruiters would 
have a checklist box for the "Red Hat GUI Thing" as an absolute 
requirement. My Linux work experience was exclusively remote command 
line. On the rare occasions that I have used the Linux GUI, I always 
used what got installed as the default GUI for Fedora or Mint.

The first time I said I didn't know what the "Red Hat GUI Thing" was and 
explained that I was fast learner, the recruiter hung up on me. I tried 
to argue with other recruiters that I knew the command line equivalent 
for the GUI. No dice. Some recruiters even accused me of making up 
techno-babble. They all hung up on me. After a dozen phone calls like 
that (all for positions at different companies), I generally stopped 
applying to Linux jobs.

This year I built an inexpensive PC to run Linux and installed the 
current Red Hat Linux. Guess what? The "Red Hat GUI Thing" wasn't 
installed. In fact, the GUI was Gnome by default. According to my 
coworkers, Red Hat started phasing out their own branded GUI several 
years ago. I guess the recruiters haven't gotten the memo yet, as I had 
a phone call about the "Red Hat GUI Thing" last year.

> A hiring manager with a technical background might, once you are in
> consideration for the job. More likely they will delegate any judgement to
> a technical manager, or programmer, who may or may not be a hobgoblin with
> a little mind.

Every hiring manager I've ever interviewed with had a technical 
background. The only exception was when the final interview was with the 
marketing director at hardware company. I declined to take the job. If 
you know your Dilbert, it's bad luck when a hardware company is run by 
the marketing department. I wasn't surprised that the company filed 
bankruptcy a few years later.

Thank you,

Chris R.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web