Archive for December, 2009

Moved to JustHost.com for Hosting

Wednesday, December 30th, 2009

When I bought the haitsma.org domain in 2003 I decided to do this with bhosted.nl because back then it was the cheapest hosting provider in the Netherlands. I haven’t had many issues with them but recently discovered that their bandwidth and storage limits are pretty limited: 2 euro (+19% VAT) per month for 200MB storage and 4GB monthly traffic. I was getting close to the 200MB limit and would need to go to their 400MB package for 4 euro (+19% VAT)

As I said in my blog about CheapRiver.com I bought that domain at GoDaddy.com. I bought it there because google referred to GoDaddy to buy a domain. This was much cheaper than at bhosted.nl: 8.99$ per year vs 15 euro per year and a 10 euro setup fee (It also helps that the dollar is low compared to the euro). As I bought the domain on GoDaddy I also got an offer for hosting. 5.99$ a month + taxes for 100GB storage and 1.5TB of monthly traffic. I was planning on moving all my sites there but got frustrated on how slow the GoDaddy website and website admin sites are. Furthermore the websites are very user unfriendly.

Hence I did some web searching and discovered justhost.com. It’s consistently ranked as one of the top hosting providers in most of the rankings I found on the web and it’s very cheap

I now have:

  • Unlimited Bandwidth
  • Unlimited Storage
  • 99.9% uptime guarantee
  • Free domain name

And that for just $2.95 per month (taxes included) with a contract of 24 months. So for just 70$ I’m set for the next 2 years.

There is a slight trick to it to get this rate. You go to justhost.com. Be sure to select United States instead of Europe otherwise you pay the same amount euros as in dollars. Select the plan of 24 months. Fill in some of your contact details. When you have done that don’t order but load another web page by selecting a bookmark or so. At that moment you’ll get a popup with an offer for a 50% discount. If you accept that offer you’ll get to the $2.95 per month rate for 24 months.

Sofar I’m happy with justhost.com. They are very responsive to questions. Usually within 30 minutes you have a reply and there is also live chat help.

They use the popular cpanel interface which is a way more user friendly than the cluttered interface of GoDaddy. Only lame thing is that you cannot manage CNAME DNS entries yourself at justhost.com. You need to send them an email and then they change it. They did that within 30 minutes so that works for me.

Share

Please update your GNOME Amazon Search Engines

Wednesday, December 30th, 2009

gnome-amazon

