Showing posts with label Misc Products. Show all posts
Showing posts with label Misc Products. Show all posts

Monday, August 03, 2009

Microsoft Tag

A High Capacity Color Barcode (HCCB), also branded Microsoft Tag, is a type of barcode that uses shapes, instead of black-and-white lines or squares used by other barcode systems. HCCB is not intended to replace traditional barcodes, but rather enhance them by allowing more information to be stored.

Custom Tag

Creating Tags
  • Go to http://tag.microsoft.com
  • Associate your Live id (hotmail email address is fine) with the Tag site and sign in.
  • Click on the 'Create Tag' button and follow the directions.
  • Tag can be of type Url, Contact card, or plain text.
  • Once tag is created, the information we provided is stored in Microsoft servers and a unique id is associated with it. This id is encoded in a graphical image to generate the tag.
  • Click on the 'Render' button to get the generated tag in the format of your choice (png, pdf, jpg, etc).
  • It is also possible to get it in custom format so that it can be used by overlaying on another image.
Using Tags
  • The tags can be used anywhere in web (sites, blogs, etc.) as images.
  • Tags can be printed and used on real world objects like books, product package, etc.
  • They can even be printed big for displaying on a hoarding.
Reading Tags
  • Tags are read using a mobile device having camera.
  • The device need to have a software named 'Microsoft Tag Application' or simply 'Tag Reader' which can be installed freely from http://gettag.mobi.
  • Start this application in your device and just point the camera onto to a tag to read it.
  • It works by decoding the id encoded in the image and then connecting to internet to get the associated details from Microsoft servers.

To see more samples, visit my workshop page on this at: wayfarer.bizhat.com/techbites/workshop/tag.html

Monday, June 01, 2009

Microsoft Bing Decision Engine

Here comes a new search decision engine from Microsoft to replace it’s existing Live Search:
Here is a pretty looking view of it:
bing

Read more about it at: http://www.microsoft.com/presspass/presskits/bing/default.mspx

Monday, May 18, 2009

Wolfram Alpha Computational Knowledge Engine

Wolfram Alpha Answer Engine gets us to what people thought computers would be able to do 50 years ago: quickly find answers to all the factual questions!

Stephen Wolfram, the British physicist behind this recently launched project clarifies that Wolfram Alpha is a website with one simple input field that gives access to a huge system, with trillions of pieces of curated data and millions of lines of algorithms.

wolframalpha

It is not a search engine that lists out numerous links to information that exist on the web. Instead, it actually computes the answer using the available data and displays it in a easily readable format.

Link: http://www.wolframalpha.com/

Thursday, March 05, 2009

Upload Photos using Flickr API in .NET

You know there is Flickr, and you know they provide free API Service for accessing the online photos repository programmatically. Now let us see how easy it is to use those APIs in .NET.

In this example I am creating a .NET 2.0 Windows Forms Application (I used Visual Studio 2008) in C# to upload a photo to your Flickr account and then create a new set (album) and assign that photo to this set.

Here are the steps to do this:

  • Get the API Key from Flickr (This key and its secret code are required to access the service)
    • Go to Your API Keys section on Flickr.
    • Click on ‘Apply for a new key online’ link.
    • Complete the process. I used the Non-Commercial option to get the key immediately. You will have to provide the details of your application. Once this is done, click on Edit key details and update all the information.
    • Note down the Key (it will look like 3e1f3c83c5e92ead353be33162fr4883) and Shared Secret (it will look like 700f4d5220833d34)
  • Get the FlickrNet API Library (This is a .NET wrapper class library around Flickr API and makes it very easy to call the services)
    • Go to http://flickrnet.codeplex.com/
    • Download either just the binaries or the source code if you would like to debug into the library.
    • FlickrNet.dll is the only one file you will require.
  • Design the application interface
    • I created a WinForm application as shown below with options to authenticate the user and to choose a picture file for uploading.

FlickrTest Now let us understand some theories behind Flickr API before we get into coding. Skip this if all you bother is to get your code working. :)

You need to do an authentication to the flickr account you are trying to access. This is a one time process and is done by directing the user to a URL (generated using the service) which will then open up in a browser. This process is initiated using ‘Start Auth’ button. Once the user logs into the flickr account and approve the access request from this application, he or she will have to come back to this application and click on ‘Complete Auth’. In this method, we get a ‘Token’ which uniquely identifies the user. This token can be saved and used again to access this user’s account without requiring further authentication process.

  • Add code to call Flickr API methods

First thing is to add a reference to the FlickrNet (either direct dll or the project reference if you use source code) in your project. Next declare the required variables.

private string flickrFrob = "";
private long fileSize = 1;
FlickrNet.Flickr myFlickr;

Then in the Form’s load event, provide your API Key and Share Secret codes and create the Flickr object. Event handlers are also added here.


