Archive | April, 2012

POLITICAL GRIDLOCK, DOWNGRADE AND MY INNOCENT BRAIN

26 Apr "Politics is a funny game"

STOP HAMMERING MY BRAIN…

It is all about seat

The complexities of political system, mindset of politicians and downgrading of countries have always puzzled my tiny innocent brain 🙂 When I was growing up, I was always told that country comes first therefore I am having a hard time understanding the concept of politicians spending their whole time thinking about elections, winning a seat and NOT about country and economy.

VOTE ME

Every day I somehow feel the pressure of a slowing economy, Wall Street Blunders and Congress Failure!! Everyday I ask myself: Is it my fault that I elected these politicians?? For months and months politicians will criticize each other and then one day I will wake up, flip the newspaper and see this –

We are best friends

Thank GOD I am not one of them.

Regards,

COMMON MAN

Advertisements

Planning a Trip to New Orleans

22 Apr


"New Orleans"

We recently did a road trip to New Orleans. So, for you’all amazing folks out there searching for info here are some real Quick facts:

  • New Orleans is a major US port famous for its “French Creole Architecture.”
  • Also popularly known as the birthplace of Jazz music and for the celebration of annual Mardi Gras. Needless to say, the people are nice and friendly – cheers to the southern hospitality 🙂


Things to do in New Orleans:

  • The Jackson Square 

Visit here for the Architecture, lively chaos, The artists, restaurants, museums and local markets. Don’t forget to carry your flip-flops or comfortable flats because it is a LONG stroll.

St Louis Cathedral is nested in the heart of Jackson Square. Outside you will see..Horse drawn fancy carriages. Come as you are, do what you love seems to be the mindset here.

"Jackson square"

Local artists and musicians, street painters, local markets and french architecture makes the atmosphere very historic

  • Indulge in French Coffee – Do visit Cafe du Monde 
"Cafe Du Monde"

Across the street from St Louis Cathedral – Cafe Du Monde is open 24 hours!! Check-in here for an awesome French doughnuts & coffee experience. Yes, they are high cal but I tell ya, they are so freaking worth it!!

"French Coffee"

  •  Bourbon Street 

For Nightlife, check out the Bourbon Street for the quirky bars and pubs it has to offer. Despite the As-is No frills state – Bourbon attracts truck loads of visitors from all over the world!

The Bars are alive day and night.You can walk with your drink up and down the street 😉

"Bourbon Street"

And.. I wasn’t joking when I said ..”quirky bars” te he 

"Bourbon Street bars"

  • The StreetCars
These cute little trains take your mind back to a time when life was slower and more tranquil and they sure are the cheapest transportation in town

"Streetcars" "New Orleans" "New orleans street cars"

  • French Quarter & Markets 
"French Quarter"

The Golden Bronze Statue of St. Joan of Arc in the French Quarter on Decatur Street

"French Quarter"
"french market"
The oldest french market in United States…It will be your best bargain friend in case you want to bring home some Mardi Gras carnival masks as NOLA souvenirs
  •  Harrah’s Casino 
We thought it was okay to be naughty on vacation so we did check in here to try our luck! 😉
"Harrah's casino"
Oh boy, those interiors are really fancy. Once you step inside, you will feel no less than Vegas!
 "Harrah's casino"
 "harrah's casino"
More NOLA photos here “New Orleans”

SQL/.NET INTERVIEW – Be Ready for an In-person Interview

11 Apr .NET/SQL interview

.NET/SQL interview

Tips for .NET/SQL In Person Interview

  • If you are going for an in person interview then make sure you dress up properly.
  •  Carry some copies of your resume.
  • It is always good to know who is taking your interview .You can always check their profile on LinkedIn.
  • Make sure you visit company’s website and try to gather as much information as you can about the company.
  • Be on time..
  •  Learn more about your potential role, team, and manager and ask questions based on interviewer’s position.
  • Most of the time interviewer is looking to see how you think. They may or may not expect right answers all the time. I strongly recommend you going through these questions and test yourself before you go for the ultimate battle.

1) For the following array:

char[] chars = new char[]{‘H’,’E’,’L’,’L’,’O’};

Reassign the values assigned to the elements of the array in reverse order without using additional memory through generics or additional arrays. You can use temporary variable.

A: Here is one way to do it:

char[] chars = new char[]{‘H’,’E’,’L’,’L’,’O’};
int length = chars.Length;
for (int count = 0; count < (length/2)+1; count++)
{
char temporary;
temporary = chars[count];
chars[count] = chars[length – count-1];
chars[length – count-1] = temporary;}

2) What steps can you take to improve performance of a stored procedure that you know is running slow?

Hint: Think in terms of execution plan, indexing, table scan and seek.

3) What is the difference between MVC and MVP?

4) What is Boxing?

Hint: what happens when you convert an integer to object?
int i = 123;
// The following line boxes i.
object o = i;

5) Are you familiar with Agile methodology?

6) What is the difference between deep copy and shallow copy?
Hint: In shallow copy, the returned object has a reference to the same object. In deep copy, an Object is copied.

7) What is caching? What are different ways of caching in ASP.NET?

8) What are mock-ups?

9 )What is Globalization and Localization?

A: Read here: http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx

Please feel free to answer these questions in the comment section below. GOOD LUCK.

If you like my post please click “LIKE” button below.

Read about SQL Technical Interview Questions here: Crack the SQL Interview

Anyone on Twitter? Follow @MCADDeveloper @Consultpri

SQL INDEXING – Simplified

3 Apr SQL Indexing

Let us talk about indexing in SQL Server:

Depending on size of the data, a table can have more than a million rows. If you want to search for a specific record there are two ways:

  1. Go row by row and see if that is the row you want.
    Example: Let us say we want to search an employee table that has 1 million rows for an employee with last name “Smith”. Remember you can have more than one record with name “Smith”. One way to do this is to go record by record and check if last name is “Smith”. The problem with this approach is that this will be very slow as you have to go row by row. May be there is only one record with last name “Smith” and that could be the last record. In this case you will have to read one million times, only to find one record. This in SQL terms is called “TABLE SCAN”.
  2. The second approach is a better approach. What if I tell you that all names are sorted in “Alphabetical Order”. So, if you directly go to half a million record and if that name is say “Karsen” then you know “Smith” will be after “Karsen” (‘S’ comes after ‘K’). Now you can go directly to six hundred thousand record and if that name is “Tedd” then you know “Smith” is between half a million record and six hundred thousand record.  So now in two attempts you have narrowed it down from one million to hundred thousand. Isn’t that great? This is what is called as indexing.

Let us now get deep into details. Indexes are created on columns in tables. The index provides a fast way to look up data based on the values within those columns. An index is made up of a set of pages (index nodes) that are organized in a B-tree structure. Figure below shows how a typical B-tree looks like.

 

SQL Indexing Example
Fig.1 – B-tree.

 

Data is stored in the form of pages. Now let us try to find records with last name “Dull”.
Go to Root Page (level 1). With indexing now we know that any name starts with ‘Bennet’ and is before ‘Karsen’ we should go to page 1007. What this means is if we want to find out employees with name “Charlie” we should go to page 1007 and if we want to find out employees with name “Kyle’ we should go to page 1009 (“Ky” comes between “Ka” and “Sm”).

So, looking at page 1007 (level 0) we see that if name is between ‘Bennet’ and ‘Greane’ (‘D’ comes between ‘B’ and ‘G’) we need to go to page 1132. So, let us go there and find out.

Looking at page 1132 we can see record with name “Dull”. Hurray…. our search is over. We found our record. This is how indexing will work typically.

There are two types of indexes, Clustered index and Non Clustered Index. Clustered index is on primary key and data will be physically sorted. So, leaf level will have the actual data record. In a non-clustered index level will have a pointer to actual data page. This means you have to go one extra step to actually get your data. Remember indexes can make your search faster but insert, updates and delete will be slower.

Thanks for visiting my blog. Please feel free to leave suggestions/feedbacks/comments.
If you like my post please click “LIKE” button below.

Read about SQL Technical Interview Questions here: Crack the SQL Interview

Written by Amit Uppal

Email us

Zilker Flower Festival – A Taste of Spring!

2 Apr

Spring is blooming like a speeded-up Nature film and I totally love it! It is a “everyone’s invited” Nature’s open air theater after all. Don’t ya’ll love that. Well, I certainly enjoy it from the core of my heart 🙂 Austin is on a major makeover for sure, both Personal and Professional. It has recently attracted companies such as Facebook, Apple and Google because of the current “Tax Climate” it offers. Twitter was also founded right here in the greatly popular #SXSW (South by SouthWest) home of America – Austin!

