December 9, 2005
November 23, 2005
October 15, 2005
DIY GPS tracking with Mologogo
MAKE: Blog: DIY GPS tracking with Mologogo - review
One other note, it does use a data plan, but it’s free if you have a phone and dataplan. With prepaid it uses .20 a day (20 cents) for wireless web, but thats for unlimited points. Not bad at all.
October 11, 2005
September 27, 2005
Rational geometry (cont’d)
I made a recent post about rational geometry, or a way to solve geometric problems with no need for trigonometric functions.
My intuition is that this new (apparently the Chinese invented it more than a thousand years ago) way of doing geometry can be very useful for machines.
I ran a very simple experiment. At the end of Chapter 1 from the referenced book, there is a simple geometric problem with the traditional solution and the rational solution.
I have implemented the solution in Java and run some measurements. The rational solution is x4 faster.
Note that the code requires Java 1.5, in order to access the new nanosecond timer.
The output is as follows:
java Geometry
3.313693059275397 computed in 200000ns
3.3136930592753853 computed in 23000ns
3.313693059275397 computed in 1046.7512ns
3.3136930592753853 computed in 250.1114ns
public class Geometry
{
public static void main(String args[])
{
long start, end;
int ITER = 5000000;
/* WARMING UP */
// traditional way
start = getTime();
double alpha = Math.acos( (float)3/4);
double beta = Math.PI - Math.PI/4 - alpha;
double d = 5 * Math.sin(alpha) / Math.sin(beta);
end = getTime();
System.out.println(d + " computed in " + (end-start) + "ns");
// rational geometry
start = getTime();
double q1 = 1400 - 525*Math.sqrt(7);
double d1 = Math.sqrt(q1);
end = getTime();
System.out.println(d1 + " computed in " + (end-start) + "ns");
/* WE ARE WARMED UP */
// traditional way
start = getTime();
for(int i=0; i
alpha = Math.acos( (float)3/4);
// System.out.println("alpha: " + alpha);
beta = Math.PI - Math.PI/4 - alpha;
// System.out.println("beta: " + beta);
d = 5 * Math.sin(alpha) / Math.sin(beta);
}
end = getTime();
System.out.println(d + " computed in " + (end-start)/(float)ITER + "ns");
// rational geometry
start = getTime();
for(int i=0; i
q1 = 1400 - 525*Math.sqrt(7);
d1 = Math.sqrt(q1);
}
end = getTime();
System.out.println(d1 + " computed in " + (end-start)/(float)ITER+ "ns");
}
public final static long getTime()
{
return System.nanoTime();
}
}
September 24, 2005
September 15, 2005
Load generators
When building network applications, it is important to be able to test the scalability. This is where load generators come in.
While looking at some Jabber servers, I found some interesting posts about load generators. Here is a list of items mentioned:
September 8, 2005
Zimbra, the best alternative to MS Exchange I have seen
Zimbra just announced its open source alternative to MS Exchange.
I don’t like MS Exchange for many reasons:
- it requires Windows
- it does not offer standardised interfaces
- it cannot be extended (for research purposes)
Zimbra seems to address all of these issues.
And their hosted demo and Flash walk through are really impressive.
August 25, 2005
installing postgres on Solaris 10
I had some minor trouble installing postgres on Solaris 10.
For instance, I had the following error message:
ld.so.1: initdb: fatal: libreadline.so.5: open failed:
No such file or directory
Killed
So, here is a summary of what I had to do.
- install the libreadline package (can be found on the Sun web site)
pkgadd -d SFWrline - install the postgres package (postgresql-8.0.1-sol10-sparc-local) from sunfreeware
pkgadd -d postgresql-8.0.1-sol10-sparc-local
- add a symbolic link for libreadline.so.5
ln -s libreadline.so libreadline.so.5 - make sure your
LD_LIBRARY_PATHis properly set-up
export LD_LIBRARY_PATH=/usr/local/pgsql/lib:/opt/sfw/lib - run the init command
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data - et voilà
Success. You can now start the database server using:
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
MySQL and Postgres front-ends
When doing some development and administration with MySQL or Postgres, the command line is not always the most convenient way to do.
Here are some tools that can be front-ends to the database.
For MySQL:
- SQLyog (free)
For PostgresQL:
- pgAdmin III (this is part of the Postgtres distribution on Windows) (free)
