The four programming questions from my 1994 Microsoft internship interview (2023)
91–100 of 103 posts
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#92today it's paxos/raft questions for an internship writing Next.js for 10$ an hour.
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#93Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#94Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#95Earlier quoted context omitted.
Why did that approach change?
I’m not sure if that strategy still works in today’s job market. It might still be, but I’m not the one to answer since I haven’t been on a job interview in quite some time.
I also carry a binder. Each page is a one-page description of a project with a color photo of the system and a bulled-point list of all technologies inside. It's a great conversation starter. Hasn't failed me yet.
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#96My 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…
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#97Earlier quoted context omitted.
I’m not sure if that strategy still works in today’s job market. It might still be, but I’m not the one to answer since I haven’t been on a job interview in quite some time.
I work in embedded systems. I always carry a few (small) projects with me in a backpack with a power supply and bring them out if certain topics allow me to do a show-and-tell. I also carry a binder. Each page is a one-page description of a project with a color photo of the system and a bulled-point list of all technologies inside. It's a great conversation starter. Hasn't failed me yet.
I've made great hires who had binders just like you described.
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#98Earlier 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…
Yes, yes, oh my god yes!
The classic one that will stick in my memory forever was the candidate with an MSCS who was given the problem description and categorized and described what class of problem it was, but completely failed to make any progress in solving it.
I'm sure she was great at complex algorithms, but we just wanted a for... loop to start with.
The flipside of this is that one of the best hires we ever made had such a bad resume that I remember storming into my boss' office and asking why I was wasting my time interviewing that person.
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#99Earlier quoted context omitted.
Well in an interview I guess something like "Of course we shouldn't allow C-strings in general outside of syscalls and argv, but for the purpose of the exercise...." And now you've shown that you know what you're talking about and that you won't be difficult to work with.
I don't think it was clear in 1994 that not passing the size of a string was a sin
Re: The four programming questions from my 1994 Microsoft internship interview (2023)
#100Q2 String copy. Also needs to know if overlapping ranges and/or NULL pointers need to be handled. Must assume ASCIIZ in src. (DOS also had $-terminated strings and Pascal had length & pointer strings.) Pretty easy.
Q3 Flood fill. Keep filling towards either end of the current scanline while the pixel value is the same. Look up and down one scanline with the same width as the filled segment for additional scanline segments that are the same, and recursively begin the algorithm again for each.
Q4 Circle draw. IIRC needs a trig data table to avoid floating point. The current x position needs to be tracked and for each line in y, the length of the current line part to advance x needs to be calculated. Calculate one quarter of the circle and replicate it to all 4 quadrants. I believe the fairest circle rasterization calculation is to subtract half of a pixel width from the radius so that drawing relates to the center of pixels.