Sunday, 5 February 2012

A different take on Seedcamp: the mentorship value chain.

Last week was my second time mentoring at Seedcamp.

First was Seedcamp Prague back in October 2011 and now Seedcamp London, in my backyard so to speak. Seedcamp London was one fine long day, run at a fairly decent pace, even for mentors.
12 hours straight mingling with the london startup scene and its extended reach from the rest of Europe.
It was a great occasion to make new connections and take the pulse on a rather vibrant startup ecosystem.

The day after the event, some people asked me how this Seedcamp thingy worked and how it was.
I explained about the line up of aspiring companies, the process and eventually the funding that may come with it (€50,000 if I am correct).
To be honest, this is when I realised that there is a little more than meets the eye in this value chain.

First, one thinks about the funding if it ever comes, then about the networking opportunities with all those potential investors and advisors.
However, looking over once more at my mentoring schedule for the day, I saw something new in it.
Every mentor is in a group of 5, moving from startup to startup.
In the afternoon, you end up seeing 6 startups. Read this as "you discover 6 projects and 12 entrepreneurs".
Now reverse this and look at it from the angle of the startups.
They get to spend 6 sessions of 45 mins with 5 mentors each. That over 22 hours of mentor's attention...

It's quite a fair chunk of free consultancy. At just €70/hour (probably conservative given the caliber of some mentors), that's over €1,500 of value right there, that everyone gets, just for being selected and often with free follow-up consultations (at least, that what I do when I like the project).

In the big picture, given there were 22 companies in competion, the overall pro bono investment of the mentors equates to almost €35,000.

Talk about crowdsourced value creation, it is a pretty efficient way to fuel the ecosystem!

Sunday, 14 March 2010

Fatal error installing PEAR Net_URL2 PHP extension

I was trying to install Net_URL2-0.3.1 via PEAR on a windows dev box but this kept on failing.
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2
576 bytes) in C:\00_tools\AppServ259\php5\PEAR\Archive\Tar.php on line 611
I first changed the memory limit in php.ini but this did not work.

Finally, I released the memory was imposed by PEAR itself.

The solution is to modify pearcmd.php to explicitely set the memory limit.

Adding this line fixes the problem:


Hope this helps.

Wednesday, 11 November 2009

MySQL bar chart from the command line

Whilst working a fairly tricky bug involving the powerful GROUP_CONCAT function of MySQL, I also played with the CONCAT function and though a bit grass root, I managed to build a quick bar chart directly in MySQL.

Here is a quick example of what you can do.

First we need a test table:

