What life skills have benefited your software the most?
Posted by Ryan Baxter Wed, 11 Jul 2007 16:39:00 GMT
A question was asked a few weeks ago within the blog community that I read. “What are the three things you learned about software in college?” I’d like to expand upon this question and ask, “What life skills have benefited your software the most?”
I will try to keep my list short.
- Reading Comprehension. Not everything can be solved with a Google search. You may have to open a book once in a while.
- I’m often heard saying that the single most valuable skill that I learned in high school was typing. This needs no explanation.
- Writing is not unlike programming. Obey grammar rules and write clearly.
- The developer lifestyle is not glamorous. If others tell you to get a life then you probably should. Take up a hobby that involves other people. Get a job in retail.
What life skills would you put in your list?
Expect the Unexpected: bool IsInRole(string role)
Posted by Ryan Baxter Tue, 10 Jul 2007 02:34:00 GMT
Running some tests yesterday, I was alarmed by an Exception that read, “The trust relationship between the primary domain and the trusted domain failed.” What?!? This code worked a few weeks ago! The method in question called Page.User.IsInRole(“DomainName\RoleName”) to determine if a user was assigned to an administrator’s role. bool IsAdministrator(). Simple and efficient. Why is this happening?!?

In short, the role that I was supplying Page.User.IsInRole with contained a typo. What is interesting is the results of my test case found below. Pay attention to the method signatures and their outcome.
Page.User.IsInRole(“DomainName\RoleName”) returns true
Page.User.IsInRole(“RoleName”) returns true
Page.User.IsInRole(“DomainName\TypoRoleName”) returns false
But…
Page.User.IsInRole(“TypoRoleName”) throws the Exception
Huh?
I haven’t had time to dig further into this, but I’d definitely be interested in hearing some opinions.
- Posted in Expect the Unexpected
- Meta 3 comments, permalink, rss, atom

