Search Results: "cas"

27 January 2007

Adam Rosi-Kessel: Airport Snooping

I’ve always wondered why ill-intentioned hackers don’t set up fake free WiFi hotspots in public places like airports to collect passwords and other personal information. As it turns out, they do:
Authentium did an in-depth survey of the ad hoc networks found at O’Hare, visiting on three different occasions. It found more than 20 ad hoc networks each time, with 80% of them advertising free Wi-Fi access. The company also found that many of the networks were displaying fake or misleading MAC addresses, a clear sign that they were bent on mischief.
The Computerworld article focuses on the dangers of associating with ad-hoc (peer-to-peer) wireless networks and provides a number of tips for Windows users to avoid unintentionally connecting to an ad-hoc network. It seems to me just a matter of time, though, before malicious agents set up “real” (infrastructure-mode) access points in public places to collect such data. In fact, based on the airport study above, I would be shocked if it weren’t already happening. Numerous trivial variations could be very difficult to detect for the average user: for example, someone could set up a WiFi access point advertising itself as a T-Mobile HotSpot, and copy the T-Mobile web interface. If they wanted to be especially crafty, they could sit outside a Starbucks (or other known T-Mobile HotSpot) and simply use a different channel than the existing hot spot. Even a sophisticated user might have trouble telling the difference. The lesson is that you need to expect that all network traffic is insecure if not encrypted and signed at both ends. Although even in that case there are possible man-in-the-middle attacks, at least we have a cryptographic certificate/certificate authority infrastructure to mitigate the risk. (That sort of attack is also a bit more difficult to pull off, thus perhaps deterring the simplest “script-kiddie” type attackers.)

Adam Rosi-Kessel: Airport Snooping

I’ve always wondered why ill-intentioned hackers don’t set up fake free WiFi hotspots in public places like airports to collect passwords and other personal information. As it turns out, they do:
Authentium did an in-depth survey of the ad hoc networks found at O’Hare, visiting on three different occasions. It found more than 20 ad hoc networks each time, with 80% of them advertising free Wi-Fi access. The company also found that many of the networks were displaying fake or misleading MAC addresses, a clear sign that they were bent on mischief.
The Computerworld article focuses on the dangers of associating with ad-hoc (peer-to-peer) wireless networks and provides a number of tips for Windows users to avoid unintentionally connecting to an ad-hoc network. It seems to me just a matter of time, though, before malicious agents set up “real” (infrastructure-mode) access points in public places to collect such data. In fact, based on the airport study above, I would be shocked if it weren’t already happening. Numerous trivial variations could be very difficult to detect for the average user: for example, someone could set up a WiFi access point advertising itself as a T-Mobile HotSpot, and copy the T-Mobile web interface. If they wanted to be especially crafty, they could sit outside a Starbucks (or other known T-Mobile HotSpot) and simply use a different channel than the existing hot spot. Even a sophisticated user might have trouble telling the difference. The lesson is that you need to expect that all network traffic is insecure if not encrypted and signed at both ends. Although even in that case there are possible man-in-the-middle attacks, at least we have a cryptographic certificate/certificate authority infrastructure to mitigate the risk. (That sort of attack is also a bit more difficult to pull off, thus perhaps deterring the simplest “script-kiddie” type attackers.)

26 January 2007

David Pashley: Eddie 0.2 RSS and Atom Parser

I noticed today that Mark Pilgrim linked to Eddie, my liberal RSS and Atom parsing library for Java, so I figured I should make a new release. It's been a few months since I did any serious work on the parser, but in the last few days I've reduced the number of test case failures to less than 100 out of 3502 test cases which come as part of Mark's Feedparser parser for python. The majority of the failures are in the date parsing routines and due to bugs in the Jython library which cause literal dictionaries not to match with classes inherited fro PyDictionary. Improvements in this version include:
  • Massively improved support for different character encodings. With Java 6, it also has support for UTF32 feeds.
  • CDF Support.
  • Optional support of TagSoup for sanitizing of HTML in entries.
  • Improved support for different input sources including String, InputStream and byte[].
  • Numerous bug fixes, with 97% of test cases passing, up from 90%
