?

Log in

No account? Create an account
entries friends calendar profile adric.net Previous Previous Next Next
Ruby is against me going - nil.enroll(aetheric_username, quantum_class_id)
yljatlhQo'! QIch lo'laltbebej!
adric
adric
Ruby is against me going
>> @gas_price = 4.00
=> 4.0
>> @atl_bos = 1076
=> 1076
>> @hotel_nights = 6
=> 6
>> @hotel_fee = 60
=> 60
>> @tank_size=14.50
=> 14.5
>> @miles_per_gallon=20
=> 20
>> @roundtrip = 2*@atl_bos
=> 2152
>> @range = @tank_size * @miles_per_gallon
=> 290.0
>> @tank = @tank_size * @gas_price
=> 58.0
>> @tank = @tank_size * @gas_price
=> 58.0
>> @range = @tank_size * @miles_per_gallon
=> 290.0
>> @gas_buys =  @roundtrip / @range
=> 7.42068965517241
>> (@hotel_fee * @hotel_nights) + (@gas_buys * @tank)
=> 790.4

I'm not sure the exact value of @prohibatively_expensive but ..

arie pointed out an error in the math, recalculating:

>> @hotel_nights = 7
=> 7
>> (@hotel_fee * @hotel_nights) + (@gas_buys * @tank)
=> 850.4
4 comments or Leave a comment
Comments
arie From: arie Date: June 2nd, 2008 04:55 am (UTC) (Link)
This may be a stupid question, but why 6 nights of hotels? When I drove from Atlanta to (roughly) Boston, I did it in two days. So one hotel night (though technically I stayed at a relative's house and not a hotel...).

ETA: Roundtrip of 2 hotel nights -- one each way.

Edited at 2008-06-02 04:56 am (UTC)
adric From: adric Date: June 2nd, 2008 04:58 am (UTC) (Link)

It's not like me not to comment my code, lol

three legs up, so two hotel stays each way
three nights in B (fri, sat, sun) in this version

is seven, not six, frak.

Thanks! :P
arie From: arie Date: June 2nd, 2008 05:00 am (UTC) (Link)

Re: It's not like me not to comment my code, lol

Glad to help! ;D
adric From: adric Date: June 2nd, 2008 05:16 am (UTC) (Link)

this is .. not helpful?

from IM: "Yeah, but fuck. If it's actually going to cost me nearly 1K to go up there for a weekend .. I should just give them half the money and stay home."

twittering that now.
4 comments or Leave a comment