Search Results: "tach"

12 December 2008

Mike Hommey: Per-process namespaces

Linux has had this neat feature for quite some time now: since 2.4.19 according to the docs. Yet, it is neither very known nor very used. I couldn’t even find a program that would create a new namespace for its subprocesses, similar to what chroot does with the root of the file hierarchy. This neat feature allows each process to have a different set of mount points. While you most of the time want processes to share their mount points, there are some cases where you may want to have some processes have a different set of mount points. Combined with bind mounts, it can allow some useful setups. In case you are not familiar with bind mounts, they allow to “attach” a part of the file hierarchy to some place else. For example:
$ ls /mnt
$ ls /usr
bin games include lib lib32 lib64 local sbin share src X11R6
$ mount --bind /usr /mnt
$ ls /mnt
bin games include lib lib32 lib64 local sbin share src X11R6
Now, take pam-tmpdir, for example. It sets $TMPDIR and $TMP to point to a user-specific temporary directory. Sadly, it is pretty useless for applications that don’t follow the standards of using these environment variables. Without namespaces, if you’d create a temporary directory and bind-mount it to /tmp, this new /tmp would be visible to everyone, to every process. But with namespaces, you can make this new /tmp only available to subprocesses. If pam-tmpdir were to do this, it would also allow applications trying to write to /tmp without resorting to $TMP or $TMPDIR to be using the temporary space, without impacting external processes, that would still be using the original /tmp. On x86-64, you can run both 64-bits and 32-bits applications. 64-bits applications would take libraries from /usr/lib, and 32-bits applications would search libraries in /usr/lib32. But badly crafted 32-bits applications could be trying to load libraries from /usr/lib, where only 64-bits versions are available. With namespaces, the broken 32-bits application could have /usr/lib32 bind-mounted to /usr/lib without the 64-bits applications knowing. You could certainly get a similar result with the following set of commands:
$ mount --rbind / /chroot
$ mount --rbind /usr/lib32 /chroot/usr/lib
$ chroot /chroot $application
(–rbind also attaches submounts, contrary to –bind) The downside, here, is that external processes will see all this setup under /chroot. The whole setup would be invisible to external processes if namespaces were used. Another nice use of namespaces would be to mount encrypted volumes under a different namespace, so that only a limited set of processes would be allowed to read the decrypted data. The sad thing is that you need the admin capability to create a new namespace, so that would need to be done by a setuid root program. There are, as far as a few hours fiddling showed me, 2 system calls that will setup a new namespace: clone(2), and unshare(2). The second is easier to use, though only available since 2.6.16. But while etch ships 2.6.18, the glibc coming with it doesn’t implement unshare(2), so we need to use syscall(2) instead. The following code will run /bin/sh, or any command given as argument after creating a new namespace. The new process and its subprocesses will inherit the new namespace.
#include <sched.h>
#include <syscall.h>
#include <unistd.h>
int main(int argc, char *argv[])
  syscall(SYS_unshare, CLONE_NEWNS);
  if (argc > 1)
    return execvp(argv[1], &argv[1]);
  return execv("/bin/sh", NULL);

This tool, once built, is called newns in the following example.
$ mkdir /tmp/abc
$ ./newns
$ mount -n --bind /tmp/abc /tmp
$ touch /tmp/a
$ ls /tmp
a
<in another terminal>
$ ls /tmp
abc
$ ls /tmp/abc
a
When using namespaces, it is better not to have mount fill /etc/mtab, using the -n argument. /proc/mounts will contain the proper mount information about the namespace of the process reading it. /proc/PID/mounts will contain the mount information for the given process. As bind mounts also work on files, you can override some files. The following will run dash instead of bash (in subprocesses, too, obviously):
$ ./newns sh -c "mount -n --bind /bin/dash /bin/bash; /bin/bash"
Back to the idea of having encrypted volumes only available to some processes, the following should work (unverified):
$ ./newns sh -c "encfs /tmp/crypt-raw /tmp/crypt; /bin/bash"
Only the opened bash, and its subprocesses, would have access to /tmp/crypt. The newns tool used above could, to allow normal users to be able to fiddle with namespaces, be improved to be a setuid root program that would drop its privileges right after unshare(2) to take the same privileges as the calling process. As you can see, per-process namespaces have a wide range of possible uses ; it’s astonishing that it’s not more used yet, considering its age. Additionally to per-process namespaces, there are also a bunch of other (more recent) features that allow to implement vserver-like features with a vanilla kernel, such as networking netspaces (work under progress, though), PID namespaces and utsname (see uname(2)) namespaces. Actually, these features are designed to be used by vserver and openvz. I am looking forward to having unprivileged mounts implemented, so that users could fool around with bind mounts. Unprivileged namespaces would be a nice addition.

11 December 2008

Martin F. Krafft: Init7 and Transtec please me

Init Seven has once again established themselves high on my ranking of awesome service providers. After battling and not resolving the problems with crap nVidia hardware, I was ready to return the server to Transtec, despite having invested a full day of work into it. Having a machine in a rack across town, with the looming danger of simple network traffic taking out the network card along with the bridged IPMI remote console (thus requiring me to head out to the colocation centre each time there was a problem) was just not going to justify the expense for the server. Init Seven connected a second switch port to my VLAN, which now allows me to hook the IPMI card directly to the LAN. This does not solve the problem with the sub-zero-quality crap manufactured by nVidia, but at least it makes it possible to resurrect the machine remotely, until the problem with the hardware has been addressed and dealt with by the forcedeth driver. And if that is not possible (due to nVidia pile of shit), then the last option is a separate network card attached to the riser card slot. In related news: Transtec was quick to proxy to the Supermicro s support (the motherboard manufacturer), and within a few hours, I had a newer forcedeth.c file. I compiled the driver, which seemed to handle larger packets just fine at first. Unfortunately, just as my hopes were up, the problems came back even with the driver from Supermicro. Back to start, do not collect any money. Regardless, I ve been impressed by Transtec s support level so far. Yes, I did purchase a five year express warranty extension, but it wasn t very expensive, definitely nowhere near the price for a real SLA. And yet, my requests to date have each been answered within a day at most, including such extravagant things as them providing doanloadable floppy images of the BIOS update, which Supermicro only distributes as Windows .exe file. Now if only they (and everyone else) would stop shipping nVidia hardware NP: AC/DC: Dirty Deeds Done Dirt Cheap

26 November 2008

Russell Coker: Flash Storage and Servers

In the comments on my post about the Dell PowerEdge T105 server [1] there is some discussion of the internal USB port (which allows the use of a USB flash device for booting which is connected inside the case). This is a really nice feature of the Dell server and something that would be useful if it was in more machines. However I believe that it would be better to have flash storage with a SATA interface on the motherboard. The cost of medium size flash storage (eg 4G) in the USB format is not overly great, if soldered to the motherboard or connected to a daughter-board the incremental price for the server would be very small. Dell servers shipped with a minimum of an 80G SATA disk last time I checked, it seems quite likely to me that Dell could reduce the prices of their servers by providing flash storage on the motherboard and having no hard disk. It seems likely to me that there is a significant number of people who don’t want the default hard drive that ships with a Dell server. The 80G disk that came with my PowerEdge is currently gathering dust on a shelf, it was far to small to be of any use in that machine and Dell’s prices for bigger disks were outrageous so I replaced the default disk with a pair of big disks as soon as the server had passed some basic burn-in tests. Most servers that I run fall into one of two categories, machines which primarily do computation tasks and need little storage space or IO capacity (in which case 4G of flash would do nicely) and machines which have databases, backups, virtual machine images, and other big things (in which case anything less than 160G is silly and less than 500G makes no economic sense in today’s market). Note that for a machine with small storage requirements I would rather have a 4G flash device than an 80G disk, I am inclined to trust flash to not die but not trust a single disk, two 80G disks means more noise, heat dissipation, and expense. According to comments on my previous post VMWare ESX requires a USB boot device, so if VMWare could be booted with a motherboard based flash device then that would be an ideal configuration for VMWare. In some mailing list discussions I’ve seen concern raised about the reliability of permanently connected USB devices, while I’ve only encountered USB problems related to buggy hardware and drivers other people have had problems with the electrical connection. So it seems that motherboard based flash could be expected to increase the reliability of VMWare servers. The down-side to having flash permanently attached to the motherboard is of course the impossibility of moving the boot device to different hardware. In terms of recovering from failure restoring a few gig of flash storage from backup is easy enough. The common debugging option of connecting a hard drive to another machine to fix boot problems would be missed, but I think that the positive aspects of this idea outweigh the negative - and it would of course be an option to not boot from flash. If anyone knows of a tower server that is reasonably quiet, has ECC RAM and a usable amount of flash storage on the motherboard (2G would be a bare minimum, 4G or 8G would be preferred) then please let me know.

18 November 2008

MJ Ray: How to Check Web Shops for Basic Security

I just had a very nice chat on the phone with a man whose first attempt at online shopping seemed to have resulted in a fraudster using his card to buy mobile phone top-ups. I don’t understand why he called us (it wasn’t one of my web shops), but I hope I did the right thing by directing him back to his credit card company’s fraud department. While I was talking to him, I was checking the shop he had problems with. I wouldn’t have bought from it. Here’s how I checked it:- 1. Check the Page Open the front page of the site in one browser window and then use another window to get to a page that ought to be secure (the payment/checkout page is my usual one). Look at them both. Do either of them show any logos from well-known payment (Barclays, RBS, Protx, …) or security-checking services (thawte - who else?)? That’s not entirely reliable, but it’s usually a good sign because those companies attack people using their marks without permission. Look at the payment/checkout page - does the address in the address bar start “https”? If so, is the padlock in the browser status bar (usually bottom right) closed? That usually means it’s encrypted with a Secure Sockets Layer (SSL) certificate. 2. Check the Certificate Open the certificate details. In Firefox-based browsers, double-click the padlock, then click the “View Certificate” button. Then pick “Subject” in the second list box. Usually, it looks like this:-
screenshot

Basic Certificate Screenshot


in that case, as long as the “CN” (common name) is the webserver you thought you were using and the “O” (organisation) and country code (C) make sense, then there’s nothing wrong. Some shops now use Extended Validation certificates and give a bit more information. Here’s one from a train company:-
screenshot

Extended Validation Screenshot


In addition to the CN and O, it shows Organisational Unit (OU), Location (L), State (ST) and also other address parts and company number that Firefox doesn’t display neatly. This is a bit more reassuring, but also a lot more expensive for the shop owner (around 20 times more, last I checked), so I don’t blame shops for not using them. 3. Check the Registrations By this point, the payment processing and actual transaction are looking pretty good. Finally, I check the recipient. Find the business details on the web shop. Does it include a geographic address? If it contains a company registration number, look it up on the Companies House website. Then I find the business details on the domain names - you can use CoolWhois to look up domain names. If any of the addresses or numbers don’t match (Website, SSL Certificate, Whois), then I call them to ask why their website says they’re based in Bristol but their domain name is registered to Bolton. If they don’t answer messages, or - worse - the domain name says “Non-trading Individual” and the address has been omitted from the public listing, I give up on them and look for another shop. There’s no point securely paying someone that you can never reach if there’s a problem. 4. Buy Stuff and Check the Statements All being well, I then buy stuff and check my credit card statement each month before I pay it. I think any web shop owner (or webmaster - I help some people with this sort of thing) should be taking care of the basics above. Do your shops measure up? Despite the above checks, I can only remember not buying something online once in the last year. A couple of times, I’ve worked through the above steps and it’s changed which shop I bought from - and I’m pretty sure it saved me from losing 400 on one purchase.

Alastair McKinstry: Hubble open for Business

Just as life was getting frantically busy, and as catdynamics predicted, Hubble is back open for business with a Supplemental Call for Observing Proposals. So an idea I bounced off my supervisor has rebounded with a deadline attached. Fun predicted. Tags , ,

14 November 2008

David Welton: Ruby YAML Bug & Fix

Besides the nasty Ubuntu bug, which I was unable to do anything meaningful with, yesterday I also found a small bug in Ruby's YAML package:
irb(main):004:0> YAML::load('1900-01-01T00:00:00+00:00')
ArgumentError: time out of range
The problem is that the YAML implementation that Ruby is using, called "syck" interprets that kind of date as something that it should make a Time for:
        else if ( strcmp( type_id, "timestamp#iso8601" ) == 0 )
         
            obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len );
So I did a little bit of hacking on the C code, and made it create a DateTime object instead. My fix works, although I'm not sure it's the best possible way of tackling the problem. The patch is attached to the bug report here: http://redmine.ruby-lang.org/issues/show/752 This matters because my Rails text fixtures had some dates in them that were quite old, and this was causing problems.

13 November 2008

Martin Michlmayr: Debian installer improvements for NAS devices in lenny RC1

There have been a number of improvements to the Debian installer on Network Attached Storage (NAS) devices in the last few months and they are available to users now that RC1 has been released. We have added support for Marvell's Orion platform. Orion is a system on a chip (SoC) that integrates an ARM CPU, Ethernet, SATA, USB, and other functionality in one chip. The majority of NAS devices that have come out within the last two years are based on Orion chips, so it's exciting to have support for this significant platform in Debian. Specifically, we support the following devices based on Orion: QNAP Turbo Station (TS-109, TS-209, TS-409), HP Media Vault mv2120, and Buffalo Kurobox Pro (with more to come later). Here are some other newsworthy improvements and changes: Finally, the armel port is recommended for new installations now. Debian lenny has two different and incompatible ARM ports: the old ABI port (arm) and the new EABI port (armel). Debian lenny is the last release with support for the arm port and future releases will only support the armel port. It's therefore recommended to use armel for new installations of lenny.

12 November 2008

Obey Arthur Liu: Aptitude 0.5.0 (aka Aptitude-gtk) released

Long time no post. Anyway, I have some good news. The Gtk code for Aptitude has been merged some time ago into the main development trunk and we now have a release in Experimental. aptitude-gtk-050-dashboard For those that don’t know about it, here’s what it’s all about : “The new frontend is is an effort to bring some of the design principles of the curses frontend to a GUI environment, while also exploiting the unique features a GUI gives us and exploring ways to deal with changes in the environment in the nine years since aptitude was first designed.” I had a very good time this summer working on Aptitude with Daniel Burrows in the Google Summer of Code program and I’m very glad we now have a real release. This version is by no means final or perfect but it’s a good start. Head for the blog post from Daniel for some other informations : [Daniel Burrows]

10 November 2008

MJ Ray: Bloggers Unite to Reunite Refugees

Bloggers Unite

Unite to Reunite Refugees

We celebrate Software Cooperative News being reunited with its .coop domain by celebrating this Bloggers Unite event. If you’re not aware of it already, please find out more about the problem of refugee separation from Refugees United. Thank you.

9 November 2008

Andrew Pollock: [tech] Keeping hard drives cool

I've had this crazy ATA over Ethernet SAN for my MythTV setup for as long as I've been running MythTV. I'm using minotaur, an old Pentium III 1RU VA Linux server as the "head". Originally, I had 4 IDE hard drives, attached to minotaur via IDE-USB adapters. This worked perfectly fine, but I missed the ability to query SMART information, and do other low-level drive tweaking with hddparm So a while ago, NewEgg had a sale on 750Gb SATA drives, and I bought a 4 port eSATA card, and took the plunge with SATA. That all went fine. The entire time, I've had the 4 hard drives themselves just sitting on top of minotaur, on cork trivets. The whole arrangement is in the bottom of our linen closet, as this is where the patch panel for the apartment is. I've graphed the temperature of linen closet for some time now, but the benefit of having hard drives connected via SATA was that I could easily graph the temperature of them as well, which I started doing recently. The catalyst for wanting to do this was that I had a drive fail, and I was concerned that they were getting too hot, just sitting in the closet with no airflow. Matt Bottrell's recent reminder of Google's research into hard drive failures also helped bring this concern to forefront. Seagate's product documentation for the Barracuda 7200.10 claims that ambient operating temperature must be between 0 C and 60 C. I'm assuming that's the environment the hard drive is in, and not the temperature of the drive itself as reported by something like hddtemp. The closet is typically in the high 30's. If you believe what SMART reports, it seems to imply that anything over 45 C is a Bad Thingtm. So after I had a drive fail, I figured I should probably try to do something about the temperature situation, and started looking around for an external enclosure. I'd previously had problems with the IEC-to-Molex power supplies I was using to power the disks, and think that they'd been the cause of some failures of my IDE disks, so was quite eager to stop using them as well, which was something else an external enclosure would give me. I had trouble finding an enclosure that presented 4 separate eSATA ports, and I was talking to Marc about SATA port multipliers, when he mentioned he had a brand-new unused full-height SCSI enclosure, for four disks, which was surplus to his requirements. Since all I really needed was external power and cooling, I thought I could cannibalise this to my needs. Sure enough, I could just remove the SCSI cables and their Centronics connectors, and feed the eSATA cables out the gap they left, and use the molex-SATA power splitters I already had. Because the enclosure was intended for full-height 3.5" hard drives, there was plenty of air space between each disk. The enclosure included two fans. The results? Well the graph speaks for itself:

Graph of hard drive temperatures (I'm not entirely sure why minotaur's internal disk occasionally reports a very low temperature) The added bonus is I've cleaned up the rats nest of cables in the linen closet. So thanks very much, Marc!

6 November 2008

Mike Hommey: Emptying a deleted file

Yesterday, at work, we had the typical case where df would say there is (almost) no space left on some device, while du doesn’t see as much data present as you would expect from this situation. This happens when you delete a file that another process has opened (and, obviously, not yet closed). In typical UNIX filesystems, files are actually only entries in a directory, pointing (linking) to the real information about the content, the inode. The inode contains the information about how many such links exist on the filesystem, the link count. When you create a hard link (ln without -s), you create another file entry in some directory, linking to the same inode as the “original” file. You also increase the link count for the inode. Likewise, when removing a file, the entry in the directory is removed (though most of the time, really only skipped, but that’s another story), and the link count decreased. When the link count is zero, usually, the inode is marked as deleted. Except when the usage count is not zero. When a process opens a file, the kernel keeps a usage count for the corresponding inode in memory. When some process is reading from a file, it doesn’t really expect it to disappear suddenly. So, as long as the usage count is not null, even when the link count in the inode is zero, the content is kept on the disk and still takes space on the filesystem. On the other hand, since there is no entry left in any directory linking to the inode, the size for this content can’t be added to du’s total. Back to our problem, the origin was that someone had to free some space on a 1GB filesystem, and thought a good idea would be to delete that 860MB log file that nobody cares about. Except that it didn’t really remove it, but he didn’t really check. Later, the “filesystem full” problem came back at someone else, who came to ask me what files from a small list he could remove. But the files were pretty small, and that wouldn’t have freed enough space. That gave me the feeling that we probably were in this typical case I introduced this post with, which du -sk confirmed: 970MB used on the filesystem according to df, but only 110MB worth of data… Just in case you would need to find the pid of the process having the deleted file still opened, or even better, get access to the file itself, you can use the following command:
find -L /proc/*/fd -type f -links 0
(this works on Linux ; remove -L on recent Solaris ; on other OSes, you can find the pid with lsof) Each path this command returns can be opened and its content accessed with a program, such as cat. That will give access to the deleted content. I already adressed how to re-link such a file, which somehow works under Linux, but in my case, all that mattered was to really remove the file, this time. But we didn’t know if it was safe to stop the process still holding the file, nor how to properly restart it. We were left without a possible resolution, but still needed to come up with something before the filesystem gets really full while waiting to be able to deal with the root of the problem. The first crazy idea I had was to attach a debugger to the process, and use it to close the file descriptor and open a new file instead (I think you can find some examples with google). But there was no debugger installed. So, I had this other crazy idea: would truncate() work on these /proc/$pid/fd files? You know what? It does work. So I bought us some time by running:
perl -e 'truncate("/proc/$pid/fd/$fd", 0);'
(somehow, there is no standard executable to do a truncate(), so I always resort to perl) Afterwards, I also verified the same works under Linux (where you wouldn’t really know what it’d do with these files that are symbolic links to somewhere that doesn’t exist). The even simpler following command works, too.
> /proc/$pid/fd/$fd
It doesn’t truncate() but open() with O_WRONLY O_CREAT O_TRUNC, and close() right after (to simplify), which has the same effect. Good to know, isn’t it?

3 November 2008

Adeodato Sim : Software that rocks

From the “Software that recently rocked my pants” department: I also thank Martin F. Krafft for helpfully updating the encryption howto I followed for my previous laptop to mention that using a single encrypted device and LVM on top of it is (possibly) preferred nowadays. And to Simon McVittie for his idea of a small unencrypted Debian installation for recovery purposes in laptops without an optical drive. P.S.: I can’t believe this shit about blogging every day in November.

29 October 2008

David Welton: Programmer Fuel

I can't stand the taste of coffee - neither American, nor Italian - it all tastes like dirt to me. Programmer Fuel However, I too occasionally need a kick to keep me going even when I'm tired, and I've found just the thing here in Austria. Red Bull is the most famous Austrian "caffeine/energy drink", but they also have a variety of similar products, which sell at lower prices. Recently, I noticed that you can even get the stuff in 1.5 liter bottles, rather than the more expensive 1/4 liter cans. Be careful though: I had a bit too much the other day, and my wife had to detach me from the ceiling. If I had a good head for business, I'd find a way to make money exporting the stuff. At a bit more than a Euro per liter, it's way cheaper than expensive cans of Red Bull.

David Welton: Programmer Fuel

I can't stand the taste of coffee - neither American, nor Italian - it all tastes like dirt to me. Programmer Fuel However, I too occasionally need a kick to keep me going even when I'm tired, and I've found just the thing here in Austria. Red Bull is the most famous Austrian "caffeine/energy drink", but they also have a variety of similar products, which sell at lower prices. Recently, I noticed that you can even get the stuff in 1.5 liter bottles, rather than the more expensive 1/4 liter cans. Be careful though: I had a bit too much the other day, and my wife had to detach me from the ceiling. If I had a good head for business, I'd find a way to make money exporting the stuff. At a bit more than a Euro per liter, it's way cheaper than expensive cans of Red Bull.

22 October 2008

MJ Ray: The Phone Coop, Best Social Enterprise 2008

a phone
ThePhoneCoop Congratulations to all our friends at The Phone Coop for winning the Best Social Enterprise Award at the Enterprising Solutions Awards 2008 yesterday. (TTLLP is an agent and I’m a member personally too.) Longer report at Cooperatives-UK. Comiserations to Barnsley Building Society, who are merging into Yorkshire Building Society after having 10m with collapsed Icelandic banks. Still, it survived further into the banking crisis than even the biggest of the demutualised building societies.

20 October 2008

Steve Kemp: May you live forever.

This will be my last post on the topic of tscreen for at least a couple of days. People who want to follow tscreen work know where to get it. Anyway this release exposes the notion of layouts - they allow you to save and restore window positions. i.e. If you split your window, detach and then reattach it will be back in the layout you had before! Simply add "layout new default" to your ~/.tscreenrc file, and have fun. The layout primitive allows: Experimentation is fun, people! I've added a couple of patches from other people which I found on the screen-devel mailing list: Anyway sources and Debian packages for Etch, Lenny, & Sid are available in both i386 and AMD64 flavours. Update: Fixed links to patches, and added if primitive. ObFilm: 300.

17 October 2008

David Welton: Programmer Fuel

I can't stand the taste of coffee - neither American, nor Italian - it all tastes like dirt to me. Programmer Fuel However, I too occasionally need a kick to keep me going even when I'm tired, and I've found just the thing here in Austria. Red Bull is the most famous Austrian "caffeine/energy drink", but they also have a variety of similar products, which sell at lower prices. Recently, I noticed that you can even get the stuff in 1.5 liter bottles, rather than the more expensive 1/4 liter cans. Be careful though: I had a bit too much the other day, and my wife had to detach me from the ceiling. If I had a good head for business, I'd find a way to make money exporting the stuff. At a bit more than a Euro per liter, it's way cheaper than expensive cans of Red Bull.

16 October 2008

Russell Coker: Combat Wasps

One of the many interesting ideas in Peter F. Hamilton’s Night’s Dawn series [1] is that of Combat Wasps. These are robots used in space combat which may be armed with some combination of projectile weapons, MASERs, thermo-nuclear and anti-matter weapons. In a lot of science fiction the space combat is limited to capital ships, a large source of this problem is technological issues such as the Star Trek process of making models of ships - it’s too expensive and time consuming to make lots of small models. Shows such as Babylon 5 [2] have fighters which make more sense. Sustaining life in space is difficult at the best of times and it seems likely for battles in space to have few if any survivors. So sending out fighters allows the capital ships to have a chance to survive. I suspect that a major motivating factor in the space battles in Babylon 5 was making it fit on a TV screen. Dramatic TV portrayal of small groups of fighters engaging in a battle is an art that has been perfected over the course of 80+ years. It’s about individuals being shown, whether it’s riders on horseback, pilots of biplanes, or space pilots, it’s much the same. But a reasonable analysis of the facts suggests that without some strange religious motive adopted by all parties in a war (as used in Dune [3]) the trend in warfare is to ever greater mechanisation. So while a medium size starship might be able to carry dozens or even hundreds of fighter craft, if using small robotic craft then thousands of fighters could be carried. So the issue is how to effectively use such robots. It seems likely that an effective strategy would involve large numbers of robots performing different tasks, some would detonate thermo-nuclear weapons to remove enemies from an area while others would prepare to advance into the breach. The result would be a battle lasting seconds that involves large numbers of robots (too many to focus on in a group) while each robot matters to little that there’s no interest in following one. Therefore it just wouldn’t work on TV and in a book it’s given a couple of sentences to describe what would have been an epic battle if humans had done anything other than press the launch buttons. One of the many things I would do if I had a lot more spare time would be to write a Combat Wasp simulator. There are already quite a number of computer games based on the idea of writing a program to control a robot and then having the robots do battle. This would be another variation on the theme but based in space. In a comment on my previous post about programming and games for children [4], Don Marti suggests that a RTS game could allow programming the units. It seems to me that the current common settings for controlling units in RTS games (attack particular enemies, attach whichever enemies get in range, patrol, move to location, retreat, and defend other units or strategic positions) are about as complex as you can get without getting to the full programming language stage. Then of course if you have any real programming language for a unit then changing it takes more time than an RTS game allows, and if the programming is good then there won’t be much for a human to do during the game anyway. So I can’t imagine much potential for anything between RTS and fully programmed games. There is some interesting research being conducted by the US military in simulating large numbers of people in combat situations. I think that the techniques in question could be more productively used in determining which of the various science fiction ideas for space combat could be most effectively implemented.

15 October 2008

Russell Coker: Programming and Games for Children

The design of levels for computer games is a form of programming, particularly for games with deterministic NPCs. It seems to me that for a large portion of the modern computer user-base the design of games levels will be their first experience of programming computers, the people who don’t start programming by creating games levels would be writing spread-sheets. Probably a few people start programming by writing “batch files” and shell scripts, but I expect that they form a minute portion of the user-base. I believe that learning some type of programming is becoming increasingly important, not just for it’s own sake (most people can get through their life quite well without doing any form of programming) but because of the sense of empowerment it gives. A computer is not a mysterious magic box that sometimes does things you want and sometimes doesn’t! It’s a complex machine that you can control. Knowing that you can control it gives you more options even if you don’t want to program it yourself, little things like knowing that you have an option of using a different choice of software or paying someone to write new software open significant possibilities to computer use in business environments. Games which involve strategic or tactical thought seem to have some educational benefit (which may or may not outweigh the negative aspects of games). To empower children and take full advantage of the educational possibilities I think that there are some features that are needed in games. Firstly levels that are created by the user need to be first class objects in the game. Having a game menu provide the option of playing predefined levels or user-defined levels clearly shows to the user that their work is somehow less important than that of the game designer. While the game designer’s work will tend to be of a higher quality (by objective measures), by the subjective opinion of the user their own work is usually the most important thing. So when starting a game the user should be given a choice of levels (and/or campaigns) to play with their levels being listed beside the levels of the game creator. Having the users levels displayed at the top of the list (before the levels from the game designer) is also a good thing. Games that support campaigns should allow the user to create their own campaigns. The KDE game kgoldrunner [1] is the best example I’ve seen of this being implemented correctly (there may be better examples but I don’t recall seeing them). In kgoldrunner when you start a game the game(s) that you created are at the bottom of the list. While I believe that it would be better to have my own games at the top of the list, having them in the same list is adequate. When a user is playing the game they should be able to jump immediately from playing a level to editing it. For example in kgoldrunner you can use the Edit Any Level menu option at any time while playing and it will default to allowing you to edit the level you are playing (and give you a hint that you have to save it to your own level). This is a tremendous encouragement for editing levels, any time you play a level and find it too hard, too easy, or not aesthetically pleasing you can change it with a single menu selection! When editing a level every option should have a description. There should be no guessing as to what an item does - it should not be assumed that the user has played the game enough to fully understand how each primary object works. Kgoldrunner provides hover text to describe the building blocks. Operations that seem likely to be performed reasonably often should have menu options. While it is possible to move a level by loading it and saving it, having a Move Level menu option (as kgoldrunner does) is a really good feature. Kgoldrunner’s Edit Next Level menu option is also a good feature. Finally a game should support sharing levels with friends. While kgoldrunner is great it falls down badly in this area. While it’s OK for a game to use multiple files for a campaign underneath the directory it uses for all it’s configuration, but it should be able to export a campaign to a single file for sharing. Being able to hook in to a MUA to enable sending a campaign as a file attached to an email as a single operation would also be a good feature. I have filed Debian bug #502372 [2] requesting this feature.

8 October 2008

Rob Taylor: Wizbit ars d

So it seems ars technica picked up on Codethink’s little pet project! Obviously the little amount of info on the wiki isn’t enough for everyone who’s interested and enough has changed since the GUADEC talk that I should write a bit here to clarify what’s going on and where we’re going. First off, we’re currently not using GVFS or FUSE - the core Wizbit component is simply a versioning, distributed object store. The current plan is to later hook up with a metadata service, maybe tracker, and use this to export a FUSE filesystem using the metadata. This core Wizbit service is just a library with its own api, maybe hooking up to gio streams for ease of use from GLib based applications. The current focus of our work is solidifying this store and the synchronization between multiple machines. We’re prototyping its use in Tomboy. Karl is also working on making some of these pretty widgets for navigating history work. We’re not actually using Git underneath, but using our own implementation of concepts from both Git and Bzr. This is for a number of reasons, partially that making a library from git’s code proved more trouble than just reimplementing the concepts (as things like JGit found). Also the nature of the problem is sufficiently different that things like the packed format don’t behave in a suitable way for general file system usage. The work on packing is yet to be started but we’ll probably use Robert Collin’s groupcompress idea from bzr. I promise we’ll make the wiki a bit better when the code’s stabilised a bit!

Next.

Previous.