Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
OS X

Journal Journal: Think different... 4

So, I was reading that Sony had installed DRM onto Macs as well as onto Windows machines, and I was curious to see how they got around the system protections to prevent software like this from doing exactly this...

They didn't.

Contrast the experience of a windows user: Consumer puts a cd into their computer with the intention of playing the cd. The cd takes advantage of a feature in Windows and installs software in the background without consumer's knowledge. Consumer is owned.

To the experience of the Mac user: Consumer puts a cd into their computer with the intention of playing the CD. Up comes a dialogue box asking for Admin privileges. Consumer gets to deny the 'owning'...

Now it's possible that 'consumer' would just click ok, type in their username/password, and allow Sony to do their dirty deeds, but since they've almost certainly put a CD into their computer before and it didn't do that, I doubt it. I'm pretty convinced my mother wouldn't type in a password - she'd probably call me to ask why it was doing that...

In any event, I prefer the Mac method - you at least get a chance to deny the installation of the rogue software, and even if you screw up and it installs, the contents are a simple "ls -lrt /System/Library/Extensions" away, to see what's been installed...

Simon

User Journal

Journal Journal: The measure of a man 8

So, I don't write many journal entries any more, but the cowardly attack (let's face it, any terrorist attack is that of cowards) on London this morning merits mention, I think.

The terrorist announcement mentioned the Brits being in fear from North to South, East to West. Whereas that may have described some countries' reactions, it didn't come close to ours. Let's just look at some of the reaction...

There was an interview of a woman who was on one of the bombed trains, 2 carriages down. She was calm and concise in how she described the events. She was confident that they would be caught. She said others around had a similar disposition.

The Mayor of London released what I thought was a pretty good statement. Let me just pick out the part he addressed to the cowards:

Finally, I wish to speak directly to those who came to London today to take life.

I know that you personally do not fear giving up your own life in order to take others - that is why you are so dangerous. But I know you fear that you may fail in your long-term objective to destroy our free society and I can show you why you will fail.

In the days that follow look at our airports, look at our sea ports and look at our railway stations and, even after your cowardly attack, you will see that people from the rest of Britain, people from around the world will arrive in London to become Londoners and to fulfil their dreams and achieve their potential.

They choose to come to London, as so many have come before because they come to be free, they come to live the life they choose, they come to be able to be themselves. They flee you because you tell them how they should live. They don't want that and nothing you do, however many of us you kill, will stop that flight to our city where freedom is strong and where people can live in harmony with one another. Whatever you do, however many you kill, you will fail.

And finally, a piece I found on a football forum:

No-one in Britain has over-reacted, it's not in our nature to do so. There'll be many dark, scared days ahead for everyone who lives or works in London or any of the major cities in the UK, and there will be overwhelming feelings of sympathy for those who have lost friends, family or loved ones in these cowardly attacks today.

But it won't change anything. There will be no sudden feelings of "these people have a genuine issue", no hands of friendship offered, no olive branches extended. There will be no immediate "Let's invade " or severing of diplomatic links with any countries. There will simply be a very through, in depth, but quiet investigation.

And when we find out who did this they will pay.

Rest in peace those thirty people who died today. Their lives have meant nothing to their killers, but their deaths have brought tragedy to those who loved them.

From those who were attacked, to those in power, to the common man, the theme is the same: complete disdain for the cowards; controlled anger that will focus the effort to find them; and an unshakeable determination that above all, the cowards must not win.

What does that mean ? It means that life will go on, and that (apart from the personal tragedy of the victims families) nothing will change. There's no magic bullet for terrorism, but ignoring the effects of the cowards actions whilst seeking them out and (I suspect) simply eliminating them, quietly, would appear to be the best option.

I'm actually in two minds about that last sentence. There is a lot of good PR to be had from publically arresting, trying, convicting, and treating a terrorist like any other murderer. The IRA members jailed in the H blocks long tried to argue they were political prisoners rather than murderous cowards...

On the other hand it could create a martyr. The other option is simply to quietly kill the coward and claim (perhaps even accurately) that there was no other way, if it ever got out to the public. I can't imagine many things more terrifying to a terrorist than to have colleagues just turning up dead. "Am I next ?" is a real problem for a coward...

Simon

User Journal

Journal Journal: Domains, cashflow and escrow

Some of you may have noticed (hah!) that I no longer have a link to http://hostip.info in my signature. This is because I've just sold the domain :-) BTW the purchaser tells me he'll be operating it pretty much the same as it was before...

Moving to the US (even to a well-paid job, and being used to a high-costs city like London) has proven to be relatively expensive. Houses in Silicon Valley start at about $600k and mortgages are bare-minimum 10% down - most are 20%, and then there's the car to buy (I wanted a convertible, so that's another $30k). It all adds up.

So, out of the blue, I get a request to purchase hostip.info - it looks like a typical spam email, but it mentioned escrow, so I reply from a never-before-used mail alias, and we start to talk. We strike a deal, everything happening via www.escrow.com, and all is sweetness and light. The purchaser puts the money in, I transfer the domain, and escrow.com are in the process of paying me the money.

All this is in stark contrast to selling on ebay, where (if you read my previous journal entry) sellers are completely vulnerable to being screwed over by A.Nybody.

There's not much more to this, except that maybe, just maybe, it means I can get a house with a pool, rather than without - a dream of mine for a long time :-)

Simon

User Journal

Journal Journal: Welcome to America

So, it's all done and dusted, I'm now officially a resident alien in California. I have to say that it has had its' ups and downs, and that's *with* a large company bending over backwards to help...

Question: Why doesn't my credit rating from the UK follow me to the US, when I'd happily sign anything appropriate... Trying to buy anything on credit (and I need a car and want a house) is pretty much impossible atm. I managed to get the car at exorbitant interest rates, and it's vaguely possible I *may* get a mortgage if hoops A-Z are jumped through. Did I mention the hoops were on fire ?

Question: Why is it totally impossible to get around CA without a car, yet I need to take & pass a driving test in CA within 10 days of arrival to legally drive here. Did I mention that you need a social-security number for a driving licence ? And that it takes between 12 and 60 days for an alien to get a SSN ? Er, shurely shome mishtake, ociffer ?

Question: Where are you all hiding the brown sauce (HP, Daddies, etc, not steak sauce), and real bacon (the stuff with meat in it). Ok, this one's tongue-in-cheek (looking for the sauce!) - different countries, different foods... But dammit I like brown sauce!

Question: How on earth do bars do business in CA ? You need a car to get anywhere, and you can't drink pretty much anything when you get there !

Question: Was it really necessary to keep all us visa applicants waiting outside in the pouring rain for 2 hours before sitting in the embassy for 5 hours (waiting for a 5-minute interview), dripping on the carpet ? Sure I know all this is in the name of security, but this was London for crying out loud - we're used to being bomb-targets, we just prefer to be dry at the time...

So despite my moaning, I'm happy to be here - I've landed a great job at a fantastic company that's going places, and I'm on a steady salary, which is nice when you've been a partner in a s/w consultancy. To quote a friend of mine - sometimes it's nice to come in out of the rain for a while. If you've never managed a company you probably won't understand, but if you've got your degree, think of that weight that lifted from your shoulders after your last exam, and you'll come close...

So, alls well in the land of the free, apart from the brown sauce, that is :-)

Simon

User Journal

Journal Journal: The rise and fall of regulated Ebay

So, I'm annoyed.

I'm moving to the USA, which amongst other things means selling various things I can't/don't want to take with me, and Ebay would seem to be an ideal way to get rid of reasonably expensive items (motorbike etc.)

