Monday, January 27, 2014

What motivates Employees & What motivates Employers


Every year we get know the top places to work for. Somewhere in 2006 or 2007 I exactly don’t remember, Microsoft ranked 1 (A research on best companies to work for in India – Not Forbes) but never retained the place starting 2009. For 2013, it is ranking beyond the 30’s in Forbes list. While there is no correlation between an Indian and American workers context, this article/blog is not about the ranking or its accuracy on what place a company has been trending over the past decade across the globe but more into what motivates employees that in turn motivates employers to provide them with irresistible benefits. What do you think came in first. The chicken or egg. The situation is similar.
Here is the list: http://www.today.com/money/google-tops-fortunes-list-best-companies-work-2D11936133

 Now did they rank in top three because they were given free lunches, snacks, gym memberships, insurance, sick leaves etc.. OR that was a result of company growing in profits because of Product Innovation and a culture that foster the same. IMHO, it is the employees that trigger this whole benefits process or they tend to be loyal and work hard around innovation for the company while they grow. The company and its culture facilitates this foster the people concept. BTW, ‘foster the people’ is a music band.

Let’s take a moment to decipher the core of these companies. Google, as we all know dominates in search space and has now become ubiquitous. Other products are gaining popularity and recently Google maps captured an image of an unidentified flying object. This is like working for a sci-fi company and not to forget that the stock price is trading at a $1000 plus mark. That definitely makes it unique and also the policy of the company wherein they let any employee work on innovation projects for 20% of their weekly punched hours. Now that is definitely motivating. Given the fact that there is money for every employee, there is also tremendous opportunity to play your strengths around innovation. So it’s a hub for a knowledge worker and someone ambitious to make money. The result is a win-win situation.

The most interesting new entry is SaS which originally started as an Institute specializing in Statistics and Statistical software. Today the world of Analytics has made it more popular and it is actually the closed source or licensed software for analytics. Many open source competitors like R Analytics are offering analytic software free but SaS definitely is a leader from a market share perspective. What is it that made SaS get to number 2 rubbing shoulders with Google. Again it is a knowledge workers hub and specially when you are dealing with advanced statistics and analytical software that caters to business world and not forget the Clinical Trial Business. The employees are smart and motivated. The company offering all the freebies will actually turn them into loyal workers as they take a sense of ownership and literally become shareholders/partners of the company. The cocktail of both benefits and knowledge becomes a successful recipe for any company to get to the top 3 or for that matter top 25.

The most interesting 3rd arrival is Boston Consulting Group that is not a product based company but has bagged the coveted third place. Note that my analysis on Google and SaS was an obvious one with my own views based on the industry information. However I am still figuring the forte of the third winner which is primarily into consulting. Wondering whatever happened to the Big 4.

 While the authenticity of the survey and sampling mechanism is debatable, the fact of the matter is that top three were very much in top 5 last year with Google and SaS being the repeat offenders.

 

 

The Trusted Advisor


What is the likely hood of ending your long term project somewhere in the middle to a competitor because the customer was unhappy which was not quantifiable. Agreed that we all look at metrics to track the health of a project. The most typical ones are Defects in Production/UAT, Usability, Code Quality, Defects per LOC, Variances of Schedule & Effort etc.. the list goes on and yes these are unarguably the most tracked and loved ones for a metric driven Manager. Most of the times, we also consider a more formal approach of requesting a Customer Satisfaction Index OR in simple terms, asking a customer on how are we Delivering? An informal communication would always be Excellent and a more formal communication is typically avoided for legal reasons in that a Customer may have to back it up should there be changes on the Business Front related to mergers, acquisitions, change of C level folks etc… In current day context it would be prudent to proactively assess your organizations value add to a customer’s business problem. Metaphorically this is “doing” Vs “seeking” . Meaning proactively improvising versus actively seeking for feedback from a customer. An abridged list as a starting point for all Managers and Leads handling projects whether they are local or overseas clients could be:

  • Consider yourself as inexpensive & skilled workforce as against cheap IT labor. This no longer holds good given the inflation in countries like China and India. Make the customer aware of this for a win/win
  •  Always look for opportunities around improvement. This may be related to business analysis or working directly with a customer’s Product Managers. Studying the competitive landscape & propose features that add value to a product or service sold by the customer
  •  Look for opportunities that save the costs around defect leakage from an envision state to the field/production
  •  Maintain transparent communication and avoid misleading effort involved that directly translates into costs
  •  Consider the customer a part of your team and have their presence on your team site which is not mere access to artifacts but may be a picture of theirs would help
  •  Follow them on social media that is a testimony that you are serious about them and their business
  • Have multiple point of contacts such that dependency does not exist and customer has a diverse group of individuals that he could interact when needed
  •  Most importantly build the trust to be a trusted advisor

