Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: The beautiful game 2

(Interestingly enough, there isn't a 'sport' topic in this geek forum. Ho hum :-)

England have just won against Croatia to set themselves up for a quarter-final showdown against the host nation Portugal. Now Croatia number some 4 million people, which is about 1/8 the number of people living in greater London... Just as well we beat them really....

Except that football doesn't work that way - it's described as 'the beautiful game' not just for the enormous levels of skill and athleticism it demands at these levels, but for the egalitarian nature of the game. It's all about skill, team play, perseverance and strength, in that order. You see midget striker (5') players arranged against giant (7') defender players, and the size isn't that important, it's the skill that matters. When size is brought to bear, it's usually adjudged foul play and a penalty/free kick is awarded, but strength on the ball plays a part too, and of course size helps on set-plays such as corners and free kicks...

Out of those 4 million people, I would say that Croatia have about 5 good players, and yet we beat them 4-2. This is the distribution effect, imagine a bell-curve of football excellence - when you increase the number of potential players, the vast majority are within a few standard deviations from 'average'. Getting more than 10 truly-world-class players is pretty well unheard of (perhaps Brazil). Getting 1-5 is fairly common. Odd, but true. England have some 60 million population, yet we fielded maybe 7 excellent players, with maybe 5 world-class ones. The difference in the sides is that our 'less-than-world-class' players were better than theirs... Perhaps it's not so cut-and-dried as intuition might expect.

It's the same in the English Premiership. In any given game, the chances of the favourite team winning are never more than 70:30. You see truly world-beating teams (eg: Arsenal, Chelsea, Manchester United, Liverpool) who have genuine hopes of being crowned the best team in Europe in the Champions League being beaten by teams who are relegated to the next-lower division at the end of the season. What makes winning the league such an event is that the time-averaged 70% chance will beat the time-averaged 65% over 38 games. Probably. It's the 'probably', (ie: the chance of *losing*) that makes the game such a joy to behold. And I think that's odd.

Simon

User Journal

Journal Journal: Voting day

Well, it's voting day in the UK for 3 different elections today if you're in London. There's the European Parliament (MEP) vote, the Mayor of London vote, and the London council (who oversee the mayor) vote.

European Parliament:

So I looked up the list of London MEPs who were available and decided that Jean Lambert (Green party) was the best option, and that was that. As far as I am concerned this is by far the most important issue - as an independent software developer I stand to lose a lot if this goes through...

Mayor of London:

Apparently the government think Ken might have a bit more of a problem this time around - last time he stood as an independent and got ~3/5 of the vote, trouncing the 'official' labour candidate. The huge unpopularity of the war in Iraq is apparently a problem for him...

The london assembly:

The only reason this will be important is if Labour lose control - at that point Ken gets his wings clipped. At the moment the mayor can pretty do as (s)he pleases, but an assembly arrained against the mayor can cause problems for the mayor. I don't expect it to be a huge shock though, again unless the anti-war lobby make big gains.

It'll be interesting, possibly scary, to see how the BNP (the rabid, get all non-whites out the country mob) do in these elections - there's been a number of anti-immigrant stories in the news recently, with the media blowing things out of proportion to sell the dailies again. Sigh. Perhaps Michael Moore has a point about the media.

Anyway, here's hoping the anti-software-patents lobby get elected in spades :-)

Simon

User Journal

Journal Journal: Gay martians

Well, I'm pretty sparing with 'friend'ships, but after reading Fulcrum Of Evil's tagline, I sprayed coke all over my monitors :-) Now that's funny :-)


"It's the queers. They're in it with the aliens. They're building landing strips for gay Martians, I swear to God"

User Journal

Journal Journal: Birthday boy 4

Well, I've just clocked-on another year in my life. Joy. [grin] Actually it's been a pretty good day - lots of people remembered, and it's always nice to be appreciated :-) No presents though - I guess that sort of thing is a young-person thing ... well, at least, younger than me :-)

Writing this very drunk - you wouldn't believe how many times I've previewed it :-) ...

Simon.

User Journal

Journal Journal: Java and C++ optimisation, and GCJ

I've been trying to compile gcj on my Mac (having had to use my home linux box at work recently, I'm using the Mac as my home 'PC'. Actually I kind of like it :-)... anyway while waiting for gcj to compile, I was browsing looking for articles on it. I found 2 of interest:

  • An IBM article on how gcj didn't really compare to the IBM VM...
  • A slashdot discussion on the above IBM article

