Acki wrote:LOL, yeah, I think this was ment to test for Karnaugh-Veitch knowledge !!!
As I mentioned it's developers standard knowledge !!!
More accurately is that it is taught as part of a standard computer science degree program but is never used in the real world outside of academia (unless you are making compiler software).
As mentioned readability and correctness are vastly more important.
Never solve a performance problem until you actually have a performance problem.
If you really need to increase an applications performance you would do better minimizing hard disk/Network/Database reads and writes.
When I look to hire a programmer I have a list of questions I use to see if they are "exaggerating" their number of years of experience. They are not the perfect set of questions but I have found that they quickly help me identify people that "claim" to be an experienced programmer but actually have "NO" real world experience.
Questions
These are concept questions, exact syntax is not required.
1.
float fNum = 1.79;
int iNum = 0;
iNum = (int) fNum;
What is the value of iNum?
2. Make a GUI Window on the screen with C++ in any manner you want. (Not a console app)
3. How would you iterate through a collection in C++?
4. How would you iterate through a collection in C#?
5. Name a control that you could use to display data on an ASP.NET 2.0 web application page.
6. Write an SQL statement that would list all the records from a table named TableA.
7. In C++ from inside a function how would you change the Title of a window?
8. There are 2 tables, TableA and TableB with the following structure:
TableA
TableAID |autonumber|
Field1 |…|
Field2 |…|
… |…|
TableB
TableBID |autonumber|
TableAID |long|
Write an SQL statement that would list all the records in TableA that don’t have a match in TableB.
9. In a VB6 or VBA function how would you trap an error?
10. In C++ how would you trap an error?
11. In C# how would you trap an error?
12. In a multithread GUI application written in MFC how do you send a message from the worker thread to the main process thread?
13. When using the ADO com control that comes with Windows XP what is the data type returned from a fields get item method call?
14. In a C# .NET Web Application how would you make some type of variable accessible to multiple pages (For example: username and password).
15. You have a Default.aspx that prompts for a login and after a successful login it takes the user to main.aspx which displays data. Describe how you would prevent a user from bypassing Default.aspx by manually typing main.aspx into the address bar.
16. On a web form you have a textbox where the user can type the first few letters of a person’s last name and then the GridView will display all the people whose last name begin with the search string.
a. How would you make sure the user types at least 3 letters?
b. What do you add to the string the user typed before submitting it as part of an SQL query?
c. How would you prevent a user from harvesting the entire database with injection?