private void MainForm_Load(object sender, EventArgs e)
{
uxKey.Text = "3e1f3c83c5e92ead353be33162fr4883";
uxSecret.Text = "700f4d5220833d34";
myFlickr = new FlickrNet.Flickr(uxKey.Text, uxSecret.Text);
uxOpen.Click += new EventHandler(uxOpen_Click);
uxAuthStart.Click += new EventHandler(uxAuthStart_Click);
uxAuthComplete.Click += new EventHandler(uxAuthComplete_Click);
uxUpload.Click+=new EventHandler(uxUpload_Click);
myFlickr.OnUploadProgress += new FlickrNet.Flickr.UploadProgressHandler(myFlickr_OnUploadProgress);
}

Now let us open an image for uploading…


void uxOpen_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Pictures|*.jpg";
if (ofd.ShowDialog() == DialogResult.OK)
{
uxFile.Text = ofd.FileName;
fileSize = ofd.OpenFile().Length;
Image img = Image.FromFile(ofd.FileName);
uxPicture.Image = img;
}
}

and then start authentication.


void uxAuthStart_Click(object sender, EventArgs e)
{
flickrFrob = myFlickr.AuthGetFrob();
string url = myFlickr.AuthCalcUrl(flickrFrob, FlickrNet.AuthLevel.Write);
System.Diagnostics.Process.Start(url);
}

This uses something called Frob (cookie kinda stuff) and generates a URL which is then opened up in the user’s default browser. Remember, at this point, user will have to sign in and authenticate the access request from this application.

Once the user completes the authentication and comes back to the application, we gets the token for that user.


void uxAuthComplete_Click(object sender, EventArgs e)
{
try
{
FlickrNet.Auth auth = myFlickr.AuthGetToken(flickrFrob);
myFlickr.AuthToken = auth.Token;
uxToken.Text = auth.Token;
uxUser.Text = auth.User.UserId;
}
catch (FlickrNet.FlickrException ex)
{
MessageBox.Show("User didn't approve!\n\n" + ex.Message);
}
}

The token is assigned to the Flickr object to enable access to that user’s account. It can be saved for later use without doing this authentication process again.

Now we are all set to upload the picture to flickr.


private void uxUpload_Click(object sender, EventArgs e)
{
uxProgress.Maximum = Convert.ToInt32(fileSize / 1000);
uxProgress.Value = 0; try
{
FlickrNet.Photo p = new FlickrNet.Photo();
System.Threading.Thread threadUpload = new System.Threading.Thread(delegate()
{
p.PhotoId = myFlickr.UploadPicture(uxFile.Text, "Sample Title", "Sample Description", "Sample Tag", false, false, true);
p.UserId = uxUser.Text;
FlickrNet.Photoset mySet = myFlickr.PhotosetsCreate("New Photoset", p.PhotoId);
System.Diagnostics.Process.Start(p.WebUrl);
}); threadUpload.Start();
}
catch (Exception ex)
{
MessageBox.Show("Upload failed!\n\n" + ex.Message);
}
}

Here we set the progress bar values and then use a new thread different from UI thread to call the Upload method. We also create a new photo set and add this photo to it.

The last thing is to make sure that the progress bar is updated properly.


private void myFlickr_OnUploadProgress(object sender, FlickrNet.UploadProgressEventArgs e)
{
if (e.UploadComplete)
{
this.Invoke((MethodInvoker)delegate()
{
uxProgress.Value = 0;
});
}
else
{
this.Invoke((MethodInvoker)delegate()
{
uxProgress.Value = e.Bytes / 1000;
});
}
}

That’s it… Hope this was useful to you and as always, feel free to ask any questions you may have on this…

Tuesday, February 24, 2009

Nullsoft Scriptable Install System (NSIS)

I have been using Visual Studio’s ‘Setup Project’ template for creating Windows installers to install my applications on a Windows computer. It’s pretty straight forward and easy, but gets a bit complicated when we need to do something more advanced. I knew there were things like InstallShield but they cost money.

Recently I was introduced to a new tool named as Nullsoft Scriptable Install System (NSIS). It’s completely free, and is a professional open source system to create Windows installers. It is driven by scripts (using a custom language) and offers a myriad of built-in features and functions covering all the basic installer necessities, from layout of install wizard dialogs, to manipulating files and registry keys.

Installing NSIS is very easy. Go to its home page at http://nsis.sourceforge.net and download the latest version. I used 2.43.

There are two types of installers that can be created using NSIS. The simple one is based on zip file. You package all your files into a single zip file and then feed it to the NSIS (Main Menu > Compiler > Installer based on ZIP file).

Zip2Exe It will generate a setup exe which the end user can execute to copy your files into a specified directory.

Zip2ExeSetup

The next option is the more powerful and flexible one. You create a NSIS script file (which is just a text file with extension as .nsi) with all the details of the installer like how many navigation pages it should have, what files need to be copied, and what values to be added to registry, etc. All these are specified through NSIS's own script language which is fairly easy to learn.

