Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Favorite Star Wars film:

by webfiend (Vicar)
on May 28, 2002 at 05:29 UTC ( #169707=note: print w/replies, xml ) Need Help??

in reply to Favorite Star Wars film:

I had to think about this one. It took so much work to think about it that I came up with a script to help me figure it out.

my $EHH = 0; # A constant indicating indifference. my $best_time = 0; my $favorite = ""; my @episodes = what_were_the_names_again(); foreach my $movie (@episodes) { next unless (released($movie)); %scenes = watch($movie); my $opinion = $scenes{"fun"} + $scenes{"cool"} - $scenes{"awkward"} - $scenes{"midochlorians mentioned"}; if ($opinion > $best_time) { $favorite = $movie; $best_time = $opinion; } # Present a quick recap of how I felt about this episode. if ($opinion > $EHH) { print "$movie was pretty good.\n"; } elsif ($opinion == $EHH) { print "$movie was okay.\n"; } else { print "$movie kinda sucked.\n"; } } print "My favorite would have to be $favorite.\n";

I'd have to say Episode 4 was my favorite according to this logic, but a more refined approach to calculating $opinion would be in order. For example, this calculation completely ignores appearances by my favorite cranky green muppet (besides Kermit).

Oh, man. I worry about myself sometimes.

Update: Updated the commentary to match the code. Whoops.

"All you need is ignorance and confidence; then success is sure."-- Mark Twain

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://169707]
james28909 doesnt drink much alcohol
james28909 does enjoy blazing up though
james28909 also walks around hunting for his cell phone while using its flashlight function

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2018-05-20 16:21 GMT
Find Nodes?
    Voting Booth?