To conclude, there are some things which cannot be quantified but will take the relationship a long way if done without any bias.

The title for this blog and some of his own experiences were based after reading the following book & strongly advices this to all that are involved in consulting & services " The Trusted Advisor Paperback David H Maister, Charles Green and Robert M Galford "

Thursday, February 23, 2012

Tying up Silverlight, Expression Blend and XAML- Part 1

In this series of blog I will jump into the usage of Expression Blend for building Rich Internet Applications that are fun and easy to use based on Silverlight. Additional features are covered in a sequel to this blog (Part 2 and Part 3). The code generated by this UI designer tool is XAML which is easily understandable as we see it getting generated dynamically as and when we create or modify UI controls and associated properties. The good thing about Expression Blend is that what you see is what you get; meaning what you have seen (effects) in the design mode is what you actually see on your web page and the change is immediately available in the design mode as well. If you are building a project for Microsoft’s windows application, then Windows Presentation Framework is being used behind the scenes and if building web based applications, Microsoft’s Silverlight is being used in the background. This is one simple fact that you need to understand as there are so many names flowing since the advent of .NET 3.5
One of the main reasons to use Expression Blend is to see XAML in action in conjunction to the power of Silverlight. The Visual Studio Designer works in a read only mode and the controls can just be dropped but not altered using the designer which needs to be done via writing XAML code manually. But when we use Expression Blend, the Silver Light Controls can be modified in the designer mode itself and one can see the code generated simultaneously. This way, we could use the tool as well as learn XAML which is fairly simple. I am assuming that we have installed Visual Studio 2008 or 2010 and Expression Blend 3.0. A trial version is available if you do not have a licensed copy of Expression Suite. Note that the version of Silverlight if using VS 2010 needs to be 4.0 and Visual Studio Express Edition does not support loading projects created from Expression Blend
Let’s also quickly understand what XAML and Silverlight are at a high level before taking a deep dive into building a sample website which shall expose the audience to XAML, Silverlight controls and Expression Blend while not forgetting how to build fun and easy to use Rich Internet Applications faster.
XAML: Extensible Application Markup Language is a declarative XML based language created by Microsoft. XAML is used for creating and eventing the Silverlight controls.
Silverlight: Is a development platform from Microsoft for creation of rich & interactive web, and mobile applications. It is Microsoft’s equivalent to Flash from Adobe and my objective is not to compare these two. You could always do some research for your needs and choose appropriate technology. Ex: Streaming video is not harsh on the CPU when used with Silverlight
Let’s directly start looking into some code snippets for XAML and exploit some UI controls available as a part of Silverlight development platform and also exploit Expression Blend to design a website. Program logic can be built using C# from Visual Studio but I will not focus on that for this Part.
Enough of theory and let’s get into hands on mode:
1) Launch Expression Blend 3 and from File menu, choose new project. Choose Silverlight as the type and Silverlight Application + website as the subtype
2) Default designer settings appear with solutions explorer and properties panel with additional UI related controls. Make a special note of the assets toolbar button which is the main area of interest which groups most of what we want.
3) At this point the project is not loaded with any controls other than the default grid on which we intend to place objects. Let’s take a look at the XAML that was generated until now:

Change the values for the width or height and observe on the fly changes in the designer. As an alternative, which is actually the main purpose of this exercise is to use designer to observe the XAML being generated. Reduce the size of the canvas or choose a different background color from the properties tab / brushes and observe the XAML. There are options to view both the code and designer by using the split option available between the main page and properties tab.
4) Instead of a hello world example, let’s do something different by adding an image file and changing some key properties and observe XAML. From Project menu, select add an existing item and choose an image file from your computer. A couple of JPEG files shall serve our purpose.
5) From the properties tab, under appearance section, change the opacity property to 50 for one of the images and observe in the designer that the effect is instant and also the XAML is generated to add the opacity property
6) Select the second image and change its height, width and from the transformation section, select the rotate option, set an angle using the rotating widget and observe the amount of XAML and the tags created for skew etc. The value of the angle is also displayed. Change this from XAML or the rotator to dynamically observe the effect.

From the solution explorer, right click and choose the option to open with visual studio. The solution is opened in the IDE and the interface is pretty standard to what one has been using all this while with an exception that the designer and XAML are available in a tabbed fashion and are swappable
The purpose of this blog is not to give demo on Expression Blend, but to expose the audience to the benefits of using expression blend in conjunction with visual studio or expression blend alone to build rich UI in a fast and easy manner. I will cover more practical topics in the subsequent blog posts.
There are more easy to use features such as timelines, states that can be used to build interactive web sites that use Silverlight platform.
Select build project followed by run. A web page is rendered using the server from local host that displays images in the browser with the same effects as seen in the designer
9) Let’s add a Silverlight button control and look at some basic C# code as well as the simplicity with what one can fire events associated with an object as if one is working on Windows based controls in .NET
From the tool bar, double click the button control to add the default size. Observe the XAML and change properties as needed including the content (label property) etc.., that get changed in the XAML. While the button is selected and is focused on Property tab, select the ‘events’ icon to see a list of .NET provided events. Enter a name for the method you intend to create for the click event and navigate out of the field once the method name is entered. A new tab is opened displaying the .NET namespaces and C# code generated so far with focus on the method you created for the click event. Type: MessageBox.Show(“test”); AND build the Project as well as run the same. The web page is rendered with your button readily available for you which when clicked displays the test message. Instead of writing complex code to manipulate objects created in expression blend, I will show how one can leverage some other features like ‘timelines & storyboards’ in subsequent blogs.
To conclude, it is very easy to understand and explore Silverlight for web development or web application support and maintenance without having to worry about the details such as XAML syntax etc… Since Silverlight is primarily used for web and mobile applications, there are other tools that are part of Expression Suite which aide in optimizing memory aspects that facilitate in the development needs of rich media which might also need attention.

Sunday, November 6, 2011

WP7 - Orientation


Getting yourself Oriented with WP7 Orientation technology. This title was picked from Charles Petzold’s book on WP7 and here we will explore the technology behind how orientation works behind the scenes.
The SupportedPageOrientation is actually and enumeration and the available members are Potrait, Landscape and PotraitorLandscape. The enumeration is a property of PhoneApplicationPage Class.
The result seen in the earlier blog on WP7 demonstrates the dynamic layout of Silverlight which is extended by WPF which was designed to adjust to different aspect ratios and screen/window sizes. What is most noticeable is that different elements change their size when the phone is used between landscape or portrait. This is particularly useful when an application is viewed in landscape during which the element sizes are increased to accommodate the screen size to give a uniform look and return back to a smaller size when changed to portrait. This is specifically important when you want to build applications that are orientation independent and one cannot anticipate the position of the keyboard on a phone. This is needless to say when there is a plethora of phone hardware options available.
To give more flexibility, the PhoneApplicationPage Class provides OrientationChanged events. Let’s take a look at a very useful example that leverages this event. From our earlier blog which demonstrated the orientation of an image, let’s add a text box to the main page. To do this, open the solution in Blend and do the following:
1) Drag a Text Box from the available controls
2) From the designer select the ‘PhoneApplicationPage’ and select the events icon located next to the properties icon
3) Enter a meaningful name for the OrientChanged event handler and the C# code window is opened
4) Enter the following code (Note: event handler is created and only code in braces is required):
private void test_orientation(object sender Microsoft.Phone.Controls.OrientationChangedEventArgs e)
{
TextBoxtb = new TextBox();
tb.Text = Orientation.ToString();
MessageBox.Show(tb.Text);
}