Once the script is ready and all the required files mentioned in the script are placed at the proper folders, you can right click on the script file and choose 'Compile NSIS Script' option. NSIS will then compile this script and will create a single setup exe file.

Now let us see the internals of such a script file. In this example, I am creating a Windows installer for my free software tool SQL Analyzer.

[Remember to get a fine text editing tool such as Notepad++ which has line number support and syntax highlighting for NSIS].

Initially I am defining some constants using the !define keyword. These are some string constants that will be used later on.

!define PRODUCT_NAME "SQL Analyzer"
!define PRODUCT_VERSION_MAJOR 7
!define PRODUCT_VERSION_MINOR 0
!define PRODUCT_DISPLAY_VERSION "7.0"
!define PRODUCT_PUBLISHER "Coolwayfarer"
!define PRODUCT_WEB_SITE "http://www.codeplex.com/sqlanalyzer"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" ; 
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_INSTALL_DIR "$PROGRAMFILES\SQL Analyzer"

Anything that comes after a $ sign is a predefined constant or variable. For example $PROGRAMFILES will translate into the user’s program files folder (typically C:\Program Files\).

Next we need to specify what compression technique we are using and what kind of user interface is required for the installer.

SetCompressor /SOLID lzma
!include "MUI2.nsh"

Here I am using the lzma. Don’t worry about that, it gives maximum compression. I also include a header file (you don’t need to get a copy of that file to include it) for the settings for Modern UI 2 (MUI2) which is the latest version of a user interface in a wizard style.

Next, the settings for the installer interface are specified.

!define MUI_ABORTWARNING
!define MUI_ICON "resources\sqlanalyzer.ico"
!define MUI_UNICON "resources\sqlanalyzer.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "resources\sqlanalyzerheader.bmp"
!define MUI_HEADERIMAGE_RIGHT
!define MUI_HEADER_TRANSPARENT_TEXT
!define MUI_WELCOMEFINISHPAGE_BITMAP "resources\sqlanalyzerwelcome.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH

As you can see, things like MUI_ICON are predefined properties/settings. Here I have specified an icon for the installer and two images, one for the header and another one for the welcome page. Note that the files are put in a relative path to the script file.

Now the different wizard pages in the installer are specified.

; Welcome page
!insertmacro MUI_PAGE_WELCOME

; License page
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "resources\license.txt"

; Instfiles page
!insertmacro MUI_PAGE_INSTFILES

; Finish page
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

Anything that starts with a semicolon is a comment. So I have pages like Welcome page, license page, etc. defined here. Note that in the finish page, I have an option specified to show readme file and it points to the file README.txt in the installed location ($INSTALLDIR). We will see in a moment that as part of our installation, we are copying this file as well.

Now we specify some basic settings for the installer itself.

Name "${PRODUCT_NAME}"
OutFile "${PRODUCT_NAME} Setup.exe"
InstallDir "${PRODUCT_INSTALL_DIR}"
ShowInstDetails show
ShowUnInstDetails show
BrandingText "${PRODUCT_PUBLISHER}"
RequestExecutionLevel admin

We are making use of the constants we defined earlier here to specify things like the installer file (OutFile: which will be now ‘SQL Analyzer Setup.exe’).

Now the settings are complete and we need to define the actions during the installation. This is done by defining a section with some name.

Section "MainSection" MainSection
;Action goes here...
SectionEnd

Within this section, first we need to set the out path (which is the installation directory) and then copy all the required files to this path.

SetOutPath "$INSTDIR"
SetOverwrite ifnewer

;Copy files
File "/oname=sqlanalyzer.ico" "resources\sqlanalyzer.ico" ;Binary of the application.
File "/oname=SQLAnalyzer.exe" "files\SQLAnalyzer.exe" ;Binary of the application.
File "/oname=sqlanalyzer.gif" "files\sqlanalyzer.gif" ;A sample screen shot.
File "/oname=README.txt" "files\README.txt" ;Readme file.
File "/oname=RICHTX32.OCX" "files\RICHTX32.OCX" ;Required OCX control: Rich Text Box.
File "/oname=COMDLG32.OCX" "files\COMDLG32.OCX" ;Required OCX control: Common Dialog. 
File "/oname=MSFLXGRD.OCX" "files\MSFLXGRD.OCX" ;Required OCX control: Flex Grid.

Next, I am registering the dependent OCX controls and creating Start Menu shortcuts.

;Register the OCX controls.
Exec 'regsvr32 "$INSTDIR\RICHTX32.OCX" /S'
Exec 'regsvr32 "$INSTDIR\COMDLG32.OCX" /S'
Exec 'regsvr32 "$INSTDIR\MSFLXGRD.OCX" /S'

;Create Start Menu folders and shortcuts.
CreateDirectory "$STARTMENU\Programs\${PRODUCT_NAME}"
CreateShortCut "$STARTMENU\Programs\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\SQLAnalyzer.exe"
CreateShortCut "$STARTMENU\Programs\${PRODUCT_NAME}\README.lnk" "$INSTDIR\README.txt"
CreateShortCut "$STARTMENU\Programs\${PRODUCT_NAME}\Sample.lnk" "$INSTDIR\sqlanalyzer.gif"
CreateShortCut "$STARTMENU\Programs\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"

;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"

Any external tool can be used using the Exec keyword. If you need to run your own custom tool as part of installation, first copy that tool and then use this command. NSIS can create an uninstaller automatically using the keyword WriteUninstaller.

If we need this product to appear on Windows installed programs list (Add/Remove Programs), then we need to write a registry entry as below.

WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\sqlanalyzer.ico"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_DISPLAY_VERSION}"
WriteRegDWORD ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "VersionMajor" "${PRODUCT_VERSION_MAJOR}"
WriteRegDWORD ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "VersionMinor" "${PRODUCT_VERSION_MINOR}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"

We are almost done and only thing left now is to instruct NSIS on what to do while the uninstaller is executed. Well, we need to remove whatever files we have copied, directories and shortcuts we have created, and registry entries we have made. This is specified in a section named Uninstall as below.

Section "Uninstall"
;Unregister the OCX controls.
Exec 'regsvr32 -u "$INSTDIR\RICHTX32.OCX" /S'
Exec 'regsvr32 -u "$INSTDIR\COMDLG32.OCX" /S'
Exec 'regsvr32 -u "$INSTDIR\MSFLXGRD.OCX" /S'

;Delete all the files
Delete "$INSTDIR\sqlanalyzer.ico"
Delete "$INSTDIR\SQLAnalyzer.exe"
Delete "$INSTDIR\sqlanalyzer.gif"
Delete "$INSTDIR\README.txt"
Delete "$INSTDIR\RICHTX32.OCX"
Delete "$INSTDIR\COMDLG32.OCX"
Delete "$INSTDIR\MSFLXGRD.OCX"
Delete "$INSTDIR\Uninstall.exe"

;Remove the installation folder.
RMDir "$INSTDIR"

;Remove the Shortcuts
Delete "$STARTMENU\Programs\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk"
Delete "$STARTMENU\Programs\${PRODUCT_NAME}\README.lnk"
Delete "$STARTMENU\Programs\${PRODUCT_NAME}\Sample.lnk"
Delete "$STARTMENU\Programs\${PRODUCT_NAME}\Uninstall.lnk"
RMDir /r "$STARTMENU\Programs\${PRODUCT_NAME}"

;Remove the entry from 'installed programs list'
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
SectionEnd

That’s it! Now make sure that the extension of this script file is .nsi (download the complete file from here). Right click on this file from Windows Explorer and you will see an option ‘Compile NSIS Script’ if you have successfully installed NSIS.

sa9If there is any error, the compiler will inform about it specifying the line number in the script. So it is easy to fix issues. If everything went fine, the installer exe will be created at the same location.

Now let us see how the installer interface looks like with the settings in the script file.

sa1This is the first welcome screen. The image on the left is the onwe we specified with ‘sqlanalyzerwelcome.bmp’.

sa2Here in the second page the license from a text file is displayed. The ‘Install’ button will be enabled only when  ‘I accept…’ checkbox is checked.

sa3 This screen shows the progress of the installation.

sa4 This is the final page with an option to show Readme file. After the installation, the Start Menu shortcuts are created as below.

sa5The product will also be listed under ‘Add/Remove Programs’

sa6Now on clicking the Uninstall button, the uninstaller will get executed and will remove all the changes we have done.

sa7

You can download all the files and the script as a zip from here or just try out the installer from here. Let me know if this article helped you and feel free to post any questions you may have. Remember to first check out the tutorial and documentation on NSIS site which is very detailed.

Thursday, November 27, 2008

Windows Live Writer Plugin Development

