Search Results: "pm"

21 October 2005

Isaac Clerencia: XOrg 6.9RC1, trying Composite again

XOrg 6.9 RC1 was released some days ago, and yesterday David Nusinow uploaded it to Debian experimental. XOrg 6.9 RC1 features EXA, a new 2d acceleration architecture for X11, developed by Trolltech KDE hacker Zack Rusin, that should improve Composite performance a lot. I tried again xcompmgr, kompmgr and transset and they behaved a bit better than they did the last time I tried, but it’s still not acceptable for permanent desktop usage. I’m really looking forward to the next XOrg releases :)

19 October 2005

Raphaël Hertzog: Serial overrun on Linux

Working with serial lines can sometimes give you big headaches. I have an embedded PC based on 386 SX 40 processor. This PC doesn’t make much but it has programs using the serial line intensively. Things didn’t work as well as expected so I looked carefully what was going on … the beast was loosing bytes ! My information has been promptly confirmed by the /proc/tty/driver/serial entry. If you have “oe: X” (where X is a positive number) there, it means that one of your UART detected overrun errors. So what’s an overrun ? An overrun happens when the UART receives data while its FIFO buffer is full. Why is the FIFO full ? Because Linux didn’t treat the serial interruption quickly enough. Why is Linux so slow ? Linux is not a real time OS and it doesn’t guarantee any response time to interruption, so Linux is not so slow but my PC really is … what happens is that interruption related to the network are treated before serial interruptions. Furthermore IDE disk interruptions can take too long too. Worst case is of course, you’re treating a disk interruption, then you have to treat the network interruption and only after that you can treat the serial interruption which in fact happened right after the beginning of the disk interruption So fixing serial overrun is a rather complex problem since it’s really a kernel related problem. Googling on the subject I have found several ideas to explore : Using hdparm -u wasn’t enough to solve my problem… so I continued to look for a solution and I found one ! I recompiled my kernel with the low latency patch and the preemptible kernel patch. Those are usually used for multimedia applications where you need good responsiveness in order to deliver content in real-time but the fact is that they do work for my purpose too ! My serial overruns are completely gone at 9600 bauds. However I can still have some when running at 115200 bauds. Moreover I can create serial overrun by running a find / -type f grep -v /proc/ xargs md5sum in the background… I can’t make miracles with this slow processor… if you have more ideas to further improve the situation, I’m willing to try !

Scott James Remnant: Parallel Peer Programming

