Search Results: "ah"

22 June 2006

Christian Perrier: Computerworld.au news entry about Dzongkha Linux

After the DzongkhaLnux launch event which I already blogged about as well as published a report in debian-devel-announce, I got interviewed by Computerworld.au. They turned this interview into one of their head stories, which IMHO gives Debian an interesting exposure. Moreover, I am very happy of the way they wrote the story, which gives Debian the credit it deserves in that story and gives a very good transcription of my own ideas about free software. It also puts yet more exposure on the Bhutanese authorities initiative and I think they really deserve it as well. Thanks indeed to Pascal Hakim who made this possible and to Dahna McConnachie who wrote the news entry and conducted the interview.

20 June 2006

Roland Mas: Free as in freelance

It’s official: I’m going to be on extended unpaid leave from my employer starting on the 22nd of June, for at least a year. I’ve been a part-time free software freelance for two years and a half, and I think now is a good time to grow that activity. Also, since I was hired almost seven years ago, the company grew (well, “was assimilated” is more like it) from about fifteen people (small start-up) to more than two hundred thousand (France T l com / Orange, you may have heard of them), and the growth pains haven’t quite subsided yet. So I hope I’ll get a breath of fresh air, at least, in case my venture goes flop and I go back to FT next year. So yeah, I’ll be freelancing on everything I can, but my initial focus will probably stay on Gforge, Debian and related topics. Feel free to browse my Gnurandal website and contact me if you’re looking for someone. I’m based in France, but if the job can’t be done via Internet, I’d be happy to fly to all sorts of places.

Aigars Mahinovs: Another blog move