Windows Live Writer is a cute small free blog publishing desktop application. If you are tired of the browser based tools to post your blogs, you must try Writer where you can create rich content posts offline and then publish to your blog hosting server when you are online.
lwplugin0
Windows Live Writer can be easily installed by double clicking the downloaded WLinstaller.exe file. To The initial wizard during the startup will help to configure to an existing blog or to create a new blog. There are no other additional configurations or settings involved.
Plugins helps in extending the capabilities of Writer to insert, edit, and publish new types of content. It is very easy to develop a plugin if you are a .NET developer. For the plugin development no separate SDK is required as all the APIs comes with the installation and will be available in the installation folder typically at C:\Program Files\Windows Live\Writer.
lwplugin4
lwplugin1
lwplugin2
lwplugin3
There are two types of content source plugins a) Simple (inserts custom html) and b) Smart (inserts custom html with editing options).
Content created by both simple and smart content sources can originate from an Insert dialog box, a URL, or Live Clipboard data. Each content source plugin can support creating content from one or all of these contexts.
In this post, we will see how we can develop a Simple Content Source Plugin through Insert Dialog Box. You can use Visual Studio 2008 or 2005 or 2003.
  • Launch Visual Studio and start a new Class Library Project in C#.
  • Add a reference to the WindowsLive.Writer.Api assembly (located in the directory C:\Program Files\Windows Live\Writer).
  • Create a new class derived from ContentSource base class from this API.
  • Apply the WriterPluginAttribute to the new class that will define the plugin properties. (Use a new GUID to identify this plugin. If an image is specified in the attribute, add this image as an embedded resource to the project. The publisher URL and description will appear in the Plugins options in Writer).
  • Apply the InsertableContentSourceAttribute to the new class that will define the plugin content. This will appear as the menu name under Insert menu.
  • Override the CreateContent method and code the required functionality there.
  • Add a Post Build event to the project to copy plugin dll to the Writer plugins directory after it is built (XCOPY /D /Y /R "$(TargetPath)" "C:\Program Files\Windows Live\Writer\Plugins\").
  • Build the project and then run Windows Live Writer to test and debug. New plugin will appear under Insert menu.
The complete code snippet for a hello world plugin is given below:
using System.Windows.Forms;
using WindowsLive.Writer.Api;

namespace LiveWriterPlugin
{
[WriterPluginAttribute
("8CFEFA0C-6366-419f-9590-20A6590728DC",
"My Sample Plugin",
ImagePath = "mypluginimage.png",
PublisherUrl = "http://ctlabs.blogspot.com",
Description = "A sample plugin that can insert hellow world in your blog posts")]

[InsertableContentSourceAttribute("My Sample Plugin Content")]
public class MyPlugin: ContentSource
{
public override DialogResult CreateContent(IWin32Window dialogOwner, ref string newContent)
{
DialogResult result = MessageBox.Show("Do you want to insert this sample content?","My Plugin",MessageBoxButtons.OKCancel);

if (result == DialogResult.OK)
{
newContent = "Hello World from Plugin";
}

return result;
}
}
}

That's it. Look at the above images to see this plugin in action. Happy plugin development!

Thursday, October 30, 2008

Latest from Microsoft

New technology/product release spree that Microsoft seems to be in lately has come to its high with the Professional Developers Conference (PDC) 2008 concluding today at Los Angeles, USA.

It's been not very long since Microsoft has released .NET 3.0/3.5 with completely new technologies like WPF, Silverlight, WCF, and so on. Recently they released the next versions of them (Silverlight 2, and .NET 3.5 SP1) and PDC saw the announcement of Silverlight 2 Tool Kit and WPF Tool Kit.

Other Products/Technologies that were previewed at PDC include Windows 7, Windows Azure, and Visual Studio 2010 / .NET 4.0.

Windows 7 (formerly codenamed Blackcomb and Vienna) is the next version of Microsoft Windows and the successor to Windows Vista. I tried out the developer preview version of Windows 7 Ultimate (Build 6801) and found it not much different from Windows Vista in look and feel. But under the hood, it includes a number of new features, such as advancements in touch, speech, and handwriting recognition, support for virtual hard disks, improved performance on multi-core processors, improved boot performance, and kernel improvements. Read more here.

Windows Azure is Microsoft's operating system for the cloud. The Azure Services Platform combines cloud-based developer capabilities with storage, computational and networking infrastructure services, all hosted on Microsoft's servers. Read more here.

The next version of Visual Studio is 2010 with .NET Framework 4.0. Read more here.

I wonder why Microsoft is still continuing the calendar year naming for the versions of Visual Studio while they discontinued it for Windows. Anyway, as developers in Microsoft technologies, there is no end to our continuous learning and re-learning cycles.

Wednesday, September 17, 2008

Microsoft Live Mesh

Live Mesh is a new software product from Microsoft that was released to public few months back. It helps in synchronizing files and folders that are used across different computers and devices.


 When you work on a project or document on more than one computer (say one at home and one at work), you often land into this issue of keeping the files synchronized. Live Mesh solves this issue by connecting all the devices together, so that you don’t have to manually copy and keep the latest files by yourself.

To use Live Mesh go to http://www.mesh.com and sign in using a Windows Live ID (hotmail email address is good enough). After that, add a device (say your work computer) to the Mesh by installing the Live Mesh client software. Now you can choose any folder to be a Live Mesh Folder and the files in that folder will be automatically synchronized with other devices you have added to your Mesh.


Live Mesh also has a Live Desktop as part of the connected devices that you can access from any other computer (say internet café) through a browser. This Live Desktop shows all Mesh Folders and files and it is even possible to remotely connect to a computer.

Another useful feature is the ability to share a Mesh Folder with a remote user. I played with this feature today and found the updates I make to a file are visible to the shared user within few seconds.

Microsoft is releasing development APIs and SDKs as well, for developers who can make use of the Live Mesh platform to create applications that are accessible across multiple devices. Live Mesh is now in Tech Preview state (not even Beta) and Mobile and Mac support are also on its way.

Wednesday, September 03, 2008

Google Chrome - Browser from Google

Today, Google released their new product, Google Chrome, an interesting internet browser. As one would expect from Google, it is much faster, compact and less cluttered.


Like most other Google products, Chrome is also released as Beta version, but I would assume that it will be much stabler than a Release Candidate product from Microsoft. :)


