“Open Source PostgreSQL on Microsoft Azure” meetup in Islamabad

Microsoft has partnered up with the PostgreSQL Special Interest Group in Islamabad to bring you “Open Source PostgreSQL on the Cloud” on 23rd September, 2016! The session has been delivered by Mr. Ali Sufyan Butt, a Microsoft Most Valuable Professional on Visual Studio and Development Technologies.


  • Introduction to Azure & its features
  • Deploy a Ubuntu Linux VM on Azure
  • Install and configure PostgreSQL on Ubuntu Linux Server hosted on Azure
  • Build a quick demo Asp.net app and connect it through the database using EF 6.0 drivers for PostgreSQL
  • Deploy the website on Azure

Mr. Corton Privacy Policy

Personal information

This application does not collect or transmit any user’s personally identifiable information. No personal information is used, stored, secured or disclosed by services this application works with.

Technical information

No technical information is sent (such as IP addresses included in the HTTP calls the application makes) neither of that is used or stored.


  • The communication made with the app in either text or voice is not stored anywhere in any form, all speech processing is done locally, only send the message to server to send back the response.

Third parties

If the app makes use of third party services, their usage of information is excluded from this privacy policy. You will be clearly made aware of the third parties involved in the app and we will ensure the very minimal set of data is set to those third parties. The third party is our AI engine which processes the sound and sends back the text.

Report violations or get more information

If you would like to report any violations of this policy or get more information on any app, please contact us by emailing at alisufyanbutt@hotmail.com.

This is just a virtual friend, any association or personal attachment to it is not our responsibility, please do not take the responses seriously, it might be not what you like, but we made sure they would be not vulgar, offensive and indecent.

NDepend is something we can depend on

Ndepend is a tool which I am really excited to review at last. I had a long time commitment with NDepend team but I for some reasons I had been too busy in other stuff that I really missed it, But I have not forgotten it at all and been using the tool and had great benefits which I want to share with you guys.

After downloading the tool, it is fairly easy to configure the extension with Visual Studio as well as we can also use Visual NDepend tool to visually analyze the solution or assemblies.

For first timers, this link can help to install and configure http://www.ndepend.com/docs/getting-started-with-ndepend

After running this tool for the first time, I scanned my project and viola, I was in deep trouble, just kidding, I mean I got a detail report of issue with my code, code metrics, dependency graphs, Dependency Matrix and a long list of rules violated in the code. This was really a great thing to see and I immediately started to work on making the mistakes right.

NDepend is giving me insights into my code that we normally ignore, but keep following through the standards and after a few iterations with NDepend, it was all sweet code. All thanks to NDepend tooling and support.


Extension method for IEnumerable to get a deep copy cloned object.

When we assign a List object to another it does a shallow copy, and making a change into copied object reflects in source object as well. This does not serves the purpose, thus finding a ways is through extension methods.

Code Snippet
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Text;
  6. using System.Threading.Tasks;
  8. namespace Csharp
  9. {
  11.     public static class Program
  12.     {
  15.         static void Main(string[] args)
  16.         {
  17.             List<string> abc = new List<string>();
  18.             abc.Add("a");
  20.             var newList = AddAlphabet(abc);
  22.             Console.WriteLine(abc.Count);
  23.             Console.WriteLine(newList.Count);
  24.             Console.ReadLine();
  25.         }
  27.         private static List<string> AddAlphabet(List<string> abc)
  28.         {
  29.             List<string> _abc = abc;
  30.             _abc.Add("d");
  31.             _abc.Add("e");
  32.             return _abc;
  33.         }
  37.     }
  38. }

This produces following result in output



Changing the code and added an extension method will result in proper result that I expected earlier.

Code Snippet
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Text;
  6. using System.Threading.Tasks;
  8. namespace Csharp
  9. {
  11.     public static class Program
  12.     {
  13.         public static IEnumerable<T> Clone<T>(this IEnumerable<T> collection) where T : ICloneable
  14.         {
  15.             return collection.Select(item => (T)item.Clone());
  16.         }
  18.         static void Main(string[] args)
  19.         {
  20.             List<string> abc = new List<string>();
  21.             abc.Add("a");
  23.             var newList = AddAlphabet(abc.Clone<string>().ToList());
  25.             Console.WriteLine(abc.Count);
  26.             Console.WriteLine(newList.Count);
  27.             Console.ReadLine();
  28.         }
  30.         private static List<string> AddAlphabet(List<string> abc)
  31.         {
  32.             List<string> _abc = abc;
  33.             _abc.Add("d");
  34.             _abc.Add("e");
  35.             return _abc;
  36.         }
  40.     }
  41. }

