Ramblings Of a Madman

Yeah, like i would know a good description…

Posts for Tag: jokes

Red Hot Chili Peppers lyrics generator

Here's a little something i tried yesterday: a ruby script that mixes and matches verbs, nouns, adjectives, and colors to come up with crazy ass lyrics, red hot style. Enjoy :)

$nouns = IO.readlines('names.txt') $adjectives = IO.readlines('adjectives.txt') $verbs = IO.readlines('verbs.txt') $adjectives << ['red','blue','green','white','black','yellow','brown','gray'] $pronouns = IO.readlines('pronouns.txt') $adverbs = IO.readlines('adverbs.txt') $prepositions = IO.readlines('prepositions.txt')

def get_rand(collection) sleep rand / 10000 collection[rand * collection.length.to_i - 1] end

def preposition_phrase "#{get_rand($prepositions).strip} the #{get_rand($nouns).strip}" end

def adjectivated_subject_phrase the_part = "the" if rand.to_f > 0.5 adjective = get_rand($adjectives).strip if rand.to_f > 0.5 return "#{the_part} #{adjective} #{get_rand($nouns).strip}" if the_part and adjective nil end

def generate_phrase as = adjectivated_subject_phrase adjectivated_subject_part = as.nil? ? get_rand($pronouns).strip : as preposition_part = rand.to_f > 0.5 ? preposition_phrase : "" verb_part = get_rand($verbs).strip object_part = rand.to_f > 0.25 ? get_rand($nouns).strip : "" the_part = (rand.to_f > 0.5 and object_part != "") ? "the" : "" adverb_part = rand.to_f > 0.75 ? get_rand($adverbs).strip : ""

"#{adjectivated_subject_part} #{preposition_part} #{verb_part} #{the_part} #{object_part} #{adverb_part}".squeeze(" ").strip end

def generate_lyrics result = "" (1..5).each do first_phrase = generate_phrase new_phrase = generate_phrase while new_phrase[-2, 2] != first_phrase[-2, 2] or new_phrase.split(" ")[-1] == first_phrase.split(" ")[-1] do new_phrase = generate_phrase end result << "#{first_phrase}\r\n#{new_phrase}\r\n\r\n" end result end

puts generate_lyrics Here are the sources: rhcp_lyrics_v2.tar. As a bonus there is a script to see how many attempts are required to reach the phrase "The quick brown fox" :)

Wank'o'meter is fun

Last night i laughed like i didn't in a really long time, watching my brother play with the android app "wank'o'meter". Try it out, it's guaranteed fun :)

Guru meditation error

While reading my morning web comics, i noticed this error in wulffmorgenthaler: Guru meditation error.

Apparently this is the default way the Varnish HTTP cache shows errors and - as it turns out - it comes from the old Commodore Amiga times.

It's always refreshing to find more developers with a sense of humor :D

They still call it Blue Screen

After a long, long time without crashes on my windows box i finally got this one while watching a movie on vimeo.com. It seems they call the crash event "Blue Screen". Got love the nostalgia on the windows developers :D

Irony of searches and one iPad visit to my blog

Just a couple of pictures this time.

The first one is about something i noticed i was doing, while searching for a code fragment. One could call it ironic, trying to find "find" :)

The other is proof of my amazement by the fact that there was one person who visited my blog using an iPad :D

UPDATE: Turns out i was looking at a 2 day period only. This month there have been actually 4 iPad visits, hehe :)

Bomb This Country

After an awesome Japanese dinner with my good friend Luizzz, we came to the conclusion that the website that was missing was one where you could bomb any country in the world. The motivation for this was part statistical curiosity and part plain bastardness (did i just make up another word?). So over the course of about 8 hours - the next day - we came up with bombthiscountry.com, a meaningless website where you can bomb any country in the world (yes, China, Tibet is a country). If you follow it on twitter you get daily statistics on the most bombed countries in the world.

Mars produces Methane, and so do I

Turns out that the methane that was found on Mars is not a product of meteor strikes, scientists have found, which means Mars actually produces methane.

My question is: Where are the green aliens that fart all day to produce it?

NOTE: After careful investigation, I found the following: "According to Dr. James L. A. Roth, the author of Gastrointestinal Gas (Ch. 17 in Gastroenterology, v. 4, 1976) most people (2/3 of adults) pass farts that contain no methane. If both parents are methane producers, their children have a 95% chance of being producers as well.". Go figure.

Medieval TRON

With the recent buzz about the remake of the classic TRON (in the works) I could not resist to post this gem: