News for hackers. Stuff that matters.
Re:Ask HN: How do I understand the results of my job search? by badfrog on Sunday November 24, 2019 @08:42AM (#21620352)
I have a masters in CS and have been working for a decade at highly-regarded companies. I've never heard of SOLID and couldn't define closure precisely.
Re:Ask HN: How do I understand the results of my job search? by mettamage on Sunday November 24, 2019 @08:51AM (#21620402)
I do know closures but got rejected on not knowing SOLID. And when the interviewer explained it, the concepts were so easy to understand. I don't get it why he couldn't infer that I'd be able to apply the principles after a bit of practice.
Re:Ask HN: How do I understand the results of my job search? by badfrog on Sunday November 24, 2019 @09:02AM (#21620469)
Sounds like it's a bad place to work anyway. Hiring people who can recite definitions without evidence of being able to apply the concepts is a recipe for building a terrible team.
Re:Ask HN: How do I understand the results of my job search? by gherkinnn on Sunday November 24, 2019 @09:07AM (#21620494)
Seen it happen.

Very much like bike shedding: zealously insisting on <acronym> for every triviality, never doing so for more complex situations.

Re:Ask HN: How do I understand the results of my job search? by gherkinnn on Sunday November 24, 2019 @09:01AM (#21620458)
It makes for a an easy checkbox. No thought on the side of the interviewer required. Quite sad, really.

[x] closures

[ ] solid

Candidate had 1/2. Rejected. Now back to shitposting on HN.

Re:Ask HN: How do I understand the results of my job search? by treebog on Sunday November 24, 2019 @01:55PM (#21622436)
If they demand you know SOLID then they must be “Uncle Bob” acolytes, which is a strong signal that you should run in the opposite direction as fast as possible
Re:Ask HN: How do I understand the results of my job search? by raverbashing on Sunday November 24, 2019 @11:00AM (#21621158)
SOLID is one of my pet peeves, because the important thing is to know the basic principles and architect it ok, naming be damned.

(Not to mention they are, in essence, very subjective principles)

Re:Ask HN: How do I understand the results of my job search? by james_s_tayler on Sunday November 24, 2019 @06:05PM (#21624143)
Also knowing the names of them doesn't mean anything as far as I can tell. I've seen SOLID done well and SOLID done awfully. What counts is can you actually produce clean code that's not wasteful? Apparently knowing the acronym and being able to answer at least one question on it is a proxy for that. IMHO it's a pretty darn poor one, but it seems to be the one everyone goes with.
Re:Ask HN: How do I understand the results of my job search? by gherkinnn on Sunday November 24, 2019 @08:55AM (#21620420)
Interesting!

Closure don’t seem to be widely discussed outside of certain areas, so be it.

SOLID is rather surprising though. It seems to be quoted and (supposedly) adhered to religiously. Though I suspect it’s akin to people preaching TDD in public while we all know that’s rarely the case.

Re:Ask HN: How do I understand the results of my job search? by ken on Sunday November 24, 2019 @02:32PM (#21622710)
I'd say closures are one of the fundamental concepts of computer science. They're described in the introduction to chapter 2 of SICP, "Building Abstractions with Data".

SOLID sounds nice but I don't think I've ever seen anyone adhere to it religiously. Easy exercise: take any Java program, and imagine the spec changed the width of integers it needs to support, from 32-bit to some other size. How many files would you need to touch to make this change? Clearly, no class in the program has the Single Responsibility of this. The first letter of SOLID is already violated.

Re:Ask HN: How do I understand the results of my job search? by badfrog on Sunday November 24, 2019 @04:31PM (#21623571)
From that chapter: "In general, a method for combining data values satisfies the closure property if the result of combination can itself be combined using the same method."

It sounds like they're just describing recursive data structures? When most people talk about closures, aren't they referring to this (from Wikipedia)?

"In programming languages, a closure, also lexical closure or function closure, is a technique for implementing lexically scoped name binding in a language with first-class functions. Operationally, a closure is a record storing a function[a] together with an environment."

EDIT: My SICP quote was actually from somebody's notes, not the book itself. But the point remains.

Re:Ask HN: How do I understand the results of my job search? by probinso on Sunday November 24, 2019 @03:15PM (#21623030)
now imagine that is the case for almost every topic you know how to practice in