Click here to Skip to main content
15,918,889 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys newbie here. Ive been given a small task to complete this week following my first graduate job interview. They're looking to see who completes the best task I think in our spare time at this stage. Im just looking to see if there are any approaches or factors i should consider in approaching this task. Any help and recommendations would be appreciated.

Thanks guys.

Oh here's the brief:
Overview

Most of our work in creating dynamic digital signage content requires data to be combined with graphics. Getting the data and processing it are the core of the more complex day to day activities of this role.



What we’re looking for

We want to see how our candidates approach the problem, how elegantly their code is constructed and how robust it is. Candidates can use their preferred language/platform, but ideally it will either be a web application or a windows exe.



We want to see the source code, as well as the compiled/hosted applications.



The brief

Your application should:



Retrieve every 5 minutes the current value of US dollars to UK pounds from the Internet (Google and other sources provides such data)

Display the current value of the data to the user

Show, using style or text, how that value has changed since the last retrieval

Record the value’s historical activity in a log

Record the application’s activity in a log
Posted
Comments
OriginalGriff 18-Jul-11 10:50am    
And which part is giving you difficulties? If this is intended to influence their decision as to who gets the job, then surely any help from us is going to give them an unfair view of your abilities?
We don't do homework - so why would we do your job interview for you either? I could end up working with you, and having to do my job and yours...
leemark2k3 18-Jul-11 11:00am    
Espen...thanks very much for that mate. I'll take a wee look at it.

Cheers.

Take a look at this:
Dow Jones Industrial Average[^]

DJI has a lot of data, play around with the chart, add another ticker, etc.

Take a look at http://www.flashapi.org/[^]

and

http://away3d.com/[^]

I'm sure you'll find a bit of inspiration :)

Best regards
Espen Harlinn
 
Share this answer
 
I don't want to give too much help either as the idea of these interviews is to show what you can do, not what other people can do. Asking intelligent questions on CP is a good start though :P. I'll give a very brief overview of how I'd approach this.

1. First find a data source. There are various trading API providers but if you just want 5 minute data and don't mind it being delayed, there are many free sources. Look for one which provides the data as a web service you can bind to from VS, if you're going for a .Net desktop app (WCF is good, REST or the older version which I can't currently remember the name of which uses SOAP as the transfer protocol is also fine), so you can auto-generate the client side stuff and not have to parse up a server response.

2. Store the prices in a business layer. Okay, they only asked you for one price, but in the real world this app would almost certainly subscribe to multiple prices so I'm going to violate the Extreme Programming 'You Ain't Gonna Need It' principle and prepare for that now. For your problem this layer is trivial:
class PriceModel {
 decimal USDGBP;
}

... but you could make it implement INotifyPropertyChanged and therefore be bindable. Your web service client should assign to this property, and the setter should notify the UI when that happens. (Again, for such a trivial case this isn't really necessary but I always start as I mean to continue.)

3. The UI should have a field which is bound to that. Either with actual data binding or a notify event handler which sets the UI field.

4. Somewhere, you need to store the previous value, so you can do change related updates. For a trivial case like this you can probably use the UI field itself as the cache (as change display is a UI related thing I don't mind this too much).

5. For logging, bind a logger to the notification event of the business layer. I'm not sure what 'application activity' means but the logger should also be available in other places where you want to log stuff.

I hope you are honest about asking for help if it is asked ;). (Heh, if I were setting these questions I think this answer is at the level where it should be helpful without actually doing the problem for you.
 
Share this answer
 
Comments
leemark2k3 18-Jul-11 13:45pm    
Cheers Bob. They said they understood that we will be seeking code help as people do in the real world. We have a large in house technical test after this anyway so there's no hiding from that if i wasnt up to scratch. I was more looking for things i need to consider and some general inspiration(I know i'll be coding this myself). Your response was very helpful. I'll be starting this tonight when im home so i'll be sure to take some of your advice on board.

Cheers

Lee
 
Share this answer
 
Comments
leemark2k3 18-Jul-11 12:02pm    
Oooh that looks very useful to me! Brill.
Typically this type of question is looking to see if you can do the basics. Does your code have intelligent exception handling in there? Does it check inputs? What about failover support (in other words what do you do when the web service isn't there)? Do you have tests in place? If it's a web application, does it do a lot of postbacks, or are you using client-side technologies to make for a more responsive application?

More importantly though, when you turn up for the next interview, can you actually walk me through your code and explain it? In other words, did you write it or have you cribbed it from some other source?
 
Share this answer
 
Comments
leemark2k3 18-Jul-11 13:44pm    
Cheers Pete. Thats still useful for me. I can bare in mind some of the things someone with more knowledge like yourself believes that they will be looking for from me here and try to make an application that bares those factors in mind.

Cheers.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900