Free eBooks from Microsoft

May 7th, 2012

Click here to get list.

Books available in pdf, mobi and epub formats.

image

VN:F [1.9.11_1134]
Rating: 0.0/5 (0 votes cast)

Useful Links

On architecture–podcasts by Grady Booch

May 1st, 2012

Listen to software architecture podcasts here.

Mr. Grady Booch has recoded all of his articles from architecture column of IEEE Software magazine.

VN:F [1.9.11_1134]
Rating: 0.0/5 (0 votes cast)

Architecture

K-MUG DevCon 2012

May 1st, 2012

The event for software professionals who want to get ahead and stay ahead.

Why attend DevCon 2012?
Because you’ll return to the office with cutting-edge insights and expertise that will make life easier for you (and everyone else) at work. Immerse yourself in IT learning opportunities and get your questions answered by renowned technology experts. Even more importantly, engage and collaborate with Microsoft MVPs and thousands of your IT peers, building connections that will last beyond your day at DevCon. If you have any cool Windows Phone App idea, you could win Nokia Lumia 800 as well. Please check the “Idea Contest” page.

When
19 – May – 2012

Where
ParkCenter, Technopark, Trivandrum, Kerala, India

Register
Click here

VN:F [1.9.11_1134]
Rating: 5.0/5 (1 vote cast)

General

Extension Methods in .NET

April 30th, 2012

Below code snippets explains how to create a simple extension method in C#

Important things to note are:

  • Make sure you have a “static class” (or class library) for this. In case of class library, you will have to add reference. If this is in same code page then you can use it directly
  • Use “this” in the function parameter area.
public static class MyExtClass
{
    // This method is to set the value of target variable to ZERO
    public static void SetZero(this int num)
    {
        num = 0;
    }
}

You can use this like you use any built-in extension method like .ToString().

	int number = 34;
 
        // this is how you will have to use the method
	number.SetZero();
 
	Text = number.ToString();
VN:F [1.9.11_1134]
Rating: 5.0/5 (2 votes cast)

Code Snippets, DOTNET

The Architecture Journal – MSDN

April 23rd, 2012

Read interesting things about various IT related architecture here – http://msdn.microsoft.com/en-us/architecture/cc511514

VN:F [1.9.11_1134]
Rating: 4.0/5 (2 votes cast)

Architecture

SVN post-commit in C#–Send mail on commit

April 18th, 2012

Basically, any executable file you place in \path\to\repository\hooks will trigger when ever you commit. It can be a post-commit.bat or post-commit.exe.

Below script will send you a mail notification in this format:

Subject: [MyProject SVN] rev:14 user:praveen
Revision: 14
Repo: D:\Repositories\testrepo
Server Time:18-Apr-2012 01:06:08

A   trunk/menu-sharing.txt
A   trunk/menu-shar.ini

This is a console applicaiton. Also sorry for the poor exception handling. This is just for demonstration purpose :)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.Net;
using System.Diagnostics;
using System.IO;
using System.Reflection;
 
namespace post_commit
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                string str = string.Empty;
                string user = string.Empty;
 
                StringBuilder sb = new StringBuilder();
                foreach (string s in args)
                {
                    str += s + " | ";
                }
 
                user = ExecuteProcess("author -r " + args[1] + " " + args[0]);
 
                sb.Append("Revision: " + args[1] + "\r\nRepo: " 
							+ args[0] + "\r\n");
                sb.Append("Server Time:" + DateTime.Now.ToString
						("dd-MMM-yyyy hh:mm:ss"));
 
 
                str = ExecuteProcess("changed -r " + args[1] + " " + args[0]);
 
                sb.Append("\r\n\r\n" + str);
 
 
 
                SendMail(user.Replace("\r\n", string.Empty), args[1], 
								sb.ToString());
            }
            catch
            {
            }
        }
 
        private static string ExecuteProcess(string arg)
        {
            ProcessStartInfo psinfo = new ProcessStartInfo();
  	    // make sure you have svnlook.exe available in your machine. 
	    // Take care of your path.
            psinfo.FileName = Path.GetDirectoryName(Assembly
			.GetExecutingAssembly().Location) + "\\bin\\svnlook.exe";
            psinfo.Arguments = arg;
            psinfo.UseShellExecute = false;
            psinfo.RedirectStandardOutput = true;
 
            string str = string.Empty;
            using (Process exeProcess = Process.Start(psinfo))
            {
                exeProcess.WaitForExit();
                str = exeProcess.StandardOutput.ReadToEnd();
            }
            return str;
        }
 
        private static void SendMail(string user, string rev, string content)
        {
            try
            {
                MailMessage mail = new MailMessage();
                mail.From = new MailAddress("noreply@mymailpraveen.com");
                mail.Subject = "[MyProject SVN] rev:" + rev + " user:" + user;
                mail.Priority = MailPriority.Low;
 
		// I made a generic emails.txt for you to add any number of 
		// emails without touching the project
                IEnumerable<string> emails;
                string emailsfile = Path.GetDirectoryName(Assembly
			.GetExecutingAssembly().Location) + "\\emails.txt";
                emails = File.ReadLines(emailsfile);
                foreach (var email in emails)
                {
                    mail.To.Add(email);
                }
 
                mail.IsBodyHtml = false;
                mail.Body = content;
                SmtpClient smtp = new SmtpClient();
                smtp.Host = "mail.gmi-projects.com";
                smtp.Credentials = new NetworkCredential(
			"noreply@mysmtphostpraveen","mypassword");
                smtp.Send(mail);
            }
            catch
            {
            }
        }
    }
}
VN:F [1.9.11_1134]
Rating: 5.0/5 (3 votes cast)

C#

1000 tweets completed

April 18th, 2012

Not a regular tweeter, but just completed my 1000th tweet.

image

VN:F [1.9.11_1134]
Rating: 0.0/5 (0 votes cast)

Personal

MongoDb Architecture

April 11th, 2012

Here is an interesting article on MangoDB Architecture by Ricky Ho

http://horicky.blogspot.com/2012/04/mongodb-architecture.html

MongoDB is a scalable, high-performance, open source NoSQL database. written in C++.

VN:F [1.9.11_1134]
Rating: 0.0/5 (0 votes cast)

Architecture

Pronunciation learning tool–using .NET

April 6th, 2012

This tool will help you to access to American and British pronunciation for the doubtful words without searching the internet.

I call this tool: TFD Pronounce

image

Download the application from here – from 4Shared

Download the application from here – from DropBox

Points to Note:

  • When you invoke the application, the input box will auto-fill any text in the clipboard
  • When you close the application, it will be minimized to system tray. Right click to exit the application
  • This application uses TheFreeDictionary.com to play the pronunciation.
  • Since it is a website and I use some crawling technique, this application will stop working any time when they change the website layout.
  • The application is programmed using .NET Framework 4.0 under Visual Studio 2010. You might want to install .NET framework 4.0 to execute this applicaion
  • If somebody needs source-code, please put a comment in this blog

Please provide your valuable comments.

If you are an English pronunciation learner, I recommend you to visit my past post on mis-pronounced words here.

VN:F [1.9.11_1134]
Rating: 5.0/5 (2 votes cast)

General, VB.NET

Form Follows Function–Architecture blog

April 6th, 2012

Just now I happen to visit this blog (by Gene Hughson) and found interesting.

http://genehughson.wordpress.com/

VN:F [1.9.11_1134]
Rating: 4.0/5 (1 vote cast)

Architecture