Why the tech industry can’t “go on the offensive” against IP laws

January 18, 2012 @ 6:55 am · Filed under politics, tech

It’s SOPA blackout day today.

At Hacker News, most SOPA related stories have a comment something like “It is time to stop being defensive. The tech sector has lots of money, it should get together to lobby and go on the offensive against the RIAA and MPAA instead”

What no one seems to realize is that the large players in “the tech sector” generally do not have interests which align well with one another.

The biggest us tech companies by market cap are:

  • Apple
  • Microsoft
  • IBM
  • Google
  • Oracle
  • Intel
  • Verizon
  • Cisco
  • Qualcomm
  • Amazon

Why would Microsoft, IBM and Oracle lobby for a decrease in copyright length (as has been suggested)[1]. Why would Apple, Intel, Cisco and Qualcomm lobby for patent reform when a great deal of their value is in the form of patents?

If I was trying to organize a “tech lobby group” I’d lobby on two things:

  1. Hands off the Internet. I don’t think this needs explaining, but will be a hard, hard fight. All tech companies should benefit from this.
  2. Compulsory licensing of streaming video. Currently music streaming is compulsory licensed (which allows Pandora etc to exist), and this arrangement should be extended to video. This would enable a huge number of video-related startups to legally build innovative solutions around copyrighted materials, while still giving revenue to the owners of the content owners. Every tech company would benefit either directly or indirectly from this. Also, the MPAA would hate it (even if they should be lobbying for it themselves).

[1]  news.ycombinator.com/item?id=3476826

 

 

 

Permalink Comments (1)

A pragmatic approach to Google AppEngine

November 23, 2010 @ 6:31 pm · Filed under java, tech

I’ve been working on a large (Java) AppEngine project since January 2010. I recently left that job, but the project hasn’t finished and unfortunately I can’t talk about it yet.

During that time I learnt a lot of tricks and techniques for dealing with AppEngine’s idiosyncrasies, which have been useful for building a contextual advertising demo system: Qontex.com (brief synopsis: contextual affiliate ad distribution software. Not too sure what I’m going to do with it, but I had fun building it. The front end container is actually WordPress(!), but the UI is GWT and the backend is AppEngine).

Anyway, it seems useful to share a few things I’ve learnt.

1) Be pragmatic

I think of AppEngine as Amazon S3 plus some intelligence, rather than Amazon EC2 minus features. I find that a lot less frustrating.

If there is something you need that AppEngine doesn’t do well, don’t try and force it. Full Text Search is a great example: it’s horrible to try & get it to work on AppEngine, but installing Solr on a VM somewhere (or using a cloud Solr provider) is trivial.

2) AppEngine is a platform optimized for a specific type of application.

Don’t think of AppEngine as a standard Java application stack in the cloud. From the documentation:

While a request can take as long as 30 seconds to respond, App Engine is optimized for applications with short-lived requests, typically those that take a few hundred milliseconds. An efficient app responds quickly for the majority of requests. An app that doesn’t will not scale well with App Engine’s infrastructure.

Think about that for a while, and understand it well. Often Java developers are used to building corporate web apps where functionality is slowly built up over time. All too often a single HTTP request will have 4 or 5 database queries in it, and that is regarded as normal. That won’t work in AppEngine.

When you are working with AppEngine you’ll be thinking about performance continually, and differently to how you do with a normal Java application.

3) The datastore is dangerous.

In the development environment it has similar performance characteristics to a traditional database. In production it is slow at best, unpredictable at worst. If you come from an enterprise Java background, think of it as an integration server for a legacy API you are integrating with: data inside it isn’t going to go missing, but you should expect your connection to it will break at any point. You need to isolate your users from it, protect you application from it and consider carefully how to protect your data from outages.

I usually assume that a datastore query is going to take 200ms. Lately it has usually been better than that, but the variation is still a problem: code.google.com/status/appengine/detail/datastore/2010/11/23#ae-trust-detail-datastore-query-latency

4) Memcache is useful, but no silver bullet.

