Tuesday, October 31, 2006

(C#) Interview Questions

Seems to be the trend at the moment to post some interview questions on your blog. So not being one to buck a trend, I thought I would do the same.

Some of the questions I have seen are more pop quiz types questions. For example: Name 5 C# data types?
To me these questions like this are stupid. I don't care if someone can recite the entire class library word for word, I care about how much of an understanding of actual programming someone has. My questions are more aimed at creating an insight into how someone thinks, and perhaps starting a discussion. I prefer open ended, no one right answer questions.

Without further ado, here are my questions...

1. What are you thoughts on the following?:

try
{
...
}
catch (Exception ex)
{
...
}

The answer should create an insight into how deeply the developer thinks. I think catch all exceptions are the devils spawn, but would be interested in learning justification someone might have for using

2. Name your favourite feature of .NET 2.0? Why?

Just a matter of interest. Should get the person talking.

3. Explain the difference between an Interface, and an Abstract class.

If the person knows the difference then it shows they have created bases classes or at least know about OO programming.

4. In your opinion, when should you use each?

Just to try and see if they have an understanding of the difference, not just know what each is.

5. How do you define the n-tier model?

Again it should be reasonably clear from the answer if the person has actually don e n-tier design/programming

6. When passing data between tiers, do you prefer passing a custom class, or something else such as a Dataset? Why?

Always interesting to hear peoples approach to this. Also it demonstrates what level the person has. I.E a junior - intermediate may not have had to worry about this before.

7. Who is Anders Hjelsberg?

I would want people who take an interest in the language they use. If they do then they will know who Anders is, or at least heard of him

8. Explain the terms Pascal Casing and Camel Casing.

Most people should know what these mean, although not a show stopper if not

9. Explain your coding standards for: a member variable, a parameter, a method, a class an interface and a local variable.

This question just shows if people have thought about standards or not. Any good developer should have a fixed standard they stick to. It is good to discuss their reasonings for using a particular standard. For example I use m_(camelCase) for member variables because I feel it is easier to read and harder to transpose the variable by mistake.

10. What is your understanding of a business layer?

Everyone has a different idea about what a Business Layer should be and do.

Coding Tasks

Here are some coding tasks that could be given at an interview. Obviously not enough time to do them all....

1. You are creating a basic accounting application. Create a business layer stub which would allow the application handle Creditors, Debtors and Invoices. Just create any classes needed, the variables needed and the method headers. In each method, just add a comment as to what the method will do. As a starting point, the database has been created where the business data will be persisted to.

I think this would be an interesting task to give. It shows the interviewee's ability to take a problem and apply their skills to it. We're not really that interested in the actual coding, just the design and thinking behind it. I would expect most people to either create custom classes based on the database, or create an approach based on datasets which will be passed between layers. I am a student of the Rocky Lhotka approach to business layers where the business classes shouldn't just replicate the table design, it should define a behaviour, and can include data from several tables.

2. Create a simple Webservice that given two numbers, returns the sum of these two numbers.

3. Create a console application that consumes the Webservice created above.

Fairly simple task that anyone worth hiring should handle in 30 minutes or so.

4. Give them an application with a number of bugs, some compile time, some runtime and get them to fix as many as possible in a given time.

5. Explain to the interviewee that they can use any datastore they like - have MS Access, SQL Express, SQL Server installed on the test machine - create a simple application to store contact details.

Give no hints on what you are after, give them a set time (60-90 minutes) and then let them loose. Good developers should work out what is important given the time constraints. I would prefer a well engineered solution that wasn't finished, than a slap happy finished product. Above all else it should show how people think about design and give an indication about their ability. Afterwards, let them explain why they did X and give justifications for that approach.

Comments welcome....

Wednesday, October 25, 2006

Broadband Study: Part 3

Today Xtra brings onstream the new jetstream plans, so I figured it was a good time to revisit the pricing. In May, I undertook a plan to check on the broadband plans every 3 months or so, and see what if any changes the local loop unbundling announcement has made.

After the first 3 months nothing had changed. Has anything changed in this 3 month period? We shall see:

Slingshot:
New plans to be announced
IHUG
No change
Orcon
Have new plans. Effectively dropped prices by $10 but have to buy data in blocks, which is a little confusing.
Xtra
Again no real change in price, just data caps have changed a little and faster speeds available.

Effectively the new broadband plans are in fact not new. All are pretty much the same price but we now get "full" speed. Basically Telecom have pulled the rag out of the pipe allowing full throughput(down) to keep us simpletons happy for another 5 minutes.

So they are supplying the service they should have from the start, telling us they are great for doing it and we are all happy. Sometimes you gotta wonder about why we accept this sort of treatment in this country....

IT Shortages - a solution

I watched ASB business this morning. Paul Brislen from ComputerWorld was on talking about a shortage in the "ICT" industry (whatever that is). He made one pertinent comment. Because there is a worldwide shortage of IT workers it is almost impossible for New Zealand to compete against the US and the UK. I mean anyone with half a brain could contract in the UK for 300 quid a day and pay rates in the US are way more than here. Forgetting Visa issues of course!

Ok, the counter argument is the quality of living in NZ vs those other countries. I can't comment on that - I've only lived in NZ and Australia.

The major problem I see with NZ is that most "IT" jobs are in Auckland and Wellington. Traffic, housing and other issues in Auckland are so bad then you might as well live in Sydney or Melbourne and get paid significantly more. Whereas Wellington is probably ok, but who would want to put up with the wind all the time - not just from the politicians either.

So the answer? Well two possible solutions. Solution 1 is not realistic, but it would be to move IT operations to the provinces or places like ChCh or Dunedin where the cost of living is a bit lower.
Solution 2 is to pay a DECENT FRICKING WAGE. Obviously we can't compete with London or New York as far as pay rates go, but if a Senior programmer in NZ could earn say $100-$150k then I would think it would be a lot more enticing to stay. Better than the relative pittance most get at the moment - $65-85k.

A lot of companies might say they can't afford those sort of salaries, but my argument is, can you afford not too?

Monday, October 23, 2006

iWoz review

I got >iWoz on Friday of Labour weekend and finished it yesterday.

It is the autobiography of Stephen Wozniak, the man who invented the personal computer. He invented the Apple I and II computers which started off the revolution. The book pretty much chronicles his early years through to leaving Apple and setting up another company making programmable remote controls.

As with much of Woz's stuff, it is pretty much like reading a transcript of a taped conversation. As such I found it very easy to read, although he did recover topics and subjects a fair bit - including pretty much repeating the entire section about setting up the CL9 company. I'm not sure if that was intentional or bad editing?

It was a fantastic insight into how Woz created the early Apples, and how he got involved with electronics from an early age. Along the way he clears up a few misconceptions about himself.

I would definitely recommend this book to anyone, but particularly those with a technical bent. Woz comes across as a highly intelligent yet down to earth kinda guy - a little quirky, but the sort of guy you would love to sit down and shoot the breeze with. I get left with the impression that had the success with Apple not come around and he had lived his life working for HP, he would be just as happy as he is today. To him the money has little or no significance, it's engineering that he loves and would do it all again for free.

I think that in a nutshell says a lot about the guy.

C# 3.0 will rock - but hard to read?

Take a look at this example of Lambda expressions in c# 3.0

The power if the new LINQ style syntax for things like lists is obvious. For example the following:

var q = from i in list where i > 10 & i <20 select i;


That is going to be great for productivity. That is without question. But going back a few weeks or months later to revisit you code, well that's I think will be different. Usually with code (mine anyway) you can get a pretty good idea what is going on by skimming. With the example above, you really need to read the line start to finish to get a good understanding what is happening.
I hope as I/We get used to LINQ style syntax it will become easier to skim read.

Sunday, October 22, 2006

Farewell Schumacher

Today was Michael Schumachers last race. Sadly an engine problem in qualifying and a puncture in the race meant he finished his last race in 4th. It was a brilliant drive to come back from 70 seconds down at one stage, but he just ran out of laps in the end.

It was a strange way for a career to finish - while challenging for the championship his usual luck ran out. An engine failure in Japan while leading and the tyre problem today meant an ending not befitting the best racer in history.

Karma's a bitch I guess! Schumacher while being an undoubted talent will forever have an asterix against his name. His actions on the track at times have been unsporting to say the least and that is something he will have to live with as he reflects on his career over the next few months and years. To me it doesn't take the gloss off an unequalled career.

More wins and poles than anyone in history say it all really. But as always no one person is bigger than the sport they compete in, and F1 will go on. It is shaping up to being an outstanding year in 2007. Schumacher will be missed, but roll on 2007!

Tuesday, October 17, 2006

Time for a change....

I have been busy busy busy lately. I have a 9-5 job (well 7-4) and after hours have been contracting to Hamish over at Verb. Something had to give, as 12-15 hour days and not having time to play with my 5 month old daughter, was getting a little old.

So I have been offered a full time gig at Verb and have decided to take it. It is only short term at the moment - we haven't worked out the full details yet - but I think it is a great opportunity for both parties. Verb is going places and I want to be part of it, and it will be great getting back to coding full time again.

Sunday, October 08, 2006

King of the Mountain sent off in style

As usual on the 2nd Sunday in October, I sat infront of the box all day and watched the Great Race

This year was different because of the tragic death of Peter Brock. The send off before the race was poignant and in typical Australian manner. The race itself was full of carnage, with many safety car periods. It interrupted the flow of the race, but kept it tight until the very end.

It was fitting that on the day they fair-welled Brock, his protege and great friend, Craig Lowndes should break the drought for Ford. He was teared up as he crossed the finish line and quite a few on the hill probably were too.

Great result for Ford and all Ford fans who have been waiting since '98 for another win at Bathurst. As a born again Ford fan it was a great result and I was on the edge of my seat for the whole race, but mostly the last 10 laps when it became clear that Lowndes might actually do it.

Great day, great race, great result.

However, it was all put into perspective with the tragic news of Mark Porter dieing from his injuries from a crash on Friday at Bathurst. Our thoughts are with his family at a time like this.

I just hope that the wowsers don't use the deaths of the likes of Mark Porter and Peter Brock to try and water down or even ban racing. The wouldn't have wanted that, and in the end it would just cheapen their lives.
These accidenst are unfortunate and tragic, but there are accidents. I think a lot of the time we are too quick to look for someone to blame. May be we should accept that sometimes, regrettably accidents happen, and look to how we can learn and increase safety so that if the accident happens again, we can give the driver involved a better chance of survivial.

Thursday, October 05, 2006

Beam me up Scotty

Well not quite but this is freakin cool

I don't think they will be transporting solid matter objects the size of say, a human anytime soon. The implications for computing and communication however are huge. Sending bits of data using this method without the need for wires. Potientially over vast areas. I'll leave you to dream of the applications this could bring.

Tuesday, October 03, 2006

Pushing NZ IT to the world

Rod has an interesting post about striving for more as an industry.

I fully agree with what he says. I firmly believe that we as developers in New Zealand are some of the best in the world. Because our fish pond is so small, as a developer we can't afford to specialise too much. We need to be able to design, develop, test and profile. We need to be customer facing. We need to know T-SQL and OO and SOA and Agile and Webservices and all the other buzzwords. Above all else we deliver solutions for the sort of budgets that wouldn't buy lunch in other parts of the world. We are intelligent, problem solvers. Our salary expectation is low. (too low IMHO)

Why then, aren't we a world power in IT services and products?

That is a hard question to answer. A think a lot of it is the fact we are so isolated. Our strength is also our weakness. While we are famous for thinking outside the square, we also think too small. The isolation also means it is very hard to get the product to market. Perhaps the answer is to piggyback on the contacts and drive of people like Rod and his peers? Maybe the answer is to setup companies in the States and Europe to push our products and ideas to the world. Rod thinks the answer is capital investment in software companies. I think this is partially correct, but the companies also need people driving their products to the world, and contacts in business around the world. That is the hard part in my opinion.

I do a bit of work for a local company. The have big dreams and a great product. I think they are the sort of company that would go ahead in leaps and bounds with a little capital investment. It's a big call though, going from a small company doing pretty well, to taking on more staff and hoping the clients will come. I think a lot of companies around NZ face the same problem. It's a bloody big call to get out of your comfort zone and risk it all. It takes a lot of confidence in yourself and your product. I think maybe a lot of companies are happy with their lot, and that could be a major factor as to why we aren't bigger players on a world scale. It's taking that first step into the unknown that is the hardest.

What is the old saying? How do you eat an elephant?

One bite at a time.