Playing with distcc

I have been thinking of what to do with the number of computer boards that I have sitting at home with me. I have a number of VIA low-power systems that are just sitting on the shelf. I’ve used one for the file-server and another for playing with virtual servers. There are still a number of these boards and I thought that it might be fun to play with some sort of cluster. However, fun it may be to play with a cluster, there has to be some sort of reason to build it.

Computing clusters are sometimes built to facilitate certain computational tasks by taking some load off the work machine. Rendering 3D graphics is fairly compute intensive and some people have built home clusters as mini render-farms. However, I don’t do any graphics work. Another operation that often consumes a lot of compute cycles is software compilation. While I don’t do a lot of kernel compilations, I was interested to investigate this since it was something fairly commonly done on Linux compute clusters.

So, I decided to install distcc and experiment with it. This tool is extremely simple to use as it can masquerade as regular GCC while shipping off the work to remote computers. All that is needed on these remote computers is a copy of distcc and GCC. Setting it up took all of 5 minutes and then it was ready to run. I started a kernel compile and saw the compilation tasks spawning on the remote computers. Voila. It’s just that simple. Cross compilations are not a problem either, which would probably help when I want to compile programmes for embedded processors.

Talking about embedded processors, I do quite a bit of chip design work and chip simulations are notoriously compute intensive. However, the simulators that I use are all single threaded and would not benefit much from a compute cluster. Hold on. It may not be useful for running single threaded simulations on multiple compute systems, it is certainly possible to run multiple simulation operations on multiple compute systems. This would be very useful for collecting performance data. Useful.

However, as these compute clusters would be rarely used, it may be helpful to build them as on-demand machines that can be turned on when needed. Time to toy with that instead.

PS: I love having a bunch of computers to play with. Woo hoo!

Sony's Experiment

Seems that Sony Malaysia is embarking on a rather bold experiment in combating piracy. According to the article in TheStar, the company is going to test some alternative retail channels in order to encourage more people to buy original sony CDs. They will start selling a few select compilation albums for only RM16.90 each. However, the main thing that caught my eye were the retail channels – pasar malam, newsstands, petrol kiosks and convenience stores.

To me, this is a great idea. Adapting local retail channels for your products is a smart way of trying to increase sales. While some of these channels (such as the pasar malam) is a fairly local thing, it will potentially put the Sony wares in direct competition with their pirated brethren. You see, these night markets are filled with pirated discs already. Selling an original product would potentially help them recoup some of the dollars lost to piracy. I think that the lesson to be learned is that making a little less money is better than not making any at all.

Anyway, according to the article, Sony has already tried the concept in Thailand and it seems to be well received. I do hope that it works out for them in Malaysia too. Hopefully, they will then extend the entire concept to more product lines, particularly local music and films. I highly doubt that they would peddle Michael Jackson’s greatest hits in a pasar malam but I could easily be proven wrong.

Sony’s new experiment could serve as a test case for a bunch of other things.

Power of 'And'

I reported a while ago on the issue of Microsoft’s FAT patents in Linux. TomTom (the GPS maker) were sued by Microsoft for alleged patent infringements because they used code from Linux to access the FAT file system, which is covered by Microsoft’s patent. Ultimately, they settled out of court and the issue was not used as a test case. Most engineers would argue that the patents were probably invalid. The trouble is that as long as the issue is not cleared up, Microsoft can use the FAT patent to muddy the waters when it comes to the adoption of Linux for a number of things.

Seems like the Linux people have come up with a plausible solution though. Supposedly, the Microsoft patent covers the ability of generating a long filename and a 8.3 filename. Users of MS-DOS will remember that filenames were all limited to 8.3 characters in the past until Microsoft introduced the ability to have up to 255 characters in filenames. Every file on disk can be accessed with either a long filename or a 8.3 filename. In fact, every long filename is mapped to a unique 8.3 filename.

The technical work around is to generate either the long filename only or the short 8.3 filename only. That’s it. Let me say that again. Supposedly, the Microsoft patent covers the ability to generate a long filename and a short filename while the Linux work around generates either a long filename or a short filename only.

I am not a lawyer but if this works, it’s just brill.

Legitimate Pirates

According to the BBC, the world’s most notorious peer-to-peer file sharing website, The Pirate Bay, is going legit. In case you have not heard, TPB was sold off for about US$7.8million a couple of days ago. Everyone has been wondering what would happen to our last bastion of legal piracy in this world. It seems that our questions have been answered by the company who is taking over TPB. Their premise is quite interesting – that the only way to beat a “free” service is to pay users to share files.

The only difference would be the legality of the files being shared. At present, there is a lot of copyrighted content being freely shared on TPB. What the new parent company plans to do is to work out a mechanism for compensating the copyright holders and the file sharers financially. In theory, it is a sound proposition. From an abstract view, we can see the file-sharers as a massive content distribution network that works very well. The parent company plans to use this massive network to help content owners distribute their content more quickly and efficiently.

However there are a few questions that pop up.

It makes sense for content providers to pay money to use the distribution network to help them get their content out. The distribution network then becomes a service that is exploitable. However, in order for this network to be worth anything, it has to guarantee some sort of service level, which ultimately depends on the number of file sharers linked to the network. The file-sharers are encouraged to join the distribution network by receiving financial compensation for using their computers and bandwidth. However, all this hinges on the value attributed by the users to the network and the content. If the price is wrong, then the file-sharers will drop off the network faster than you can say bittorrent. I just don’t see them paying the users enough to gain a critical mass of file-sharers that is needed to become a formidable distribution network.

Let us start with the network. This business model introduces the problem of valuating bandwidth. ISPs sell bandwidth based on very fundamental costs that are translated from the physical infrastructure costs, maintenance and service costs. The new TPB can’t possibly pay more than the cost of bandwidth charged by the ISP. By paying less than the value charged by the ISP, they force the file-sharers to evaluate the value of 1kbps. However, the value of 1kbps is different for everyone. Someone who does not use their bandwidth much will value it less than someone who is consuming 90% of their bandwidth already with little to spare.

Another problem is that of content. The value of the Internet comes from the fact that it does not discriminate against content. However, file-sharers are highly discriminatory. Everyone cares about the kind of content that gets stored on their computers and gets shared to others. I can see the porn industry being interested in using this service to distribute their wares. If the network is content agnostic, it should not matter to anyone if they are distributing porn. However, it will definitely affect the file-sharers (either way) and it doesn’t just stop at porn. If the network is content dependent, then there will not be any sort of guaranteed service level for the content providers. This will ultimately reduce the value of the system.

Anyway, much of this is just conjecture. I don’t really know if they will succeed or not. I guess that even the new owners are not quite sure. They are quoted as saying: “this technology is new. For now, we’re outlining our intentions and asking users to have faith.”

China Maids

This is a recurring idea that keeps cropping up and keeps getting silly press. Periodically, our government would suggest bringing in domestic workers from China to replace our dwindling supply of domestic workers from other countries. Every time, the MCA Women will say that it is a bad idea on simple marital grounds. They are fearful that these foreign maids, whom they have dubbed with a number of unkind labels, would steal their husbands away.

I just find these arguments rather trite.

These women are arguing for legal protection of their marital bliss. I just find that rather sad that a woman needs to rely on the government in order to maintain her marriage. Obviously, something is very wrong with the stereotypical Malaysian Chinese woman today, which makes them worry that these imported women would steal all their husbands away.

A woman should be confident in her own self. I thought that was what we have been working towards over many decades. She should not have to rely on “protectionism” in order to safeguard her own marriage. However, I have had conversations with some girls and found that in most cases, our local girls have a downright skewed view of marriage and what it means (and I lay the blame squarely on too much TVB dramas). The trouble is that most of these girls end up focusing too much on the wedding, and not the decades that come after. Not planning properly for that, is just dumb.

Personally, I think that a little extra competition would be good for everyone involved.

I can understand if someone feels that these Chinese domestic workers would have trouble adapting, or would not be able to do a good job. Unfortunately, all the arguments seem to point in the opposite direction – that these women would adapt a little too comfortably to the local environment, and would be able to take care of the household better than the locals. So, I don’t see why we should turn towards hiring sub-par help from some other random third world country instead.

All for the fear of these women stealing their husbands. Sheesh.

Transformers Revenge

As they always say, third time’s the charm. I had tried on two other occasions to watch the film at the cinema only to find out that there were no more good seats left. In fact, I was shown the same thing when I went to the box office today. The difference was that there were 30 uncollected reserved tickets. So, I joined the queue twice in order to get these tickets when they were released. As a result, I got a wonderful seat in the cinema and got to watch the film from the best seats in the house.

Regardless of what everyone else thinks, I felt that this film lived up to all my expectations of it. I had a thoroughly enjoyable experience. There were several hot ladies, plenty of cheesy jokes, several emotional scenes and lots and lots of action. Anyone who goes into Transformers expecting anything else is an idiot. We got introduced to many new transformers, mainly on the Autobots side but also some from the Decepticons. Unfortunately, there was not enough story time to properly build up some of these characters.

I would have loved to see the detail on some of these new characters – such as Arcee, but they only appeared on-screen during major battles where there was too much happening around them for me to get a good glimpse of these beautiful machines. In fact, most of the new transformers only had about one line to say in the entire film except for the two slapstick comedians – the twins – who were modeled as stereotypes of African Americans. They were still funny nonetheless.

Instead, Bumblebee got massive screen time this time around. I guess that he has got a massive fan following, particularly among the kids (you’ve got to feed the merchandise mania). His solo fight scene reminded me of an amalgamation of fight scenes from The Matrix and the Yoda fight scene from Star Wars. You would never have thought that cute Bumblebee had those kind of kick ass moves and attitude.

I think that the one robot that I did not like that much was Devastator. It didn’t occur to me that they were going to showcase a combination robot until I saw it happen on screen. I should have realised that it was happening when they had so many construction machines in the film. One of my favourites in the old cartoon were the Constructicons (along with the Aerobots). But the new gorilla like Devastator doesn’t quite appeal to me though.

Of course, we must never forget that Transformers also serves as a showcase for some really nice cars that some manufacturers would like to market. That is why it is over-run with GM cars. The sports cars were really sweet. Obviously, the German Audi R8 had to get killed just 10 minutes into the show after only about 2 minutes of screen time – by an American Chevrolet at that.

Anyway, like I said. The film was thoroughly enjoyable, as long as you know what you’re going to get. It is in the same vein as the first film and is a deserving sequel. If you didn’t like the lame jokes in the first one, you’re not going to like the crass ones in the sequel. As for me, I’m looking forward to the third instalment in the series (more so than the next Harry Potter).

PS: I hope that Megan Fox gets to be more involved with the transformers in the next film, and not just as an on-screen ornament. Since she likes to work on bikes, let her ride Arcee and get them to kick some ass too.

Offline Programming

I have been thinking about teaching some beginner programming to some high-school age kids, for a while now. My main objective is to inculcate some interest in the subject in these kids, and also to hopefully teach them how computers actually work. I am interested to do this as a social contribution (i.e. gratis) and was thinking of starting a class at my temple. However, the obvious problem is that they do not have computers there.

I know that Computer Science can always be taught without computers. In fact, that is the method that I would prescribe for most CS university courses. Teaching CS without using computers will ensure that the students actually learn CS and not how to become computer programmers. However, going down the theoretical CS path would be very boring to a bunch of high-school/pre-teen kids.

So, I thought that I would ask some experts on ideas on how to proceed in teaching programming, without any computers.

I got many replies and some of them have proven to be very interesting. Most would rely on group activities and paper/pen approaches. This should have occurred to me ages ago. Turing could prescribe a working computer by using nothing but a paper/pen. Some of these ideas took that a step further and actually suggested I take a Knuth approach and design my own simple computer and programming language.

I think that is probably a good way to start.

I will design a very basic theoretical computer – with about 8 instructions – and teach the kids the basics of programming by performing small group activities on it. As a start, I will teach them to count in binary and explain the basic workings of a computer – memory, processor, input/output. For simple activities, I may get them to write simple programmes for this basic computer.

Then the group activities may involve programming their friends to perform tasks, have mock battles, or even play a simple game like checkers. I may have to adapt this depending on the age group of the kids.

Sweet!

PS: Another useful site that some suggested was Computer Science Unplugged, which has a bunch of work sheet activities that can be completed by kids. This may be useful for me to adapt into my teaching material.