This produces following result in output


We notice that it does not change the original value of source.

Privacy Policy

Privacy Statement

In this document, “we” refers to Technocrux respects your privacy and is committed to protecting your personal information. This privacy policy details how we manage your personal information and safeguard your privacy.

This privacy policy sets out how we uses and protects any information that you give us when you use this website.

We may change this policy from time to time by updating this page. You should check this page from time to time to ensure that you are happy with any changes. This policy is effective from 01 Jan 2014.

What we collect

Personal Information is that information or opinion (including information or an opinion forming part of a database), whether true or not, and whether recorded in a material form or not, about an individual whose identity is apparent, or can reasonably ascertained. As such personal information can include your name, address and contact details.

We may collect the following information:

  • real name
  • contact information including email address
  • geographic information including country of residence
  • publically accessible Twitter information such as published tweets and profile
  • technical computer and network information such as IP address, device specification and usage metrics

What we do with the information we gather:

We use this information to understand our customers’ needs and provide them with a better product and service. In particular for the following reasons:

  • identify usage trends to improve the product experience
  • analyze error and crash reports to improve application reliability
  • gather feedback on the product’s user experience for future enhancements
  • provide cross-device services without user configuration

We also collect some information from you when you use our website www.thtslink.com. Your use of services available through our website will determine the amount and type of information which we collect about you.

The only personal information we collect about you when you use our website is what you tell us about yourself, eg. by completing an online form or information you provide us when you send us an e-mail.

We use cookies

When you visit our website, our server attaches a small data file called a “cookie” to your computer’s memory.

Cookies are pieces of information that may be transferred to your computer’s memory when you visit a website for record keeping purposes. Most web browsers are set to accept cookies. However, if you do not wish to receive any cookies you may set your web browser to refuse cookies. We use cookies to provide is with anonymous information on the use of our website and to know what you find interesting on our website. We do not link this information back to your identity or other information that you have provided to us. We do not store any information that identifies you inside cookies.


We are committed to ensuring that your information is secure. In order to prevent unauthorized access or disclosure, we employ industry-standard physical, electronic and managerial procedures to safeguard and secure the information we collect online.

Supplying your information to third parties

We may disclose your personal information when we contract out some of our functions to an external service provider. This information is disclosed for the express purpose of the service that we have contracted out to them. It may not be used for any other purpose by the external service provider.

If you have any concerns about our privacy policy, the information we have recorded or believe that any information we are holding on you is incorrect, please feel free to contact us.

Worms Invasion


This winter save the world from invasion of worms in this very addictive and fun shooter. Compete with the world by showing off how best you can shoot and score more than them, so lets pick the gun and start shooting in this superb game.

Play with keyboard mouse, or gamepads, choice is yours. Play as solo or in co-operative mode, again your choice. Playing with friends always adds a fun factor.   Features

•Up to 4 Players coop

•Support to Gamepads(4 players) or same-keyboard play(2 players).

•Melee, Ranged and Exploding Enemies, with several variables for easy behavior adjustment.

•Score Collectables.

•Healing collectables.

•Weapon Inventory system. Pickup, Swap and Drop weapons.

•Mobile controls will come in next update with windows phone 8 app launch.

•Procedural Level Generation giving you infinite levels.

•More updates coming soon.

Worms Invasion – Privacy policy

This Application does not collect any personal information.

This Application does not contain any other features that could allow users to unintentionally share their personal information.

This application does requires internet connection to work properly, for submission of leaderboard score.

IIS and Skype (Fighting for the port)

During development if you stop the iis and forgot to start it. And later on restart Skype it will take over port 80 / 443, which will later on cause us an Error 0x80070020 when we try to start the website from IIS manager console.

The error code 0x80070020 translates to ERROR_SHARING_VIOLATION (The process cannot access the file because it is being used by another process.)

