Archive for the ‘programming’ Category

Roman Numerals

From reddit.com/r/programingchallenges: I googled this and I haven’t found a similar challenge, so I’d like to pose this question to you all! Let’s say I give you a range from 1 to 2000. Within this range, find the number that yields the most characters. I asked a friend of mine and he worked out that [...]

Posted by Matthew on August 8th, 2011

Filed under programming, python | No Comments »

IP Address Range PHP Class

I’m not sure how useful this piece of code really is, but it gave me the chance to write some funky PHP code (have a look at the next() method). Example usage <?php // Single host: foreach(new IpRange(’10.10.10.10′) as $ip) {     echo $ip . "\n" } // >>> 10.10.10.10 // All hosts on [...]

Posted by Matthew on July 28th, 2011

Filed under php, programming | No Comments »

Code Smell

“In computer programming, code smell is any symptom in the source code of a program that possibly indicates a deeper problem.” — Wikipedia I found this piece of code this morning, I think it counts as something gone terribly, terribly wrong: return displayItemDetails(this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode, 14059111); (The code was in-line JavaScript, inserted into a onclick handler, generated [...]

Posted by Matthew on July 4th, 2011

Filed under javascript, programming | No Comments »

Sources of Holy Power Generation

Note: The information present in this post is a couple of months out of date. I’ve not had the time to re-update WoL data and create new graphs, but thought it might be interesting share the data/code anyway When choosing a Holy Paladin spec for 10 mans I was never completely sure about benefits of [...]

Posted by Matthew on April 5th, 2011

Filed under games, programming, python | No Comments »

Text Twist Bot

Yesterday I watched someone play a bit of the browser based game Text Twist. Upon trying myself I found that I was awful, so I did what any programmer would do; cheated. Results of a few hours hacking: Features: Scan for game area and crash and burn if it’s not detected (Crudely) detect what letters [...]

Posted by Matthew on March 16th, 2011

Filed under games, programming, python | 2 Comments »

Intial Divine Guardian Tests

I been wanting to look in the effectiveness of the 20% raid wall granted by Divine Guardian (4th tier talent in a Paladin’s protection tree). To do this I wrote a very simple Python program to read the combat log, detect with DG goes up and then record all the damage that was taken while [...]

Posted by Matthew on February 3rd, 2010

Filed under games, programming, python | No Comments »