If you use Eddie, drop me an email. I'd like to thank Mark Pilgrim again for providing the community with a fantastic and comprehensive suite of test cases, extensive documentation and a first class Python library.

25 January 2007

Christian Perrier: 99,635%

This is the current translation ratio for French in unstable, after 8 days of "blitz l10n NMU". Boooo, a new package appeared in unstable, namely libpam-rsa, bringing 13 more strings. I have used this occasion to finetune a new script of mine which I will use to mail maintainers when they introduce a new package with debconf templates and will point them to the magic podebconf-report-po utility from the po-debconf package. Ditto, maybe, for maintainers who modify debconf templates without prior notice to the translation team...(please note that this is scheduled to be a manual, nothing automated).

Russell Coker: presentation laptops

I suggested in a previous blog entry that conferences should provide computers that speakers can use for their presentations. The reason for this is that getting one computer working with the beamer in each room is an easy task, while getting the laptop of every speaker to work is much more difficult.

It seems that my idea has been rejected by almost everyone who read it, so I'll document some tips for getting a laptop working.
 SZ:    Pixels          Physical       Refresh
*0 1400 x 1050 ( 474mm x 356mm ) *50
4 640 x 480 ( 474mm x 356mm ) 50
5 800 x 600 ( 474mm x 356mm ) 50
6 1024 x 768 ( 474mm x 356mm ) 50
8 1280 x 960 ( 474mm x 356mm ) 50
9 1280 x 1024 ( 474mm x 356mm ) 50

Firstly there is the command xrandr which can be used to change the resolution without logging out. Above are the most useful lines produced by running xrandr with no options on my Thinkpad T41p. The left column is the index to the list of resolutions. For example I run xrandr -s 9 to use mode 1280x1024 and xrandr -s 0 to use mode 1400x1050. This takes much less time than editing an X config file!

The next thing to note is that my Thinkpad has a refresh rate of 50Hz, apparently most beamers expect at least 60Hz, this explains why I have had ongoing problems in getting my Thinkpad to correctly work for presentations for the entire time that I have owned it. If you own such a Thinkpad then I recommend that you just bring another laptop to do your presentation on the assumption that the display possibly won't work and probably won't work properly! I had developed this habit anyway after repeated problems in getting my Thinkpad working (occurring on a number of occasions in several countries). It's good to now know the reason for this (thanks Keith).

