Saturday, April 23, 2011

Beyond Microsoft - Nokia Partnership

If you were watching the investing trends of venture capitalists in IT sector, most likely you would have noticed that, in recent years the trend had actually shifted more into mobile applications, which is set to grow at an exponential rate in near future. With the introduction of 3G in a bandwidth constrained country like India, which is to open up a whole lot of opportunities not just for telecom players but for the entire industry at large. Also not to mention that the purchasing power of people had grown like never before, which had started attracting international players to tap this vast opportunity. 

So mobile applications being the buzz world in and around the technology sector, industry giants like Microsoft, Google, Apple to name a few had joined the fray to get hold of the mobile application market with their platform offerings. 

Recently Microsoft made headlines in most daily's, by partnering with Nokia to get their Windows Mobile platform deployed on Nokia smart phones, by replacing Nokia's proven Symbian OS platform. I read this news twice to confirm what I read was right or not. My initial reaction was, did the people at Nokia had gone nuts to accept such an offer from Microsoft. Why don't they refine their existing Symbian OS or why not go for the proven Android platform, which would seem like a better choice from a normal persons standpoint. But later only I came to hear the real crux on what made Nokia to cut a deal with Microsoft. Did you know that, Microsoft had offered Nokia a staggering of $1billion (i.e. Rs.4,500 crore) to materialize the deal and Microsoft will be paying this  in a five year time. What crossed my mind was that, Microsoft is playing out the same strategy they had with Hotmail. 

Microsoft didn't stop there after making a deal with Nokia. See for yourself what Microsoft had announced at 2011 International CES; they are stepping out the x86 province and is reaching out to new platforms. The next version of windows is going to support System on a Chip (SoC) architecture like, ARM based processors from NVIDIA, Qualcomm and Texas Instruments. All this points to the fact that, Microsoft is keen to make their windows OS support over a large set of devices, and not just restrict to x86 machines.

So what one can infer from this deal is that, Microsoft had virtually acknowledged the fact that mobile platforms is going to be the next generation computing platform, which is going to supersede Desktop\Laptop computers for those who primarily use computers for stuff like surfing th web, mailing, office apps, movies, music, presentation, calendaring, Instant Messaging et al. 

So whats in here for developers? Definitely its a great opportunity in disguise that you could take advantage of by diversifying your skillets to cover mobile based development platform, which itself should not be limited to Windows Mobile development but to other platforms like Android and iOS (Apple). 

Before concluding there's a good news for Silverlight developers. Knowingly or unknowingly you guys now posses mobile development skills on Windows 7 Mobile platform because Microsoft is supporting Silverlight on Windows 7 Mobile platform for delivering rich UI apps.

So start updating your skill set arsenal with new skills and be ready for the mobile computing era.

Thursday, April 21, 2011

Opening Excel Files In Different Windows

Today a friend of mine rang me up to check whether, is there any way to open excel files in different windows, rather than getting the files opened in the same application window, which was excel's default behavior. My friend is having a system with dual monitor and was trying to open excel files in both the monitors, unfortunately both the files were getting open in the same excel main window, and all attempts to drag files from the main excel window to the secondary monitor didn't succeed.

I did went through the options in excel, but unfortunately no setting could be found to get this done. I thought this should not be an odd case, as this might have been faced by others too, so why not search and see if there is some solutions out there in the net. After going through a couple of solutions, I found the one which I was looking for. Some additional steps were required to get this done, which wasn't mentioned there in the solution. So I though of documenting the solution, so as to benefit others if the need arises.


