News for hackers. Stuff that matters.
Re:Moving Away from Python 2 by mark-r on Friday May 20, 2016 @06:55PM (#11742189)
Make a list of the things that work vs. the things that don't. Works: input, output, copying, formatting, numeric conversion. Doesn't: slicing, character counting. Probably doesn't: regular expressions, case conversion. Remember that all this is premised on all I/O being done in UTF-8.
Re:Moving Away from Python 2 by devishard on Friday May 20, 2016 @08:53PM (#11742626)
So?

Even if we accept your myopic list of features that work and believe your statement that "most operations can be performed on bytes", that doesn't make the language usable for internationalized content. Trading having to call encode and decode, which fail with clear, easy-to-fix errors, for a myriad of subtle, silent encoding failures is not a good trade. Which you would be abundantly clear to you if you had internationalized anything ever.

Re:Moving Away from Python 2 by ubernostrum on Saturday May 21, 2016 @02:14AM (#11743437)
During my last job hunt I kept getting people doing the "test for palindrome" phone-screen question.

After a while I started creatively expressing my dislike of phone screens by showing them an implementation that hints at some of the complexity lurking in this allegedly-simple task (i.e., you need to understand Unicode classes and normalization in order to write a palindrome tester).

Re:Moving Away from Python 2 by devishard on Saturday May 21, 2016 @12:42PM (#11745263)
That's totally a question I'd ask, and I don't understand why you don't like it. The reason I'd ask it is not because it's a simple task, it's because it's not a simple task: what I'm looking for is that you aren't going to over-confident-ly throw naive solutions at hard problems. That will cause bugs and have to be cleaned up.

I think if you showed me an implementation that hinted at some of the complexity lurking in the task, that would be a big point in your favor.

Re:Moving Away from Python 2 by mark-r on Sunday May 22, 2016 @12:21AM (#11747360)
I think it depends on the interviewer and the purpose of asking the question. For a phone screen I'd expect it to be a variant of FizzBuzz, designed to weed out the people that aren't worth wasting time on. Coming up with a complex solution, when the interviewer was looking for something simple, is probably grounds for a fail - even if the complexity is justified.
Re:Moving Away from Python 2 by ubernostrum on Sunday May 22, 2016 @01:14AM (#11747435)
Yeah, a lot of places use it as an initial phone-screen "can you code" question.

I did bust out a version on one call which did detection of combining classes, normalized into composed form before checking the reverse, etc., and the interviewer seemed kinda lost as I explained it.

Ended up not working for them, but for different reasons.

Re:Moving Away from Python 2 by raiph on Saturday May 21, 2016 @02:47PM (#11745691)
> Works .. Doesn't

I question some details in your lists but imagine you'd agree that the Works vs Doesn't split approximates to whole string level vs sub-string/character level operations.