When setting the resolution there are often tweaks that can be used. For example in my talk for the Debian Miniconf of LCA 2007 I used mode 800x600 (I think - Keith set it up and I didn't look closely after verifying that things basically worked). Even though the beamer didn't have good support for a low refresh rate it worked when the resolution was low enough. Fortunately the xrandr program allows changing resolution fast enough that all 13 resolutions could be attempted in about a minute.

The support for better display detection and configuration is steadily improving. Hopefully this year the problems will be solved (which means that for the Debian and RHEL releases in 2008 the problem will be solved).

A possible work-around is to use Xephyr (the replacement for Xnest). In a previous blog entry I described how to get Xephyr going for use by Xen images. It seems to be a common symptom of display synchronization problems that the edges of the screen will be clipped. The most common work-around for this is to not use the full-screen mode of OpenOffice - which means that instead of having a small amount of text clipped there is a large amount of OpenOffice menus etc on the screen. As Xephyr accepts any resolution it should not be difficult to arrange for it to use 98% of the screen space and then run the presentation full-screen in the Xephyr window. This will be particularly useful for programs such as MagicPoint (my favorite presentation program) which don't support a windowed mode of operation.

If you have any other suggestions on how to solve or work around display problems with laptops then please leave comments.

24 January 2007

Adam Rosi-Kessel: Castigating Cully

Last week I decried a senior Pentagon official’s attack on lawyers providing pro bono representation to Guantánamo detainees. I suggested that villifying the partners of some of the largest firms in the country was probably not the wisest political move, and was likely to backfire. As it turns out, it appears I was right. See the editorial in this week’s Massachusetts Lawyers Weekly:
…Headlines in print and online were unanimous: “Why Cully Stimson Is Wrong.” “The rightwing assault on the legal system.” “Cully Stimson Should Pick Up His Medal of Freedom and Go Home.” “Law deans respond to unethical Bush lawyer.” And perhaps the most eloquent rebuke of all came from Harvard Law Professor Charles Fried. In an op-ed that ran in the Wall Street Journal, Fried declared that “Stimson showed ignorance and malice in deploring the pro bono representation of Guantanamo detainees by lawyers in some of the nation’s leading law firms.” The former Supreme Judicial Court justice continued: “It is no surprise that firms … on Mr. Stimson’s hit list are among the most sought-after by law school graduates, and retain the loyalty and enthusiasm of their partners. They offer their lawyers the profession at its best, and help assure that the rule of law is not just a slogan but a satisfying way of life.” …What could have been a disaster for the bar turned into an all-out celebration of what lawyers do.

Wouter Verhelst: Debian motivation

Steve asks a pretty good question: what is the motivation to work on Free Software in general, and Debian specifically? There are actual scientific studies on that subject as academics try to wrap their head around this strange thing where people do not get paid, but still put in a hell of a lot of work. What motivates me to put in hundreds of, sometimes boring, hours working on this stuff? I honestly don't know. I started doing working on Debian with a desire to make some name and fame for myself; but frankly, if name and fame is what I'm after, I should have stopped doing this a long time ago and should have tried to go work for TV or something. Or I should have been working on some stuff which is central to Debian (either the OS or the Project). So while "name and fame" might've been the reason in the beginning, it's not my motivation today. It could be that I want to help shape the Debian operating system into something useful; that I want to contribute so that the system is something I like to use. But I don't think that's the case; if that was my motivation to work on Debian, I would have more interest in doing some infrastructure work, which I'm not doing: the m68k port is not exactly the most important port of the Debian project, and my most popular package, nbd-server, is installed by 101 popcon submitters, or 0.38% of them all. Why the server seems more popular than the client is a mystery to me, but well. It could be that the Debian project is this warm and fuzzy place which allows me to meet people from the comfort of my bed room, but I don't think that is the case. If I want to meet people, I'll go to a bar, or go sing in the choir, or go play my flute in the ensemble. That's a lot more direct, a lot easier than trying to set up some trip to Scotland, and a lot cheaper, too. And if I want a warm and fuzzy place, then with all due respect, Debian is not what I'm looking for. It could be that by working on Debian, I want to challenge my knowledge and in that way increase it; this would look good on my CV, and it could perhaps satisfy a desire to learn new stuff, all the time. But that's not entirely true. I don't need to be a Debian developer to challenge myself or to learn new stuff; and if I would really want to have something that looks good on my CV, I would be much better off by joinging a project that produces insane huge gobs of code, rather than a project which is perceived to do nothing more than 'just putting stuff in packages'. I think my real motivation is a bit of a mixture of all of the above. I still feel proud when people talk about things I've done, or when people praise me for the code I've written; and I still feel sad when people mock the m68k port, even if 'only jokingly' (because we've pulled off a lot). I often try to file good bug reports when I find issues with Debian, and purposely run unstable on my laptops to help find bugs quickly, in an effort to help turn Debian into something useful. There is a lot of flaming on Debian mailinglists, but there are also a lot of friends—who, contrary to those from the choir and those in the ensemble, actually know what I'm talking about if I say "I'm trying to port Debian to those ColdFire boards, which needs changes in the compiler, the linker, and the C library. Possibly also the assembler". And finally, while Debian work hardly challenges me anymore, it does still allow me to learn new stuff every day—which is quite useful in my day job. So, there you have it. I don't have a specific reason why I'm still a Debian Developer after five years; it's more of a general feeling that being part of Debian is the right thing to do. I guess you could also say I have this feeling that I can't abandon "them"—whoever these "them" might be. Obviously that's incorrect (I've seen much more important people, such as e.g. Herbert Xu, being replaced without much of a hitch), but the feeling still is there, nagging on me. So there you go. What's your motivation?