Here at Canonical Towers we have several staff who worship at the altar of Extreme Programming, and as such many of the methodologies and rituals prescribed by that religion find their way into our day-to-day working practices. A few of these came together in an interesting way a few weeks ago, and it was suggested by a cow-orker that I blog about it so he could give the URL to people. The first ritual is that of the sprint, I don’t think this is orthodox XP but rather something inspired from it that we picked up from the Python community. With all of the Canonical developers scattered across the globe mostly working from their own homes, it’s become a useful tool; particularly for the Launchpad team. The basic idea for those that haven’t heard of it is simple, and perhaps obvious; you get a selection of the team together in one place, sit them around the same table with particular goals to complete. In effect it’s highly compressed facetime and high bandwidth interaction to nail those tasks that need it, before you head off again and work at a more sedate pace. The second is directly from XP doctrine and is that peculiar observance known as pair programming, something that is often coupled with sprints. For anybody who hasn’t encountered this before, it’s something I’ve always found rather odd. You get two programmers together, both itching to code, and you take one of them’s laptop away; and you don’t just force them to fight over the keyboard either, the laptop-less soul isn’t allowed to touch it. The theory here is that it frees the deprived individual of the hassle of coding and allows them to direct the programmer in ways that may not be immediately obbious, or alternately think about the next bit of work that needs doing. Another interesting side-effect is it can be an interesting way to learn code you’ve not worked with before, if you’re the one doing the coding and you’re being guided what to do by a sage who already knows it. I have a funny story here, so I’m going to digress from the main stream for a moment to tell it. A few months ago I was working in the London office, Mark had been up all night coding and had then given me responsibility to get his changes landed onto the Launchpad mainline. I’m not that hot on quite a bit of Launchpad, and fade to utterly clueless the nearer the code gets to the web application itself; and when trying to merge the two there were conflicts which I needed Mark’s help to resolve. Now as anybody who’s met Mark knows, he’s a pretty good example of a Type-A personality, yet he suggested that we do a spot of pair programming to get the code in and I’d be the one with the laptop as it’d help me get to grips with the affected parts. This hilighted something I’ve always seen as a problem with pair programming, dealing with it when the a person with the keyboard has a totally different way of working to you. In particular, I’m an emacs user, whereas Mark is a die-hard vim user; but also right down to the working directory I would work from, how I test results, etc. When you’re the one without the laptop, this can be quite infuriating, as you know exactly how to solve a problem and the idiot with the keyboard is dithering about doing things you don’t understand just to get there. If you’re a Type-A personality, you generally snatch the laptop away at this point and do it yourself; or at least you would, if you could drive the strange editor the other person uses. I swear Mark was sulking as he gave the laptop back and let me do it. Anyway, there is some relevance to that and we’ll come to it in a moment. The third and final methodology is the concept of unit tests and more specifically test driven development. For anyone who hasn’t come across this before, I highly recommend it; I was suspicious too when Robert Collins took it upon himself to teach me the true way, but now I’m sold. Simply the idea is that if you have any code that doesn’t have another piece of code in a test suite that checks that it’s working correctly, that code is broken. More particularly unit testing involves checking just one feature or requirement at a time, and stacking them together to test all of the code paths. I’ve actually found that this improves the APIs I design, as I write the code in small blocks and functions to make them easier to test. Test driven development takes it even further, you write the unit tests first, before you write the code they’re supposed to test; usually one or two at a time. Obviously these tests will fail at first, it’s then your job to write as little code as possible to make them pass. If your code isn’t right, you add a unit test that will fail, and modify the code to make it pass. This really comes into its own when you’re fixing bugs later, once you’ve identified the bug you write a test case or two that cause the problem; these will of course fail. You can then modify the code to make them pass, and at the same time be sure you’ve not broken other functionality because of the existing test suite. I’ve also found it really useful for particularly complicated or tricky pieces of code, especially those intricate algorithms that do particularly heavy lifting. So onto the event itself, this was a sprint in our London office to indoctrinate Gustavo Niemeyer with the various projects he’d be working on. The goal for this sprint was decided to start the conversion of HCT to Bazaar-NG, and to do this Gustavo and I would pair program. Now my last experience of pair programming had been that story with Mark (see, it had some relevance) and I knew I’d be just as bad if I wasn’t allowed to have the keyboard. I was also acutely aware that if Gustavo was just sitting by and watching, he wouldn’t get much benefit from it either, so he needed to be actively involved in the coding so he could learn the things he’d be working on. I came to what I thought was a pretty neat, and obvious, solution to these problems. We set up my laptop with the code we’d be working on, and on my display were two side-by-side terminals both running screen sessions. Gustavo then set up two same-sized terminals on his, ssh’d into my laptop from both of them and joined the screen sessions. In the left-hand one he ran vi, and in the right-hand one I ran emacs. Thus we both had keyboards, and both had editors, yet could see each other working and even steal the keyboard without danger of violence. We didn’t just sit side-by-side and code on different things though, that’s not pair programming and is just ordinary programming with a bit of a voyeuristic twist. What we did was: in my terminal I started writing the test cases for the code we needed, it was Gustavo’s job to write the code that would make them pass. We actually added a third terminal in which we could run the test cases themselves; so I could run them when I’d added something that would fail, and Gustavo could run them when he thought he’d made them pass again. This turned out to be a rather fun way to work, and at one point I was almost able to try and convince myself that the code was writing itself to pass the test cases I was writing. It also got me thinking that it’d be really neat to use genetic algorithms to breed code to pass test cases.

Robert McQueen: Comments

Just a quick post to reply to the comments I’ve had on some previous posts. On Missing entropy on my server box, I received lots of comments on how to feed random other stuff into the entropy pool or make it bigger or other hacks, but Alexander Reelsen pointed me to the real cause — a kernel bug in older 2.4 kernels which causes the entropy pool to deadlock on SMP systems, and never get refilled. There is a patch from RedHat which backports the fix from 2.6, and is included in recent 2.4 kernels. On the topic of kernels, now I’ve upgraded from 2.4.29-rc1 to 2.4.32-rc1 I get lots of errors like hw tcp v4 csum failed in my syslog. I’m using the e100 driver which as far as I can see hasn’t changed between versions, but there have been some changes to TCP checksumming code which I havn’t quite been able to grok. Google finds mailing list posts with other people asking what the cause is, but nobody answering. Anyone know what’s going on there? On Windows accessibility, many people seem to not listened to the first couple of minutes of the tasteless song I linked to, and hence taken my comment completely seriously. Thanks to everyone who told me about sticky keys etc in comments, but I did already know about the existence of Windows accessibility support (warning: mjg59 in furious anger mode). :D On the topic of blog comments, how do I cut down on the comment spam I have to moderate without requiring people to go through a completely unaccessible captcha image thing, or the annoyance of registering and acknowledging an e-mail? Would prohibiting comments and URIs containing words like ‘mortgage’, ‘casino’ and ‘ringtone’ ever cause false positives?

