Search Results: "tar"

10 July 2007

MJ Ray: Cooperatives SW July steering

Yesterday was the July meeting of the Cooperatives SW steering group. As usual, we started with introductions over a snack, including welcoming our new support worker, then reviewed developments on open topics from the last meeting, including production of the new promotional leaflet. We need some good quotes from relevant politicians or prominant local cooperators to finish it up, as well as a bit of data from Cooperatives UK. Other topics included planning for the October 2007 annual meeting, communications (if you want a Cooperatives SW newsletter and meeting details and you don't currently get them, please leave me a comment and I'll put you in touch with them), surveying and maybe an outward-facing event in 2007. We also happily accepted applications from Upstart and Radstock (no website? small pic) to join the steering group. I'm particularly happy to have another workers' cooperative there. Amongst other topics and announcements, there was some troubling feedback about RISE-SW not being talkative about this summer's social enterprise support bids. Does anyone know more about this bid?

Cameron Dale: DebTorrent Release 0.1.2

Today I have released the next version of DebTorrent. It's been over a month since the last release, which means there are lots of new features in this one. This is also the first release that I consider actually useable, as it now listens for HTTP requests from APT for packages to download, and feeds the downloaded packages back to APT. It also includes a backup HTTP downloader that will use a Debian mirror to download packages from, only when no peers can be found that have them. This means your download always works, even if you're an early adopter (which I hope you are) and there aren't that many peers available. Finally, the larger packages have now been split into multiple pieces, which makes downloading them much more efficient. Here's the changelog: I've already started work on the next release, which will include almost no new features, but will be much easier (I hope) to use. It will also be distributed in a .deb binary format for the first time, and (again I hope) be available in the Debian archive. Here are the plans I've come up with for the steps to complete for the next release:
  1. Make a debtorrent daemon script based on btlaunchmany
  2. Make a config file with lots of explanations
  3. Load configuration info from /etc
  4. Save downloads and state to /var/cache
  5. Log all messages to /var/log
  6. Clean up the debug logging, possibly add debug levels
  7. Use bittornado packaging files (debian/)
  8. Add init script
I've never created/packaged a daemon before, so hopefully I haven't made any blunders in those plans.

Steve Kemp: She said she'd teach me 'bout voodoo

So I've been very happy with exaile - the media player - for the past week or so. I think I'm going to switch to it full time. The "random play" is suprisingly random. Despite listening to music 24x7 I'm finding myself hearing new music. I can only conclude that xmms and xmms2 have poor random functionlity .. The bigger issue is the handling of plugins. How do plugins get loaded? Via an external website. You do the pointy-clicky dance with the user-interface, and the system downloads arbitary code from exaile.org, installs it into ~/.exaile/plugins and executes it. Double-plus ungood.
 download_url = "http://www.exaile.org/plugins/plugins.py?version=%s&plugin=%s" \
    % (self.app.get_plugin_location(), file)
  xlmisc.log('Downloading %s from %s' % (file, download_url))
Let us hope they never lose control of that domain, (and never implement automatic plugin updates) otherwise all current users will hit the site, be persuaded there are newer plugins available and be compromised en masse... In other news, even with my planet-searching script, I cannot find the blog entry I wanted to refer people to. It involved people looking pretty and acting miserable. Possibly on buses?

Andreas Barth: Top testing migration blockers

During the recent weeks, we started to hunt and hint large batches of packages together to testing (and this blog is just to show a bit of what is part of the tasks of release team members). This started with a large jasper hint, continued with a very large poppler / texlive / jack / abiword-hint (which moved about 75% of the packages that were ready for testing migration in at the same time), then moved a more recent linux-2.6 version in, and now finally ghc6 / haskell. However, now we reached a point where a few more release teamisch hints don't help anymore: The next large blocker is gcj-4.1 / gccdefaults / ecj. This is now blocked by different bugs on different architecture:

Decklin Foster: YouChoob

Russel notes a discussion of the problems with embedded media. I've been using a Greasemonkey script for a while to linkify EMBED tags for easier non-embedded downloading, but this doesn't help much on Flash sites such as YouTube. I haven t installed Flash in years, but I got sick of slinging URLs around and/or giving up and being the unpopular kid, so I took some other Greasemonkey code I was hacking on and mushed it all together:
http://www.red-bean.com/~decklin/userscripts/unembedtube.user.js
(I get a perverse sort of nostalgia out of bringing back the "puzzle piece" for links, and mocking people with it.) YouTube embeds will appear to work like any other, but the URL is changed from the Flash wrapper to the FLV file, which can be opened in MPlayer/Totem/whatever. Since we can figure out this URL, it is also, of course, possible to make such the link back into an embed usable by mplayer-mozilla or a similar plugin. Unfortunately, I don't have time to look up how to add a configuration menu, but this line of JS does have a certain charm to it:
var evil = 0; // need to make this user-settable
You know what to do. If you want true evil, there are some pointers in the comments. For YouTube videos embedded from other sites, the best I can kludge for now is link to the video's original YouTube page. If someone would like to write a routine to snarf that page with XMLHTTPRequest and yank the necessary arguments out, I would love to add it. (Insert five-page think piece here about the lost dream of MIME and the sad fact that the rise of Web 2.0 has been driven more by the fact that native installation is irreparably broken and pointless anyway on most PCs than it is by the fact that JavaScript actually works now and the implications of this for the Free Software movement especially in light of the fact that we are still human beings who occasionally do social things like sign up for Twitter even though they're running on some proprietary code base.)

