« first day (1839 days earlier)      last day (3112 days later) » 

3:00 PM
but in Finland, informal discussion uses lots of vulgar terms...
 
ACCEPT DOB PROMPT 'ENTER YOUR DATE OF BIRTH IN DD/MM/YYYY FORMAT to Know your Age==> ' sql> SELECT TO_CHAR(TRUNC(MONTHS_BETWEEN(SYSDATE,TO_DATE('&DOB', 'DD/MM/YYYY')) / 12)) ||' YEARS ' || TO_CHAR(MOD(TRUNC(MONTHS_BETWEEN(SYSDATE,TO_DATE('&DOB', 'DD/MM/YYYY'))),12)) || ' MONTHS ' || TO_CHAR(TRUNC(SYSDATE) - ADD_MONTHS(TO_DATE('&DOB', 'DD/MM/YYYY'), TRUNC(MONTHS_BETWEEN(SYSDATE,TO_DATE('&DOB','DD/MM/YYYY'))))) ||' DAYS' AS "Your AGE" FROM DUAL; — Santu. 1 min ago
dat comment.
 
lol. Your age should be on your birth certificate or driving license... or you could just ask facebook? — buffjape 31 secs ago
 
so, if you ask a Finn, what is the word for pedant, they probably cannot come up with anything else besides pedantti or comma-f*cker ;)
 
3:11 PM
Why doesn't SO allow you to modify titles of questions anymore? :|
 
It does.
 
It totally does. I do it all the time.
 
Can't be a duplicate title though.
So you can't have two questions with the title "Please help me do the needful"
 
user559633
i've decided to get face tattoos to motivate me to get my rap career going
 
user559633
Stackz Overflow
 
3:14 PM
You should get import and python tattoo'd on your knuckles. You've got 12 fingers, right?
 
user559633
import dis
 
Does anyone know, before I bother testing it, if collections.deque's .pop(0) is as performant as .popleft()?
 
That feel when you buy an mp3 player with a million extra features, and the only thing that breaks is the headphone jack.
 
@AnttiHaapala That gives interesting insight into the meaning of the word-part "Antti" ;-)
 
DSM
@jonrsharpe: does .pop(0) work in the first place?
 
3:20 PM
@DSM oh! NM then...
I had dreams of being able to factor this list out to a deque without changing anything else, that will now sadly never come to fruition...
 
Here is the implementation of deque, FWIW
 
Dats not python...
 
In the same sense that Bob's long intestine is not Bob, true.
 
@Kevin congrats you've revealed my true identity, for I am Scott Lang.
 
Mystery solved.
 
3:22 PM
I Am Fizzy's Medulla Oblongata
 
@PeterVaro ty ty, starting first listen now
 
> You know they call corn-on-the-cob "corn-on-the-cob," right? But that's how it comes out of the ground, man. They should call that "corn", and they should call every other version "corn-off-the-cob." It's not like if you cut off my arm you would call my arm "Mitch", but then reattach it and call it "Mitch-all-together."
-- Visionary philosopher Mitch Hedberg
 
rhubarb
 
@Kevin my wife asked me had I gone crazy?
I answered: "not yet. Just laughing at Kevin Kevinson's lines in SO"
 
:-D
 
3:31 PM
Sorry to abandon you all, my boss had a thing I needed to work on. I think I sorted it.
 
-1
Q: What is the result of the following expressions?

Korrupted StudiosI am studying for a computer science quiz. I ran into a problem that I did not know the answer too on my review. The code is: Suppose we have the following assignments one = [‘apple’, ‘banana’, ‘cherry’] two = [‘boat’, ‘car’, ‘plane’, ‘truck’] What is the result of the following expressio...

wat
@Aaron it's fine, really.
 
s/studying for/taking/
 
Deleted.
 
my favorite Python interview question is to provide a diamond inheritance diagram and asking what's the MRO.
but I'm not sure that's a good one...
 
I was about to comment on that one with "try it and find out." :P
 
3:33 PM
Are any marks available for saying "I don't know but I think multiple inheritance is super"?
 
How many partial points do I get for ranting about how multiple inheritance is bad design?
 
partial credit for Jon's response.
 
I'll take that
 
To Kevin I'd suggest getting a job writting KevinScript. :P :D
 
@TigerhawkT3 Devil's advocate: that code produces no output, so OP may have actually tried running it, but could not determine what the result was.
 
3:35 PM
I like that this soda says that it's low sodium. Because the salt content of the soda is what stops me from drinking more /s
 
Sodium makes you thirsty, so you should stay away from sodium in drinks, not because it is bad for you, but because Big Drink is trying to manipulate you to buy more product.
 
I eat salt straight from the shaker.
 
@AaronHall Assuming new-style classes, isn't that just what you'd expect?
 
Maybe I'm biased because I don't know the answer, but questions about MRO seem to belong to the "things you could google in five minutes if you were on the job" category
 
Here's another one, assume in a function:
try:
    return foo()
finally:
    return bar()
question: does foo execute, and what value is returned by the containing function?
 
3:38 PM
devil's advocate: you can google fizzbuzz in five minutes too, but that doesn't mean that you can find a good dev that can't do it themselves
I'll go with "yes", and "whatever Bar() returns"
 
Your computer explodes. The end.
 
user559633
i have someone bring in code that they've been working on and then we pair program for 30 minutes
 
Kevin is correct!
 
returning in a finally is a bit wacky... It's like putting yield in a list comprehension.
 
So it'll cancel the return on foo() just because the finally takes precedence?
 
user559633
3:40 PM
finally always runs
 
I like Tristan's idea.
 
I go with "you used return outside a function which will cause syntax errors".
 
@Ffisegydd "assume in a function", failed on reading comprehension
 
So what happened with the return in the try? Does it come to a screeching halt and go "whoops, gotta do that finally"?
 
Yeah pretty much
 
3:41 PM
@TigerhawkT3 pretty much! The return under finally is executed first, and then the function is over.
 
finally is a bully.
 
What I want to know now is: what happens in try: return foo() finally: pass?
 
user559633
my favorite "okay let's pair, pick your favorite language and codebase" was someone wanted to work on a flask thing and then spent the 30 minutes talking down to me about how python works (i don't tell the interviewee what language i code in and my job title implies that i do sysadmin work only)
 
@jonrsharpe I read code, not words.
 
whatever return returns first, returns
finally will return first
but the foo() gets executed.
 
3:44 PM
But if everything in the try is executed, and it completes, and then it returns, but there's a finally and that has to return, but it should be the first thing to return that returns, and...
 
This is why when I tell newbies "the return statement causes the function to immediately terminate, and no other code in the function will run after it", I've prefix it with "most of the time..."
 
DSM
Is re.sub("[a-z]*$","", "ch1abd") the best regex way to strip trailing letters? #regexantiexpert
 
Newbies don't use finally, so it's good enough for them.
 
@tristan Did you...did you school them?
 
3:45 PM
Consequences of rudeness #4: if you write all your answers in a condescending tone, you will forget how to explain things without being patronizing, which will annoy interviewers.
 
@DSM do you need to use regex? What about s.lstrip(string.ascii_lowercase)?
 
user559633
@Ffisegydd no, i was going to say "hey, i'm actually pretty okay with python" but when he said something about it being a language for real hackers and not sysadmins, i just let him go with it
 
It's a very "determine a person's true colors by seeing how he treats the waiter" situation
 
DSM
@vaultah: rstrip, but yeah, I want regex for this one. :-)
 
Oh, I misread
 
3:47 PM
I vaguely expect that regex to have worse than linear runtime.
 
I've actually volunteered to conduct interviews once I'm allowed to.
 
I think I should rhubarb. Night all.
 
user559633
that style of "bring code you've been working on and we'll talk about it" is one of my favorite interview techniques that i stole from hackerschool
 
So I can destroy young grads who come in with their static typing and their interfaces with my ducks and pip.
 
Half my github projects are not fit for human consumption, so that interview technique worries me.
 
