Posts

Showing posts from February, 2018

Remote surveillance

https://www.ted.com/talks/christopher_soghoian_government_surveillance_this_is_just_the_beginning

ADnD, Low Pass Filter and Extract Method

As I am very fond of old style Role Playing Games, I am working on a toy project about Advanced Dungeons and Dragons, 1st edition. Now, this game is full of strange rules. For example, when the characters encounter a group of monsters, both parties have to roll a d6 (standard six faced die); if one of the parties rolls 1 or 2, that party is surprised. Also, in this case, the value of the die (1 or 2) indicates the number of "segments" (6 seconds period) for which that party is surprised. In my first Python implementation, this lead me to write a method in the Party class, which was something like this: def surprise_segments(self): roll = random.randint(1, 6) return roll if roll <= 2 else 0 Pretty simple, right? This simple piece of code didn't satisfy me very much. The roll variable wasn't very useful here: it was just a temp variable to keep the roll value so that it could be used in the following expression. So, I decided to extract that pa

You've got to be taught to hate and fear

You've got to be taught to hate and fear You've got to be taught from year to year It's got to be drummed in your dear little ear You've got to be carefully taught You've got to be taught to be afraid Of people whose eyes are oddly made And people whose skin is of diff'rent shade You've got to be carefully taught You've got to be taught before it's too late Before you'r six or seven or eight To hate all the people youre relatives hate You've got to be carefully taught