October Programming Challenge: Ranking American Heroes
At the beginning of each month, I follow the update of TIOBE Index very closely. TIOBE Index is a measurement of popularity of programming languages based on the result of search engines. By the way, SAS ranks 24 there last month. The way TIOBE Index is defined inspires me so I come up with the following game to play for this month:
Use any programming language you feel comfortable to rank the popularity of the following American heroes (each picture contains a link pointing to its Wikipedia entry):
![]() |
![]() |
![]() |
![]() |
Send me your source code by 31/10 to win a $25 gift card.
As for our previous challenge Motto of Hogwarts School, the winner is Jiangtang Hu. This is Jiangtang’s second time to become the winner of our Programming Challenge. Congratulation!
His method is to tap into an online Latin-English dictionary. Other contenders approach this problem by using Google translate or digging into the search result. As said last time, the Google Translate does not give a correct answer. For example, the following perl one-liner
use LWP::UserAgent;$ua=LWP::UserAgent->new;$ua->agent('Mozilla/6.0');
print $ua->request(HTTP::Request->new('GET','http://translate.google.com/translate_a/t?client=xxxxxxx&text=draco%20dormiens%20nunquam%20titilandus&sl=la&tl=en'))->content;
returns “the dragon never sleeping titilandus” in the JSON format. To me the most Q&D solution is found in the following perl one-liner:
use LWP::UserAgent;$ua=LWP::UserAgent->new;$ua->agent('Mozilla/6.0');
foreach(split /\n/,($ua->request(HTTP::Request->new('GET','http://www.google.com/search?&q=draco+dormiens+nunquam+titillandus')))->content){
if(/mean/i){s/]*>//g,s/^.*means\s+"\;([^&]*)"\;.*$/\1/;print;}}
2 Comments + Add Comment
Got anything to say? Go ahead and leave a comment!
Subscribe to receive our new blogposts
Follow Us!
Categories
- Best Practices (1)
- Best-Practices (13)
- Business Best Practices (4)
- Case studies (2)
- CDISC (9)
- Clinical Data Management (6)
- Code (13)
- EDC (3)
- Event (2)
- Events (2)
- Menu (3)
- Monthly Contest (12)
- New Technologies (12)
- OpenClinica (2)
- SAS Library (4)
- Scripting (2)
- Tips & Techniques (14)
- Trends (1)




Posted under: 







How can we see the winning program?
[...] Winner is Jichun Wang December 4th, 2011 by Jian Leave a reply » TweetThe winner of our last programming challenge is Jichun Wang. Jichun is a Sun Microsystems alumnus, now a senior software engineer at Synopsis. [...]