|
It does appear we have a lot of things in common. The first real life project I was on straight out of college I used Cobol on a IV-Phase mini, Fortran, Cobol and Assembler on an Interdata 8/32, and Fortran, Cobol, PL/I, RPG and Assembler on an IBM 370/158 MVS system, and also wound up writing the production JCL. Since then it's been Fortran on a Banyan network, Fortran and C under Ultrix on microVAXen communicating with Fortran on Windows PCs, then C on Xenix, SCO Unix, and finally Linux, to my hopefully final job with VB/Windows using SQL on an Access database, plus a lot of Excel VBA over the last 10 years or so.
Now I've started playing around with 3d resin printing, Arduinos and Pi's in my spare time so I won't be too bored in retirement; also taking classes in electronics, microprocessors, etc, at the local community college since I can audit them tuition free now that I'm over 60.
|
|
|
|
|
I'd forgotten about SCO Xenix/Unix: Believe it or not, the first multi-user reservation system I developed for a shipping/airline operator was written in dBase II running on Xenix with multiplexed Wyse terminals running over AC15 lines between sites.
Did a lot if stuff in dBase at one time, it really was revolutionary in the early days of micros. Likewise T/Maker a predecessor to modern day spreadsheets.
I may be an old git, but I've grown up with and used many of the significant developments in computing in the last 50 years and it has been an incredible (if not particularly well paid) journey.
8)
|
|
|
|
|
At 72, I've been reduced to Angular. And C#. And C++. And Python. I will not willingly admit to any Java competency. I've got guys in the department to do that dirty work.
|
|
|
|
|
I have you beat....they hired a 64 year old to replace the 65 year old who is retiring at the end of September (that is, 4 more of his working days as I type this; he takes Fridays off)! The good news is that I LOVE this new job and my new boss is terrific! I used to be in IT and he was one of my users I supported. He rose up the ranks the old way...he earned it! He knows what it's like to be a developer. I also am now a database developer (VBA in Access) and I wasn't before I transferred departments (I was a Cache ObjectScript/MUMPS programmer for the IDX/GE Healthcare system we have/had (it was replaced with Epic which does not encourage programmers to muck with their system, so I morphed into a SQL writer...I MISS being a Cache ObjectScript/MUMPS programmer). Oh, he just logged on...time to go drain his brain and document his extensive processes so I can support them all.
|
|
|
|
|
Jeremy Falcon wrote: Anyone else agree this is fundamentally broken?
100% agree.
I experienced something similar where I had a phone interview which was supposed to last 15 min (as a screening) and went on for over an hour and a half as various members pelted me with specific questions.
Finally, they hit on a topic I didn't have experience with and I said so and they went cold.
Whatevs!
The thing is you could literally ask Einstein a particular question that even he didn't have experience with.
Charles Caleb Colton, (1780- 1832): Examinations are formidable even to the best prepared, for the greatest fool may ask more than the wisest man can answer.
|
|
|
|
|
raddevus wrote: Finally, they hit on a topic I didn't have experience with and I said so and they went cold.
In my experience... you want honest people. Nobody knows everything... it's impossible. I've managed devs before I helped train how to do interviews for. The vast majority of them just Google questions to ask and that's that.
raddevus wrote: The thing is you could literally ask Einstein a particular question that even he didn't have experience with.
Exactly
Jeremy Falcon
|
|
|
|
|
if i interview people for a job the most important trait will be honesty.
|
|
|
|
|
Jeremy Falcon
|
|
|
|
|
I had a similar experience: take a text and embed it in a string with a '*' at char 1 (counting from 1) and a '*' in char 14 with the text in the middle padded (if necessary) with spaces using a language whose only string function was LENGTH. I wrote a one line solution that took a max of 4 comparisons and was told it was wrong. Why? It did not match the question setters solution (which was 12 lines and always used 12 comparisons). As the interviewer said to me "There are two solutions: my way [i.e. his way] and the wrong way".
|
|
|
|
|
To be honest those are great interview questions.
Makes it clear that you should pass and find another interview elsewhere.
|
|
|
|
|
|
Oh yeah. Everybody who has more than 25 years in programming knows that there is only ONE SOLUTION to every given problem. That's why our job is so easy. We just look up the right solution in our programmers handbook and off we go.... Sarcastic? Who, me? Nooooooooo!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
|
Well, there is this incredibly inefficient solution:
int[] data = new int[] { 1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0 };
int y = 0;
var result = data.OrderBy(d => d == 0 ? int.MaxValue : y++); It works, but ... it's pretty horrible!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Oh you fancy kids and your LINQ statements.
It was for a frontend position, so I used JavaScript. There are some LINQ libs for JavaScript actually, but they are slow as dirt and nobody uses them.
Jeremy Falcon
|
|
|
|
|
Doing it, "in place":
List<int> a = new List<int>( new int[] { 1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0 } );
int count = a.RemoveAll( i => i== 0 );
a.AddRange( new int[ count ] );
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
This just occurred to me ...
JavaScript's Array.sort enables you to use a function to say how sorting is done. All that is needed is a simple function to treat 0 as bigger than non-0.
var data = [ 1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0 ];
var sorted = data.sort( (a, b) => a == 0 ? 1 : (b == 0 ? -1 : 0) );
var sorted = data.sort( (a, b) => a ? (b ? 0 : -1 ) : 1 );
alert(sorted);
modified 24-Sep-20 11:29am.
|
|
|
|
|
Yes, but ... it doesn't do it "in place" (part 2 of OP's "test")
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
OOPS! I'd failed to read the spec correctly. Definitely won't get the job.
|
|
|
|
|
A few moments though gave me this:
int[] data = new int[] { 1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0 };
int outp = 0;
for (int inp = 0; inp < data.Length; inp++)
{
int d = data[inp];
if (d != 0)
{
data[outp++] = d;
}
}
while (outp < data.Length)
{
data[outp++] = 0;
}
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Right... that's the first take, but I used two arrays to pull it off to avoid the second loop.
Jeremy Falcon
|
|
|
|
|
Seriously, I was thinking about this and there is a cheat to the original instructions.
At least in JavaScript. See they just said put all the zeroes at the end.
Well. you can do that in one for loop...
Each time through loop
1. splice off the 0 at its original location.
2. then push it onto the end
Voila!
var data = [ 1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0 ];
for (var x = 0;x<data.length;x++){
if (data[x] == 0){
data.splice(x,1);
data.push(0);
}
}
|
|
|
|
|
That's a good solution and better than my first one that used two arrays. Too bad I didn't think of it two days ago.
Jeremy Falcon
|
|
|
|
|
But internally, the splice() operation is performing an O(N) operation - moving all elements down by one position. Your solution is therefore O(N^2).
If I were the interviewer, I would ask if you can see a problem with this solution, and then ask you for a more efficient (O(N)) solution.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Daniel Pfeffer wrote: If I were the interviewer, I would ask if you can see a problem with this solution, and then ask you for a more efficient (O(N)) solution.
I'd throw my dry-erase marker at my interviewer's forehead and storm out!!
...
Later, they would offer me the job for sticking to my principles.
|
|
|
|
|