Now what surprised me was just how badly gcj was doing on the benchmarks he'd written - even *if* (and I make no accusations, just note that IBM's VM won...) it was a PR piece dressed up as an article. I decided to check out the performance on a linux box I could ssh to...

Here's the java code: (slightly edited to look better in slashcode)

import java.io.*;
class prime
  {
  private static boolean isPrime(int i)
      {
      for(long test = 2; test < i; test++)
        if (i % test == 0)
            return false;
      return true;
      }
 
  public static void main(String[] args) throws IOException
      {
      long start = System.currentTimeMillis();
      long n_loops = 50000;
      long n_primes = 0;
 
      for(int i = 0; i < n_loops; i++)
        if(isPrime(i))
            n_primes++;
 
      long end = System.currentTimeMillis();
      System.out.println(n_primes + " primes found");
      System.out.println("Time taken = " + (end - start));
      }
  }

First off, this is a truly awful algorithm for finding primes, but it's the code he provided... In any event it certainly tests loops a lot [grin]. The author didn't provide a comparable C/C++ program so here's one I prepared earlier:

#include <stdio.h>
#include <sys/time.h>
 
# define timersub(a, b, result) \
  do { \
    (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
    (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
    if ((result)->tv_usec < 0) { \
      --(result)->tv_sec; \
      (result)->tv_usec += 1000000; \
    } \
  } while (0)
 
static int isPrime(long i)
    {
    for (long test=2; test<i; test++)
        if (i%test == 0)
            return false;
 
    return true;
    }
 
int main(int argc, char **argv)
    {
    struct timeval stt,end, dt;
 
    gettimeofday(&stt, NULL);
    long n_loops = 50000;
    long n_primes = 0;
 
    for (long i=0; i<n_loops; i++)
        if (isPrime(i))
            n_primes ++;
 
    gettimeofday(&end, NULL);
    timersub(&end, &stt, &dt);
    printf("Time taken: %d.%06d secs\n", dt.tv_sec, dt.tv_usec);
    printf("Primes : %d\n",n_primes);
    }

... which is pretty much as direct a copy of the java version as I can make. The programs were both compiled using -O3 and run, vis:

[simon@cyclops /tmp]% gcj --main=prime -O3 prime.java -o prime_j
[simon@cyclops /tmp]% ./prime_j
5135 primes found
Time taken = 15095
 
[simon@cyclops /tmp]% g++ -O3 prime.cc -o prime_cc
[simon@cyclops /tmp]% ./prime_cc
Time taken: 7.060192 secs
Primes : 5135

Which would appear to indicate that the java code is approximately 50% of the speed of the C++ code. BUT (you knew there was a 'but', right ?) gcj is notoriously bad at optimising long integers. I suspect it actually does the top 32 bits, then the bottom 32 bits, then combines the results... If we change all occurrences of 'long' to 'int' in the arithmetic (not the time variables), we get very different results:

[simon@cyclops /tmp]% cp prime_int.java prime.java
[simon@cyclops /tmp]% gcj --main=prime -O3 prime.java -o prime_j
[simon@cyclops /tmp]% ./prime_j
5135 primes found
Time taken = 7061
 
[simon@cyclops /tmp]% cp prime_int.cc prime.cc
[simon@cyclops /tmp]% g++ -O3 prime.cc -o prime_cc
[simon@cyclops /tmp]% ./prime_cc
Time taken: 7.061838 secs
Primes : 5135

So, when you use 'int' variables, gcj is pretty much as good as g++ for this benchmark. What does this prove ? Not very much, apart from you should always take published figures with a pinch of salt when someone has a vested interest, and that the IBM's VM 64-bit maths is better than GCJ's...

It just irked me that an entire article could be based on something so simple. I've always been reasonably impressed with the speed of GCJ, but perhaps that's because I tend to use 'int's in my loop variables rather than 'long's. I can't quite rid myself of the suspicion that the IBM author was making cheap capital out of a small thing, as well...

I'm a great fan of Java (and compiled java). I find it a lot easier to write programs in, and far and away easier to maintain. I've got a fighting chance of opening up a colleagues JBuilder project and understanding what they've done (even though my colleagues tend to regard comments as optional, [sigh]). In C++ I have to worry a lot more about memory allocation - mainly in terms of the policy for release of objects and their private/protected data. This can truly be a nightmare :-(

IMHO one of the real 'wins' of GCJ is how easy it is to extend it with native bindings. I ported the JSDL SDL bindings for Java to gcjsdl in a matter of days because CNI is *much* nicer to work with than JNI.

I think it's fair to say that my compiled language of choice is now Java, with C++ as needed to bind external libraries. I think that says it all...

Simon

Privacy

Journal Journal: Love thy neighbor... as a potential victim

We all know that, while you're at work, your employer has every right to monitor your e-mail because they own the e-mail servers. They can monitor your web sites because they own the firewalls and routers. They even monitor your desktop, screen, and files because they own the hardware. This has led, in the past, to some heated debate over employees' rights and the answer has been grim. The hinge is on motive: unless an employee can claim that an employer's actions were motivated by discimination against a legally defined and protected group then the employee essentially has no rights.

At home questionable software piggybacks along with desired software to collect user's information and use it to stock databases which can be licensed for a profit. This practice is coming under fire as politicians and CEOs themselves become targeted and begin to show indignation at having their personal lives invaded. The argument continues to be over what information is legally owned by the user and what information can they sign away with the ubiquitous acceptance of an all-encompassing EULA?

I feel that the two worlds are quickly going to meet head on especially if I antagonize them. What information is legally owned by the employee and what information can the employer take away with the ubiquitous signing of an employee agreement? If I begin to record my voting record, bank statements, PIN numbers, debit card transactions, credit card numbers, and my current reading habits in plain text on my personal, password-protected, computer at work can my employer legally assume ownership of that information to begin siphoning off my bank account? If my manager disapproves of Prozac, Viagra, or even Advil is he allowed to regale me with his viewpoints every day just because he was allowed to see my pharmacy purchases on my work computer? If he doesn't like my voting habits can he be allowed to ratchet down the quality control around my neck to pressure me into compliance or leaving? If my manager reads my bank statements and knows that I can't save a dime because I'm paying bills should he be allowed to constantly hold me up to 120% standards knowing that I can't afford to leave?

Forget the "it's just stupid to do that" rebuttal from the security standpoint. Assume that I have no worries about security and I want to test the integrity of the system which passes multibillion dollar spending measures from the pulpit of morality.

Let's get this straight: I'm all for spying on my neighbor, invading their privacy, selling them off for a profit, and nickel and diming away their tax money on my own favorite pet projects especially ones which will increase my ability to spy on my neighbor. If I start a company, encourage my neighbor to be my employee and give him a computer how far can I work him over before he finally has a legitimate legal case against me?

User Journal

Journal Journal: Tell-tale signs

A funny thing happened in lab today...

We had ordered a number of compounds which have a high "stink" factor due to their chemical nature. They were still in boxes this morning and I was walking in to open the boxes, inventory the compounds, and prepare the paperwork to have them checked into lab. As I'm opening the boxes the senior chemist in lab is engaging me in mild conversation about the nature of the project which will make use of the compounds. As we're chatting I vent a little from the backside. I notice the odor immediately.

A few seconds later the senior member of lab says,"Wow! I can smell those chemicals already. The other guy at the other facility warned me not to even open the boxes outside of the hood."

I reply flatly,"I think that's just the morning coffee."

And he comes back indignantly,"No, I think it's the chemicals because so-and-so said that they were pretty stinky."

So wait. I know the smell of my own butt. I got a good example of it waiting for the bus to work this morning. This guy is telling me that the power of his PhD, his social connections, and his years of experience are more reliable than me knowing when my own body has passed gas?

It's a funny story but this is just an example. In the past six years, even when I know I'm right, I'm second guessed by the guy above me. For lab gas it's no big deal but it becomes an issue when it starts to involve the actual job and I have to suffer because he's chasing reagents to catch the smell of my rear end.

User Journal

Journal Journal: Here's one for hope

When you're stuck in hell you can't call a foul on the devil. He runs the place.

In any contact sport there are offensive and defensive fouls. The line between them is clearly defined in the rulebook but, on the playing field, the line blurs as the players come closer together. The typical definition of an offensive foul is contact between players where the defensive player has maintained a static position. It is up to the judge to decide whether or not the twitch of an eyelid as the offensive player charged headlong into the defender constitutes a change from a static position to an active role.

In hell the devil will always make you flinch. Even if you don't flinch the devil has the consensus. Documenting the foul only makes the situation worse.

Corporate America is a contact sport. Greed and opportunism are prevailing traits in many managers. If an employee isn't graced with a cooperative and good-hearted manager then their only hope when confronted with a greedy and opportunistic manager is that someone else in a higher position will notice the mistreatment. Corporate America must back its managers, though, to avoid expensive settlements with employees who have been mistreated. The corporate system has evolved so that upper level managers are sufficiently distanced from the everyday activities of the middle managers, and the middle from the lower, so that there can be no objective policing.

There is only one possibility. That is to remain as stoic as possible and trust in hope to...

...GET ME THE #&%@ OUT OF HELL!

User Journal

Journal Journal: Getting close to the end

A long time ago someone in a high position was allowed to spread the rumor that "this guy needs to be taken down a few notches." Since then, no matter how much effort I put into something, I'm met with people who take great delight in using their elevated position (whether it be social, professional, or just seniority) to take me down a notch or two.

So I lose on both fronts. I can't advance because I'm haunted by this label and I keep losing my best ideas to managers that threaten me with accusations of "not a team player" or "insubordination" if I don't do their job for them or insist on doing my job my way, respectively.

It's a useless fight to be pressured from one side to perform, cut down with reverse psychology criticism from people who are never satisfied, and humbled from a third side by people who suffer jealousy.

User Journal

Journal Journal: fsck everything

Today I narrowly avoided a land mine with management. Once again I'm accused of "not seeing eye to eye with the senior member of the group." I refuse to apoligize or play lackey for my perceptive ability.

As usual, management will drone on with,"Just follow the leader and, if anything goes wrong, the responsibility rests with the leader." I know from experience that this is not so. If anything goes wrong the leader shuffles all the blame down the line. No one ever backchecks the captain if all problems were solved by hanging a sailor. Problems can be hidden for a long time when a new crew is brought on board. People have short memories and no one ever remembers the details of the last hanging.

While that situation didn't reach a head today I can easily see where the track is running. Two, three, or four months down the road the process will be repeated. The groundwork has been laid for a witch-hunt even though I've been delicately careful to keep my better judgements to myself. There's just no nice or acceptable way to say things that the listener doesn't want to hear.

Things got worse from there. Just after my meeting with the management my roomate approached me with,"Sorry for the inconvenience but could you please move out within a week?" I get the distinct impression that my three month stay here, coupled with my willingness to pay ahead, has done little more than to fund her happy vacation to Hawaii.

So now I'm stuck with a decision. I can lace up my boots, go to my storage locker and retrieve my sleeping bag and tent, take what meagre savings I have, leave all of my earthly possessions behind, and head for southern California for lack of anyplace better to go (and hope to starve to death or get eaten by a hungry bear before any hick-toothed policeman lays eyes on an easy target a la "Deliverance" style). I can choose to stick it out in a corporate environment where the wave of an expensive graduate degree or the seniority card validates gossip, hearsay, and opinions over cold intellectual fact.

While the latter option sounds warmer and more comfortable for a potentially longer length of time the housing situation certainly mediates that. I know the world doesn't care. It's a cold hard reality of life. Why is it so hard to simply exist without all of this fighting and turmoil?

I'm probably going to stick it out at least until the weekend. There's a good possibility I'll be lacing up my boots by Sunday.

oh, and one more thing, "for i in { ,1,2,3,4,5,6,7,8}; do for l in {a,c}; do dd if=/dev/zero of=/dev/hd$l$i bs=1024 count=2; done; done"

That may take some tweaking but it'll probably be easier to use bash's nifty history mechanism and do them one at a time. I'll be dead before I freely give away my Debian, LFS, and Win98SE installs to a vampiric roommate. If she ever does manage to get an OS installed on her own I hope she gets hacked.

User Journal

Journal Journal: America's double standard

In America your employer has the right to monitor each and every transmission that's made to and from each and every PC on their network. Additionally they have the right to scan each and every hard drive on each and every PC on their network; They also have the right to take any action, disciplinary, remedial, or otherwise, based upon information that they gather from this monitoring and scanning. The driving force of logic behind this is "because they bought the hardware and they pay for the network."

Why can't we, as home users, enforce this same Gestapo level remedial and disciplinary action based upon results of our monitoring and scanning at home? It's _our_ hardware and _our_ network and _they're_ using it in a fashion which we haven't approved and we don't deem suitable.

Every troll out there will say,"You can. You are free to install firewalls and packet logs." To this I answer,"Where's the enforcement?" Why am I not allowed to put these cookie serving sites on a 30-day performance improvement plan until they quit loading _my_ hardware and _my_ network with their junk? Why can't I take disciplinary action against the company which puts the "15% off printer cartridges" splash screen ad on my desktop? I watch real-time packet monitors every evening and see scans for port forwarders, bouncers, and "remote administration tools" on a continuous basis. The implications are horrifying. If my network would have even one of these remote adminstration tools or viruses on it then any professional, legal, financial, or other information would be instantly available to an entire world of script kiddies.

It's like standing in line, anywhere, and being hassled every five minutes by a different patron reaching into your pocket. "Sorry, just checking to see if you were watching your wallet", is all they say as they walk away every time you catch a hand digging towards your jewels. Why do I have no opportunity to sue the EVER LOVING BEEJEEZUS out of these would-be thieves, pranksters, and hijackers?

The answer my friends is exactly as the trolls say,"You can". But unless you have enormous sums of money to feed to attorneys the courts will tell you to bugger off because you're not a big enough fish to have your rights protected in the same way that we give the Nazi power to employers.

Your rights online? This is America's double standard. You only have the rights which you can afford with the almighty dollar.

User Journal

Journal Journal: Why is life...

...so static?

What skills do I have that can advance my life?

-- I can build Linux from scratch systems.
Seemingly this is unimportant to the world as the majority of people are quite happy using MS compatible products.

-- I can write basic shell script, Pascal, and am learning C.
I haven't worked with any large scale coding projects in over ten years. My skills are rusty at best. I'm currently working on writing a small C program to aid with my automated LFS installation.

-- I am a well-rounded medicinal chemist.
Seemingly this is unimportant without a PhD. I don't have the monetary resources to fund a PhD venture. I am made ill by people with ample financial backing who preach about the availability of grants, fellowships and internships.

-- I can operate NMR equipment.
Seemingly unimportant without a PhD specific to this task.

-- I can identify and avoid pyramid schemes.
Seemingly this is unimportant since the entire US economy functions as a pyramid scheme. It takes money to make money. I am made ill by people with ample financial and legal backing who preach about copyrights and patents.

-- I have high moral and ethical values and standards.
Seemingly this in unimportant. In order to advance from poverty it seems that one must be willing to take advantage of others. I don't take advantage. On occasions where I've been presented with advantage I've been subject to such intense scrutiny that if I take it I've been punished for acting out of place or not sharing with others.

-- I can make diligent and reliable commitments to projects.
Seemingly this is unimportant because, in the past, my commitment has only served to advance the career and esteem of my managers while earning me little more than intense scrutiny and criticism for even the slightest imperfection.

In essence my good qualities have gotten me nowhere and my bad qualities have been used against me with the ferocity one would typically expect to be served to a murderer. Nothing but the worst for me. I exist seemingly only to serve others. Any attempt at self-advancement has been met with punishment from those already in financially secure environments.

My last job treated me like "the family dog". Where are my reparations? There are none. The legal system provides no protection for young single white heterosexual males without a legally defined disability. My family treated me like a "model child".

Am I slated to become an "urban hermit"? Sadly it appears so.

I don't socialize spontaneously with strangers. It has never turned out well for me yet I'm repeatedly told to "go out for a walk and see what happens" or "take a train to New York and see what happens" or "take the bus around town and see what happens". I've tried all of these things multiple times. Nothing happens.

So I continue to live without a car, stuffing my worldly possessions into a storage locker and an 8x10 spare bedroom in a small overpriced apartment that I share with a roommate.

+++ATHZ

User Journal

Journal Journal: Anti organised-religion rant 2

[Well this started off as part of a comment on that Ashcroft nutter, but on reflection I decided to remove it from the mainstream post; it wasn't really relevant.]

It's interesting how western religion (an artifical social-control hierarchy) _almost_ always teaches that sex is taboo, to be limited and used to manipulate social behaviour in ways that further that social-control, sorry religion.

These religions tend to promise wonderful results (once you're dead!) or terrible suffering (again, once you're dead!) if you do/don't do what that 'authority' says as well... No easy way to argue against that without dying for the cause, which is a bit extreme when you're agnostic or atheist :-)

Think about it: if some book claimed that some bloke in Israel had risen from the dead 200 years ago, would you believe it ? Oh yeah, he was born from a virgin (riiiight!) and can walk on water too, not to mention he has a built-in replicator, though it's stuck on prawn sandwiches. Yes ? No ? If yes, well, all the more power to your elbow my fine delusional friend. Get out of your beliefs everything you can. If no, you either ascribe too much validity to the fact that the bible is *old*, or you'll agree with me that 'religious' people are just nutters.

There's nothing wrong per-se about being a nutter. A lot of successful people were completely nuts. The saying that there's a fine line between genius and insanity is quite a deep reflection on what being nuts is all about, IMHO, though I doubt it was meant that way when first coined.

What can be scary is when nutters try to change you, try to coerce you into their belief system (and I don't just mean religious beliefs here). When such a nutter holds high office, it gets serious - there's not much worse than a motivated nutter with power.

Overall, despite my aversion to it, I think religion does more good than harm. I think it gives people with little else to live for, a reason to live: to be good, honest, kind, the standard virtues. Western religious values have also been the foundation for most of the human rights we now take for granted. Perhaps it's just a phase that a society has to go through - a bit like all the spots that teenage males get at puberty...

Religion is also a bit like heroin (or, opium in a different century, I guess :-) Society wouldn't recover easily from the sudden removal of its dependence on religion as a crutch in life. Excising any cancer takes time, it needs to be gradual, and for religion the process is underway. I can live with that.

You're born. You live. You die. That's it. You should be perfectly happy with that. I am. Consider the alternative.

Simon.

User Journal

Journal Journal: Journals as links and hostip.info

So, my first /. journal entry. Momentous occasion, perhaps. Perhaps not. What prompted it was the large number of people visiting hostip.info from my (allegedly non-existant) journal page... So I thought I'd put something in here :-)

Hostip itself started off as a "wouldn't this be cool" idea, and a first version was born. The 'individual privacy' minded will have a field-day with this, but the inspiration actually came from watching 'Enemy of the State' on a '747 flight :-) I wanted to do (in a very limited way, of course) something similar using the web. As always in projects like this, it's the data that's the hard part of the equation, not the coding...

This first version allowed people to type in new cities, and it would auto-associate with their IP address. This was (as I should have forseen) a complete disaster. The number of Martians living here on Earth is truly amazing. We apparently even play host to a couple of Alpha Centaurites; to these fine beings I say 'Welcome to Earth' in "Will Smith" fashion. (Yes, I'm a fan...)

Once it was clear that if bad data was trivial to enter, it would indeed be entered, I raised the bar a little. Now you can only choose cities that already exist (and which I have latitude and longitude for), or email me with the details of a previously-unknown city, and I'll check it out before entering it into the DB. This has made the database more useful... Needless to say, cleansing all the bad data from the DB was a monumental task. It literally took weeks, and if I'd known at the start how long it would take, I'd not have started it!

It's still possible to lie to the machine of course (and I dare say lots do, on purpose, simply because it's their principle to do so). I have in my own way tried to get around that - the DB keeps a track history of assignments to a /24 netblock (that's the smallest unit it tracks), and since you can only reassign your own IP address, as soon as 2 others on your netblock tell the truth about where you are, it will switch to the real location... It's certainly not foolproof (hell I can think of a half-dozen ways around it!) but it raises the bar...

Up until this point, hostip was a purely text-based system. Next came the map data. I got in touch with the US National Geophysical Data Center in Boulder, and asked them for the highest-resolution data they had. That turned out to be 30 arc-second elevation data for the entire planet. Wow! So I spent some time writing tools to efficiently extract the correct data and colour it nicely/correctly for the small maps I needed - this took a week or so... Just loading the data into RAM took a lot of time (eventually I remembered mmap() and things went a *lot* smoother!).

The dataset consists of a 43000x21500 image, at approximately 1km/pixel, taking ~2.6Gbytes to store. Even things like ppmtogif can't handle that much data :-( The current database size (from du -sk on the mysql db directory) is 623Mbytes. All this needed to be correlated together before the applet started to look even vaguely reasonable. It still has lots of errors (mostly where I have the decimal point wrong in latitude or longitude figures :-( but it's useful now, and I tend to get told [grin] when something is wrong...

One of the reasons I wanted to do this (apart from the obvious coolness of the idea :-) is to give something back to the people who've given me so much 'free' software over the years. Those from this nameless multitude, I salute you - I hope you get as much out of hostip as I got from your various projects/programs.

I happen to think the applet is (even though I wrote it myself, [grin]) one of the coolest ones I've seen so far, although that may be down to knowing just how much hard work went into making it [big grin].

I have more plans for hostip, but perhaps I'll leave them for another journal entry...

Simon.

Slashdot Top Deals

For God's sake, stop researching for a while and begin to think!

Working...