As Google have built this browser from scratch keeping in mind today's Rich Internet Application scenarios, there are several architectural differences from other popular browsers. For example, each tab opened in the browser runs as a separate process, allowing one to close a hung tab without affecting other open tabs.



The memory used by each site and plug-ins can be seen through its task manager... so we know who is eating up more resources, and can kill them instantly. Read more about such technical details as a comic book here.


Google Chrome has a mix of useful features from both Internet Explorer 8 and Fire Fox 3. One such feature is incognito tab, where you can browse a site without leaving any trace or history.

After installing Google Chrome today, I immediately fell in love with that. In fact, I have changed my default browser from IE to Chrome. I may still continue to use Fire Fox, as it has got many useful extensions and plug-ins, until they are available in Chrome.


Many sites didn't work as expected in Chrome as they didn't understand this new browser. Windows Live Mail complained, but let me get in with the older version. Even Blogger complained "Your browser's cookie functionality is disabled", but on the second attempt it was fine. The Silverlight installation page displayed "This Web browser or operating system may not be compatible with Silverlight.". But I was able to view a Silverlight content without any issues.

Wednesday, August 27, 2008

Google Sites

Few months back (February 2008) Google released a new web product known as Google Sites. Unlike Google Page Creator, it has more features to build and host complete websites for free.



The announcement on Google Page Creator home page says that they are getting rid of this service to focus on the new Sites service. The complete announcement is here:

We are no longer accepting new sign-ups for Page Creator because we have shifted our focus to developing Google Sites, which offers many of the capabilities of Page Creator along with new features like site-level navigation, site-level headers, control over who can see and edit your site, and rich embeddings like calendars, videos, and Google docs.

If you are currently a Page Creator user, you can continue to use Page Creator and your pages will automatically be transitioned to Google Sites later this year. We are committed to making this transition as smooth and easy as possible, and we will post more details as we get closer to the transition time. You can also manually move your web pages from Page Creator to Google Sites or other service providers at any time.

I played around with Sites and found it very easy to host a new site. All it took was few clicks. Here is the site I created: http://sites.google.com/site/sameerct



It has a killer feature to host files. While creating a new page, you can choose its type as File Cabinet and you get unlimited version controlled file storage for free.

Here is a sample file I hosted: http://sites.google.com/site/sameerct/sourcecode/SilverlightApplication1.zip

Really cool… Thank you, Google!

Thursday, February 21, 2008

WayFormat: Source Code Color Formatter

There are lots of tools and ways to color format source code snippets so that they appear on blog posts and sites as they do in Visual Studio or other source editing tools. One of them is available at http://www.manoli.net/csharpformat/ which nicely formats the code to colorful HTML. But I was looking for a small desktop application that we can take along to use offline. Thankfully Manoli has provided the source code on the website for anyone to make use of it.



So, I made a small utility and named it WayFormat (Yeah… you guessed it right, the ‘Way’ comes from ‘Coolwayfarer’!). This standalone windows client application color formats the source code snippets in C, C++, C#, HTML, ASP, ASPX, XML,XAML, JScript, Java Script, Visual Basic, VB.Net, SQL, TSQL, PL/SQL and MSH (code name Monad) to style sheet enabled HTML code for publishing on a web site or in a blog. The tool has option to display line numbers, provide alternate line background color, and embed CSS.


Here is a sample code snippet formatted using WayFormat. I have hosted the css file at http://sameerct.googlepages.com/csharp.css and added a link tag in the head section of my blogger template pointing to this style sheet.


/// <summary>
/// Provides an option to save the CSS file.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lnkCSS_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
FileInfo fileCSS = new FileInfo("csharp.css");

SaveFileDialog dlgCSS = new SaveFileDialog();
dlgCSS.FileName = "csharp.css";
dlgCSS.Filter = "Cascading Style Sheet|*.css";
dlgCSS.AddExtension = true;
dlgCSS.DefaultExt = "*.css";

if (dlgCSS.ShowDialog() == DialogResult.OK) fileCSS.CopyTo(dlgCSS.FileName);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}

I have made the source code open and is hosted at CodePlex at http://www.codeplex.com/wayformat so that it is available to anyone interested to add more features or use it along with other applications. Download the executable or source code from CodePlex and use CodePlex Discussion Forum and Issue Tracker to post your comments or report any bugs you may find.

And well, there is an easier way to color format source code without using any tools. Copy paste your source code from Visual Studio to Microsoft Word and the save the word document as html web page. Now copy the content from web page (not the source) and paste directly in the blog post editor. It will look as below:

FileInfo fileCSS = new FileInfo("csharp.css");

See that the system classes like FileInfo are color coded too. :)

Thursday, August 16, 2007

CodePlex and SQLAnalyzer.NET

CodePlex is Microsoft's open source project hosting web site. At workplace we have lots of tools and applications to manage our software projects. But when it comes to our personal (hobby or serious) projects that we undertake after work hours, it is really hard to keep track of all the aspects of the project, if it is little too bigger. For the open source enthusiasts, CodePlex provides the solution by giving a completely free source code hosting platform with integrated tools for configuration management, release management, issue tracker, discussion forum, licensing and collaboration.

I immediately liked the wiki based interface that was simple yet cool and powerful. Making a higher and better version of my earlier tool SQLAnalyzer was there in my To Do List since long back. So I started a new project in CodePlex and named it as SQLAnalyzer.NET.


The tiny tool called CodePlex Client provides access to the CodePlex Team Foundation Server (where the source code will be stored) using an edit-merge-commit style of source control access. This tool was so easy to use and the ability to checkout and check-in source codes remotely through Internet was faster than one could imagine.


My ideas for SQLAnalyzer.NET is posted on the CodePlex page and I plan to keep it updated. Here is the initial technical details of the plan:


- Consists of a Client Host Application and pluggable functional modules
- Host is coded in VB.NET with .NET 2.0 ( A future version can use WPF if required)
- Host application provides framework for connecting to database server and getting the objects and their details
- Functional modules (Plug-ins) can be developed in any .NET language
- Plug-ins will refer Host Application libraries and will provide independent functionalities


I am also looking forward to having more developers involved in this project. If you are interested you can register in CodePlex and post a message in the forum of SQLAnalyzer.NET.

Saturday, August 11, 2007

Windows Live SkyDrive

Remember those old days when there were lots of online companies offering free storage space on internet? During 2000, I had uploaded lots of my files into one such net drive, only to find later that they became a paid service. Even though I liked the convenience of online storage compared to the problematic floppy drives (USB Drives were not common those days), I wasn't ready to pay for that.

Then came the storage capacity boom in email services and I stored all my important files as attachments in GMail, Yahoo Mail and Hot Mail. It worked fine, but was not very convenient to locate and download files. USB drives still helped but there were many situations where I needed to access one of my files when I wasn't carrying my USB drive.

Now I heard about the new service from Microsoft branded under the Live group. It was initially called as Live Folders. I signed up for the beta and after waiting for few weeks, they opened it up on 2007-August-01. I liked it immediately as it had a simple interface. Besides the 500 MB storage option which we can use to store any kind of files on net organized under folders, it also provided options to share these files to a defined group or public. That was an excellent way to pass on those huge files, when you don’t have access to the FTP server.



This week, Microsoft renamed this service to SkyDrive to indicate that all our files are there in the clouds of the internet. They have also refined the user interface and added support for drag and drop and the thumbnail preview option for image files. Let us wait and see how Google is going to beat this now? Will that GDrive from Google with infinite storage become a reality soon?

Link: skydrive.live.com

A sample shared file:

Sunday, April 08, 2007

Virtual PC 2007

I first encountered with this wonderful virtualization product from Microsoft sometime back when we had to setup 20 computers with identical software installations for a training purpose. The software packages we required were really huge taking up hours to install (SQL Server 2005 and Visual Studio Team System 2005). Virtual PC helped us here. All we had to do was to setup one Virtual PC image with all of them and it was just the matter of copying these files into the computers and installing only the VPC software on them.


Now that I have a new laptop with Windows Vista, I didn’t want to install all my development tools on it to make it slower and problematic. Solution? Virtual PC! The new version 2007, which is totally free, now supports Vista as both host and guest. So I have a Windows XP Virtual PC with old favorites like VB6, and another VPC with Windows 2003 and VS 2003 and VS 2005. Another one is in making with Vista and .NET 3.0.


Virtual PC also helps me in trying out any software without disturbing my original system. And whenever I get new software that is not working in Vista, I can use them in XP or 2003. Now I am a complete Virtual PC enthusiast!

Wednesday, March 21, 2007

Have you heard about AGLOCO?

It was in the air since 2006. But I just heard about it through a forwarded mail that was no different from the normal spamming mails that tell you about making money from internet. But I was curious to know what that word meant (coz it sounded funny?!) and followed the link. I had to do a lot of googling to see that it meant 'A GLobal COmpany'. And their logo looked pretty cool and the motto was also interesting. "Own the Internet".



There were lots of such scams like this including the offer to own a piece of land in moon. I was always against these ideas and used to delete such mails just by getting an hint from the subject line.

Just in case, if you want to know more about what I found out by spending (or wasting) more than an hour on this, read on...

AGLOCO is a new internet startup promising its users to pay money for the time they spend surfing the net. It works on building up on the pyramid model where one user refers another one and benefits from the referral. You also need to install a browser toolbar which will be available later.