23 January 2007

Martin F. Krafft: Haunted by a password

I restarted my laptop last night only to discover that I could not piece together the password I used to encrypt my harddisk, and it did not help that I knew it was pwgen-generated (a sequence of random digits or letters which try to be "pronouncable"). I had left my palm pilot with the password database at home, and the emergency key I created for such cases was on a USB medium with a read error. I beat my head on the table and tried and tried and tried, but to no avail. So I started pondering how to convince my friend Hanspeter to walk to my flat again and help me out, having resigned myself to the idea that I'd have to do more reading tomorrow (today) at the office. As it turned out, Hanspeter would stay at my flat that night anyway and switched on my machine at home to allow me to fetch the emergency key. But I didn't end up needing it. I slept and dreamt and suddenly had some sort of a nightmare in which a string of letters came haunting me, tormenting my consciousness in much the same way that the Guitar Hero notes come flying at you. I woke up and had ten characters in my head, and I was confused. It took me at least two minutes to remember that I had been scrambling for the harddrive password, and when I figured it out, I wasn't surprised that the string I dreamt would decrypt my drive. I really should gain some distance to these frickin' computers! NP: Man on Fire / Habitat

MJ Ray: So, what happened at Cooperatives SW?

I left home a bit late and rushed to the train stop, but the journey was easy after that. There was quite a good turnout at the meeting: Chris (chair), Alex (clerk), Paul (treasurer), Brian (secretary), Malcolm, Paul, Andrew and myself IIRC. Continuing: A promo leaflet is on hold until after funding is sorted out; No mutuals responded to a funding request letter; The reply to the BASIS grant bid is expected some time in January; The database update is waiting on Plymco as far as I could tell. Financial: the clerking contract went about 700 quid over budget last year and has been reduced to a skeleton service until funds are sorted out again. Donations from the Coop Group and Midcounties were forecast but aren't in the bank yet. AGM: the aim is to return to more of an event next year. Holding it in October should hopefully avoid the transport and weather problems of the 2006 event. Fund-raising: Chris to draft a bid for the cooperation fund to try to secure enough money for a support worker. The priorities would be clerking and event organisation, with possibly marketing, communication and news-production tasks. Numbers to come from the support tracker that Alex has been using. Need some sort of corporation to apply. Alex, Brian and myself to assist. 12 February deadline. Reply expected in March. Future work: newsletter deferred to mid-March. News items to Alex. Paul (I think) mentioned that some Healthy Eating Partnerships seem to be promoting their box schemes as 'Food Coops' when they are not cooperatives at all. We need to contact partnerships and find out which is doing what. Alex handed out a few Principle Six speed-networking packs. Interesting idea. Paul mentioned Cornwall Switch which will find the best green energy supplier for you (even if you're not in Cornwall). Next meeting 16 April 2007.

Zak B. Elep: Smarty enough for Smart Bro, and 3G

Finally, I’m now on broadband! :D I made the move today to Smart Bro as they have been touting a promotion offering free installation and a 384 Kbps connection via their Canopy system. As I’ve been mostly offline (or slightly online, counting the occasional GPRS modem connection on a GSM network) I figured that this is the best way at the moment to get broadband connectivity, as the only DSL choices available locally have been either seriously damaged (due to the last supertyphoon) or excessively priced (with unpredictable foreign-currency adjustments.) So, needless to say, I’m now enjoying myself with this new investment. Adding to this, I also got a new Netgear WGR614v7 wireless router so I can share the connectivity with perlis. While not exactly as flexible as the famous WRT45G from Linksys, it surely does the job to sharing the Net, so I’ve no complaints about it. And I’ve no complaints about the service offered by Smart Bro, either; the installer did an absolutely good job of making sure that the Canopy SM is on the most receptive direction and even gave me some pointers on what to expect with such a connection. Actually, I’ve already made arrangements about the peeves experienced by other Smart Bro users by taking a cue from Joey Hess by setting up the right service caches and by being not too abusive with my expectations. But, I still have a lot to expect with this new connection. After all, I still have a few more items on my TODO that needs doing, namely writing about what the hell happened to me since last month until now, and my future directions (erm, resolutions) for this new year. Ah well… … but first, I need to do some monster dist-upgrades… :P BTW: a UMTS (3G) signal has finally been broadcast in Daet, giving me a reason to also have smart-3g as a backup service in case the Canopy goes down. Yipee!

