Search Results: "ag"

23 November 2006

David Pashley: Yum Bitching

It can be quite discouraging to type "yum update" and have yum simply go off forever. Among other things, one must wait a great long time to distinguish this behavior from yum's normal mode of operation. Other times, it comes back very quickly with a message saying, for all practical purposes, "RPM crashed, you lose, sorry."
via LWN.net (subscription required) Jonathan Corbet normally manages to amuse me on a weekly basis, but this time he's outdone himself. Consider my LWN.net subcription renewed for another year. Update: I;ve been convinced to include a subscriber link to the article for those without LWN.net subscriptions. http://lwn.net/SubscriberLink/210373/8badbe4f9c463fb8/

Edd Dumbill: Really really getting the testing religion

Writing tests is virtuous. It's the wholemeal bread of programming. Do it, and you'll be so much fitter. Except it tastes like cardboard and gets in the way of consuming the yummy treacle sponge of programming. But now I've got the testing religion. I view the lack of tests with the disapprobation of a reformed smoker tutting and huffing at the merest suggestion of a Marlboro Light. How did this happen and how can I be sure I won't backslide? The moment of transition was the first time that a test saved me from releasing software with a bad bug in it. The theoretical knowledge of virtue was translated into the palpitating relief of not disgracing myself in public. After that happened a few more times, I found myself desperately uncomfortable with the idea of releasing anything that didn't have decent test coverage. And so a virtuous habit is formed. It's not just driven by fear. With the right tools to hand, writing tests can be a lot of fun. You don't always need to be "in the zone". If you've got a spare half hour here and there, you can use it to increase the coverage of your tests. Getting better at testing is one of the ways I've become a much more proficient Rails developer over the last year of work on Expectnation. In case it helps anybody else, I thought I'd share some of the tools and techniques that are part of making Rails testing fun and effective. Continuous testing Whenever a checkin is made to our source repository, tests are run and the results emailed to everybody working on the project. As with the "you broke the build" disincentive, you need to be kept honest by frequent running of the tests. There are a variety of tools around to help you do continuous integration with Rails, most of which have some dependence on you using Subversion for source control. In the event, I just created my own script to do what we required. Coverage reports rcov coverage barsOne of the big mental hurdles with testing is knowing how many tests you should aim for.  You can't prove a negative: even if your tests are all passing it still doesn't tell you much about the tests you haven't written that might fail! We use rcov as part of the continuous integration process, and post the results to our project web site. The pretty red and green bars give you some idea of when you're starting to get adequate test coverage, and the line-by-line breakdown is invaluable. Tainting strings One of the easiest errors to make in Rails templates is to miss the call to h(), to escape any HTML in an output string. The only real way to catch these errors is through automation. The wonderful safe_erb plugin helps you do just that. By using Ruby's tainting mechanism for strings, it throws an exception if you render any external data unescaped. One of the beneficial side effects of safe_erb is that you then become very particular about ensuring your functional tests properly cover every action in your application.  Tests such as get 'index', which before seemed mundane and redundant, are now essential, as you want to test for tainted strings. In addition to the above techniques, there are a lot of fun shiny gadgets to help you write tests, such as ZenTest, but the three things above are the ones I've found to be of significant value. I ought to conclude with words of praise for Rails. It goes out of its way to make testing an important part of the development lifecycle, and the availability of the of unit, functional and integration test functionality makes it easy to get started. Every time I teach somebody about Rails' testing features, they end up finding it very enjoyable.
Don't forget, testing can be fun!

MJ Ray: Spam: Under Seige

At the start of this week, one of the mailservers I run came heavily under attack. As well as the continuing surge in the sheer volume of spam - which has been reported widely in articles like Spam up by 59 per cent [Spannerworks Search Marketing News] - there were dozens of clients opening connections and then just sitting there idle. Very strange. To bring things back under control, I added a mixture of new anti-spam methods, but some things will always be attractive enough for bad people to attack manually and defeat whatever anti-spam you put in place. The only anti-spam which can't be defeated is one that will defeat all real people - and that helps spammers to pollute the network, IMO, making everyone else waste yet more time as a result of their spamming. My main anti-spam at the moment is a mix of: I always argue against doing a hard reject for a dnsbl match. In general, dnsbls are way too trigger-happy and too prone to false positives, especially for things like new mailservers coming online. Just this month, one of my ISP mailservers ended up in sbl-xbl and I couldn't find out why. Once I had added the extra anti-spam, the spam volume dropped significantly. Total message volume reduced by about 20%. I can't tell reliably how many of the 20% (or the remaining 80%) are spam, of course. But then the network connection failed, which may have been the cause of the idle connections that turned this into a crisis in the first place.