Joey Hess: argh

My laptop's power input is broken. Not too badly yet since it seems to still get power in more positions than not, but I've been here before and I know it can go nstily downhill from here. I think I know how I broke it, it's a dimly remembered farce from the morning before last that involved getting up to let the cat out, tripping over the laptop cord, putting the laptop back up only to trip over it again on the return trip. There's a good chance it's the coord and if so I could just spend another $50 for third power brick and problem solved. My memory sucks and I forgot why I had to buy the second power brick, but I have a blog, so I know that it was a short in the cord before. Now, I've been thinking about getting another laptop anyway, but it would just be a cheap used laptop off of ebay to use for d-i testing and development. The IBM thinkpads are nice, but just don't grip me and somehow this pokey laptop with its not very good outdoors screen still makes me happy, and I'd hate for this to be the bit that killed it. I think I'll invest in a multimeter first so I can find out what the problem is.

18 October 2005

Sam Hocevar: Opening my non-blog

I have been avoiding blogs as much as I could ever since they became fashionable. I found them uninteresting. Most of them were slight variations of the everlasting alternation of friends (or children s, or pets ) pictures and reports of how the day before (or yesterday s movie, or life) was great (or sucked, or was utterly boring). I did not read them, but they started invading my life nonetheless, spamming search engines and diluting information. But I could cope with the Google noise and just ignore blogs. Then, blogs started to carry opinions, not just feelings. They are now seen by many as a new kind of journalism, yet most of them suffer from the obvious bias that the entry poster is the same person as the comment moderator. Having been banned countless times from Slashdot for bashing moderators or simply attacking the general groupthink, I was not surprised at all to see a few of my comments removed from many blogs. How could I not hate blogs as a means of communication? In mailing-lists or on Usenet, when people disagree with you, they answer and argue, they don t remove your messages. Blogs have become the most selfish variation of the web bulletin board. But I could still cope with the spread of flawed information and just ignore blogs. Then, blogs started to build communities. You can only be part of the community if you are a blogger. Well, it would prove astonishingly difficult for me to care less about blogger communities (though I might try). If the community is about having a blog, then I am perfectly happy with the numerous communities I am a part of that are not about me having a blog and I can just ignore blogs. But today, I have a problem. Even within tech-savvy communities such as the Debian developers, discussions can occur that are not taking place in the common channels (such as the mailing-lists) but on blogs. There are people who are following Planet Debian but not the debian-devel mailing-list. And the reason can definitely not be that debian-devel is full of noise or flamewars: it is incredibly easy to kill a thread in a mailing-list, whereas it is virtually impossible to filter out the new fucking blog meme that spreads everywhere and about which I do not care. Also, people no longer subscribe to mailing-lists, it seems too tedious. Instead, they prefer to hammer RSS feeds every fucking five seconds to know whether something new just happened. So, here it is, my non-blog. My RSS-feed-without-a-blog. You can subscribe to it if you are too lazy to get informed through the other channels about libcaca releases, my Debian bugs, PWNtcha development, my work on VideoLAN, the next talk I am giving. It appears nowhere on my webpage but you can still subscribe to it.

17 October 2005

Ian Murdock: Developers! Developers! Developers!

David Berlind: “One of the things that has made Microsoft fantastically successful is the way the company’s development tools make child’s play out of developing Windows applications.”

16 October 2005

Eduard Bloch: BTS mailbox cleanup

So, after beeing hit by JoeyH's boot-floppies bug closing orgy and beeing bothered by all the old stuff in my BTS stuff mailbox, I wrote a simple script (derivate of grepmail) to remove all the messages related to closed bugs. Result on
http://rootfs.net/soft/bts-mbox-clean.pl
.

Next.

Previous.