News for hackers. Stuff that matters.
Re:Learning to program is getting harder by TallGuyShort on Friday February 16, 2018 @06:30PM (#16397556)
I think that's a side-effect of degrees that focus only on coding or applied math, whereas before the computing industry was as developed as it is now and there was less specialization within it, a CS degree would have covered the basic data structures and algorithms that were common knowledge then and still had plenty of time to cover systems things. My degree wasn't in CS - it included basically a CS minor, but it also focused on network protocols and hardware architectures that most CS students had never heard of. So when I was interviewing for jobs around graduation and was asked to explain everything that happens after someone types "google.com" in their browser, I could explain all the network protocols in detail right down to how binary was encoded into specific 5V fluctations on certain lines, DNS resolution, routing algorithms, the server's filesystem, etc. But when I was doing a coding problem and they asked me what the invariant was in my loop, I had to ask what an invariant was. And yet I had been coding full time for 4 years by that point and never needed to know that term. I knew stuff CS majors didn't, and they knew stuff I didn't. It was different specialities, each of which really filled 4 years of heavy, heavy semesters.
Re:Learning to program is getting harder by NTDF9 on Friday February 16, 2018 @08:07PM (#16398158)
Reminds me of a recent interview where they asked me, "How does the client to a server?"

I replied "over the socket"

To which they replied, "Using REST over HTTP"

¯\_(ツ)_/¯

Re:Learning to program is getting harder by __blockcipher__ on Friday February 16, 2018 @08:51PM (#16398362)
I would have murdered them on the spot for that response
Re:Learning to program is getting harder by aurelianito on Friday February 16, 2018 @09:08PM (#16398456)
Probably both are correct. But which one is more useful in this context?
Re:Learning to program is getting harder by __blockcipher__ on Friday February 16, 2018 @09:17PM (#16398494)
The interviewer or whoever should provide the context. Otherwise it’s a pointless question.

The issue is when they don’t provide context and expect you to list off some random framework or something.

Re:Learning to program is getting harder by esmi on Friday February 16, 2018 @11:40PM (#16399055)
Or they expect you to ask for context.
Re:Learning to program is getting harder by aje403 on Friday February 16, 2018 @09:24PM (#16398525)
Why is a pothole round?

Nope - sorry, looks like you're not a mythical unicorn!

Re:Learning to program is getting harder by thaumasiotes on Friday February 16, 2018 @10:17PM (#16398741)
The famous question is "why are manhole covers round?" Manholes being artificial, this leaves some room for speculation about why the shape was chosen.

"Why is a pothole round?" is a more objective question.

Re:Learning to program is getting harder by aje403 on Saturday February 17, 2018 @07:10AM (#16400351)
You're hired! SVP of Aerospace Engineering. How many people do you need under you, killer?
Re:Learning to program is getting harder by marcv81 on Saturday February 17, 2018 @01:56AM (#16399444)
Most manholes are round because that is the most practical shape such that the cover cannot fall in. There are actually other shapes, but they are usually hinged and most costly.
Re:Learning to program is getting harder by zo1 on Saturday February 17, 2018 @05:48AM (#16400113)
I've never thought about it, but a circle of the correct size has no less reason to not fall in than say a square or triangle of the appropriate size. I.e. if it's smaller than the hole, it'll most likely fall in.

My theory: They're heavy, so making it a circle at least eliminates the need to "align" it when putting it back. You can basically just drag it using a hook and it'll slot itself into place.

Re:Learning to program is getting harder by mjlee on Saturday February 17, 2018 @06:18AM (#16400205)
But manhole covers are always bigger than the hole. Otherwise, they'd fall in at installation and the problem would be immediately obvious.

The point here is more that a circle has the same diameter regardless of orientation. There's no way to rotate it to make it fit through a hole it couldn't before, like you can do with a rectangle.

Re:Learning to program is getting harder by jpindar on Sunday February 18, 2018 @05:20PM (#16409145)
This is also true of a triangle, and indeed there are triangular manholes.
Re:Learning to program is getting harder by sobani on Monday February 19, 2018 @11:12AM (#16413684)
Aren't the altitudes/heights of a triangle shorter than its sides?

The height of an equilateral triangle is about 87% of the length of one of its sides.

Re:Learning to program is getting harder by jpindar on Monday February 19, 2018 @12:51PM (#16414359)
True. Whether they fit through the hole depends on how thick they are.
Re:Learning to program is getting harder by shagie on Saturday February 17, 2018 @11:23AM (#16401319)
You might be interested in reading about Prince Rupert's cube. https://news.ycombinator.com/item?id=16399079

In particular from https://en.wikipedia.org/wiki/Prince_Rupert%27s_cube

> In geometry, Prince Rupert's cube (named after Prince Rupert of the Rhine) is the largest cube that can pass through a hole cut through a unit cube, i.e. through a cube whose sides have length 1, without splitting the cube into two pieces. Its side length is approximately 6% larger than that of the unit cube through which it passes. The problem of finding the largest square that lies entirely within a unit cube is closely related, and has the same solution.

That 6% larger is the key.

Re:Learning to program is getting harder by mtreis86 on Saturday February 17, 2018 @06:28AM (#16400241)
Man hole covers aren't flat discs nor thin cylinders, but are truncated cones. The diameter of the bottom of the cover is smaller than the top. There is no way for a cone to fall through an opening smaller than the widest diameter end.
Re:Learning to program is getting harder by pavelrub on Saturday February 17, 2018 @09:31AM (#16400800)
The difference is that this "appropriate size" (= cost of materials) is smaller for circles than it is for any other shape.
Re:Learning to program is getting harder by thaumasiotes on Saturday February 17, 2018 @05:43AM (#16400104)
Re:Learning to program is getting harder by mrexroad on Saturday February 17, 2018 @01:06AM (#16399321)
Sorry, confused here on why the pothole variant is more objective? If anything, the manhole cover one seems pretty clear cut?
Re:Learning to program is getting harder by thaumasiotes on Saturday February 17, 2018 @05:54AM (#16400134)
Potholes are naturally occurring. For any particular pothole, there is a reason it took whatever shape it did.

The only real constraint operating on manholes is that they fit the opening. Unless you can produce a design document specifying the requirements for the manhole you're looking at, there isn't really a "why".

Re:Learning to program is getting harder by aje403 on Saturday February 17, 2018 @10:50AM (#16401167)
Please clear out your desk. Security will escort you out.
Re:Learning to program is getting harder by tripzilch on Monday February 19, 2018 @01:32PM (#16414649)
Is it murder?
Re:Learning to program is getting harder by baq on Saturday February 17, 2018 @06:56AM (#16400308)
'African out European' next time, it is.
Re:Learning to program is getting harder by TallGuyShort on Saturday February 17, 2018 @02:29PM (#16402274)
I don't understand this - could you enlighten me?
Re:Learning to program is getting harder by chiph on Saturday February 17, 2018 @02:40PM (#16402326)
"African or European" - refers to Monty Python's classic film Holy Grail

https://www.youtube.com/watch?v=rFQgwwXOfR4

note: Watch the witch scene later in the film - there's a coconut and swallow at the start of it.