user559633
3:49 PM
the person that did pair programming with me when i applied told me that she was talked down to on a non-irregular basis, which is hilarious because a) she's an amazing coder, b) it's such a good technique for finding assholes
 
I ran falling-block-game through the PEP 08 gauntlet etc etc, but animation is basically stream of consciousness
 
user559633
@Kevin which is why it's like "we have an interview next week, bring some code that you want to work on, doesn't matter which language or what state it's in"
 
Weaknesses are generally OK, as long as you know them
 
"You...you coded this? Intentionally? Really!? We'll be in touch (with the police)"
 
If your code's garbage and you don't even realise it, that can be a problem
 
user559633
3:50 PM
Or as long as you don't turn an insecurity into an attack on others
 
I see the problem. I only pretty up my code after it's completely functional. So "... that you've been working on" disqualifies all the projects that I've sprinkled glitter on.
So the question is a nice way to separate coders that write stylistically good code on their first try, from people like me that do it after the fact.
 
DSM
We're considering hiring a new C++ developer. Having coffee with him on Friday -- we'll see how it goes. (He's done some Python, so I might throw in some Qs there too.)
 
"Pick a number: 2 or 3." is the only interview Q I need.
 
Presumably it's more difficult to allocate time with C++ programmers?
 
user559633
@Kevin The interview that I do isn't meant to find people that write ~~elegant code~~, it's to sniff out charlatans and find who is enjoyable to work with
 
user559633
3:52 PM
@jonrsharpe More difficult, but faster
 
Questions are a waste of time. I just get my spiritual adviser to determine the applicants' chakra colors.
If your adviser is good, they can figure it out from a B&W photograph of them.
 
@jonrsharpe I would assume it would be easier. Just use talloc.
 
user559633
I've had a "senior python developer" interview and not have any opinions or know differences between Python 2 and 3
 
user559633
Pretty good short circuit to "oh neat my lunch time is a longer break now"
 
@tristan In that case, my ugly projects prove I am not a charlatan, because no competent fraud would plagiarize such goofy code.
 
user559633
3:54 PM
And because if I said "hey can you walk me through this," you'd be able to talk about it
 
@Kevin but an incompetent fraud would, and you really don't want to hire them!
 
@Ffisegydd What's the answer?
Oh, wait, you were talking about Python versions, weren't you?
 
user559633
I'd say having an opinion is the correct answer.
 
Hopefully the incompetent frauds self-select out of the applicant pool by being unable to navigate to the interview site on time.
 
I thought it was a setup to some kind of joke
 
3:55 PM
Perhaps because they never learned to tie their own shoes.
 
It is a joke (if they answer 2)
 
user559633
If someone answers "i actually prefer 1.x" and has a reason for it, that's cool too
 
No it's not.
 
"It's the only version that runs on my Atari"
"Let me show you the trainer I wrote for Pac Man"
"Your laptop has a casette drive, right?"
 
Actually, if someone got Python running on an Atari, I suspect they'd be hired on the spot.
 
3:57 PM
 
@vaultah done and done
I shudder to think what globals[cmd](*args) is leading to.
 
Most of the work is done for you, assuming the CPython source can fit in memory.
Let's see... "Atari 2600. 128 bytes RAM, 4 kB ROM". That might be a problem.
maximum recursion depth: 2
 
I have a friend who has compiled 1, 2, and 3 together.
 
Python 6. dramatic glasses removal. My god.
 
@AaronHall Why?
Python 3! (get it? get it?!)
 
4:07 PM
To have something interesting to talk about at conferences?
 
Huh, that works with either + or *. I wonder if there are any other sequences that work like that.
 
@AaronHall Very good point. Any videos?
 
His name is James Powell, he's got a couple of talks out there, but I'm not sure which it is...
 
@MorganThrapp Infinitely many, if we allow the same number to appear multiple times. For instance, 1*1*1*2*5 == 1+1+1+2+5
 
If I was an interviewer and you came in with python on your atari it would definately be big time bonus points at the very least ... there would still have to be an interview but that would largely be a formality
 
4:11 PM
@Kevin What about unique numbers?
 
Good question. I don't know but I suspect "1 2 3" is the only one
I bet I'm forgetting some hilariously simple counterexample.
 
...1?
 
True. any sequence with only one number works.
Ok, what about sequences of length greater than one, which contain only unique numbers?
 
another favorite interview question: remove repeated strings from a list and sort
 
4:16 PM
sorted(set(sequence)) with bonus points for alliteration :-D
 
yes, pass to set and sorted
 
DSM
list(OrderedDict.fromkeys(sequence)): sort by order of initial appearance. :-)
 