Zilker Park is a major local attraction. Zilker Botanical Garden located in heart of the Park hosted the Annual Spring Festival this weekend (Saturday the 31st March 2012 – April  1st 2012) and I am glad I Tagged it! There was something for everyone – Flowers, Activities for Kids, Live Music, Gardening talks from seasoned Gardeners and Austin’s tasty food!! Here are some beautiful shots from the show: 

Dazzling Bright Orange Blooms

Hinkley's yellow Columbine

Oh, Forgot what this is called 😉

On way to Taniguchi Japanese Garden

More Photos here: Zilker Flower Festival

Now for the “Keep Austin Weird” side of the show 😉 Some interesting things that captured my attention

*Oh hello cutie you are crazy cute*

*And YOU ..are Wicked Cute too!*

Creativity at its best!

'Nuff said! Be a LongHorn and Keep Austin Weird 😉

Zilker Flower Festival

SQL Interview Questions

1 Apr

These are the most common yet tricky questions that you can expect in a .NET/SQL interview.

1)      What is the difference between truncate and Delete?

  1.  Delete will fire delete trigger, truncate will not.
  2. The DELETE statement removes rows one at a time and records an entry in the transaction log for each deleted row.TRUNCATE TABLE removes the data by deallocating the data pages used to store the table data and records only the page deallocations in the transaction log.Once you truncate you can’t rollback.
  3. If there is an identity column in the table truncate will reset identity to 1, delete will not.

2)      Name the different type of joins

  1. Inner Join
  2. Outer Join  (Left Outer Join and Right Outer Join)
  3. Cross join
  4. Self-Join

3)      What is an Index?

There are two types of indexes. Clustered index and Non Clustered Index. A table can have only 1 Clustered Index while it can have up to 249 & 999 nonclustered indexes on SQL Server 2005 & 2008 respectively. A clustered index stores the actual data rows at the leaf level of the index. Indexes can make Select statement fast but delete, update and insert statements will get slow.

4)      What are different types of Isolation levels in SQL Server

a)     READ UNCOMMITTED

b)      READ COMMITTED

c)       REPEATABLE READ

d)      SERIALIZABLE

e)       SNAPSHOT

 5)      What are different types of constraints in SQL Server?

  1.  Primary key Constraint
  2. Foreign key Constraint
  3. Check Constraint
  4. Unique Key Constraint

6)      What is the difference between where and having clause?

A having clause is typically used when you use group by clause.

Example:

SELECT titles.pub_id, AVG(titles.price)
FROM titles INNER JOIN publishers
ON titles.pub_id = publishers.pub_id
WHERE publishers.state = ‘CA’
GROUP BY titles.pub_id
HAVING AVG(titles.price) > 10

WHERE clause is applied first to the individual rows in the tables . Only the rows that meet the conditions in the WHERE clause are grouped. The HAVING clause is then applied to the rows in the result set

7)      How would you do “Error Handling” in SSIS?

SSIS package could mainly have two types of errors

a) Procedure Error: Can be handled in Control flow through the precedence control and redirecting the execution flow.

b) Data Error: is handled in DATA FLOW TASK buy redirecting the data flow using Error Output of a component.

8)      What is the difference between a primary key and a unique key?

Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column. Major difference is that, primary key does not allow NULLs, but unique key allows NULL.

9)      What are defaults? Is there a column to which a default cannot be bound?

A default is a value that will be used by a column, if no value is supplied to that column while inserting data. IDENTITY columns and timestamp columns can’t have defaults bound to them.

You can create default and then bind a column to them.

Example:

//This will create default ” ZipCode ” in database

Create default ZipCode as “78746″

//This will bind the default we created to a column “PostalCode” in table “EmployeeData”
sp_bindefault ZipCode, “EmployeeData.PostalCode”
10)  What is SQL Blocking?
Blocking happens when one connection from an application holds a lock and a second connection requires a conflicting lock type. This forces the second connection to wait, blocked on the first.
Thanks for visiting my blog. Please feel free to leave suggestions/feedbacks/comments.
If you like my post please click “LIKE” button below.

Check back again for more SQL and .NET Interview Questions. Read more on .NET Questions here .NET Questions

Anyone on Twitter? Follow @MCADDeveloper @Consultpri

%d bloggers like this: