Search Results: "ardo"

9 May 2010

Robert Collins: Maintainable pyunit test suites

There s a test code maintenance issue I ve been grappling with, and watching others grapple with for a while now. I ve blogged about some infrastructural things related to it before, but now I think its time to talk about the problem itself. The problem shows up as soon as you start writing setUp functions, or custom assertThing functions. And the problem is where do you put this code?
If you have a single TestCase, its easy. But as soon as you have two test classes it becomes more difficult. If you choose either class, the other class cannot use your setUp or assertion code. If you create a base class for your tests and put the code there you end up with a huge base class, and every test paying the total overhead of your test needs, rather than just the overhead needed to test the particular system you want to test. Or with a large and growing list of assertions most of which are irrelevant for most tests.
The reason the choices have to be made is because test code is just code; and all the normal issues there separation of concerns, composition often being better than inheritance, do-one-thing-well all apply to our test code. These issues are exacerbated by pyunit (that is the Python unittest module included with the standard library and extended by various projects)
Lets look some (some) of the concerns involved in a test environment: Test execution, fixture management, outcome decision making. I m using slightly abstract terms here because I don t want to bind the discussion down to an existing implementation. However the down side is that I need to define these terms a little.
Test execution by this I mean the basic machinery of running a single test: the test framework calling into user code and receiving back an outcome with details. E.g. in pyunit your test_method() code is called, success is determined by it returning successfully, and other outcomes by raising specific exceptions. Other languages without exceptions might do this returning an outcome object, or passing some object into the user code to be called by the test.
Fixture management the non trivial code that prepares a situation where you can make assertions. On the small side, creating a few object instances and glueing them together, on the large end, loading data into a database (and creating the database instance at the same time). Isolation issues such as masking out environment variables and creating temp directories are included in this category in my opinion.
Outcome decision making possibly the most obtuse label I ve ever given this, I m referring the process of deciding *what* outcome you wish to have happen. This takes different forms depending on your testing framework. For instance, in Python s doctest:
>>> x
45
provides a specification the test framework calls str(x) and then compares that to the string 45 . In pyunit assertions are typically used:
self.assertEqual(45, x)
Will call 45 == x and if the result is not True, raise an exception indicating a Failure has occured. Unexpected exceptions cause Errors, and in the most recent pyunit, and some extensions, other exceptions can signal that a test should not be run, or should have failed.
So, those are the three concerns that we have when testing; where should each be expressed (in pyunit)? Pragmatically the test execution code is the hardest to separate out: Its partly outside of user control , in that the contract is with the test framework. So lets start by saying that this core facility, which we should very rarely need to change, should be in TestCase.
That leaves fixture management and outcome decision making. Lets tackle decision making if you consider the earlier doctest and assertion examples, I think its fairly clear that there are multiple discrete components at play. Two in particular I d like to highlight are: matching and signalling. In the doctest example the matching is done by string matching the reference object(s) are stringified and compared to an example the test writer provides. In the pyunit example the matching is done by the __eq__ protocol. The signalling in the doctest example is done inside the test framework (so we don t see any evidence of it at all). In the pyunit example the signalling is done by the assertion method calling self.fail(), that being the defined contract for causing a failure. Now for a more complex example: testing a float. In doctest:
>>> %0.3f % x
0.123
In pyunit:
self.assertAlmostEqual(0.123, x, places=3)
This very simple check that a floating point number is effectively 0.123 exposes two problems immediately. The first, in doctest, is that literal string comparisons are extremely limited. A regex or other language would be much more powerful (and there are some extensions to doctest; the point remains though the operator is not enough). The second problem is in pyunit. It is that the contract of assertEqual and assertAlmostEqual are different: you cannot substitute one in where the other was expected without partial function application something that while powerful is not the most obvious thing to reach for, or to read in code. The JUnit folk came up with a nice way to address this: they decoupled /matching/ and /deciding/ with a new assertion called assertThat and a language for matching expressed as classes. The initial matcher library, hamcrest, is pretty ugly in Python; I don t use it because it tries too hard to be english like rather than being honest about being code. (Aside, what would is_() in a python library mean to you? Unless you ve read the hamcrest code, or are not a Python programmer, you ll probably get it wrong. However the concept is totally sound. So, outcome decision making should be done by using a matching language totally seperate from testing, and a small bit of glue for your test framework. In testtools that glue is assertThat , and the matching language is a narrow Matcher contract (in testtools.matchers) which I m going to describe here, in case you cannot or don t want to use the testtools one.
class Matcher:
    def __str__(self):
        "Describe this matcher."""
    def match(self, something):
        """Determine if something is matched.
        :param something: Something to match.
        :return: None if something matched, or a Mismatch object otherwise.
        """
class Mismatch:
    def describe(self):
        """Describe a mismatch that has occured."""
This permits composition and inheritance within your matching code in a pretty clean way. Using == only permits this if you can simultaneously define an __eq__ for your objects that matches with arbitrarily sensitivity (e.g. you might not want to be examining the process_id value for a process a test ran, but do want to check other fields).
Now for fixture management. This one is pretty simple really: stop using setUp (and other similar on-TestCase methods). If you use them, you will end up with a hierarchy like this:
BaseTestCase1
 +TestCase1
 +TestCase2
 +BaseTestCase2
   +TestCase3
   +TestCase4
   +BaseTestCase3
     +TestCase5
     ...
That is, you ll have a tree of base classes, and hanging off them actual test cases. Instead, write on your base TestCase a single glue method e.g.
def useFixture(self, fixture):
      fixture.setUp()
      self.addCleanup(fixture.tearDown)
      return fixture
And then rather than having a setUp function which performs complex operations, define a fixture an object with a setUp and a tearDown method. Use this in tests that need that code::
def test_foo(self):
      server = self.useFixture(NewServerWithUsers())
      self.assertThat(server, HasUser('fred'))
Note that there are some things around that offer this sort of convention already: thats all it is convention. Pick one, and run with it. But please don t use setUp; it was a conflated idea in the first place and is a concrete problem. Something like testresources or testscenarios may fit your needs if it does, great! However they are not the last word they aren t convenient enough to replace just calling a simple helper like I ve presented here.
To conclude, the short story is:
  • use assertThat and have a seperate hierarchy of composable matchers
  • use or create a fixture/resouce framework rather than setUp/tearDown
  • any old TestCase that has the outcomes you want should do at this point (but I love testtools).

26 April 2010

Obey Arthur Liu: Welcome to our 2010 Debian Google Summer of Code students!

I d like to extend a warm welcome to our selected students for the 2010 Debian Google Summer of Code! They should pop up on Debian Planet soon and you re welcome to come talk to them on #debian-soc on irc.debian.org Aptitude Qt by Piotr Galiszewski, mentored by Sune Vuorela Qt GUI for aptitude. Currently, KDE users need to use Aptitude via the console interface, or install the newly developed GTK frontend, which does not fit well into KDE desktop. Making Qt frontend to Aptitude would solve this problem and bring an advanced and fully Debian-compliant graphical package manager to KDE. Content-aware Config Files Upgrading by Krzysztof Tyszecki, mentored by Dominique Dumont When a package deliver configuration files, the problem of merging user data with new configuration instructions will arise during package upgrades on users systems. Sometimes merging can be done with 3 way merge, but this process does not insure that the resulting file is correct or even legal. This project intends to create standards, tools an heuristics to make the scary config file conflict resolution debconf prompt a thing of the past. Debbugs Bug Reporting and Manipulation API by David Wendt Jr., mentored by Bastian Venthur Currently debbugs supports a SOAP interface for querying Debian s Bug Tracking System. Unfortunately this operation is read-only. This project would create an API for debbugs which supports sending and manipulating bug reports, without having to resort to email. This project does not intend to replace email as mean to manipulate the BTS but rather to enhance the BTS to allow other means of bug creation and manipulation. Debian High Performance Computing on Clouds by Dominique Belhachemi, mentored by Steffen Moeller The project paves a way to combine the demands in high performance computing with the dynamics of compute clouds with Debian. Combining the Eucalyptus cloud computing infrastructure with the TORQUE resource manager and preparing the components for dynamically added and removed instances provides the user with a attractive high performance computing environment. Such a system allows users to share resources with large compute centers with minimal changes in their workflow and scripts. Debian-Installer on Neo FreeRunner and Handheld Devices by Thibaut Girka, mentored by Gaudenz Steinlin This project aims to improve the installation experience of Debian on handheld devices by replacing ad-hoc install scripts by a full-blown and adapted Debian-Installer. The Neo FreeRunner is used as it is the most convenient and open device from a development standpoint, but other devices will also be explored. Hurd port and de-Linux-ization of Debian-Installer by J r mie Koenig, mentored by Samuel Thibault The primary means of distributing the Hurd is through Debian GNU/Hurd. However, the installation CDs presently use an ancient, non-native installer. The goal of this project is to port the missing parts of Debian-Installer to Hurd. To achieve this, all problematic Linux-specific code in Debian-Installer will be replaced by less or non-kernel dependent code, paving the way for better support of other non-Linux ports of Debian. Multi-Arch support in APT by David Kalnischkies, mentored by Michael Vogt Hardware like 64bit processors are perfectly able to execute 32bit opcode but until now this potentiality is disregard as the infrastructure tools like dpkg and APT are not able to install and/or solve dependencies across multiple architectures. The project therefore focuses on enabling APT to work out good solutions in a MultiArch aware environments without the need of hacky and partly working biarch packages currently in use. Package Repository Analysis and Migration Automation by Ricardo O Donell, mentored by Neil Williams Emdebian uses a filter to select packages from the main Debian repositories that are considered useful to embedded devices, excluding the majority of packages. The results of processing the filter are automated but maintaining the filter list is manual. This project seeks to automate certain elements of the filtering process to cope with specific conditions. This project will also generalize to more elaborate and intelligent algorithms to improve the transitions of the main Debian archives. Smart Upload Server for FTP Master by Petr Jasek, mentored by Joerg Jaspert Making packages upload smarter, more interactive and painless for uploaders by switching from anonymous FTP and Cron jobs to a robust protocol and modern package checking and processing daemon. This daemon would test early and report early, saving developers time. More details coming soon on http://wiki.debian.org/gsoc Congratulations everyone and have a fruitful summer!

23 April 2010

Jonathan McDowell: Out, damn'd PGP v3

Nearly a year ago people starting worrying about the complexity of SHA-1 being reduced and the potential availability of viable attacks against things such as PGP keys that used SHA-1. Many people (myself included) generated a new key, or updated preferences on keys that were otherwise strong enough. There were worries about what this might mean for Debian. We were getting ahead of ourselves a bit though. Firstly there haven't been any public viable attacks that I'm aware of (though of course this doesn't mean we shouldn't continue to migrate away), but secondly there's a much easier method of attack. PGP v3 keys. To quote RFC4880:

V3 keys are deprecated. They contain three weaknesses. First, it is relatively easy to construct a V3 key that has the same Key ID as any other key because the Key ID is simply the low 64 bits of the public modulus. Secondly, because the fingerprint of a V3 key hashes the key material, but not its length, there is an increased opportunity for fingerprint collisions. Third, there are weaknesses in the MD5 hash algorithm that make developers prefer other algorithms. See below for a fuller discussion of Key IDs and fingerprints.
At the time of writing Debian has 21 remaining v3 keys. This is a significant improvement over a year ago, when we had 200, but it's still 21 more than I'd like. I've been chasing people since last May (starting with those who had v3 + v4 keys, all of whom now only have a v4 key) and we're down to the stragglers. So it's time to name and shame, in the hope of kicking them into action. The following keys are what's left (doesn't match the currently active keyring because we've had a few replacements since the last promote):

0x0D2156BD3D97C149 Michael Stone <mstone>
0x225FD911CD269B31 Carlos Barros <cbf>
0x31E73F14E298966D James R. Van Zandt <jrv>
0x366CD3FEEBC11B01 Chris Waters <xtifr>
0x37A73FE355E8BC4D Frederic Lepied <lepied>
0x3E973117DCC528E9 Ardo van Rangelrooij <ardo>
0x5C7A46637953F711 Rich Sahlender <rsahlen>
0x5D6560F85F30F005 Craig Brozefsky <craig>
0x6B0E322836129171 Jim Westveer <jwest>
0x723724B4A5B6DD31 Christian Meder <meder>
0x7629B22ED71DAABD Adrian Bridgett <bridgett>
0x8FFC405EFD5A67CD Adam Di Carlo <aph>
0xB0D269DE17F3D4D1 Matthew Vernon <matthew>
0xBC151FC8D2A913A1 Peter S Galbraith <psg>
0xC1A0A171C2DCD3B1 Jim Mintha <jmintha>
0xC3168EBA23F5ADDB Ian Jackson <iwj>
0xCE951B1160D74C7D Patrick Cole <ltd>
0xE82A8B0D57137FE5 Paul Seelig <pseelig>
0xF20E242CE77AC835 Brian White <bcwhite>
0xFBAA570C3087194D Alan Bain <afrb2>
0xFFD1B4AC7C19FD19 David Engel <david>

Of these keys only 2 voted in the recent DPL election. 8 have failed to make any response to my mails (3 since last August). Only 9 have uploaded a package since August 2008. And 10 were already known to the MIA database. Some of them have stated they'll sort out a new key, but not yet done so.

If you are one of these people, please either get a new key sorted and signed and reply to the mails I've sent you, or reply and say you no longer wish to be involved in Debian. And if you know any of these people, encourage them to get a new key sorted and offer to sign it for them.

1 April 2010

Asheesh Laroia: Cosmetic Carbon Copy on Slashdot

Two months ago, I explained how cosmetic carbon copy could allow you to list recipients in a message who never receive a copy. Today, thanks to John Stumpo's writing talent and Wes Filardo's IETF-NG, an Internet-Draft informational document has been published. IETF didn't like it enough to accept it as an April 1 RFC. (I do actually hope that one day someone will submit a modified version to IETF as a rest-of-the-year RFC.) Slashdot took note! In first visible comment, an Anonymous Coward writes:
Although it is an April Fool's...this would actually be useful.
Other highlights from the Slashdot discussion:

13 March 2010

Biella Coleman: Stuff I have been enjoying (a freaken lot)

So in the last week I have read some stuff, seen some presentations, and visited some sites that I have really loved, so here they are to share: Trollcats (this will take my power point slides to a whole NEW level) and here is one for all the free software geeks, in particular. I finally read Manuela Carneiro da Cunha fantastic Prickly Paradigm press book Culture and Culture: Traditional Knowledge and Intellectual Rights. If you don t know jack about the thorny issues around indigenous knowledge an IPR, the first 2/3 provides a pretty darn good introduction rooted not only in an explanation of trade treaties, the limited repertoire available for indigenous groups to politically respond, but a great story about a specific frog that secretes a sticky film that basically F s you up (if you let it seep in your open wounds). It is entertaining. The last 1/3 takes a far more theoretical turn and will be harder to understand for novices (it helps if you have like at least a BA, possibly MA in anthro, best if you have a PhD from her academic home, U of Chicago). It is there where she discusses the relationship between culture as reflexive (hey, peoples of the world, we have x, y, c culture) as lived unreflexively (the unconscious plane of norms that helps guide perception and action). I loved her theoretical somersaults whereby she explained how contradictions between the two are experienced as anything but a contradiction. Ok so today I went to this conference Radars and Fences III (where I presented my anon/scientology talk for the first time 3 years ago!). I was not able to stay the whole day but I saw Ricardo Dominguez & Amy Sara Carroll from the Electronic Disturbance Theater present on the Transborder Immigrant Tool, which I knew about but did not know how infused it was in poetry, poetry that is, in fact, an integral part of its arsenal. Their presentation was fantastic and it reminds me the great political work being done at the interface of art and technology (and believe me, these 2 are rabble rousers. UCSD, who helped fund the project, are not all that happy they did and they also get not hate mail they get but the HATE mail). Then I saw Laila El Haddad & Mushon Zer-Aviv present on an amazing project You are Not Here which is a bit hard to explain briefly but I will try (and their site introduces it as an urban tourism mash-up. It takes place in the streets of one city and invites participants to become meta-tourists of another city. So basically there are two interlinked sites (NYC and Baghdad and Tel Aviv and Gaza) where you can be a tourist (though the physical place to follow the symbols are only in NYC and Tel Aviv). You need a map. You get a map. The map, once put up to the light shows two cities/places with symbols that indicate a special spot on the map. You find the physical spot, there is sticker or other sign with a phone number, you call, and you hear a story not about NYC or Tel Aviv (where you would physically go) but about Baghdad or Gaza and a story that pertains to the area of the map that overlaps where you are in NYC or Tel Aviv. We saw a bunch of examples and they were riveting and powerful.

Biella Coleman: Stuff I have been enjoying (a freaken lot)

So in the last week I have read some stuff, seen some presentations, and visited some sites that I have really loved, so here they are to share: Trollcats (this will take my power point slides to a whole NEW level) and here is one for all the free software geeks, in particular. I finally read Manuela Carneiro da Cunha fantastic Prickly Paradigm press book Culture and Culture: Traditional Knowledge and Intellectual Rights. If you don t know jack about the thorny issues around indigenous knowledge an IPR, the first 2/3 provides a pretty darn good introduction rooted not only in an explanation of trade treaties, the limited repertoire available for indigenous groups to politically respond, but a great story about a specific frog that secretes a sticky film that basically F s you up (if you let it seep in your open wounds). It is entertaining. The last 1/3 takes a far more theoretical turn and will be harder to understand for novices (it helps if you have like at least a BA, possibly MA in anthro, best if you have a PhD from her academic home, U of Chicago). It is there where she discusses the relationship between culture as reflexive (hey, peoples of the world, we have x, y, c culture) as lived unreflexively (the unconscious plane of norms that helps guide perception and action). I loved her theoretical somersaults whereby she explained how contradictions between the two are experienced as anything but a contradiction. Ok so today I went to this conference Radars and Fences III (where I presented my anon/scientology talk for the first time 3 years ago!). I was not able to stay the whole day but I saw Ricardo Dominguez & Amy Sara Carroll from the Electronic Disturbance Theater present on the Transborder Immigrant Tool, which I knew about but did not know how infused it was in poetry, poetry that is, in fact, an integral part of its arsenal. Their presentation was fantastic and it reminds me the great political work being done at the interface of art and technology (and believe me, these 2 are rabble rousers. UCSD, who helped fund the project, are not all that happy they did and they also get not hate mail they get but the HATE mail). Then I saw Laila El Haddad & Mushon Zer-Aviv present on an amazing project You are Not Here which is a bit hard to explain briefly but I will try (and their site introduces it as an urban tourism mash-up. It takes place in the streets of one city and invites participants to become meta-tourists of another city. So basically there are two interlinked sites (NYC and Baghdad and Tel Aviv and Gaza) where you can be a tourist (though the physical place to follow the symbols are only in NYC and Tel Aviv). You need a map. You get a map. The map, once put up to the light shows two cities/places with symbols that indicate a special spot on the map. You find the physical spot, there is sticker or other sign with a phone number, you call, and you hear a story not about NYC or Tel Aviv (where you would physically go) but about Baghdad or Gaza and a story that pertains to the area of the map that overlaps where you are in NYC or Tel Aviv. We saw a bunch of examples and they were riveting and powerful.

7 March 2010

Gunnar Wolf: Authoral rights in the editorial world seminar

I must confess I don't remember who I got this invitation from. Anyway, if you are in the right geographic area, you might be interested. I will try to participate: This is a year-long seminar that will be held the second Thursday every month at Fonoteca Nacional (a place I have wanted to visit for a long time!), in Barrio de Santa Catarina, Coyoac n. Among the organizers they have Creative Commons Mexico. Free entrance (but limited space - so they ask interested people to confirm their presence by mail to bvallarta@conaculta.gob.mx). [update] I went with Pooka to the first session. We arrived almost 1hr late (due to me mistaking the schedule :-/ ) but it was interesting. Of course, quite biased towards the Google viewpoints, but interesting. We got the program for the next sessions So, mostly for myself to keep handy, here it goes:
Date Title Speakers
2010-03-11 Google and copyright Manuel Tamez, Hugo Contreras, Mar a Fernanda Mendoza
2010-04-08 Generalities about rights on intelectual property Jes s Parets, Guillermo Sol rzano, Jorge Mier y Concha
2010-05-13 Copyright's nature and competent authorites Carmen Arteaga, Luis Schmidt, C sar Callejas
2010-06-10 Moral and patrimonial rights Guillermo Pous, Eduardo de la Parra, Ram n Ob n
2010-07-08 Reproduction rights for audible material lvaro Hegewisch, scar Javier Solorio, Marco Antonio Morales, Jos Ram n C rdeno
2010-08-12 Licenses and patrimonial right transmission. Works for hire, works done under laboral relationship, or carried out in official service Dolores Franco, Jes s Mej a, Ra l Pastor
2010-09-09 Limits to explotation rights and literary plagiarism Carmen Arteaga, Juan Ram n Ob n, Jorge Mier y Concha, C sar Callejas
2010-10-14 Copyright in a digital setting Jes s Parets, Gast n Esquivel
2010-11-11 Law-regulated intelectual property rights Rosalba Elizalde, Salvador Ortega, Gast n Esquivel, Manrique Moheno
2010-12-09 International protection and collective gestive societies Horacio Rangel, Luis Schmidt, Jes s Mej a

1 March 2010

Diego Escalante Urrelo: GNOMEs in Chile

Update March 1st, 24 UTC: Reynaldo Verdejo is ok, the list is complete! Update March 1st, 16 UTC: Alejandro Vald s, Fabi n Arias, Carlos R os Vera and Germ n P o-Caama o have been in contact with others in Chile. :) Probably by now some of you know or are worried about the situation in Chile. I m not chilean nor in Chile but I ve been following closely due to the considerable number of good friends I have there, most of them related to GNOME.
From The Big Picture (AP Photo/Roberto Candia) Juan Carlos Inostroza (blog down) suggested I publish the list of GNOME/Free Software people in Chile that has reported since the earthquake and are fine, here it goes: Known, found and good: Not know, nor found, we presume good but without cellphones: If you have been in contact with any of them, leave a comment, send a DM in twitter (@diegoe) and etc. List is not complete, I probably forgot someone, please remind me. Will update if I get news from anyone.

11 February 2010

Joachim Breitner: Diploma Thesis Finished

Earlier today, I went to a local copy shop and had my diploma thesis printed. This afternoon, I will hand it in. The title is Loop subgroups of Fr and the images of their stabilizer subgroups in GLr( ) and discusses a group-theoretical result. I assume that very few readers care about the content of the thesis, but maybe some are interested in a few assorted LaTeX hints. I m also publishing the full TeX source code, maybe someone can make use of it. Less chatty varioref I m using the varioref package, in conjunction with the cleveref package. This provides a command \vref fig:S3S4l which will expand to, for example, to Figure 1 on page 11 . But if the referenced figure is actually on the current page, the next page, the previous page or the facing page (in two-side layouts), it will say so: Figure 1 on this page. This is very nice, but I assume that the reader of my thesis is able to find Figure 1 when it is visible, i.e. on the current or facing page. One can remove the referencing texts with the commands \def\reftextfaceafter , \def\reftextfacebefore and \def\reftextcurrent . But because varioref puts a space between Figure 1 and this text, we will get a superfluous space even before punctuation. The remedy is the command \unskip, which removes this space again. So I use in my preamble:
\def\reftextfaceafter  \unskip %
\def\reftextfacebefore \unskip %
\def\reftextcurrent    \unskip %
Palatino and extra leading I chose the Palatino font for my thesis, using the mathpazo package. Various sources (such as the KOMA-Script manual) suggest to use 5% extra leading:
\linespread 1.05 
Counting figures independently from chapters I don t have too many figures and tables in my thesis, and I want them to be numbered simple 1, 2, ... By default, LaTeX would say 1.1, 1.2, 2.1, ... This can be fixed using the remreset package and these commands:
\makeatletter
\@removefromreset figure chapter 
\renewcommand \thefigure \arabic figure 
\@removefromreset table chapter 
\renewcommand \thetable \arabic table 
\makeatother
No widows and club lines LaTeX already avoids these, but I wanted to get rid of them completely. This can be done with:
% Disable single lines at the start of a paragraph (Schusterjungen)
\clubpenalty = 10000
% Disable single lines at the end of a paragraph (Hurenkinder)
\widowpenalty = 10000 \displaywidowpenalty = 1000
Struck table lines I had to typeset tables with some lines struck, and I could not find a ready command for that. I used the following definition, based on the code for \hline. Note that it probably does not adjust well to other font sizes and needs to be adjusted manually:
\makeatletter
\def\stline %
  \noalign \vskip-.7em\vskip-\arrayrulewidth\hrule \@height \arrayrulewidth\vskip.7em 
\makeatother
Title page in one-sided layout According to the KOMA manual, the title page as set by LaTeX is not meant to be the cover of a publication, and therefore has to be set with the margins of a right page i.e. a larger right margin and a smaller left margin. But when printing cheaply, one often just put a transparent sheet on top of the print, so the title page is the cover. You can convince KOMA that you are right by using
\KOMAoptions twoside=false 
\begin titlepage 
...
\end titlepage 
\KOMAoptions twoside=true 
Not flushing the page for chapter heads LaTeX would put the list of algorithms on a new right page. I found this a waste of paper for my few algorithms, and preferred to put the list right after the table of contents. You can override the LaTeX behavior using:
\tableofcontents
 
\let\cleardoublepage\relax  % book
\let\clearpage\relax  % report
\let\chapter\section
\listofalgorithms
 
This code also reduces the size of the heading to that of a section. The same trick also works with \chapter. Math in headings vs. PDF bookmarks LaTeX with the hyperref package creates nice PDF bookmarks from your chapter and section titles. Unfortunately, PDF bookmark names can only be plain strings, while the titles in the document might contain some math symbols. You can make both happy with \texorpdfstring:
\section Stabilizer subgroups in \texorpdfstring $\GL_r(\Z/2\Z)$ GL\_r(Z/2Z) 
Setting lines for the signature The diploma thesis contains a small note which I have to sign, saying that I created it on my own etc. Below that, I put two labeled lines for date and signature, using the tabbing environment:
\begin tabbing 
\rule 4cm .4pt \hspace 1cm  \= \rule 7cm .4pt  \\
Ort, Datum \> Unterschrift
\end tabbing 

3 February 2010

Pablo Lorenzzoni: Swiss Tournament in Ruby

Being a chess player (not a very good one), I ve always been intrigued by Swiss Tournaments. They are so practical, and ensure that even a lowsy player like myself, can play the same number of rounds as any other player. That s being inclusive! I ve played some knock-out tournaments (to me it meant being kicked off in the second or third round), and, given their nature, not-so-good players tend not to attend these tournaments (since their fun will, almost surely, end before long). Well, to solve a very similar problem, but not in any game championship, a co-worker suggested we could use a Swiss Tournament system. I liked the idea, but not being sure it could really solve the problem, I had to quickly implement something to test our data with so Ruby to the rescue! In no time we were up and running, and apart from minor issues that were being fixed along the way, I guess it s a pretty good implementation. You can checkout the code to get a feel of it. Of course, it doesn t follow any rules from any Chess or Go association (Wikipedia, after all, was my guide here), but it serves our goal. Being a proof-of-concept code, feel free to improve it (just tell me about it, will you?).

2 February 2010

Marco T&uacute;lio Gontijo e Silva: Hi Debian Planet!


Hi Debian Planet! Finally I became a Debian Developer on saturday. Some time after that I sent my first e-mail @debian.org, and today I uploaded my first package: haskell-qio, a sponsored upload for Iain Lane. I d like to thanks everyone that have helped me in the process:
  • Joachim Breitner: for being my sponsor, telling me to look into NM, advocating me in NM and DM, helping me with packaging and other things.
  • Gustavo Noronha: for advocating me in DM, helping me with packaging and agreeing that packaging is not an easy to learn task.
  • Enrico Zini: for being a very nice to work with and helpful AM.
  • Marcelo Vieira: for the chats about the process, which made it pass faster.
  • Ian Costa de Andrade: for not complaining too much about me spending the whole day in the computer, and for all support and encouragement.
  • Marina Gontijo Andrade: for existing.
  • Wagner Meira and Fernando Pereira: for allowing me to work on Debian and giving me a scholarship for it.
  • Thadeu Cascardo and Samuel Vale: for giving me a Debian-related job which made me study about the system.
I m absolutely sure I m forgetting about someone, but I m also sure I ll never remember everyone and I ll always have this sensation. Being a Debian Developer is something I wanted for a long time, and I m very happy to have made it now. Currently I m working mostly in the Debian Haskell Group. These days I m checking if it s possible to make ghci be built in all architectures, and trying to make the newer versions of ghc6, from sid (6.10.4-1) and experimental (6.12.1-4), build in ia64, hurd-i386 and m68k. Any help is welcome. By the way, while I was reading the instructions to migrate some things to the new account, I ve not paid very much attention that I should only change the submitter of the unarchived e-mail, and I made a script, which I posted on the wiki, to change it for all the bugs. Neil Williams commented that this was not necessary, and Sandro Tosi pointed that I could have done this using only one mail to do all commands. Yves-Alexis Perez said that even with the unarchived bug this may not be a good idea, because of the generated noise. So I update the script in the wiki, following these tips, thanks for them. Special thanks for Jimmy Klapowitz, who was nice and supportive in a moment people were not being very nice to me. Sorry for the maintainers that received a lot of e-mails because of this, specially to the people who sign the pkg-haskell-maintainers mailling list, which received the biggest ammount of mail.

13 January 2010

Pablo Lorenzzoni: Real Life: Programming is about logic and simplicity

Why is it so hard for non-programmers to understand mutex locks? No I am not asking non-programmers to understand programming at all. But concepts that we use in programming that came from real-life in the first place? Come on Programmers learned from real-life, not the other way around! Let me explain: at the hospital, after a not so clever renovation, we ended up with an employee restroom that is far from work place (in fact, almost in another department). Most of the times it is occupied So it takes a trip to the restroom just to learn that it cannot be used at that moment! In a busy morning, one of those trips is just what one can do! As a programmer I suggested a mutex lock: change the restroom door lock and make only one copy of the key, that should be kept in a common place and returned after being used. If you want to use the restroom and it s occupied, just learning the key is not there is enough to save a useless trip. Come on that is not a hard concept! As I said, we, programmers, learned it from real-life, in settings just as the one I described above! Well, I just got the key ( acquired the lock , in programmer speech) and went to the restroom. When I unlocked the door I was surprised by someone already using it! How embarassing! Someone had the smart idea of making a copy of the key! What part of the mutex concept did people not understand? Luckily, most computational mutex algorithms prevent lock cloning ... :-)

11 January 2010

Riccardo Setti: news about me

It's a long time that i think to resign from Debian/Ubuntu. In fact i stopped the active development years ago.
I kept on following people and development in general, but i dind't produce anything new/cool.

The strange thing is that everytime i changed work one of my primary assigment was port all custom
software needed at installation time from stupid_install.script to common useful debian package.

I don't even know why i never fill an ITP, and/or find someone who want care about $package and give
my work to him (or maybe share it in a public place). i'm definetly lazy.

This time was the same. Changed job in october and (as said before) i had to create some
custom debian package.

So now that the Cascaad is out i can give away some of my debian related work.

If you care about:
solr
activemq
mcollective
mule
feel free to contanct me at giskard _ at _ debian.org OR giskard _at_ ubuntu.com .
i will be happy to give to you my debian/ and discuss where you can improve the package.

16 December 2009

Pablo Lorenzzoni: Debian-RS and Vincent Danjean

The day before yesterday I learned that a fellow Debian Developer was visiting Porto Alegre Federal University to do some work on Parallel Computing: Vincent Danjean. People from local user group organized a last minute get-together at Cavanhas (that served as last meeting of the year) and we had the most pleasant time. Guaraldo registered the moment with his cellphone camera: Vincent is flying back to France today or tomorrow. Hope he had a great time in Porto Alegre and have a safe trip back home.

Pablo Lorenzzoni: Debian-RS and Vicent Danjean

The day before yesterday I learned that a fellow Debian Developer was visiting Porto Alegre Federal University to do some work on Parallel Computing: Vincent Danjean. People from local user group organized a last minute get-together at Cavanhas (that served as last meeting of the year) and we had the most pleasant time. Guaraldo registered the moment with his cellphone camera: Vincent is flying back to France today or tomorrow. Hope he had a great time in Porto Alegre and have a safe trip back home.

20 November 2009

Gunnar Wolf: EDUSOL almost over - Some highlights

Whew! Is it karma or what? What makes me get involved in two horribly complex, two-week-long conferences, year after year? Of course, both (DebConf and EDUSOL) are great fun to be part of, and both have greatly influenced both my skills and interests. Anyway, this is the fifth year we hold EDUSOL. Tomorrow we will bring the two weeks of activities to an end, hold the last two videoconferences, and finally declare it a done deal. I must anticipate the facts and call it a success, as it clearly will be recognized as such. One of the most visible although we insist, not the core activities of the Encounter are the videoconferences. They are certainly among the most complex. And the videoconferences' value is greatly enhanced because, even if they are naturally a synchronous activity (it takes place at a given point in time), they live on after they are held: I do my best effort to publish them as soon as possible (less than one day off), and they are posted to their node, from where comments can continue. This was the reason, i.e., why we decided to move at the last minute tomorrow's conference: Due to a misunderstanding, Beatriz Busaniche (a good friend of ours and a very reknown Argentinian Free Software promotor, from Via Libre) thought her talk would be held today, and we had programmed her for tomorrow. No worries - We held it today, and it is already online for whoever wants to take part :-) So, I don't want to hold this any longer (I will link to the two conferences that I'm still missing from this same entry). Here is the list of (and links to) videoconferences we have held.
Tuesday 2009-11-17
Wednesday 2009-11-18
Thursday 2009-11-19
Friday 2009-11-20
As two last notes: Regarding the IRC interaction photos I recently talked about, we did a very kewl thing: Take over 2000 consecutive photos and put them together on a stack. Flip them one at a time. What do you get? But of course A very fun to view and interesting interaction video! We have to hand-update it and it is a bit old right now, but nevertheless, it is very interesting as it is. Finally... I must publicly say I can be quite an asshole. And yes, I know I talked this over privately with the affected people and they hold no grudge against me... But still - yesterday we had an IRC talk about NING Latin American Moodlers, by Luc a Osuna (Venezuela) and Maryel Mendiola (Mexico). One of the points they raised was they were working towards (and promoting) a Moodle certification. And... Yes, I recognize I cannot hear the mention of the certification word without jumping and saying certifications are overrated. Well, but being tired, and not being really thoughtful... I should have known where to stop, where it was enough of a point made. I ended up making Maryel and Luc a feel attacked during their own presentation, and that should have never happened. A public and heartfelt apology to them :-(

17 November 2009

Pablo Lorenzzoni: Looking for a new programming language to learn

I know it has been a long time since my last post. I am sorry about that, but life has it s complications every now and then (as you know)... Well, on to the article. Recently I had to reimplement in C a prefork server I wrote in Ruby for an internal project at Propus. Not that the Ruby version wasn t enough (after all, although being in Ruby, I was using Unix plumbing, much in the fashion Ryan tell us about in the now famous I like Unicorn because it s Unix article)... The problem is that, in one of our clients, the only version available for Ruby was 1.8.1. Yeah I know But we were not allowed to upgrade and, although it didn t seem at first, the same server presented a nasty memory leak in 1.8.1 that was not present in 1.8.7 and 1.9.1. I still don t know where the problem is I suspect some of the C-to-Ruby glues around TCP sockets might be blamed, but after a couple of days trying to figure it out, I decided it was easier just to reimplement it using C. It actually took less than a day to get the C version going nothing fancy and, apart from memory footprint, just the same functionality and about the same speed of the Ruby version. But it was enough to remind me I really don t like all the scaffolding one has to raise in order to make something useful in C. It s not just a matter of SLOC (of course, C version was more than 3 times longer than Ruby one)... I am talking about all the manual memory management, pointer operations and the disgusting experience of dealing with strings in C. I know some people are addicted to that sort of thing like heroin, but to me it just slows development. This experience made me think about learning a second compiled programming language. I do some Perl, a lot of Python and (of course) most of my work in Ruby, but those are all interpreted languages. For compiled languages I always resorted to C So I am officially looking for a language to learn. So far, the best candidates are OCaml (I got a little excited about JoCaml a few months ago, now I might get serious about it), Haskell, Lisp, Objective-C, Ada, and Vala. Of these, I ve been reading a lot about OCaml It seems a fine and expressive language, with decent foundations, object-oriented extension, broad standard library and (with JoCaml) concurrency Also it might give me the proper excuse to finally wrap my mind around a functional language! People keep me pointing to Java and Erlang Well for using Java I would much prefer using JRuby. Erlang, ITOH, has a weird syntax (at least to me) and it seems much of what makes it great will, eventually, be part of Ruby (or already is using libraries) either that or I ll just wait for Reia to be ready. Besides, neither can be compiled to native code (ok, that argument can be stretched both ways, so just ignore it). So, what do you think? Any advice?

28 October 2009

Eduardo Marcel Macan: Latinoware: A minha menina (fontes)

A palestra sobre produ o musical com software livre no latinoware 2009 foi um sucesso. Muita gente pediu pra ter a musiquinha que produzimos para ilustrar a palestra, e que <noindex>Cesar Brod</noindex> cantou com tanta desenvoltura :) Ent o aqui segue o arquivo de projeto da m sica A minha menina que foi escolhida em homenagem a <noindex>minha namorada</noindex> e porque Brod queria algo MPB. Eu precisava de algo que pudesse vagamente se tornar parecido com Technopop/Electro. A m sica foi editada com <noindex>LMMS</noindex> (Linux MultiMedia Studio) 0.3.2 e poder ser carregada em qualquer vers o igual ou superior, pois foi feita exclusivamente com plugins e samples padr o da distribui o do LMMS. Apesar do nome, o LMMS est dispon vel para windows tamb m. O que voc est esperando? <noindex>Baixe daqui o LMMS</noindex> e o arquivo original da m sica daqui. P.S: A prop sito, a m sica n o foi masterizada e os volumes est o ajustados segundo os par metros do meu laptop, fone de ouvido e da sala l do latinoware. Brinque com os volumes de cada trilha para ajust -la a seu equipamento.