This issue may occur if TCP port 80 and/or 443 is grabbed by a different service.

Solution is to close Skype, and start website and start Skype again.

This might happen with other software which want to take over these ports but being a windows developer Skype is most commonly the cause of this issue.

Confirmed: Windows Phone 8.1 Developer Preview coming next week

Microsoft has officially announced Windows Phone 8.1, but is yet to release it to the general public. That said, the developer preview of Windows Phone 8.1 will be made available to registered developers soon and developers will be the first to get their hands on the final RTM version of the mobile OS once it is released by Microsoft.

If you want to try your hands onto the developer preview of Windows Phone 8.1 and want to be the first one to get the finished version of Windows Phone 8.1 when it does get released, here are the steps you need to follow.

Register as a developer

You need to first register as a developer with the Microsoft developer program. This process is free and you will not be required to pay a single cent / penny for it. Also you need not be a developer to actually register as a developer with Microsoft.

The trick is to register using the free App Studio that Microsoft released recently. Use the same email address as you have used on your Windows Phone handset and register as a developer.

Download Preview for Developers app

Preview for Developers app is basically an app that configures your phone to receive developer previews of software updates that are yet to be released by Microsoft.

Download the app from this location and install it on your Windows Phone handset.

Once installed, run the app and agree to the Terms and Conditions, sign-in using the Microsoft account using which you registered as a developer. Then agree to enable Preview for Developers and click done to complete the process.

Check for phone updates

Navigate to Settings -> Phone Update and tap on check for updates. This will connect through to Microsoft servers and check for Windows Phone 8.1 developer preview.

Your Windows Phone handset should find the developer preview update once available and begin downloading it.

General Application Policy

This Application does not collect any personal information.

This Application does not contain any other features that could allow users to unintentionally share their personal information.

This application does not requires internet connection to work properly, like authentication, loading of content.

Webinar : Windows Azure Basics

I presented this webinar online on 10th Feb, 2014. I hope it would have been a fun experience for people.

This webinar followed the following topics relating to Windows Azure:

– Windows Azure Basics
– Windows Azure Storage
– Tools and Technology
– Windows Azure Mobile Services
– How to build apps using Windows Azure Mobile Services
– Introduction to Azure portal
– Different Services offered by windows Azure

Some key links and notes:


To get PublishSetting profile visit the link below:

A publishsettings file will be downloaded and the file name will be in given format:


Dictionary App Policy

This Application does not collect any personal information.

This Application does not contain any other features that could allow users to unintentionally share their personal information.

This application does not requires internet connection to work properly, like authentication, loading of content.

Some examples of how to do good programming in C#

