Monday, February 28, 2011

Context menu in Silverlight

Hi all.

Few months ago I was trying to find a standard way to implement a context menu, but could find no solution which I liked. So finally decided to write something from scratch.
I will not go down into the details here, just will give the idea here.
So first of all I thought, that the menu can contain several kind of items:
1. Items, which are system(application) wide, and you will have them in your entire application, anywhere you'd click. The "About" menu item appears under this case.
2. Items, which are based on the control type, which on the user clicks the right mouse button: these can be buttons, textboxes, anything derieved from Control. Into this point I have added the Cut, Copy, Paste items for textboxes.
3. Items, bound to exact controls - concrete instances. In this case, only when you click on the specified instances, the items should appear there in the menu.

The implementation is quite simple, so I will not include any code here. But if you'll need just write me, and I will be happy to help.

So, this is all.

Sunday, February 13, 2011

The interview I failed

It was in march 2008- in early march. I was in an interview process for Microsoft Ireland. Also, the same time, I was looking for a local job in Yerevan for the case I fail. But seems I wasn't ready for a failure. Anyway - the last stage of the interview to Microsoft passed. I was now expecting the results. The day after was the day I had to complete the task I've been given as part of the interview process for a position in CQG (Yerevan). I was not ablt to work on the task as good. So the next day - and the last tet-a-tet interview started.
Question from the interviewer:
-What is a thread?
-(I was silent. Had nothing in my mind to tell them. Was absolutely empty minded and was just trying to say something but ... I was not able to.)
-What is a process ?
-(Again the same)
-How would you make the program you've sent, to run better for multicore processors?

Started reviewing the code I sent them:
-Why you wrote this part in this way?
-I really don't know, cause it is much better to write it in [telling which exactly] way.
-Strange, you know the correct answer, but you have written in not the best way here.

Here was the influence of the Microsoft on me. I was expecting the results... and was packing all my things to relocate.

This was my only interview in Armenia, which I failed. And that was so silly.

This is all I'd like to share in this post. And the lesson learnt was: always, when going to an interview, leave aside any kind of excitement - concentrate, and win.

Friday, February 11, 2011

Windows Phone 7 development

Hi all.

Few months ago Microsoft has announced about its new mobile platform: Windows Phone 7. And here the pursuit started. Thousands of developers started looking into it to develop something new.
The same way I did. Decided to start from scratch a month ago - to develop a simple Tetris game. First I've investigated the market - there were several such games, but all had very small playground, which was not user friendly (by me). So the core of my idea was to make the playground as much, as the phone screen is.
Microsoft did really good job by creating a lot of restrictions for the apps, which you are going to expose on the marketplace. There is a big doc of guideance you have to follow.
After few days of development, when I had the game skeleton ready, I've started investigating the way to publish it. First I had to register withing the AppHub( this costs 99$). After the registration (which is not available for any country) I had to wait two weeks to be validated. One of those validation points being handled by GeoTrust (a partner company responsible for registrant validation), and this was the longest part to wait for.
Registration is done, and the only step left is to wait until Microsoft verifies your application. This stage took them only a day. And finally, my app is on the marketplace. This is the start, and it was really easy. So I will continue my app development for WP7 - for a great mobile platform.