Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Eh, I have been programming C++ for a long time and not sure I 100% understand the OOP question. Is an Abstract class like a Virtual class? A class you create as a base class that is never instantiated? No clue on interface though. My guess is this would be a class that is used as an intermediate class.
So I looked it up, apparently C++ does not use this concept:
https://stackoverflow.com/questions...
When I first read this I thought "This must be java." That SO question seems to indicate this. -
nibor48805y@demolishun interfaces and abstract classes are used in c# too (and probably vb.net, but nobody uses that because it's shite). Key difference is that
interface just defines the contract, e.g. properties, methods etc, but no implementation.
abstract class has implementations but cannot be instantiated.
As there is no multiple inheritance in c#, a class can be a child of only one abstract, but can implement several interfaces. -
@hack I don't consider these question good questions. I find them rather gimmicky and as valid as to have them play a game of chess or sudoku.
Of course, it takes a certain kind of trainable skill to play sudoku and chess, but they rarely translate into any insight of how good a person is at transforming real world problems into code. I rather have candidates train coding and check for that. -
Wrote "An interface is a contract. It specifies what to implement but not how."
So I got it half right but I always thought interfaces and abstract classes were the same thing.
Learn something new each day.
BTW if you can't instantiate an abstract base class, whats the thinking behind making it abstract instead of just creating a regular inheritable class?
Is it specifically to signal developer intent NOT to instantiate it, but instead to explicitly inherit from it? -
@Wisecrack I think it says "inherit" and "implement" the virtual functions. The contract portion.
-
(I have not read any of the comments yet) The difference between an interface and an abstract class is that abstract classes do not have any implementation, correct?
-
@Wisecrack Abstract classes are useful for if you want to do something when the class is instantiated. For instance if I want to store a cache for the object, I can automatically add the object to the cache in it's constructor.
Abstract classes in Java can also have fields, so you can specify things about the state of the object rather than only specify it's behavior. -
nibor48805y@AlgoRythm the other way round, interfaces have no implementation, abstract classes have an implementation but can't be instantiated.
Interfaces are especially useful for testing as they are easy to mock -
@Demolishun It's a bit hard for c++ folk because if I remember correctly, interfaces are created via abstract/virtual classes in that language and there is no strict separation between the concepts. Your answer I would have consider perfectly fine in the scope: Intelligent guess, honest acknowledgement of not knowing something.
-
WOW ! Maybe you should stop asking college theory questions?
I would’ve answered your question just to be polite, but I’ll put this interview as “Yep, nop, I’m not stepping a foot into this company”.
Winna see what I know or can do and how ? Give me a problem to solve.
It’s like people asking: “Do you know what was the first OOP language ?” No, I don’t and I really don’t care. For ME (personally) it was Pascal. -
@NoToJavaScript You got it wrong. The questions are only there to get a basic understanding on where they are coming from and what experience they have. The second stage would have been a trial day in the office or a do-at-home-assignment.
-
@k0pernikus We just send out premade small test first. It doesn’t even touch concepts as abstractions, inheritance etc. 6 basic questions, doable in about 10 minutes by anyone who wrote (And understood) Hello World in c#.
It wears out about 75% off applicants. It’s insane. And they do it at home with full google resources. No Excuses. It gains us so much time ! -
@NoToJavaScript
Holy shit. 75% attrition rate.
And here I thought I was incompetent all this time.
Praise be to the semicompetent plebian hordes! -
@Wisecrack
I really shouldn't, but here it goes. 6 questions.
Edit : Most people fail at question 1 lol. -
#Average.py
from functools import reduce
import random
random.seed()
def average(alist):
alist = [(x) for x in alist if x%2 == 0]
avg = reduce(lambda j,k : j+k, alist) / len(alist)
return avg
array = []
for x in range (0, 100):
array.append(random.randint(0, 100))
print(average(array))
#devrant is probably gonna fuck my formatting -
From what I can gather ToList executes the query, while the first doesn't.
Even without google I probably would have grok'd this because from my understanding
it's a chain method, and you can't call .tolist without going through the entire chain.
FWIW I'm completly unfamiliar with c# and entity framework.
A query, if I was even going to guess it would probably look something like:
var p = (from e in com.Employees
where e.Birthday == DateTime(1991, 6)).ToList();
I'm assuming DateTime takes a variable argument list so I can just feed it year and month and not the whole date.
I'm unfamiliar with SQL too but going to learn it because SQLAlchemy is required for flask.
//assuming we already have a database context
var p = context.Database.SqlQuery<string>("SELECT * FROM Employees WHERE Birthday = '1991-06'").ToList();
But again this is literally the first SQL and C# I've ever written.
I don't even know if it compiles lol. -
@NoToJavaScript based on that test I wouldn't want to work at your company. But maybe it's fine for your target audience.
-
@nibor I had a hard time too as I assumed it was about math. But it has nothing to do with math. It's just about rotating a picture of the symbols. 6 will look like 9 if you rotate it.
It was a disappointment when I finally understood what was asked. -
@nibor
Read it again. I did a double take myself.
Just think back to grade school spelling shit out on your calculator and turning it upside down so it looks like words.
We thought we were cool shits back then. -
@NoToJavaScript I too have a hard time understanding the "rotating the numbers" question; not so much about the rotation part but I don't understand the meaning of the `n` and `x` parameters, and also the "n numbers after x" doesn't make sense to me.
The examples are especially confusing as all I see is the result(?). What values had n and x for each of those examples?
That being said, these kind of questions are so remote to the actual work-load of any dev, that you are very likely to weird them out. (Unless the point was to see what a candidate does with unclear information.) -
That reminds me of an interview I had as the candidate which basically boiled down to a variant of fizzbuzz:
Me: I don't understand the question. What should be the inputs for this and what the expected outcome?
Them: This is intentionally vague.
Me: So you expect me to guess a solution? I am telling you: I am lacking the acceptance criteria here. I have no clue what to achieve here.
Them: *Weird looks.* Just code something.
Me: I don't want to code trash. Garbage in, garbage out. If you were to give me such a task, I'd reject both an estimation for it and I would not invest time to "just code" something. I want to get it right, and not what I think is the most likely behavior of it, especially if I know that I have no clear understanding of the problem. -
-
@k0pernikus This question was taken from one CS major exam. The idea behind : It’s very close to how clients define their needs. I can phrase it this way :
Write a function which return true if the number is equals to it self when read backwards and replacing 6 by 9 and 9 by 6 -
@Wisecrack Not in c# way. But yes the difference in ToList is what we are looking for. Then there are some limitation on usage of DateTime but fine !
-
@electrineer The goal is save time to both parties : us and candidates
Well, question 1 : if answered wrongly, no need to examine others answers. Means candidate was too lazy to copy/paste and run it
Qestion 2: pretty basic. Point of intereset : How candidate manages absence of all even values. (There is no expected answer. Some just return0, some throw exception)
Question 3: A mindfuck , but solved in 2 lines. First to check if any not allowed character is present, second something like : var turned = nn.ToString().Replace("6", "X").Replace("9", "6").Replace("X", "9");
Question 4,5 and 6 : Should take about 1 minute each.
So candidate spend les than 20-30 mins and on our end it’s very easy to check. -
@Wisecrack Seems clean. I don't have python to run and test it tho !
But idea is there : exclude "wrong" digits, replace and reverse string -
@Wisecrack Ohhh I'll put that.
"Remember high school and calculator ? Well now here is the question : ..." -
-
@Wisecrack Check that. One of worst answers we ever got.
1 - "location is null"
time.ToString());
2- double average = array.count(x=>x% ==0) * 0.5 ;
4- The first snippet find, print the Name and the ID of employee and give the total of employee that name is Baptiste (it return single element).
Whereas the second find all the employees that the name is Baptiste (It returns a list of employees).
5 - List<Employee> employees = com.Employee.Where(x=x.Birthday=="%06/1991%");
6 - Select Id, Name, Birthday from Employees where Birthday like '%06/1991%'; -
@NoToJavaScript so he was missing the second line, or is strings not nullable? Can't remember if they are...
-
Hazarth93865yWhen someone tells me they are an "expert" in anything, I already know they are not.... No expert sees themselves as an expert, the word is only useful when refering to someone else who you recommend as an expert...
Related Rants
-
PaperTrail23Worst dev I've interviewed? "Archie" ran his own consulting business for almost 20 years. Prior to his interv...
-
stonyark12note: Not the worst dev I've interviewed but worst I've worked with. A guy who worked in my company before me...
-
AlmondSauce10"Can you give an example of a work-based conflict you were involved in, and how you went about resolving it?" ...
I have a bunch of contesters fort the worst interview.
#1 The Dishonest Ignorant
Me: *asks question*
#1: *stumbles*
Me: It's okay to say that you don't know.
#1: *continues to ramble on without making sense*
Me: Well, okay. That is all. I don't think that this will be a fit.
#2 The fraud
Me: How would you rate your knowledge in object orientated programming?
#2: Very advanced! I am an expert!
Me: Can you state the difference of an interface and an abstract class?
#2: *surprised pikachu-face* Well not that advanced!
#3 The trickster
During a skype call (without video):
Me: *asks question*
#3: *keyboard sounds aclacking*
Me: Are you googling?
#3: No *click clack click a clack* ... and to answer your question: *starts reading from the first search results*
The real bummer is, that in all of these cases, just saying "I don't know" would have been fine. (The "expert" OOP-guy would still have some explaining to do.)
It's not like that our interview process resolves around trick questions or that you'd get kicked out for getting one answer wrong. Though how can I trust somebody not to lie to me on a daily basis if they fake their interview?
We keep the interview relatively basic and rely on real-word coding exercise anyway and it helps us to get an idea on where we would gain support from them and where we need to support them.
As a developer you spend a lot of time learning new stuff anyways.
It blows my mind.
rant
wk170