Day 1240

The whole company was fired yesterday, hahaha, waaaat?

Day 1233

So glad we aren’t heavily concerned with data integrity for some of our tables, otherwise this would have been ridiculous:

http://www.bluebox.net/about/blog/2009/07/mysql_encoding/

peternixey:

I have a friend, a designer, who’s convinced she’s not very good. She doesn’t believe her work is anything special. She doesn’t even believe her discipline is anything special and prefers to assign credit to her environment or to the pressure of others’ expectations.

Day 1231

INSERT… ON DUPLICATE KEY UPDATE

I was doing something crazy:

INSERT INTO table (unique_key, value1, value2) 
VALUES ("maybe_unique", "value1", "value2"), ("maybe_unique2", "value3", "value4") 
ON DUPLICATE KEY UPDATE  
value1 = (CASE unique_key WHEN "maybe_unique" THEN "value1" WHEN "maybe_unique2" THEN "value3" ELSE value1 END), 
value2 = (CASE unique_key WHEN "maybe_unique" THEN "value2" WHEN "maybe_unique2" THEN "value4" ELSE value2 END)

Apparently, this can be replaced with:

INSERT INTO table (unique_key, value1, value2)
VALUES ("maybe_unique", "value1", "value2"), ("maybe_unique2", "value3", "value4") 
ON DUPLICATE KEY UPDATE  
value1 = VALUES(value1), 
value2 = VALUES(value2)

Boo.

Tags: mysql

Day 1227

ActiveRecord::Base.sanitize

Holy crap.

Day 1221

Ambiguity

This is a topic that deserves a serious blogger’s writing. As I haven’t spent the time to find links:

You will never know enough. Ambiguity is part of the real world. The key is recognizing what you know, getting to a point where you will probably make the right decision, and making it. Sometimes you will get unlucky.

Day 1213

Be less amused. Don’t let ego get in the way. Tasks are a privilege.

Day 1164

Rightscale load balancing. Apparently equal weight doesn’t mean equal deployment. This is a pain in the butt.

We’re trying to test out sitting multiple web servers behind a load balancer, and are using Rightscale to manage the servers. As it abstracts away your AWS interactions, all you get is a little ‘Launch’ button which lets you boot a new instance into your server array. What I’m seeing during stress testing is that the balance of the servers per availability zone directly impacts load (durp) and on stressed servers, performance.

Day 1158

Siege

http://www.euperia.com/linux/tools-and-utilities/speed-testing-your-website-with-siege-part-one/720

Our stress test actually tests 3 things: The Load Balancer The Web Server The Autoscaling