I could answer this questions, but have a tendency for long, technical explanations. ;-)
procedure ShowTime; // A procedure with no parameters
begin
// Display the current date and time
ShowMessage('Date and time is '+DateTimeToStr(Now));
end;
function Average(a, b, c : Extended) : Extended;
begin
// return the average of the 3 passed numbers
Result := Mean(a, b, c);
end;
Edit: thanks for the formatting tip.But if you were interviewing someone who claimed to know Delphi/Pascal at all and didn't know this off the top of their head, it would be a big red flag.
It would be like asking a C programmer what's the difference between "void foo(){...}" and "int foo(){...}". They had better be able to tell you the difference without having to think about it.
If "knows Pascal" is one of the job requirements, it's actually a good question.
Two spaces at the beginning of each line.
And you have two hours to edit a comment. :-)
Very likely, no.
Unless those companies somehow got very good on your "a" point and told nobody, their more filters they add the biggest the likelihood of having one that is anti-correlated to competence. And just one such filter can be enough to cut all the extremely few great candidates.
I wouldn't do a 5 hour interview, I don't care who the company is. I haven't had to do a cold interview (not referenced by an existing employee) since my first job out of college 20+ years ago. There is no way companies are going to find talent doing those long slog interviews, unless they pay 2x rates or something.
Just the thought of 5 hour interviews makes my stomach queezy.
That's only 4 words.
It seems like a rather cruel interview question, now that it qualifies as uninteresting trivia.
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.
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.
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.
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.