b a d p o p c o r n

Ruby and Amazon SimpleDb

Written by Ben on December 21, 2007 | 1 Comment

I am a lazy person. I am also a lazy person that loves the idea of leveraging lots of computing power (as a hobby) on demand for cheap. Wow Amazon, you’re really helping me out here… especially now with your SimpleDb.

Of course we’ve all read everyone’s take on the product. Why should I add to the noise… but we’ve got projects registered at ruby forge without any files released… dammit…

Show me the code!

Well, the NY Times peeps have posted about their SimpleDb project.

Links:
SimpleDb Ruby Forge Project Page
NY Times SimpleDb SVN Repository

So will this project be the winner of the ruby bindings mind share? I think first to market gives Jacob Harris (NY Times) a very strong position in my book.

As for mind share… I am fond of two other rubyforge projects (above the rest) for Amazon.
For Ruby S3: http://amazon.rubyforge.org/
For Ruby EC2: http://amazon-ec2.rubyforge.org/

Posted in Technology

1 Comment

Social Adwords vs Regular Adwords

Written by Moe on October 30, 2007 | 1 Comment

Remember when you only saw Google content after a web search? You know, before they basically took over the internet. Google introduced or rather made popular the concept of adwords but it seems facebook might be throwing their hat.

Adwords Crash Course

Google is really good at indexing websites and labeling them with certain keywords. Let’s say you have a blog about Ronaldihno. Google might tag your website with keywords such as “soccer”, “sports”, “ronaldinho” and so forth. How they do it doesn’t matter, the fact is that they can do it. Then they thought, “hmmm since we know what the page is about, we could show the best ad on it.” By “best ad” I mean an advertisement that has a high chance of getting clicked on. For example, ads selling a poster of Ronaldihno would probably do better on your blog then the limited edition Jane Austin novel. That’s ad words is in a nutshell. People purchase ad words and Google shows them on various pages across the internet.

The key here is page content. It has little or nothing to do with the actual user. What if you were on the blog and happened to be looking for new soccer cleats? The best ad would probably be for cleats. What if the ad module knew that you were a huge fan with the popular soccer game Fifa by EA? Here is where social adwords becomes really interesting. Facebook has data and collects data all the time. If they launch a social adwords service it could be amazing. They could show an ad based on the content of the site but also by the user. As of right now facebook has 50 million users and counting and I doubt anyone thinks it is going to slow down anytime soon. They’ll dominate Tom’s social site soon enough. Probably by the time he is 30. Or is it 40? I forget how old he is saying he is this week.

Don’t think they can do it?

The newsfeed module can be seen as the building blocks for the ad module. It basically shows you content of what you should be interested in. Facebook could use these same algorithms and just run with them to display ads. Read this great article for more about new feeds.

There are two important things to realize. First, facebook is thinking far far ahead then anyone gives them credit for. Second, data is great but organized data is the key.

I’m sure you are wondering how much facebook could know about you? The first seven are from the great article I mentioned above.

  • Whose profile pages you visit - and how frequently, how recently, and how often
  • Who you message, and who messages you
  • Whose walls you write on, and who writes on yours
  • Who/what you search for
  • Who you invite to events and groups, who accepts, and who invites you
  • Who you tag in photos, and who tags you
  • Which News Feed items you’ve clicked on before.
  • What you are trying to get rid of or looking to buy (Marketplace).
  • What types of links you are sharing.
  • What type of videos you watch and how often.
  • What groups you are in and what discussions you take part in.
  • What type of people do you befriend and how often do you make new friends.
  • What you are blogging about (Notes).
  • Which events have you attended and plan to attend.
  • Possibly know where you tavel to often based on your picture locations and names. For example, if you are tagged in a lot albums with “Las Vegas” then it’s safe to assume you travel to Vegas a lot.
  • What locations you usually use the internet from and what times are you most active.
  • More data can be pulled from the Polling application.
  • Which applications you use the most (they are categorized).
  • Profile
    • Activities
    • Affiliations (Networks)
    • Age
    • Books
    • Current Location
    • Education History
    • Interests
    • Desired Relationship or status
    • Movies
    • Music
    • Poltical Status
    • Religion
    • Sex
    • Television Shows
    • Work History

Privacy

Privacy as we used to know it disappeared a long time ago. Probably some time after credit cards and a little before Google Earth. I don’t think facebook is doing anything wrong from a business standpoint. They aren’t selling the data they collect rather using it build another technology. It is a bit scary when I imagine the ads could but I would rather see relevant ads on sites I visit rather then have my email address sold to the highest bidder.

If you want to read more about the facebook ad-words rumors, check out facebook launching the google adwords killer.

Posted in Facebook, Technology, Web

1 Comment

Notes on Git

Written by Ben on September 23, 2007 | 1 Comment

So, it’s been a while since Linus gave a Git talk at Google. Since then, I’ve been playing around with it. In truth, it’s still a bit rough around the edges, but it is so much smoother running than darcs.

