Search Results: "mak"

19 October 2005

Jose Carlos Garcia Sogo: I am a spy

And that was so secret that I didn't even know about it.

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: Tweaks

Does anyone know of a Thunderbird extension to check for words like “attach” and remind you if you failed to make any attachments? Does anyone know of a way to stop Firefox interpreting Ctrl+W as “throw this window away including the wiki post/bugzilla comment/blog entry you were writing”? It doesn’t need to be mapped to delete word, I just don’t want it to close the entire thing. It’s most upsetting.

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?

Benjamin Mako Hill: "Jose"

My country's national intelligence is now in the hands of a man so powerful that he is not publicly referred to with even a fake last name. Of course, it's nice to know that as mysterious as he is, "Jose" is a maximum of three shorts degrees of separation from me on the social networking graph. Add this to the list of benefits that come from knowing Nicholas.

Benjamin Mako Hill: Ubuntu Talk at BLU

Last night, I decided to check out the Boston Linux Unix webpage to find out when the next meeting would be and what the talk would be on. To my surprise, the talk is tomorrow and is slated to be given by none other than Benjamin Mako Hill. Hmmm. I vaguely remember agreeing to give a talk like this in general sense but don't remember ever agreeing to a specific day. In any case, I'm not one to disappoint and am working on my slides. If you're interested in some post-Breezy action in Boston, please show up! If you can't make it, I'm trying to arrange a proper release party for some point after I receive my Breezy CDs (a week or two I guess). I'm sorry for the short notice. Of course, I'm giving the talk on short notice so I'm not too sorry. Additionally, I am missing both a class and a Media Lab sponsors dinner that I was already double booked for. You should be able to cancel up to one of your prior engagements to attend. Information on the talk is on the BLU website. The talk will be held at MIT in E51-315.

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.

Steinar H. Gunderson: VLC makes a lot of sense

