fleshyorgans

tryin’ not to be a linux fanboy

fleshyorgans Two Cats

Entries from February 2007

Darts night at the spring (Thursday Picture)

February 22nd, 2007 · No Comments

Actually taken on Monday, this is a fair representation of the gang.
This is another shot of the bar

[Read more →]

Tags: stuff

Related to the previous ruby post — when 55.5 != 55.5

February 21st, 2007 · No Comments

Try this in a console

>> value = 12.555
=> 12.555
# divmod returns a hash with the div result in [0]
# and the modulus in [1].
>> hh = value.divmod(1)[1] *100
=> 55.5
# Check it out!
>> hh < 55.5
=> true
>> hh == 55.5
=> false

[Read more →]

Tags: stuff

The correct spelling

February 21st, 2007 · 1 Comment

Just so you know:

[Read more →]

Tags: stuff

Oh, I want to add this.

February 20th, 2007 · 2 Comments

We hateses Ruby’s float implementation.
And the interface with MySQL floats.
When “10,100.32″ gets saved as “10,100.30″, there’s a problem.
Protip: Use numeric/decimal for your price fields, or split out the decimal and save the two values separately.
Or use rails 1.2, which supposedly has numeric support in its migrations, though the float probably still sucks.

[Read more →]

Tags: stuff

I totally forgot I did this

February 20th, 2007 · No Comments

On a search page:

Use the text box to enter a search for first name, last name, username, or email address. Use “*” (without quotes) for a wildcard.
*A* will match “Adler”, “Badger” and “Beta”.
I’m just proud of the fact that I used the word “badger” on a production site.

[Read more →]

Tags: stuff