MJ Ray: Another comment on itv coverage of the Tour de France

debbie commented:
"I really appreciate finding somewhere that's giving info' on where to find the coverage on t.v. I've just looked through Sky t.v listings and coudn't find a damn thing at 9a.m. on Saturday.........unless I'm blind and stupid. So ITV4 sounds the best, then. I'm not subscribed to the larger SKY packages. It's such an excting time!!!! The Tour De France starting HERE in England!!!!"
I've also linked CTC's listing in the last few days, which is more complete. I'm not subscribed to Sky either and I don't think British Eurosport's coverage was as good as International Eurosport in the past. I would be quite annoyed if I paid for Sky's sports package and still only got such limited coverage when better is available free-to-air. Get a dish, point it at 19 east and enjoy the German, or 5 west and enjoy French. Maybe today, the weather here will be good enough for me to fix my dish. I'm still surprised by itv's bizarre decision not to promote their tour coverage properly and not to put the highlights on itv1. Wouldn't 2 million fans be worth sacrificing a little of their much-hated late-night phone-in game show that currently hogs itv1 after midnight?

MJ Ray: Tour de France in London

I'm back from watching the Tour de France stages in London (actually, I was back yesterday, but was straight out the door to CoopSW - more on that soon). It was pretty damn amazing, with far more than the expected 200,000 spectators on the Saturday alone. We started in Green Park, but it just got silly there - couldn't see a damn thing - so we plodded through to Hyde Park and stood about 10 rows back on the top of a bank where we could see both the course and a big screen. Excellent contest, but Kloeden and Cancellara were disturbingly fast. After a thoroughly surreal overnight stay in a hotel in Canning Town (yes, surreal: I'm sat there eating breakfast and a giant stick figure goes past the window at 30mph - it was damn Champion supermarkets caravan float), I went and stood on the roadside near km0 in Greenwich. Again, an amazing turnout. Every available vantage point was occupied. As well as being between 4 and 6 deep at the barriers, people were hanging from nearby railings, perching on top of stone pillars - and it seems that London bus shelters will support at least 8 people on the roof. I then took the DLR and Jubilee line back to Hyde Park, saw a bit on the big screen and caught the train home. I took tons of photographs, but used the film camera, so I'll wait for them to return from the developers. I'll watch the rest of the race on TV.

Annabelle Tully: Adventures

So the journey of David Noble and I began. (Actually a few days ago I just couldn’t be arsed to write anything before now).
After driving to Cambridge and staying in Norwich for a whole dreadful week, we went back to Cambrige for a couple of nights, where I ended up playing Zelda on the wii for a good 11 hours. On our way to the airport, at 4am, the bus was late due to someone leaving a bag at the busstop, so they ofcourse took this as a bombthreat and closed down the entire road leaving the bus 45 minutes late.
We then arrived at Stansted, which was surprisingly non-hell-like this time as opposed to last time where I was treated as a terrorist for bringing vaseline.
An interesting planeride with paper IRC in the google notebook (Which will never be spoken of again) later, we arrived Stockholm, or, atleast what Ryanair calls Stockholm. It was two hours away from the actual Stockholm so we had to take the bus. I saw the sun for the first time in three weeks and it was the happiest day of my life, until the event that followed..
Our boat tickets for Turku were the only things we hadn’t printed out, so we ofcourse went to the wrong side of the shore in the city. They said they couldn’t find us in the system and assumed it was because our boat wasn’t arriving for another six hours. We locked our bags in the lockers and ran off into the city and had wonderful wonderful sushi and sun.
A few hours later when we returned, about an hour before our boat was to leave, they still could not find us in the system. Upon where we thought ’shit’.
Struggling to get online, we found out our actual boat terminal was on the other side of the city.
We rushed down, and actually DID make it to the boat in time. The boats had sauna ohmygod.
However, Dave had booked us a nightboat with no room or beds, so we had to spend the night on a cold floor. After not sleeping for two days already that is not very pleasent.
We eventually arrived Turku, took the train to Helsinki, and went to Teemus place and passed out on the grass in the sun. This ended in sunburns for my sunintolerant useless norwegian-english skin. Totally worth it though.
The day after we left for the festival Konemetsa with Hanna/Tulitar. The weather was nice uptil the middle of it where a huge rainstorm covered the area. It was literally bucketing down with rain, which resulted in a wild crowd, tons of mud, and us jumping and dancing around in it being very much into the music (I’ve never been so happy to have a shower my entire life once we got home). I can’t believe none of us are sick after that actually, one would think it would result in a heavy cold doing this for three days.
Tomorrow we will head for Copenhagen by plane, followed by train to Amsterdam. New adventures await us!

9 July 2007

Biella Coleman: La Rogativa

Last night I came across an amazing photo of one of my favorite spots in Viejo San Juan, Puerto Rico, La Rogativa. It is one of the *best* spots to sit, at night, after a walk and few drinks, and watch the lights dazzle in front of you till the sun decides to rise. You will not be disappointed, especially during a winter’s night when there just may also be a slight touch of cool breeze to caress your skin. Here is the story of the statue:
A modern bronze statue of the Bishop of San Juan and three torch-bearing women stands in the Plazuela de la Rogativa. A good spot for scenic views, due to is fine location overlooking the bay. The beautiful bronze statue is the work of Lindsay Daen, created in 1971 to mark the old city’s 450th anniversary. Plazuela de la Rogativa (plaza of the procession) features a modern sculpture depicting a procession of religious women and a bishop. It commemorates an event that took place on the site in 1797. During the spring of that year, a fleet of British ships led by under Sir Ralph Ambercrombie sailed into San Juan Bay, meaning to launch an assault on the city and take control of the colony. When the attack was foiled, they undertook a naval blockade of San Juan, hoping to starve the residents into submission. As the town s people began to despair of any help from soldiers garrisoned in the inland towns, the governor ordered a rogativa, or plea, to ask the saints for assistance. The women of the town formed a procession through the streets, carrying torches and ringing bells. The British, hearing the commotion and seeing the moving lights, decided that reinforcements had arrived and quickly sailed off.

Gustavo R. Montesino: Summer of Code mid-term report

I. Introduction

Today, the mid-term evaluations of the Google Summer of Code starts. It means it's a good for a comprehensive summary of what I've done so far.

For those who don't remember, My GSoC project is the Bug Triaging and Forwarding Tool, whose aim is to help triaging of Debian bug reports. On my proposal, I had included the following timeline:

During the proposals evaluations and the community bounding period, it was pointed to me that there's already a lot of good tools to handle bug reports, so I've changed this a bit and already started to work on BTS-Bugzilla interaction, which seems to be the more novel part of the
tool.

The development has been fragmented in three modules: btsutils, bzutils and bug-triage.

II. btsutils

The btstutils is a python module to interact with the Debian Bug Track System. Currently, it can query the bts by bug number, package, source package, maintainer, submitter and usertag. For each bug, it returns bug number, package, summary, status, severity, submitter and tags. Support for returning usertags is under way.

Ths btsutils can use html or soap to access the bug data, and has also a backend-agnostic module wwith tries the best method and, if that fails, tries the other.

Steffano Zacchiroli has offered me to include the btsutils on the debian-bundle, a bundle of python modules for dealing with Debian infrastrcture. I'm very excited by this idea, and believe that if all or at least some of the Debian tools which interact with BTS end using a standardized module for access, this might end up being the major contribution of my GSoC project for the Debian community.

III. bzutils

The bzutils is similar to the bzutils, but is to interact with bugzillas instead. Currently it can do queries based on GNOME's bugzilla boogle and the more generic boolean charts. The later works (at least) on GNOME, KDE and standard bugzilla (i.e., landfill). For each bug, it returns bug id,
product, component, status, resolution, reporter, assignee, summary, priority and severity.

IV. bug-triage

The bug-triage is the Bug triaging and forwarding tool. It's being developed using python, gtk and glade.

Currently, it can query the BTS using any of the btsutils' supported fields (even though the usertags aren't really accessible through the interface yet). It can also launch one of the returned bug reports in a web browser.