John Goerzen: hpodder to be multithreaded... done right.

I'll be hacking on my hpodder program this weekend. hpodder is a full-featured podcast aggregator that runs on the command line, and has many features over other command-line podcatchers like bashpodder, and even over GUI tools like iPodder.

I originally envisioned hpodder to be something that I'd cron up and run in the background. But I have tended to run it in the foreground more than in the background. Some others have too, and the #1 requested hpodder feature is parallel downloads.

So I am working on that. I already have code working, in fact, that will parallelize both the hpodder update (downloading the feeds) and the hpodder download (downloading the actual episodes) commands.

Unlike ipodder, my code will make sure that no more than 1 thread will ever be downloading from a given server at a given time. ipodder had the terribly annoying habit of pointing all of its threads at a single server, thus pounding it while also providing little benefit for someone with a pipe fatter than the server's.

Before all this multithreaded stuff could be written, I needed to write my own status bar code instead of just letting curl display its own status bar. (That wouldn't work when there are 5 curls running at once)

I decided that I would write some generic status bar code, rather than something specific to hpodder. I took the apt-get status bar as an example, and whipped one up in Haskell and added it to my MissingH Haskell library.

But a status bar just begged for another feature: a generalized progress tracker. Something that could keep track of where a task (and its sub-tasks) are, calculate ETA, estimated time remaining, speed, etc. So I wrote that and made the status bar use it.

AND, a status bar begged for a generalized numeric formatter: something that could render 512 as 512, 2048 as 2K, 1048576 as 1M, etc. So I wrote that, and it's general enough that it can render into both SI and "binary" units by default (and others that users may want).

Finally, I wrote a function to take a number of seconds and render it in something friendly like 23m5s like apt uses, and shoved that in MissingH as well.

So now hpodder will have a status bar, and any other Haskell program can use the same status bar code in minutes because it's all generic. Or if someone just needs to render a number in megabytes, they can do that.

I really enjoy it when a program needs a solution that is generic enough to put in a larger library. I try to put as much of my Haskell code in MissingH as I can, so as to make it useful to others (and my other programs).

Frank Lichtenheld: Searching for pbbuttonsd i386 users

For about five months now the Debian package of pbbuttonsd builds a package on i386, too, since it might actually be useful to have these available on MacBook (Pro) machines as well. What I don't know (since up until now I never actually used or even saw a MacBook with Linux installed) is whether any significant part of the functionality is working there or if it all depends on hardware that was specific to the PowerBooks and iBooks (e.g. PMU). I've decided that I will remove the i386 binary again before etch if nobody claims that it has proven useful too him. So if there are any users out there that would actually miss that package, please speak up now...

22 November 2006

Frank Lichtenheld: Searching for pbbuttonsd i386 users

For about five months now the Debian package of pbbuttonsd builds a package on i386, too, since it might actually be useful to have these available on MacBook (Pro) machines as well. What I don't know (since up until now I never actually used or even saw a MacBook with Linux installed) is wether any significant part of the functionality is working there or if it all depends on hardware that was specific to the PowerBooks and iBooks (e.g. PMU). I've decided that I will remove the i386 binary again before etch if nobody claims that it has proven useful too him. So if there are any users out there that would actually miss that package, please speak up now...

Benjamin Mako Hill: Poor Santa

I think it wold be a good idea if companies did not typeset their bicycles in ways that remind people of falling.
/copyrighteous/images/santa_fell.jpg
With that said, the red and white theme is a particularly nice touch in this case.

Piotr Roszatycki: Singleton Pattern on Perl

I'm working on some interesting project in Perl. I decided to make it fully OO, XP and other buzzwords-friendly. I just implementing some Registry Pattern which is just a Singleton Pattern. The Perl Design Patterns site is very useful, but I wanted more. The beauty of Perl is its flexibility. I'd like to call the class directly and by object. So it is my version:
  package System::Path;
  use File::Spec ();
  # Class attributes
  my %attrs = (
      home => undef,
      root  => undef,
      tmpdir  => undef
  );
  # Private constructor used by singleton
  sub _new  
      my $class = shift;
      my $self =   %attrs  ;
      bless($self, $class);
      $self;
   
  # Instance of singleton class
  my $Self;
  # Singleton constructor
  sub instance  
      $Self  = (shift)->_new;
   
  # Returns a string representation of the temporary directory
  sub tmpdir  
      my $self = shift;
      $self = __PACKAGE__->instance
          unless ref $self eq __PACKAGE__;
      return $self-> tmpdir 
          if $self-> tmpdir ;
      $self-> tmpdir  = File::Spec->tmpdir;
   
  # (...)
  1;
Then I can call: $dir = System::Path::tmpdir; or $dir = System::Path->tmpdir; or $obj = System::Path->instance; $dir = $obj->tmpdir; ...and each way is correct. BTW, they are great tunes on chillout@DI.FM radio at the moment :) "Sacred Cycles", "Greece 2000" and beautiful set of Marco Torrance vs. Xerxes... Oh my! :)

