Live data from Hacker News

The four programming questions from my 1994 Microsoft internship interview (2023)

computerenhance.com

81–90 of 103 posts

Re: The four programming questions from my 1994 Microsoft internship interview (2023)

#81

Answer posts: 1) https://www.computerenhance.com/p/microsoft-intern-interview... 2) https://www.computerenhance.com/p/microsoft-intern-interview... 3) https://www.computerenhance.com/p/microsoft-intern-interview... 4) https://www.computerenhance.com/p/efficient-dda-circle-outli...

As a kid on old hardware I'd loop 360 degrees and do sin and cos, and wait ages for that circle. I wasn't super clever I probably just cargo culted it from somewhere.

Re: The four programming questions from my 1994 Microsoft internship interview (2023)

#82
post #40

Earlier quoted context omitted.

Exactly! I used this question regularly. It wasn’t a gotcha question or even an impossible-without-experience question as the author thinks. It was a show me HOW you think through something question. There are a lot of ways to solve it, from scanline to sin/cos to using the circle equation, but you can _progress_ from naive to advanced solutions, and all solutions above plus the DDA or Bresenham solutions have symmet…

I wonder if there's a class of people who managed to get CS degrees but really aren't that good. To them, it might feel more like either you remember the perfect and optimal but complex solution you were taught in a class, or you don't happen to remember it and are completely stuck and can't make any progress at all. I don't think I'd want to hire or work with somebody who can't come up with some sort of solution aft…

It's not necessarily a class of people. It's proficiency vs. mastery. Is some set of people more able to master a subject than another? Sure. Each person has different limits to their potential, of course, but for most things achieving mastery is more a matter of putting the work in over time.

Re: The four programming questions from my 1994 Microsoft internship interview (2023)

#84
post #72

My first ever programming interview was like a group interview. There were three or four programmers asking me questions, one at a time. The only one I remember was to check if two strings were equal (in C). I wrote (maybe buggy) code to iterate both pointers, comparing while looking for the null terminator. The interviewer stopped me and said, “You should compare their lengths first. If they are different, you can e…

On the upside, think how annoying it would have been to be part of that team and have a boss that doesn't have any ability to admit he is wrong.

Yep, sounds like a bullet dodged there.

Re: The four programming questions from my 1994 Microsoft internship interview (2023)

#86
post #72

My first ever programming interview was like a group interview. There were three or four programmers asking me questions, one at a time. The only one I remember was to check if two strings were equal (in C). I wrote (maybe buggy) code to iterate both pointers, comparing while looking for the null terminator. The interviewer stopped me and said, “You should compare their lengths first. If they are different, you can e…

Funny how often "there are optimized functions for that" really means "I haven't thought through what the optimized function actually has to do"

Re: The four programming questions from my 1994 Microsoft internship interview (2023)

#87

The author’s memory is remarkable. I hardly remember my own name that far back, LOL. Back then, I knew I would always struggle with those types of interviews, so I always carried a floppy disk with me to them. The disk contained a few programs I had written, and I would simply tell the interviewers, “Don’t give me a quiz. I’m terrible at it, so if you do, I’m out.” However, if they were willing to look at my capabili…

A small floppy full of actual programs probably said much more about your ability than a whiteboard quiz ever could

Re: The four programming questions from my 1994 Microsoft internship interview (2023)

#88

The author’s memory is remarkable. I hardly remember my own name that far back, LOL. Back then, I knew I would always struggle with those types of interviews, so I always carried a floppy disk with me to them. The disk contained a few programs I had written, and I would simply tell the interviewers, “Don’t give me a quiz. I’m terrible at it, so if you do, I’m out.” However, if they were willing to look at my capabili…

Memory is a funny thing. I also take months to learn new names, but I can tell you that my second interview ever was for a company which did low level SCADA work. Even though I never took that job or worked in any such related field I can still tell you what it stands for.

Names disappear instantly, but some oddly specific technical acronym from one interview decades ago gets burned into ROM

Re: The four programming questions from my 1994 Microsoft internship interview (2023)

#89
post #10

The circle outlining one seems interesting to me. I definitely didn't read the algorithm ahead of time, and I'm probably not as smart as a revolutionary genius computer scientist, but I thought of 2 basic algorithms in a few minutes. You could iterate over the degrees 0 to 360, use trig functions to figure out where the point at that angle is, and plot the closest point. Might need to be a bit tricky about the step s…

Your second idea is pretty much the direction the classic solution takes: walk along the curve incrementally, avoid square roots, and use symmetry to fill in the other parts

Re: The four programming questions from my 1994 Microsoft internship interview (2023)

#90
The Bresenham line algorithm was such a breakthrough to me - talk about looking at a differential (partial differential) from an integer view, by a particular axis! Anyway, by extension, approaching a circle using similar is actually "relatively obvious".

[I'm self-taught, so some things aren't as obvious to me as they are to others, and I still get terminology wrong!]

Post reply on HN