[x for x,y in itertools.groupby(sorted(sequence))]
 
good ol' fromkeys
 
I think would work
 
4:18 PM
@Kevin If you allow negative numbers, 0 and -/+x for any x will qualify, since they both sum and multiply to zero, so we probably want to stick to posints
 
good stuff
 
I asked math.se chat. I'm really curious now.
 
Pretty sure it's just [1,2,3] then. Any two element unique sequence that doesn't contain 1 has a larger product than it does a sum; any two element unique sequence that contains 1 has a larger sum than it does a product. Any three-or-more element unique sequence with sum greater than 6 has a product greater than its sum.
 
Joran's seems like what I'd use if they couldn't be hashed.
 
(insert handwavy proof of final sentence here)
 
4:22 PM
cbg
 
Uhh, what's the problem? I'm having trouble finding it in the transcript.
 
"How many number sequences are there where the sum of the sequence equals the product of the sequence?"
 
@Peter sounds like Trentemöller.
 
With additional requirements "the sequence must contain 2+ numbers", "the numbers in the sequence must be unique", "the numbers can't be zero or negative" added on later
 
Screw those constraints.
 
4:24 PM
They only one we found is [1, 2, 3].
 
Dropping the negative constraint might be interesting.
 
DSM
Under the additional requirements, I'm confident the longest is [1,2,3].
 
hey @AdamSmith
 
It adds {0 0 0 0} and {2 2}
 
4:25 PM
Let's put 1,2,3 in the OEIS and see if it tells us anything useful.
 
But not much else
OH
 
@Kevin Already tried it. :/
 
I see, it lets you do nonsense like {1 1 1 1 ... 1 1 X Y }
 
As a joke, I wanted to post a link to the OEIS' "sequence of whole numbers" page, but I can't find it XD
Ah, here it is. oeis.org/A000027
 
4:28 PM
@Kevin I like that the natural numbers end at 77.
Which is my lucky number.
Also, off topic, but the last 3 hours I've got a downvote on a random one of my answers. One per hour. Almost exactly on the hour.
 
I also like that it takes 26 sequences before we get to "natural numbers"
 
@MorganThrapp Ah hah, my keepmorgandownbot.py is working as intended
 
Reminds me of a story-ish thing I read online about the number "threeve" which the government is hiding from the public.
Four is a sham, but if the truth got out, planes would fall from the sky etc etc.
 
DSM
@MorganThrapp: weren't you the recipient of a DV spree the other day?
 
Simlarly, perhaps 77 is the largest integer and all the ones after that were just faked on a hollywood sound stage?
 
4:31 PM
I strongly suspect (though I cannot prove) it is the work of Cody again.
Yes, I was.
 
Cody is a lousy name for an archenemy.
 
@Kevin It's not the first time someone named Cody has hated me.
Actually, I've pretty much only had bad experiences with Codys of both genders.
 
I think it works if you're a serious programmer and he's a script-kiddie or something.
 
DSM
Cody was a popular name for kids on TV when I was growing up, so I tend to associate the name Cody with someone I want to punch. I'm sure it's coincidental.
 
@AaronHall actually I would never use that in an interview unless they put stupid restrictions on the problem like the homework problems we sometimes see
 
4:38 PM
"Morgan" is actually a pretty good name for an arch-nemesis, though. Maybe he's the bad guy and Cody is a force for good
 
I associate "Cody" with the tremendous lobster monster from the television show Frisky Dingo
Although his actual name was "Cody 2"
 