Ian Murdock: Babies, bath water and open platforms (cont.)

More Knowledge@Wharton: “Following the model that made Microsoft’s Windows so successful, Microsoft licensed PlaysForSure to multiple hardware vendors of digital music players. ‘We thought that was a brilliant strategy — [develop] an open ecosystem, get a lot of people [to support it].’ What happened? As Ballmer puts it, ‘In this particular case, the whole was not bigger than the sum of the parts.’” As I said the other day, an ecosystem is never the sum of its parts it s either a whole lot more or a whole lot less. Microsoft was decidedly on the wrong side of the equation this time. Yes, Microsoft did what it had to do to compete effectively. Question is, will this make it harder for Microsoft to build the next ecosystem? And did the tactics Microsoft used to benefit from the last one play a role in the outcome this time? (Via Mary Jo Foley.)

Ross Burton: Drink The Lemonade

Dave Cridland posted to maemo-developers again today, spuring me to spend my lunch time checking out his email client instead of doing something productive like eating. It's very interesting. Basically he edits the RFCs for Lemonade, which is a IETF standard for email on mobile devices. Basically it is a set of extensions for IMAP and SMTP that improve their performance over high-latancy low-bandwidth connections (like bad wi-fi or GPRS), such as forward-without-download and efficient re-synchronisation commands. Existing extensions such as a useful IDLE implementation are also used to push new mail notifications to the client. To test the ideas in the real world there is Polymer. Polymer is a simple IMAP client that uses the Lemonade extensions as much as possible, so is ideal for mobile use. There is more: it uses ACAP to store the settings on the Internet (Dave also provides free ACAP accounts) so it's configure once, run anywhere. I've just tried it on my laptop, and it works nicely. But it gets better. There is also Telomer, an email client using Lemonade and designed for Maemo. I've just tried it out, it may be seriously lacking in features at the moment, but it works. Features can be written over time, but it takes serious thought to get something as fast and usable as Polymer on mobile devices. I'll quote Dave:
That all said, once it's started, it connects to the mailserver over GPRS in about 10 seconds and pulls up the summary listing in 15, with a mailbox size of 2,882 messages. With a mailbox with 33,732 messages in, it's a little slower at around 25 seconds. That's still way faster than a desktop client on a LAN, of course, unless that desktop client is Polymer - in which case it'll seem remarkably slow.
This is what we need for a mobile email client. I know I've found my email client of choice on my new N800. NP: Wish You Were Here, Pink Floyd

22 January 2007

Thijs Kinkhorst: Twenty-seven and counting

I'll be turning twenty-seven this week. A classic occasion for celebration. If you read this, and can find out where it will take place, you're invited: this Friday from 21.00 at OS/9. You can join earlier for dinner if you wish, in that case, let me know.

21 January 2007

Sven Mueller: ATmega16 controller and DOG-M LCD module - can t get it to work right