Simon Richter: The next step in packaging: functional units as system components?

I need to set up a spam filter, preferably with instantaneous rejection of emails. The way postfix does this is to immediately attempt to forward the mail to a filter, which is then responsible for feeding it back. This is probably the sanest way to do it, as it allows postfix to handle timeouts in the filter, and it allows the filter to modify the message (e.g. tag it) Now, all I need is a filter that actually works in this place. What would be nice would be a readymade spam filter installation that I could simply boot on a virtual machine and be set.

Steve McIntyre: BSP Marathon - Helsinki, 11 - 12 Nov 2006

Travelling again, this time to Helsinki. Droidy generously hosted us for the weekend in her apartment, and over the 2 days something like a dozen people showed up. It was nice to fly into Helsinki airport on Friday night to find that they were having some proper winter weather already, with snow on the ground. Much better than the miserable cold rain and drizzle we're having in Cambridge so far this year... *grin*. I also got to see why so many good rally drivers come from Finland - the taxi driver calmly drove me from the airport into the city on frozen roads, catching skids one-handed while he had a conversation on his mobile phone in the other. We worked through a series of bugs throughout the 2 days, and very late on Saturday night Droidy and Jukka helped me with some testing of the Etch d-i RC1 CD and DVD images so we could release them. Hanna/Kenny? As most of the people at the BSP were interested users rather than DDs, I was aiming to help other people get up to speed on reproducing and fixing bugs rather than just diving in myself - in the longer run, it's more useful. Nonetheless, I got a fair number of bugs polished off (#396361, #395858, #395857, #382843, #397620, #397693) along with my usual bit of debian-cd work. Of course, while I was in Finland there was no way I'd miss out on the sauna! On Saturday night we put the world to rights in the sauna and then over some beer. It was cool to meet up again with Lars and Jesus that night, and we discussed the details of Lars' tattoo. Lars also still has some cool ideas for Debian, which I'm sure he'll be publicising himself over the next few months. *grin*

Gunnar Wolf: O mighty Tezcatlipoca, we bow before you!


Tezcatlipoca, the smoking mirror, was (quoting from Wikipedia) the god of the night, the north, temptation, sorcery, beauty and war. He was known by other descriptive names, such as Titlacauan (We His Slaves), Ipalnemoani (He by whom we live), Necocyaotl (Sower of Discord on Both Sides) and Tloque Nahuaque (Lord of the Near and Nigh) and Yohualli ecatl (Night, Wind). And today, I strongly feel as being born his servant. Why? Because today I took courage and started working on the integration of our ~20 print servers into a single, smarter scheme, with user control and printer assignment done by a central server. I cannot, of course, say that in the course of a day my troubles are over - No, no, quite far from it... But at least, I managed to grasp how to send the CUPS generic Postscript driver as the default driver for W2K/XP clients (no, I haven't worked on older ones yet - and yes, we still have many W98 machines around). I'm quite used to the fact that things in a Unix system are just easy to understand. Yes, sometimes it takes some time, sometimes you have to dig into the manuals, but all in all things can be finally understood. Today, after a couple of hours sticking my nose into the extremely extensive Official Samba HOWTO and Reference guide (chapters 21 and 22) and having my attention drift over the quite interesting Implementing CIFS book in a vain attempt to fully understand what goes on behind the curtains, after trying to debug my Windows-Linux communication issues by grokking what Wireshark finds over the wire... I can only understand that CUPS is pure black magic, although quite well documented. Samba is elegant and feels nice and easy, but really begs to be debugged with the Malleus Maleficarum at hand. CIFS (also here) is the subtle utterance of a dark spell pronounced by a stuttering sorcerer. And the way Windows integrates with it all is... Bah.

Russell Coker: nuclear power in Australia

From Crikey: If a government wanted to figure out how best to defend the country, it wouldn t hold an inquiry into the air force. It would hold an inquiry into defence. So if a government wanted to figure out how to plan for responsible energy consumption in an age of climate change you d assume it would hold an inquiry into energy consumption. Instead, the Australian government holds an inquiry into nuclear energy.

The above really says it all. The Liberal government has decided that they want to get nuclear reactors regardless of what the citizens want. Surprisingly the Switkowski report was not very positive towards nuclear power. It concluded that producing 1/3 of Australia's electricity requirements would require 25 nuclear power plants, and that they would have to be built close to population centers, and mainly on the east cost. I guess that means about 8 reactors for Melbourne and about 10 for Sydney! It has been suggested that the federal government could force nuclear power on the states even if the state governments don't want it!

For those reactors to be economically viable
a carbon tax is required (this means taxing all energy sources on the amount of carbon that they release into the atmosphere). The Liberal government has been opposing such a tax but now the report they commissioned recommends it.

The Victorian branch of the Liberal party seems to support such things. I have been walking past the office of Ted Baillieu (the leader of the Victorian Liberal party) on my way to work. He has a sign in his office window opposing wind power so I guess he'll be supporting nuclear power.

It's something to keep in mind at the election on Saturday. I'll be handing out how to vote cards for the Greens.

Erich Schubert: JSF XML syntax for c:url in attributes?

Dear Lazyweb, What is the JSF 1.2 XML-Syntax equivalent for
<img src="<c:url value='/static/foo.png' />" />
(this will make the URL relative to your application root, not to your web server; so if the app is installed in /foobar, the resulting URL will be /foobar/static/foo.png) My preferred solution would have a useful src= value so an XHTML browser can still display the page. Same for CSS stylesheets, links and similar. Please send me an email at erich@debian.org, I'll update the entry. (Comments are intentially not enabled.) Thanks. [Update: at least in apache myfaces, this should work (untested):
<c:url value="/static/foo.png" var="url" />
<img src="$ url " />
However, the template file won't render approximately in a regular browser. For easy-to-edit templates it would be nice to have an actual value in the src property. I have an idea how that could work with custom tags...]

Steve McIntyre: BSP Marathon - Cambridge, 28 - 29 Oct 2006

After travelling around Europe visiting other people and helping on the Etch RC bug total, it was my turn to play host in Cambridge. Quite a few people turned up from around the country, and we got quite a lot of work done. Vince brought along one of his fast arm machines to help on the arm mono and java bugs. I found 3 packages that definitely looked ripe for removal (dart, felt and linpac) 1 that needed a small amount of NMU love (gnupod-tools) and another that needed a lot of TLC (gpart). All in all, another fun, productive weekend. i don't have any photos, but others may...

Steve McIntyre: LinuxWorld Expo in London, 25-26 October 2006

We had a good, successful show again this year. The show itself seems to be continuing the trend of fewer visitors each year, but we're still seeing a good number of visitors at the Debian stand. Not many wanted to buy DVDs this year, another continuing trend. As Noodles found ("Use Debian! It's great!"), a large number of those visitors were already Debian users. The common questions were predictable: Phil, Neil and I also took the opportunity to wander round the hall to try and pick up some more sponsors for Debconf next year, and this was very useful. The stand Thanks to all the people that helped, either by turning up on the stand or by organising the .org area. After all these years, it's still fun to turn up and help people find out more about Debian. :-)

Clint Adams: Then their spines cracked and their coffee-stained pages fell out

Yeah? he asked. Similar for you too? Maybe, I replied. Mystery! she exclaimed. Intrigue! It's okay, he said. I'm an open book. I don't expect everyone else to be. Us Livejournal weirdoes are all open books. she observed. True, true, he lied.

Evan Prodromou: 1 Frimaire CCXV

I was sorry to see the announcement by Danny O'Brien of among other things Need To Know that he's been doing poorly. Danny's a stand-up guy of the old school, and although we've never been hugging friends I consider him a pal of some sort. So it's bad to hear that he's Down and Out. I hope that he gets back Up and In, and returns to his m tier of stickin' it to the Man. tags:

Aubanerie Amita June and I took a walk up to the Aubanerie on Mont-Royal to get some winter accessories. Winter in a snowy country means that you have to have a large stock of the little bits of knitted cloth that keep the ambient air from freezing the skin off of your bones: hats, gloves, scarves, woolly socks, ear muffs, long underwear. Our first winter in Montreal, I had like 1 hat, 1 pair of gloves, 1 scarf, etc. I spent maybe 30 minutes a day wandering around the house looking for one or the other of them before going outside. Given that when it's -20C outside, you just can't leave the house without any of these accessories, it was kind of a big waste of time. So now we have a common pool of wintery clothes for the household. 5-6 toques, a few scarves, a vaguely sinister basket of gloves that look like severed hands, a ton of socks, etc. Sometimes I leave the house with two toques -- one in my pocket and one on my head -- Just In Case. The Aubanerie up the street is pretty great for buying cheap-o accessories. They have some stuff at Dollarama and other $1 stores, but they tend to be either really thin, really small, or sold in separate chunks so each item costs only a dollar. The Aub has OK stuff that doesn't look too ridiculous. Amita June is getting to be quite a walker -- we didn't bring the stroller for this trip. She just toddled up the street, and although we stopped and looked at a lot of sticks and pebbles and porches, we made pretty decent time for a 15-month-old and her papa. On the way home I wore a new toque and Amita June had a new pair of mittens linked with string, as if one were the astral projection of the other. Now she's asleep -- shopping is hard work -- and papa gets to work a little more on trying to make Wikiwyg work. tags:

Mon Qu bec While searching for info on the Aubanerie on Google, I stumbled across Wiki Mon Qu bec, a Russian-language wiki about Montreal and Quebec. Fantastic. tags:

Jonathan McDowell: Nominet leftist conspiracy?

What The Register doesn't tell you about the Nominet EGM today is the evil leftist elements that are controlling it. No less than 3 of the 5 board members present are left handed. Muhahahaha. We're taking over the world you know. Plus, it appears that deprived of the school market turkey twizzlers now have a new role being provided by hotels for conferences. And finally, once again, if you're a Nominet member, I hope you bloody voted.

Steve Kemp: You and I should get along so awfully

I spent a good few hours fixing a security problem in the Debian Administration website over the past few days. (A theoretical hole, rather than one being actively exploited. Of course “theoretical” doesn’t mean it wasn’t real!) Now its time for everybody else to test/fix their sites ;) Still behind, although less so than previously. Right now I’m in a happy daze after an amazingly wonderful romantic meal last night - and a fair amount of wine. I like to go eating out at posh restaurants once a month or so. That way it is regular, but still novel enough to be exciting. I guess I’m just a sucker for fancy food and people calling me Sir. (And only rarely adding “… you’re making a scene.”)

Adam Rosi-Kessel: Netflix Should Have Standing Orders

One feature I’d like to see at Netflix: a “standing order” for films that match particular criteria. For example, I would be happy to have Netflix automatically add any Pedro Almodóvar film to my queue as soon as it enters the Netflix universe (Volver looks interesting). I also wouldn’t mind any film rated four stars by Roger Ebert to be dropped into the queue. You could even ask Netflix to add anything that its collaborative filters give a top rating based on your past preferences. Then you would just sit back and be surprised at what arrives for you. Rather than “opt-in,” the system would become “opt-out” — similar to those discount CD clubs that were popular in the 1980’s, where you had to tell them if you didn’t want the pick of the month. (I built the bulk of my CD collection in that era by taking advantage of the occasional “3 for the price 1” deals.) The difference here is that you are actually likely to want the pick of the month. A related feature would be “add all” matching a certain criteria with a single action — for example, all Hitchcock films. This is pretty much how I select films anyway. Knowing that a film is directed by Robert Bresson or Akira Kurosawa (two of my favorite directors) tells me a lot more than a plot synopsis. I’d actually rather know nothing about the film itself in advance.

Next.

Previous.