Category Archives: Code Challenges

We are starting these back up again now. This is open to anyone and is a fantastic way to learn from peers all over the world.

Technical requirements are:

  • Code must be multi-threaded / Asynchronous in nature and safely show multi-thread access to shared data.
  • For example, make the finding of files split into concurrent smaller executions (A recursive model for tree based traversal anyone?)
  • Our reference solution shown after this challenge takes this approach
  • Be careful about how you store this shared state and if indeed there MUST be contention
  • Even though as stated below we expect at least one unit test proving thread safety if your application can meet the expected result with no change of shared data corruption good for you (hint)
  • I recommend the recent focus of Jeffrey Richter’s writings in using Linq Async Enumerators if you need more guidance
  • Linq in 3.5 (to objects) is required
  • No requirement on the view technology.
  • A detailed Ajax front end will loose to a more efficient and correct console app

Code can be submitted as follows:

  • Simply point us to your SVN repository – best case – not required
  • No SourceSafe users allowed (just kidding)…
  • If you use GIT, CVS, whatever that’s cool to
  • Or just email the bits already..

FINAL SUBMISSION July 18th 12 noon EST (New York)

WINNER, FIRST & SECOND RUNNER UPĀ  JULY 21 5PM EST

While nice, just focus on non-release artifacts (no documentation, etc) however no submission will be considered that lacks an ability to externally verify the state of the code.Mission of Challenge:

  • The mission of this challenge is to encourage healthy competition around deep competencies in asynchronous and concurrent programming models
  • To add another level of specific detail, the async pattern must leverage Linq Enumerations in some way
    • HINT: I don’t know of any other way to do this then to use the yield keyword in C# within your logic. Richter recommends simply returning the int value 1 and then using external structures to coordinate the processing. See this months MSDN article
    • HINT 2: His article is not complete and indeed one very critical item is missing. The article will tell you what this is if you read close, and as it is free on the Internet no purchase required.
  • Of course as almost all of us must actually deliver real value (grin) to our stakeholders consider this the ‘core engine’ with basic UI proving it works, focusing deeply on the optimization of internal processing on a standard Windows desktop
  • THIS IS NOT EXPECTED TO BE A SERVER APPLICATION BUT SELF-TUNING SUBMISSIONS TO THE # OF CORES AND OTHER RUN-TIME CHARACTERISTICS ARE CONSIDERED A PLUS – ALMOST AN EXPECTATION BUT NOT QUITE – IF TIME ALLOWS IN OTHER WORDS

THE SPOILS:

  • Winner will receive the book of their choice
  • A standard computer book
  • you cannot get say a 10 volume set from WROX – cheeky monkey
  • You have a pretty cool base to spread around the world!
  • Get ready for it………..
  • You gain the wonderful knowledge this competition encourages and the good will from your peers.

Verifications/Regressions (as always) Required

Show that (MINIMALLY!!!) your masterpiece kicks butt on:

  • Thread Safety and proper synchronization occurring in forced ‘possible’ shared state corruption
  • Proper algorithm (which you can defined as there are a few ‘right’ answers) on what exactly are two duplicate files (for example, do you count a file in an archive? Do you count a file that has the same hash code but all other file attributes are different, etc)
  • Bonus points for the harder dimensions of say removing a duplicate file that has a registry entry expecting that file to be there

NOTE: In 99% of the cases what this means is you must have a series of ‘unit tests’ in whatever container you like, and you must use some strategy to mock/stub any external dependencies we don’t have. This is where people often loose even though the app is great! There is no way to reasonable understand and verify that!)WE DON’T HAVE YOUR HARD DRIVE. YOUR TESTS WILL FAIL IS EXPECTING IT!If your new to this, use Rhino Mocks (the new beta is great)

  • Code Maintainability/Readability may not matter at work (grin) but it does
  • Major docking for non-refactored code.
  • It’s probably insane not to use ReSharper as we expect a very large amount of continuous refactoring (because the alternative is horrible, we are essentially lazy as hell and we take pride in what we do)
  • If you have an API (and bonus points the more you craft real service layers) ensure you have good contracts and as fluent an interface as possible.

Click here to learn more about the domain.dot.net team’s philosophy for the software we are asked to produce.