Got access to a new, more powerful server, moved my blog from Mnemosyne to Wordpress, hopefully did not flood p.d.o, did not move the comments over yet. And not to flood the planet.d.o with the move I did this little change to the Wordpress feed - at the very end of the wp-atom.php file there is this line:
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty ...
So I changed it to this:
<?php $items_count++; if ((($items_count == get_settings('posts_per_rss')) $post->post_date < 1150758000 ) && empty ...
Where 1150758000 is the UNIX time of some point between the last post from the old blog and the first post in the new blog. And I also imported my old posts entries from an Atom feed using the rss feed import as a base. The diff is after the break
--- rss.php 2005-12-28 22:24:12.000000000 +0200
+++ atom.php 2006-06-18 18:26:03.000000000 +0300
@@ -1,13 +1,13 @@
< ?php -class RSS_Import
+class Atom_Import var $posts = array ();
var $file; function header()
echo '<div class="wrap">';
- echo '<h2>'.__('Import RSS').'</h2>';
+ echo '<h2>'.__('Import Atom').'</h2>';
function footer()
@@ -21,8 +21,8 @@
function greet()
- echo '<p>'.__('Howdy! This importer allows you to extract posts from any RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.').'</p>';
- wp_import_upload_form("admin.php?import=rss&step=1");
+ echo '<p>'.__('Howdy! This importer allows you to extract posts from any ATOM 1.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an Atom file to upload and click Import.').'</p>';
+ wp_import_upload_form("admin.php?import=atom&step=1");
function get_posts()
@@ -33,14 +33,14 @@
$importdata = implode('', $datalines); // squish it
$importdata = str_replace(array ("\r\n", "\r"), "\n", $importdata); - preg_match_all(' <item>(.*?)</item> is', $importdata, $this->posts);
+ preg_match_all(' <entry>(.*?)</entry> is', $importdata, $this->posts);
$this->posts = $this->posts[1];
$index = 0;
foreach ($this->posts as $post)
- preg_match(' <title>(.*?)</title> is', $post, $post_title);
+ preg_match(' <title [^>]*>(.*?)</title> is', $post, $post_title);
$post_title = $wpdb->escape(trim($post_title[1])); - preg_match(' <pubdate>(.*?)</pubdate> is', $post, $post_date);
+ preg_match(' <published>(.*?)</published> is', $post, $post_date); if ($post_date)
$post_date = strtotime($post_date[1]);
@@ -68,13 +68,13 @@
$cat_index++;
- preg_match(' <guid .+?>(.*?)</guid> is', $post, $guid);
+ preg_match(' <id>(.*?)</id> is', $post, $guid);
if ($guid)
$guid = $wpdb->escape(trim($guid[1]));
else
$guid = ''; - preg_match(' <content :encoded>(.*?)</content> is', $post, $post_content);
+ preg_match(' <content [^>]*?>.*?<div .*?>(.*?)</div>\s*?</content> is', $post, $post_content);
$post_content = str_replace(array ('< ![CDATA[', ']]>'), '', $wpdb->escape(trim($post_content[1]))); if (!$post_content)
@@ -85,6 +85,7 @@ // Clean up content
$post_content = preg_replace(' < (/?[A-Z]+) e', "'<' . strtolower('$1')", $post_content);
+ $post_content = str_replace('\n', ' ', $post_content);
$post_content = str_replace('<br>', '<br />', $post_content);
$post_content = str_replace('<hr />', '<hr />', $post_content); @@ -160,12 +161,12 @@
$this->footer();
- function RSS_Import()
+ function Atom_Import()
// Nothing.

-$rss_import = new RSS_Import();
+$atom_import = new Atom_Import(); -register_importer('rss', 'RSS', __('Import posts from an RSS feed'), array ($rss_import, 'dispatch'));
+register_importer('atom', 'Atom', __('Import posts from an Atom feed'), array ($atom_import, 'dispatch'));
?>

18 June 2006

Ben Armstrong: Junior programming refocused on "kid languages"

I've refocused the Debian Jr. programming metapackage on languages made for kids. I'm sure there are some who have used scheme or python with their kids, and sure, if you want to do that, go ahead. But these were only initially included because of a lack of choices. Littlewizard is an icon-based language only recently added, and kturtle replaces the less-kid-friendly ucblogo. I've also been pursuing #236721 to see what it would take to get Squeak into main. While it doesn't look like there's hope of that anytime soon, recent changes to their licensing might allow it to go into non-free.

17 June 2006

Edd Dumbill: In search of agile infrastructure for web applications

Many advances have been made in agile software development. Frameworks such as Ruby on Rails embody agile principles by making software easy to write, easy to test, and above all, easy to change.If only we could say the same for the infrastructure on which we develop and deploy web applications. Not every application can be a Rails one, especially where it's been up and running for years. The systems we deploy on often rely on configuration files scattered all over the filesystem, and can be complex results of years of change.By extension, the systems we develop on often don't exactly mirror where we deploy. If we're lucky and careful, then we have a staging server which mirrors the live environment, but that's not too much of an advantage. Among other things, we need ways to evolve and refactor the live environment, and have our development environments easily track that.I'd like to call such an environment "agile infrastructure". Infrastructure that doesn't hamper developers, and allows live configurations to change and evolve. Infrastructure that allows new things to be tried with minimum cost, and can provide the best information possible to help future planning.Tools enable techniques, of course. It's a lot easier to be agile if you're programming in Rails rather than plain old PHP. So what are the tools enabling agile infrastructure?
Techniques I've found usefulWhile there's a long way to go, I'd like to describe some of the techniques I've been using to help create a flexible environment for developing a sizeable PHP/MySQL application.Operating systemAn operating system must be easy to bring into a known state with minimum interference. For this, I've found Ubuntu or Debian to be an ideal choice. Two of the main reasons include the constancy of stable releases and the fact that it's rare you need to stray outside the distribution's servers to get the software you need.DeploymentDeploying an application shouldn't break the cleanliness of your OS build. I prefer to package deployed applications into .deb files. This enables me to build on several advantages of the package management system:Source controlThe case for source control, thankfully, doesn't need making these days. Yet not every source control system is created equal. Developers shouldn't be constrained by source control, it should be cheap and easy to try new ideas and merge these in later.Not only cheap branching, but also easy merging, is required to keep development agile while still retaining the benefits of source control. Many people flock to Subversion these days, predominantly because it fixes some of CVS' more egregious misfeatures. However, merging can still be pretty difficult in Subversion.I prefer to use a system allowing easy merging, such as svk or bazaar. Because so many of us use laptops these days, disconnected operation is also a huge boon. Bazaar-NG offers both repository-oriented and completely decentralized operation, giving the best of both worlds. It also wins the competition for least setup overhead.VirtualizationPreviously a high-powered technology, cheap virtualization is now with us. Many identical virtual machines can be quickly created to enable testing and experimentation. Deployment to virtual machines can enable hardware independence for applications, reducing another big headache.Large organisations have it within their reach to bring new hardware online easily, and have invested much in management systems for it. Virtualization brings this in reach of small and one-man development teams.Desktop-based virtualizationSystems such as VMWare and Parallels untether developers from their desks. I use the OS X desktop daily for its productivity software, but an Ubuntu virtual machine for a large proportion of development work. A simple keypress lets me flick between the two. The advantages of multiple desktops to hand for web development are well known. (In fact, thanks to WINE and IES4Linux I can run Internet Explorer cheaply too from the same virtual machine).
Xen virtualizationAfter the initial novelty wears off, one of the most tedious tasks in the world is bringing new machines online. Combined with the tendency development environments have to get crufty as new ideas and tools are tried out, this makes for increasing disparity between the development and deployment environments.Wouldn't it be nice just to take a clean machine off the shelf, check out the source, and pick up again? Using Xen for Linux, this cheap virtualization is possible.Sadly, Xen isn't yet a packaged part of Ubuntu, but getting it up and running on Ubuntu Dapper isn't too hard. Warning: here's where things get pretty deep. Skip this bit if you're not interested in the nitty-gritty.I followed these steps:Getting over the DNS mountainIf you want it to be easy to bring new virtual machines up and down, you need to adopt a different approach to managing your DNS. You need to know how to predictably connect to a virtual machine. Yet it's going to get very boring and error prone to manage the IP address space manually in your DNS, or even to map the MAC addresses of your virtual machines in your DHCP configuration.
Help is at hand in the form of mDNS (also known as Rendezvous / Bonjour / ZeroConf). In the host machine, and in each virtual machine, I ensured the avahi-daemon and avahi-utils packages were installed, providing mDNS services. (You should also check that mdns is present in the hosts entry of /etc/nsswitch.conf).What all this does is allow the machines (virtual or otherwise) on the network to resolve names using mDNS. So if I create 3 VMs, alpha, beta and gamma, I can access these right away using the hostnames alpha.local, beta.local and gamma.local.Hey presto! Easily make machines appear and disappear without any need for sysadmin involvement. All the extra steps to add avahi installation can be easily scripted with xen-tools, to reduce the number of commands needed to birth a new machine to one.With this ease of creating new machines, it's much more straightforward to experiment with server topology and conduct experiments on server environments.ConclusionAgile development is necessarily constrained by the infrastructure on which it is conducted. The infrastructure itself is constrained by the tools and platforms of choice.By appropriate tool choice we can reduce the commitment and overhead of infrastructure. This enables developers to get on with the job they do best, and makes experimentation and evolution of infrastructure much simpler.When programming, it's dangerous to fall in love with your code, as the best solution may often involve throwing half of it away. The same hazard exists with infrastructure, with bizarre and awkward effects propagating back into code and operations. Get yourself a low commitment, agile environment, and you'll be able to keep up with the pace. 

16 June 2006

Luciano Bello: ASCII football world cup

In the geek world exist funny useless things. If you are freak and football fan, you would enjoy this.

Now you can see all the football matches LIVE in ASCII !!

telnet ascii-wm.net 2006

BTW, Argentina won 6-0 :D. Let's go for the cup!

14 June 2006

Wouter Verhelst: The sorry state of musical software under Linux.

This is going to be a rant on how doing anything music related under Linux currently works very, very bad. Perhaps I shouldn't be writing this since I don't have the time or skillz to help out in improving it any (so anyone interested in posting a comment to that regard should know that I already know ;-P), and because I've done it beforebut let's just ignore that for a few seconds. Hah. I've been a musician since I was 7 years old (well, a bit less if you don't count the first years where I was only learning how to read music and not playing an instrument (the flute) yet). I've always loved doing it, since music is a great way to express one's emotions and to relax, in my opinion. Being able to produce beaty is also extremely satisfying, and I just love music (in a John Miles sort of way). When I started to get into computers at the age of 14, one of the early things I did, even before doing my first BASIC program, was to play with musical software. I fondly remember some old Commodore 64 program of which I have forgotten the name, which would allow me to put notes on bars and play them, which was cool at the time—even if it would not allow me to put more than three notes in one chord, since that was the maximum polyphony which the Commodore's SID chip would allow. Later, when my parents bought our first PC-based system—a 486DX4@100Mhz—I moved on to Finale1. As a musical notation program, Finale is unsurpassed. It doesn't have a Linux-version, but there is lilypond. Of course, writing down music isn't everything. Any serious musician would also want to play the music he's written, either by having the computer play it itself, or by sending it to a MIDI device. This is usually done through a (hardware or software) MIDI synthesizer and some bit of software called a Sequencer. Traditionally sound cards came with hardware MIDI synthesizers on them, but as computers became more powerful (i.e., after the Sound Blaster 16-era), hardware MIDI synthesizers were replaced by software MIDI synthesizers that had their wavetable on disk and (when playing MIDI) in RAM. That doesn't require huge gobs of ROM chips on the sound card, resulting in either less expensive sound hardware and better MIDI playback (because software wave tables are usually larger than hardware ones). So what's the issue? Everything. While lilypond is nice, and (it has to be said) produces very beautiful output, the interface is way too cumbersome. I mean, what is the clearest thing to read? This:
r4\< e,8-. r8 r4 e8-. r8\!
or this? graphical version
of the above They represent exactly the same thing, yet someone who knows music needs a split second to decode the below but a few seconds for the above (if they understand lilypond's syntaxis). In fact, at first I thought that I had done something wrong in invoking lilypond-book to produce that snippet, because I had misparsed the code above (which, incidentally, is one bar of some actual music that I have in my ~/data/audio/lilypond directory) The plain text interface certainly does have some advantages, but IMO the downsides by far outweigh the benefits. In general, lilypond is not well suited as a way to actually write music, as opposed to simply typesetting already existing music. I did actually follow a course on harmonics (although I never finished it due to lack of time); when writing some new piece, I find that it often far easier to do the actual writing on a piece of paper and then enter that in lilypond syntaxis, rather than getting distracted over the lilypond syntaxis while trying to concentrate on what chords I can and/or want to use. It is unnatural, and would look like a Japanese person being forced to read and write texts like 'gaka ga e o kaita' which then get postprocesssed into something like ' ' (look ma, Unicode!). Or, in other words: why isn't there just an input method to write music? There are unicode characters for musical notes, you know... When comparing lilypond to finale, it is not hard to understand that entering music in a graphical environment is just so much easier. When I last used it, Finale had four input methods: one with keyboard and mouse (use the numeric keys on the keyboard to enter the desired note length and the mouse to enter the pitch); one with keyboard only (use abcdefg etc. to choose the pitch, and the same numeric keys to enter the desired length); one with keyboard and MIDI keyboard (use the numeric keys to enter a desired note length, and just press a note on the MIDI keyboard to choose it); and finally, it can also quantisise music as you play it (which is the fastest, but least accurate, method to enter music). Lilypond only allows entering music with the keyboard directly, and then only displays notes after 'compiling' them, so that you cannot see your mistakes and typos until much later. I'm disregarding midi2ly, which converts MIDI files to lilypond input files in a reasonably good way; but Finale has MIDI import functionality as well, I do not consider that to be an 'Input Method' as such. After having entered the music, a musician will want to do something with it. Have the computer play it, for instance, or print it out so that he or she can rehearse it and eventually play it themselves. Lilypond will do neither by itself; however, it can produce postscript, PDF, and DVI files which one can use to print, and/or MIDI files which one can have the computer play. The printouts are great, as I've said before; but playing the MIDI files is another matter entirely. As I've explained earlier, playing MIDI used to be done through hardware. When I still had a working SB16-compatible card, I could play MIDI files on my computer perfectly fine by just using the driver for that sound card. Since I currently depend mostly on ESS1371-compatible cards, that do not havve any hardware MIDI synthesizer, however, that doesn't work. So I have to use software sequencing instead. On Windows, software sequencing is done by the sound card's driver. On Linux, there is no software sequencing being done by any driver, so it all has to be done in userland. In theory, that's just fine. Unfortunately, the implementation sucks. The only software MIDI synthesizer available on Debian is timidity. On a 1.33Ghz processor, it requires approximately 60% of my CPU to play a reasonably easy MIDI file with a polyphony of only some 5 to 10 voices. Complex MIDI files are totally out of the question. And it gets worse; when one runs timidity -iA -Os, it will register itself as an ALSA device capable of playing MIDI, so that ALSA-using applications can play MIDI data by just throwing it to the relevant device. However, this requires far more CPU power, not even being able to play as much as two or three voices at the same time on my same system. If one knows that my last Windows-based system (a Pentium I at 166Mhz) was able to play much more complex MIDI files using the same ESS1371-based sound card just fine, it's not hard to see that timidity really (really) sucks. As said, I probably shouldn't be ranting about this as much as I do, since I don't have the time to invest in making this any better. But if anyone feels inclined to contribute some to Open Source Software, and needs some ideas, these might be interesting things to consider. 1 I should add that, to my shame, I used an illegal copy of both afore-mentioned programs. I didn't really know any better at the time.

Gunnar Wolf: Hot

Ok, the time has come: Now I work with my 20" fan on. Lucky me, my office has no windows, it's in the middle of the building - A bit cold in the Winter, but that's OK with me... But the people with real windows have been sweating for some weeks already. Well, design details of a 50 year old building which cannot be moved :)
Anyway... For people coming to Debconf: Be prepared for hot weather. April-May is Central Mexico's hottest season. For Mexico City, it means we have reached 30 Celsius, and will probably reach them again a couple of times (this week's forecast says we will be under 28, which is good news)... But for the Oaxtepec region (the closest cities are Cuautla and Yautepec) we are reaching 33-35 Celsius every day.
By May, we will have the first scheduled rains (although this has been a rainy Spring, but still, it's formally the dry season), so I hope it will not be _that_ bad... But be prepared to sweat.

Gunnar Wolf: My view on DPLship

Several people's blogs have appeared recently in the planet with the different points of view on the different candidates and various rants regarding the DPL office - Well... This time I have not yet been able even to read the platforms of the different candidates (of course, I plan on doing it quite soon), but I follow the posts on the subject with interest. The most interesting post so far is Martin Michlmayr's - Of course, being an ex-DPL, there are important experiences he has that few people do.
A couple of days ago I was talking with one of the candidates with whom I have talked and worked in the past. My main gripe with the whole process is that, although as a project we need a leader, an easily identifiable single contact person who knows the teams, knows the people and can speak on the project's behalf, I have not seen much being done by the past DPLs towards the inside of the project. Of course, it's easy to bitch around when I sit in the comfortable silent majority most of the time - Currently I am devoting quite less time and effort to Debian than what I should, although it is true that setting up Debconf6 in Oaxtepec takes a _lot_ of time and that it will facilitate much more interaction between Debian people (which is good for the project) than me working more and better on my packages and on doing interesting team work.
Maybe something that would make me to vote for somebody, more than the most coherent and best written platforms, is for the candidate to admit the lack of importance of the role to most of the project - or to defend how to make it again a leadership position.
Following Martin's post, maybe we do need a Bruce-like leader who tells us what to do and drives the project. Or maybe not, maybe we could do better with reducing the importance of the post towards the inside and emphasizing it's mostly a confidence vote for somebody to speak on behalf of us all. And even this would be difficult, as a sad flame in debian-private some months ago reminds us that nobody can speak on behalf os the whole project because somebody might be offended by the viewpoint taken by the official?
I am no big believer in democracies. I do think that sticking to much to a democratic constitution (where democracies are very scarce in the Free Software world, where projects tend to have benevolent dictators grown by meritocracy instead of democratically elected) and allowing everybody to voice too much the same opinion in our regular flamewars has lead Debian to the communications swamp it is right now. We do have very effective small teams (quoting Andreas Schuldei' term for the phenomenon that seems to work best and appear naturally in our project), integration between teams is quite good... But having 1000+ people sitting in a big room and shouting at each other is plainly not fun. Maybe we should stop pretending that there is no cabal (forgod'ssake...) and admit that there is and it works, and we (the drones) implement Their decisions? Nah... That sounds it would only create more flamewars.
But seriously: Towards the inside, do we need a leader? Have we ever used it?

Evan Prodromou: 25 Prairial CCXIV

I'm at Where 2.0 2006 this week, and I've got to say that from the perspective of this conference room it's like geo-data is the most important development on the Web since the <img> tag. I'm getting a little tired of seeing Google Maps mashups -- although I'm hoping to see someone who does a mashup of Google Maps on Google Maps. Or Yahoo Maps on Google Maps. Overlay them, so you can click a link on Google Maps and get a Google Map of that particular place. Over and over and over forever.

13 June 2006

Aigars Mahinovs: F-word on BBC and shot Muslims

Pre-story: In Forestgate in London police stormed inside a house, shot one man and arrested him and his brother. After 10 days it turned out that no evidence of any gilt to them was found in the raid and the raid is only based on some secret intelligence. During the day when I was watching the news the brother that was shot was describing how policemen dragged him down the stairs shouting him to "Shut the f*** up!", the F-word was bleeped and that was ok. The real surprise to me was that it was not bleeped out when retransmitted in the evening news at 22:00. I am glad that UK's media are not as puritan as USA's. P.S. I think that this incident with another innocent Muslim person being brutally shot by the police without any warning is the best thing that Al Quaeda could have organized. I just hope that this will get the same outcry internationally as here in UK and that will turn the tide from "war" to "freedom".

Bartosz Fe&#324;ski: my webpage

I was in Warsaw today for some interviews (yeah I'm looking for a job) and I had some spare time before transport to home (small city near Cracow). I went to internet caffe to check mail and read some news. Of course there was only Internet Explorer as a browser and owner didn't allow me to run Knoppix on that box. Anyway... I tried to view my own webpage. It looks terribly in IE. I was aware that it doesn't look perfect, but I didn't know it looks so terribly. Blog part is the worst one, commenting entry is almost impossible. I don' t remember which version of IE was installed there, but I suppose that all versions have such problems with valid xhtml. No, I'm not going to fix that ;P Update: Seems that blog part of my webpage is not valid xhtml anymore. Some templates were changed and they're not xhtml compliant. Yes, that's something I'm gonna fix ;)

12 June 2006

Antti-Juhani Kaijanaho: Health care, insurances and making economic sense

Originally posted as a comment in Finland for Thought. A system of health care paid by insurance (of whatever form) and provided by private hospitals looks attractive on the surface but isn t really a good system. Look at the economic dynamic of the system. The insurance (if comprehensive) will essentially pay for any operation that the physician at the scene deems necessary. Is it in the physician s interest to use that tab as efficiently as possible? No, in fact, it is the opposite: it is in their best interest to find as many reasons to bill as much as they can. This is a road to disaster. Of course, you can balance this system by introducing insurance investigators who examine bills and determine if they are legit. To do the job properly, they need to be qualified physicians, and they need to have access to all the data that the physician at the scene had. Essentially, these investigators would be doing the job all over again, except never seeing the patient. Result: the money you save from preventing fraudulent billing is spent in maintaining a paraller physician workforce. Why not let the investigators be the healers, and cut the private hospital out of it altogether? These physicians would have budgetary responsibility on what they spend, and thus they only do what they need to do. Oops. Looks like we just transformed the market-based health care system into a state-operated, socialized system.

11 June 2006

Andrew Pollock: [tech] Adventures in supporting Outlook

One of my users was having some issues using Outlook to connect to my SMTP server to send mail, so I had a bit of a poke around during the week to try and improve the situation. I used to work in IT security, so I've got a healthy level of paranoia when it comes to network security. One of the things I don't allow is any clear-text authentication. I make users use an SSH/SCP client rather than an FTP client to upload files, web-mail is SSLed, IMAPS and POP3S only, etc. For various reasons, the occasional user wants to relay mail through my SMTP sever, rather than using their local ISP. Furthermore, a lot of the time, these users are on dynamic address space, so whitelisting IPs for relaying isn't feasible. So I use SMTP-AUTH. I also support STARTTLS. During this debugging session, I discovered that one can actually authenticate without using TLS, so I fixed up Sendmail's configuration to only offer AUTH after a STARTTLS (define( confAUTH_OPTIONS', p') in sendmail.mc). The problem that my user was having (and I reproduced myself) was that even with Outlook configured to "Require an encrypted connection" for SMTP, and authentication also specified, relaying was failing. Turns out that Outlook (and Outlook Express) only support the AUTH LOGIN SASL mechanism, which is obsolete, not the AUTH PLAIN mechanism, which was all I had Sendmail configured for (and works fine for Sarah and her Mail.app on the PowerBook). So the first thing was to enable LOGIN so that the applicable lines read as TRUST_AUTH_MECH( PLAIN LOGIN') and define( confAUTH_MECHANISMS', PLAIN LOGIN') in sendmail.mc Then it turns out that Outlook doesn't really handle TLS all that well anyway, it'd rather just talk raw SMTP over SSL (i.e. port 465/tcp), and what was happening was on the first couple of delivery attempts, it would connect to port 25, start spewing SSL negotiation crap, upset the greetpause feature I had enabled, and never succeed in getting anywhere. Then it fell back to using STARTTLS instead. So rather than having this hit and miss approach, I finally enabled SSMTP, by adding DAEMON_OPTIONS( Port=smtps, NAME=TLSMTA, M=s') to sendmail.mc So the following deficiencies in Outlook were highlighted from this exercise:
  1. Outlook does not notify the user if authentication is required, but not able to be performed
  2. Outlook only supports the obsolete AUTH LOGIN SASL mechanism
  3. Outlook doesn't do TLS on port 25 properly
After all this, the user is going to probably switch to Thunderbird, but at least Outlook is now supported as properly as possible.

Wouter Verhelst: Sexism.

I had long thought that Sexism was a thing of the past; that women would have the ability to do what they wanted, and would mostly not be discriminated against. And while I was not so naive to think that there was no discrimination at all, I was under the impression that any such discrimination would mostly be something the discriminator did not think of consciously. That things like people being rejected outright for a job because they were women, and, well, "women can't work as well as men", were stories of the past. At least if I did ever discriminate against women, it never was intentional. Little did I realize how far away from the truth that was. As some troll's recent mails show, there are actually people out there who do thinkn that the influx of Women into Debian should be stopped, and that Debian should be a men only club. Our coward is too afraid to post under his real name, instead relying on tor and throwaway yahoo accounts to mask his identity. So let's call him 'Anonymous coward'. Occasionally, this is the main reason why I don't like tor; full anonymity should not be allowed, one should be able to have people stand up for what they say, and face the consequences. Anyway, that's a different story, for another time. What puzzles me is how anyone would think that there could possibly be a correlation between orphaned packages and the existance of Debian-Women. Personally, I've been happy that there is a Debian-Women which strives to make our community more complete; the lack of women (or any considerable part of the world population, for that matter) is a serious disadvantage for any community that tries to do something for the "greater good". Personally, I'm disgusted and offended by the mails this moron is sending; and even though I realize that there probably still is some (unconscious) discrimination against women, I can hope to safely say that Debian is tolerant regarding people that represent a minority amongst its community members. Even Jonathan Walther, whom we kicked out for (amongst other reasons) trolling on the debian-women mailinglist, never (to the best of my knowledge) said anything which implied that he thought Debian-Women should be disbanded (although he, err, had a "different" idea of what they should be doing). I guess all this only means we don't live in a utopia, and that Debian is not free of the plagues that will hit any sufficiently large community. But that doesn't negate the fact that I'm still offended by this lunatic.

David Pashley: Class::DBI performance

Class::DBI is a very nice database abstraction layer for perl. It allows you to define your tables and columns and it magically provides you with classes with accessors/mutators for those columns. With something like Class::DBI::Pg, you don't even need to tell it your columns; it asls the database on startup. It's all very cool mojo and massively decreases the development time on anything database related in perl. Unfortunately, as far as I can tell, it has a massive performance problem in its design. One of the features of Class::DBI is lazy population of data. It won't fetch data from the database until you try to use one of the accessors. This isn't normally a problem, except with retrieve_all(). Basically this function returns a list of objects for every row in your table. Unfortunately, due to the lazy loading of data, retrieve_all() calls SELECT id FROM table; and then every time you use an object it calls SELECT * FROM table WHERE id = n;. For a small table, this isn't too bad, but for a large table, it's a killer. I did a little benchmark today to see just how much slower it is over plain DBI. I wrote two functions which iterate over a table, assigning one value to a function (forcing Class::DBI to fetch the data). The table in question contains 635 rows. The code I used was:
use strict;
use warnings;
use Benchmark qw(:all) ;
use Foo;
use DBI;
sub class_dbi  
   for my $foo (Foo->retrieve_all())  
      my $bar = $foo->bar;
    
 
sub dbi  
   my $dbh = DBI->connect("dbi:Pg:dbname=$db;host=$host",$user, $passwd);
   my $sth = $dbh->prepare("SELECT * FROM foos;");
   $sth->execute();
   while(my $row = $sth->fetchrow_hashref())  
      my $bar = $row-> bar ;
    
 
cmpthese(100,  
      'Class::DBI' => 'class_dbi();',
      'DBI' => 'dbi();',
    );
The results:
brick david% perl benchmark.pl
           s/iter Class::DBI        DBI
Class::DBI   10.3         --       -97%
DBI         0.351      2845%         --
Class::DBI is more than 28 times slower than using DBI directly. I'm hoping that someone will now tell me "Oh you just do blah", otherwise I'm going to have to rewrite some of my code. One thing to learn from this is that reduction in development time can often cost you more in other areas, and it's often runtime performance. Update: It appears that the bug is that Class::DBI::Pg does't set the Essential list of columns, so Class::DBI uses the primary column. you can fix this by adding the following to your database modules:
__PACKAGE__->columns(Essential => __PACKAGE__->columns);
Remember you'll need to do that for each of your modules; you won't be able to do it in your superclass, as you won't have discovered your columns yet. This has increased performance, but not massively. New timings (with the addition of using Class::DBI through an iterator):
              s/iter Class::DBI it    Class::DBI           DBI
Class::DBI it   6.35            --           -2%          -94%
Class::DBI      6.23            2%            --          -94%
DBI            0.350         1714%         1680%            --
Update 2: It appears that further speedgains can be made by not using Class::DBI::Plugin::DateTime::Pg to convert the three timestamp columns in my table into DateTime objects.:
              s/iter Class::DBI it    Class::DBI           DBI
Class::DBI it   1.26            --          -11%          -72%
Class::DBI      1.12           12%            --          -69%
DBI            0.350          260%          220%            --

10 June 2006

Barry Hawkins: Mark Pilgrim switches back to Linux from Mac OS X as well

Blog commenter James pointed out to me that the esteemed Mark Pilgrim has recently moved back to Linux for his desktop OS as well. Since Mark’s blog post doesn’t have to be conformed to fit conventions of a major technical publishing site, the style is more conversational. His take on the faux openness of the Mac platform is insightful. My favorite two paragraphs from the entry are the following:
I would like to point out that it is entirely Apple s choice that their operating system does not run on my new Lenovo ThinkCentre. I m not saying it was a bad business decision they are a hardware company, after all but it is particularly galling to realize that if I bought a new Mac, I would be subsidizing the development of an operating system that contains code whose sole purpose is to lock me into a specific hardware platform. I realize that most people don t look at it that way, but there it is.
In many ways, the tale of my switch is more of the same old story. Mac OS X was free enough to keep me using something that was not in my long-term best interest. But as I stood in the Apple store last weekend and drooled over the beautiful, beautiful hardware, all I could think was how much work it would take to twiddle with the default settings, install third-party software, and hide all the commercial tie-ins so I could pretend I was in control of my own computer. Beauty is in the eye of the beholder, and to my eye Apple isn t beautiful anymore. I ve worked around it or ignored it for a long time, but eventually the bough breaks.
Spot on, Mark. I still kick myself for thinking it perfectly normal at one time to have to own a PCMCIA network card just to be able to use WLAN with my Aluminum PowerBooks equipped with “Airport Extreme”. Deciding to “switch back” was almost like realizing I was in this relationship with someone who was taking without giving back, and using manipulative schemes to win my allegiance. Oh yeah, and more Mac zealot whinging in the comments, apparently enough for Mark to have turned off comments on that post.

9 June 2006

Ross Burton: Domke Camera Inserts

Quick question to the Interweb: does anyone out there have a Domke camera bag or inserts, specifically the Adjustable Insert? I have some questions about it and other Domke inserts. If you do, please email me. NP: Worldwide Underground, Erykah Badu

8 June 2006

Matthew Palmer: [Ruby] Blocks as Resource Management

One of the really neat things about Ruby is the extensive use of blocks (closures, I think the rest of the world calls them) in the standard library to control the allocation and deallocation of resources. Take the following snippet:
 File.open('something.txt') do  fd 
   # Manipulate the file through 'fd'
 end
 # File handle is now closed
There's no way that you can escape from that block without the file being closed (well, in theory, you could lose the file handle if there was an exception thrown in the block, but the File::open method can take care of that internally by catching, closing, then rethrowing). I've loved this feature since I first saw it -- "holy crap!" I thought to myself, "I never have to call close again!". And I was pretty well right -- I think I can count (in unary, not binary!) on one hand (well, I'd use grep wc) the number of times I've used IO#close in my Ruby code. The funny thing is, though, that I don't think I've used this pattern in my own code enough. But I just had an epiphany whilst waiting for a train home -- and I think I'm cured. Take this hideous piece of test code I had laying around in an app I'm working on at the moment:
 def test_something_funny
   faux_path_on
   d = Domain.new('127.0.0.1', 'somethingfunny.com')
   faux_path_off
   
   # assert writ large
 end
Domain::new calls out to a shell command (dig(1) to be precise -- take a guess at what I'm writing <grin>, and yes, it will be released shortly) but for test purposes I can't run dig (because I'm not guaranteed to have all the infrastructure available for a real dig to succeed). So I have a flimsy mock of dig in a directory in my test suite, which is where faux_path_on sets ENV['PATH'] to look at. This is, of course, pretty untidy, because when (not if!) I forget to call faux_path_off, everything goes to complete poop, and my children will have two heads or something. The much cleaner version is like this:
 def test_something_funny
   d = faux_path   Domain.new  
 
   # Assert ahoy!
 end
And my faux_path method (I've even saved a method!) is as simple as simple can be:
 def faux_path
   realpath = ENV['PATH']
   ENV['PATH'] = my_fake_path
   rv = yield
   ENV['PATH'] = realpath
   return rv
 end
I also have a trickier faux_* method, which sets a couple of environment variables which tell my mock nsupdate(8) where to write the data it gets sent from my application -- again, it's a block-taking method that sets the environment, yields, reads in the data from the temporary file, cleans it up, and returns the contents of the aforementioned file. The power of the Ruby is growing within me, I can feel it. And I like it.

7 June 2006

David Pashley: Oracle 10.2.0.1 Instant Client hanging?

Does your Oracle client hang when connecting? Are you using Oracle 10.2.0.1? Do you get the following if you strace the process?
gettimeofday( 1129717666, 622797 , NULL) = 0
access("/etc/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("./network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("./network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
fcntl64(155815832, F_SETFD, FD_CLOEXEC) = -1 EBADF (Bad file descriptor)
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
.
.
.
Has your client been up for more that 180 days? Well done; you've just come across the same bug that has bitten two of our customers in the last week. Back in the days of Oracle 8, there was a fairly imfamous bug in the Oracle client where new connections would fail if the client had been up for 248 days or more. This got fixed, and wasn't a problem with Oracle 9i at all. Now Oracle have managed to introduce a similar bug in 10.2.0.1, although in my experience the number of days appears to be shorter (180+). Thankfully, this has been fixed in the 10.2.0.2 Instant Client. More information can be found on forums.oracle.com and www.redhat.com.

Next.

Previous.