Well, today I worked on a new little hardware project. It’s supposed to become open source (both schematics/PCB layout and software), but I want to work on it together with a close friend more or less exclusively for now. Anyway what it is going to become is a small controller board with a 2×16 character LCD module (DOG-M162 from lcd-module.de, an Atmel ATmega16, a small serial EEPROM, an IR transceiver, a USB port (featured by an FTDI USB2serial chip) and two relais outputs. The software will use the board as an external controller for Canon EOS* cameras (one output controlling the autofocus trigger, one the shutter trigger) with several “programs” which take a photo every X seconds or opens the shutter for a given amount of time (up to several minutes for night time photos). Anyway, today we worked on the first prototype board and tried to get the LCD to work. First we tried a 3.3V setup for the board - our initial goal - and several software versions later, we used an oscilator and found rather disgusting signal edges, so we switched to 5V (all components used were 5V and 3.3V capable, except that the display needed a slightly different circuit with a capacitor replaced by bare wire and another removed). Now the signal edges looked fine and we tripple checked that all connections were as expected. But even after trying two different initialization routines from the web and writing an own one from the controller specs, we were not successfull. This is quite frustrating, so if anyone would be able to help here, please leave a comment or contact me by email.

Isaac Clerencia: Bluetooth remote

A few days ago Applemania took over Warp HQ and several workmates purchased MacBooks. The MacBooks came with this nice remote thing and I grew jealous. In my way back home I thought that it shouldn’t be very hard to get a kind of remote control working using bluetooth and my Nokia mobile. I had never coded for my mobile so I wasn’t sure about how difficult would it be. In the end it was quite easy to write a simple program that just sent every key press to my laptop via bluetooth, and it only took 113 lines of Java code. Then I spent several hours coding the “receiver” part, in the end I created a little Python app which could load different plugins and created several of these modules: There are loooots of things to improve but it works for me :) , I’ve uploaded the source code (tarball) in case you find it useful.

Jan Wagner: Music and Debian

Today I found a way to combine consuming my favorite Radio Station and using my favorite System Distribution.

On working hours and most of the time at home I’m listening to Frisky Radio, founded by Faisal Sultan. But I’m missing it the 3 hours per day, when I’m traveling between work and home town. I did realize, Frisky Radios provides podcasts, but only one per week and the download history isn’t such long. Some days later, I thought stream ripping could be nice. So I did run:
$ apt-cache search stream ripper
goobox - CD player and ripper for GNOME
kstreamripper - kde frontend for streamripper
streamripper - download online streams into audio files
tunapie - Lists audio and video streams from Shoutcast and Icecast
My decision was to use streamripper in combination with screen.
Streamripper can provide a relay server, where you can listen to and save bandwidth and decide, what should happen with already existing tracks. This all seems very nice and I’ll see how lovely it will work together with my player, which name I will not mention in this context. ,

Christian Perrier: NMU'ing Andrew Pollock?

Dear Andrew, I'm always an enthusiast reader of your blog and more particularly the "adventures of Aussies in USA-land"...:-) But, I'm about to NMU one of your packages as part of my "blitz l10n NMU" campaign, namely the argus package. I'll of course notify you, but in case you prefer doing this yourself, please just fix the pending l10n bugs in argus. Just yell out loud..:-)

Daniel Burrows: How to Breathe, Functionally (part 1)

David Welton writes that the problem with functional languages is that you don't get to mentally "catch your breath" between computations; piling function invocations on function invocations makes it hard to understand what's actually being calculated. He has an amusing summary of how functional code can become unreadable:


Do this with the result of this with what this produces when given this input that is derived from this function which takes the result of this other thing after calculating the result of something that is derived from the output of a function that ...


Indeed, I've seen functional code like this (much of it written by myself). Here's a particular gem:


f splitPoints = map fst $ tail $ scanl (flip ($) . snd) ([], toSplit) $
map splitAt splitPoints


I wrote this code a year ago, and I don't know what it does! It's hard to read and hard to understand. So, however, is imperative code that says


Add 5 to A, now if B is not zero we jump to where we subtract one from B and if C is less than 3 we add 4 to C otherwise we divide C by 2 and then add it to A, then we ...


The reason both pieces of pseudocode are hard to understand is that they don't use the abstraction features built into the language. Good imperative code uses meaningful variable names, uses the structured-programming primitives the language provides, and abstracts complex operations into functions.

My rule of thumb (which is, heh, not always religiously followed) is that a piece of program structure that does more than about 3-6 things is probably too complicated; it seems like that's about as much local context as I can hold in my head comfortably (and the number is more 3 than 6 these days, if you get my drift). As David puts it,


If you'll bear with a poor comparison, sometimes programming is like a song. You do the tricky section, then you go back to an easier section and catch your breath for a bit.