Integration with bugzillas is under development. It already has an interface to establish links between Debian packages and upstream bugzilla's address, product and component. The next steps will be to add an upstream button in the toolbar/menu and make it show the bugs selected through these info, allowing the user to mark the bug as forwarded to one of them.

V. The future

After that, I'll work on these features (in no particular order): filling a new upstream bug using the Debian bug data as a starting point, more advanced filtering options to filter the upstream bugs (such as filtering by words in the bug summary, and maybe through backtraces if available) and more ways to manipulate the BTS through the interface.

To be sincere, it seems this project won't be as advanced as I would like on the end of the GSoC. There are some new, unexpected (and good ^_^) things going on my life, which are taking some of the time I expected to dedicate to GSoC, which means I'll likely keep the current pace until the end of the project (I expected to increase it during July). Even so, I believe the
project is going on a good path, and I hope it'll be very useful for the Debian community.

Peter Makholm: On ordering appetizers

Some random perl code I threw together:

use Data::Dumper;
use List::Util (reduce);
@p = (580, 420, 355, 335, 275, 215);
$target = 1505;
$A[0] = [0, [], 0];
foreach $i (1 .. $target)  
    my @tmp;
    foreach $a (@A)  
	next unless defined($a);
        push @tmp, [$a->[0], $a->[1], $i];
        push @tmp, [$a->[0] + $_, [@ $a->[1] , $_], $i] foreach (@p);
     
    @tmp = grep( $_->[0] == $i;  @tmp);
    # ok, prefer the shortes solution for no other reason
    # than 7 times mixed fruit is so boring.
    $A[$i] = reduce   if ($a->[0] == $b->[0])  
                          @ $a->[1]   @ $b->[1]  ? $a : $b
                        else  
                          $a->[0] > $b->[0] ? $a : $b
                       
                      @tmp;
 
