- Thanks received
- 16
You guys will be arguing for the re-introduction of Sinclair Basic GOTO statements next.![]()
They have their uses
You guys will be arguing for the re-introduction of Sinclair Basic GOTO statements next.![]()
Doing things a certain way just because that's the way you've always done them (and is the only way you know how to do them) can lead to some fairly counter-intuitive solutions and unreadable code.
Sounds like you agree with me now. If you're going to come up with new and creative solutions, you need to know all the tools you have at your disposal. The sort of programmer that's confused by basic language features, or dismisses them as irrelevant because they've not had to use them before, isn't going to be the sort of programmer to do that. They're going to be the sort of programmer that gets by with copy and paste and reproducing work they've done before.
On that basis, it's a pretty good interview question. And remember, this is a contractor forum. We're meant to be experts.
I have used the bit shift operator before in order to extract red/green/blue values which if I remember correctly are stored as a 32 bit values in windows. Beyond that never.
Contractors aren't just meant to be niche experts. We're meant to be people that get things done. Part of that involves seeing the bigger picture, and not just nit-picking or getting bogged down in meaningless minutiae as a means to its own end. As Joel Spolsky says, unless you're smart and get things done, you're no good to anyone in this game. It's amazing how many of those 'smart' people that ask trick questions in interviews can't get a solution delivered on time, within budget, and with all of the features that users needed it to contain.
That's at least a valid use case, although there is a set of utilities in the System.Drawing.Color namespace that would have allowed you to achieve that outcome much more readably and quickly, leaving you more time to concentrate on the more bespoke parts of the wider solution you were working on. The utilities provided even allow you to convert between named colours like "DarkRed" and their Hex or Dec equivalents, or constituent RGBA components thereof.
This is true and is why these kind of geek pub quiz interviews are a waste of everyones time. Its just a piss poor style of interview, I left there with them knowing absolutely nothing about me, what I can do or what I have done. It went ok but what does that prove? Am I good at C# or did I spend the weekend on dotnetinterviewquestions.com?
All these people saying its a good question to prove xxx, its not. I had a great interview last week, went through every project on the cv, asked me to explain from begining to end how user requirements were gathered, how it was designed, why i'd used a particular pattern, any issues encountered, how it was delivered, how I handed it over to the business. At each stage asking 'proper' questions like "sounds like you had problems at that stage, tell us how you went about relaying that to the stakeholders". Now THAT is an interview, they knew exactly how I delivered projects at the end of it.
I'd guess the kind of person who can recite the bumper book of C would struggle with the latter kind of interview.
