Coding Challenge - Vampire Numbers Challenge - Results
Challenge Description: |
The goal of this Challenge was to build an application that returns all Vampire Numbers within a given range. A vampire number is an integer
The submissions for this contest were judged on three criteria: The first was accuracy. The VI must successfully find all of the Vampire Numbers in a given range. This could be integers with a small number of digits, or integers with more digits than many data types can hold. The next criterion was speed. For those submissions that did find all Vampire Numbers in a given range, how fast could they find these? Finally, and very importantly, submissions were judged on code readability. Even if a VI performs a specific task, it must be readable by other programmers and follow LabVIEW Style Guidelines. |
|
![]() | Christian Altenbach, from UCLA, is the Vampire Number Coding Challenge winner! His submission efficiently returned Vampire Numbers in wide ranges of numbers and also displayed good LabVIEW programming style. |
Winning Entry Description: | ||||||||||||||||||||||||||||||||||||||||||||||
| 1. Accuracy: To determine Vampire Numbers which contain more digits than a simple integer will hold, Christian devised the following plan. In his application, the raw "beginning" and "end" boundaries are used to generate individual ranges. All parts with an odd number of digits or less than 4 digits are eliminated. Each range with an equal number of digits is treated separately. The digit count determines which version of basically the same search code is executed: 4-8 digits: I32 based He also built set of Unf math tools (multiply, add, increment, etc.) that make certain assumptions about the data. And in these VIs, Unf multiplication is Fourier based (base 10). By developing this structure, Christian's VI found the correct amount of Vampire Numbers in each of the ranges tested. They were as follows:
2. Speed: All submissions were run on a Dell Dimension computer with a 2.4 GHz Pentium 4 processor and 512MB RAM. Christian's VI was the only submission which found all Vampire Numbers for each range tested in reasonable time. His submission completed the ranges in the specified times:
Honorable Mention:
3. Coding Style: Even when a VI correctly performs a specific task, it is also important that the VI be readable by other developers. Christian's VI was coded very well
| ||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||
![]() enlarge
| ||||||||||||||||||||||||||||||||||||||||||||||
| Very unique, descriptive icons No colloquialisms on icons | ||||||||||||||||||||||||||||||||||||||||||||||
| Honorable Mention: Heiko Fettig, from Bookham Technology, also rated very well in this category. His Block Diagrams were very clean and, again, he created come excellent icons for his application. The entire Block Diagram for his top-level VI is below: ![]() Notice the clear user of comments and compact nature of his Block Diagram. It is easy to follow and clean of messy wires. Again, thank you to everyone who competed in this competition. And congratulations to Christian Altenbach, the overall winner for the Vampire Numbers Coding Challenge. Be sure to check out the current Coding Challenge for even more LabVIEW fun! |




