News for hackers. Stuff that matters.
Re:How I Came to Write D (2014) by acqq on Sunday June 03, 2018 @01:43PM (#17220673)
Google byrocracy required from Ken Thompson to pass a C language exam.

https://www.theregister.co.uk/2010/04/21/ken_thompson_take_o...

Re:How I Came to Write D (2014) by zerr on Sunday June 03, 2018 @01:59PM (#17220757)
C exam aside, I don't think he would pass a regular Big G interview, unless he'd allocate some 6 months for preps which I doubt he did.
Re:How I Came to Write D (2014) by johannes1234321 on Sunday June 03, 2018 @03:59PM (#17221441)
Considering that he is not one of the young hackers starting with JavaScript, but in a time were looking at raw memory dumps was normal operation and memory was sparsely available and CPUs were slow I assume he well knows about algorithms and data structures by heart. Most likely he implemented more binary trees in his live than I thought about and I assume he would consider a question about inverting a binary tree more of a joke than a serious question.
Re:How I Came to Write D (2014) by acqq on Sunday June 03, 2018 @05:40PM (#17222382)
> I assume he would consider a question about inverting a binary tree more of a joke

If you refer to this:

https://www.quora.com/When-do-you-need-to-invert-a-binary-tr...

I also don't know why would anybody ever need to implement "inverting" a binary tree except for the Google exam.

> Most likely he implemented more binary trees in his live

"Most likely"? Actually he "just" invented (not a complete list):

- Unix (with Ritchie) (in assembly first)

- the language B, based on which Ritchie developed C.

- the notation for the regular expressions everybody uses today

- the algorithm for fast regular expression handling

- the chess computer that won the 3rd World Computer Chess Championship 1980

Re:How I Came to Write D (2014) by pjmlp on Monday June 04, 2018 @09:19AM (#17227437)
Agree with everything except for B.

He implemented a BCPL dialect, which he called B, in fact if you compare B and BCPL programming manuals they are quite similar.

https://www.bell-labs.com/usr/dmr/www/bcpl.html

https://www.talisman.org/b-manual.html

Re:How I Came to Write D (2014) by acqq on Tuesday June 05, 2018 @06:33AM (#17236398)
I don’t understand with which detail of my statements you don’t agree.
Re:How I Came to Write D (2014) by pjmlp on Tuesday June 05, 2018 @07:01AM (#17236531)
His B "invention" in reality was closer to copying and dropping a few features from BCPL than actually inventing something new.
Re:How I Came to Write D (2014) by acqq on Tuesday June 05, 2018 @04:32PM (#17241752)
Well, it can be argued that most of the “structured” languages were “dropping something” from Algol. Or later from Ada... yes, nothing fundamentally original happens often. But people give the names to the languages they make... even “dropping” is something “creative” often worth naming. Apparently Unix kept only minimum of Multics. Sometimes exactly the “bigger” variants aren’t fit to survive.
Re:How I Came to Write D (2014) by johannes1234321 on Sunday June 03, 2018 @06:25PM (#17222692)
> > Most likely he implemented more binary trees in his live

> "Most likely"? Actually he "just" invented (not a complete list):

Please mind the full quote of me "... than I thought of" -- I thought (and implemented) about trees quite a bit myself and grant him a few factors on top of that.

Re:How I Came to Write D (2014) by jonex on Sunday June 03, 2018 @02:58PM (#17221103)
Someone who knows how to program and is at least superficially aware of different data structures and algorithms would not need six months of preparation to pass the interview. That's very exaggerated and it might discourage people who would enjoy working at Google from applying.

I know I thought it would be a lot harder than it was. I spent some hours checking example interview questions, and it was definitely enough. If anything, I might have been too focused on thinking in terms of established algorithms, and too little focused on reasoning on my own.

Re:How I Came to Write D (2014) by acqq on Sunday June 03, 2018 @05:50PM (#17222454)
> That's very exaggerated and it might discourage people who would enjoy working at Google from applying.

But it's irrelevant to what I wanted to point to: that somebody already accepted Ken Thompson to Google. Then some absurd bureaucracy decided that Ken Thompson has to pass the exams given to the young beginners. Probably reasoning something like somebody here "explained" "so that developers can be moved around."

Whoever is not aware of these "details", please see my another post for what Ken Thompson invented before coming to Google. Such "minor things" like the Unix OS, the language that preceded and inspired C and the currently used kind of regular expressions.

Re:How I Came to Write D (2014) by DmitryOlshansky on Monday June 04, 2018 @01:07AM (#17224826)
I came mostly unprepared, and passed just fine. In fact they extended it with 2 hours more “followup”. And I’m no superhuman. It may depend on the part of Google you apply to + it was compiler team and I love compilers ;)
Re:How I Came to Write D (2014) by zerr on Monday June 04, 2018 @03:49AM (#17225466)
How one would apply to such a specific part of Google? e.g. Compilers team?
Re:How I Came to Write D (2014) by johannes1234321 on Sunday June 03, 2018 @03:54PM (#17221405)
It's worth noting that this is not a simple C language exam, but a Google C style exam. Purpose is that all Googlers write as similar code as possible, so that developers can be moved around and find a common approach everywhere. Also this simplifies code reviews for the same reason.
Re:How I Came to Write D (2014) by acqq on Sunday June 03, 2018 @05:36PM (#17222345)
> so that developers can be moved around and find a common approach everywhere. Also this simplifies code reviews

Would you agree with me that if you brought Ken Thompson for that to your company (or using that excuse to require from him to "pass the C exam") something is fundamentally wrong?

He actually co-invented Unix and worked on the "first C" before C was even called C.

https://en.wikipedia.org/wiki/B_(programming_language)

It's like hiring J. K. Rowling and then requiring from her to pass the Harry Potter trivia quiz in order to allow her to write text messages.

Re:How I Came to Write D (2014) by johannes1234321 on Sunday June 03, 2018 @06:49PM (#17222853)
1) since (by the time of the article) he didn't take the test he wasn't hired for writing C code

2) C can be written in many styles, whatever he writes should be an easy uptake for later developers, thus adhere to the common style

I have no doubts that he can express anything in C and I assume this would be of good quality, but might take a different approach, thus makes it harder for the junior who is trained heavily in Google style and has to fix a bug or add a feature a bit later.