Friday, December 05, 2008
Tuesday, December 02, 2008
Semantic space
A semantic space explorer. Unfinished, but a great metaphor for exploring all kinds of databanks and databases.
Monday, November 03, 2008
Pricing of information
An interesting piece of research from one of my professors from INSEAD, Markus Christen: it seems that it is more profitable for information providers to offer lower quality information to their clients. This will force their clients to use multiple providers to arrive at a 'truth', and will also allow them to raise the prices of the (unreliable) information they offer. This works if there is a low correlation between the information offered by the providers, and if there is a relatively low number of providers.
Reminds me of IDG, Gartner, et al. Which incidentally are among the examples mentioned in the paper.
Reminds me of IDG, Gartner, et al. Which incidentally are among the examples mentioned in the paper.
Friday, September 26, 2008
Reality?
Not sure what to think about this, other than having my vanity reach new levels as I look at my face in a Blade Runner-esque virtual environment... thanks to ExitReality. The navigation metaphor is ok-ish, I had a similar idea for exploring databases; but I'd guess that most of the information-rich web sites aren't amenable to this kind of visualization.
Super cool toy, though.
Monday, August 18, 2008
Friday, August 15, 2008
Applets once were embeddable
Ok most of my recent posts have actually been embedded scripts or badges from various external sites; long live mashups! Today however, I had to deal with a problem I thought had been fixed since 1996: embedding a Java applet in a web page. Such a simple task was made unpleasant by the need to have it done in XHTML and supported across various browsers, including IE, Firefox, and Safari.
Well, the OBJECT tag works slightly different in each of the above. And it is extremely poorly documented. If you want your JAR to reside in other directory than the one where the HTML file is, tough luck.
This is plain stupid. Why is it so hard to standardize such a basic premise of the internet? Ok Java applets aren't used that much anymore, but why did they have to go and make something that was once simple, complicated?
Well, the OBJECT tag works slightly different in each of the above. And it is extremely poorly documented. If you want your JAR to reside in other directory than the one where the HTML file is, tough luck.
This is plain stupid. Why is it so hard to standardize such a basic premise of the internet? Ok Java applets aren't used that much anymore, but why did they have to go and make something that was once simple, complicated?
Friday, June 13, 2008
Monday, June 09, 2008
Saturday, June 07, 2008
Sunday, June 01, 2008
Twitter's db maint
Saturday, May 24, 2008
Widgets ecosystem
Allright, widgets are the new rage. Here are your options:
- Mac Dashboard Widgets: the OG of widgets; Google has a few too
- ...copied by MS in Vista: Windows Sidebar Gadgets
- Google Gadgets: desktop or web
- Yahoo Widgets: desktop, within the yahoo RT
- Opera has its own which work on the desktop, mobile phone, or Tv (have to see this one!)
Then there are the 'social sites' plug-in widgets (eg for Facebook: Washington Post's collection of widgets). Also, offerings such as this one that provide the backdrop for widgets to work. Or, for a really useful collection of widgets, look here.
Finally, there are aggregator sites such as these: WidgetBox and SexyWidget.
A cool company that authors widgets.
Saturday, March 22, 2008
Blogger API
Using the Blogger API: of course, from JavaScript you are restricted by the same domain origin security requirement. Google has a nice API that allows JS to work... still trying to figure out a way to use this feature. The irony is that the demo I link to reads this very postings.
More programmable web
Lately the 'programmable web' has become more and more of a reality. Amazon, Google, and Adobe among others have made big contributions. Here are some:
I do not think the day is too far away when you will be able to compile a program online (if Office is going the software as service way, why not Visual Studio?) and deploy it to a virtual environment on the cloud, and run it there. Possibly, the only thing that is missing is a set of libraries to abstract the communication protocols (SOAP, XML-RPC, ATOM, etc... still too many).
- Amazon S3
- REST/SOAP based storage
- Amazon SQS
- SOAP based queuing
- Amazon SimpleDB (still in beta)
- similar to GoogleBase?
- attribute-based semistructured repository
- Amazon EC2
- on demand virtual servers accessible via web services
- GoogleBase
- shared repository that can be queried using a SQL-type of language
- GoogleGears Database
- browser extension allowing the use of a local SQLite database (SQLite is just taking off: Adobe AIR also uses it)
- GoogleGears WorkerThread
- browser extension allowing multithreading
- the threads are created locally; they are real OS threads spawned within the browser process
- the threads communicate via text messages
I do not think the day is too far away when you will be able to compile a program online (if Office is going the software as service way, why not Visual Studio?) and deploy it to a virtual environment on the cloud, and run it there. Possibly, the only thing that is missing is a set of libraries to abstract the communication protocols (SOAP, XML-RPC, ATOM, etc... still too many).
Friday, March 21, 2008
Google Gears demo
Had some fun with Google Gears. To run this you need Google Gears installed, and it will not work with Safari.
Google Gears demo
Google Gears demo
Ruby and SQLite3 in Windows
If you need to run Ruby with SQLite in Windows, since you cannot set up the environment in the script like you can in Unix (#!), make sure you have the sqlite3.rb and sqlite3.dll in the same directory where the Ruby script is. Figuring this out caused me much grief.
Thursday, March 13, 2008
Postgres and Ruby

On Mac OS X the Postgres binaries are saved in /usr/local/bin. Here is a handy Postgres launcher that can be saved in the user’s directory (as postgres_start.sh for example):
su -l postgres -c "/usr/local/bin/pg_ctl start -D /Users/postgres/datadir"
Where datadir is the directory (owned by the postgres user) where Postgres has the data files.
To create a custom tablespace in Postgres, make an empty directory first and use that as the location for the tablespace in pgAdmin3.
Sample Ruby code to access Postgres; notice that the first line is needed to set up the environment; without it the require fails.
#! /usr/bin/env ruby
#
# original file src/test/examples/testlibpq.c
# Modified by Razvan
# Calls PL/SQL function in Postgres
require 'postgres'
def main
norecs = 0
pghost = "localhost"
pgport = 5432
pgoptions = nil
pgtty = nil
dbname = "razvan"
begin
conn = PGconn.connect(pghost,pgport,pgoptions,pgtty,dbname)
res = conn.exec("BEGIN")
res.clear
res = conn.exec("SELECT * FROM insertrt('another row')")
if (res.status != PGresult::TUPLES_OK)
raise PGerror,"RB-Error executing command.\n"
end
printf("\nRB-Results\n")
res.result.each do |tupl|
tupl.each do |fld|
printf("RB-%-15s",fld)
norecs = norecs + 1
end
end
res = conn.exec("END")
printf("\nRB-Records: %i\n", norecs)
res.clear
conn.close
rescue PGError
if (conn.status == PGconn::CONNECTION_BAD)
printf(STDERR, "RB-Connection lost.")
else
printf(STDERR, "RB-Error:" )
printf(STDERR, conn.error)
end
exit(1)
end #rescue
end #end def main
main #invoke code
This calls the following Postgres plpgsql function:
CREATE OR REPLACE FUNCTION insertrt(data character varying)
RETURNS bigint AS
$BODY$
DECLARE
id bigint;
BEGIN
id := 0;
IF EXISTS(SELECT * FROM "RTable") THEN
SELECT MAX("Id") INTO id FROM "RTable";
END IF;
id := id + 1;
INSERT INTO "RTable" ("Data", "Id")
VALUES(data, id);
RAISE NOTICE 'New id is %', id;
RETURN id;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
ALTER FUNCTION insertrt(character varying) OWNER TO postgres;
GRANT EXECUTE ON FUNCTION insertrt(character varying) TO postgres;
To execute this function do a SELECT * FROM insertrt( ‘parameter’ ). Interesting in the function, SELECT INTO variable. Also notice “ ‘s used to enclose field names and table names. The output of RAISE NOTICE is displayed by the Ruby console.
Since gems does not work with OS X Tiger’s Ruby, the Postgres adapter has to be built manually.
Subscribe to:
Posts (Atom)