On architecture–podcasts by Grady Booch
Listen to software architecture podcasts here.
Mr. Grady Booch has recoded all of his articles from architecture column of IEEE Software magazine.
K-MUG DevCon 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
Extension Methods in .NET
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();
The Architecture Journal – MSDN
Read interesting things about various IT related architecture here – http://msdn.microsoft.com/en-us/architecture/cc511514
SVN post-commit in C#–Send mail on commit
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 { } } } }
1000 tweets completed
MongoDb Architecture
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++.
Pronunciation learning tool–using .NET
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
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.
Form Follows Function–Architecture blog
Just now I happen to visit this blog (by Gene Hughson) and found interesting.
Recent Comments