Translate

Sunday, February 17, 2013

What does it take to be a good software professional?


Of the very few Rockstar level technical people I have encountered in the past, there was this one quality all of them possesed-->Everyone approached them for technical advice.

They always answered to technical questions with supreme confidence and they had a consistent track record of being 100% correct. On top of their technical expertise they also had amazing people skills.


In my experience (of watching others) these are the qualities necessary for a software developer to reach the very top of the technical part of the corporate ladder
  1. A thorough understanding of the fundamentals (a computer science degree really helps)
  2. Constant reading up on the latest and best selling technology books.(Go to amazon.com and sort by popularity)
  3. Constantly brushing up on stuff that you have studied in the past (see Spacing effect)
  4. A thorugh understanding of the dominant design patterns.
  5. Being involved in the developer community (contribute on stackoverflow, go to developer meetups etc)
  6. A very high EQ (yes EQ and not IQ. IQ will only take you upto a Jr developer stage)
  7. Ability to grasp the business needs very quickly.
  8. Impecable domain knowledge (Understanding the business)
It usually takes atleast 13 years of experience to attain this rock star level.

Tuesday, February 12, 2013

IIS Identity

There are many ways in which an IIS hosted website can access resources on the webserver and a remote server. This fact doesn't seem well documented. To change that, this is what I did. I created a website on server A which accessed a SQL server database on server B. The connection to SQL server used windows authentication. After setting this up, I tried accessing the website from my local desktop and noted down all the credentials it used to access resources.




During the experiment I played around with the IIS Authentication settings



I performed the experiment once each Connect As option in IIS 7.5

The first one as Application user (pass-through authentication)


Results:


IIS
AUTHENTICATION
WEB APPLICATION
AUTHENTICATION MODE
IMPERSONATION ENABLED?
CREDENTIALS USED TO ACCESS RESOURCES ON THE WEBSERVER

CREDENTIALS USED TO ACCESS RESOURCES ON SQL SERVER
ANONYMOUS
NONE
NO
APPLICATION POOL
 IDENTITY
INVALID LOGIN
ANONYMOUS
NONE
YES
NT AUTHORITY
\IUSR
NT AUTHORITY\
ANONYMOUS LOGON
ANONYMOUS
WINDOWS
YES
NT AUTHORITY
\IUSR
NT AUTHORITY\
ANONYMOUS LOGON
ANONYMOUS

WINDOWS
NO
APPLICATION POOL
 IDENTITY
INVALID LOGIN
ANONYMOUS
AND
WINDOWS
WINDOWS
NO
APPLICATION POOL
IDENTITY
INVALID LOGIN
ANONYMOUS
AND
WINDOWS
WINDOWS
YES
NT AUTHORITY
\IUSR
NT AUTHORITY\
ANONYMOUS LOGON
WINDOWS
WINDOWS
YES
LOGGED IN USER
NT AUTHORITY\
ANONYMOUS LOGON



The second one as specific user:



Results


IIS
AUTHENTICATION
WEB APPLICATION
AUTHENTICATION MODE
IMPERSONATION ENABLED?
CREDENTIALS USED TO ACCESS RESOURCES ON THE WEBSERVER
CREDENTIALS USED TO ACCESS RESOURCES ON SQL SERVER
ANONYMOUS
NONE
NO
APPLICATION POOL IDENTITY
INVALID LOGIN
ANONYMOUS
NONE
YES
IIS
SPECIFIC USER
IDENTITY
INVALID LOGIN
ANONYMOUS
WINDOWS
YES
IIS
SPECIFIC USER
IDENTITY
INVALID LOGIN
ANONYMOUS

WINDOWS
NO
APPLICATION POOL IDENTITY
INVALID LOGIN
ANONYMOUS
AND
WINDOWS
WINDOWS
NO
APPLICATION POOL IDENTITY
INVALID LOGIN
ANONYMOUS
AND
WINDOWS
WINDOWS
YES
IIS
SPECIFIC USER
IDENTITY
INVALID LOGIN
WINDOWS
WINDOWS
YES
IIS
SPECIFIC USER
IDENTITY
INVALID LOGIN




If you are trying o access SQL server with windows authentication, the double hop issue prevents you from sending the user credentials to SQL server. One way to overcome that is to impersonate a specific user in your web.config.

Sunday, February 10, 2013

Button type submit vs button (HTML)

HTML
What it does?

<button type="button">Click me!</button>
Nothing

<button type="submit">Click me!</button>
Submits the page to the url set on form tag’s action attribute. Whether it does a get or a post is determined by the method attribute on the form tag.







 When to use <button type="button">?

When you want to execute a javascript function when a user clicks something that's when you use a <button type="button">.  You could also get away using a div tag or any other tag with an onclick event. But adding a button makes it more intuitive to the user. (Of course you could always style the div tag to look like a button)



Try it yourself

Copy paste this into a text file and name the file with a .html extension


<form action="http://www.google.com/" method="get">
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
</head>
<body>
    <div>
        <button onclick="DisplayHello()" type="button">
            Type Button</button>
        <br />
        <br />
        <button type="submit">
            Type Submit</button>
    </div>
</body>
</html>
<script type="text/javascript">
    function DisplayHello() {
        alert('Hello');
    }

</script>
</form>





Thursday, February 7, 2013

How to find shelvesets in TFS 2010

View-->Other Windows-->Pending Changes












Click Unshelve











Type in owner of the shelve set and click find