Archive for May, 2007
Thursday, May 31st, 2007
We've tried several ways of using SVN to manage Answerbag. Here's a brief overview.
We work out of the trunk for very small projects (under a few hours)
We create branches to deal with larger projects, and merge those changes back into the trunk when they are done and tested.
When we ...
Posted in svn | No Comments »
Wednesday, May 30th, 2007
I didn't find any simple ways to determine how hard our mysql database was working, so I whipped this up. It uses a 10 second delay to figure out the queries per second average.
time=10
orig=`mysql -e "show status" | awk '{if ($1 == "Questions") print $2}'`
sleep $time
last=`mysql -e "show status" ...
Posted in mysql, tips | 1 Comment »
Wednesday, May 30th, 2007
I use SVN from the command line a lot. I also hate typing things over and over. I wrote this script to add all files to a repository that are not already in there.
svn status | awk '{if ($1 == "?") print $2 }' | xargs svn add
I ...
Posted in svn, tips | 1 Comment »
Wednesday, May 30th, 2007
Curl is a fantastic application.
The most basic use of curl is very straightforward, just put in a web site's url:
curl http://twitter.com
If you copy and paste the above code, you'll get the HTML output of twitter's home page.
In order to demo this, I created a twitter account. You can sign ...
Posted in linux, tutorial | No Comments »
Thursday, May 17th, 2007
After banging my head against a wall for a while, I finally found this thread from June 2005 in the MySQL support forums regarding using variables in the LIMIT clause. They don't support it yet. There's no time table that indicates when it will be supported either. ...
Posted in mysql | 3 Comments »
Wednesday, May 2nd, 2007
Aggregates are awesome. But sometimes you want to do 2 counts in a query, and have one of them be more restrictive than the other. Lets say our database focuses on pictures, and rating them on a scale from 1-100. We want to know the average rating, ...
Posted in mysql | No Comments »
Tuesday, May 1st, 2007
We never get ads that make any sense when developing answerbag, since we're behind a firewall and the crawler can't figure out our content.
Edit: This is not happening with our live server, the screenshot is from DEV.
Posted in answerbag, google, weird | 6 Comments »