First ever time as a seller (thought I've bought lots before), and it's been a disaster. There exist trolls who simply bid on things without any intention of paying, and Ebay (the organisation) tolerate this - there's little protection for sellers.

Ebay charge you a fraction of the "sold" price, even if the person doesn't pay up. So, the only person out of pocket is the seller - it's in Ebay's interest to continue the status quo, and there is no obvious attempt to track down the scumbags who have made false bids. The only action taken is to invalidate the bidding account, and what good is that ? The saying "shutting the stable door after the horse has bolted" comes to mind!

So, you can either re-offer the item to another bid (and if you do this, all trace of the previous unfulfilled auction seems to disappear! Hmmm.) or relist the item. You can't do the former then the latter. Neither consequence is spelt out (or if it is, it's sufficiently misleading that someone who's just been the subject of a scammer can easily miss it).

So, you decide to offer to the next lowest, and that doesn't work (the guy only gets 24 hours to respond, and emails you later saying he'd missed the chance, grrr).

Then, with impatience and anger rising, you re-list (at your own expense again) the item on Ebay, and EXACTLY THE SAME THING HAPPENS.

This time, I was alert, and did a 'By Buyer' search - the offending character (ladd_eugene) had bids outstanding totalling over £20,000. I cancelled her bid, and the system told me she had bid £2000 on my auction (when the bike eventually sold for £561...)

So, if I was ebay, and I wanted to deflect criticism of not caring (due to it ultimately benefiting ebay) about sellers, I would do some of:

  • Require that bids are not more than 1.5 times the current bid or bid + {$£}500, whichever is smaller.
  • Offer a deposit of {£$}100 which users could voluntarily subscribe to, which removes the above limit. They have to pay the deposit in advance, and it counts towards the item. They lose it if they screw around of course
  • Only allow bids on (user's feedback) + 1 auctions at a time
  • Limit total bid exposure by username.
  • Send the seller an email whenever a categorised item has a bid outside 2 std deviations from the normal for that category. Should be possible to use browser keyword searches to define the categories.
  • Allow sellers to see the maximum bid price from buyers.
  • As a consequence, prevent bids from the same IP as the sellers as well.

The current situation just stinks, if you're a seller. Some lowlife can ruin your sale with impunity, and there's no comeback. This is a pain under normal circumstances, but it's a *royal* pain when you're about to leave the country, and time is of the essence. Failed auctions I could have done without...

Still annoyed, but at least I sold the item this time, even if it cost me about £35 more than it ought to have, and hey, in a week's time I'll be in California [grin]

Simon

User Journal

Journal Journal: Fair use of copyrighted content 1

While this is from a post I made on a slightly different topic, I believe this could be an important question to consider during all these attempts at the entertainment industry to sue its customers into oblivion...The concept should be brought up to the judge if a case EVER gets to court:

This is going under the fact that its still 100% legal to time-shift media for personal use, which of course is subject to change in the future if congress gets it way..

The rest of this discussion is based on the above, and that NO commercial gain is involved, that Its all 'freely' shared...

1 - It would be legal for person A to record show A.

2 - Its also legal for person B to record show A.

3 - If user C slept thru show, he still had a right to record it.

4 - Why cant user B give C his recorded copy.. ( for free ) since C has a right to record the same show.

Taking this to its logical conclusion, why cant user D, which is across the country that was at work that day get copy from user C?

The copy that is being spread around is not the original quality, as its been compressed and/or recorded from the TV/radio. So its not the same quality as going out and purchasing it from the store? It is the same 'version' that all users have a right to record for their own personal use.

This would also be the same issue for MP3 songs, if they were *ever* on the radio, then its no different if you share them in a *lossy* format to other people that had the *right* to record it themselves, again for their personal use..

Now if you do a bit-copy of a CD/DVD then distribute that, or if it's an unreleased copy ( such as still in theaters, or a screener ) then of course this analogy doesn't apply.. but I'm not talking of those cases...

This also makes the assumption that the original 'broadcast' was not 'subscriber only', or all 4 users were subscribers to the same service.

So I guess it boils down to, what is wrong legally with this analogy, and why is the 'industry' allowed to continue to harass their customers for doing what is currently LEGAL for us to do?

Microsoft

Journal Journal: Microsoft follows US government policy on UN

The New York Times has a story about Microsoft withdrawing from an international committee on software standards sponsored by the UN. Similar to the pattern of behavior exhibited by the United States Federal Government, Microsoft feels compelled to participate with the UN not as a collaborator, but as a master.

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?

Slashdot Top Deals

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...