Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
A very open question. I've been programming in C# for the
past 5 months doing small projects that I completed
successfully.
Today I went to an interview for a C# role. The 1st question
was 'Tell me about boxing'. Given my experience I had no
idea what the guy meant. Needless to say the interview
didn't go that well. Others questions were 'why isn't it
recommended to use an ArrayList of int', 'tell me what you
know about threading', etc.
I don't really want this to happen again so I'm planning to
spend some time reading (and practising) more on C#. I
understand that the best way of learning is by coding but
coding wouldn't have really helped me answer the question
about 'boxing' for example.
I'm not asking you to answer the above technical questions.
In fact, I know now their answer as I went straight to
Google after the interview and it's how I realised that my
C# knowledge is somewhat limited.
My question is: in your opinion, which knowledge should any
C# developer have? Ideally it would be better if you could
categorize it (Basic knowledge anyone should have without
exception, Advanced knowledge, Expert knowledge etc). No need
to go into details. Doing research on whatever you list will
be a good exercise for me.
I would expect someone going for a professional C# job to know about:
Generics and generic collections
Interfaces (general)
Interfaces (specific), namely -
IDisposable: how it's integrated into the language and why
IEnumerable: including common extension methods, iterator blocks, and deferred execution
Overview of serialization in .Net (maybe not have done it, but understand what it is and know where to look in the namespace heirarchy and documentation)
Overview of Xml in .Net (same as serialization)
Overview of threading concepts (same as xml/serialization). Bonus points for understanding why most thread-safe collections aren't.
Have used anonymous delegates / lambdas in at least one project, and therefore also have a basic idea about closures.
Comfortable explaining some basic concepts from at least one of winforms, wpf, webforms, or MVC
Be able to answer some easy questions on specific common classes in the .Net BCL: namely from System.Data (think parameterized queries!) and System.IO (filestreams, path).
Garbage collection: when should you call GC.Collect (hint: pretty much never) and why
Here is a good list: What Great .NET Developers Ought To Know.
My personal experience from a long time ago when I was in school.
I went to see my father at work in a bank. At that time, most of his day was taking care of accounts and making sure every thing worked. What I saw was he was trying to tally/calculate large numbers and calculating(basic additions/multiplications...).
After noticing him, I asked him: Dad, if all you have to do is basic additions and multiplications, why bother to study till graduation?
His response was : While you don't have to use all the knowledge you have acquired, that knowledge would help you make learned decisions.
Coming to your question: While you dont have to use the entire set of concepts, knowing that they exist would help you make good decisions while you code.
My suggestion along with the others posted would be to try and spend some time on stackoverflow every day.
Good luck.
A good interviewer isn't going to grill you on trivia. That's why we have Google. A good interviewer is going to find areas you don't know, and ask you questions there, as that's the best place to find out how you react when confronted with something you don't have down pat.
The best advice I can give for interviews is to not worry about the technical trivia too much. Instead, in an interview, focus on problem-solving skills. If you don't know something, don't try to hide it, just admit it. If you think you know, it's okay to say "I'm not sure, but I think it's this." And don't get flummoxed either - at that point, usually the interviewer will give you a hint. This is not just giving you the answer, it's another part of the test - to see if, given a nudge in the right direction, you can extrapolate from there.
For the boxing/ArrayList/int questions, if I was interviewing and you didn't understand boxing, I'd give you a basic description of what boxing did. Then I'd ask you, knowing what I just told you, why you might think using ints in an ArrayList might be a bad idea.
One thing that will go far in any interview is focusing on the requirements, the desired result, and boundary conditions or edge cases. As most programming interview questions fall into the "write this method" category, make sure you get the following correct:
1) The inputs to the method
2) The expected output of the method
3) Boundary and edge cases.
This sounds ridiculously basic, but it's amazing how many developers, even ones with experience, don't bother thinking through these things. Code solves a problem - if you don't understand the problem correctly, you can't solve it correctly.
I would have to say that if an interviewer can be fooled into thinking someone has more .NET / C# experience by he or she visiting a webpage, then the interviewer is failing. I've interviewed a number of people myself, and I really like the approach of giving them some easy to understand problem to solve, and asking them to write some code on a white board. Even if they've memorized the answers to every question on Scott Hanselman's blog, I would learn a lot about how comfortable they are in the language, as well as how they go about problem solving. I'm looking for a developer, not a partner for Trivial Pursuit, .NET Developer Edition.
That said, keeping up with blogs like Hanselman's is a fantastic way to keep up with the jargon. You could code C# in a vacuum for years, fully understand the advantage of a strongly-typed List<int> over ArrayList, but never actually use the term "boxing". But it's much more time consuming in an interview to ask, "Describe the advantage of iterating through a List<int> instead of an ArrayList of int," than it is to ask, "Tell me about boxing." Plus, actually researching the answers to Hanselman's .NET interview questions (especially if you explore the details and ask "Why?") will make you a better developer. So by all means, keeping reading Hanselman.
And one more note... If I ask someone whether a String is a reference type or a value type, and they simply say "Hmmm... Reference type," I'm not going to be nearly as happy as I would if the response was, "Hmmm... Reference type, but that's an interesting question." "Why is that?", I say... "Because string is implemented so that the string is immutable, allowing you to do things with it like safely use it as a hash key. Or pass it to a method, knowing the value cannot be changed. So in a way, strings can act a lot like value types..." And that would be a great conversation, leading me to ask, "So tell me more about why hash keys should be immutable..."
It's not just the difference between answering a 50/50 question correctly and all the additional information in the second answer. Having an intelligent conversation with a interviewee leads me to think I'll have intelligent conversations like that on a regular basis once the interviewee becomes my coworker. And that's something I'm definitely looking for.
Also depends on the role. If this was advertised as a jnr role then a threading question is a little tough...sometimes agencies/employers have unrealistic expectations.
A similar thing happened to my significant other taking a driving test. The state trooper said, "make a roundabout" and she didn't know what he was talking about. Both of us think a roundabout is a type of road layout with a big circle, not a u-turn as the instructor meant. So I know what you mean.
Programming job interviews vary wildly. Some people think you can't really judge a programmer well in an interview and are willing to give anyone who makes a good impression a chance. Others are grueling things which only those overqualified for the position would pass, and you will probably be suprised how often you get a call back from those.
This is something I have been pondering myself a lot lately. Using C# plenty but not sure what I am missing.
I ordered
Microsoft® .NET Framework Application Development Foundation
Which covers a lot of ground related to C#
Also looking at C# in Depth
Read some of this already. Has some great information from a high quality author.
In depth is on sale too via Jon Skeet's blog
Related
ORGINAL SPEAL
Ok so im kind of in a pickle and maybe I can get some clarification and advice here. Im not much familiar with C# but I have done something similar in a Groovy/Grails web application.
So my issue. I have two objects. One is a Shipper(holds basic info on a shipping company). The other is a Vehicle object(Holds information about shipping vehicles). Now a Shipper can have numbers types of shipping vehicles. These are going to be populated in a local sql database in visual studio 2010. I was going to put all this information into one shipper object and one shipper table. Instead I am going the route of making the two different objects. My issue is bringing them back together from the db and linking them into one joined object. What I have done in a Groovy/Grails web application (with help) was Map two objects, A user and a role which came from 2 different tables, together off an id (I'm don't know if I fully understand this but I'm working with it - There was a lot of hand holding)
So in C#. I was looking at mapping and I'm not sure if this is needed or how to go about it. Taking Shipper + Vehicle and making a Shipper/Vehicle object. My lack of understanding in the subject I think makes these seem really trivial.
Or would this be something that I would need an collection for? Making a collection of these two objects.
So maybe a clarification on the two when it comes to C# or at least a Simplified explanation of the two and maybe some basic implementations of each.
I don't need anything too extensive. Im having some crazy coders block on this one for some reason (Might be the copious amounts of red bull and coffee).
Again I lack a lot of knowledge on these datatypes and c# in general.
Ill be monitoring this and updating as I personally progress or more questions/flaming arise. I just need opinions and help to get past this blocker.
EDIT/NEW SPEAL
Ok. So since I don't even know where to start. And given the information above.
I do not understand the difference between Collections and Mapping in C#(or any language at that matter) even after looking up the two. They seem similar to me.
so NEW QUESTION: In this situation, would you use a Map or a Collection. A "Why" would be nice but not needed I guess if thats asking too much.
If I can get that answered then I will be happen and try to go figure it out. I just don't wanna go down a rabbit hole that went the wrong way. I understand the hate of asking a question without showing what iv done. But I have not got that far because of this underlying question. Sorry for the "ignorance" but I would really like to understand which path to at least start down in this situation. I wasn't asking for "hey code this for me". Examples would surely help but a decent explanation would of been nice at least. But I guess ill just ask a yes/no, do this/that question and Ill take it from there.
-Sorry?
I'm in the middle of learning my C#, so I don't understand what you mean by the Map datastructure. Here's a very informative site regarding collections that will tell you about how to use each datastructure:
http://csharp.net-informations.com/collection/csharp-collection-tutorial.htm
If I knew what you mean by Map, I might be able to help you further.
I'm giving a demo and instroduction of Visual Studio, C# and WPF to C++ on Linux developers that will be soon coding in C#. My plan is to go over a demo application that explains some basics in C#/WPF and an overview of some of the VS options.
Does anyone have any suggestions on conducting the demo?
Any good websites that can help with overviews?
Suggestions:
Keep the mood light and easy. They are probably already in bad mood after being told to throw away a good part of their skills and learn a completely different way in order to keep their job.
I really hope you are also a c++/linux developer. You'll need to relate to them somehow. If not, consider letting someone else give this intro. If they start complaining in the demo you'll have to know how to bring them back inline.
Make sure your demo shows something of real value to them. For example, "I know you guys solve problem X this way, but with WPF/C# that problem is so much easier because..."
The whole thing better be relevant to the fundamental reason why they are being forced to switch. Cover this, in detail. Make sure you answer their questions completely. Be prepared to have your demo derailed by questions. This could be a Good Thing(TM) as it would hopefully show real engagment.. as long as you keep it positive.
Make sure that you have ZERO flaws in your presentation. Any will be ripped apart, made to appear bigger than it is, and subsequently used as a reason why they shouldn't switch.
Under no circumstance should you argue with any of them. See suggestion #1.
Consider enlisting one of "them" to help put the demo together. Let that person guide some of the covered topics. This goes a long way towards good will; which you'll need in spades.
I'm making a big assumption that they weren't the ones who drove the decision to switch. Given the target, it's probably a safe assumption but feel free to correct me if I'm wrong.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
We're hiring a .NET developer soon, and I was assigned to create a test, which would take aprox: 1h to solve. A test which would test the programmers knowledge in (mainly) C# and ASP.NET.
This is what i've come up with so far:
Use project #1 to read data(HTML) from the specified URL and output all links(anchors) containing anchor name “xxxxxxxxx”. You are free to use 3rd party libraries. My main thought here was to test how the developer would go about solving the problem. For example:
Create a regex which would parse all the data needed.
Create a DOM-tree and use XPATH to find all anchor nodes.
Iterate the whole string and perform manual string compares.
Create a new solution where you demonstrate the usage of .NET masterpages.
Connect the solution to the ******** database. And output all customers from the “********_customers” table.
Create a new button which refreshes all users using AJAX.
Pretty basic stuff. Though, I also added the one below. Mainly to test the developers OO knowledge. Do you think this is too "overkill", or what kind of test would you suggest? If you were to hire a ASP.NET developer, what would your main focus be? ADO.NET? IO? string handling?
Create an interface/abstract class implementation demonstrating the functionallity of either the Factory, Factory Method, Command or Decorator pattern. You wont need to implement any functionallity, just use comments in your abstract class.
Thanks in advance!
The task you gave is essentially a day or two worth of coding if you want to have reasonably readable code. Within an hour I guess I would do it, but you'd have to read code that has cryptically named methods, unreadable regexes, weird callbacks, no error handling and overall is pretty darn ugly. Looking at it you would not hire me.
Before you give your question to candidates, first make sure that your peers/programmers can do it first. And that you can code it in less than 60 minutes in a way that would satisfy you.
That said, I do not know if test is the best choice for hiring anyone. A few interviewing bloggers wrote about their experience coming from conducting tons of interviews:
Guerilla Guide to Interviewing by Joel Spolksy
Truth about interviewing, Get that job at Google (and many others) by Steve Yegge
I totally agree with them. Having conducted about a gazillion of interviews myself, I find that asking basic technology related questions is not nearly as good as asking to implement a bit of recursion or pointers (if someone claims to know C/C++).
By hiring someone who understands recursion/algorithms you get a smart guy who can learn new technology. When you hire someone who knows how to connect to a database, who knows how to connect to a database but not necessarily qualified to do much more than that.
There are a few sources of good programming questions that are somewhere between coding and algorithms that may inspire you. They do not test .NET at all, but are very good indicator of smart programmers.
Top Coder
Google Code jam
Within 1 hour you can only test his programming skills, but it's not enough to write the code sample.
Take a look at this C# / ASP.NET MVC test:
http://tests4geeks.com/test/asp-net-mvc-c-sharp
After the applicant will pass the test and result will be good, then invite him to the interview and talk about his experience. Ask about most difficult features, that he implemented in his projects. In other words, you must understand, if he know and can do enough to take part in your project.
If you still want to ask him to write some code. That is some idea:
There are the students and subjects. Please ask to write 3 pages (asp .net mvc or web-forms). First and second - for editing the dictionary of students and subjects. Third form must contain be the table. The students are in left column. The subjects are in the top row. The marks are at the intersection. Each mark can be edited (text box) and saved. Saving could be implemented by clicking the common button "Save". Or it could save each cell automatically using the Ajax.
This is very simple example, but it would show you how user writes the code, what techniques does he use.
I would have thought that it would be better to simply create a test that would make it easy for you to put developers into different 'skill buckets'.
Why not have three or four sections or features that the developer must 'layer' features on top one another to show their programming and design skills.
Part 1: Implement x easy difficulty
features.
Part 2: Implement x medium difficulty
features.
Part 3: Implement x difficult
features.
Part 4: Implement x very difficult features.
And give the developer 1 hour to write the application. Make it realistic that they can implement the features in the given time frame.
As Joel and Jeff say on the Stackoverflow podcast, there is a direct correlation between developer skill and speed.
Think about the way exams are structured? We can all get 100% of the questions correct in any exam we sit if we had infinite time, but in 1 hour?
This way, If a developer takes your test and only implements features up to Section 2 in the time period, then you should have a safe indication that they are not suitable for the job. Section 3 features all done then they are good enough and section 4 complete would indicate that they are very experienced and a slight cut above the rest.
However I would also look at the overall polish that the developer has given to the code. If they implemented all features up to section 4, but poorly, then they are also not going to be someone you want. IF a developer only did up to section 3 but implemented everything very elegantly, then I would want to hire them.
I also think that 1 hour is perhaps a little too long. I would aim for 10-40 minutes obviously you may need to cut out section 4 that I proposed.
You should check
GeekInterview -- a good source for interview questions
There are hundreds of questions.
I think you would be much better off coming up with a single question that will allow you to see more than just development skills using your target technologies. Strong problem solving skills are as important as expertise in a specific technology stack.
I would even recommend that you explore the two aspects of a candidate in different parts of the process. I usually ask a bunch of questions about the technology stack we are using on our project to gauge the candidates level of knowledge as it relates to that stack.
Then I ask them a pure problem solving question and I allow them to use whichever technology they are most comfortable with to solve the problem (their choice of technology can be an important indicator).
I particularly like Graph Theory related problems. The candidates solutions will tell you a ton about how they approach, solve problems as well as how they validate their solutions.
As part of the problem solving portion of the interview you should be looking for:
Proper data structure design
Implementation of OO best practices
Proper solution (can they debug problems effectively... one great way to see this is do not allow them to use a computer, make them code on a whiteboard and debug in their heads)
Proper solution validation (do they come up with test cases)
My 2 cents:
We have a programming test in my company that is easy. Basically, you have to implement the listener pattern extending the ArrayList class, create unit tests for it (based on at least what we require), document the corner cases, document the program itself if you want to, and then send the test back to us.
A developer has 48 hours to complete that test. We ask for production quality in the test. We want to test the following items:
Was the developer smart enough to cover the corner cases?
Is the developer implementation of multi-threading satisfactory?
Are the unit tests good enough? Do they cover enough cases?
Is the code well written and documented? Will someone be able to maintain that code in the future?
Does he care about his code? Did he explain why he did "A" and not "B"?
I don't think short tests are capable of evaluating a developer. You may ask for a tool or technology that someone have not been using in the past months, and whoever is being tested for that technology will need sometime to get up to speed - but if a developer was working with that the day before, he will know by memory how to use it, and he/ she will seem smarter than the other developer, what may not be true.
But if you ask for something that is tricky and you are interviewing the developer, you can check how he is going to solve the problem - I don't think it really matters if he/ she cannot get the 100% right answer, as long as he/ she can talk about the problems that you found on the code and show that they actually understand whatever you explained to them.
In the past we have used problems from Google code jam. the problems in the early rounds are easier and they get gradually harder. They are kind of algorithmic in nature, you can solve them in whatever language you like. As they get harder there is often an obvious 'brute force' kind of answer that won't work because of the size of the data. So you have to think of something more optimal.
The first test you suggested should take 10min-40min for a basic dev - I would use a web-crawler I have in my library that converts HTML to XML then easily use Linq to XML.
I would test for lambda expressions, performance patterns maintain files, or writing an object to several files dynamically.
Maybe you would like to test unmanged code, pointers etc.
I donno, im just writing-jabbering while things are comin up to my mind, i wrote things that was hard for me to implement.
few days ago I was invited to pass C# programming test at skillbox website there was 30 questions quiz and 45 time to pass it. Below is some of them:
1) What will be printed by running the program?
#if DEBUG
Console.WriteLine("DEBUG");
#else
Console.WriteLine("RELEASE");
#endif
2) What will be the result of calling SomeMethod():
public static void SomeMethod()
{
string s1 = "a";
string s2 = "b";
Swap(ref s1, ref s2);
Console.WriteLine(s1);
Console.WriteLine(s2);
}
public static void Swap(ref Object a, ref Object b)
{
Object t = b;
b = a;
a = t;
}
Here is a link for reference, I think you can find more C# quezzes there http://skillbox.io
Today I found out about an interface I'd never heard of before: IGrouping
IEnumerable<IGrouping<YourCategory, YourDataItem>>
I am fortunate to have access to some of the best programming books available, but seldom do I come across these kinds of gems in those books. Blogs and podcasts work, but that approach is somewhat scattershot. Is there a better way to learn these things, or do I need to sift through the entire MSDN library to discover them?
Eric Lippert's blog. The real guts of C# - why there are some limitations which might seem arbitrary at first sight, how design decisions are made, etc.
Alternatively, for more variety, look at the Visual C# Developer Center - there's a whole range of blogs and articles there.
Oh, and read the C# spec. No, I mean it - some bits can be hard to wade through (I'm looking at you, generic type inference!) but there's some very interesting stuff in there.
The best place to start is Jon Skeet's C# Coding blog: http://msmvps.com/blogs/jon_skeet/
He regularly covers stuff you won't see anywhere else.
How about the Hidden Features series of questions?
Hidden Features of C#
Hidden Features of ASP.NET
And many more...
I personally like the way of discovering hidden features on my own while solving a specific problem. In the end, a hidden feature that you never needed to get something done is of questionable value. It just adds clutter to the brain.
The way to do it is to use the MSDN library to look things up. Then take a little time to look around what you found.
That's especially important with the pure API documentation. For instance, I just browsed to http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.aspx (note how that URL is formed). When I look in the Contents pane on the left, I see everything from XmlDocument (and XmlDocumentFragment) all the way down to XmlReader. In the middle are some things I rarely or never use, like XmlNamespaceScope and XmlNodeOrder.
From time to time, spend a little time on "abstract knowledge". Sometimes, it's good to look up from the trees to learn your way around the forest. You never know when you'll need something you've learned to get you out of the woods.
For the people who don't know IGrouping:
http://msdn.microsoft.com/en-us/library/bb344977.aspx
I often read useful stuff on the Viual Studio Startup page and start clicking around to other keywords/areas. Not too promote StackOverflow too much, but you'll find some hidden gems here as well, simply by looking at how other people write code.
For example:
Hidden Features of C#?
This question already has answers here:
Questions every good .NET developer should be able to answer? [closed]
(25 answers)
Closed 2 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
Sure, we all have written tons of C# code. So walking into an interview for a .NET job should be a no-brainer, right? And then you read some stackoverflow posts and it hits you: You don't know squat!
Remember that site with the cram sessions to go through, before taking an exam? I think stackoverflow could be used to make a sorted (voting) list of topics to know about.
Please only put one topic per post.
Please also add some information about the topic. Links, reference material etc.
EDIT: I guess some of you misunderstood the reason for the post - I'm hoping to generate a list of stuff to know about .NET, a sort of cram session that can be reviewed by everyone on the planet to regularly review. This should help us all remember arcane stuff we never really use.
They are likely going to ask you questions that are based more on Object Oriented Design and Programming more than questions that are explicitly geared towards C#. So if you can explain abstraction, polymorphism, interfaces, etc. You should be good to go.
Reference vs value types.
Know your delegates. Every .Net interview I've been on has asked me about delegates. Know why they exist, know how to declare them, and how to consume them, understand what multicast delegate is. Understand how to use a multicast delegate when one of the handlers throws an exception. Know what the compiler does with a delegate. Understand how delegates can give you "automatic" asynchronous APIs. Get familiar with the newer more convenient generic delegates - Action and Func.
Bonus: delegates vs events. What are the differences? When would you use one over the other?
Generics.
(also - don't try to cram and pass yourself off as an expert on something. A good interviewer will figure that out very, very quickly.)
I don't see how this question is valuable to your situation. The result of this question is going to be 30 posts listing features of the C# language.
I think you need to refine your question by giving us a hint about what type of job you are applying for. Or your skill set level or what areas your familiar with. Otherwise this post won't really contain a valuable answer.
EDIT
[OP] That (30 posts listing features of the C# language) is precisely what I am after
Then I suggest the C# language spec. http://msdn.microsoft.com/en-us/vcsharp/aa336809.aspx
ScottHa has two great lists of interview questions:
ASP.NET Interview Questions
What Great .NET Developers Ought To Know
Reflection. and the power of custom attributes in reflection.
Stack vs Heap: What goes where, what caused a StackOverflowException and what causes an OutOfMemoryException.
Generics, why generic lists are prefered rather then arraylist or hashtable. Performance issues and strongly typed added by the way.
Bonus: benefits of generic non-collection types. Why would one use these? How?
I hope the job interview is about coding itself. c# is just a syntax of programming. To be sure read about some specific C# things like reference vs value types
I'd start by looking at the latest c# enhancements. Also, it really depends on what type of job it is as there are a lot of things an ASP.Net developer won't know about Winforms and vice versa.
Assuming asp.net, I've been asked the following in interviews over the past 18 months:
Page Life Cycle
Generics
Interfaces / basic OO design
SQL; e.g. joins, updates, inserts,
etc. Also, how to use DataReader and
sqlcommand.
LINQ syntax; not because anyone is really using this, rather because they read about it.
Web Services ( asmx and wcf )
basic html / css
Session strategies for single server
/ load balanced
Differences between gridview,
repeater, etc.
What I've found is that most .net "web" dev's don't know diddly about sql or html. If you can prove you know more than just how to "drag and drop" controls on a web form then you're already better than 90% of the guys you'll run into.
If you've been writing code in one discipline (.NET in this case) that long, you should have a pretty standard answer to the technical questions that you don't know:
Q: So, what do you know about [technobabble]
A: Well, I haven't used that particular aspect in my previous projects, however, I have a small Volkswagen full of on-line resources that I check for answers like that. In other words, if I don't know it, I know where I can learn about it.
Optional addendum: "And here's an example of me dooing just that when I had a project that required [technobabble-2]..."
You know, if you just plummet through the ECMA-334 specification you should be all set. That's the language... but in away, you'll still be limited by your knowledge of the framework and that's experience. Hard earned experience.
OOPS Concepts
ADO.NET
Session mgmt and Caching
SQL Server distributed transactions
management
New features in .NET 2.0