Search Results: "ghe"

1 February 2006

Erinn Clark: Standby passengers love me

Usually waking up an hour after your flight has left is a bad sign -- like, a sign of imminent doom, that things are about to get horribly worse. At least, that's how it usually feels and this being the third 6:25am flight I missed in 2005, I was well-accustomed to that feeling. Luckily I got re-routed through Tampa, then Los Angeles, and I finally ended up in my San Jose, CA destination with a lovely Val awaiting me. She seemed shocked; said I was far shorter than she expected, then she realized I was walking with a group of Stanford basketball players and that, though they dwarfed me, I still managed to have at least an inch on her. (Val is "5'9 and three quarters!", according to her.) A lot of the visit was a bit of a blur. After arriving, I quickly showered, and was promptly told by Val that my skater rat apparel just wouldn't do and that our New Year's Eve party was meant to be dressy. A black shirt and some funky necklace managed to placate her, luckily, as well as my excuse of having just flown in from out of town with no instructions to dress pretty. Off to the party, where I met a load of brilliant and entertaining people, including Lina who was positively heartbroken by the lack of fireworks.
Lina and me in the ballpit The next day included eating vegan duck for breakfast, visiting Google offices for fun (not profit), getting lost with Val in some frightening redwood forest, Indian food in SF with Janet, Jen, and Val. Actually, the Indian food might deserve an entry of its own -- the owner of the restaurant actually spoonfed me, which was bizarre and funny. Afterwards, we went to visit Kristal and laughed at various things, including the most hilarious website ever. "Oh yeah baby, check out my throughput." Of course, that feeling of imminent doom was not entirely wrong. I contracted some kind of California Plague while there and spent my flight back doubled over with body aches, fever, and chills. Overall, well worth it. Happy New Year, everyone!

David Nusinow: Oh GNOES! SCM DISCUSSIONZ0R!!!!!!

After seeing everyone shill for their favorite scm lately, with most of the predictable ones getting the attention, I thought I'd throw my choice out there, just to see it represented.

I primarily use svn with my work on X in Debian, and it's a wonderful system. Fortunately though, I don't have to maintain the repos, and when something goes wrong I can cry to our beloved DPL to get his admin on, and he fixes things up. This works out fairly well for me as a basic user, but I don't want to be dealing with these sorts of hassles for smaller projects. The distributed scm thing appealed to me in this sense, so when arch started to become a serious buzzword in the Debian crowd I had a look.

Well, more than a look. I fought for over a month with tla and baz and found that they were both so unuseable and poorly documented that I couldn't do more than scream and cry. bzr looked cool, but it wasn't ready (I sorta tried to manage one of the X.Org releases in Debian with it and failed miserably). Darcs was slow and in a minority language, which was a major turnoff for me. And I don't have a ton of diskspace, so git was out. Svk struck me as a hack (it still does) so I didn't want to go with that. Monotone was ok, but not good enough, so I sighed, gave up, and went back to svn thinking that this was as good as it could get. Indeed, we added a quilt-based patch system to the Xorg packages, so now I have a mini-scm (quilt) inside an scm (svn) and it works amazingly well.

But one of my friends just got hired by the people who make Xen, and he mentioned that they used mercurial, and asked if I had tried it yet. I scoffed and said no, and that all scm's suck harder than anything has ever sucked before, but I had a lot of time to kill while I was waiting on an X build, so I gave it a look.

Mama, I'm home. I was stunned that I was able to pick up mercurial in about half an hour after tearing my hair out for over a month with arch.

The UI is apparently very darcs-like (by accident, according to the mercurial author) which is known to be fantastic. Branching, merging, etc is simple as can be so far, although upstream is still working out better methods to deal with merging.

It's very fast, built for large trees (i.e. the kernel) so it will be suitable for managing X with (although I haven't tried this yet, but I plan to). For X, I'll need something fast to keep my sanity. This rules out darcs and baz (which has somehow managed to get amazingly slow in addition to being difficult as of late).

Unlike git, it keeps changesets in xdelta format rather than storing whole files, so it doesn't eat my hard drive.

It's written in python, so it's something I could hack on if I want to.

It supports an easy server setup with apache, and you can push your repos and serve them via static http if you don't have a server, like me.

Like monotone, it exposes hashes to the user, but unlike monotone it also provides a local revision number to make sure you don't spend all your time copying and pasting hashes, which is what put me off from monotone.

It has a fairly small command set, with 39 commands in the current tip (i.e. HEAD) as opposed to the > 150 in baz which made me weep.

It feels like using bzr, except it's here now and ready for production. Indeed, it's already used in production in making Xen.

There's a bunch more that I won't talk about, mainly because these are the things that have grabbed me. A note of caution is that I've only been hacking on local projects by myself (mainly configure-debian) with it, so I don't have the tons of real world experience with multiple trees that the thing is built for yet. I'm thinking about putting up a parallel mercurial tree to the XSF tree just for fun (the svn repo would remain the canonical one) if people are interested and I can find a server. I hope though, that all the people out there who, like me, were bouncing around trying out scm after scm and never being quite happy with any of them at least give mercurial a fair chance. I'm still amazed at how much I like it, and I think some others might feel the same.

31 January 2006

Gunnar Wolf: Novel noble ideas for solving the world's problems

Yesterday, the right-wing PAN candidate for the presidency of Mexico, Felipe Calder n, made a declaration that shadows the current president, Vicente Fox (from his same political party) almost look like a genuine statesman. (some links, La Jornada, El Universal) - And that's no easy feat, given that Mr. Fox is -so far- the nation's most prolific president... When it comes to stupid sayings.
How come Calder n rose so quickly to become a statesman? Let me first go through a bit of history. Not much, promise. Well, I'll do my best.
Twelve years and one month ago, Mexicans woke up with the frightening news we had a violent guerrilla group in Chiapas, one of Mexico's richest states, but one with the highest percentages of poor people - and, not coincidentally, of indigenous population as well. This uprising was very soon known all over the world - And its leaders quickly learned how to ensure they would not be prosecuted and exterminated: Simultaneously with the fighting, they made as large a media coverage as they could, strongly supported in the Internet democratization of the information that had just begun. Thousands of people all over the world understood their ideas -at least what they said at that time- and spread the word. I had my first trip in Europe with my (now) wife in 1996, and we saw many grafittis stating Viva Chiapas, Viva EZLN... It was amazing.
EZLN was (is) specially hard for the government to kill. As they don't do military sabotages, terrorism or so on, it is very hard to justify military action. After 12 days of fighting, a truce was decreed. The truce was broken once, in the early years of the Zedillo government, but officially there is a cease-fire, observed by both sides. The Zapatistas have took the ideas and further promoted them, with action. My Chiapas-born friend Alex Ju rez often tells me about the tremendous cultural difference between the Zapatista territories and the paramilitary ones - In the Zapatista areas, you see indians reading books, working their land, organizing themselves in the Fair Government councils, and strongly opposing alcohol and drugs. Just the opposite from the other areas.
EZLN shifted their strategy some months ago, going beyond stating their wishes for a fair regime and waiting for the government to look at them. I still don't really understand where they are heading, but the Sixth Declaration of the Lacandon Rainforest turns them into a political movement, clearly separated from the existing regime. They do not seek to be elected, they oppose every party and candidate. They define themselves as an anticapitalist movement, located down and to the left - Lets see where this goes to.
Well, back on track... One of the president's most famous stupid quotes is that, during his campaign, he promised to solve the Chiapas conflict in fifteen minutes. Well, it's been either fifteen very long minutes, or he just hasn't had any time to devote to those dirty indians. Mexicans are very frustrated by the lack of importance this man gave to one of our country's longest and most desperate needs.
Of course, Felipe Calder n must do something in this regard. Fox's shadow is a big one, and this little man must try to escape from Fox's biggest mistakes. So he just came with a formula that I don't know why no statesman thought of before: Instead of negotiating, instead of working to solve a very difficult problem, he declared he will unilaterally declare peace with EZLN.
I wonder if this year's Nobel prize will go to such an abnegated, smart and selfless person. Man, we could take this same solution to Darfur, to Israel/Palestine, to Congo, to Chechnya... If rulers all over the world start declaring peace unilaterally, all of the world's problems will be solved! What comes next, he will declare (maybe as Salinas did) that we are a first world country? Poor people are only sad reflections in the sand but don't exist in his reality?
Please, Mexicans: The man is clearly schizoid. Are you happy with Foxilandia? It seems that alternate realities are part of the PAN's action program. If you are not satisfied with Fox's results (who is?), don't vote for this guy. We will all regret it.

Axel Beckert: Can the spam problem be solved?

Many have tried to solve spam problem, even Micrsoft (with a quite strange solution ;-), but except personal solutions like well working and well-kept spam filters, no well-working general technical solution has been found yet. Although I really would like to see a technical solution and often think about this problem, I currently believe that this primarily is a social problem which cannot be solved solely with technic. UserFriendly’s Erwin seems to see it the same way and proposed today a quite drastical solution. There are good ideas out there (e.g. SPF, RBL, Greylisting and Teergrubing), but all seem to have their problems, too. Especially RBL often have administrative problems, i.e. if an entry is justified or not. Greylisting simply can be bypassed by being SMTP conform and trying again, so it’s usefulness will decrease permanently. And against Lutz Donnerhacke’s teergrubing, spammers seem to have found workarounds quite quickly. Haven’t heard much about it in the last years. (I just can’t remember what the drawback of SPF was.) For myself I’ve solved the spam problem with a learning SpamAssassin and sorting mail by spam-level into several mailboxes. The higher the spam-level of such an inbox, the more seldom I look into it. Works fine. For me. No general solution though, since the SpamAssassin needs to be fed with fresh spam regularly.

30 January 2006

Daniel Burrows: How much speed are you willing to give up for pretty code?

After experimenting a bit with Haskell and using it for some toy projects, I decided to see if there was any chance it could be used for a non-toy task; i.e., one where it might one day be necessary to actually have fast code. As a proxy for this, I decided to try a very simple task: counting the number of lines in a file. As input, I generated a file with a million lines of random data and an average of 40 bytes per line; all the Haskell programs were compiled with the current GHC in Debian unstable and with optimizations enabled.

The baseline is, of course, our friend "wc":

real    0m0.084s
user 0m0.043s
sys 0m0.040s


(this and all other timing data was taken after "cat /tmp/testwc.txt > /dev/null" to ensure that the file was cached) Now, it's probably too much to hope that a Haskell program will run as fast as a C program does, since the C program can run in a tight loop. But it seems reasonable that it should be possible for Haskell to be competitive with the trivial Python implementation of this program -- after all, Python is interpreted and Haskell is compiled.

import sys
n = 0
for line in sys.stdin:
n += 1
print n


Running this simple Python program under "time" produces the following statistics, a bit less than 10 times slower than the C version:

real    0m0.698s
user 0m0.643s
sys 0m0.050s


The trivial Haskell program to count the lines of its input is:

main = do c <- getContents ; print $ length $ lines c


Note that this is basically identical to the Python program, but expressed in a functional style. Pretty, but how does it stack up?

real    0m6.744s
user 0m6.426s
sys 0m0.213s


OW! Ten times slower than the Python code, and a good 80 times faster than "wc"! The gap can be lowered to "only" 50 times with the following program --

do c <- getContents; print $ length $ elemIndices '\n' c


-- but surely it's possible to do better. I'd expect that the expense here is in the use of lazy streams for IO; eliminating them gives us the following code:

wc :: Handle -> IO Int
wc h = do a <- mallocArray bufSize :: IO (Ptr Word8)
loop a 0
where loop a n = do amt <- hGetBuf h a bufSize
elts <- peekArray amt a
(if amt == 0
then return n
else loop a $! n + nlCount elts)


At this point, we're basically using Haskell as a (bad) imperative language. This function allocates a buffer, repeatedly reads into it, and counts the number of newlines in the buffer (I dropped some auxillary code to keep the post short). The $! is important; without it, even though this routine is tail-recursive, Haskell will still allocate an unbounded amount of memory to store the return value. (because, of course, it's terribly important to remember that you're actually returning "1+2+3", not "6")

So, how does this unreadable, hand-optimized version of the code perform?

real    0m1.980s
user 0m1.757s
sys 0m0.094s


That's right -- I've eliminated most uses of higher-level functional techniques, and the Haskell version is still two times slower than an ultra-high-level interpreted language, while also being uglier and harder to read! Ouch. It appears the old performance albatross of functional languages is not quite dead yet.

22 January 2006

Matthew Palmer: The Future Is FUSE