I came to find two solutions for this. First one is dam simple, but a temporary solution. While the second one is what I recommend. So lets start with the simple one.
  1. Open Excel application.
  2. Drag the file you wish to open to excel application.
  3. To open the second file, open a new excel instance, i.e. open excel from start menu or by typing "excel" in start-> run dialog. (don't forget exclude the quotes while entering command in run dialog)
  4. Drag the file you wish to open to this new instance of excel application. Thats it, now you have two instances of excel application which you could drag around multiple monitors as you wish.

Now lets move on to the second solution, the one I would recommend for power users.

Assumptions: Microsoft Excel 2007 or above running on windows XP (The settings locations might be different in case of Windows 7, but the solution should work with both Vista and Win7).
  1. Open Windows explorer. (Press Win + E key combination or open "My Computer")
  2. Open "Folder Options" from "Tools-> Folder Options"
  3. Select tab "File Types"
  4. Inside "Registered File Types" search for "XLSX" under "Extensions" column (Excel file extension for formats from 2007 onwards)
  5. Make sure you had selected "XLSX" under "Extensions" column.
  6. Click "Advanced" button. A new window with the title "Edit File Type" should open up.
  7. Un-check "Browse in same window" if checked.
  8. Under "Actions" list select "Open" (The text highlighted in bold).
  9. Click "Edit" button.
  10. A new window with the title "Editing action for type: Microsoft Office Excel Worksheet" should open up.
  11. In the textbox labeled "Application used to perform action", update the text to the following. Note: Append the text /e "%1" after the excel path. Now it should look like the one below except for the path to Excel.exe
    "C:\Program Files\Microsoft Office\Office12\EXCEL.EXE" /e "%1"
  12. Uncheck the "Use  DDE" checkbox.
  13. Click "OK" button to close the window.
  14. Click "OK" button in the "Edit File Type" window.
  15. Now execute the steps from 5 to 14 by selecting "XLS" file extension.
After making all these changes close any open excel documents and try opening two excel files. Now you should see those two files opened up in two different windows.

Saturday, April 16, 2011

QR Codes

Have you ever seen something like this(like the square dotted image below) and asked yourself whats is it?
Yes, me too was in the same situation when I came to see an Ad, where a token with some black dots was used to pass out contact information. Out of curiosity I did a search on what this stuff was all about and finally got what I was looking for.


What's QR Codes all about
QR Code means Quick Response Code a two dimensional matrix bar code. The reason why they are more useful than a standard barcode is that they can store (and digitally present) much more data, including url links, geo coordinates, and text.


QR Code Videos
Here are some videos showing some creative use of QR Codes.





Generating QR Codes
If you want to generate a QR Code for yourself to showcase info like contact details, phone number or your personal site URL. Here are some free resources providing QR Code generators.

Reading QR Codes
So now we know how to create some really exciting QR Codes for yourself with details containing like contact info, phone number, personal website url, email id or even your Facebook Id et al.  Lets move on to on how to read QR Codes. If you had watched the videos, then you might have already started scanning out some QR Codes out there in the internet or street.  


Ok lets jump on and see how to read some QR Codes with your smart phones. I think nowadays smart phones are no longer the realm of rich and cosy, with Android hitting the mobile markets, the smart phones are now within common mans reach. So the basic requirement is, you need to have a smart phone with camera. Next step is to download QR Code Readers for your mobile platform. For Android users here is the most downloaded QR App.


How QR Code works
If you are the kind of person who is really passionate to know about how things work. Definitely we are on the same frequency. Ok lets find out the internals on QR Codes. So before that lets first checkout how QR Codes came into picture? 


The limitations imposed by bar codes really gave way to the development of 2D Codes. Usually a bar code encodes data only in a horizontal direction that means it simply wasts space by encoding the redundant data vertically. So as to contain more data, bar codes were enlarged which complicated reading operations and increased printing costs.




The QR Code was developed by Denso Wave Corporation and released in 1994, as a means to contain more data per area than bar code does. This is a patented technology even though this is open for public use and its clearly defined and publicly available. The QR Codes also known as 2D Codes can contain data in both horizontal and vertical directions. QR Code could handle characters up to this range.


Data Capacity:
Numbers:                                    7089
Alpha numeric:                           4296
Binary:                                         2953
Kanji (Japanese characters):   1817


You can see for yourself the cost saving in using QR Codes over bar codes, as it requires just one tenth space to encode the same information as bar code does.



The other advantage with QR Codes is that it can be read from any direction that means it is omini directional or can be read from 360 degree angle. QR Code decoders does this by identifying the position the big squares located at the three corners of the QR Code.






QR Code Structure 
The following image depicts how a QR Code is to be structured. The cells colored White or Black are fixed, these are called "finder patterns" or "timing patterns" which is used by the QR decoder to help determine the orientation. The cells colored yellow are the ones which data is stored while the one in cyan is used to store error correction code and mask pattern (aka format information). 





QR Code Versions
The QR Code symbols comes in different versions ranging from Ver 1 to Ver 40. Each version has different module configuration, here module means the density of black and white dots that make up the QR Code. Version 1 had 21 modules while the present version i.e 40 which could contain 177 modules. This also provides error correction capability to retrieve data in case the symbol gets dirty or damaged. 


If you are interested to dig more about QR Codes data encoding visit the following URL (decode and try. Scratching your head to find out an online decoder? don't worry click here and paste the below QR Code symbol\image url)





.NET Developers
A good news for you folks, If you are planning to incorporate QR Code encoding\decoding functionality in your application, here is a free library worth evaluating.


So next time, if some one asks you whats that square icon with dots, definitely you could show off techie skills.

Why Use Google Chrome


I had always been a fan of Google, right from the day one I came to experience the power of Google search, I started using their Search engine and with the introduction of GMail, I was living my dream of having the best ever mail application nd that too for free of cost, with tons of features like Gigabytes of space, Keyboard Shortcuts, Mail Filtering, Tagging\Grouping and lots more. 

With Google stepping into the browser market I was bit doubtful on how it’s going to compete with the deep rooted giants like Microsoft IE, Mozilla FireFox et al. But once I installed this application I was taken by storm after experiencing its performance and robustness in terms of security and ease of use, though at first there were some hiccups which were straightened out in the later releases. So coming back to the title of this article "Why Use Google Chrome", I would like to share what the experts\hackers community had to say about Google Chrome.

Secure Browser ever built: At first glance it might look like a marketing tag line. We’ll see how Google Chrome befits for this secure ranking status. Google had announced a cash prize of $20,000 for coming out a with chrome exploit, but as on date no one had ever succeeded in bagging this prize money.  In the last two PWN2OWN contest at the CanSecWest conference, where security experts around the world compete to exploit the browser vulnerabilities of those including Chrome, Firefox, Safari, Opera and Internet Explorer. The only browser which came out unscathed was Google Chrome because of its sand-boxing model. Lets  hear what Charlie Miller(a security expert) had to say "There are bugs in Chrome but they're very hard to exploit. I have a Chrome vulnerability right now but I don't know how to exploit it. It's really hard. They've got that sandbox model that's hard to get out of. With Chrome, it's a combination of things - you can't execute on the heap, the OS protections in Windows and the Sandbox."  While browsers from Apple, Microsoft browsers drop to first shots at the hacking contest. In fact, Safari was apparently exploited in a matter of seconds. While the most impressive hack was that of  Fewer's, who used three vulnerabilities to [not only] bypass ASLR (Address Space Layout Randomization) and DEP (Data Execution Prevention), but also escape Internet Explorer's Protected Mode, which was something not seen at PWN2OWN before. Click here to read more on this vulnerability.

So What's Sandboxing: If the term sandboxing is new to you, no need to worry as this is a simple principle used in computer science to insulate un-trusted\untested code from a developer or company from accessing or altering the core system components or configurations. The sandbox typically provides a tightly-controlled set of resources for programs to run in, such as scratch space on disk and memory.  In simple terms its assigning the least privilege or just the required privilege to every process involved in executing a task without affecting the stability or integrity of the host system. 

How Chrome Sandboxing Works: Chrome implements Sandboxing by utilizing windows security model called process tokens. If you were to open up a chrome window you will find two chrome.exe listed under the Task Manager process tab even if you are browsing a single site (You will find more chrome.exe processes, if you have installed any browser plug-ins). You could also notice all processes running under the same username which you had logged in, so you might be thinking how does this policy of least privilege apply here and why these many processes? 

Traditionally browsers contain all the sites you browse into a single process; this means all web sites share the same address space. In such a scenario, if you were to visit a hijacked site installed with malware, it might exploit\access all sites opened in other tabs and using buffer overflow exploits it could even access your system resources including files on your disk and more. Also if any one of the tab crashes the entire browser will hang or come down crashing causing you to lose any unsaved data with it, this might not be something new for anyone who had been using browsers like IE and Firefox. 

So let’s explore how the chrome security model works. For this you need Process Explorer to see how the sandboxing (process tokens are assigned) works. Open up chrome and browse www.google.com Next start ProcessExplorer.exe, here you will find two chrome.exe process listed (you will find more chrome.exe processes, if you had installed any plug-ins). The chrome.exe process are laid out in a hierarchical way, where a parent chrome.exe process is listed with a child chrome.exe process as shown below.




Here what you see is chromes sandboxing model in action, which relies on protection provided by windows. The Sandbox operates at process-level granularity. Anything that needs to be sandboxed needs to live on a separate process. The minimal sandbox configuration has two processes: one that is a privileged controller known as the broker process, and the sandboxed processes known as the target process. In Chrome the broker process is called the Browser Process, while the target process is called as the Renderer process. In the above screen shot, the Browser process is the parent Chrome.exe process, while the child Chrome.exe is the target process, i.e. the Sandboxed process. The Renderer process (i.e. the target process) communicates with the Browser process (i.e. the broker process) using chrome IPC channels. The sandbox IPC channel is a low-level mechanism (different from Chromium's IPC) which is used to transparently pass on certain windows API calls from the target (Renderer process) to the broker (Browser process).

Now let’s explore the security tokens assigned to the Renderer Process, for this select the properties of the child chrome.exe and select Security tab. Here you would see all the users and groups with deny restrictions and a NULL SID which denotes a group with no members. This effectively takes out permission from the renderer process from accessing resources on your system.
         
When you key-in a URL to the chrome window, its passes on the request to Browser process through IPC channel. The Browser process then makes a request to the specified web address\url and all the data received from the webserver is passed back to the Renderer process which does the rendering of the webpage using web kit engine.

If you are interested to know more on chrome internals, here is a couple of links worth visiting.

So to conclude, sandboxing being one of the pioneer security model used by chrome to combat possible exploits. Chrome uses another feature called "Phishing Filter" to prevent users from visiting phishing sites by checking against a list of known phishing site list and warns the user about potential risk of visiting the site. The other plug-in worth installing is the "NotScript" extension that provides high degree of security by disabling scripting for non-white listed sites. If you trust a site you can white list that site, only then it will allow scripts to be executed at the browser end.


So having said this, I believe no browser as of now is as much as robust as Chrome on taking security this seriously, though IE had come up with its protected mode, but it still has a long way to go in order to catch up with chromes prowess in terms of security, performance and responsiveness.


So have a safe browsing with Google Chrome.