Thursday, January 20, 2022

Hefeng is the new Component Development Champion

Friday, June 29, 2007
by the Development Review Board
TopCoder Members

After three days of on-site finals, hefeng emerged as the winner of the 2007 TopCoder Open Component Development competition, taking home the top prize of $15,000. PE came in second, and cnettel took home the third.

Wednesday, June 27, 2007
Dynamic Web Page Data
by TheCois

This component, by offering to uniformize the handling of the data within a web application, has the potential to save its users many development hours.

Even though simple in appearance, its developers needed to pay special attention to minute details. And the opportunities were many to create a difference with the other submissions. One of the most exciting things about one of the submissions was the way it avoided the traps presented by the multithreading aspects and managed to add some efficiency to the designer's algorithms by finding workarounds to reflection's pitfalls.

It should be interesting to see what usage this component is put to in the following weeks.

Thursday, June 28, 2007
AJAX Customizable Page Layout
by agh

The AJAX Customizable Page Layout component provides an AJAX-based mechanism for use with web applications to give the ability for a web application user to customize the layout of a page by dragging and dropping content sections. The component consists of custom controls that implement the movable sections, and server-side objects that handle AJAX-based notifications of customization actions by recording them in a persistent store for use during subsequent page views.

The movement of sections is supported by the client-side JavaScript classes. Yes! C# developers had to write JavaScript code here.

Actually this part could be identical in Java and C# versions but designers used different ways of interacting with the underlying TopCoder JavaScript Drag and Drop component.

In the C# version, the designer suggested developers explicitly control the absolute coordinates of the movable sections. In this case when any action occurs we need to manually rearrange elements. It includes calculation of parent's absolute coordinates and relative position of each section within the parent. But JavaScript functions have different behavior depends of the browser (we need to support IE and FireFox) and page mode (quirks or strict) and it is not easy to make all these things workable. The other common challenge came from the fact that developers have to recalculate positions not only after the layout change but after other events (load, resize) also.

In the Java version developers didn't work with coordinates at all but instead swapped elements in the DOM. It is much easier and requires less effort to make the component workable.

Compared with JavaScript, the implementation of the custom controls and server side objects was straightforward and relatively easy.

Friday, June 29, 2007
Stress Test
by Savior

The Stress Test component provides a framework for defining and executing stress tests. The tests can be running on multiple threads with flexible scheduling options.

Both designs (Java version and .NET version) are very clear and the implementation notes for most methods and algorithms are detailed. Developers should pay attention to thread safety, since most submissions had thread safety issues.

In the test runner class of the .NET version, the original design uses the .NET framework API, which cannot handle more than 64 threads. One submission made improvements on this, and can use more than 64 threads to run the tests.

Component Development: Scores & Wagers

  Dynamic Web Page Data
Java .NET
  Round 1  
Competitor initial score final score place wager points link rd1 total
hefeng 90.8 94.24 1 25 25 download 25
PE 89.98 91.88 3 18 6 download 6
cnettel 89.19 93.21 2 24 12 download 12
wolve n/a n/a 6 10 1 n/a 1
tyrian 83.51 85.91 4 30 7 download 7
enefem21 82.48 82.48 5 33 6 download 6
  AJAX Customizable Page Layout
Java .NET
  Round 2  
Competitor initial score final score place wager points link rd2 total
hefeng 86.92 89 3 20 6 download 31
PE 92.31 94.2 1 60 60 download 66
cnettel 86.07 91.45 2 19 9 download 21
wolve 77.72 78.1 5 30 6 download 7
tyrian 67.02 67.02 6 10 1 download 8
enefem21 80.41 80.41 4 33 8 download 14
  Stress Test
Java .NET
  Round 3  
Competitor initial score final score place wager points link rd3 total
hefeng 91.61 96.42 1 55 55 download 86
PE 90.25 95.85 2 22 11 download 77
cnettel 91.11 95.22 3 57 19 download 40
wolve 85.67 90.01 4 60 15 download 22
tyrian 80.47 83.09 5 60 12 download 20
enefem21 n/a n/a 6 34 5 n/a 19