Well, probably not, but it's a nice catchy headline. <grin> What I do think is that there is a pile of unexplored functionality hiding in mapping more things to regular filesystems. FUSE has lowered the barrier to providing access to non-traditional filesystem places -- there's versioned filesystems, SFTP (of the SSH variety) filesystems, filesystems into tarballs and zip files, and so on. Implementing a FUSE filesystem is as simple as whipping up a few callback methods in your favourite programming language (the native bindings are, of course, in C, but there's FUSE libraries for Python, definitely, and I'm fairly sure I've seen Perl and Ruby ones as well) to implement things like stat, open, read, and so on. Then you run the program as per normal and suddenly you can read and write things you've *never* read or written before... Beyond the mundane extensions of reality listed above, there's whole new vistas of relatively unexplored territory for filesystem-like operations, which are (a) waiting to be explored, and (b) much easier to implement due to the fun of FUSE. For example, SQL databases are very hierarchical in nature. Databases contain tables which contain rows which contain fields which contain values. If you can track your foreign keys, some of those values can be symlinks/directories to other records, or a directory of records for join tables. Sure, it's horribly inefficient to update whole tables by for i in *; do echo 12 > $i/fieldname; done, but at the very least it could be an interesting way of viewing data, and with some judicious caching (depending on use-case) the performance could probably be made half-sensible. A more refined version of this is the idea of reporting into pseudo-flatfiles. Imagine if you could open a file and have a spreadsheet of all of your data. With FUSE, it's possible. A killer one that my boss Dave Kempe came up with is a search filesystem -- you create a directory in this FUSE filesystem that is named after a search query -- perhaps "2005 financial". A Google Desktop-style search then results every time you enter that directory, and all matching files are available for your viewing pleasure. I understand that gmail works something like this "virtual folders with search" model, and I know that applications like Evolution and Liferea already have some sort of virtual folders type of thing, but we don't think that anyone's written something like this for filesystems. Considering that you can run a FUSE filesystem over Samba, you can easily have a company-wide document search-and-retrieval with persistent (and shared) queries, which is probably a pretty valuable thing. Even all of these, though, are relatively tame ideas when weighed against the myriad of things that my tiny mind can't even dream up. I don't think people have put much thought into how far a filesystem really can go, because before FUSE, if you wanted to write a filesystem, you were pretty much restricted to kernel-mode programming -- a very limited (and dangerous) world for your average application programmer.

20 January 2006

Thomas Hood: Flood defenses

I was recently reading a report written in 2004 on the safety of Dutch flood defenses. One of the more interesting sections was a comparison of Dutch flood defense policy with that of other countries, including the United States.

In the Netherlands large sums of money are spent maintaining the dikes. It is not possible to achieve perfect safety; however, it is possible to estimate risks. In the Netherlands it is reasoned that it is justifiable to spend additional money increasing the effective height of dikes up to the point where it costs more to add the next centimeter than that centimeter will "save", where the calculated saving is equal to the reduced economic losses due to flooding. Because the cost of flooding Holland would be large, the policy that emerges from this analysis is that the dikes protecting Holland should be built to withstand water levels that occur once per 125,000 years on average.

In the United States the corresponding figure is typically once per 100 years. That is, the government chooses to accept a frequency of flooding that is one thousand times as high as that considered acceptable for Holland. (The dikes around New Orleans are built to an even lower standard.)[0] This is a deliberate policy which is paired with the view that citizens should be free to make their own choices: someone can build in an area vulnerable to flooding, but then he probably won't be able to get flood insurance and therefore won't be able to get a mortgage.

Recent events have to be considered in this light.

[0]UPDATE: I have discovered that the exact figure for New Orleans is 200 years. That is, once the current programme of levee upgrades is complete, the New Orleans levee system should fail with an annual probability of 0.5%. As yet I have found no hard figures for the failure probability of New Orleans levee system prior to the completion of the upgrade programme.
The project we're talking about here that has failed is an element of the Lake Pontchartrain project, and in its early design stages it was meant to provide protection from a two- or three-hundred-year event that might strike the city; so we were looking at a very low-probability event and we designed with that in mind. -- Lieutenant General Carl A. Strock, Chief of Engineers, U.S. Army Corps of Engineers, at a news conference on 1 September 2005
The point stands that Dutch policy makers have a very different idea of "low probability" when it comes to floods. Dutch water defenses are built to have an annual failure probability of 0.0008%.

Amaya Rodrigo: For fun and profit^W^W^W^WJust for fun...

Don t you love it when it looks simple and then it is actually simple, but you are not up to the task?

I am loving the xlibs-dev transition, really, I mean it! Two of my packages, fkiss and xdigger got bit by this issue, and I immediately fixed the bugs with a little help from a script provided by Moritz Muehlenhoff. really cool.

So I follow instructions in The Debian Wiki, run the script, check with pbuilder, upload and profit! Fun! End of world hunger! Err, almost. So I get all excited and decide to look at the bugs. And I find a nice one: #346347. Not bad, gpsim FTBFS, Luk also took a look at it and didn t really like what he saw, it neede no xlibs-dev or substitute for them and sitll FTBFS.

But wait! Just by looking at gpsim s bugs page, I find out that there s a New Upstream Version(tm) (#248931) available since 1 year and 241 day ago. Also, NMUs that have not been acknowledged for as long as almost two years... Not nice. And there s even a patch (#345215) for building it on, GNU/kFreeBSD... how sexy!

So I get all obsessive about it. But newer upstream needs a newer libgtkextra-dev version (#347397), which of course was not packaged (don't we all love Murphy?) and that s where I am stuck at. I loathe libraries. But still I gave it a try. And failed. Several times.

Fun? Yes! Profit? Nope! Do you want to take a look at it? Easy. It s all here.

Amaya also FTBFS. And I want to NMU amaya. Badly. Since I first heard about amaya, and realized that I am named after a web browser (sucky as it might be) and after getting many IRC highlights (every time that amaya FTBFS is mentioned on IRC), I have been wanting to use/adopt/NMU it. Amaya NMUs amaya, how recursive can it get?

I will go to bed now, and try not to keep thinking about it, not because I want to become an early riser, Gunnar, no need to worry! But reading about it I thought it would be healthier for me to wake up everyday at the same hour, so that s all I am aiming for. If you know me, you might be rolling on the floor laughing as you read this. So am I! But, if you know me, keep in mind that I have been drinking coffee with no sugar since August... Hey! You are not laughing anymore?

Vi and Emacs are doing fine. Emacs was not pregnant after all, or so the vet told me. It was hard to see her slowly become herself after surgery. Vi was perfectly OK all along, but she looked terrible. Anyway, she felt better by 6am the next day and came to bed, perfectly groomed, and purring like nothing had happened. A week has passed and she has started doing the gory part today... she s biting away the scar tissue, and it bleeds a bit. Oh my Spaghetti Monster!

15 January 2006

Edd Dumbill: Are web services and e-business interesting?

A couple of people have commented to me on the lack of explicit reference to web services or e-business technologies in the XTech call for participation. It's worth explaining why this is so. On web services: I consider the low-level specs here (SOAP, REST, WSDL) now to fall under "core technologies" track, and the higher level stuff (WS-*) to be often vacuous spec-mongering. Also, over the years, the quality of web service proposals submitted to the conference has been notably poor compared to all the other topics. A lot of this was to do with the hype web services received. On e-business, some useful submissions have been forthcoming, but never more than a few. My suspicion is that the OASIS stream of events is more interesting for most people in this space--I'd love to hear otherwise. I do view e-business presentations as on-topic, but I would like to find those that genuinely present something worthwhile. While many people often say they'd like to see more case studies, turnout for these is always low at the conference itself, so I've shied away from them somewhat. The thing with case studies is that they're necessarily related to a domain, and it's easy to for attendees to assume there's not transferable experience to be heard. I guess I don't believe either that all the problems in the e-business space are unique to that area. Identity, federated service location, transactions are all topics that deserve a broad audience. However, I acknowledge that I do not work daily in the e-business sphere and I would dearly love to hear somebody who does do a presentation on why there's really some solid things going on there now. Exchange of best practices is more necessary than ever. More reason not to hive off e-business from the other matters in the conference. For a similar reason I've mixed semantic web topics throughout the tracks as well. If anyone working in e-business didn't get useful knowledge out of XTech, I'd be astounded. Likewise, those working in e-business have plenty useful to say to the rest of the conference.
  • only 4 days left to submit a proposal for XTech 2006 (Amsterdam, May 16-19) -- do it now

Edd Dumbill: Are web services and e-business interesting?

A couple of people have commented to me on the lack of explicit reference to web services or e-business technologies in the XTech call for participation. It's worth explaining why this is so. On web services: I consider the low-level specs here (SOAP, REST, WSDL) now to fall under "core technologies" track, and the higher level stuff (WS-*) to be often vacuous spec-mongering. Also, over the years, the quality of web service proposals submitted to the conference has been notably poor compared to all the other topics. A lot of this was to do with the hype web services received. On e-business, some useful submissions have been forthcoming, but never more than a few. My suspicion is that the OASIS stream of events is more interesting for most people in this space--I'd love to hear otherwise. I do view e-business presentations as on-topic, but I would like to find those that genuinely present something worthwhile. While many people often say they'd like to see more case studies, turnout for these is always low at the conference itself, so I've shied away from them somewhat. The thing with case studies is that they're necessarily related to a domain, and it's easy to for attendees to assume there's not transferable experience to be heard. I guess I don't believe either that all the problems in the e-business space are unique to that area. Identity, federated service location, transactions are all topics that deserve a broad audience. However, I acknowledge that I do not work daily in the e-business sphere and I would dearly love to hear somebody who does do a presentation on why there's really some solid things going on there now. Exchange of best practices is more necessary than ever. More reason not to hive off e-business from the other matters in the conference. For a similar reason I've mixed semantic web topics throughout the tracks as well. If anyone working in e-business didn't get useful knowledge out of XTech, I'd be astounded. Likewise, those working in e-business have plenty useful to say to the rest of the conference.
  • only 4 days left to submit a proposal for XTech 2006 (Amsterdam, May 16-19) -- do it now

Edd Dumbill: Are web services and e-business interesting?

A couple of people have commented to me on the lack of explicit reference to web services or e-business technologies in the XTech call for participation. It's worth explaining why this is so. On web services: I consider the low-level specs here (SOAP, REST, WSDL) now to fall under "core technologies" track, and the higher level stuff (WS-*) to be often vacuous spec-mongering. Also, over the years, the quality of web service proposals submitted to the conference has been notably poor compared to all the other topics. A lot of this was to do with the hype web services received. On e-business, some useful submissions have been forthcoming, but never more than a few. My suspicion is that the OASIS stream of events is more interesting for most people in this space--I'd love to hear otherwise. I do view e-business presentations as on-topic, but I would like to find those that genuinely present something worthwhile. While many people often say they'd like to see more case studies, turnout for these is always low at the conference itself, so I've shied away from them somewhat. The thing with case studies is that they're necessarily related to a domain, and it's easy to for attendees to assume there's not transferable experience to be heard. I guess I don't believe either that all the problems in the e-business space are unique to that area. Identity, federated service location, transactions are all topics that deserve a broad audience. However, I acknowledge that I do not work daily in the e-business sphere and I would dearly love to hear somebody who does do a presentation on why there's really some solid things going on there now. Exchange of best practices is more necessary than ever. More reason not to hive off e-business from the other matters in the conference. For a similar reason I've mixed semantic web topics throughout the tracks as well. If anyone working in e-business didn't get useful knowledge out of XTech, I'd be astounded. Likewise, those working in e-business have plenty useful to say to the rest of the conference.
  • only 4 days left to submit a proposal for XTech 2006 (Amsterdam, May 16-19) -- do it now

Matthew Palmer: Evolution vs Revolution

To rewrite, or not to rewrite, that is the question. If there's one thing programmers seem to love doing, it's rewriting a piece of software from scratch. Which is funny, because "the industry" spends a lot of time bemoaning duplication of effort and generally touting "reusability" and "component-based software development". Joel on Software has a fairly good treatise on why rewriting software, in general, is a Bad Thing. I may not agree with him all the time, Joel is always worth a read, and I certainly can't fault his reasoning on this issue. My primary experience with rewriting software, as with most things software-related, is in the Free Software world. Although I've been involved in (or led) rewrites of proprietary software in the past, I've seen a lot more "let's rewrite it all" death-marches in FOSS. While I wouldn't characterise them universally as "failures", they don't seem to have the beneficial effect the authors were probably hoping for. What does seem to happen, in these FOSS projects, is that the developers squirrel themselves away in their backyard labs, using the latest and greatest in software engineering processes and tools, to produce... the same end result. (If you produce something totally different, it's not a rewrite, it's a new piece of software that does much the same things as the old one). When I say "the same end result", I mean exactly that -- it does the same thing, the code is still subject to coderot over time, and so on. It doesn't seem like much useful output has been produced. So why do we do it? Joel gives some good reasons (and why they're not such good reasons). Rewrites always take a very, very long time to do. It's in their nature. They're also very demoralising -- you're not really creating anything new, you're just recreating existing functionality. In the beginning, though, it's amazingly exciting -- a whole new world of bugfree code, an engineering marvel, something for the annals of software history. But several months later, as your new code is becoming cruftier by the day, and you're just duplicating functionality that already exists, you get bored. And boredom is the death knell of FOSS projects. I presume that this excitement-fading-to-boredom progression is why everyone starts rewrites, but they're often abandoned (or, at least, take a lot longer to complete than estimated). I'd make a comparison to that favourite target of unfair comparisons, marriage, but I know my wife reads my blog, so I won't. <grin>. This boredom factor is what has affected the python-appserver backed rewrite of IRM (from php3-style PHP). I took on maintenance of the existing PHP codebase over a year ago, and the rewrite had been in progress for a while at that point. IRM now has a bunch of useful new features, and there still isn't any indication of a useable tarball emerging from the rewrite. A rewrite in progress is a terrible thing. It tends to make people wary of working on the existing codebase, if it's going to be a deadend. Without something to work on, they'll tend to wander off to other projects. However, sometimes (due to existing deployments), users will work on the deadend. If the developers have been more-or-less neglecting the existing codebase while they take on their glorious rewrite, then the rest of the world is going to have been playing with and tweaking the existing code, adding their own improvements and modifications. The result of this, when the new rewrite finally releases, is that there's great wodges of third-party code that's incompatible with the rewrite, and a large chunk of your userbase says "stuff it" and sticks with what they know. This is what looks like happening in the world of SysCP. A few days ago, I found out that they're planning on doing a rewrite from the functional-spaghetti-PHP of the current version to the cult-of-MVC-PHP. This is nice, but their current estimate is of a first RC release in February. I take this estimate with a boulder of salt -- for the full collection of usual reasons (boredom, real life, overoptimism, etc). The fact that there's not a huge amount of movement on the commit log doesn't inspire confidence, either, and despite early claims of a massive development team, only one person has been committing recently. In the meantime, I'm tasked with adding a number of small features to the current SysCP codebase, which we need for work. When the rewrite comes out, it's highly unlikely that there will be a business case for rewriting my features for the new code, and it's not likely that the features we need will make it into core. So, SysCP will probably fork -- the old, featureful, crufty codebase, vs the new, shiny codebase. If there's sufficient new features to warrant an upgrade, we'll take the plunge, but what SysCP does now is very close to what we want, so it'll take a fair amount of shiny! to get us to move. This is a general issue of software development in FOSS -- if you take your eye off the ball, for any reason, someone else will probably pick it up and run with it. Your rewrite will be a completely new project, and you'll get some of the users and the fork of your old codebase will continue to live on in another guise. Let's face it, though -- your code is going to accumulate cruft. Over time, it morphs into this bletcherous pile of huge functions, multi-purpose classes, and reams and reams of bug reports. How do you deal with this cruft? Surely at some point it's easier just to throw it out and start again? Reality says no. Joel gave the key advice in the article linked above (go read it if you haven't already -- seriously), and it's strongly hinted in my article title. Don't revolt; instead, evolve your codebase. Tweak it, evolve it, move it slowly (and compatibly) towards your utopian ideal of perfect code. You won't get there, but you'll almost certainly get closer by gradual and continuous improvement than you would be going back to the start line and walking in a different direction. There's one big question that's nagging at me, though -- what happens when you want to switch languages? I'm loving Ruby on Rails at the moment, and so are several other people at work, but we've got (both personally and professionally) huge swathes of code in PHP (and other second-rate languages) that needs to be dealt with. It's a lot harder to evolve code into a different language than apply a gradual degunking. I have a number of ideas on this point, but I'd love to hear your ideas too. In a few months, I'll have a lot better idea of what works and what doesn't in massive PHP to Rails conversions, and I'm sure everyone out there in the blogosphere will hear about them in due time.

14 January 2006

Joachim Breitner: On the right way - Meme Time

I usually try not to blog every meme I take (heay, that’s a line from “I’ll be blogging it”), but Alex’ positive view on this one made me interested. And indeed, this quiz seems to be relatively well done. So here it is:
You scored as Mathematics. You should be a Math major! Like Pythagoras, you are analytical, rational, and when are always ready to tackle the problem head-on!

Mathematics
92%
Theater
92%
Philosophy
92%
Engineering
67%
Psychology
58%
Biology
58%
Journalism
50%
Linguistics
50%
Sociology
50%
Dance
42%
English
33%
Anthropology
33%
Chemistry
33%
Art
25%

What is your Perfect Major?
created with QuizFarm.com
Nice result, so far, as I’m currently studying mathematics, and sometimes have a tendency to what we Germans call “Theater machen”. Personally, I’d expect Journalism a bit higher...PS, to the readers of planet.debian.org: I’m sorry for the random pop ups of old and/or German postings. I have no idea what causes them, and I’m glad to hear hints. The posts seem to actually come from the cache of the planet software itself, and something (me?) caused planet to dig them out again.

12 January 2006

Matthew Palmer: Xinerama is the r0x0r

I was motivated, this morning, to look into whether my laptop chipset (Intel 915GM, for anyone interested) could do this funky multihead thing. Much to my surprise, it was (a) possible, (b) quite simple, and (c) incredibly useful. I now have a 15" Dell LCD screen on a cardboard box behind my laptop docking station. What is it useful for, you ask? Let me count the ways (with the help of the <ol> tag, of course):
  1. I've gotten a couple of PDF versions of my current "must always have with me" technical books (Programming Ruby and Agile Web Development With Rails, since you didn't ask), and now I can stick them on the other monitor to refer to while I'm coding.
  2. I can stick my xchat window up on the external monitor, so I can quickly glance at what's going on without having to touch anything. With the ability to stick a window on all desktops, I can have xchat no matter where I go!
  3. If I want to show somebody else something, it's handy to be able to push it up onto the top screen so they can more easily see it without having to crane down at my laptop screen (plus, if they go "what about <smudge>that?</smudge>", it's work's monitor that's getting grotted on, not my laptop screen that I have to stare at for 10+ hours a day).
Since I rarely (read: never unless I'm forced to) reboot my machine, instead relying on the magical marvels of sleep/hibernate, I did have one major concern with this multihead thing -- when I'm out-and-about, obviously I'm not going to have my external monitor with me, so how do I view things that are up on the other screen (either because I left them there when I was in the office, or because the window autoplacer stuck them there)? It turns out to be a fairly trivial and rarely noticed problem (except when I shove the mouse at the top of the screen to hit a button and my mouse disappears off into the wilderness). The answer to the invisible window problem is trivial -- I wave my mouse around where I can't see it until the window I want is highlighted in the miniview, then hit Alt-M to lasso it, and drag the little beastie into the light. Much easier than trying to guess where the title bar is to bring it down. In the interests of sharing the love (and having a record of what I did for next time), here is the sum total of what I had to add to my xorg.conf to make it all work on Ubuntu Breezy (along with some comments to make it easier to understand what's happening):
Section "ServerFlags"
        Option  "DefaultServerLayout" "double"
        #Option "DefaultServerLayout" "Default Layout"
EndSection
# This Device section is effectively identical to the one for the
# primary screen, with the addition of the Screen 1 parameter to
# select the alternate display device.
Section "Device"
        Identifier      "vgaout"
        Driver          "i810"
        BusID           "PCI:0:2:0"
        Option          "MonitorLayout" "CRT"
        Screen          1
        Option          "DDC" "false"
EndSection
# external display
Section "Monitor"
        Identifier      "generic"
        # I kept all these loose because most monitors support
        # autodetection.
        HorizSync       27 - 96
        VertRefresh     50 - 110
        Option "DPMS"
EndSection
Section "Screen"
        Identifier      "external"
        Device          "vgaout"
        Monitor         "generic"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                # I'd have added many more modes here, but
                # the amazingly crufty external LCD I'm using
                # only supports 1024x768.
                Modes           "1024x768"
        EndSubSection
EndSection
# xinerama layout
Section "ServerLayout"
        Identifier      "double"
        # The 0 0 (I think) identifies this as the "root" monitor
        Screen          "Default Screen" 0 0
        # You can also use Below, LeftOf, or RightOf to position
        # your shiny subscreen
        Screen          "external" Above "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        # Never, ever forget this option.  You'll get laughed at
        Option          "Xinerama" "true"
EndSection

11 January 2006

Lars Wirzenius: Debian: On using phones

Martin Krafft asks why some people don't like telephones. I'm one such person. Telephones are error-prone, low-bandwidth and high latency communication media that still require real-time response. I like having a conversation face to face, but using a telephone cuts out almost all the bandwidth from that, so that you can only rely on voice, and not even the full spectrum of that. What with a limited spectrum of frequences, low sound volume even at the highest setting (I have bad hearing), strange accents, and generally abysmal sound quality (background noise makes it almost impossible to hear what the other person is saying), it takes a lot of time to get anything settled over the phone. IRC, for example, is in many ways similar, but it differs from a telephone in two different aspects: you don't need to react within seconds, and messages get through loud and clear (well, big-fonted and clear). Even if a telephone call may be shorter than an IRC discussion, it requires much more effort to happen, and on the whole is not as productive. This doesn't mean I'd refuse to discuss something over the phone, but I'd really, really rather not.

10 January 2006

Amaya Rodrigo: For fun and profit^W^W^W^WJust for fun...

Don t you love it when it looks simple and then it is actually simple, but you are not up to the task?

I am loving the xlibs-dev transition, really, I mean it! Two of my packages, fkiss and xdigger got bit by this issue, and I immediately fixed the bugs with a little help from a script provided by Moritz Muehlenhoff. really cool.

So I follow instructions in The Debian Wiki, run the script, check with pbuilder, upload and profit! Fun! End of world hunger! Err, almost. So I get all excited and decide to look at the bugs. And I find a nice one: #346347. Not bad, gpsim FTBFS, Luk also took a look at it and didn t really like what he saw, it neede no xlibs-dev or substitute for them and sitll FTBFS.

But wait! Just by looking at gpsim s bugs page, I find out that there s a New Upstream Version(tm) (#248931) available since 1 year and 241 day ago. Also, NMUs that have not been acknowledged for as long as almost two years... Not nice. And there s even a patch (#345215) for building it on, GNU/kFreeBSD... how sexy!

So I get all obsessive about it. But newer upstream needs a newer libgtkextra-dev version (#347397), which of course was not packaged (don't we all love Murphy?) and that s where I am stuck at. I loathe libraries. But still I gave it a try. And failed. Several times.

Fun? Yes! Profit? Nope! Do you want to take a look at it? Easy. It s all here.

Amaya also FTBFS. And I want to NMU amaya. Badly. Since I first heard about amaya, and realized that I am named after a web browser (sucky as it might be) and after getting many IRC highlights (every time that amaya FTBFS is mentioned on IRC), I have been wanting to use/adopt/NMU it. Amaya NMUs amaya, how recursive can it get?

I will go to bed now, and try not to keep thinking about it, not because I want to become an early riser, Gunnar, no need to worry! But reading about it I thought it would be healthier for me to wake up everyday at the same hour, so that s all I am aiming for. If you know me, you might be rolling on the floor laughing as you read this. So am I! But, if you know me, keep in mind that I have been drinking coffee with no sugar since August... Hey! You are not laughing anymore?

Vi and Emacs are doing fine. Emacs was not pregnant after all, or so the vet told me. It was hard to see her slowly become herself after surgery. Vi was perfectly OK all along, but she looked terrible. Anyway, she felt better by 6am the next day and came to bed, perfectly groomed, and purring like nothing had happened. A week has passed and she has started doing the gory part today... she s biting away the scar tissue, and it bleeds a bit. Oh my Spaghetti Monster!

9 January 2006

Benjamin Mako Hill: Principles, Software and Freedom

Apologies to anyone that finds this preachy or holier-than-thou. I don't consider myself immune to this criticism: my mobile phone still runs non-free software. I realize that what I describe here is a process for everyone. I'm just trying to make sure nobody gets too comfortable with the status quo. It's been interesting to see non-hackers finding inspiration in the free/open source software movement. In particular, I've been watching this phenomena for a couple years in the the non-profit and NGO sector. Folks in these groups are often very philosophically aligned with the freedom movement behind free software and there are a number of organizations that are involved in promoting free software and the ideas behind it to NGOs and beyond. What's amazing to me is that in many situations, major advocates of free and open source software in these areas -- people who are advocating the software because of the freedom and not only for the pragmatic benefits -- don't actually use free software on their desktops or in other places they could. Sure, everyone uses Firefox. Sure, everyone uses Apache and GNU/Linux for their web servers. Sure, everyone uses Drupal, Mambo, Plone, or another free CMS. But one can't help but notice that Firefox, Apache, and free CMSs are higher quality, more featureful, and easier to use than the proprietary alternatives. People arguing for free software from a principled position need to remember that principled positions are sometimes inconvenient. Free software is no exception. It's frequently different, sometimes incompatible and a bit more work. In some situations (dare I say it?), it's not as good as the proprietary alternatives. We all need to remember that living a principled life is not always the easiest path. If you take a principled position against GMO foods or in favor of organic produce, you'll probably spend more and shop farther from your house. Your favorite fruit may not be in season year-round. If you only buy fair-trade clothing, your garment choices will be cut down in ways that will sometimes be inconvenient. It's nice when taking a principled position also means you get to do what is most convenient. But there's little principle in taking a principled position only when it's convenient. Yes. There are problems -- often major -- with free software: usability, documentation and otherwise. There are also ways to address these problems. Few of them require that you be or become hacker but almost all of them involve using the software first. I don't have to think hard to recall all of the times I've received contributions (e.g., documentation, suggestions, translations, patches, etc.) from people who don't use my software. If you don't think that spreading free software is an ethical act, you can happily ignore me. If you agree that it's the right thing, think hard about your principles and challenge yourself to take the next step -- whatever that is.

6 January 2006

Erinn Clark: Standby passengers love me

Usually waking up an hour after your flight has left is a bad sign -- like, a sign of imminent doom, that things are about to get horribly worse. At least, that's how it usually feels and this being the third 6:25am flight I missed in 2005, I was well-accustomed to that feeling. Luckily I got re-routed through Tampa, then Los Angeles, and I finally ended up in my San Jose, CA destination with a lovely Val awaiting me. She seemed shocked; said I was far shorter than she expected, then she realized I was walking with a group of Stanford basketball players and that, though they dwarfed me, I still managed to have at least an inch on her. (Val is "5'9 and three quarters!", according to her.) A lot of the visit was a bit of a blur. After arriving, I quickly showered, and was promptly told by Val that my skater rat apparel just wouldn't do and that our New Year's Eve party was meant to be dressy. A black shirt and some funky necklace managed to placate her, luckily, as well as my excuse of having just flown in from out of town with no instructions to dress pretty. Off to the party, where I met a load of brilliant and entertaining people, including Lina who was positively heartbroken by the lack of fireworks.
Lina and me in the ballpit The next day included eating vegan duck for breakfast, visiting Google offices for fun (not profit), getting lost with Val in some frightening redwood forest, Indian food in SF with Janet, Jen, and Val. Actually, the Indian food might deserve an entry of its own -- the owner of the restaurant actually spoonfed me, which was bizarre and funny. Afterwards, we went to visit Kristal and laughed at various things, including the most hilarious website ever. "Oh yeah baby, check out my throughput." Of course, that feeling of imminent doom was not entirely wrong. I contracted some kind of California Plague while there and spent my flight back doubled over with body aches, fever, and chills. Overall, well worth it. Happy New Year, everyone!

5 January 2006

Edd Dumbill: Are web services and e-business interesting?

A couple of people have commented to me on the lack of explicit reference to web services or e-business technologies in the XTech call for participation. It's worth explaining why this is so. On web services: I consider the low-level specs here (SOAP, REST, WSDL) now to fall under "core technologies" track, and the higher level stuff (WS-*) to be often vacuous spec-mongering. Also, over the years, the quality of web service proposals submitted to the conference has been notably poor compared to all the other topics. A lot of this was to do with the hype web services received. On e-business, some useful submissions have been forthcoming, but never more than a few. My suspicion is that the OASIS stream of events is more interesting for most people in this space--I'd love to hear otherwise. I do view e-business presentations as on-topic, but I would like to find those that genuinely present something worthwhile. While many people often say they'd like to see more case studies, turnout for these is always low at the conference itself, so I've shied away from them somewhat. The thing with case studies is that they're necessarily related to a domain, and it's easy to for attendees to assume there's not transferable experience to be heard. I guess I don't believe either that all the problems in the e-business space are unique to that area. Identity, federated service location, transactions are all topics that deserve a broad audience. However, I acknowledge that I do not work daily in the e-business sphere and I would dearly love to hear somebody who does do a presentation on why there's really some solid things going on there now. Exchange of best practices is more necessary than ever. More reason not to hive off e-business from the other matters in the conference. For a similar reason I've mixed semantic web topics throughout the tracks as well. If anyone working in e-business didn't get useful knowledge out of XTech, I'd be astounded. Likewise, those working in e-business have plenty useful to say to the rest of the conference.

1 January 2006

Antti-Juhani Kaijanaho: A restrospective on a functional programming course

During the last two months, I taught an elective course on introductory functional programming. The nominal target group was third-year information technology undergrads, but in practice the student body consisted of everything from second-years to almost-done masters students. All had taken at least a year’s worth of general programming courses (taught in Java most recently, earlier in C++), a full semester’s worth of data structures, a half-semester of automata and grammar theory and some mathematics. I have enough teaching experience (been teaching two courses a year since 2002) to know my faults. My biggest fault is that I routinely underestimate the difficulty and laboriousness of tasks I set for my students. My second biggest fault is that if I am not careful, I can easily revert to reciting reference material, that is theoretical definitions, instead of giving a tutorial. I am better at avoiding the latter fault than the former, although when I have little time to prepare, the latter fault will, too, manifest itself. Knowing these faults, I tried to plan this course so that there would not be such trouble. Reading Baen books, I have learned a military saying: Battle plans never survive contact with the enemy. I found myself in a similar situation: my course plan did not survive contact with the actual teaching situation. The broad outlines of what I was going to teach held mostly. Other than that, it ended up being a very different course than I had originally envisioned. I started by giving a crash course on Haskell IO: how to write simple text-line-based interaction in Haskell. The idea was to introduce early the part of Haskell that many people think is hard but is actually quite easy, by explicitly drawing on the students’ imperative programming background. After IO, I ended up trying to give the students a broad, working knowledge of pure functional programming in Haskell, starting with first-order list processing and further discussing topics like parsing, persistent data structures, higher-order list processing, et cetera. I found that it was hard to give any of the topics proper room time-wise, as the basic concepts of functional programming are somewhat circularly related. At this time, the students complained that the course is hard, and many dropped out. They shouldn’t have; we had covered the main topics of the course in half the time. I could then use the rest of the time to go over the topics again from a different point of view, and give them time and tools to integrate it all to their own internal know-how databases. In the latter part of the course, on the surface we discussed Haskell metacircularly, but that was mainly a tool to reinforce the stuff done earlier in the course. Of course, my exercises were a little on the harder side. I ended up lowering official expectations about how much of the exercises the students were expected to solve, and that seems to have helped. Of the 20 people who took the first exam, 18 passed. The advanced course starts in a week or two.

Next.

Previous.