Now start entering some text (or by just clicking in the text box) and see the on screen key board popup. This is when you change the orientation by clicking on the rotate option from the emulator and once can see the keyboard adjusting as per the orientation and the Orientation Changed events are fired as seen from the output of the Message Box. These events can be leveraged to adjust your content appropriately. The images are screen shots that depict someassociated event arguments such as PortraitUp and LandscapeLeft

Windows Phone 7 - Initial Days


In this series of blogs we will look at Windows Phone 7 (WP7) development platform and a discussion on what is best for your application along with a few simple examples followed by advanced concepts in subsequent posts. In a nutshell there are two choices when it comes to platforms: Silverlight and XNA. The former is more apt for utility applications and the later for absolute gaming. What suites your business requirement, device and users is a choice you can make between these two. As an example, let’s take a scenario where an on/off-screen key board is a must and you have a perfect case to use Silverlight as against XNA which is apt for gaming sort of application.
As far as development is concerned, i am of the opinion to leverage both C# and Blend thereby minimizing the development and testing time. A popular notion is that to use Blend for design phase and Visual Studio to develop the application. In my honest opinion a lot more can be leveraged by delegating C# code aspects to Blend. There is an emulator available which lets you develop and test without having to connect to an actual device. Let’s jump into a quick example and explore further. We will look at orientation and image related features. Since I am using an emulator, let’s defer multi touch concepts to subsequent posts. After installing (VS2010 Express Edition & Expression Blend 4) for Windows Phone, create a new Silverlight for Windows Phone application and from the MainPage.XAML set the following: - SupportedOrientations="PortraitOrLandscape". More on basics of XAML can be found from earlier blog posts. Since Silverlight supports only JPEG and PNG image files, let’s quickly add a folder to the Project in Solution Explorer and from the folder, add an existing item in the form of a PNG file that already exists on your computer. Make sure to set the source in the XAML file from the content grid tag by typing Image Source="folder_name/Image_name.PNG"(in angular brackets). Hit F5 and you should see the following before and after rotating the emulator:
Now let’s add a picture from the web as the size of the Project may be of a concern if there are multiple images. Launch Blend and add a few buttons. Click on the events icon for each button and name the methods as btn_1 and btn_2 respectively which are created against the event handler ‘ManipulationStarted’. This step creates all the necessary code for the event handling part and this is where I strongly feel that one should leverage Blend as stated earlier to create the error free code for you. More on how can also be found from earlier blogs on Blend.
Add the following C# code to the methods created above:
Uri uri = new Uri("http://www.YOUR_URL/xyz.jpg");
BitmapImage bmp = new BitmapImage(uri);
img.Source = bmp; // Where img is the directory created earlier in Solution Explorer.
Hit F5 and upon clicking the buttons (touching on real phone), the images are rendered from the web. I would conclude by recommending a good read of the Preview content offered by Microsoft from where I have taken some inputs. Commercial releases of the content might be available by now!

WP7 - Location Aware




Location based services are based on longitude, latitude and altitude in conjunction with any map based web services or API’s available from bing. Using some simple steps I would like to demonstrate a real time map application using the emulator.
Assuming the prerequisites are installed as per earlier blogs, let’s get started by :
1) Installing the Silverlight maps control from here .

