A new start… again

 Oct 19th, 2011 

 , ,

It’s been a while since my last post. I believe that this was the longest inactivity period of this blog. However, there is a good reason why there were no posts – I was in vacation and then I did a big change in my life. The vacation was great but this post is about the change.

I started a new job at Microsoft in the United States. I am now working with the X++ compiler team. In case you haven’t heard of X++, you should know that X++ is the programming language that allows developers to extend Dynamics AX so that it matches their needs and business.

Also, I now live in the Seattle area. One of the most famous attraction in the area is the Space Needle, therefore I included a picture of the top platform of the tower. I took the picture on Saturday when the weather was sunny – it was one of the two sunny days that we had in the last three since I arrived here.

First video of Windows 8

 Jun 2nd, 2011 

 , , ,

Today is a big day. Except the fact that we have a day off in Denmark because of some national holiday, Microsoft revealed the first video of the next generation of Windows.

The video includes (quote from the press release):

  • Fast launching of apps from a tile-based Start screen, which replaces the Windows Start menu with a customizable, scalable full-screen view of apps.
  • Live tiles with notifications, showing always up-to-date information from your apps.
  • Fluid, natural switching between running apps.
  • Convenient ability to snap and resize an app to the side of the screen, so you can really multitask using the capabilities of Windows.
  • Web-connected and Web-powered apps built using HTML5 and JavaScript that have access to the full power of the PC.
  • Fully touch-optimized browsing, with all the power of hardware-accelerated Internet Explorer 10.

I don’t think any more details are necessary. Just enjoy the video:

The read the press release.

Dynamic tests with mstest and T4

 Mar 5th, 2011 

 , , , , , ,

If you used mstest and NUnit you might be aware of the fact that the former doesn’t support dynamic, data driven test cases. For example, the following scenario cannot be achieved with the out-of-box mstest: given a dataset, create distinct test cases for each entry in it, using a predefined generic test case.

The best result that can be achieved using mstest is a single testcase that will iterate through the dataset. There is one disadvantage: if the test fails for one entry in the dataset, the whole test case fails.

So, in order to overcome the previously mentioned limitation, I decided to create a text template that will generate the test cases for me. As an example, I will write some tests for an integer multiplication function that has 2 bugs in it:

public int Multiply(int a, int b)
{
    //This conditions are simulating the 2 bugs
    if (a == 0 && b == 1)
        return 100;
    if (a == 1 && b == 0)
        return -100;
    return a * b;
}

The classical approach (no dynamic test)

Without using any ‘hacks’, one could write the tests for the Multiply function in the following way:

//Tuple description <value of param a, value of param b, expected result>
private static readonly Tuple<int, int, int>[] TestData = new Tuple<int, int, int>[]{
    new Tuple<int, int, int>(0,0,0),
    new Tuple<int, int, int>(2,3,6),
    new Tuple<int, int, int>(1,0,0), //These will trigger one of the bugs
    new Tuple<int, int, int>(-2,-3,6),
    new Tuple<int, int, int>(0,1,0) //These will trigger one of the bugs
};
[TestMethod]
public void TestMultiply()
{
    foreach (var data in TestData)
    {
        Assert.AreEqual(data.Item3, Multiply(data.Item1, data.Item2),
                        "Failed for input ({0}, {1})", data.Item1, data.Item2);
    }
}

Running the test will surface only one of the bugs, the one triggered by the input (1,0):

This is not only bad because it doesn’t give a complete overview of the bugs but it also violates the principle of one assertion per test because more than one assertion could be triggered in the test case above.

The T4 approach (dynamic test)

Read the rest of this post »

Where is Victor?

 Sep 18th, 2010 

 , , ,

Hello there,

It’s been quite a while since my last post. A lot of things changed in my life since then; well, a little before that post. First of all, I moved to Denmark. Here, I’m doing an internship at Microsoft (Development Center Copenhagen). More specifically, I am a SDET working with the Dynamics AX team. Even more specifically, I test the developers tools from Dynamics AX.

