DennyDotNet

Awesome ASP.NET C# and other cool coding stuff

About the author

Denny Ferrassoli
Developer at Casting Networks. MCP / .NET
E-mail me Send mail
Add to Technorati Favorites

Recent posts

Recent comments

Authors

Categories

None


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Some Interview Questions

Well I've been out on the chopping block lately getting some interviews. The first one sucked, needless to say I was not prepared. Anyways I came across a few interesting interview questions and thought I would share. They're mostly ASP.NET and not specific to any language except for question 1 which is for C#.

#1. Can you implement code in an abstract class?
I came from a VB.NET background and for some reason thought you couldn't (what the hell are interfaces then?? - D'oh!). Yes you can implement code in an abstract class! You can choose which properties and methods should be overridden by using the abstract keyword. The abstract keyword implicitly makes the method or property virtual whereas an interface is always virtual.

#2. Implement a function that will return a corresponding Fibonacci number: Fib(x)
Good old Fibonacci. Try creating a function that will add the sum of the previous 2 numbers. Example:

0 1 2 3 4 5 6  7...
------------------
0 1 1 2 3 5 8 13...

If we passed 6 into Fib(x) it should return 8 because it adds 3 and 5 (the two previous sums). This is a cool function because it can be implemented in about 2 lines of code (in a recursive function)! Try it yourself and then take a look at: http://en.csharp-online.net/Calculate_Fibonacci_number - It took me about 45 minutes to finally see the light, I was always slow at math.

#3. What is the order of Page_Load events if you have a page that uses a Master Page, the Content Page and a User Control? What if the User Control's PageOutput is set to cache the control?
I admit I goofed this one up. The events are as follows: Content Page, Master Page, User Control. And what about caching? The first time the page is loaded the control's Page_Load event will fire. It will not fire any further until it is removed from the cache. So while the User Control is cached the events are only Content Page and then Master Page. That will save you a lot of processing! (Makes sense doesn't it?)

#4. Create a regular expression to match the following: (xxx) xxx-xxxx
Ok, so unless you translate all your favorite books into hexadecimal and read them that way then you probably don't want to touch Regular Expressions. What in the world are all those slashes, squiggly's, dots, parenthesis and what not doing in there!! Well there's a good place to learn: www.regexlib.com and check out the Cheat Sheet. Anyways here's what I came up with (although at the interview I omitted the ^ and $):

^\(\d{3}\)\s\d{3}-\d{4}$

Yes that translates into a phone number :)

More to come... maybe...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:
Posted by SuperGhost on Monday, June 18, 2007 3:33 PM
Permalink | Comments (2) | Post RSSRSS comment feed

Microsoft Web Experience Event

I just can't help myself. The event sounds great, I'm even thinking about attending (LA is only an hour away). You even get a chance to win an XBox 360. The Microsoft Web Experience event looks mighty interesting and if it weren't for Kirk Evan's post I probably would have never known about it.
The most important part is that they're offering FREE BEER! My vote is in for a good hefeweizen... See you there!

Update (6/5/2007 10:15pm): I cleared up my schedule and will be attending the event! MicrosoftWebExperience

Microsoft is hosting free Microsoft Web Experience events at the Los Angeles Microsoft office on June 8th and the Denver Microsoft office on June 15th.  They will be presenting information on building the next generation user experience on the web.

They are providing breakfast and lunch, hosting a reception with beer and wine, and attendees are automatically registered in a drawing for an XBox 360 and a Zune that will be given away at each event. For more information, visit http://kaevans.sts.winisp.net/Shared%20Documents/webexperience.aspx.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Posted by Denny on Tuesday, June 05, 2007 11:20 AM
Permalink | Comments (0) | Post RSSRSS comment feed

I'm now an MCP!

Took my first Microsoft Certification today and passed with an 867 (yea I could have done better). But hey I'm happy, I can add this to my resume and I feel pretty good about it.

During my preparation I ran across a lot of blogs arguing over Certs vs. Experience. What I found is that even though I feel very confident with my skills I did pick up a few new things that I was not aware of prior to my certification path. A lot of those things were new to me because I have never been exposed to them at work. For the most part I could figure out nearly every question that was presented to me in the exam if I could just have a default Web application project open with Visual Studio. I had a completely different outlook on certs now than I did before. Here are a few certification vs experience questions I wanted to answer:

  1. Is getting a cert worth it? Why? Yes. I believe the process of studying for the exam and reading the literature related to passing the exam gives you well rounded knowledge of the subject area. You'll probably pick up on something you didn't know before.
  2. Would you hire someone with less experience and a cert or more experience and no cert? More experience and no cert. This is because although the cert is "proof" that you know your stuff a seasoned developer has been exposed to much more than just questions and answers. In the programming world we all know how brain-breakingly dynamic an environment can be.


So that's my take on the whole cert vs experience scene. Anyways! If you're interested in taking a cert here are some of my personal recommendations:

  1. Get an exam prep book. The exam prep books go over what you will be tested on, source code, samples and study questions. The book will tell you how Microsoft wants you to answer the questions.
  2. Take a skills assessment test on Microsoft Learning: http://www.microsoft.com/learning/assessment/default.mspx - This is a great way to prepare for an exam. The only issue I had with this is that it does not tell you which questions you had wrong. It only states what you should improve on. However it does give you many resources such as books and instructor-led training that will help you focus on the areas you need improvement.
  3. I stumbled on a great site that was loaded with practice questions: www.certyourself.com - Here you get to go over the answers to the questions and they give you explanations as to why the answers are right or wrong.
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:
Posted by SuperGhost on Monday, June 04, 2007 3:46 PM
Permalink | Comments (5) | Post RSSRSS comment feed