CREATE TABLE `source_data` (
  `id` int(11) NOT NULL auto_increment,
  `name_of_variable` varchar(10) NOT NULL,
  `var_value` decimal(10,0) NOT NULL,
  `period` datetime NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id` (`id`)

Then some test data:

insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '1', '0', '2009-01-01');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '2', '0', '2009-01-07');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '12', '0', '2009-02-01');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '5', '0', '2009-02-06');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '6', '0', '2009-03-01');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '11', '0', '2009-03-10');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '3', '0', '2009-03-23');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '6', '0', '2009-04-01');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '21', '0', '2009-05-01');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '10', '0', '2009-05-21');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '1', '0', '2009-06-29');
insert into `source_data` ( `name_of_variable`, `var_value`, `id`, `period`) values ( 'sales', '7', '0', '2009-06-30');

And now we make a basic bar chart, directly in MySQL console:
  date_format(period, '%Y-%m') as monthly_period,
  name_of_variable as 'metric',
  CONCAT(REPEAT('*', var_value)) as 'bar chart'
  name_of_variable , 
  date_format(period, '%Y-%m') 

And the result is :

| monthly_period | metric | bar chart             |
| 2009-01        | sales  | *                     |
| 2009-02        | sales  | ************          |
| 2009-03        | sales  | ******                |
| 2009-04        | sales  | ******                |
| 2009-05        | sales  | ********************* |
| 2009-06        | sales  | *                     |
6 rows in set (0.01 sec)

Et voila, you can have some fun with MySQL console... sort of !

Sunday, 6 September 2009

KML / KMZ data import into MySQL for use with GIS functions

Free open source data is great but does not always come in the right format.
For instance, geographical data can be created in Google Earth, published on the web as an overlay or set of POIs. Usually the publication format is KML or KMZ.
  • If it is KMZ (i.e. binary), it makes the data difficult to use with most (scripting) languages but... Google Earth comes to the rescue, you can make an export in KML (i.e. XML like format) and then we can have some fun.
  • KML is basically an XML like syntax that obeys a distinct XSD but does not natively play nice with MySQL GIS / geospatial data types, like points or polygons. However, with some coding love, this can be quite easily sorted thus we can get our data imported from KML to MySQL.
In this post, I will show how to import polygons defined in a KML file into MySQL, using a nice elegant language called Ruby.

For demonstration purposes, the KML polygons will be inserted into a simple table storing a string and a matching polygon definition. Here is the table definition:
CREATE TABLE `tbl_demo_polygons` (
                       `polygon_id` INT(10) NOT NULL AUTO_INCREMENT,
                       `name` TEXT NOT NULL,
                       `polygon` POLYGON NOT NULL,
                       PRIMARY KEY  (`polygon_id`),
                       SPATIAL KEY `poly_spx` (`polygon`)
                     ) ENGINE=MYISAM DEFAULT CHARSET=latin1

The strategy I adopted for this demo is to use a ruby script to generate some SQL INSERT statements which you may then use whichever way suits you.

Without further delay, here is the script:
require "rexml/document"

# we open the file as an XML document
doc ="datasource.kml")

# we get all placemark elements as an array.
all_pms = doc.elements.to_a("//Placemark")

# we create our SQL file will all the insert statements
f = "dump.sql", "w+"

# we iterate over each Placemark element
all_pms.each do |pm|
 # in my demo, the name of the polygon come from the child element name
 pc_name = pm.elements['name'].text

 # the polygon points come in 1 string by the format is not really MySQL
 raw_polygon = pm.elements['MultiGeometry/Polygon/outerBoundaryIs/LinearRing/coordinates'].text

 # we need to remove the 3rd coord of each point as we don't need a z-axis in our demo
 # we do a bit of formatting to please Mr MySQL
 pc_polygon =  raw_polygon.strip.gsub(',0','#').gsub(',',' ').gsub('#',',').strip[0..-2].split(',').collect!{|p| p.split.reverse!.join(' ')}.join(', ')
 # we concat all this nicely in 1 executable INSERT statement
 f << "INSERT INTO tbl_demo_polygons (name, polygon) VALUES ('#{pc_name}',PolygonFromText('Polygon((#{pc_polygon}))'));\n"

# we close our stream

# happy days!

This should normally yield a SQL file that move all these polygons into proper MySQL POLYGON geospatial type.

I hope you find this useful and somewhat elegant, thanks to Ruby REXML lib :-)

Friday, 31 July 2009

Disruptive Innovation: raison d'etre of the startup world?

A friend of mine directed me to this video. It is quite short and graphically represents a theory about disruptive innovation.

When you listen to this, it quickly feels like someone is describing the strategy used by most successful startups.

Recent great names like 37signals (with their simpler web based products) or Freshbooks (with their Accounting package) have pretty much all chosen to attack the market with a simpler , lower price, highly scalable product offering.

Right now, they seem to be at a cross-roads section, where they tend to increase the complexity of their product, in an effort to serve more users and generate stronger revenue figures.

What kind of choices will they make, moving forward ? Spin-off of smaller structures or brands? Up their market ?

Let's how far the theory applies...

Monday, 27 July 2009

Google Page Speed does not think Google Adsense javascript is optimized for caching.

Today, by chance I ran Google Page Speed Firefox on one of our sites with Google Adsense.
Strangely enough, Google seems to think Google AdSense for search is not optimized

Obviously caching of Ads would not be really useful but should not Google Page Speed analyzer know better ? Or Should Google AdSense for Search specify a proper expiration tag?