Why? Because, it supports a distributed workflow such as:

  1. Create N number of branches to work off of in your local repository.
  2. Make N number of commits to those branches, only merging the polished patches into your own main line branch.
  3. The expose your own main line branch to other developers via an exposed repository on some webserver somewhere.
  4. Other developers will pull down your changes into their own repository, from which they work one the code (creating their own branches and commits).
  5. Other developers expose their own main line branches in their own public repositories, from which you can pull down their changes.

So, here are my notes about getting setting up one’s own Git repositories. Note that you will generally have at least two repositories: Personal development one, and one exposed for your own published commits. In Git, the public directory is generally a “bare” repository sans a working directory. Whereas your private repository has a working directory… for your work.

Here are steps (rough notes) for creating the public and private repository for a project:

# Create your area to store the public repositories
mkdir -p ~/repo

# — CREATE THE PROJECT
mkdir -p ~/projects/myprojectname
cd ~/projects/myprojectname
git init-db
# Commit something first, like a README.txt
touch README.txt
git add README.txt
git commit -a

# — CREATE PROJECT’S PUBLIC REPOSITORY
# NOTE: Git bombs out if there are Zero commits in the project you are
# making public. Make sure there’s at least one commit in that repository.
# The reason I committed an empty README.txt. But also, one could have
# created a bare Git repository without the clone.
cd ~/repo/
# copy the repository in bare form– sans working directory.
git clone –bare ~/projects/myprojectname myprojectname.git
# make the repository available for reading.
touch myprojectname.git/git-daemon-export-ok
cd myprojectname.git
# update the server info for remote clients, tracking branches.
git –bare update-server-info
# post-update executes everytime there is a push to this public repository;
# it executes an update-server-info by default.
chmod a+x hooks/post-update

# — MAKE THE REPOSITORIES VISIBLE
# NOTE: Put it on a dumb (read only) webserver of your choice.
# I rsync it to my dreamhost account; this command is a cron job.
# The following makes the assumption that the public_html directory
# is the web root for the exposed ~username/ directory for the
# webhost.example.com webhost.
cd ~
rsync -av -e ssh ~/repo username@webhost.example.com:public_html/

# — UPDATE THE PUBLIC REPOSITORY
# NOTE: This updates your local copy of the project’s public repository;
# where the next run of the rsync cron job will update the public
# webserver.
cd ~/projects/myprojectname
git push ~/repo/myprojectname.git master:master

# — OTHERS DEVELOPERS CLONE PROJECT’S EXPOSED REPOSITORY
# NOTE: On another machine, another developer.
mkdir ~/projects
cd ~/projects
git clone http://webhost.example.com/~username/repo/myprojectname.git
# This developer now has his own copy at ~/projects/myprojectname;
# this developer will then work and create patches to send to you.
# If you have pushed updates to your public repository, this other
# developer may pull down your changes using:
git pull

Now, only if I could better figure out how I’d like to work on managing my own branches, and tracking remote branches.

Posted in Technology

1 Comment

privacy policy or the lack of it

Written by Moe on August 29, 2007 | 3 Comments

A few months ago I signed up for a SharedReviews beta account. The idea behind the site is to get solid reviews of products and pay the community 50/50 on certain revenue. Sounds pretty cool huh? Well it may be but as I was signing up I came across the privacy policy. Usually I just breeze through it but I decided to read this one.

“We protect your privacy with a passion!”

First, I want to say that I think ShareReviews is a cool site and I hope their business model works out. However, the privacy policy was kind of weird. It was actually amusing. Why do sites even have privacy policies? They should just come out and say “Yea, we’ll use your information for whatever we damn well please.” Below are some lines right of the policy.

“For the purposes of this policy, “Personal Information” means any information about you except your business title, address, e-mail address, telephone number or facsimile number. It also does not include your home address and telephone number if these are published in a telephone or other directory, and does not include any Review, content or other materials that you post or submit to use for possible publication.

Umm….so what else is there? What exactly is private then?

We do not sell your Personal Information to third parties. We may share some or all of your Personal Information with our third party business partners”

Hmmm ok. I shouldn’t be surprised. It’s a “review” site and to make money they are probably selling data. For that data to be worth anything they have to include user data with it. So why throw in the line about “we protect your privacy with a passion.” Half the business model is actually based upon doing the exact opposite.

Most users caring less is the worst part. We’ll go crazy if a telemarketer calls our house but we don’t blink while registering for a new site. Personally, I’m not against a website data mining to show relevant ads. Let’s take facebook for example. They will look at your profile and use that to display an advertisement. An advertiser will pay more to know that their ad is getting to their target demographic. I’m fine with that. I’m going to see an ad anyway, might as well see one that I might actually like. That’s how Google makes all their money.

What I don’t like is when companies sell information they collect. To me thats like selling hot pictures your ex girlfriend took for you. The ones she would dress up like a tiger and act like she is…ok getting off topic. The pictures were meant for you not the public or your favorite “rate this chick” website. Just because you don’t care about her anymore doesn’t mean you should go and sell something she wouldn’t want sold. However, let’s say you analyze the pictures. After hours of analyzing, and frequent naps, you say to yourself “hey i bet she would really like this lingerie site.” You contact her the usual way you two communicate and let her know that you are an affiliate for an animal lingerie site. Nothing wrong with that, right?