ChemSink A chemical reactions driven Community

September 26th, 2008

Today I am beta launching a project I have been working on for just over a year. The site www.chemsink.com is a place for chemists to discuss chemical reactions, while slowly building a verified free open chemical reactions database. I am launching the site with 1,200,000 compounds(a small racemic organic subset of pubChem) which are connected by 2,500,000 reactions.

I still have a whole list of things to work on, but I want to get people using the site and giving feedback.

To navigate on ChemSink, just search for the reactant or product you are interested in. If there associated reactions, they will appear on the page. To see an example compound that has reactions where it is a product and reactions where it is a reactant, go here. Please send me feedback!


Obama and fake posters

April 15th, 2008

So today Michelle Obama came to visit Haverford, and I went to see her speak. After she recapped the course of the campaign she gave a nice speech where she addressed things like supposed elitism.

According to an email from the college no one was allowed to bring any signs, but they did hand out some signs that looked like they were brought from home. Mine said UNITY. I tried to make a makeshift sign from the heart with the ballpoint pen I had in my pocket, but to no avail. I would be interested in knowing the reasoning for not allowing people from bringing their own signs. It seems a little silly.


Netflix “Watch Now” in Ubuntu

March 5th, 2008

Netflix now has unlimited online viewing with one catch: you must use Internet Explorer. This leaves the mac and linux users searching for virtualization software. I am an Ubuntu user, and I already had vmware server installed with both a windows xp and vista. Both of these options ‘worked’, but the playback was so choppy the movies were unwatchable. Fortunately I found some other virtualization software and Virtualbox(the first one that I tried), worked smoothly. It also provided better windowed integration into Ubuntu as well a full screen mode that worked better on my dual monitor set up. This should hold me over until there is some proper linux support.


Reddit RSS Feeds

January 22nd, 2008

I frequently visit reddit.com and am a big fan of the site. While you can append .rss to nearly any page on reddit and get an rss feed, many of the feeds have the same order of the page itself and are not ordered by date. They do offer this feed which shows some of the top links ordered by date, but the feed does not get a large number of stories posted to it. So I put together a simple script that loads reddit every few minutes and if certain requirements are met, it adds it to the feed.

Check out these two feeds:
Reddit stories organized the by date and time they reach 500 points(not including any stories about reddit.com)
Reddit stories organized by the time they reach 100 points


Some 2960 by 1050 backgrounds

January 14th, 2008

I just got a extra screen that makes my desktop this size, and there are not very many backgrounds available. Here are a few I created using the Hugin panorama generator and photos I took in australia. I would have a lot more high quality panoramas if I read this.

Here are some large panoramas as well.


Playing around with Actionscript 3.0

January 12th, 2008

So every once in awhile I have a pang to write a simple flash game. I ended up starting to build the exact same game I made back when Macromedia was its own company. That game was riddled with bugs and I wanted to make something stable. I assumed this would involve loading up vmware and installing the latest version of flash that my school provides, but this time I learned that there was a free alpha linux version of the adobe flex builder! These instructions worked well for installing the flex builder(you need eclipse 3.3).

Once I got everything installed I got to dig into some actionscript 3.0. What an improvement over the previous version of actionscript I used! Everything is object oriented and flex builder allows easy for all of the objects that you might want to use. Type checking is there if you choose to assign types to your variables. Some of the cooler things that I came across were the iterators and the event handling. The only hiccup was trying to import Kongregate’s library(Kongregate is a great way to get feedback and to implement High Scores easily). I had to add this to the “additional compiler arguments” under in the project properties:

-include-libraries “/path/to/KongregateAPI.swc”

Anyway check out the magnetized avoider game I made.

Some things that were helpful in making this really simple game were the moving circle AS3 class, obfuscating high scores to prevent cheaters, and realizing that Event.MOUSE_LEAVE is not infallible and you should check the x and y coordinates of the mouse.


What to do when you lose your cell phone?

December 27th, 2007

So you’ve lost your cell phone again, and you didn’t have the foresight to back up all of your phone numbers. What do you do? Well if you are on facebook you may know that people have created thousands of groups requesting numbers after such an event. Now there is an application to end the nonsense. Need numbers allows you to recover your numbers more easily, by allowing you to download your friends numbers in a phone importable CSV. I just finished up the privacy settings today, so your facebook friends that are not really your friends can’t get your number.