I always believed that there is no such thing as free money from internet. But further reading on AGLOCO showed that there was a similar venture named AllAdvantage and it actually paid its users, though ultimately it fell victim to the dot-com bubble burst.

Considering that Ad-words model from Google is now a successful model (and one of my close friends confirmed that he started getting money from Google by having Google Ad-words advertisements on his site) and the same Stanford MBAs behind AllAdvantage are the leaders of this startup, there is a chance that this could take off well.

If you google for AGLOCO you will find lots of sites and blogs, some supporting it and some against it. But nobody is saying that it is not worth trying.

So for the first time in the history of my internet usage :) , I decided to try it out and signed up using an email id I rarely use and using a referral code I got. If you also want to try this out use my referral code link by clicking at http://www.agloco.com/r/BBCQ8478

I also would like to hear what you think of this.... :)

Some links for your reference:
AGLOCO site: http://www.agloco.com
Venture Beat comment > http://venturebeat.com/2006/11/20/agloco-luanches-wants-to-pay-you-to-surf-the-internet/
Wikipedia about AllAdvantage: http://en.wikipedia.org/wiki/AllAdvantage

Tuesday, November 29, 2005

Google Desktop Sidebar



Power of Google Desktop Search (http://desktop.google.com) is already appreciated and accepted by everyone. Recently I came across with a new feature in that, called 'Sidebar', that made me reinstall Google Desktop again on my machine, as I had abandoned it long back, just because I never do vigorous searches on my computer.

Google Desktop now includes Sidebar, a floating panel that gives one-glance access to all sorts of personalized information. This panel can be conveniently placed on the desktop and can be minimized, if we require more desktop space.

There are a lot of tiny plug-in panels that can be added to this sidebar and I was specifically happy with To Do List, Scratch Pad, Calendar, Analog Clock and Word-A-Day. Scratch Pad is like having a notepad open all the time, so that we can key down whatever we want, which will get saved instantly.

May be I will choose panels like Weather, Maps, Traffic, etc. later on when they make it available for Indian cities rather than just US cities.

Wednesday, September 28, 2005

Google Earth


Hope you all are aware of a latest software from Google. It's called Google Earth (http://earth.google.com).

It's an amazing software where you can see the whole earth, as seen from a satellite, and can zoom into any places to see its details.

Sadly, my places in Kerala are not covered with full details. You can figure out rivers and big land marks though.

For cities like Bangalore and Delhi in India, you can see even individual buildings clearly. See the attached image of Banashankari bus stand, which is near by my office. You can even see buses and cars on the road.



Yesterday, there was a news in Bangalore's Times of India, saying that secret government establishments like Air-force and Navy buildings are clearly exposed in Google Earth. After this news, now everybody is busy finding these places in Google Earth. The next step is to locate their houses and colleges and offices or what ever…

American cities are covered with most details, where you can see buildings in different views with full details, and has the ability to search locations by addresses.

Friday, August 26, 2005

Google Talk

Here is an answer to Yahoo Messenger and MSN Messenger from Google. It is Google Talk (http://www.google.com/talk). It unites net telephony with an instant messaging network and builds on the Gmail e-mail service.

Here are some comments on it from my friends:

> Initial reports say that it is awesome. We have to wait and watch until it catches on and the bandwidth runs out :-)

It is really awesome man. We've been testing it internally for sometime now. The audio clarity is simply astounding. It is based on Jabber which is an open protocol. Any Jabber client can be used to connect to the Talk service.

Oh, and Google will never run out of bandwidth :-)

> Maybe google has a trick up their sleeve for effective utilization of bandwidth. It would be interesting to see what that is. I don't know what tricks they do internally, but they do spend a lot of effort on compression, optimization and the best use of bandwidth. The best part is the client which is just a 900K download.

Friday, June 24, 2005

Yahoo 360

Heard of the new service from Yahoo? It is Yahoo 360° (http://360.yahoo.com). See what yahoo claims about that…

Yahoo! 360° is a central place where you can keep connected with friends and family and easily share what matters most to you. You can start a blog, share photos, recommend favorites, or post pictures from your mobile phone. You can even show your friends what you're up to on Yahoo!. Share as much as you want, with whomever you want.

Sounds cool… And I am a great fan of Yahoo. I am addicted to their services like Address Book, Briefcase, Notepad, Calendar, Photos, Movies, etc besides the most popular Mail and Messenger services.

So decided to try out this too…. Its interesting…. There is a Blast Message option where you can put some messages and it will be available to all your friends connected through Yahoo 360. But getting my friends to connect to this will be difficult!

See my 360 page at http://360.yahoo.com/sameerct.

Tuesday, December 28, 2004

MSN Spaces

So Microsoft is also here in the field of blogging with MSN Spaces (http://spaces.msn.com). Cool features like running picture slide show and smooth editing tools make it both fun and easier to be up on the msn spaces. Have a look at my space at http://spaces.msn.com/members/sameerct