22 October 2009

Ingo Juergensmann: Panorama-Foto von Akureyri

When I went on my business trip with AIDAaura during second half of July, I took our Nikon D90 with me and made some pictures. Well, in total I made 24 GB of pictures (JPEG+RAW) and some of these GBs of pictures were taken with the background in mind to make a nice panorama picture out of them with Hugin. Usually I selected the necessary data points for blending by hand. Of course this is an ardous work, especially when you heard from another guy that this can be done automatically. But in Debian this function doesn't work out of the box because the autopano-sift-c package, which is contains the needed program, is not part of the distribution because of some US patents.

Luckily there is an package on http://www.debian-multimedia.org that solves this problem. Generating panorama views is becoming easy with Hugin after I installed that package. And as a first result I made a panorama view of Akureyri, Iceland:

Panorama of Akureyri


The panorama consist of 10 photos with 4288px x 2848px, giving a total panorama view of 11517px x 2497px (34 MB).

16 October 2009

Gunnar Wolf: Getting closer to the fifth EDUSOL Encounter

This is the fifth year we hold an EDUSOL, and we are closing in on it. EDUSOL is an online encounter whose topics are Education and Free Software Actually, this year we are widening our scope, and we will include Free Culture as well as a base area. Now, besides those three general areas, each year we have had a base topic around which we invite the speakers to talk about (although it is a lax requirement). This year, the base topic is social networks No, not in the Twitter/Facebook/blah sense, but as a wider phenomenon, studying interaction between people, the forming of communities. And for our particular areas, the forming of knowledge-based communities. Anyway I agreed with the organizers to provide the English translation of the participation invitation. I will skip the call for papers, as we are basically at the proposal deadline (October 17), but if you have anything you want to propose, please tell us so! Leaving that aside... Please excuse the quality of my translation, it is late and I'm tired. We will work on it :) Videoconference reception EDUSOL spans several participation categories. The closest category to a traditional, face to face conference. Each year, we invite a group of speakers to talk about a topic related to our main discoursive line. Among the speakers that have confirmed so far, we have: We invite you to be active participants in the videoconference cycle. You can invite your social or user group to be part of the Encounter. There are three ways to do it:
  1. Using the videoconference facilities in your University network
  2. Connecting from a personal computer with broadband access, by using Ekiga or any other H.323 client
  3. Following the .ogg stream and participating back via IRC
