Live data from Hacker News

Subverting the software interview (2021)

nliu.net

71–80 of 80 posts

Re: Subverting the software interview (2021)

#71

Earlier quoted context omitted.

Quoting from aphyr as it still brings me joy and might encourage others to read through the interview pages there, > “In Lisp,” you offer. “We often write domain-specific languages to solve new problems.” > “C is not a DSL!” > “If you insist.” Keep going anyway.

My favorite: > The Church. The lambda calculus. The gay agenda. It has known a thousand names, a thousand forms.

Why gay agenda though? What is the connection?

Re: Subverting the software interview (2021)

#72
post #19
post #13

Gorgeous. I'm not versed well enough in the theory to validate his code, but I know enough to see where he's going with this. As an aside, there's a lot of rightful complaining about the interview process. I've been on both sides and it sucks either way. As a hiring manager for a small company, we never had the 'process' that bigger companies have, so it was always a seat of the pants decision. Not my favourite thing…

You could have at least clicked on the LinkedIn link before assuming the author was a guy... https://www.linkedin.com/in/naomi-w-liu/

[deleted]

Re: Subverting the software interview (2021)

#73
post #28
post #19

Earlier quoted context omitted.

You could have at least clicked on the LinkedIn link before assuming the author was a guy... https://www.linkedin.com/in/naomi-w-liu/

My bad, should’ve used “their”.

Not everyone has a LinkedIn account, not everyone may know that “Naomi” is usually feminine, and the article run through a textual gender analyser does read as “masculine”.

Mis-stating gender might be careless when as you imply “their” is the always the safe bet, but it’s probably not enough to justify OP’s unduly critical response. He / she or they could have just replied with “I checked their LinkedIn and Naomi’s a girl, btw”.

Re: Subverting the software interview (2021)

#74

Earlier quoted context omitted.

My favorite: > The Church. The lambda calculus. The gay agenda. It has known a thousand names, a thousand forms.

Why gay agenda though? What is the connection?

It's a reference to the Church-Turing Thesis, the latter namesake having been persecuted for "homosexual acts" and forced to undergo chemical castration.

Re: Subverting the software interview (2021)

#77
post #60
post #56

Earlier quoted context omitted.

I always liked the version with no branching statements. In python it would be roughly: def fizz_str(n): return "FIZZ" def buzz_str(n): return "BUZZ" def fizz_buzz_str(n): return "FIZZBUZZ" def to_str(n): return str(n) indexes = [3, 0, 0, 1, 0, 2, 1, 0, 0, 1, 2, 0, 1, 0, 0] def fizz_buzz(n): funcs = [ to_str, fizz_str, buzz_str, fizz_buzz_str ] return funcs[indexes[n % 15]](n) for i in range(1, 101): print(fizz_buzz(…

Here is another version of similar idea as oneliner. Additional feature - no loops and no conditions. fb = lambda n : n == 0 or not fb(n-1) or not print(['{}',"fizz","buzz","fizzbuzz"][((n%3)==0)|(((n%5)==0)*2)].format(n)) fb(100)

Nice use of bitwise OR

Re: Subverting the software interview (2021)

#78

Earlier quoted context omitted.

In a code review, I’d given a junior programmer advice to avoid magic constants and use defines instead (c, not c++). Resubmission came back with: #define SEVENTEEN 17 Last I spoke with him, he was a Java instructor.

It is truly amazing. One can rave about OOP all day and not understand the basics of programming or good, readable code. Truly mindboggling.

At the risk of sounding contrarian, I don’t think it’s mind-boggling at all. There are two types of software engineers out there: those who read to understand, and those who understand to read. What I mean by this is that I find most of my coworkers “read to understand”- they don’t know X (or, more commonly, they don’t understand X and want to prove the person who wrote “X” wrong), so they Google around until they find an SO that supports their stance, or gets them code that does what they want it to do…. Then there are those who understand that to be truly great is to read beyond the minimum needed to achieve the goal, be it to get software to do X, to prove someone wrong in code review, or something else… and to READ for pleasure and to quench the thirst of knowledge. The passionate folk, in other words. Most of the time you can find out which group a person falls into by whether they read about and write code in their free time. Kind of like leetcode, this litmus test I find has a low false-positive rate, but a relatively high false-negative rate, as there are many passionate engineers who don’t have the time or energy to read and write in their free time (typically a “wife and kids” scenario).

E: in other words, those who code to live vs live to code.

Re: Subverting the software interview (2021)

#79
post #57

Earlier quoted context omitted.

In a code review, I’d given a junior programmer advice to avoid magic constants and use defines instead (c, not c++). Resubmission came back with: #define SEVENTEEN 17 Last I spoke with him, he was a Java instructor.

The truly brilliant thing to do would be #define SEVENTEEN 16

I worked for a while with a software engineer who insisted in encoding the value of the macro within the name:

  #define MAGIC_16 16
his rationale was that you had to go through all the uses and consider whether the change would cause an issue.

It takes all kinds.

Re: Subverting the software interview (2021)

#80

A personal favorite ruby -e 'puts (0..99).map {|i| srand(46308667) if (i%15).zero?; ["FizzBuzz", "Buzz", i+1, "Fizz"][rand(4)]}'

This is great and was a lot of fun to figure out.

It also has the side effect of making me feel better for never attempting to write my own encryption algorithms! :D

Post reply on HN