Bugs filed versus the phase of the moon.
One of the more classic jokes about not yet understood bugs is that the phase of the moon is somehow involved in causing it.
Being bored, I decided to spend some time to see whether "date of bug filed" could somehow be correlated with "phase of the moon" for a given source package.
Fast forward an hour of perl experimenting, and here we are:
#!/usr/bin/perl -w use strict; use warnings; use constant PI => 3.1415926535; use feature "say"; use SOAP::Lite; use Astro::Coord::ECI::Moon; my $soap = SOAP::Lite->uri('Debbugs/SOAP')->proxy('http://bugs.debian.org/cgi-bin/soap.cgi'); if (!defined($ARGV[0])) { die "E: must have a source package!\n"; } my @bugs = $soap->get_bugs(src=>$ARGV[0])->result(); my $bugsdata = $soap->get_status(@bugs)->result(); my $moon = Astro::Coord::ECI::Moon->new(); my %count = ( 'new' => 0, 'first' => 0, 'full' => 0, 'last' => 0); foreach my $bug (keys %$bugsdata) { my $time = $$bugsdata{$bug}->{date}; my $phase = $moon->phase($time); if ($phase <= 45 * PI / 180 || $phase > 315 * PI / 180) { $count{'new'} = $count{'new'} + 1; } elsif ($phase <= 135 * PI / 180 && $phase > 45 * PI / 180) { $count{'first'} = $count{'first'} + 1; } elsif ($phase <= 225 * PI / 180 && $phase > 135 * PI / 180) { $count{'full'} = $count{'full'} + 1; } elsif ($phase <= 315 * PI / 180 && $phase > 225 * PI / 180) { $count{'last'} = $count{'last'} + 1; } } say "Number of bug submissions during new moon : " . $count{new}; say "Number of bug submissions during first quarter: " . $count{first}; say "Number of bug submissions during full moon : " . $count{full}; say "Number of bug submissions during last quarter : " . $count{last};
This uses the (not packaged in Debian) Astro::Coord::ECI::Moon perl module.
Use like so:
wouter@carillon:~code/perl$ ./debbugsmoon nbd Number of bug submissions during new moon : 2 Number of bug submissions during first quarter: 10 Number of bug submissions during full moon : 1 Number of bug submissions during last quarter : 3
Apparently there's a reasonable correlation between 'the moon is in the first quarter' and 'people file bugs on nbd'.
Note: no, the above is probably not very scientific. That's not the point.
Test suites considered good
Yesterday, I uploaded NBD 2.9.24-1 to Debian. The big new feature in that release is that it now has an 'includedir' global configuration variable, with which it supports a conf.d-style directory. This feature was implemented by request of Vagrant Cascadian, of LTSP fame.
Only it didn't build on kFreeBSD. The reason? The particular test that I added for that new feature failed.
It turned out to be a simple bug in the code, which just didn't trigger on Linux but which was a bug none the less. I hadn't noticed, since my main development machine runs Linux; this is why I added a test suite to the code.
Bug fixed, new package is in incoming. Whee.
Re: 8bitmime
Would people please stop using and/or deplying MTAs that are not 8-bit safe? I mean, it's the 2010s for crying out loud; not speaking 8BITMIME is very much frowned upon (page 16, paragraph 2, second sentence).
diff6
There are six servers. They're meant to be used for the same purpose, and are mostly the same too, but not quite entirely. This being the case, mostly because of how they were maintained in the past: with cssh mostly, but it's inevitable that eventually there will be differences.
So we're in the process of migrating them to puppet now. One of the things I need to do while doing that, however, is figure out what the differences are, and get rid of them where applicable. Differences such as, say, in the installed packages. Some of these servers have extra things installed, for a reason that isn't clear anymore, that others don't.
So how does one figure out what the difference is? If this were two servers, I'd create a list of installed packages and use 'diff' on them. If there were three, I'd use 'diff3' instead. But if there are 6?
Turns out that isn't too hard. First, of course, you need a list of packages installed on each individual host. Both rpm and dpkg can do this with a simple command line invocation. Assuming that's done, and the output is stored in files called installed-host1 through installed-host6, the procedure is:
$ comm -12 installed-host1 installed-host2 > installed-common $ for i in $(seq 3 6) > do > comm -12 installed-common installed-host$i > installed-tmp > mv installed-tmp installed-common > done
And there, you now have a file "installed-common" containing everything which is installed everywhere. If you use "comm" or "diff" to compare that file against the installed-hostX files, you can easily see what the difference is.
Granted, that doesn't give you the overview in just one file, but usually that's not really necessary. The 'installed-common' file contains the largest common denominator, which really is everything you need.