Memcache is useful because it has much more predictable performance characteristics than the datastore – and it’s a lot faster too. Generally, it’s pretty safe to rely on Memcache responding in less than 20ms at worst. At the moment its responses are around 5-10ms. See the Memcache status page for details: code.google.com/status/appengine/detail/memcache/2010/11/23#ae-trust-detail-memcache-get-latency

A Useful Pattern

One pattern I’ve found useful is to think of user-facing servlets as similar to the UI thread in a GUI application. Blocking should be kept minimal, and anything that’s going to take significant time is done from task queues. This includes anything beyond a single “GET” on the datastore (note that a GET operation is very roughly twice as fast as a datastore query)

For example Qontex has a process that relies on content analysis. I currently do that on-demand rather than attempting to spider the entire internet. The demo “Ad Explorer” front end is written in GWT, and it works like this:

1) Send a request to the analyze URL, passing the name of a callback function (for JSONP callback)

2) The backend checks Memcache for data about the URL. If it isn’t there, it fires an AppEngine task queue request to analyze the URL and returns a JSONP response that contains a status_incomplete flag and a wait_seconds parameter.

3) The GWT client gets the response, and sets a timer to re-request in wait_seconds seconds.

4) Meanwhile, back on the server the task queue task is being processed. That task will load the results into memcache.

5) The client re-requests the analyze URL, and this time Memcache has been loaded so the servlet can built a response with the correct data.

I use a similar, but simpler pattern to write to the datastore.

When an ad is served, or when a user clicks an ad I fire a task-queue request to record that, which lets me send a response much quicker. AppStats is great for showing this graphically:

spacer

As you can see there it would be sensible to bulk up all those memcache reads into a single read on a composite object. At the same time, the entire servlet responds on 37ms, which isn’t too bad, and some of those memcache calls are conditional – but the point is that AppStats gives great visibility into exactly how your application is performing.

Permalink Comments (8)

Perfect Advertising

August 25, 2010 @ 8:41 pm · Filed under blogging, tech

I was at a StartUp Club event last night and had a brief discussion with someone who had the thesis that all advertising by companies is evil and therefor will soon (?) be overtaken by personal recommendations from your social circle.

I disagree with that for a number of reasons (eg, your social circle may not be best qualified to make a recommendation etc etc), but during the course of the discussion I was surprised when no one recognized the term Perfect Advertising. A quick bit of Googling today only turned up one decent post, and yet I’m sure this isn’t a concept I’ve invented.

Perfect Advertising is the idea that a person sees no advertising until they need something, and at that point a single advertisement is presented to them that matches their requirements perfectly.

The example last night was jogging shoes. The original argument was that you will get shoe recommendations from your friends. My counterpoint was that it would be easy to get better recommendations by instrumenting your body and taking advice from sports scientists, and in a world with perfect advertising you would be presented with a single choice of shoes, in the correct size that compensated perfectly for your over or under pronation. That’s not a recommendation your friends are likely to be qualified to make, but of course perfect advertising would take into account the views of your social circle, too (eg: will you be socially ostracized by buying Nike shoes, or will you be laughed at for buying Vibrum Five Fingers?)

This might seem a distant goal, but none the less it’s an important concept because it shows the weakness in social advertising systems (the lack of intent) as well as a weakness in search advertising systems (the lack of context).

Is it easier to add context to search advertising or derive intent in social advertising? That’s the $100 billon question (literally), and I don’t have the answer.


Permalink Comments (1)

Mobile Monday Adelaide: Business Angels in South Australia

May 17, 2010 @ 6:28 pm · Filed under tech

I went along to the Mobile Monday meeting on Business Angels in South Australia. Pretty good event, all up.

Nick Foskett gave a pretty good and honest talk about the state of Angel investment in South Australia. A quick summary from memory only : SA Angles Inc was formed in 2007, but spent quite a while figuring out how they should do investments (solution: don’t form a fund) and who should be involved. They have 17 people who are actively seeking investment opportunities.

Since they formed they have had 41 pitches and made one investment. I can’t remember the exact amount invested (I think it was 400K), but it was by a number of members who all invested in the region of 25K each.

Nick mentioned that a number of the early pitches were under-prepared. People couldn’t give answers on basic financial predictions, and had no idea how much money they wanted or how much of the company they would give up for that amount.

He also mentioned a couple of other reasons why investments were declined:

  • People trying to create jobs for themselves.