I discovered a few days a ago that I made an error in making the Search Plugins of the GNOME Amazon Store. I put an extra dash into the affiliate id: gnome-searchplugin vs gnomesearchplugin. Hence all the items you bought via the search plugin did not result in affiliate fees for the GNOME foundation :-( .

As the affiliate center of Amazon by default shows an aggregate of all affiliate ids of the GNOME foundation I didn’t notice it until a few days ago. Because I was surprised about that the affiliate fees were not going up I decided to look into it and discovered that the search plugins did not register any clicks or sales. I’ve now updated the plugins and these register the clicks. So please remove the ones you have currently installed and install the new ones listed below or on http://www.gnome.org/friends/amazon. Sorry about the mistake but the good news is that the GNOME Foundation can probably get much more value out of the affiliate fees in 2010.

Please drop me a line when you bought something with the plugin. That way I can make sure that they work correctly now

NOTE the links below might not work if you read this post in an RSS reader, because it needs a javascript command to install the search plugin. Just install the search plugin by going to this post directly.

SearchPlugin

Share

Interesting piece of Bruce Schneier on Airport Security

Wednesday, December 30th, 2009

Bruce Schneier the well known security specialist has an interesting opinion piece on security at CNN. He basically argues that all the extra measures don’t give any fundamental extra security but just gives the general audience a feeling of safety

Share

Still need to do some last-minute Christmas Shopping?

Tuesday, December 22nd, 2009

gnome-amazon

In case you still need to buy some gifts for Christmas you can help GNOME by buying your gifts at Amazon via the GNOME Amazon Store or via one of the searchplugins listed below. The GNOME foundation will receive between 4-6% of whatever you buy as an affiliate fee.

Below and on http://www.gnome.org/friends/amazon you find the links to install the GNOME Amazon Search Plugin of your favorite Amazon store. NOTE the links below might not work if you read this post in an RSS reader, because it needs a javascript command to install the search plugin. Just install the search plugin by going to this post directly.

SearchPlugin

Share

Status Popup for GWT (Google Web Toolkit)

Saturday, December 19th, 2009

For my English Book price comparison site CheapRiver.com I wanted to use similar status popup panels as Google is using for it’s web applications. For example the small yellowish block which says “Loading…” in the middle at the top of your browser window when you use gmail.

The GWT widget PopupPanel can be used for this. Hence I made my own StatusPopupPanel class which inherits from PopupPanel. I thought I just put a cell of a table in there with the background color I want and center it at the top of the page.

Not being an expert in CSS the difficulty I had is getting it positioned at the top of the page in the middle.
I asked how to do this on the GWT mailing list, but did not get the answer I was looking for. Hence I asked a colleague at work how to do it (Thanks Roy) and he came up with the solution for the CSS. The trick is that you have to put the table in a <div> container of which you set the width to 100%. So now CheapRiver has nice status popups. I only use them for errors so I hope you never see them. Here’s a screen shot. (Click to enlarge)

Screenshot

And here is the code
StatusPopupPanel.java

import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.PopupPanel;

public class StatusPopupPanel extends PopupPanel {
 private Grid grid = new Grid(1, 1);
 public StatusPopupPanel() {
 super(false);
 grid.getRowFormatter().setStyleName(0, "statusPopupPanelText");
 grid.setStyleName("statusPopupPanel");
 setWidget(grid);
 setStyleName("statusPopupPanelContainer");
 }

 public void setText(String str) {
 grid.setText(0, 0, str);
 }
}

The CSS for StatusPopupPanel.java

.statusPopupPanelContainer {
 position: fixed !important;
 top: 0px;
 width: 100%;
}

.statusPopupPanel {
 background-color: #ff3535;
 margin: 0 auto;
 padding: 0 5px;
 -moz-border-radius-bottomleft: 5px;
 -webkit-border-bottom-left-radius: 5px;
 -moz-border-radius-bottomright: 5px;
 -webkit-border-bottom-right-radius: 5px;
}

.statusPopupPanelText {
 font-weight: bold;
 font-color: #333;
}
Share

Bug Fix Release: ReloadEvery 3.6.2 Firefox Addon

Wednesday, December 9th, 2009

I just released ReloadEvery 3.6.2. It’s a bugfix release. 3.6.1 did not work for many people using a locale other than English. This because I didn’t add the new string “Randomize” to all locales. Now I did with a bit of help of Google Translate. So I hope the translations are OK but at least the extension is working.

Actually I don’t like this behavior at all. This means every time I add a string somewhere I need to update all my locale files manually to add the new string. I support 13 locales at the moment but that could be potentially 100 if I’d receive many contributions. If the addon doesn’t find a certain string in a locale it should just take the English string.

Share

Updated DictionarySearch and ReloadEvery for Firefox 3.6

Sunday, December 6th, 2009

I decided to put some time in updating my Firefox Extensions: DictionarySearch and ReloadEvery to make them compatible for the upcoming Firefox 3.6 release. For DictionarySearch I did not add any functionality but ReloadEvery got a “randomize” feature. That feature already has been requested for years, but I never came around to adding it.

With “randomize” enabled reloadevery will randomly reload the page somewhere between 50% earlier or 50% later. Hence if you specify to reload the page every 10 seconds and enable “randomize” it will reload somewhere between 5 and 15 seconds and it’ll change with every reload.

Hope you enjoy the extensions. They are not on addons.mozilla.org yet. Still waiting to be approved. So if you can’t wait get them from the DictionarySearch Website and ReloadEvery Website.

UPDATE: Reload Every 3.6.1 had a bug that it did not work for many locales. That’s fixed in version 3.6.2

Share

Using Google Analytics to track more stats in your website/webapp

Saturday, December 5th, 2009

You can use Google Analytics also to measure more stats then just the pages it loads by calling the analytics tracker yourself in some javascript code. For example to measure how many people click on a link that is referring to the main GNOME website you simply call pageTracker._trackPageview in the onclick parameter of a link

<a onclick="pageTracker._trackPageview('/outgoing/www.gnome.org/link');" href="http://www.gnome.org">GNOME Website</a>

In the example above you will see /outgoing/www.gnome.org/link in the stats of Google Analytics. In CheapRiver I even use it to track which books people are searching for. Since CheapRiver is a Google Web Toolkit application I use JSNI JavaScript Native Interface to call the pageTracker. I simply added the following method to one of my classes and every time somebody searches I call trackQuery(query)

private native void trackQuery(String query) /*-{
 $wnd.pageTracker._trackPageview('/search/' + escape(query));
}-*/;
Share

GNOME Amazon Referral Fee Results November

Saturday, December 5th, 2009

gnome-amazonSince my last post late October about the GNOME Amazon Store more people have bought stuff with the GNOME Amazon Search Plugins (See below) or the GNOME Amazon Store. For November the GNOME Foundation received

Amazon.com $28.00
Amazon.ca $0.00
Amazon.de €17.16
Amazon.fr €3.52
Amazon.co.uk £6.37
Amazon.jp ¥116

This totals to approximately $76 (up from $20 in October).If this growth rate continues like this pretty soon the Foundation will have millions of dollars ;-)

