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>’;

?>


Why Reddit is better than Digg for normal people submitting articles

August 20th, 2007

So Henry Social Network User has written a brilliant article on his blog. The problem is that no one goes to his blog, and no one will read his article. Henry has a plan. He is a regular user of a few social networks and goes out and submits his to the two he uses the most, digg and reddit. With Digg and Reddit his site thrown in with many other bad, useless, and spammy submissions. In both cases there are users scanning the new submissions.

On Digg people dutifully mark the spam as spam and digg up his article. He gets a few diggs, but unfortunately everyone who dugg his article is just a normal person. What he really needed was a digg from a power users that help get most of the submissions upgraded to the front page. Instead of reaching thousands of people, his page is lost below the spam with a few diggs and a few hits. People can sort the new section by total diggs, but there are pages in pages of bot/spammer dugg crap. What he really should have done was waited until he saw one of the top users digging up new submissions and then submitted it.(ugh) The second option is to just submit to reddit, wait til it reaches the front page, then realize he is also on digg’s front page.

When he submits to reddit he has a better shot. The one obstacle is the intial mod up/down. As long as a bot isn’t modding down all new submissions except the bots submissions, chances are he will get enough users to read his article to make sure his site stays in the positives. As long as his site stays above 0 it will appear in the new section. Luckily more people like his article than dislike it and it makes a slow climb. His article only gets upmodded to about 15, but a good number of people see it and he is happy. At least reddit gave Henry a chance.

Neither site does it perfectly but reddit does submissions far better.

In the last few weeks I have submitted a few things to reddit and digg. The submissions to digg got a few diggs at best and very little traffic in every case(less than 5). The submissions to reddit were varied. One submission was upmodded to 15 and recieved about 100 unique visitors. One stayed at 1 and recieved 100 visitors. One was downmodded to 0 but still recieved 15 visitors.