I’m paraphrasing here, but this was about people who had a reasonable idea for a small business, but not something that would generate enough returns to be an attractive business. To me, this was about developing a scalable business model.

  • Nothing more than an idea

Apparently people think investors will give them a million dollars for a good idea. I had thought that had died out ten years ago, but maybe not.

  • Lack of defensible advantage

Nick mentioned how easy it is to outsource writing code, and talked about how important it is for your idea to have something that would stop others replicating your success and taking your money. When he was talking about this I thought he meant traditional forms of IP protection (Patents, etc), but speaking to him later it was clear that applications where there was a genuine first-mover advantage and/or network effects are also ok.

Then it was question time. Umm yeah.

The most interesting question was one Michael Kubler asked about the expected returns. The short answer was 5 times the investment in 5 years was too long, but many would be happy with 5x in a couple of years.

But the first “question” was something different. Some guy and his business (?) partner decided it would be useful for the room to hear their long rant about how terrible it was no one would invest in them and that people in the US would love them but they wanted to stay here and how terrible it was that the SA Angels group had received 41 pitches and only invested in one etc etc etc.

There is no denying that 1/41 isn’t a great ratio, but Nick had already spent quite a while talking about the reasons for it, and they sounded reasonable to me. I’m sure there are some opportunities they should have taken (and speaking to Nick later he confirmed that), but it seems pointless to blame investors for being overly conservative when people come asking for investment and don’t even have an idea of what kind of revenue they think they will get.

More importantly, the overly aggressive and downright rude way the questioner’s point was presented was offputting.

One exchange went something like this:

Questioner: Why are investors here so conservative when we KNOW we could get money in the States very easily.

Nick: Well if you can get money from the US….

Questioner’s partner (interjecting): Oh.. we could

Nick: then that is something you should pursue.

Of course, this may have been part of the little known “be rude to potential investors and make them hate you before you ask them for money” strategy. Someone should study the success of that method some more.

Anyway, on a better note I was fortunate enough to talk briefly to Nick afterwards, and asked about (very) early stage investment – ie, pre-revenue. He was quite open to that, but rightly pointed out that it is much riskier, so would cost a larger stake in the company.

Permalink Comments (4)

Google Buzz, babies & bathwater

March 29, 2010 @ 3:39 pm · Filed under social networks, tech

There is a saying here in Australia: “Don’t throw the baby out with the bathwater”. I’m not sure it it’s common elsewhere, but basically it’s a warning not to discard the good along with the bad.

When Google Buzz was released, people were shocked at the automatic management of contacts. I suspect that people inside Google were quite surprised at this – after all, it was just a logical extension of what they had been doing within Gmail and Gtalk for years.

I also suspect that within Google it isn’t widely known how much people hate this feature. Personally, I’m no privacy freak, but I’m continually annoyed by the fact that I get random people showing up on my GTalk list just because we corresponded about some random open source project 5 years ago or something. I’ve also heard that a lot of Googlers have stopped using public GTalk because too many external people interrupt them. There is a lot I could say about the rudeness of strangers who just want help to diagnose problems etc, but for the moment I’ll just say that software should encourage desired behavior and discourage things you don’t want to happen.

However – I don’t think Google is wrong in thinking that computers could do a better job than humans of managing contacts for them. I’d love the auto-follow-on-buzz (and auto-add-to-GTalk) feature if it did it almost as well as I could do it myself. At the moment I tolerate the feature in GTalk because – while I know I could do better myself – I know from services like Facebook that the continual grouping and pruning of contact lists is a game I don’t have time for.

After the push-back Google got on automatic contact management in Buzz, it would be tempting to just give up on the problem. I don’t think they should do that – instead of pulling away from the problem they should invest in solving it.

Because then maybe I won’t hate my GTalk contact list anymore.

Permalink Comments

Using Flash to shim a webcam to Canvas

December 15, 2009 @ 5:09 pm · Filed under javascript, tech

A couple of weeks ago I posted my work on developing virtual keypad using HTML5 video. That worked surprisingly well, but had some unfortunate requirements in that HTML5 doesn’t really support access to webcams.

Flash Does.