print Dumper($A[$target]);
Mixed fruit? You probally have to read this xkcd strip Update: Changing the grep statement from testing for less than or equal to strict equality seems to be about 30 times faster with the same result.

Martín Ferrari: DebConf, travelling, pictures, SoC... Oh my!

I'm still lacking the obligatory post-DebConf7 post... These weeks had been intense... So, first of all, thanks to all the DC-team for another wonderful conference. Next year I'll feel how it's done one of the two things that everybody likes but nobody wants to know how it's done. Hint: not sausages. This is the first time I've also attended DebCamp, and it was very useful. Not that I could do any real work, as very few people are able to do that during DebConf, but I managed to do what I planned, that is talk with many people who are working on debian-cd, debian-installer and custom-cdds. I've already uploaded my pictures to a temporary place, whitout captions, until I decide how I will replace the stinko called gallery. And there you can see that I was one of the few that actually wore a kilt during the event —not a proper Debian kilt, but hey... After DebConf, and after a year of hard work, I took a seven days vacation in the UK. So I was able to know Edinburgh (I prefer to hang out with Debian people that doing tourism during the conference, so I only knew the way to the supermarket). I also went to the Arthur's Seat HIll, which was very beautiful, and was only a 1-hour walk from the hostel to the top. Then I did a small visit to Stirling and concluded that castles in Scotland are not that interesting (but go to the Smith Museum!). Then, I went to London for a couple of days (dang, that was expensive!!), visited Marx's tomb, rided near the car bombs, got to know all the nice stuff that the british stole from around the world in the British Museum (it's really great, and free), and went to Cambridge to spend a day (and punting, I even did the punting myself!). Finally I spent my last day walking around that beatiful city, in the Soho and South Bank areas. I don't want to forget to say thanks to Nattie, Kai and Ben for hosting me, you guys rock!! This last week has been very productive. I was working GSoC project, trying to recover from lateness, and staying until late. It was worth it, I have finished settling down the architecture and overall design, and wrote the main program which will coordinate all the tests to be run. It includes from the begining dependency-based scheduling and paralellism, so I hope it will scale well in SMP computers. I also wrote a draft specification for the plugins and description of the running plan in the wiki page. I've also asked for the creation of a Alioth's project, so I can start publishing the code, and get feedback from the people that will use it.

Martín Ferrari: DebConf, travelling, pictures, SoC... Oh my!

I'm still lacking the obligatory post-DebConf7 post... These weeks had been intense... So, first of all, thanks to all the DC-team for another wonderful conference. Next year I'll feel how it's done one of the two things that everybody likes but nobody wants to know how it's done. Hint: not sausages. This is the first time I've also attended DebCamp, and it was very useful. Not that I could do any real work, as very few people are able to do that during DebConf, but I managed to do what I planned, that is talk with many people who are working on debian-cd, debian-installer and custom-cdds. I've already uploaded my pictures to a temporary place, whitout captions, until I decide how I will replace the stinko called gallery. And there you can see that I was one of the few that actually wore a kilt during the event —not a proper Debian kilt, but hey... After DebConf, and after a year of hard work, I took a seven days vacation in the UK. So I was able to know Edinburgh (I prefer to hang out with Debian people that doing tourism during the conference, so I only knew the way to the supermarket). I also went to the Arthur's Seat HIll, which was very beautiful, and was only a 1-hour walk from the hostel to the top. Then I did a small visit to Stirling and concluded that castles in Scotland are not that interesting (but go to the Smith Museum!). Then, I went to London for a couple of days (dang, that was expensive!!), visited Marx's tomb, rided near the car bombs, got to know all the nice stuff that the british stole from around the world in the British Museum (it's really great, and free), and went to Cambridge to spend a day (and punting, I even did the punting myself!). Finally I spent my last day walking around that beatiful city, in the Soho and South Bank areas. I don't want to forget to say thanks to Nattie, Kai and Ben for hosting me, you guys rock!! This last week has been very productive. I was working GSoC project, trying to recover from lateness, and staying until late. It was worth it, I have finished settling down the architecture and overall design, and wrote the main program which will coordinate all the tests to be run. It includes from the begining dependency-based scheduling and paralellism, so I hope it will scale well in SMP computers. I also wrote a draft specification for the plugins and description of the running plan in the wiki page. I've also asked for the creation of a Alioth's project, so I can start publishing the code, and get feedback from the people that will use it. PS: do MIND THE GAP, please. :-)

Martín Ferrari: DebConf, travelling, pictures, SoC... Oh my!

I'm still lacking the obligatory post-DebConf7 post... These weeks had been intense... So, first of all, thanks to all the DC-team for another wonderful conference. Next year I'll feel how it's done one of the two things that everybody likes but nobody wants to know how it's done. Hint: not sausages. This is the first time I've also attended DebCamp, and it was very useful. Not that I could do any real work, as very few people are able to do that during DebConf, but I managed to do what I planned, that is talk with many people who are working on debian-cd, debian-installer and custom-cdds. I've already uploaded my pictures to a temporary place, whitout captions, until I decide how I will replace the stinko called gallery. And there you can see that I was one of the few that actually wore a kilt during the event —not a proper Debian kilt, but hey... After DebConf, and after a year of hard work, I took a seven days vacation in the UK. So I was able to know Edinburgh (I prefer to hang out with Debian people that doing tourism during the conference, so I only knew the way to the supermarket). I also went to the Arthur's Seat HIll, which was very beautiful, and was only a 1-hour walk from the hostel to the top. Then I did a small visit to Stirling and concluded that castles in Scotland are not that interesting (but go to the Smith Museum!). Then, I went to London for a couple of days (dang, that was expensive!!), visited Marx's tomb, rided near the car bombs, got to know all the nice stuff that the british stole from around the world in the British Museum (it's really great, and free), and went to Cambridge to spend a day (and punting, I even did the punting myself!). Finally I spent my last day walking around that beatiful city, in the Soho and South Bank areas. I don't want to forget to say thanks to Nattie, Kai and Ben for hosting me, you guys rock!! This last week has been very productive. I was working GSoC project, trying to recover from lateness, and staying until late. It was worth it, I have finished settling down the architecture and overall design, and wrote the main program which will coordinate all the tests to be run. It includes from the begining dependency-based scheduling and paralellism, so I hope it will scale well in SMP computers. I also wrote a draft specification for the plugins and description of the running plan in the wiki page. I've also asked for the creation of a Alioth's project, so I can start publishing the code, and get feedback from the people that will use it. PS: do MIND THE GAP, please. :-)

Matthew Palmer: Hell is other people('s code)

I've been working (part-time) on an existing Rails application for the last month or so, getting comfortable with it, modifying some sections to support needed functionality, and beginning an all-out, carpet-bombing "shock and awe" assault on it's test suite. However, a significant portion of the system is (or rather was, since I've already gutted a lot of it) a chunk of rather messy and unpleasant auto-generated code. I've always been a bit iffy about code generation tools, ever since my first encounters with them whilst working on some $DEITY-awful access application years ago. (First encounters with anything Microsoft usually have that effect on me, though). Since then, I've never found any reason to change my mind, and dealing with this particular chunk of auto-generated code has pushed me over the edge into "wild-eyed extremist" territory. Please note that when I say "code generator", I'm talking here about programs or wizards or whatever that create a block of code that you're then expected to tweak to suit your conditions. If it's just a mechanical transformation of an input format to an output format, where a human is never expected to maintain the output by hand, that's not code generation in my book -- that's just a compiler being used for it's intended purpose. I like compilers. I'm fairly sure you do too. Code generators, though? EVIL. Consider what you get out of your generator: A big blob of code in your application that you then have to understand and maintain. It's like you gave a commit bit to some random person who dropped a 5000 line change into your tree and then ran away into the night, cackling. If there's bugs in the generated code (and remember, there's always bugs in software), when they get fixed upstream you're up the creek unless you haven't modified the code at all (and thus can regenerate), or you're willing to apply the necessary patches to your modified version, often by hand. Hand-patching is error-prone, and if you've modified the code at the same place that has to be patched, things can get unpleasant. In the case of the generator I'm dealing with at the moment, I'm not even blessed with it being decent code. It's ugly code, in every possible sense of the word. There's inconsistent formatting, poor commenting, it uses some totally whack coding constructs[1], the hard-coded text strings are ungrammatical, it's got very few (and poorly covering) test cases, the methods are huge and unwieldy, and it's got security bugs (not so hot for something that's supposed to be guarding your application). In short, it looks like some quick-and-dirty internal hack that escaped one night and is now wreaking havoc on the world. There's probably some really good code generators out there. I've been poking around a bit, and there's some written for Rails by people who I know produce good code. However, no matter how good the author of the code generator is, the very best you can hope for is solid, clean code that is the equivalent of some portion of your application having been coded by some member of your team who you (and nobody else) has ever met, who didn't follow your team's coding conventions, and who has never looked at any other part of your application to make sure that everything hung together in a consistent manner. Which you now have to maintain. I've read a lot of books, articles, blog posts, and mailing list messages, and participated in no shortage of "why software sucks" discussions with other programmers, but I've never heard anyone advocate that the way to clean code, minimal bugs, and happy programmers was to drop a big chunk of unknown code right in the middle of things. Before you start charging up the e-mail-delivered tasers, ready to fry my delicate braincells for the twin crimes of Xenocodophobia and a vicious case of Not Invented Here syndrome, though, please understand that I'm not against code reuse in the right place. That right place is a library, component, or other abstract, documented, fairly static, and presumably-replaceable chunk of code. By using a library, you get a relatively simple interface to somebody else's complexity. This is a good thing, for all the reasons that everyone should already be able to recite. Items such as a comprehensible interface, minimal learning curve, and so on. Things you don't get with generated code because, pretty much by definition, the entire chunk of code is you "interface". There are some times, though, when what you want to do can't be done in a library. Either the thing has too many tentacles to be able to easily encapsulate behind an abstracted interface, or you need to modify it's behaviour in too many places to be able to get away with a few simple callbacks to get the job done. Hence, it might be tempting to fire up the code generator to get yourself out of a hole quickly. Don't do it though. Don't succumb to the temptation of saving yourself a little bit of time by firing up a code generator. What you're doing there is just making pain for yourself, by inheriting a big chunk of code that you don't fully understand, probably doesn't solve your problem particularly well, and which you (or whichever poor slob gets the job after you) will have to maintain into perpetuity -- most likely by gradually rewriting large pieces of it so that it fits your application better. The output of a code generator is likely to be the least maintainable code in your tree -- either by virtue of the fact that it's crap code, or at the very least because you just don't understand it. The general principle of good codebase hygiene is that you get rid of unmaintainable code quickly, so it doesn't infect everything else (a la the "broken window theory"). With that in mind, why would you ever consider deliberately introducing a huge chunk of unmaintainable code into your application? The closest I can come to a defence of code generators is something like Rails' scaffolding, where the controller and views for a set of simple CRUD operations on a table are auto-generated. The key word there, though, is scaffolding. It's very name suggests that it's temporary, to be replaced with something more robust and useful as soon as is reasonable. The default scaffolding is ugly as sin, besides, which encourages you to replace it, and -- as of Rails 1.1 (I think), there's a 'scaffold' method which creates the scaffolding output at runtime, so you never, ever need to generate scaffolding code any more. Anyone planning on producing any significant piece of their application through the use of code generators is, in my book, committing a crime against software decency.
1. My favourite whack code construct thus far has been this gem:
 case somevar
   when 17
     do_something_here()
 end
Because, you know, if statements are for people who know how to program, or something.

Evan Prodromou: 19 Messidor CCXV

Busy weekend, and I haven't taken the time to blog over the last few days as I should have. On Thursday and then Friday, Maj, Amita June and Brian and I went down to the Montreal Jazz Festival, which took place last week. It was a great time -- we went and saw some free acts, including some Dixieland, some Latin jazz, and the awesome Klez Dispensers playing klesmer. We also went to the huge playground and crafts centre for children on-site. It had slides, a big moonwalk bouncy-room, tunnels, a sandbox, and a giant piano that kids can step on to play music. They also had cool drawing and crafts projects -- a neat, active addition. The Jazz Fest is a great place to bring little kids. Amita June loved dancing to the music and playing in the playground. tags:

Quebec City Yesterday and today we spent in Quebec City. Brian hadn't been before, and the old, walled city is on the list of UNESCO World Heritage Sites, so we dragged him up there. It was also the Festival d' t de Quebec while we were there, which was pretty fun. We had no idea the festival was happening, so it was a pleasant surprise. Hell, I have a hard time keeping the festivals in our own city straight. We got rooms at the really nice Hotel Ch teau Laurier just outside the walls near the festival site. It was really nice -- modern, sleek, and pretty affordable (we got a big double-queen room for $150). Then we walked around the Upper Old Town in on-again-off-again rain, and watched some of the street performers. There was a troupe of stilt-walkers dressed like stone angels and gargoyles -- an awesome performance that scared the bejeesus out of Amita June. But as they left she said, "Bye bye, monsters," so I guess they weren't all bad. We had dinner at the cozy Moine chanson, a really nice restaurant just outside the walls of the Upper Old City. Quebec's restaurant scene in this are is, well, pretty dreadful -- lots of mass-production restaurants that serve tourists mechanical food from conveyor belts. The Moine was an accidental find, and it was really a godsend -- pleasant, interesting pan-Mediterranean food. I had grilled sardines (memories of Portugal); Brian had a thoughtful paella and Maj had a roasted vegetables with polenta plate. They also had a choice selection of organic wines. I have preconceptions about organics, I admit, but we had a very tasty and complex organic Douro from Portugal last night that set me back in my seat. We walked home through the music festival just as Nickelback was coming on the main stage. Brian wandered a bit, Amita June and Maj and I went to bed. Unfortunately, that wasn't the last time we were up: AJ woke up vomiting in the middle of the night. She only barfed once, and we're not sure what caused it: whether she overate at the restaurant (she packed away a lot of food), or if she got some sausage or chicken in the couple of cupfuls of Brian's paella she ate. Either way, she was a sad toddler and we were freaked-out parents. Having your child get sick while you're traveling is really scary. You start thinking about helicopter rescue. But she was fine after one big purge, and we all slept well until this morning. Maj got up to change Amita's diaper, and we realized we didn't have any. Not in the hotel room, not in the car. I went out from the hotel in increasingly wide spirals looking for a convenience store, but those that had diapers weren't open on a Sunday morning, and those that were open didn't carry diapers. After a couple of hours (!), I came back to the hotel in defeat. Fortunately, Maj managed to find a diaper in the emergency stash in the trunk of the car. We picked up Brian and drove to another part of town, where we got a tasty brunch on the terrasse and found some diapers at the Jean Coutu drugstore. Brian kept going from Quebec City -- he's heading all the way around the Gasp Peninsula to New Brunswick, Nova Scotia and Prince Edward Island, and coming back to Montreal in about a week. Maj and I drove home on the South Shore -- Amita fell asleep as we hit the freeway and woke up when we pulled into the driveway -- and had a nice afternoon at home. tags:

Seafood windfall On Friday, our friend Sebastian called us with a problem: his sister, who lives in the les-de-la-Madeleine, had sent him too much fresh seafood. It had come out of the sea and been driven to Montreal, and there was too much for him and his family to eat. The fish was less than 24 hours out of the water -- could we help him out? So we ended up with two huge bags of succulent lobster meat and three more of scallops. Oh, man, were they good. On Saturday morning before we left for Quebec City I made up two giant lobster omelets for the four of us to share. They had just huge chunks of lobster in them, and it was the most decadent meal I've had in a while. It was so much, we all lay around on the couch moaning for about an hour. Tonight, I cooked up the scallops. They were gigantic, tender, and fresh, so I pan-seared them in butter and olive oil with salt & pepper and prepped garlic and oregano. I know, that seems too much for such a delicate meat, but it worked out great. I put them on a bed of whole-wheat linguine, arugula, and red peppers. They were really, really good. I don't think I'm going to have seafood this good again for a while. Mmmmm. Thanks, Sebastian! tags:

News in brief from the land of the Free Two Freedom news items: tags:

David Moreno Garza: Back

Yeah, we are almost two weeks back now, but until now I can feel we are done with lots of pending issues.

To summarize, I left DebConf on Saturday morning, arrived NYC on the afternoon where Raquel was waiting for me. By Sunday, we had the very nice chance to meet with abrotman, rcox and stew. We stayed at stew and rcox’s place until Tuesday, when we got back. We also had the chance to meet with people that we have been working for remotely. We were walking around in NYC, and suddenly, the 5th avenue became multicolor. It was the gay pride parade. You can take a look at the pics on the gallery, lots of gay people. Our visit to NYC was pretty gayish actually, since we spent our first night in Chelsea, presenced an electronic music festival or similar for lesbians, and the next day, first row on the parade :-)

And that’s it, since we came back until like yesterday, life was a mess; lots of work pending to deliver and many other issues. Finally, we are right now settled up again, enjoying a cold rainy nice weather in Mexico City with very cheap beer (compared with UK pints!) and loved people :-) Thanks to all who made such a wonderful DebConf, even that, in my case, I arrived late and left early, it was just great (thanks also to MJ Ray, specially; and also to all people who was worried about my arrival, you know who you are, thanks). Thanks also to Mike and Rachel who hosted us, they are a very nice couple. And also, thanks to Alex who joined us in NYC, coming from Philadelphia, spent a nice day with us, took us to Chinatown and Little Italy and gave me a Phillies baseball cap (just as exchange of the worldwide famous umbrella hat).

8 July 2007

Mirco Bauer: Hello World, how small can you get?

Today I was checking how much diskspace is need when a small CLI (.NET) application like gfax is installed. The last 2 years I am optimizing the Mono packages in Debian to reduce dependency chains. Dependency chains can cause a small application to become very big (at least it looks that way) when they are installed, as modern Linux distributions automaticly install all required dependencies. So first I worked against GUI dependencies for non-GUI applications, those are annoying for servers, you don't want to install a X server or other GUI libraries when you only serve webpages using ASP.NET.
Splitting CLI 1.0/1.1 vs 2.0 also seemed to be a very good candidate to split apart, as applications usually are target at 1.0/1.1 or 2.0.
Then I split Base-Class-Libraries that have dependencies on native libraries (via P/Invoke), as those packages must depend on those native libraries, like DB drivers.
Last but not least I split debug symbols in a different package, as those are not needed for normal production usage, and embedded systems don't have much diskspace. The mono-dbg package is 28.2MB in size when installed, that's alot.
The Mono source package in Debian is now building 67 binary packages, but thanks to APT nobody has to care for that, every part is installed when needed. So today I was checking the results of it, how much will a small application download and install?
I am testing with a clean minimal Debian system, that way all dependency chains will show up very easily.
Installing GFax + required libraries today takes 43MB to download and 138MB on the harddisk. GFax is a small GNOME application, it uses libraries like: Mono, GTK#, GNOME#, Evolution#, GConf#.
So someone might say: "of course, it is based on that bloaty Mono virtual machine!", well let's check a different application.
What about a GTK# only application (no GNOME) like graphmonkey + required libraries? That will download 19.5MB and uses 56.4MB on the harddisk. That's alot less, isn't it? graphmonkey only uses Mono and GTK#.
So it's not Mono taking all no diskspace? Well after all my packaging optimizations, it's not Mono smile.png
So how big is a install of a minimal Mono runtime + all required libraries then?
Minimal as in enough to run famous the "Hello World".
It's 2.4MB to download and 7MB on the harddisk, yes you read it correctly, the super monster bloaty virtual machine just needs 7MB. Mono only has glib as dependency which will be replaced by the eglib library some day. After I had this great result, I wondered how big other runtimes are.... like.... Java and Python? The results are interesting...
A minimal Python install takes 3.9MB to download and 13.4MB on the harddisk. Yes, that's almost double the size of Mono, I was surprised too.
So and Java? Here it becomes a bit unfair as SUN's license is not allowing to ship parts of a Java runtime. So the Java package in a distribution is one package. 34.5MB to download and 95.2MB on the harddisk. Yes, that's alot, but thats the smallest install you can get when you want to run anything on it. So, if you want to run Hello World on a virtual machine: use Mono! tongue.png just kidding...
Small runtimes are important when it comes to acceptance and adaption of new technologies, as nobody wants to kill all his computer resources for it. And I often hear the replies on Linux IRC channels, when people ask which software they can use to do $task: "No I don't want o install 100MB just for $task" and they decide to try some other software with less dependencies and less resource usage.
Also for the embedded area, resources are very limited, every MB still counts there. For the completeness of my report, here the naked numbers of other available Java runtimes: sablevm 22.0MB (63.2MB), kaffe 52.2MB (118MB), jamvm 28.3MB (65.4MB), cocoa 28.8MB (66.0MB).

7 July 2007

Mike Hommey: Finding where a tarball came from with git

I got the idea reading this question on the webkit-dev list, and from my recollection of the git documentation. Well, for the webkit case, the basic script I put up would be of no help because the tarballs don’t contain all the files (plus, they use subversion, not git, so it would also require a long importing process). Anyways… Considering how SHA-1 hashes of objects are created with git, it is actually pretty easy to generate a SHA-1 hash from a random (non-git) tree, and then, the corresponding commit. First, you have git-hash-object that helps you creating a hash for a particular object (though it’s also trivial to do with sha1sum). For regular files, git-hash-object -t blob $filename is enough. For symbolic links, you have to read the link destination, and give it without a trailing character (be it the NULL character or a carriage return) to git-hash-object -t blob --stdin. For directories, you have to generate a tree “structure” by yourself and pass it to git-hash-object -t tree --stdin. I haven’t bothered looking at other file types. The tree structure can be guessed by either looking at mktree.c or at the output of git-cat-file tree $sha1 where $sha1 is the SHA-1 hash for a tree object. It contains 3 informations for each node in the tree : the file mode, with the same format as what stat() returns, except for some reason, permissions are 000 for directories and symbolic links ; the file name ; and the SHA-1 hash. These informations are written with the following format : file mode in octal ascii and no padding zero (”%o”) followed by a space character, then the filename followed by a NULL character, and the binary form of the SHA-1 hash. Nodes are sorted in a not-so-quite lexical order (take a look at base_name_compare in read-cache.c) and are not separated by any special character: the mode of a file just follows the SHA-1 hash of its predecessor. With all this new knowledge, you should be able to write some code that would return the SHA-1 from an arbitrary directory. Okay, since you must be at least as lazy as I am, you can take the script I wrote. Now, let’s take a look at a real life case : what commit is the latest nightly snapshot for the linux kernel from ? First, download the latest snapshot patch and its baseline, and extract the whole. Then, run my git-hash-tree.pl script with the directory containing the extracted kernel as an argument. It will return, after a while, the SHA-1 hash for the whole tree. During this long process, you also have plenty of time to git clone linus’s tree. Once you’re all done, you can search for the commit corresponding to the tree hash (let’s call it $hash) with the following command :

git-rev-list --all while read h; do git-cat-file commit $h grep -q "^tree $hash" && echo $h && break; done
If you just followed these steps, you should just have spent a great moment having no result at all. There are actually 2 things that prevent this method to properly work with the linux kernel nightlies : Note this is a naive method, because I haven’t dedicated much time going through git documentation and code to find better ways, if there are any. Also note it’s pretty much worthless to do this with the kernel nightly snapshots, since a file containing the SHA-1 hash of the corresponding commit can be found alongside the patch. I guess a similar method could be used with mercurial, though I could not find a documentation detailing what are the hashes calculated from (I’ve not searched a lot, I must say, but for git, it was just before my eyes).

Robert Collins: 7 Jul 2007

Ran into an interesting thing a couple of days ago. It looks like mercurial suffers from a race condition wherein a size-preserving change made within the same second as the last hg command's completion (or possibly the last time hg observed the file) will be ignored by hg. This isn't particularly bad for regular human users (as long as you don't have your editor open while running commands in the background), but its pretty harsh for scripting users - size preserving changes are not *that* uncommon. I'm immensely glad that we don't have this race within bzr (even on FAT filesystems where you only get last-modified to within 2 seconds!)

Next.

Previous.