Check it out


Amazon Filler Item Finder on TV a few more times

November 27th, 2007

I have had a web site be on TV before, but never in the USA. My site was recently on MyFox Philly briefly in a segment about Cyber Monday and saving money online. Here is a link to the page that has the article and the video clip!

Update: It was on TV again! Also Terri’s consumer blog mentioned that my website was in Consumer Report’s Shop smart January ‘08 magazine(page 23).


Wow…down for a month and didn’t even notice

October 26th, 2007

So the site has been down since the 8th due to some sort of caching problem, but the problem has now been fixed by updating to the newest version of wordpress.

I wanted to post about google’s cool spreadsheet feature, but I am out of time. Here is an example spreadsheet I made.


Facebook Apps: PHP Invite Code

August 29th, 2007

One thing I needed when making my second facebook application is a simple way for users to invite your friends. I found a few examples, but none of them were really what I was looking for. This code uses the ajax multiple friend select box(<fb:multi-friend-input>) for inviting friends instead of a long list or a random list of all your friends. You will need facebook.php and facebookapi_php5_restlib.php from facebook_client.tar.gz. If you want to see this invite code in action add the need numbers application. Here is the code:

<?php

/////////////////////////////////////////////
// These are the variables you need to change
/////////////////////////////////////////////

// your app api key
$appapikey = ‘changeme’;
// your app secret
$appsecret = ‘changeme’;
// your callback url
$appcallbackurl = ‘http://website.tld/’;
// your facebook url of this page
$inviteurl = ‘http://app.facebook.com/app/invite.php’;

/////////////////////////////////////////////
// This is the beginning of the section which includes and set up the php5 rest lib
/////////////////////////////////////////////

require_once ‘facebook.php’;

$facebook = new Facebook($appapikey, $appsecret);
$user = $facebook->require_login();

//catch the exception that gets thrown if the cookie has an invalid session_key in it
try {
if (!$facebook->api_client->users_isAppAdded()) {
$facebook->redirect($facebook->get_add_url());
}
} catch (Exception $ex) {
//this will clear cookies for your application and redirect them to a login prompt
$facebook->set_user(null, null);
$facebook->redirect($appcallbackurl);
}

/////////////////////////////////////////////
// These are the variables may want to change
/////////////////////////////////////////////
// The title of your Invite message
$title = ‘You have been invited’;
// The body of your Invite message
$text = ‘<fb:name uid=”‘.$user.’” firstnameonly=”true” /> invited you to join this app. <fb:pronoun uid=”‘.$user.’” /> wants you to join.<fb:req-choice url=”‘.$facebook->get_add_url().’” label=”Add it” />’;
// The logo associated with your invite message
$logo = ‘http://website.com/logo.gif’;
// Success message for when invites succeeded
$iworked = ‘<fb:success><fb:message>Your invitations have been sent</fb:message></fb:success>’;
// Error message for when all invites have been used
$ierror = ‘<fb:error><fb:message>You are out of invites, try again tomorrow</fb:message></fb:error>’;

/////////////////////////////////////////////
// This is the beginning of the section that processes the invites
/////////////////////////////////////////////
if ($_POST[’ids’]) {
// Invite the friends that were selected.
$friends = array();
foreach ($_POST[’ids’] as $value) {
if (count($friends) < 10) {
$friends[count($friends)] = $value;
}
}
$tail = ‘&canvas’;
$url = $facebook->api_client->notifications_sendRequest($friends, $title, $text, $logo, true);

if(!$url){
// If the maximum number of invites has been reached
$facebook->redirect($inviteurl.”?i=1″);
exit;
}else{
$facebook->redirect($url.$tail);
exit;
}
}

if ($_GET[’sent’] == 1) {
// Display a message letting the user know invitations have been successfully sent.
echo $iworked;
}

if($i==”1″){
// Error message for when all invites have been used
echo $ierror;
}

/////////////////////////////////////////////
// This is the beginning of the actual invite form
/////////////////////////////////////////////
echo ‘<div style=”margin:20px”>
<h2>Invite some Friends</h2>
<form action=”‘.$inviteurl.’” method=”post”><fb:multi-friend-input width=”350px” border_color=”#8496ba” /><input type=”submit” value=”Invite” /></form>
</div>’;

?>