2) Add two references named Maps.MapControll.dll and Maps.MapControll.Common.dll from the location where step#1 was installed. We could use Blend to add the ‘Map’ control as this is available from Blend only and I have not seen it in Toolbox of VS2010 Express for WP7
3) Obtain the key from
4) Add another reference to your project calledSystem.Windows.Browser.dll which is available from your Silverlight install location
5) From Blend, add an attribute to the map control by name CredentialsProvider and this expects the key obtained in step #3
6) Save the project and compile in VS2010 Express for WP7 after changing the ‘Center’ property of the map control to (17, 78, 1) OR (40, -74, 1) which are the latitude, longitude and altitude respectively. The below locations are displayed once zoomed either by using the zoom control or just clicking on HYDERABAD or NEWYORK. You could zoom by using the touch screen on a real phone and the controls are used to demo only
A real good usage will be to leverage the ‘GeoCoordinateWatcher’ class and creating a handler for the ‘positionchanged’ event which delivers an object called ‘GeoCordinate’ that contains important properties for location based applications. Currently, the emulator does not return any values for these properties that are really necessary to pass in things like longitude, latitude, altitude etc...
On a real phone these are obtained from Wi-Fi, GPS or A-GPS and one can choose what is applicable to their business needs

WP7 - Accelerometer


WP7 comes in with a built in Accelerometer which measures LINEAR movement and ‘does not contain’ a Gyroscope which measures the angular rate (ROTATION). A combination of these two gives accurate results on device orientation and movement for building the best user experiences while Accelerometer alone results is issues like time delay or noise. The latest version of IPhone (4) has built into it both accelerometer and gyro
The type of applications that you can build is left to your own requirement but some useful scenarios are measurements involving: Walking, Running, Skipping, Earthquakes, Aftershocks, and Vehicle Collisions etc…
The Accelerometer is a vector (x, y, z) which encapsulates direction and magnitude. The magnitude is calculated using SQRT(square(x)+square(y)+square (z)) and measured in G-force a.k.a gravitational forceand 1G=9.8m/s^2. WP7 emulator always returns 0, 0,-1.
Following steps are required to arrive at the simulator based Magnitude which is always 1G but will vary when used with an actual phone.
1) Add the reference Microsoft.Devices.Sensors to your Project from the solution explorer and using directive for the namespace to this extent
2) Create an instance of the class Accelerometer which exposes the methods start, stop, state and dispose which are self-explanatory //Accelerometer acc = new Accelerometer();
3) WMAppManifest.XML needs the following : Capability Name="ID_CAP_SENSORS" (angular tags)if notalready added
4) Set an event handler for the ReadingChanging event which is followed by AccelerometerReadingEventArgs – Event Arguments that expose the properties X, Y , Z and Timestamp which are our main area of interest
5) Create a text block that can take the output of X, Y and Z properties returned after invoking the start method of the instance of the class Accelerometer (created in default constructor)
6) Run the project as described in earlier blogs WP7 and WP7 Orientation and observe the error message related to thread safety of Silverlight in that you are not allowed to access a UI object (TextBlock element) from a non-UI thread (Accelerometer related)
7) Create a delegate as follows:
delegatevoidSetTextBlockTextDelegate(TextBlock myTextBlock, string text);
void SetTextBlockText(TextBlock myTextBlock, string text)
{
myTextBlock.Text = text;
}
8) Use the delegate in the event handler (ReadingChanged) as follows:
void acc_ReadingChanged(object sender, AccelerometerReadingEventArgs args)
{
myTextBlock.Dispatcher.BeginInvoke(new
SetTextBlockTextDelegate(SetTextBlockText),
myTextBlock, str);
}

Where ‘str’ contains the formatted values for X, Y, Z Properties, Magnitude and optionally the Timestamp.

9) Run the project to see the below output from emulator. The red circled area is of interest that depicts X, Y, Z and the Magnitude