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

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: Posting limits 2

Really Slashdot? You're going to run a story guaranteed to have over a thousand posts but you're going to impose posting limits on subscribers? What am I paying for if I'm suddenly going to be cut out of the conversation and unable to reply?

User Journal

Journal Journal: Pacman coding contest 2

To celebrate 30 years of "Pac Man", at this year's Retromañï½Âa (University of Zaragoza, 8th - 12th November) there's a Pacman programming contest (with prizes!). Information about the contest and rules can be found here:

http://www.retroaccion.org/sites/default/files/eventos/retromania/2010/concurso_pacman/RM10-ProgPacman-english.pdf

There's two categories - one for games programmed beforehand (so that people who can't go to Retromañï½Âa can put in an entry) and for those programmed during the event.

I'll myself be off to Retromañï½Âa, not for anything to do with the Pac man coding contest, but to demonstrate and explain the ethernet hardware that I've made for the ZX Spectrum (itself coming close to its 30th anniversary). Indeed that entire week is going to be an orgy of retro geekyness, the weekend leading up to it is R3PLAY in Blackpool (retrogaming event), then I'm off to Zaragoza for Retromañï½Âa, and then on the way back I go via Madrid for a small gathering of retroafficionados in a bar somewhere in Madrid. Three events in less than 10 days.

User Journal

Journal Journal: The reality of resources and population

The reason for this post is to point out that all the doom and gloom about the increasing population is unfounded, meaning that there are real, achievable solutions that don't involve totalitarian government controls or genocidal population reduction measures.

First off, how much will the population grow? If left unchecked will it continue to grow forever?

The answer to the second question is no, not if the developing world continues to industrialize. The answer to the first question is about 9 billion, give or take. As the standard of living increases people voluntarily choose to have less children on average. No coercion is necessary. So to get to a stable (actually slightly declining) population we need to remove barriers that prevent the developing world from reaching western levels.

The primary barrier is energy. All resource shortages can be overcome if sufficient energy is available. We can desalinize seawater and pump it to wherever is needed if the energy is available to do so. We can grow vastly more food than we do now if sufficient water and fertilizer are available. Liquid hydrocarbons (gasoline) can be synthesized from water and carbon dioxide. All these processes are known and understood, they just require energy.

So how much energy do we need? If the US experience is any guide we need about 350 million BTUs per person, per year. So with a worldwide population of 9 billion people that adds up to over 3 quintillion BTUs per year.

Can that much power be generated? Absolutely, but you aren't going to get there with wind turbines and terrestrial solar panels.

There's one element that exists on the planet in sufficient quantities to generate the required power for a long time and that element is thorium. Each ton of thorium generates 1 GW-year (30 trillion BTUs) of energy when used as nuclear fuel, so the world's energy demand could be entirely supplied by 100,000 tons of thorium per year (compare this to the billions of tons of coal we use annually now). With 120 trillion tons estimated to exist in the Earth's crust we've got a long time before we need to start looking somewhere else, like the moon or Mars.

So the solution to the population crisis, energy crisis and pollution crisis is to stop pushing fake solutions that won't do anything except cause misery for billions of people and let us use state-of-the-art (1960s era) nuclear technology to produce abundant clean energy for everyone.

User Journal

Journal Journal: Aggregating contacts is hard.

I'm writing this mainly to get my own thoughts straight before I take a stab at implementing this myself.

Merging and synchronizing contact information between all the various services that a person might use appears to be to be an unsolved problem. I've looked high and low and I can not find a single piece of software that will:

  1. Maintain a definitive list of meta-contacts and mappings (i.e. map a Gmail contact to a Facebook contact)
  2. Import data from every service I use
  3. Automatically export information that missing from one member of a metacontact but present in another member (when the underlying service supports this)
  4. Gives me means to both access and edit this information both on my PC and on my mobile phone
  5. Present an editable, unified view that eliminates redundant and obsolete data.

Accessing the data is the easy part. Most services have API functions that let you access it in either a read-only or read-write format. In some cases though all you have to work with is a CSV file.

So for this to work I need to a way to gather all the required information, put in into relational form and find/create the appropriate mappings

This is where it gets tricky. Very few software projects properly handle contact information. The data model needs to include all the metadata about the contact that you care about and meta-metadata. A person can have an unlimited number of email addresses, for example. Any particular email address might be a home address or work address. It might be an active address that you should send mail to or it might be an old address that is no longer in use (but you want to keep it associated with that person so you know who all those old emails came from)

So creating a robust relational structure in your database is non-trivial, but solvable. The hard part is wrangling the data from the other sources into relational form. Most data services do not have a unique, invariant identifier for each contact. Each and every attribute is subject to change. Usually matching based on name or email address will work but contacts can and do change both of these from time to time.

Once you get all the information pulled into the database now it's time to eliminate duplicate information by merging all those subcontacts into their respective metacontacts. Each subcontact should map to exactly one metacontact. The metacontact itself should NOT have any attribute information (name, email address, phone number, etc) directly associated with it to prevent data duplication.

Once you get the subcontacts merged into metacontacts now you should merge the metadata to eliminate duplication. The easiest way to do this is to aggregate all the information from every subcontact and display anything that not a duplicate. If Facebook and Google both say the John Doe has a email of jdoe@example.com then we only need to display that once. If they have different email addresses then we should display both. Finding duplicates isn't always easy: +1 (800) 555-1212 and 8005551212 are actually the same number (from the point of view of a caller in the US) but a simple text search will not reveal that. The former would be better to display so ideally you'd just update the latter data source, but what if it's read only? In that case you need a way to prevent certain subcontact attributes from being pull into the metacontact. In addition certain attributes shouldn't allow duplicates. If a person only has one canonical name, then should you use their Twitter username, their Facebook user name or the name stored in their associated Gmail contact? The user must decide and the database needs to store this choice.

So after we're all done with this we'll have a nice, unified view of all contact information. This unified view should be editable and any changes made to the underlying data should be pushed out to all services which are not read-only. In the case of the read-only services the stale data should not roll up into the metacontact, unless and until the underlying data changes. Example: someone in their Facebook list their phone number as 800-555-1212 but I edit this number to include the country code because I want to be able to call him from outside the US: +1 (800) 555-1212. This change can be pushed to Gmail but not to Facebook. So from now on the mapping between metacontacts and subcontacts should exclude the mobile number from the Facebook subcontact, unless my friend changes his phone number on Facebook to something else. If that happens the new number should roll up into the metacontact.

Some services do not support attribute metadata. A CSV file might just have a "address" field without specifying if it is a home or work address, physical or mailing, active or deprecated, etc. So this meta-metadata will need to be stored in the database itself. Meta-metadata as possible should be synchronized to the maximum extent supported by the underlying service.

I think I've got enough there to keep me busy for a while. I'm going to try to build a proof of concept of this but I may not get very far before I throw my hands up in disgust or someone else implements it (maybe Akonadi, but I haven't seen anything that indicates that it will have robust metacontact functionality)

User Journal

Journal Journal: That was Britain's first Vintage Computing Festival 1

So the VCF finished yesterday afternoon.

It lived up to and exceeded my expectations, what a fantastic event. Unfortunately, I didn't really get to see all of what was going on since I was manning my own stand a lot of the time (four Ethernet-networked Sinclair Spectrums, with a MicroVAX fileserver - all of this connected to the internet! - plus a Vectrex since people seem to really like them). My stand and Chris Smith's were next to each other (he reverse engineered the Spectrum ULA for a book he's writing, which charts the history of Ferranti's ULA technology and Sinclair's use of it) - we were hoping to get his Harlequin (100% accurate Spectrum implementation consisting of 74HC logic ICs) onto the network too but his stand was so busy he spent all his time talking to visitors!

The Spectrum twitter client went down very well. I think there were about 8 pages of tweets from the Speccy by the end of Saturday. I really ought to have put a counter in the client to give a definitive count of how many tweets had been made.

I picked up a double density disc drive for my BBC Micro while I was there, and also fixed one of my 128K "toastrack" Spectrums (all it had was a bad transistor in the power section and a dodgy keyboard membrane). Unfortunately I forgot my USB lead for the camera so no pictures till I get home.

Probably the highlight of the show was the talk by Sophie Wilson (designer of the BBC Micro and the ARM CPU, that last bit being very highly significant). If I had the choice of seeing Sophie Wilson or Bill Gates at a computer show, it would be Sophie Wilson every time. She may not be 0.1% as famous as Bill Gates, but I think she is actually a lot more important and significant than Bill Gates. Nearly anyone could have been a Bill Gates, he got where he was due to luck and sticking his neck out a bit (at no real risk to himself, he was already backed by a very rich familly) - if Compaq hadn't cloned the PC, and if IBM had been more closed about the PC specification, Bill Gates and Microsoft may have been just another footnote, remembered only for their truly dreadful BASIC on the Commodore 64; once PC cloning happened, for Microsoft to make money off DOS was about as difficult as falling of a log. But on the other hand, ARM only came about through lots of real intelligence and thought and grit and determination - and today ARM ships 1.25 *billion* units per *quarter*, more than every other microprocessor architecture put together. When the ARM was designed, Hermann Houser jokes "we gave the ARM team exactly what they needed, no resources and no money" :-)

And without the microprocessor designers, where would software people be?

User Journal

Journal Journal: Sinclair Spectrum Twitter client 2

It's the UK's first Vintage Computing Festival next weekend, so I've been getting some stuff together for my Speccy exhibit. Of course I've been working on the Spectrum ethernet card, and while things like the network filesystem it provides are handy, I thought I needed something that VCF attendees could appreciate.

A while ago we did a "hack" of a Twitter client (over a pint of beer, in a pub in Oxford - while getting strange looks from all the "normals") but it was just that - a hack - with the tweet and the login details hard coded into a short asm program. This time I've written a proper http library, and some user interface. Most of the work is done by the HTTP library (parsing headers, putting headers into the request etc), and it's all written in C.

If you can't get to the VCF, you can at least watch a video here:

http://www.youtube.com/watch?v=-ECnN7jdgA4

User Journal

Journal Journal: Giving all users database server access by default. 3

Especially with KDE applications there is a need for each user on a system to have access to a relational database to get full functionality. Usually this is provided by MySQL. Every database server for linux that I know of has its own concept of usernames and passwords which must be configured seperately from the users on the system because traditionally a database server served clients over the network, not local users.

Is there any way to set up MySQL or a MySQL-compatable database that gets username and password information from PAM and stores data in each user's home directory? This would make database access work just like mail delivery, as long as a user exists in the system and has a ~/.mysql_data directory he or she has full access to any database stored in that directory with no per-user configuration required.

It seems to work for mail, why not for databases also?

User Journal

Journal Journal: Cooking for Friends - Mushrooms in white wine sauce

Thanks to a friend via Facebook, I discovered a good food ideas site, called "Cooking for Friends" - or at least, "Cocinar para los amigos" (it was from a Spanish friend). I saw a recipe go past the other day that I thought looked awesome, so I made it last night - just for myself, I like to test recipes out on myself before I try them out on other people :-)

And it is indeed awesome. For the benefit of those who don't know Spanish I'll repeat it here. The original is here:

Mushrooms in a white wine sauce
http://cocinarparalosamigos.blogspot.com/2010/05/champinones.html

It's a very easy recipe to make. All it needs is garlic, a glass of white wine, some grated bread (to thicken the sauce) and parsley. The recipe as made also includes a small amount of chili (I didn't have the little ones that he shows in the video of the recipe, so I just used a small amount of fresh chili I had in the cupboard. I think it needs just a *small* amount, it's not supposed to set your mouth on fire...) I also made half the quantity that the recipe demands, on the grounds that I was trying it out on myself, not trying to do a starter or a side for four people.

Ingredients:
500 grams (1lb) mushrooms
4 cloves of garlic
a little olive oil
a small heap of breadcrumbs (basically, enough to fill a wooden spoon heaped up)
a branch of fresh parsley, chopped finely
a little chili (I've not seen the tiny chilis that were shown in the video anywhere near me, so I used a small amount of sliced chili)

Put some olive oil in a pan, enough to start cooking the garlic and put on the heat, drop in the garlic. Once the temperature has come up and you've got typical "starting to fry" sounds, add the mushrooms. After 2 minutes, add the glass of wine. Give it a stir and allow to simmer for about 10 minutes with a lid on the pan. After 10 minutes, add a little water, the breadcrumbs and the chili. Let simmer for about 20 more minutes with the lid on - the sauce should be thickening nicely from the grated bread and the evaporation of some of the liquids. Then add most of the parsely and stir for a couple of minutes.

Then serve, sprinkle the remaining parsley on top.

This will make a great starter - I'm going to cook it next time I have friends or family over for dinner.

User Journal

Journal Journal: Britain moves one step closer to thought crime

http://www.theregister.co.uk/2010/05/10/twitter_bomb_joker_guilty/

This is the very problem with broad legislation like the Terrorism Act. Not only cases like this, but these days it is an offence to have "information that may be useful to a terrorist" (and the onus is on the defendant to prove that it's not, which reverses the principle of the accusers bearing the burden of proof). A recipe for a bread roll is, after all, information that may be useful to a terrorist, a terrorist has to eat after all.

User Journal

Journal Journal: CrossFit

I remember seeing this article when it was first posted but I really didn't pay attention to it. Now I wish I had. I'm on the second week of a month-long introductory CrossFit course and it's the first time in my life that I actually enjoy intense exercise. Based on what I've seen in just one week it really does live up to the hype.

User Journal

Journal Journal: Spaghetti Sauce 3

A couple of weeks back I went to an Italian restaurant with some friends from work. I had a salmon dish (since I don't speak Italian, I can't exactly remember what it was called) - basically, salmon fillet baked with lemon. The side was spaghetti and spaghetti sauce. Two thoughts struck me: (1) the food is incredible and (2) it can't be at all difficult to make at home.

So I made it. What makes it really is the contrast between the lemoned salmon's tartness and texture, and the sweetness of the spaghetti and sauce. I just guessed at what to do with the salmon and it turned out good. The spaghetti sauce - I had a look at various recipes on the internet, and in the tradition of open sauce (yes, go on, groan now) I decided to use ideas from several to come up with sauce code (yes, groan again) that I thought I'd like best. And in those traditions of Free Sauceware, I'll share what I did...

The salmon is easy, each salmon fillet (adjust quantities to taste, but I reckon this is a good starting point)
* 1 salmon fillet
* About a tablespoon of olive oil
* A thin slice of lemon
* About 2 tsp of lemon juice
* Just a pinch of sea salt
Wrap in foil and put in the oven for 20 mins at 180 celsius (if you have a fan oven). I found it was good to prepare the lemon and salmon in the morning and let it sit and marinade until the evening.

The spaghetti sauce (enough for 4 people, or two very hungry people):
* 500g small (cherry) tomatoes
* 1 tube (about 150g) tomato puree (if in your locality it's called tomato paste, make sure it contains nothing but tomato)
* 2 tsp brown sugar
* 1 tablespoon basil
* 2 tablespoons rosemary
* 5 cloves of garlic (or to taste), finely chopped
* 4 tablespoons of olive oil
* 1/2 teaspoon sea salt
* 1 onion

Chop the tomatoes (into quarters I think is best), slice and dice the onion into small bits, and chop the garlic finely. (I have a device with a handle on that you wind for mashing garlic rapidly into small bits, I don't know what it's called - I inherited it from my grandfather and it's at least 40 years old but it's so insanely useful I'm sure they are still available today) and put in a bowl and add the rest of the ingredients. Then give it a good stir. Once again, I found it was best to prepare it in the morning and allow it to fester in its own juices until dinner time.

To cook, put in a pan and stir on a medium heat until it's ready. Generally it should take less time than the actual spaghetti.

The way the Italian restaurant served this was to leave the salmon in its foil, sitting in the lemon juice and olive oil and serve the spaghetti and sauce as a side. I think that works very well.

User Journal

Journal Journal: Which company to blame? 5

If I'm having a problem getting my phone to work with my car's audio system which company should I contact first?

T-Mobile (mobile provider)?
Ford (car manufacturer)?
Motorola (phone manufacturer)?
Microsoft (Sync)?
Google (Android)?

User Journal

Journal Journal: Debian users are without ClamAV - mail servers broken 1

Well, this morning I found my mail server had died. Postfix was up just fine, but the logs showed that it was failing while passing messages via clamav.

ClamAV was complaining about a bad daily.clv file, and looking at clamav's website... oops, the version of ClamAV in debian-stable has been *disabled* deliberately by ClamAV! (The issue: that version uses too much bandwidth when updating its AV database and ClamAV can no longer tolerate the bandwidth usage).

Oops. Any Debian mail server that passes mail through ClamAV is currently down, unless the admin already knew of this and compiled a new ClamAV or uses Debian unstable.

Looking at sendbug, Debian have been informed... I don't see any information about when we'll get a new ClamAV package, so it's time to compile the latest from source.

User Journal

Journal Journal: Why machine translation won't be all that good for a very, very long time... 2

A couple of things recently really highlighted why machine translation is going to be awkward and clumsy for years to come, and why even human translation is so damned difficult when you get into colloquialisms and jokes.

A couple of weeks ago, I was with a friend in Wichita and we were at a Mexican restaurant. He mentioned he'd seen a Mexican movie (ÂY tu mamà también?) - a movie subtitled in English, and that some of the audience was getting a laugh out of *something*. He wondered why - was it just a bad translation? Probably not, I answered. Probably a play on words or a double meaning that just doesn't translate to English, or perhaps something cultural (for instance, there are jokes that are funny in Britain but would leave Americans thinking "uh?" due to cultural differences, and vice versa - despite the shared language).

Today I came across one of these. There's this geek comic strip made in Spain called TiraEcol. It's translated into many languages (and I don't know how the attempts to translate it worked in others) - but the English translation just didn't work, and I can't think of any way of actually translating the play on words so it works in English. The original Spanish is here:

http://www.tiraecol.net/modules/comic/cache/images/tiraecol-351.png

And the English here.

http://en.tiraecol.net/modules/comic/cache/images/tiraecol_en-346.png

The last frame will leave the English speaker thinking "Uh?"

But in Spanish, you say your computer crashed by saying it's hung. Furthermore, in Spanish, the personal pronoun is almost always dropped - so it could be "it hung", "he hung" or "she hung". In Spanish, if you want to say "It crashed", you say "Se ha colgado". If you want to say "she hung herself", you say "Se ha colgado". So you have the double meaning for the joke in Spanish, but which is lost in the English translation - Nano responds "What, the program or the girl?" which doesn't really work for "Uh oh, crash".

Indeed, the dropping of pronouns means that machine translation from Spanish to English generally results in something ugly. A human being knows whether someone's talking about "he", "she" or "it" from context, and with the verb conjugation in Spanish, a human doesn't need the pronoun to understand what's going on, because we already grasp the context from what happened earlier. But this is highly problematical for a computer, and quite often the machine translation will guess completely wrong whether the thing in the sentence is a "he, she or it". Also the pronoun for the indirect object is the same for "him, her and it", and again, machine translation frequently picks the wrong one when translating to English. (I can only imagine how tough it will be for languages which come from cultural bases significantly different from ours, such as Japanese or Chinese). Translations have been getting better, especially for things written formally, such as news or technical items, but they will continue to suck for a very great deal of time for informal writing or speech.

So don't use the excuse "oh, we'll have good machine translation soon" as an excuse for not learning a language, at least not for the next three or four decades :-)

Slashdot Top Deals

Without life, Biology itself would be impossible.

Working...