DSM
@AdamSmith: true! "Morgan" does sound like a bad guy kind of name.
 
DeMorgan
 
@JoranBeasley probably the best solution if you can't hash the elements in the sequence.
 
Full name Morgan Darth Khan Megatron Wolfenstein III
 
4:39 PM
although if it's a list, you should do list.sort first
if you don't mind mutating it.
 
@AaronHall only if they are somwe strange beast that cant be hashed but can still be sorted :P
 
@Kevin Well, I have a new display name.
 
what, strange like a list?
 
oh I see
yeah theres lots of things that could work ... I still would avoid any solution that might confuse the interviewer :P
 
hmmm... even dicts can be sorted.
 
DSM
4:42 PM
Not any more..
 
not in Python 3?
 
DSM
TypeError: unorderable types: dict() < dict()
 
Hallo all
 
Greetings.
 
Just installed the Python tools for Visual Studio
 
4:46 PM
I've thought about doing the same, but VS tends to gobble up all my RAM
 
DSM
@MorganThrapp: erm.. you do you know have to wait a while before changing it back, right? :-)
 
So thus far I've stuck with plain old notepad++ and cmd
 
@DSM Why would I ever change it back?
 
Python on Visual Studio sounds up there with Visual Studio for Linux.
 
Yeah I've been using notepad++ a lot
Tried installing PyCharm before but didn't like it much for some reason
 
4:49 PM
Not learning an IDE designed to manage complicated projects is a good strategy for making sure your project layout stays simple.
 
can you help ? @MorganDarthKhanMegatron — Ameer Assadi 2 mins ago
Now that is a beautiful display name.
 
I keep my project layout simple by refusing to learn how relative imports work. So everything goes in one big folder. simple ;-)
 
I don't really see why you'd need anything more to be honest, unless you've got so much you want to sort it all into sub-folders
I do need to get out of the habit of trying to put everything in a single script though, I'm ending up with such long files
 
Well, I did make a separate "lib" folder for KevinScript once the parser grew larger than 8 files or so
 
Naming a language after yourself, that's pretty cool ;)
 
4:53 PM
After a certain number of lines of code, it becomes useful to separate out functionality that is on a different conceptual level.
 
Yeah, I guess so
I'm very new to programming in general though, so generally sticking to simple projects atm
 
from __future__ import absolute_import
 
My current project is 8 files and two folders, which is the most complex I've gotten on a project that's just me.
 
@AaronHall Missed opportunity to make that a relative import, surely?
 
The compulsion to put everything in a single file went away when I started to seriously use object oriented programming. Before that, it just didn't seem worth the effort
 
4:56 PM
Yeah, I've used a bit of OOP in an app to help me with my job, but other than that I've not done too much yet
 
once you start sticking cohesive code together into a single object, you find it easier to compartmentalize it in its own module
 
@Kevin I envy you, because of your team, I mean, you don't really have to learn all those silly first names (not even last names!) to ask a question or start a small talk with your collegues..
 
:-D
 
I don't know. I hear that the heads of HR and Documentation go home together every night.
Lots of watercooler talk
 
I'm not very good with names. Notice: every time I talk about a book I have recently read, I say "the main character..." instead of their name.
 
5:00 PM
@Kevin yeah, you need to figure out how to dynamically include them from an AUTHORS.rst file
 
I think this annoys my IRL friends. When we're watching a show and I say, "but why did purple girl do such-and-such?" and they go, "uh... you mean [name]?"
I suspect it is a deep-seated psychological issue, but it's largely harmless so I can't be bothered to investigate further.
 
@Kevin They're all just NPCs anyway.
 
To be fair, some shows are just really bad at getting you to remember the character's names. I don't know if anyone watched Fear The Walking Dead, but I cannot remember anyone's name after watching the whole first season.
 
I know that blue shape and yellow dog and funky S will respect me just the way I am.
 
cbg
I remember tv show names better than the real names.
Also I am better at recognizing actors than ppl I've met for real :D
 
