3 ms·
"Functions return a value." That's only 4 words. It seems like a rather cruel interview question, now that it qualifies as uninteresting trivia.
by logfromblammo 9y ago
"Functions return a value."
That's only 4 words.
It seems like a rather cruel interview question, now that it qualifies as uninteresting trivia.
- Clubber 9y agoThat's why I said 5 or so. I was specifically looking for, "a function returns a value," which is 5. If you worked in Delphi, it most certainly isn't trivia. It's like asking what does void mean in C type dialects or what does the = vs == do. It's not trivia, it's trivial.
- Stratoscope 9y ago> It's not trivia, it's trivial. That is a great quote; I hope you don't mind if I borrow it from time to time. The comments that this is "nuanced" or a "silly gotcha" are interesting. I wonder if these commenters have ever programmed in Delphi or Pascal? (No offense intended to those commenters if you have.) I've never used Delphi itself (although a program I wrote was bundled with it for a while, if you remember WinSight). I did write some Pascal code 35 years ago for DOS and the original Mac OS, but haven't touched the language or looked at it since then. But even I knew the answer to this right off the top of my head. It's so fundamental that if you don't know it, you don't know the language at all.
- Clubber 9y ago>I hope you don't mind if I borrow it from time to time. Sure. >It's so fundamental that if you don't know it, you don't know the language at all. That's what we were shooting for. We knew there was no way we would know a rock star without working with them, and we were more than willing to accept good people who had room to improve. We couldn't accept someone who didn't know the language. It worked out really well for us. Because the interviews were short, we could fit a lot more in during a workday and get the process over quickly.
- logfromblammo 9y agoNow that I exercise my memory of things past, I seem to recall that VB6 had "Function" and "Sub", too, which had essentially the same distinction, except there were some further differences if you ever tried to write Office macros. I never did voluntarily, because "real programmers" just didn't do that. But there was always some legacy POS written by a non-software person--who no longer works for the company, of course--that had been embedded into an Excel spreadsheet and never once tasted source control, but it was somehow critical to the business, anyway, and you might have been assigned the task of figuring out what it did and turning it into "real code". While I have a low sample size, it seemed like those reduced from about 10 MB of godawful brute-force spaghettified spreadsheet macro, down to about 10 lines of Java or C#, using algorithms and basic library functions. The hardest part is convincing your boss's boss that they both do the same thing, because the guy who wrote the macro spent so much time on it that there's just no way it could actually be so simple. As I favor considering aptitude in addition to skill, asking gotcha questions about jargon or syntax doesn't seem fair to someone who could hear that 4-word explanation and instantly understand what you meant.