The four programming questions from my 1994 Microsoft internship interview (2023)
31–40 of 103 posts
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#32What is pitch in regard to a rectangle in question two?
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#33The second one is absolutely trivial if you've ever read K&R (even if you're not allowed to just call strcpy()), while the fourth one is also very straightforward if you know about https://news.ycombinator.com/item?id=15266331 ; but 32 years ago, knowledge definitely did not propagate as quickly as it does today. Additionally, I was allowed to store Color however I wanted — so if I needed some precomputation, I was a…
y -= x >> 4;
x += y >> 4;
Certainly works, and seems to require 100 iterations to get a full circle.
Are there other approximations, taking smaller angular steps, to get a better circle?
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#34This is a fun article. As a current Principal at MSFT I've never seen these type of questions being asked in interviews. I don't think it's fair or accurate to say "If you’re an experienced programmer, you already know how to do all of them". So many of the SWEs and candidates at Microsoft are just studying leetcode using python, joining the company and writing managed C# code.
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#35The 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…
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#36Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#37The 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…
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#38The 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…
I can tell this is from forever ago by floppy disk .
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#39The 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…
I can tell this is from forever ago by floppy disk .
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#40The 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…
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…
In fact, coming up with the CS-perfect solution immediately may be a bit of an anti-signal. I want the person who can think their way through to a solution to a problem that's new to them reasonably well. The fact that you happened to have memorized the best algorithm for this and can recite it on command doesn't tell me much useful, because nobody has the perfect algorithm for everything memorized.