Below and on http://www.gnome.org/friends/amazon you find the links to install the GNOME Amazon Search Plugin of your favorite Amazon store. NOTE the links below might not work if you read this post in an RSS reader, because it needs a javascript command to install the search plugin. Just install the search plugin by going to this post directly.

SearchPlugin

Share

Finding the cheapest Amazon Store for English Books

Thursday, December 3rd, 2009

I tend to buy English Books at Amazon. Since I’m living in the Netherlands I usually would check Amazon.com, Amazon.co.uk and Amazon.de to see which store could make me the best deal. Prices differ quite a lot and since exchange rates also have changed quite you can save quite a bit of money.

However that required quite some work because you have to take into account exchange and shipping rates.

Hence I decided to make a website http://www.cheapriver.com that does this automatically

cheapriver

As I was always impressed with the concept of Google Web Toolkit (GWT) and AppEngine I decided to give that a try. It also was the first time that I programmed something more than Hello World in Java. Overall I have to say I’m very impressed with GWT and AppEngine

  • It has a very nice integration with Eclipse
  • You program both server side and client side in one language i.e. Java
  • You can debug both client and server side in Eclipse, step through the code, set breakpoint, inspect variables etc. Basically everything what you normally expect when debugging a desktop app
  • GWT makes sure that you don’t have to learn all quirks that different browsers have with javascript as GWT just compiles different versions for different browsers (You still you have to know the CSS quirks)
  • Deploying your web application is a breeze. You make an account on AppEngine and you can deploy your app simply by pushing one button.
  • Free quotas on AppEngine are pretty generous. Hence if you don’t get too much traffic you can host it completely for free
  • Client Server Communication (RPC) is super easy. You just extends the class RemoteService and specify the prototypes and make sure that all the data structures you want to send over the line are implementing IsSerializable and GWT makes sure that everything works
  • Making a user interface is very similar to making a user interface for a desktop program. If you have experience with toolkits like GTK, Qt or god forbid MFC making a UI in GWT is easy
  • From your Java code you can still call Javascript libraries

There is actually just one thing I really dislike: the datastore. The datastore is the database that AppEngine is using

  • It’s a pain to get data in the data store. I for instance have a table of about 115.000 records which contain IP ranges and country codes. Hence based on connecting IP I can determine the country of the visitor and immediately can set the country. For the Java there is no upload tool available. Hence I decided to write a servlet and post the data to it. However on AppEngine you can only process a limited time otherwhise it throws an exception. Hence in the end I now send around a 100 records at the time than sleep for a second and upload the next 100 records. Even then app engine now and then throws an exception. So I had to built a retry functionality in the script. Even for deleting the data I needed to write something similar. In the end it takes several hours to upload all the records. I’ll publish how I did this in a following blog post.
  • If you want to do a query you have to get an instance of the PersistanceManager. This is very slow and takes a few seconds. That’s also the reason you see the spinner running in the exchange rate block on cheapriver. It just gets four floating point values from the database but if the PersistanceManager is not in memory anymore it takes several seconds.

As I’m a terrible graphic artist I had the site and logo design done by Michael Katindig of Massive Method in the Philippines. He’s done a great job for a good price. So if you have graphic design work I can recommend Michael.

While doing all this I had to think of two nice books I recently : The World is Flat by Thomas Friedman and The 4-Hour Workweek by Timothy Ferris. Both basically argue that because the world is so flat at the moment anybody can start easily an international business with minimal investments. Basically by outsourcing almost everything. Many services furthermore have a kind of pay as you go model and need very limited upfront payment.

  • I bought a domain for $8.99 at GoDaddy
  • For Google AppEngine I still don’t pay anything because I’m using the free quota. If CheapRiver gets a huge number of visitors I probably need to pay something but by that time enough people buy something at Amazon via CheapRiver such that I should be able to afford it from the affiliate fees.
  • I signed up for a free Google Apps account to have @cheapriver.com email addresses
  • Massive Method made the graphics and web design for a couple of hundred dollars
  • And lastly I put of course quite some hours in of my free time to program CheapRiver, but that has been a fun learning experience

I hope you find CheapRiver useful. Suggestions for improvements are welcome

Share