foreach( i=0; i < getdata (); i++) { // }

should be

var data=GetData();
foreach( i=0; i < data ; i++) { // }

The call to GetData() is reduced to one, and thus increased performance overheads.

Another example:


if (IsolatedStorageWrapper.LoadString(“ShowTipsAndTricks”) == “”)
IsolatedStorageWrapper.SaveString(“ShowTipsAndTricks”, “true”);
IsolatedStorageWrapper.SaveString(“ShowTipsAndTricks”, “”);

could be written as

IsolatedStorageWrapper.SaveString(“ShowTipsAndTricks”, IsolatedStorageWrapper.LoadString(“ShowTipsAndTricks”) == “” ? “true” : “”);

could be written as

var loadedStringValue=IsolatedStorageWrapper.LoadString(“ShowTipsAndTricks”) == “” ? “true” : “”;

IsolatedStorageWrapper.SaveString(“ShowTipsAndTricks”, loadedStringValue);

could again be written as

var loadedStringValue = IsolatedStorageWrapper.LoadString( “ShowTipsAndTricks” ) == “” ? “true” : “”;
IsolatedStorageWrapper.SaveString( “ShowTipsAndTricks” , loadedStringValue );

MagPro Privacy Policy

This Application does not collect any personal information.

This Application does not contain any other features that could allow users to unintentionally share their personal information.

We do not take or share any sort of user information to anyone at any stage. If user wants to purchase the application, only then he will be prompted to enter his credentials, but that is also not part of this application and not stored at any stage.

This application requires internet connection to work properly, like authentication, loading of content. Without internet connection user will not be able to view / download / read the content of any book or magazine, neither could they watch the digital video content.

Downloading a book is one time bandwidth consumption, later on it is loaded from in app storage, Video channels are streamed so they require a constant internet connection to work properly.

If you find anything that is not right about this app, please feel free to contact the developer.

Online Video Conference Event On Microsoft Visual C# 2012

Education is vital to a sustainable social and economic progress. Microsoft believes that when high-quality education is accessible, relevant and meaningful, citizens of all ages will have real opportunities to develop the skills they need to succeed. Keeping this in mind, Microsoft and Higher Education Commission, Pakistan (HEC) partnered in the form of an Educational Alliance. The objective is to drive the Local Software Economy and enhance capacity building.

Microsoft and HEC has organized a Training Session on Microsoft Visual C# 2012, the training comprises of 1 hours long session organized for Students. The objective of this training session is to empower and train on latest technologies and provide with the relevant mentorship and technical support.

Microsoft Visual Studio 2012 is loaded with new capabilities for Windows 8, the web, SharePoint, mobile, and cloud development—as well as the application management lifecycle tools you need to break down team barriers and reduce cycle times to deliver value continuously. You’ll even find a redesigned UI to streamline everyday tasks and kick your productivity into gear.
Event Details:
Event: Microsoft Visual C# 2012
Date: Friday, 20th September, 2013
Time: 10:30 AM – 11:30 AM
Location: Online at Video Con. Facility of HEC
Presenter: Ali Sufyan Butt

Universities Online:

10+ universities were connected live

130+ Microsoft student partners

100+ MSDN partners were also online for the session

  • University of Karachi
  • NUML
  • University of Azad Jammu Kashmir
  • UET Taxila
  • International IslamicUniversity
  • AIR University
  • Kohat University of Science and Technology
  • GCU Faislabad, GCU Lahore
  • Lahore College for Women
  • AIOU

The session covered advance C# concepts in .net framework 4, 4.5 and upcoming async features. The session was both theoretical and practical at the same time.

C# – Session delivered at Higher Education Commission of Pakistan-HEC

An Online Session Broadcasted live in HigherEducationCommissionPakistan for All the Public Universities in Pakistan.

The session was delivered by Ali Sufyan Butt, and was attended by major public universities online over Live Video Conferencing. Approximately, 150+ students joined the event.

Pictures can be seen here Click to load pictures

Universities Joined Us:
– Numl
– University of Azad Jammu and Kashmir (UAJK)
– University of Engineering & Technology (U.E.T) Taxila
– International Islamic University, Islamabad (IIUI)
– Air University
– Kohat University of Science & Technology (KUST)
– GC University, Faisalabad.
– GC University, Lahore.
– Lahore College For Women University – Official

Topics Covered Were:

C# Fundamentals

Introduction to C#
DEMO containing Below:
– Classes and objects
– Types
– Events
– Properties
– Methods
– Exceptions
– Lamdas. Action and Func

C# 4.0

– Parameters
– Co and Contravariance
– Dynamic
– New Compiler options

Some features

– Better C# Coding Practices

C# 5
– Asynchronous Programming in C#
– Practical demo

Design patterns vs coding standards

There is a great debate on the topic we are discussing here. Many a times we work in software companies, our bosses want us to implement certain design patterns to be followed through out the organization. Like giving an example, one of a senior in our company tends to fall toward caliburn Micro if we are to do windows phone development. No doubt it helped here and there but focusing on that cause a lot of time to understand that first and than implement it, and as many a design patterns are work of community so they are not 100% fulfilling 100% of the requirements.

The point is that not everybody understands every design pattern but everybody can adhere to coding standards within the organization.

a- Not every design pattern fits for every project, but coding standards can be made to fit for most of the projects.

b- Injecting design patterns might cause difficulty for on-comers in the project while implementing coding standards cause fluent code understanding for people to come later on in the project.

c- Analysts, Designers [Software Designers], Team Leads, or all in all if I call Bosses should understand this fact. I am not against design patterns but recommending a design pattern should only be made on the basis of previous experiences and recommendations not by doing a small tiny project which does not fully utilize it.

d- If we follow the basic principal of software engineering that is “Keep it Simple”, then we will definitely go for coding standards.