Introduction
First Interview
They want a Silverlight .Net Architect/Developers/Programmers in Xbox Projects(This job is OK for me becoz I mainly looking for Senior Software Developer/Team Lead/Architect and focused on WPF/Silverlight/Cloud Computing) and Ability to travel is not a requirement, but if staff is interested in travel, there is also the opportunity to work overseas at Microsoft Redmond or the media company's location—California,Stockholm, Hong Kong, Madrid and Mountain View(This is one of the reasons I want to join also).
Second Interview
printed in ascending order.
using System; using System.Collections.Generic; public class Test { public static void Main() { List<Employee> data = new List<Employee>{ new Employee("A",20), new Employee("B",10), new Employee("C",30), new Employee("D",0), new Employee("E",50) }; foreach(var e in data) { Console.WriteLine(e); } } } public class Employee { public string Name; public int Salary; public Employee(string n, int s) { this.Name = n; this.Salary = s; } public override string ToString() { return string.Format("{0}: {1}", this.Name, this.Salary); } }
data.OrderBy( employee => employee.Name ).ToList();
using System; using System.Net; using System.Threading; public class Test { public static void Main() { WebClient wc = new WebClient(); wc.DownloadStringCompleted += (object sender, DownloadStringCompletedEventArgs e) => { Console.WriteLine("Got the following data:"); Console.WriteLine(e.Result); }; Console.WriteLine("Getting data..."); wc.DownloadStringAsync(new Uri("http://checkip.dyndns.com/")); Console.WriteLine("Exiting..."); } }
Please suggest the reason why the output is:
Getting data...
Exiting...
Instead of:
Getting data...
Got the following data:
(File Content)
Exiting...
<Grid x:Name="LoginGrid"> <i:Interaction.Triggers> <ei:DataTrigger Binding="{Binding IsLoggedIn}" Value="true"> <ei:ControlStoryboardAction x:Name="FadeOutOnLogin" Storyboard="{StaticResource LoginFadeOut}"/> </ei:DataTrigger> </i:Interaction.Triggers> </Grid>
The Third Interview
The task is to build a memory game and a server for players' high scores. They do not expect me to know all the required coding technique needed to build the game and noted to me"Please feel free to do research, find reference and learn from the internet". The judging criteria, in descending order, would be quality, delivery time and creativity.
Also I was required to provide detailed instructions on how to set up the game and server, and to develop the application using Silverlight.
The details of the task requirement is in the enclosed package and package up the finished work and return to interviewer.
After the game is finished, the user would be required to input his/her name and email. User's details and the scores would then be submitted to the database and the user would get notified with the highscores and his position in score rankings.
1,The application must be developed with Silverlight.
2,The application must have at least one customized control in Silverlight.
3,The application must have a high score data provider.
4,Developer must provide instructions on how to set up the game and server.
5,The application should be blendable.
6,The application should have sample data, and provider which can be easily switched with the high score date provider.
7,The application should implement Unit Testing wherever applicable.
8,The application should be controllable by only the arrow keys (to navigate) and enter (to select) (except the operations inside the input field)
9,The application should follow the design template illustrated on the last page
10,Highscores server is suggested to be developed in PHP and MySQL
Design
1,The game should entirely fit inside a 720x576 area
2,The game info area is to contain information about the current game session. Current score for instance. Be creative
3,The graphics for the cards and the logotype have been supplied
4, All other graphical elements are up for you to decide upon
5,The restart button should start a new round when selected
6,There has to be a way to signal to the player that the game is over, when all pairs have been found. Ideally, this includes an option to play a new round
Delivery
The implementation of Colour Memory should be delivered in a compressed archive containing all necessary files and resources. Also, an instruction on how to install and start the game is expected.
<Window x:Class="AccedoTestWPFVersion.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:AccedoTestWPFVersion" Title="Knights Warrior Colour Memory" Height="576" Width="720" x:Name="mainwin"> <Window.Resources> <ResourceDictionary Source="MainResources.xaml" /> </Window.Resources> <DockPanel Width="Auto" Height="Auto" LastChildFill="True"> <!--Menu--> <local:Menu x:Name="test" Width="Auto" Height="20" Background="LightGray" DockPanel.Dock="Top"/> <!--Left--> <Grid Height="500" Width="500" Background="Gray" Name="DisplayAllCards"/> <!--Right--> <StackPanel Width="200" Height="500" Background="Gray"> <Image Margin="5,5,5,5" Width="200" Height="80" x:Name="imgLogo"/> <DataGrid Name="dgRanking" AutoGenerateColumns="False" Height="250"> <DataGrid.Columns> <DataGridTextColumn Header="AppID" Width="60" Binding="{Binding AppID}"/> <DataGridTextColumn Header="Name" Width="90" Binding="{Binding Name}"/> <DataGridTextColumn Header="Score" Width="40" Binding="{Binding Score}"/> </DataGrid.Columns> </DataGrid> <Viewbox Stretch="Uniform"> <StackPanel Margin="0,0,0,0" Background="White" Orientation="Horizontal"> <Label Content="Current Score:"></Label> <Label x:Name="lblScore" Content="{Binding ElementName=mainwin, Path=DPScore}" Width="61"></Label> </StackPanel> </Viewbox> <Button Margin="10,30,10,10" Name="btnReStart" Style="{StaticResource DigitBtn}" Content="ReStart" Command="{Binding Path=ReStartCommand}" FontSize="24" /> </StackPanel> </DockPanel> </Window>
1: //This is the data for Ranking datagrid
2: private ObservableCollection<User> _UserDataList;
3: public ObservableCollection<User> UserDataList
4: {
5: get { return this._UserDataList; }
6: set
7: {
8: this._UserDataList = value;
9: }
10: }
11:
12: //DPScore is for current score
13: public int DPScore
14: {
15: get { return (int)GetValue(dpScore.DependencyProperty); }
16: }
17:
18: private static readonly DependencyPropertyKey dpScore =
19: DependencyProperty.RegisterReadOnly("DPScore",
20: typeof(int),
21: typeof(MainWindow),
22: new PropertyMetadata(0));
23:
24:
25: private object ShowImageCard(int imgType)
26: {
27: switch (imgType)
28: {
29: case 1:
30: return GetCardBg("colour1");
31: case 2:
32: return GetCardBg("colour2");
33: case 3:
34: return GetCardBg("colour3");
35: case 4:
36: return GetCardBg("colour4");
37: case 5:
38: return GetCardBg("colour5");
39: case 6:
40: return GetCardBg("colour6");
41: case 7:
42: return GetCardBg("colour7");
43: case 8:
44: return GetCardBg("colour8");
45: default:
46: return imgType;
47: }
48: }
49:
50: private void ShowAllCardsUI(Grid Grid)
51: {
52: Grid.Children.Clear();
53: Grid.ColumnDefinitions.Clear();
54: Grid.RowDefinitions.Clear();
55: // Generating 4x4 Grid
56: for (int Index = 0; Index <= 3; Index++)
57: {
58: Grid.RowDefinitions.Add(new RowDefinition());
59: Grid.ColumnDefinitions.Add(new ColumnDefinition());
60: }
61:
62: // Generating 4x4 Cards
63: for (int i = 0; i <= 3; i++)
64: {
65: for (int j = 0; j <= 3; j++)
66: {
67: Add(Grid, i, j);
68: }
69: }
70: }
71:
72: private List<int> Random(int Start, int Finish, int Total)
73: {
74: int _number;
75: List<int> _numbers = new List<int>();
76: // Total Numbers
77: while (_numbers.Count < Total)
78: {
79: long tick = DateTime.Now.Ticks;
80: Random r = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
81:
82: _number = (r.Next(Finish)) + Start;
83: // Between Start - Finish
84: // If Chosen or None
85: if (!_numbers.Contains(_number) | _numbers.Count < 1)
86: {
87: _numbers.Add(_number);
88: // Add Number
89: }
90: }
91: return _numbers;
92: }
93:
94: private void GenerateAllCards()
95: {
96: List<int> valuesList = new List<int>();
97: List<int> indicesList = new List<int>();
98:
99: int intCounter = 0;
100: // Get 16 Numbers (2x8)
101: while (valuesList.Count < 17)
102: {
103: List<int> numbersList = Random(1, 8, 8);
104: // Random 1 - 8
105: for (int intNumber = 0; intNumber <= 7; intNumber++)
106: {
107: valuesList.Add(numbersList[intNumber]);
108: // Add to Cards
109: }
110: }
111: indicesList = Random(1, 16, 16);
112: // Random 1 - 16
113: // Board Columns
114: for (int Column = 0; Column <= 3; Column++)
115: {
116: // Board Rows
117: for (int Row = 0; Row <= 3; Row++)
118: {
119: gridBoard[Column, Row] = valuesList[indicesList[intCounter] - 1];
120: intCounter += 1;
121: }
122: }
123: }
Summary
2,What responsibilities did you like most and least in your last job? Why?
3,Give me a specific example when you faced a particularly difficult problem? What steps did you take to resolve it?
4,What characteristics do you feel distinguish a great software engineer? Give me an example in your past which you feel demonstrates those qualities in you.
5,Describe one example where your actions led to improved quality of your organisation’s product or service.
6,What do you feel is the most effective way to keep up to date with latest technologies? Why?
7,What do you see yourself doing five years from now?
8,What makes you stand out / why should we hire you?
2. What is XAML?
3. What is Dispatcher Object?
4. What is Dependency Object?
5. What is the architecture of WPF/Silverlight ?
6. What are Types of Events and Event Routing or a Routed Event?
7. What is difference between Event Bubbling Vs Event Tunneling? When to apply what?
8. What are difference Win-Forms,WPF, ASP.NET, ASP.NET, ASP.NET MVC, Silverlight ?When to choose what?
9. What are different types of Panels in WPF/Silverlight ? Explain them?
10. What is difference between StackPanel, DockPanel, WrapPanel and Grid?
11. What are Primitive Controls and Look Less Controls?
12. What are different important components to know in WPF/Silverlight ? Explain them?
13. Why do you think WPF/Silverlight has more power?
14. How did you use Dependency Object?Purpose of Freezables?Visual vs Logical tree?
15. Example of attached behavior?
16. What is MVC,MVP,MVVM? Did you use PRISM ? What are its advantages of using it in real time applications?
16. If you used MVVM, How to allows view to communicate LifeCycle events to a ViewModel without any hard reference links?
17. If you used MVVM, Why you use attached behaviours,How to do Numeric text entry?
18. If you used MVVM, How to allows the ViewModel to determine if a Models data should be editable?
19. If you used MVVM, How to show MessageBox service,Popup window service?
20. If you used MVVM, How would you trigger a storyboard from a viewmodel?
21. WPF/Silverlight Performance tuning