I’ve developed a Flash shim, which gets access to your webcam, and copies frames to data urls which can be used in HTML DOM images.

This works well, within some limits:

  • The performance of the Flash->Javascript interface is adequate for normal use, but drops off as the data being copied across increases in size. This means that you need to have a postage stamp sized (80×60) video in flash to get adequate performance in HTML (~25 fps).
  • Chrome (and Safari?) leaks memory when new data URLs are created. (See bug). Apart from that, this technique works on both Chrome & Firefox, but my virtual keypad is Firefox only ATM
  • I don’t really know Flash. I downloaded the Flex SDK a few days ago and started hacking, so I’m pretty sure my Flash code sucks.

Here’s a demo. Take a look at the previous post to see how you are supposed to use it. I started work on making a proper Javascript API for it, but yeah… The code is on GitHub, though: github.com/nlothian/FlashCamShim

Permalink Comments (2)

Augmented Reality Virtual Keyboard using HTML 5 video

November 18, 2009 @ 12:47 am · Filed under tech

I’ve been pretty impressed with some of the stuff ARKit can do, as well as the Microsoft Surface demos.

I decided that we need to do that on the web, too, so I build a virtual keypad, using HTML5 video and a webcam.

In HTML5, a common (example 1, example 2) pattern is to take an image from a video, copy it to a canvas and manipulate it here using Javascript. That’s the general pattern I’ve used.

I use a colored marker (setup in a calibration phase) and track its location. In order to take account of brightness changes, etc, I do cosine similarity tests on average color vectors for each “key” on the keypad using the Sylvester Javascript vector library.

I think there’s a fair bit of potential for video based interfaces. I’d like to see a combination of this and the HTML5 drumkit, for example.

You can try it out here: demo.nicklothian.com/keypad/. You’ll need to be using Firefox 3.5+.

Here’s a demo video (ironically as an embedded flash video):

Permalink Comments (6)

via VLC">Using a webcam with HTML 5

November 17, 2009 @ 5:18 pm · Filed under tech

HTML 5 includes the <video> tag to enable embedding of video.

Unfortunately, and unlike Flash, there is no way to directly use a webcam with it. However, if you want to experiment with it some VLC+Apache magic can help.

Firstly, you need to setup VLC to do HTTP streaming. These instructions are for windows, but it works on Linux, too (Linux seems a lot less stable. I suspect that is a Firefox problem rather than VLC, though). VLC can be somewhat obtuse to use, so here’s how I got it working

Step 1: Open VLC and select streaming

spacer

Step 2: Select Capture Device

spacer

Click the “Stream” button.

Step 3: Stream Dialog

spacer

Click the “Next” button.

Step 4: Add stream destination

spacer

Select “HTTP”, check “Display Locally”, select the “Video – Thora + Vorbis (OGG)” profile and click “Add”

Step 5: Configure the stream

spacer

Note that I changed the port from the default of 8080 to 8081. This is optional, but note what port you use. Verify the profile is correct, and click the “Next” button.

Step 6: Modify the stream path

spacer

Carefully alter the “Generated stream output string” to include “/stream.ogg” after the port. You need to do this because Firefox uses the file extension to work out how to handle the file (in the absence of correct headers).

Click Stream, and VLC should display a window showing your webcam.

Step 7: Verify streaming is working

Go to localhost:8081/stream.ogg in Firefox. Chrome kind of works, too, sometime (I usually get the first frame, and then it stops playing).

Optional Step

This stream can be embedded in a webpage using the URL above. However, if you want to manipulate it in Javascript at all you will quickly run into the same-origin restriction. It’s possible to get around this by using Apache to proxy the stream onto the same site you serve yout pages and javascript from.

Step 8: Configure Apache to Proxy Stream

I use mod_proxy, and add the following:

ProxyPass /stream/stream.ogg localhost:8081/stream.ogg

That will allow you to view the stream from yourwebserver:port/stream/stream.ogg.

In my next post I aim to show something you can do with this stream.

via VLC">Permalink Comments (9)

Chrome Extension: Chrome Reload

November 13, 2009 @ 3:20 am · Filed under tech

I wrote my first Chrome extension. The APIs are pretty nice.

From the

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.