Coding Challenge - The Meta Keyword Generator - Results
Challenge Description: |
| In this Coding Challenge, all contestants were to develop a VI which reads an HTML text file and then generates a meta keyword phrase by combining the four most commonly used words in that file. The judging was performed by the following:
|
|
![]() Christian Altenbach : Winner of LabVIEW Zone Meta Keyword Generator Coding Challenge | Christian Altenbach is the Meta Keyword Generator Coding Challenge Champion! Christian has been developing with LabVIEW for eight years and currently works at UCLA in Los Angeles. |
Performance | ||||||||
| Christian's VI correctly created the Meta Keyword phrase for both text files. For the first file, it completed in 1 millisecond. For the large file, Christian's VI correctly created the Meta Keyword phrase in 38 milliseconds! To execute this efficiently, Christian's VI compresses all words in the file into a single DBL value for sorting and comparison. He describes his algorithm here: The algorithm works in the following manner: assign a-z to the numbers 1-26 (by subtracting 96 from the U8 representation). These are then considered digits in a base27 number and represented as a DBL value as follows: Number = (first letter + second letter * 27 + third letter * 27^2 ...) It will overflow at 12 digits, so only the first 11 digits are OK. The mantissa of a DBL is 52 bits; this gives about 4.7 bits/character. Unfortunately, not all 64 bits are utilized, giving an effective ratio of 5.8 bits/character. (It is possible to put 13 characters in a DBL using type casting, but these solutions turned out to be 3x slower.) If the calculation is done using EXT precision, 13 characters are possible on windows (64 bit mantissa) with a slight speed penalty. (On a SUN, EXT has a 112 bit mantissa and words could be much longer!) Speed is very critical here, because it is called once for each word. It might be a bit faster to flatten it out to the main diagram, eliminating all the subroutine call, but the current solution is nicer. Decompression just reverses the process. Since this is called only 4x, speed is quite irrelevant. After sorting the DBL array of compressed words, a single loop handles all the scoring with a series of nested case structures:
Coding StyleFront Panel: Christian's submission also exhibited great coding style. All of his Front Panels were very clean and well-structured. All objects were aligned and easy for a user to understand. Block Diagram: All of Christian's Block Diagrams demonstrate excellent coding style. In fact, his top-level VI Block Diagram only required one screen width. They are clean and organized and he uses comments to describe how his application runs. Additionally, his use of subVIs keeps his applications organized and easier to follow. Icon/Connector Pane: Christian develops some very impressive icons. In this submission, he created compression and decompression VIs. His icons are posted here: | ||||||||
| Compression VI: Decompression VI: | ||||||||
These advanced icon designs make it much easier to follow his application on the Block Diagram. Honorable MentionsKevin Price, Shane O'Neill, and Julien Lamaire also submitted very impressive solutions. Their VIs generated the Meta Keyword phrase from the large file (9,386 words) in the following times:
Congratulations to everyone who competed in the LabVIEW Zone Meta Keyword Generator Coding Challenge. Be sure to enter the newest Coding Challenge! |

