Posts Tagged Association for Computing Machinery
ACM–WGBH Initiative Finds Large Gender Gap
Posted by Prentice Wongvibulsin in School Related on June 2, 2009
An ACM press release today announced that they have findings which confirm that there is low interest among females in computer science. Well we already knew that… so how do we fix it? That’s the real question.
And another interesting point from the press release:
80 percent of today’s college freshman—the very students that grew up with computers—said they had no idea what computer science majors actually do.
Awesome.
Anyway, I’m excited to be a part of our school’s outreach initiatives to increase interest in computer science. Hopefully, more incoming students will actually be aware of what computer science really is.
Links: Press Release <http://www.acm.org/press-room/news-releases/nic-interim-report/view>
ACM Banquet 2009
Posted by Prentice Wongvibulsin in Association for Computing Machinery on May 31, 2009
Check out photos of the CSC Banquet 2009!
Automated MYSQL Backups using mysqldump
Posted by Prentice Wongvibulsin in Development on May 10, 2009
This is a short walk though for building a script to automate mysqldump and copying the backups offsite. I used this script to backup the database for the RSVP system I developed for our Computer Science Awards Banquet. A future improvement for this script is using rdiff-backup but currently I just needed something to work… quickly… so here it goes:
STEP 1: Create a user with LOCK TABLES and SELECT privileges to the database you want to backup. I made mine local access only with no password but if you’re paranoid, you can pass the password to mysqldump with the –password flag.
STEP 2: If you wish to do offsite backup, use ssh-keygen to create a key pair for your sqldb server to connect to your offsite backup server. This will allow the scp to be automated (and not prompt for a password).
ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/bkupusr/.ssh/id_rsa):
Created directory '/home/bkupusr/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/bkupusr/.ssh/id_rsa.
Your public key has been saved in /home/bkupusr/.ssh/id_rsa.pub.
The key fingerprint is:
a2:b2:aw:w2:63:25:2a:62:fs:d5:ff:fd:11:f1:aa:60 bkupusr@sqlhost
Copy the /home/bkupusr/.ssh/id_rsa.pub. from the sqlhost to the bkuphost’s /home/bkupusr/.ssh/authorized_keys2 file. Make sure the contents of id_rsa.pub take up exactly one line.
STEP 3: Create a script… like the following:
#!/bin/sh
offsitehost=bkuphost
offsiteuser=bkupusr
user=bkupusr
db=dbtobackup
date=`date +%m%d%Y-%H%M`
file="/var/backup/csrsvp-bkup-$date.sql.gz"
mysqldump --user=$user --databases $db | gzip > $file
scp $file $offsiteuser@$offsitehost:~/backup
This script appends a timestamp to the backup file to differentiate between previous backups.
STEP 4: And add the script to your crontab.
crontab -e
On the hour:
0 * * * * ./bkupdb.sh >/dev/null 2>&1
Apple iPhone Dev Talk
Posted by Prentice Wongvibulsin in Association for Computing Machinery on May 4, 2009
This awesome guy from Apple came to give a tech talk on iPhone Development last week. He was an amazing speaker and came prepared with Cal Poly media to make a Cal Poly iPhone app!
See photos of the event: http://www.flickr.com/photos/echo0101/sets/72157617579866456/
ACM General Meeting #3 – Yahoo Presents: PHP Inventor, Rasmus Lerdorf
Posted by Prentice Wongvibulsin in Association for Computing Machinery on February 21, 2008
See http://talks.php.net/show/calpoly08
Overall an exciting tech talk by Rasmus Lerdorf, the inventor of PHP, who discussed how PHP came about, and a general discussion of how to take advantage of the Yahoo API, optimization techniques and how broken and insecure the web is.
He runs a website which displays statistics collected from the Nike + Apple running contraption. see slowgeek.com
Lerdof does not like generalized frameworks. One of them being RoR which his main critisizm is that the framework is not scalabe. When developing with PHP and other tools, you can have multiple points of entry. RoR you’re limited to one point of entry to a framework which must be aware of all the different services avaliable. He claims this makes it very difficult (if not impossible) to scale your applications.
Yahoo has a useful tool called yslow for optimizing your webpages. It is an extension for a firefox extension called firebug which is mainly used to debug javascript on webpages. see http://developer.yahoo.com/yslow
Cool little way to allow browsers to cache files such as CSS (and yet use your latest versions when you make changes to them) is simply appending version numbers at the end of your filenames. That way when you make a major change the chaced version does not matter because you’re looking at a new filename now.
Siege is a neat tool to measure the efficiency of your web services. see http://www.joedog.org/JoeDay/Siege
APC is a PHP package which allows the server to cache opcode optimizing your PHP app. (essentially skips the compile step)
valgrind is a tool to help optimize at the c-level. Presented visually in kcachegrind.
xdebug is valgrind at the PHP level. Generates output similar to valgrind which can be interpreted by kcachegrind.
Major exploits of the internet include cross-site scripting. This allows hackers to essentially hook on to your current session (say in bofa) and perform “clicks” on your behalf. Which is why you should NEVER have an online banking page (or anything of significant importance –with personal information, etc) open in the same browser you use for general browsing.
URL Handlers are a security risk as well. Given that mailto had a buffer-overflow (written by a trusted developer)… many less-well-written applications present a major security risk. “mailto:%0%0…” exploit.
References to XSS about how to hook on to a browser.
php.net/filter — firewall-like protection for PHP against stuff like sql-injection
sla.ckers.org/form/list.php?3 – where exploits get posted.