The problem seems to be that people trained on imperative languages, when they're tossed into the ocean of functional coding, can't find the guideposts and landmarks that would help them impose some structure on the water. Should I put this complicated expression inside a "let", or break it out into another function? When do I use a higher-order function to unify two dissimilar pieces of code? Should I write this code in terms of higher-order library functions or directly? It's easy to wander off down a chain of nested invocations of anonymous higher-order functions, or composed partially applied library functions, just "because you can" and end up forgetting what you were trying to do in the first place.

Luckily, some of the basic rules of keeping your code readable remain more or less the same: assign intermediate results to variables with meaningful names, and abstract complicated operations into separate functions. To tackle David's example:


You get sections with DoThisAndThisAndThatWithTheResultsOfSelectThisFromTableXYZ that you have to slow down to think through.

...

GoToTheNextTrickyBit where ManyThingsHappen.

All in all, you wind up with a sort of ebb and flow that works out pretty well if you're in tune with the code being written, going from intense calculations, to a line or two where you do no more than store things in a variable, take a breather, and prepare for the next important stanza.


The way to "take a breath" in a functional language is generally to assign an intermediate result to a variable, or to extract a complicated operation into a function and give it a meaningful name. One Haskell approximation to David's example is


do DoThis
AndThis
results - SelectThisFromTableXYZ
someVal - AndThat results
GoToTheNextTrickyBit someval


If you're writing pure functional code, you might write


let
results = SelectThisFromTableXYZ
someVal = AndThat results
in
GoToTheNextTrickyBit someVal


Of course, this will become unreadable if you write a huge complicated nested "let" expression in place of "AndThat". For a truly dreadful example of this kind of coding, check out the Gnucash Scheme code that generates the "Cash Flow" report (warning: read this in short bursts, or you WILL go blind). This is exactly analogous to writing too many nested loops and conditionals in imperative code, and the fix is the same: find logically distinct bits of code and extract them into separate functions.

I have a few more thoughts, but this post is getting too long, so I'll inflict them on the world in another post. The rule that short things are easier to understand applies to blog posts as well as code. :-)

20 January 2007

Eddy Petrișor: HOWTO test PPPoE without having PPPoE (long)

I don't have an ISP which uses PPPoE or more than a laptop on my desk, but still, thanks to free software, I can test PPPoE installations (to some degree).

I have set up with qemu machines a virtual LAN that is made totally in user space via a TCP socket on port 1234. I needed this in order to test the changes I am working on for the ppp-udeb Debian installer module that supports (or should I say, should support) configuration of PPPoE connections.

These are the tools whose authors and maintainers deserve kudos:


This is the tutorial I followed to configure the PPPoE server http://www.freeantennas.com/PPPoE-Server-HOWTO.html, but until then I had to make the network.

In case someone is interested, here's how I did it (these are Debian centric instructions, but I don't see anything that would stop someone to do the same even on a windows machine).
I won't repeat that tutorial, but now I can create a virtual machine (well, I'll use an existing virtual machine) and test my custom D-I images and test the changes done in ppp-udeb.

Rock on!

Julien Blache: Once again, XFS saves the day

The server hosting this blog just suffered what can only be described as catastrophic hardware failure, thanks to the crap that are Maxtor hard drives, Dell CERC 1.5 RAID controllers and the Linux driver for those (aacraid). So, the machine got shut down for a moment on thursday night, just the time to move the rack around in the datacenter, and one of the disks did not come back in one piece. But it did come back online after a reboot, prompting an array rebuild by the controller which took 12.5 hours for 250 GB (RAID 1). And the drive failed again 10 minutes after the rebuild was completed, confusing both the controller and the driver. At that point I could still log into the machine, but any command would trigger nice I/O errors all over the place. Fortunately, the FS got shut down by XFS automatically on I/O errors and I haven’t lost a single bit of data. The machine came back just fine with the faulty drive removed. And you thought a RAID controller would help in this case. Obviously this one doesn’t. I need to mention that we’ve observed this behaviour on another machine before this incident, we have another machine suffering from a faulty drive in just the same way, so this isn’t an isolated case and it’s reproducible.

Next.

Previous.