5:06 PM
@MorganThrapp On the other end of the spectrum, comic artist Bill Holbrook will put the names of his characters in almost every strip, because he's been drawing them for 15+ years and knows no one will dig through his archives to figure out who's who.
 
Certain shows I find I can easily remember characters.
 
ex. "Why did you eat my dandelions, Alice?" rather than "Why did you eat my dandelions?" even though Alice and Bob are the only characters on screen so there's no diegetic reason to address Alice as such
 
TIL "Any consecutive pair (m, k) of the Fibonacci sequence a(n) illustrates a fair equivalence between m miles and k kilometers. For instance, 8 miles ~ 13 km; 13 miles ~ 21 km." Fibonacci has 9 letters. 9 is 3**2. Half Life 3 confirmed.
 
I'm not sure what those shows do differently, if anything
 
I think I used that word wrong but you get the idea.
 
5:08 PM
for example I know pretty much every character's name on Arrow
 
Is your last name Kevinson so you can't even forget it, Kevin?
 
Pretty sure anyone that ever watched Pokemon can remember the names of the original three main characters.
 
@Programmer I know this may warp your fragile little mind, but it's entirely possibly, NAY PROBABLE, that Kevin's last name isn't actually Kevinson.
 
@Kevin Jessie, James, and Meowth!
 
Snap, crackle, and pop?
 
5:10 PM
But why would Kevin lie?
 
Mostly so employers who google me won't easily find all my wacky adventures in here
 
Jul 16 '14 at 19:26, by Kevin
ask your question, but know that one of us always tells the truth, and one of us always lies
 
Gotta keep that veneer of professionalism intact for at least the first 48 hours of employment.
 
Unfortunately, Kevin happens to always be the one that always lies.
 
Yes, for certain definitions of "always".
Or are there???
 
5:13 PM
Mind = blown
 
Mind === blown (I've been doing too much JS lately)
 
any JS is too much JS
(I hate JS)
 
It's hard to tell which of "or are there | or is there | or do they | or does he" etc etc to use, when the previous message didn't contain any verbs.
 
... or do it?
 
Calm down, Nike salesman.
 
5:23 PM
They think it don't be like it is, but it do... Or do it???
 
5:34 PM
> They don't think it be like it is, but it do...or do be it?
 
> do be do be do
> - Sinatra
 
Was just about to post that XD
 
I thought that was Solomon in Ecclesiates...
 
(hmm, how many verses am I willing to read in the pursuit of getting that reference...)
Up to 2:23, apparently
"do, be" is an interesting philosophical viewpoint that indicates that moral character comes not from intent, but from actions. By doing good, you become good.
Beware the man who is polite to you but rude to the waiter.
 
5:51 PM
What about the man who is rude to you but polite to the waiter and indifferent towards the maitre d'?
 
@jonrsharpe As long as they're pretentious to the sommelier, I think it's fine.
 
Bond: "I'll be the judge of that." ... (sip) ... "The wine is quite excellent, although for such a grand meal I had rather expected a claret."
 
Let me check my morality lookup table... flip flip flip... Carry the two... In the next life he would feast forever in the hall under the mountain, but naughty goblins would ensure that his chair is eternally wobbly.
 
DSM
This table is rather finely calibrated.
 
@hiroprotagonist A Bordeaux? For shame. If it's not a Shiraz, I'm not touching it. ;)
 
5:57 PM
Characters with at least a +2 WIS modifier may roll against Lore(folktalkes) in order to swap seats with Ysengrin.
 
I'm not sure it's possible to have a non-pretentious interaction with a sommelier, whether or not they're on duty, so I think I'm OK
 
@MorganThrapp "There’s the faintest soupçon of asparagus and just a flutter of Edam cheese." (stolen from wordnymph.com/tag/pretentious-wine-descriptions )
 
A friend of mine trained to be a sommelier for two years. She's actually surprisingly non-pretentious about wine. I mean, we were drinking Franzia together the other day. :P
@hiroprotagonist Nothing like a flutter of cheese in your wine.
 

« first day (1839 days earlier)      last day (3112 days later) »