SQL: Get Database Name From Physical Name

Here’s a SQL Function to get name of the database from it’s physical full name. This function can be used in conjunction with RESTORE FILELISTONLY which can generate physicalname,  the parameter of this function, from a database’s backup file. You can read more about RESTORE FILELISTONLY here. create function get_db_name_from_physical_name (@physicalname varchar(500)) returns varchar as […]

Read More

SQL: Save Result From RESTORE FILELISTONLY

RESTORE FILELISTONLY is a Transact Statement in MS-SQL that returns a result set containing a list of the database and log files contained in the backup set in SQL Server. Basically it contains meta-data pertaining to the database’s: LogicalName PhysicalName Type Size MaxSize etc. This information is quite useful when performing Restore operation. For example, […]

Read More

Becoming An Indie Game Developer From A Programmer Background

As Wikipedia defines it, “Independent video game development is the video game development process of creating indie games; these are video games, commonly created by individual or small teams of video game developers and usually without significant financial support of a video game publisher or other outside source.” While both game development and regular software […]

Read More

Freelance Developers Now Earn Through Writing

Since popular freelancing sites are overrated, today I would like to share with you guys one another way to generate extra income. Freelance Writing! Get paid to write articles and tutorials. There are tons of sites on the internet that are craving for excellent content to be published on their sites. Writers In Charge lists […]

Read More

SQL Pivot with Dynamic Column Names

Found a great solution to writing a complex PIVOT function in SQL on the web! The solution was lying on a thread at one of the ASP.NET forums where the question was: “how to display row values in columns in sql server 2008“ and the solution was provided by M. Atif Nadeem from Pakistan. He […]

Read More

Checklist For Xamarin Forms Development

Here’s a list to help you get started with cross-platform mobile app development using Xamarin Forms. Xamarin Visual Studio 2015 Android SDK Windows 10 OS While you can work with Windows 8 as well, you will need Windows 10 operating system if you are going to develop for Windows 10 Universal App. Mac with Xcode […]

Read More

Upwork Sucks Big Time!

I am not much of a hater and I hardly say these kind of stuff about anyone (specially in public), but this time I have to make an exception. Yes guys, like the title says: UPWORK sucks !! Yes www.upwork.com, the freelancing site for freelancers, just sucks! Why? Ok the main reason for my hatred […]

Read More

SQL: String Format Function

Here’s a handy SQL function that allows to insert string(s) inside a larger string. This function is similar to String.Format() function in C#. Typical Usage: Have a string like below: “%s is a. %s and %s does %s ” with as many ” %s ” as required to dynamically insert values. Insert desired string objects […]

Read More

Reducing Cyclomatic Complexity Using Delegates

In the previous post we looked at what Cyclomatic Complexity is and why it is important to write programs with low Cyclomatic Complexity. Here I would like to show an example of reducing Cyclomatic Complexity with the use of Delegates. This post is going to be extremely code intensive so buckle up guys! Let’s start. […]

Read More

Cyclomatic Complexity

Cyclomatic Complexity is a software metric used to calculate the complexity of a program. It is a measure of number of possible use case flows for a given program’s source code and is directly dependent upon the number of control flow statements (if/else statements and switch cases) within the code. For example, a method with […]

Read More