In any case (specially in the first two, which require more coordination), please contact us. For further information, visit http://edusol.info/es/e2009/convocatorias/videoconfrencias November 6: Free Education and Free Culture day We invite social and user groups to host talks regarding Free Education and Free Culture. This is not a call to promote Free Software, as there are many other spaces devoted to it. We should start with the idea that freedom resides in us, not in the software. Some of the topics our community recommends are: Further details at http://edusol.info/es/e2009/convocatorias/dialternativo We need some help in this area to generate contents with slides, making it easier for proposed scripts for the talks. If you want to collaborate, please write to our academic support list, http://lists.edusol.info/listinfo.cgi/soporte-academico-edusol.info Want to collaborate? Further questions or comments? We are holding on-line meetings for this group of topics on Thursday 22:00 GMT-5, in the #edusol channel in OFTC (irc.debian.org); you can enter the IRC channel using the Web client at http://irc.bine.org.mx or http://edusol.info/irc About EDUSOL EDUSOL started as a proposal seeking to provide a space so that people interested in education could discuss and analize the good and bad points about Free Culture and Free Software, with no geographic restrictions. Year after year, freedom-loving educators of all Latin America and Spain gather for our annual party. EDUSOL's core language is Spanish, although participation in English is allowed and encouraged (although understanding Spanish will be a strong aid). We invite you to participate and contribute in this collective effort using and commenting on our blogs, or adding your personal blog to our planet: http://edusol.info/es/node/add/blog
http://edusol.info/es/node/add/feedapi-node You can follow us by identi.ca or RSS: http://identi.ca/group/edusol
http://edusol.info/rss.xml

Next.

Previous.