Studying signal processing, I'm a lot more happy to work with VLC-based streaming than anything else I've come across so far (not that I've worked a lot with it, but hey): It makes so much more sense to deinterlace video at the client side than the server side, and it makes so much more sense to stretch an anamorphic signal to 16:9 on the client side than on the server side. VLC lets us do this fairly painless, and both the image quality and delay seems to be markedly better than Windows Media. (I wish it was all a bit better documented, though, I wish the Debian packages would include XViD support out-of-the-box, and I wish the Vorbis sound output wouldn't have odd screeching in its output from time to time.) Now, if I could only stream this to WMP and keep the sanity... :-/ (Oh, and that mplayer, Totem, Xine and whatnot would also take the streams, but that's really secondary.)

18 October 2005

Joachim Breitner: Cell phone stolen, camera bought

Isn’t it ironic: I just wrote Tapu, a game for my mobile phone and spend quite some time typing 450 playing cards for it - and then, before ever having played the game, my cell phone, a SonyEricsson T630, gets stolen! And that in a very bold way: At night, from my dorm room, while I was sleeping there. And since the theif did not take my laptop or other expensice stuff, I assume he was not planning on stealing, therefore he (or she) is most likely from my dorm. Which makes me uncomfortable.Also uncomfortable is the Siemens S35 that I still got lying around here, and so is the fact that I had to order a new SIM card, that I had to notify the loss at the police station and that I lost some contacts on the phone.Out of frustration (ok, it was planned for a while now, but this gave me the rest), I bought myself a new camera (the old one went to pieces, as previously blogged). Now I own a shiny new Panasonic Lumix DMC-FZ5. It’s not a pocket size camera any more, but the 12x zoom and the large lense was just too tempting. It was actually at DebConf 5 when Ralph Amissah enthuiastically showed me his Lumix, making me interested in this kind of Camera.
I uploaded a few pictures, though nothing special yet. Have a look at this zoomed in picture versus this wide angle picture for a demonstration of the 12x zoom and compare these two pictures, both fully zoomed in, first one with image stabilizer, second one without. Again, for zoom demonstration, the wide angle view.

Anthony Towns: AJ Market Update

Hrm, I’m going a bit single issue; I should fix that. But not right now. So it’s been a couple of weeks since I first posted about my little market experiment, which seems as good a time as any to take a look at how it’s working out. On the one hand it’s going fairly well; it’s pleasing to finally have tiffani done, and I’m pretty satisfied with how usercategories have turned out, and Joey Hess has started using them for the copious bugs the debian-boot team have to deal with, providing both an archfirst ordering and a categorised ordering for the by-maintainer views. Of course, creating those views didn’t turn out as straightforward as it should have, and ended up involving fixing quite a few bugs in my initial implementation of usercategories (and, happily, coming up with a more pleasant algorithm for handling the ordering specification in request@ mails). There were a few bugs introduced for people who didn’t use usercategories that turned up as a result of their implementation which also needed fixing. To me, though, the striking difference between taking a “volunteer” attitude to Debian and a “professional” was in how long it took usercategories and tiffani to go from conception to implementation. I don’t think they’re terribly different in complexity; there’s a mental leap in working out what you want to do (people have been thinking about making Packages files faster to download for years, and using ed diffs isn’t particularly obvious; likewise I’ve been thinking about generalising the categories the BTS shows you since I started playing with debbugs in ‘99 or so, but usercategories didn’t really come together even as an idea until debconf this year), but given that, the actual implementation for both ideas requires a little care, but doesn’t have all that many twists and turns. The result? tiffani, the amateur project, took three and a half years to do; usercategories, the amateur project treated professionally, took two months. So on that score, this still seems completely worth doing. On the other side of the scale, there’s been people’s interest in actually contributing. Which seems as good a place as any for a fold. Read the rest ...

Steve Kemp: Fortress updated.

Scanner Fortress the simple scanner, or scriptable network system is coming along nicely. For example the script test-port-identification.lua
--
--  Detect the ports open a host, and attempt to identify their services.
--
	
--
-- Create a helper function.
--
function identify_ports( host )
	
  print( 'Scanning: ' .. host );
	
  open = portscan( host );
	
  for i=0,table.getn(open) do
     service = detect_service( host, open[i] );
     print( ' Open port ' .. open[i] .. ' identified as ' .. service );
  end
	
  print( table.getn(open) .. ' ports open on ' .. host );
  print();
end
	
--
-- Now do some scans.
--
identify_ports( 'localhost' );
identify_ports( 'itchy' );
identify_ports( 'scratchy' );
This produces:
skx@lappy:~/cvs/fortress$ ./fortress tests/test-port-identification.lua
Scanning: localhost
 Open port 22 identified as ssh
 Open port 25 identified as smtp
 Open port 80 identified as www
3 ports open on localhost
	
...
...
I’ve also added primitives for working with SHA1 and MD5 hashes (both strings and file contents). Once I can get a few more primitives added I’ll make a 0.3 release and see if people care.
In other news, nothing much is happening. I’m waiting to hear about the results from my sleep study. I’ve had verbal results, but they don’t count for much and miss important details - hopefully not too much longer as I’m due back at work fairly soon ..

17 October 2005

Per-Arne Hellarvik: Updated libata-passthru patch HOWTO

cd /usr/src
wget ftp://ftp.no.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.14-rc4.tar.bz2
tar -xvjf linux-2.6.14-rc4.tar.bz2
wget http://www.kernel.org/pub/software/scm/git/git-core-0.99.8d.tar.bz2
tar -xvjf git-core-0.99.8d.tar.bz2
cd git-core-0.99.8d
make prefix=/usr install
cd ..
git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git libata-dev
cd libata-dev
git diff master..ALL > git-libata.patch
mv git-libata.patch ..
cd ..
rm b
ln -s linux-2.6.14-rc4 b
patch -p0
cd linux-2.6.14-rc4

Debian:
make-kpkg --append_to_version -passthru --initrd buildpackage

Other:
make mrproper
cp /boot/config-2.6.x .config
make oldconfig
make
make modules_install
cp arch/x86_64/boot/bzImage /boot/vmlinuz-2.6.14-rc4
cp System.map /boot/System.map-2.6.14-rc4
cp .config /boot/config-2.6.14-rc4
update-grub



Fixed some typos and added stuff.

Joey Hess: thoughts (less random than expected)

This time of year it's great to curl up in the evening with a feather comforter and a good text file. I recently read all of Andy Hertzfeld's stories about the origin of the mac on folklore.org, pretty much straight through in chronological order during one long night. Only at the last story did I find out that he'd turned the website into a book. Reading a whole book in one sitting online is not a novel experience for me, though it seems to be for many, but doing it by accident is. My enjoyment of quantities of text online does sometimes come out in my own weblog postings, which are probably long enough, if not good enough, to be their own book. This weblog at least occasionally violates 8 of Nielsen's 10 weblog usability guidelines. The only one I think I should fix is point 5. Another book I read online recently is Karl Fogel's Producing Open Source Software. The contrasts between how Karl suggests doing some things and how projects I'm involved in work are sometimes large (he suggests voting on technical issues for example), sometimes due to differences in technology (the debbugs bug tracker makes conversations and other email-based use of a bug tracking system work much differently than the BTSes he describes using), and sometimes pointed to things that could be improved. More often though, he seemed spot on in extrcting and highlighting best practices. For example, he does a great job in pointing out that simple, consistent naming conventions, like #404093 for a bug report and r1021 for a repository revision, are more important than they appear. I also enjoyed reading some reviews of Katamari Damacy, which sounds like a truely unique and fun game. I'm looking forward to playing it (probably under emulation) one of these years.

Erinn Clark: Unreadable captchas considered useless

I've become increasingly aggravated by my inability to read captchas such as this one. Am I becoming a robot or are they making it stupidly hard for humans these days? If I am becoming a robot, when do I get my hot pink exoskeleton?

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.”

Joshua Kwan: poor excuse for a real post

Gotta admit
That I'm a little bit confused
Sometimes it seems to me
As if I'm just being used
Gotta stay awake, gotta try and shake off
This creeping malaise
If I don't stand my own ground
How can I find my way out of this maze?

Really, there is lots of shit going on. Midterms, friends, etc. I am way too busy to make a real post.

And I am full of Thai food right now as my parents came up to Berkeley and took me out to a Thai restaurant.

By full, I mean full as in "Supposing I were in a starving sub-Saharan African province, I just ate a week's worth of food" full.

Benjamin Mako Hill: <cite>Manhole Covers</cite> by Mimi and Robert Melnick

Mika and I went to the MIT Press Bookstore loading dock sale today. It provided what was, by far, the most relevant selection at any bargain book sale I've attended. It was two small rooms and I could have easily walked out with 100+ books that I would have read. Even with most books at three, five, or seven dollars (US), my student budget was the limiting factor. At the sale, I bought a large coffee-table sized book called Manhole Covers by Mimi and Robert Melnick. It offers page after mesmerizing page of black and white photographs of manhole covers of all designs, shapes and sizes. At seven dollars, I felt like it was asking a lot but Mika and I decided that on a per-manhole-cover basis, the price was really unbeatable. The price was 3.3 cents (US) per full-page manhole cover photograph if you do not account for the small thumbnails of manhole covers that pepper the books front matter. If you are in or around Boston, you should go to their next loading dock sale -- probably in the spring.

16 October 2005

Ross Burton: Devil's Pie "Lazy Release" 0.14

Devil's Pie (someones favourite window manipulation tool) 0.14 is out. A nice and lazy release here, I just merged patches from other people. Downloads are in the usual place.

Per-Arne Hellarvik: Passthru for SATA.

I have been for a long time quite annoyed by the fact that libata and hdparm does not play together.
So I decided the other night to take direct action.
Since I know close to nothing about git and -rc kernels, I used google extensively.
Here is a list from my memory on howto do it:
cd /usr/src
wget ftp://ftp.no.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.14-rc4.tar.bz2
tar -xvjf linux-2.6.14-rc4.tar.bz2
wget http://www.kernel.org/pub/software/scm/git/git-core-0.99.8d.tar.bz2
tar -xvjf git-core-0.99.8d.tar.bz2
cd git-core-0.99.8d
make prefix=/usr install
cd ..
git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git libata-dev
cd libata-dev
git diff master..ALL > git-libata.patch
mv git-libata.patch ..
cd ..
patch -p0
rm b
ln -s linux-2.6.14-rc4 b
cd linux-2.6.14-rc4
make-kpkg --append_to_version -passthru --initrd buildpackage


Does it look allright, or not?


Next.

Previous.