comment 0

Make the Ugly Scrollbars on your Facebook App Disappear

If you have annoying scrollbars around your Facebook app’s canvas, here’s what you need to do:

First, go to your app’s settings, click “Edit App” and then “Advanced” on the right.

Scroll all the way down to “Canvas Settings” and change “Canvas Height” to “Settable”.

Second, add a call to FB.Canvas.setSize() (http://developers.facebook.com/docs/reference/javascript/FB.Canvas.setSize/). Make this call inside window.fbAsyncInit, after calling FB.init.

That’s it! Gorgeous app, no scrollbars!

comment 0

Adaptive Payments Error This transaction has already been approved

If you’re using the PayPal Adaptive Payments API in sandbox mode, redirecting the user to https://www.sandbox.paypal.com/cgi-bin/webscr and getting the following error:

This transaction has already been approved

The problem may be that you’re using an incorrect sandbox user as the “sender” in the transaction.

You need to go to the sandbox (https://developer.paypal.com/) and then to “test accounts” on the left.

You need to create a test account. Click “preconfigured” next to “new test account” and then make sure you select “buyer” under “account type”.

Now use the email of this account that you’ve just created as the “senderEmail” in the call to the “Pay” API operation.

comment 0

Jack Abramoff on How to Own The System

“When we would become friendly with an office,” he explained, “and they were important to us, and the chief of staff was a competent person, I would say or my staff would say to him or her at some point, ‘You know, when you’re done working on the Hill, we’d very much like you to consider coming to work for us.’ Now the moment I said that to them or any of our staff said that to ‘em, that was it. We owned them.”

Amazing stuff on the Jack Abramoff story.

comment 0

Hiking the Fjordruta in Norway

The Fjordruta is a great multi-day hike in the west of Norway. It has a little bit of everything: fjords, forests, mountains. The whole trail can take about two weeks but you can do as little as a couple of days.

The best time is summer. I did 3 days in late September: the conditions weren’t perfect but not too bad either. I had two overcast days with some rain and one sunny day. The ground is very wet so waterproof hiking boots will really be worthwhile.

The trail is well marked and there are unmanned, fully stocked cabins along the way. What the cabins have: food, gas, cooking gear, fireplace, beds with pillows and blankets, shower, toilet, water. This means that you don’t need to carry anything with you.

You need a special key to open the cabins. You can buy this key from the Norwegian Trekking Association (DNT) and from some tourist information offices. I don’t know how much it costs because I got mine from a friend. The price of the key is just a deposit so you can return it and get your money back.

You pay for the stay in the cabin and for the food you consumed by filling out a form and leaving it in a box in the cabin. They charge your credit card. A night costs 290NOK for non-members of DNT and 190NOK for members. It may be worthwhile signing up for DNT if you plan on spending more than a few nights, I didn’t check.

Getting there

From Oslo, you need to get to Kristiansund. You can either take a bus via Molde or a flight to Molde, then a bus to Kristiansund. Norwegian has some cheap flights and often a morning flight to Molde will be cheaper than the bus. The bus costs 690NOK from Oslo to Molde and when I went there I found a morning flight for 500NOK from Oslo to Molde. The flight is about 40 minutes, the bus is about 8 hours. The Oslo-Molde bus goes twice a day, in the morning and in the evening.

The bus from Molde to Kristiansund costs 140NOK and takes about an hour and a half. It also stops at the Molde airport and leaves every hour.
After getting to Kristiansund you need to get to Tommervag to start the trail. You do this by taking a bus from the Kristiansund bus station (Traffikterminal) to Tommervag. This bus uses a fairy to get to Tommerweg and also leaves about once an hour. It takes about 1 hour to get to Tommervag.

The trail

I used a trail map for the Fjordruta that you can get at the DNT offices. It’s from 2004 and it doesn’t have some newly built cabins which I will describe here. The whole trail is pretty strenuous in my view so take this into consideration.

The first cabin is Trollstua. It takes about 2 hours to reach from Tommervag. I didn’t stay there and continued directly to the next cabin, Gullsteinvollen. This took about 5 hours of very fast and hard hiking from Trollstua, so take this into consideration. Both Trollstua and Gullsteinvolen were built in 2006 and do not appear on the 2004 map.

On the second day I continued from Gullsteinvolen to Imarbu. This also took about 5 hours of fast and strenuous walking. Imarbu is right on the fjord and it’s really pretty. This was my favorite cabin.

On the third way I hiked from Imarbu to Nersetra. This also took about 5 hours. Nersetra is not as nice but it has hot water for shower because it’s next to some administrative building of the KNT (Kristiansund trekking association) that has electricity.

From Nersetra you can hike to Aure in about 2 hours and then take the bus back to Kristiansund. I didn’t do this because I was lucky to get a ride from Nersetra back to Kristiansund with a KNT employee that happened to also spend the night at Nersetra.

Don’t worry about getting back at any point between Tommervag and Aure because there are bus stops in many places where the hiking trail crosses a road. I don’t know about the rest of the trail, from Aure and on, but I assume it’s similar.

comment 0

Launching Cohaico Beta

A little less than three months ago I started working on my new project, Cohaico, and today I’m launching the public beta of the website. From the announcement post on the Cohaico blog:

Let us fix that for you.

Guess what – your friends are already sharing everything they know about stuff. They do it on social networks like Twitter.

But if you get on Twitter – you’ll just see what was said in the last few hours or so. It’s hard to see what all your friends said about a particular thing.

This is what Cohaico does.

Exciting times!

comment 0

San Francisco

People are zombies

Everybody’s on their iPhone, all the time. I find it kind of troubling. We’re soooo headed at The Matrix. And when it happens, 5-10 years from now, it won’t be all violent skynet-style-war-with-the-machines-kind-of-thing. When Steve Jobs comes up with the iThing that plugs via USB directly into your brain – people will just line up to get that $499 piece of crap.

People on their iPhones

Bubble

This place is a bubble. And I don’t mean “startups are being funded too easily” bubble. Which is also true. I mean that people are just so into everything internet, that any kind of stupid idea flies. Which is pretty dangerous because the rest of the world just don’ work dat way ™.

I mean, homeless people ask you for help with Twitter API here…

Dress

I mean I knew about the (fake) Mark Twain quote and everything, and still I came dressed as if this is Israel. Please remember: San Francisco is cold. So get your warm (a.k.a. in Israel “winter”) clothes, even in the summer.

On the other (better) hand: South Bay is warm.

Getting around

The San Francisco bus/tram system is really useful. You should get yourself a “clipper” which is a rechargeable card to save the trouble of trying to find change and all. Clippers are sold at Walgreens. I don’t know why. I guess it’s because they’re everywhere. But then again so are Starbucks. I guess Starbucks said “fuck off”.
Get yourself a monthly one for $62 which is the best deal for anywhere from 2 weeks and up.

Getting down to the South Bay (Palo Alto, Mountain View and the such) is trickier. You can take the Caltrain but then you’re most likely need a cab too. I really recommend signing up for Zipcar. They have cars everywhere and is the best-value option for when you need a car for a few hours. If you have an Israeli driver’s license you’ll need to produce some papers from the Ministry of Transport. I am in the process of doing it, will update…

Use a coupon for some free hours too.

Getaround sadly don’t work with Israeli licenses at this point.

Update (July 22nd): Getting to meetings specifically in Palo Alto is doable with a Caltrain as the station is within 10 minutes walking of most locations on University Ave (this is where your meeting is going to be). Pro tip: schedule for half-past as Southbound trains get to Palo Alto at :03 past every hour between 10am and 4pm which gives you a good 30 minutes to walk there, then if you manage to end your meeting in 50 minutes you have 20 minutes to walk back to the train back that leaves at :41 past every hour (tip by @rutipo).

Hitting the meetups

Finding geeks/founders/investors/hackers in a social environment is super easy. Check out Meetup.com and Startup Digest for a ton of events. After a week you’ll start recognizing faces…

Working space

The city is full of coworking spaces. I am working out of Next Space which is great – nice people, great location and good facilities. Lots of activities (kind of like The Junction back home :)). I didn’t do any extensive research but some people I talked to did and they settled on Next Space so I guess it’s fine. Reasonably priced too, at $285/month.

comment 0

Some Early Lessons Learned Working on Cohaico

Over on the Cohaico blog, I wrote about some things I learned during the first months of working on a new startup:

Products that succeed? They are the ones that got the crazy distribution by getting people to use their service, other companies to partner with them etc.

On the outside, this often looks like “destiny” or “force majore”. You built such a kick-ass product that people are just magically drawn to it.

Bullshit. Nothing happened by itself. Every successful product came to be because somebody, deliberately, carefully and thoughtfully kicked ass doing sales and did it better than the competition.

Read more.

comment 0

How to Scare the Shit out of a QA Person in 3 Easy Steps

Google Chrome (and now also Firefox 4) have the useless little feature of allowing the user to resize any <TEXTAREA> on a page.
I’ve found the perfect use case for it:

1. Go to a page in your website that contains a <TEXTAREA>, like my Delver profile page:

2. Drag the corner of the <TEXTAREA> until reaching a particularly obnoxious appearance:

3. Now make a screenshot and send an email to your favorite QA person.
This is the part where you should really get creative. Here’s my suggested format:

Subject:

OMG crazy UI bug in profile page – ON PROD!!

Body:

Hi [QA person name],
Check this out (found on my profile page in PROD).

I can’t *believe* we missed this and let it reach production this way. Please handle ASAP. Bug should be assigned as “critical”!

thanks,
[Your name here]

You should also CC the QA team manager on this.
Enjoy.

comment 0

Code Sample: Consuming the Twitter Streaming API

Here’s a c# example of consuming the Twitter Streaming API.
Suppose you want to take all Tweets mentioning a country and save it to a database.
I will be using the Twitterizer c# library. Let’s first look at the complete code and then walk through it:

private static bool streamEnded = false;
public static void HandleStream()
{
  DateTime end = DateTime.Now + TimeSpan.FromSeconds(60);

  OAuthTokens tokens = new OAuthTokens { ConsumerKey = “YOUR_KEY”, ConsumerSecret = “YOUR_SECRET”, AccessToken = “ACCESS_TOKEN”, AccessTokenSecret = “ACCESS_TOKEN_SECRET” };
  TwitterStream s = new TwitterStream(tokens);
  s.OnStatusReceived += new TwitterStatusReceivedHandler(s_OnStatusReceived);
  s.OnStreamEnded += new TwitterStreamEnded(s_OnStreamEnded);
  FilterStreamOptions ops = new FilterStreamOptions { Track = new List<string> { “italy”, “germany”, “spain”, “france”, “england” } };
  s.StartFilterStream(ops);

  while (DateTime.Now < end && !streamEnded)
     Thread.Sleep(1000);
 

  s.EndStream();
}
static void s_OnStreamEnded()
{
   streamEnded = true;
}
static void s_OnStatusReceived(Twitterizer.TwitterStatus status)
{
  SaveTweetToDatabase(status);
}

Now let’s look at the code in depth. First, as we’ll be processing tweets in a loop, let’s set an end to our loop. Let’s say we want to process tweets for 60 seconds:

DateTime end = DateTime.Now + TimeSpan.FromSeconds(60);

Next, we setup the Twitterizer class used to handle the Streaming API:

OAuthTokens tokens = new OAuthTokens { ConsumerKey = “YOUR_KEY”, ConsumerSecret = “YOUR_SECRET”, AccessToken = “ACCESS_TOKEN”, AccessTokenSecret = “ACCESS_TOKEN_SECRET” };
TwitterStream s = new TwitterStream(tokens);

The class TwitterStream is part of the “addons” to Twitterizer, so you will need to download the source of the 2.3.2 release of Twitterizer and make a small fix as I described here.
You will pass to TwitterStream the app keys of your Twitter application which you set up here and the OAuth tokens.
Next, we set up event handlers for the stream of tweets:

s.OnStatusReceived += new TwitterStatusReceivedHandler(s_OnStatusReceived);
s.OnStreamEnded += new TwitterStreamEnded(s_OnStreamEnded);

s_OnStatusReceived will be called by TwitterStream when a tweet is received from Streaming API and s_OnStreamEnded will be called when the connection to Twitter ends.
Next, we may add some options to the Streaming API. There are several methods to access the Streaming API: you can either get tweets for a list of keywords, a list of users or a random sample of all tweets. In our example, let’s ask Twitter for tweets mentioning a country and open the connection:

FilterStreamOptions ops = new FilterStreamOptions { Track = new List<string> { “italy”, “germany”, “spain”, “france”, “england” } };
s.StartFilterStream(ops);

The last thing to do is wait for the amount of time we decided on in the beginning and then close the stream:

while (DateTime.Now < end && !streamEnded)
     Thread.Sleep(1000);
 
s.EndStream();

comment 0

8 Tips for Specs that Work

Here are some tips for creating more useful software specs that I gathered from my experience working on Delver.
Note: these are mostly relevant for specs that deal with user-facing features, but some apply in general.

Tell a story

Try to structure your document as a story that describes what the user does in the same sequence users are going to do it in the eventual system.
This conveys the experience better than just describing different pages and functions as standalone objects.

A picture is worth a thousand words

Include as many sketches of what the user sees instead of trying to describe it in many words. Things like interactions between elements and lists of fields are much clearer when looking at them the same way the user will.
Include in your spec a sketch of every significant UI “state” the user will go through (I use Balsamiq Mockups to create my sketches).

Use nested sections to create structure

Structuring your document with hierarchical sections creates structure and helps navigating your spec when reading it repeatedly. The spec will be used as a reference for a while. For the first read – the story-like narrative is best. For subsequent reads – the ability to jump to the relevant part is more useful.
If you’re using Word – use the built-in “Styles” feature for the titles of your sections. This also creates a handy navigation and allows you to quickly create a table of contents if you want:


Start new sections on a new page

It’s better to start a new section on a new page (Word shortcut ctrl-enter). This makes it very easy on the eyes when trying to read just a particular section:

Focus on what’s important by removing the tedious details

By nature, the spec contains a lot of details. You want the person who reads your spec to be able to grasp the main ideas and the UX flows while not being distracted by the details. Later, you want the details to be available for someone who’s interested in the details for reference, having already understood the flow and the main idea.
You can achieve this by moving details like form field lists, message lists and long if-else logic, out of the main story and into the appendix of the document.

Track changes

Add a changes table at the top of your document. In this table, list the date and main points of every change you make. Your spec will be adjusted during the review and development process. Documenting the main changes helps people who already read your spec once quickly understand what has changed since the last time they looked.

Use conventions

Like in code, it helps to have a few common conventions in all of your specs. Usages of this are a specific font/background color for literal text that is displayed to the user, developer notes and so on.
For example, I use the following standard for literal text:

Hey user, welcome to the website!

Don’t worry about DRY

If you’re a past/present hacker, you love the principle of DRY. Don’t worry about it as much when writing your specs. It’s ok to repeat yourself and describe the same thing twice in two different places if it helps the story-like nature of the spec and its clarity.