Secondly, in 3 months, I moved two times. First from Netherlands to Denmark and then I switched place one more time because I was too far from my workplace. I really hate this activity but nothing can be done… And… I will move once more before the end of the year :(

I also started my master thesis project. (Hopefully) The outcome will be a really nice tool for Visual Studio (but not only). It will help developers and testers to find faster/reduce the number of bugs and will reduce the development time/costs. That’s all I’m revealing for the moment.

Least but not last, Copenhagen. In some sense, the city is both beautiful and ugly. Is a strange combination of modern and classic. A classical looking city with parks, rivers, boats, bridges and building with the same architecture, but having high speed trains, modern buses, shops and blinking commercials – that’s Copenhagen. It is filled with attractions (museums, theme parks, shopping places, events) but is really expensive (ex: the price for a beer in a crappy bar starts at 4-5 euros).  I didn’t have too much time for sightseeing but I managed to make a panorama picture (see below).

Read the rest of this post »

They finally merge

 Jun 26th, 2010 

 , , , , , ,

Online software is nice because it allows you to have your documents (of any form) available anywhere is Internet access. However, you end up being forced to use a lot of services and, the worst part, they never interact.

For example: I was using Microsoft Live Mesh in order to synchronize and backup my files with the cloud. But MS also offered the Office Workspaces where you could store documents. So, I was using 2 services but it was impossible to edit/view a document from Mesh in the SharePoint workspace.

Another example is SkyDrive, with the new feature for editing documents (Office Live Apps). A nice addition, but my documents were in Mesh, not in SkyDrive. So, again, I had everything except the interaction between applications.

I am really excited to say it: they finally (started to) merge all the services! Seems that SkyDrive will the place where everything goes merged:

  • SkyDrive offers 25 GB for storage
  • Live Mesh will be replaced by Live Sync, which will upload the files on SkyDrive (just 2 out of 25 GB storage limit – strange)
  • Office 2010 supports loading and saving from and to SkyDrive
  • Office Live Apps are on SkyDrive and documents uploaded through Sync can be edited there Seems that synced files cannot be edited :(
  • Live Workspace will be replaced (integrated?) by Office Live Apps

With the Outlook connector I can keep my calendar, contacts and e-mail synchronized with the same cloud. Hopefully a feature for synchronizing tasks will be added soon. Also, mobile synchronization is a must – for my WM phone.

Is really nice that MS is doing a homogeneous environment where everything can be accessed from everywhere. However, the integration is not complete and it would be nice if they could integrate everything from My Phone to Messenger and social networks. Just imagine a single place from where you can do everything without being forced to use many services… [I’m dreaming, right?]

My Interview with Microsoft

 Mar 13th, 2010 

 , , , ,

This post is for those who want to apply or have already applied (but not finished the interview) for a Microsoft Job. The recruitment process is quite similar for everyone and consists of a few steps.

  1. Application
  2. E-Mail Interview
  3. Phone Interview
  4. On Site Interview

I will tell you my story and how I went through the four phases.

1. Application

My blog’s title (Ex Nihilo Nihil Fit) means “Nothing Comes Out of Nothing”. You can’t get a job at Microsoft by not doing anything – this is true for anything else. The first step you need to complete is the application process.

For this, many options are available. You can…

  • … apply online on Microsoft’s Careers website as I did
  • … send your CV to different e-mail addresses (there are some dedicated e-mails for different positions)
  • … apply through some 3rd party organization (job shop, campus recruitment, job agency, etc)

On MS Careers you just have to post your CV and choose the job you want. That’s all! No recommendation letter, no cover letter, no nothing. Of course, not every CV passes the selection process. Here are some tips for improving your resume (worked for me):

  1. Don’t write it just before applying! Write a draft version, wait a few days and then review it. This way you will find a lot of mistakes and stupid things you wrote initially. If you review it immediately after writing, your mind will not be criticism oriented and will just ignore mistakes. Repeat the write-wait-review process as many times as necessary, until you find that the review revealed no mistakes.
  2. After you did the final review and the CV is bullet-proof, ask others to review it. They will definitely find inconsistencies and mistakes and this will make you feel stupid. This is good because will open your eyes will make you go into an ‘I want to improve’ mode. You’ll try to correct everything. After you come up with a modified version go again through steps 1 and 2. Repeat this as many times as necessary. [Special thanks to Lucian Sasu, Nadia Comanici, Andrei Ciobanu, Monica Balan and Lavinia Tanase for reviewing my CV!]
  3. Make it short and give only relevant facts. Initially, I come up with a 5 pages CV because I wrote every single technology with which I worked. There were a lot irrelevant things, I wrote Windows Workflow Foundation just because I played with it for a few days. I added extensive descriptions for every project, made a personal details section (name, birth date, address, etc) of 1/2 page. Others suggested to cut everything that was not necessary. You don’t need to give extensive descriptions, just add a few words. For example, I wrote “VS Image Visualizer – Visual Studio 2008 debug visualizer for images” and added a link to the project’s page – you submit formatted andcan embed links.
  4. Add something that makes it different. I don’t know if this makes a difference, but I added some lines to separate items just like in the picture below. Definitely Microsoft gets thousands of CVs per day. You need something special.
  5. Don’t lie! Tell exactly what you did and what is the proficiency level of your skills. For example, don’t write “Advanced” for UML if you don’t know the difference between composition and aggregation. Be realistic and don’t under/over estimate yourself.
  6. Use the spell chick. Make sure everything is written in correct English and there are no grammar/spelling mistakes. Noddy likes a WC with grammar mi takes. You mght fail just because of that.

Once you completed your CV, choose the job that suits best your needs, apply and wait… The waiting is a problem because all these big companies like Microsoft, Google, Mozilla, Apple, etc. will contact you only if they find something interesting in your application. If you’re not suitable, then no rejection is sent.

I applied for an Intern Software Development Engineer position at Microsoft Redmond. I cannot apply for a full time position because I want to finish the master program on time, in the next summer – an internship is just what I need.

2. E-Mail Interview

January 20, 2010. Two months since I submitted the CV. I wasn’t hoping anymore that MS will contact me, when I got an e-mail titled: “Victor Hurdugaci ES DK” from Holly Peterson saying:

Hi there,
My name is Holly and I work with the Microsoft International Internship recruitment program.
We recently received your CV and would like to consider you for one of our technical internship positions in Denmark in 2010.
[…]
Please respond by the end of the day if possible
[…]

Wow! Now this was a good news. The possible bad side was that the internship was going to take 12 months. This might be a problem. However, it solved really well after talking to my professors. They understood the value of this internship and considered that will be possible to go for 12 months in Denmark and do my thesis there.

The e-mail also contained a set of 15 questions that I was supposed to answer when sending the response. The topic of the questions was not the same. Some asked HR questions like:

  • In what city/country will you be residing in June 2010?
  • Describe your ideal job
  • Have you interviewed with Microsoft before?

Others were a little tricky and technical:

  • How many lines of code would you estimate you personally have written in the last year?
  • How would you test a function that is supposed to calculate the factorial up to 1000?

I tried to be as specific as possible, but still give exhaustive answers, trying to cover all possible uncertainties present in the question’s text. By the way, you can’t send an e-mail back to ask for more details or clarifications. I don’t think I am allowed to post my answers to questions. I will just leave them as homework for you.

Replied the same day (actually the next day at 00:20 in the morning) and I waited again. Now was better because they are going inform me about the decision, no matter if is positive or negative. It was just a matter of time.

You might have more than one e-mail interview. I met someone who had two with less questions.

Few days later, another e-mail arrived. They continue to consider me as a candidate. Someone from Microsoft Development Center Copenhagen (MDCC) will contact me to schedule a phone interview.

3. Phone Interview

This is where it gets interesting. Until now everything was asynchronous and for all questions I had time to think. During a phone interview you have to come up with (almost) instant solutions.

Read the rest of this post »

Office 2010 Web Apps

 Oct 17th, 2009 

 , , , , , , , ,

OfficeWebApps_01

Most of you know Google Docs (GD) – the web-based word processor, spreadsheet, presentation, and form application offered by Google. Probably in the attempt to remove GD’s supremacy and to promote their new Office 2010, Microsoft is preparing a free online version of Office called Office Web Apps.

For the Technical Preview four application are available: Excel, PowerPoint, Word and OneNote. Each of them tries to reproduce the aspect and the functionally of their offline big brother. For Office 2007 users, the interface is well known. In the top side we have a Ribbon bar, the middle part is dominated by the working area and to bottom is reserved for an optional status bar.

In order to use Office Live Apps you need to have a Live ID and a Skydrive account. All these applications integrate with Skydrive and this is a curious fact because I would expect to be part of Office Live [very strange decision!].

The interaction with the live apps is not really fluid because it has a delay, especially in Excel, when you work with formulas – it takes 3-4 seconds to see the result. I understand Microsoft’s wish for adoption and interoperability with any browser without any addon, of the new product, but I think that a Silverlight interface would improve the usability or at least some drag/drop support and a right click menu.

Excel Live

OfficeWebApps_Excel01Spreadsheets – this is Excel all about. The little brother of the offline version is, for the moment, limited to some basic spreadsheet operations. The are no more and no less then 3 sheets [does anyone know how to add/remove them?] on which you can put your data.OfficeWebApps_Excel04

The simple tools available are: text format (color, font, size) and cell format (color, text alignment, data type). There is support for part of the formulas in Excel and one can use cell references to add dynamic data. There is some support for external data sources but it seems that data can only be refreshed if already exists – one cannot add/modify a data source.

OfficeWebApps_Excel03Unfortunately there is no support for locked sheets, hidden sheets and data validation. If you try to open an uploaded document containing some of the previous you will get and error message for edit.

Excel Web Apps gets another minus because there is no support for diagrams/charts. It would be nice to have at least support for charts in a new sheet. Maybe in the next version?

OfficeWebApps_Excel02

I am thinking to migrate my expenses Excel document in Skydrive (Office Live Apps) even though it is quite limited.

Read the rest of this post »

Tip #5: Get 25GB Online Free Storage

 Oct 3rd, 2009 

 , , , ,

Do you want 25 GB of free storage that can be accessed from anywhere you have Internet connection?

skydriveMicrosoft is offering 25 GB free online storage through SkyDrive. The drawback of this service is that you can only access files through a browser and if you want drag/drop facilities you must use Internet Explorer.

GladinetGladinet is developing a tool for mapping online drives as network drives. Using it you can map SkyDrive (and other services like GoogleDocs, Amazon S3, etc) in Windows Explorer. It is not the fastest or easy most solution but there is no other to map SkyDrive.

After you install Gladinet Cloud Desktop and configure it (it has an easy to use wizard) you get one more drive in My Computer that will contain subfolders for each online service you use. You can move files there just like they were local. Must mention that the sync is not instant. There is a tasks queue so each file is put in this queue and uploaded only after the previous has finished. Each operation works like this so you might no see online changes immediately.

Gladinet Cloud Desktop is available in two versions: free and pro. The free version has a file limit of 1000 files/batch which, I think, should be enough for most users.

CloudDrive CloudDrive_Content

Register for SkyDrive and download Gladinet Cloud Desktop.

Windows 7 Enterprise FREE Trial

 Sep 3rd, 2009 

 , , ,

It’s been a while for my last post. I was busy moving to another country – will explain this in another post.

Microsoft has announced the download availability of Windows 7 Enterprise for trial inside your environment.

The Windows 7 Enterprise trial is designed specifically for IT Professionals, so that you can test your software and hardware on a final version of the product. In addition, it provides the opportunity for you to become more familiar with the key improvements over previous versions of the Windows operating system, and experience firsthand how Windows 7 can make your PC environment more productive, secure, and manageable.

There is a time limit for downloading this version so better hurry. Access this site. However, if you are a MS Partner or Technet/MSDN subscriber you should check your software subscription page because you can access the non-trial version.

Tip 2: #if

 Jul 23rd, 2009 

 , , ,

This is a C# tip

When the C# compiler encounters an #if directive, followed eventually by an #endif directive, it will compile the code between the directives only if the specified symbol is defined. Unlike C and C++, you cannot assign a numeric value to a symbol; the #if statement in C# is Boolean and only tests whether the symbol has been defined or not.

A predefined (by default) symbol on the “Debug” build configuration is DEBUG. Using this symbol you can define code that will be compiled only in Debug; for example, a debug window will be shown only when needed.

using System;
using System.Text;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
#if DEBUG
            Console.WriteLine("Debugging information");
#endif
            Console.WriteLine("Code that always executes");
        }
    }
}

The code above will print “Debugging information” and “Code that always executes” when build on Debug and will display only “Code that always executes” when build on another configuration.

You can suppress the definition of the DEBUG symbol from the project properties or by removing the DEBUG from the build argument “/define:DEBUG”. Also, you can define your own symbols in order to accommodate your needs.

Define as many build configurations and symbols you need but don’t abuse this feature!