Archive

Archive for the ‘RAD’ Category

G Challenge III – Practice Excel VBA Interview question – Watch face maths


I have heard of this question coming up a little bit in all sorts of technical interviews so I thought I would set it as a G Challenge.

Question:

“Please tell me what you would implement to tell me the angle between then hands on a watch face at any given time of the day.  Please show your working and use these examples.”

6:00, 3:00, (lets make this non trivial now ) 9:15, 1:30 12:50,  3:20.

Answer Style:

It is up to you how you go about answering this, but I would try this in two stages. 

  1. Have a pen and paper and go about it as if you were in an interview, then :
  2. Actually try to write some VBA for a spreadsheet that goes about doing it.  Esp if you can call it from the sheet so your function returns the answer from an Excel Date Time entered in a cell.

Extra Homework:

  • Could you write this as a VB dll, C++ dll, C# XLL etc?
  • Does your function cope with 24hr time format?
  • Can you also output a list of times from an angle?  Ie. what times equate to 90 deg, 27 deg etc? 
    • If so can you output this as an array function so that a list can be shown in Excel?

Essential tools for Excel VBA RAD (Rapid Application Development)

February 17, 2011 1 comment

I guess a major point of RAD is speed.  The clue is right there in the name: Rapid Application Development.

So, all other things being equal, how do we go about getting more speed.  I don’t mean smashing out a load of garbage or not testing things. 🙂

I mean what things can be used to help productivity?  I am going to list a few here.

I will keep adding to this list, but if anyone knows of any good sources please add a comment and I will add it in.