Search Results: "ron"

27 October 2009

John Goerzen: Ahh, updates

It s been awhile since I ve made a blog post, and it will probably soon be evident why. For myself, I am taking two college classes philosophy and gerontology this semester, and still working full time. That s busy right there. I m really enjoying them, and in particular enjoying the philosophy class. I will, at long last, graduate this December. Oliver is about 3 months old now. He s starting to smile at us more, make his cute little baby noises more, and is very interested in taking in all of his surroundings. He has his opinions about things, but isn t expressing them too loudly just yet. Jacob, on the other hand, is sometimes. Our person from Parents As Teachers was talking to him for his 3-year-old evaluation. She said, Jacob, are you a boy or a girl? I a kitty. Are you a boy kitty or a girl kitty? I just a PLAIN kitty. Meow. He seems to delight in catching someone saying or doing something in a manner he considers wrong. No, not like THAT! is heard a lot in our house these days. Or perhaps, No, not RAILROAD tracks. They TRAIN tracks, dad! Jacob s imagination is very active. Sometimes if it is time to go use the potty, he will insist that we all stop because a freight train is going through the kitchen, the crossing guard lights are flashing, so we have to STOP. He pretends to be kitties, runaway bunnies (he has a book called Runaway Bunny), and occasionally other things.

Anand Kumria: Falsum in uno, falsum in omnibus.

Note: via Blog post (obviously different formatting) and sent by email roughly: Lying in one, lying in all. That is from Steve Waddington. Please see the attached screenshot I have obliterated service identifying information. View of my inbox for the last 18 months show more than one email. I find it telling that what I said in my original post, of all the things there the one you decided to fact-check was the number of emails between us. And you got that wrong. What was is you said again? Falsum in uno, falsum in omnibus? Do you still stand by that statement? If you have looked at the original complaint, no one asked for anything but information on 'what went wrong'. It simply noted that fact that payment occurred, and we were disconnected and went on to say "We find the above experience of diconnecting [sic] our service by EXETEL a very poor customer relationship experience." The response to that could have been: "Yes, that is a poor customer experience. We will look into it and see if we can improve." Instead we had an accusatory email back commenting, firstly, of the amount of time of the disconnection. As if someone paying for something and not receiving it for only 1 minute is OK. The point being missed we paid for something and we did not receive it. The point being missed -- this is a poor customer experience The second email then, falsely, accused us of not actually paying in the first place! Later the individual concerned, after the TIO complaint, clarifies that 'yes', we did indeed pay. Very telling indeed, then, when you were pointed to my blog entry and rather than pick up on the stratgeic ("we are getting feedback, for free, on how we can improve our processes") you looked at the tactical ("he is lying! How I prove it and thus be happy in ignoring what was said"). As I said, It is easier to hear when your fingers are not in your ears. In light of your recent blog post, and the recently released TIO report, I find Exetels' behaviour all the more perplexing. Complain to Exetel, get your service contract summarily terminated. Complain about Exetel, and get libelled publicly. But I guess when you have 1/6th (163 out of 620) of your complaints related to Customer Service (from the TIO report) and 3% of your own existing customers (from your blog post) complaining, you get the reputation you earn.

26 October 2009

Patrick Schoenfeld: Building a 15W Debian GNU/Linux system

When the Intel Atom was revealed to the public I didn't came around to say: "Wow!", because that piece of hardware promises to be a generic-x86 1.6 GHZ CPU with a total power consumption of 2 Watt, which is amazing considering that x86 hardware generally wasn't an option if you wanted to build a low-power system. But then the first chipsets were presented to the public and the Atom became a farce, because you don't want to have a chipset that eats over 25W for a CPU which consumes 2W. That was basically laughable.

Recently I managed to find out that there is a new chipset out there, the Intel i945GSE, which runs at about 11W TDP, including the soldered-on-board N270 atom cpu. And I convinced myself that this could get my new homeserver. So together with a 2.5" drive I could get a system which runs with about 15W maximum power consumption, which is amazing, given that the Arcor Easybox my provider gave to me seems to have similar maximum power consumptions. And it isn't able to provide me with the great flexibility, the new Atom system is.

So I bought the following components:

It took a while to get those components together, especially because I previously decided for an Antec case which I ordered from K&M Elektronik, but as they didn't keep their delivery promise I came to the M350. What a luck.

Running Debian on this machine is the easy part, you would think. This is true, for some exceptions. First: Lenny runs fine. I've installed the notebook hd in my desktop and then put it in the atom, when I got the first hardware and it worked right away. Except of a grub message, which is disturbing and which I didn't manage to fix right now (grub says "Error: No such disk" just to get the menu a seconds later anyway and boot the system flawless).

What didn' t work exactly reliable was the included network chip. Its quiet a shame to say that, but if you buy an Intel board, wouldn't you expect that it would run Intel components? Unfortunately this is not true for the atom board. It has a Realtek RTL8111 network chip, which isn't properly supported by the 2.6.26 kernel (that means the kernel think it is and loads a rtl8169 module, which isn't able to properly detect a link).
The workaround for this is to use a 8168 module from Realtek and compile it for your kernel, but as I equipped this system with an Atheros 2424 PCIe chipset for playing WLAN AP, too, I had to upgrade to 2.6.31 anyway and there the chip is fully supported by 8169.

Making the system an access point has been surprisinly easy as well. The greatest pain was to find a Mini PCIe WLAN card, because after all this isn't very common. However I found one based on an Atheros 2424 chipset and bought it. I additionaly bought an SMA-antenna connector that I could mount into the case (the M350 has a preparation hole for it) and an SMA antenna.
Setting this up, has been fairly easy. You need to know, that running master mode with newer mac-subsystem-drivers in Linux doesn't allow setting master mode directly. Instead you need to use an application to manage everything, which is capable of running cards over netlink. Thats hostapd. The unfortune is, that the lenny version is too old and so I built myself a (hacky) backport of the sid version, which isn't that hard anyway, because rebuilding against Lenny is enough. Additional you need a kernel 2.6.30 with compat-wireless extensions, or an 2.6.31, because previously the ath5k driver didn't support the master mode. After that getting hostapd up is a matter of a 4 - 15 lines configuration file. For me its now running in 802.11g with WPA and a short rekeying interval with 14 lines of configuration.

After all I'm satisfied with the system. Without any fan the CPU constantly runs at 55 C, which is okay, given that it must operate within 0 and 90 C according to the tech specs. The system and the disk are somewhat lower (47 and 39 C). The power of this system is more then enough. Its booting quick and working with it works without latencies, even when the system is doing something. What I haven't yet tested is weither the power consumption actually fulfills the expactations. I will do so, once I got a wattmeter.

25 October 2009

Julian Andres Klode: I m back


I returned to Germany from my vacation in Greece yesterday, and I just installed my new hard drive into my laptop. The old Hitachi hard drive had some bad sectors after a very long usage time (compared to my other disks) we ll see how the new Samsung SpinPoint M7 will work. Another side benefit is the upgrade from 120GB to 500GB which means I don t have to delete files during the next months. It is also much faster (hdparm -t was 80MB/s, 2 times faster than the old one). I m currently running the release candidate of Ubuntu 9.10 Karmic Koala on this system, but I expect to return to my full Debian unstable developer environment during the next week(s). Karmic seems to be pretty stable already, but I have experienced problems with PulseAudio and my PCM control getting set to +13dB which is horrible. I will probably also pre-order a Nokia N900 soon, which will be my largest investment this year but I really need a new mobile phone, camera and music player. And not to forget the ability to develop software for it, and testing my software on those less powerful devices (compared to my laptop). All in all, I m back and soon ready to hack again. Posted in General

24 October 2009

Kees Cook: karmic and log rotation

In Ubuntu s Karmic and and Debian s Lenny, sysklogd was replaced with rsyslog. This is fine, since rsyslog will have converted your /etc/syslog.conf to /etc/rsyslog.d/50-default.conf. However, if you modified the (maddeningly strange sysklogd-specific) log file rotation in /etc/cron.daily/sysklogd or /etc/cron.weekly/sysklogd, you ll want to review the new (sane) /etc/logrotate.d/rsyslog. (Note also that savelog uses .0 as the first rotated file extension, and logrotate uses .1.)

Gustavo Noronha Silva: GNOME Shell for Debian

Over the last few days I have worked for some hours on packaging the last dependency of GNOME Shell that was missing in Debian: gjs. That work has been sponsored by Collabora, along with the work required to package GNOME Shell itself. I was very impressed by the time it took for FTP Masters and Assistants to deal with the new packages - it only took a couple days for each; kudos! What this all means is that you can now easily test GNOME Shell, and even make it your default environment on a Debian unstable system, by just installing the gnome-shell package. As I expected, some people have been having trouble with the new package, but the general feedback has been fairly positive. If the README.Debian package doesn t help you with your specific issue, do take the time to file a bug report! By the way, thanks go to Joss, for his work on dh_girepository, and for him, and Sebastian Dr ge for their work on creating the new GObject Introspection policy.

23 October 2009

Bernhard R. Link: I'll never understand why some people consider it acceptable to depend on udev

This is just a reminder for all of you that have packages that depend on the udev package: I hate you. A Debian package depending on the udev package (with very few exceptions like for example the initramfs-tools package that actually uses udev) is so wrong.

Adrian von Bidder: Color Calibration

A topic I've been trying to understand more about for some time is color calibration. I've used lprof to get a very rough starting point for my old CRT (sorely in need of replacement by now...) Since hardware colorimeters are not cheap and probably not many can be used with Linux (I've not really looked, to be honest) I've wondered if I couldn't use the one device that is (should be) calibrated that I already have: my camera. With some kind of feedback loop like shoot screen, analyze img file, adjust settings, shoot again (and the same process for the printer, and, possibly a bit more error prone since the freshly calibrated printer would be used to produce the template, the scanner), shouldn't it be possible to arrive at sane settings? The camera explicitly allows using sRGB or Adobe RGB color model, so I'd think the colors should be more or less narrowly defined, at least when shooting raw or using manual white balance. (Another thought: I have a dual screen system. Can X even do this? And if X can do it, is it possible to tell Gimp to set this up? But this is just idle speculatio. I've not really looked at Google's results yet, either.) Update: Haven't really thought about ambient light. But the display emits light, so I'd shoot the screen in a darkened room, with white balance of the camera set manually. OTOH thanks Jo l if I can get a colorimeter for not much above 100$, it's not worth investing too much time. I had always thought these devices were much more expensive. divide_by_zero Yes, I know CRT are usually much better than LCD, but OTOH my screen apparently starts to show its age: it will suddenly, and visibly, change brightness and color every few hours. I suspect the high voltage circuitry is not too stable anymore... And I won't buy another CRT, those things are just huge...

Decklin Foster: Score: 5, Privileged

(No apologies to the original.) I get the impression that the Windows 7 launch is a lot like seeing an old boyfriend suddenly show up on your doorstep wanting to get back together. He's had some work done, apparently: stomach stapling to take off some of the weight, teeth whitening, and a radical nosejob to make him look as much like your current boyfriend as medical science will allow. He's handsome, of course, almost too handsome. He still uses far too much product in his hair and carries that desperate look in his eyes. The fragrant haze around him is the cologne he overuses to mask the scent of failure. But standing there in that form-fitting t-shirt, you'd almost forget for a moment what a psycho he was- how he used to shut down in the middle of a date and forget everything you were talking about and how he was only happy when you were paying attention to him. You'd almost forget about carrying around his legacy baggage or those nights when, for seemingly no reason at all, he would simply stop speaking to you and when you asked what was wrong he'd just spit a string of hex code at you and expect you to figure it out. You complained about him for years before finally deciding to get rid of him, and here he is again. Though, somehow, he seems like a completely different person now. "I'm up here," he says when he catches you staring at his package. Tempted though you may be, you know that over time he'll get bored and slow down on you just like he always does. And then you'll be right back where you started: trapped. He keeps you by convincing you that you don't have a choice. You're just not smart enough for one option or rich enough to afford the other. "But I'm different now," he says, batting his eyes innocently. "I've changed." Indeed he has. Apparently, he's really into Kabbalah now or something like that. It's helped him discover loads of untapped potential in himself. But it also means that you'll have to buy all new furniture to fit with his understanding of feng shui. That's not the only change he has in store for you. The minute you let him move in, he'll have a new alarm system put in that succeeds only in preventing your friends from coming over on poker night. He doesn't love you, but he doesn't hate you, either. The truth is that he couldn't care less one way or the other. He's here because he doesn't want to be alone. Like all human beings, especially those well past their prime, he wants to feel wanted and, after a string of lost jobs and bad investments, he needs a place to stay. But all in all, he's OK. He's a seven. He'll do, I guess. UPDATE: There was a Hacker News thread about the Slashdot link that got killed before I could reply to someone who left a negative comment. I'll reproduce it here for the sake of anyone still scratching their head.
Thank you for replying instead of simply downvoting. There are assumptions in the structure of the original text that I don't think most of the people discussing it (here, or over there) appreciate. To wit: the narrative of technology belongs to men. Women are objects. The dumbest, easiest way to make that stick out (I did it over breakfast, ffs) is to swap the genders. It sounds "wrong". The emotional-abuse stuff is more creepy. The physical descriptions are more awkward because men aren't leered at in the same way. It's not about evening things out, it's about subverting what the text doesn't say outright by making it obvious. I am, I'm sure, as aware as you that "deconstruction" is not (anymore) a word you say to sound smart, rather a word you avoid saying to avoid sounding like you're trying to be pseudo-smart, but sometimes you just gotta call a spade a spade. You're free to disagree with that (I assume you still will), but I think "not even wrong" is a little over the top.

Andrew Pollock: [life] Sarah's Trauma debut

The first episode of Trauma that Sarah was an extra in aired on Monday night. I'd seen a news story about how they were looking for extras for it with medical experience, and Sarah had just completed her Certified Nurse Assistant course. I mentioned the news story to her, and she signed up. Ironically, for the three episodes they've called her up for so far, the closest to using her medical experience is being a patient, and if you're lucky, you'll see her ankle. Marc was kind enough to rip out some stills from his recording of the episode.

22 October 2009

Gunnar Wolf: How can we advance without a tax increase?

There has been a lot of buzz recently in Mexico after a tax increase that has been announced for next year. The two main points I have seen criticized are:
Value Added Tax (IVA) increase from 15% to 16%
There was a great improvement regarding the original proposal by our de-facto ruler (why de-facto? Because it is still unclear whether he won the popular vote. He has about the same legitimacy as George Bush during his first term: Legal but illegitimate): In Mexico, there is a category of items regarded as fundamental, which are exempt of IVA (tasa cero). This category includes food and medicines Of course, this category makes up the bulk of the poorer people's consumptions, so they pay much less IVA than people with higher living standards. For a very long time, there has been a push to remove this exemption. This has been fortunately clearly understood and fought against. So, the presidential initiative, as I was saying, contemplated a global 2% tax which would not be IVA, and which would be applied universally. This tax would be earmarked to be applied to social programs, and was euphemistically called Impuesto de Combate a la Pobreza (poverty combat tax). Many people applied the concept of duck typing (if it looks like a duck, walks like a duck and quacks like a duck... It is a Value Added Tax). As many analysts, I believe this tax was meant to be the foot in the doorstop, leading to point out in a couple of years that anyway nothing is IVA-exempt anymore and the world has not come to an end, and we should apply universal IVA... So, the reduction in the increase (2% 1%) is not the most notable thing here The notable (and good!) thing is that they didn't succeed into killing the tasa cero.
3% tax on telecommunications
Many friends have started rallying (with the IMHO least effective way of protest you can find on Earth, just by stating their adherence in their Twitter and Facebook profiles. Wow, great deal!) that the original proposal included a 4% tax on telecommunications, and it appears that 3% will be applied. They say, quite fairly, that telephone and Internet access are no longer considerable a luxury, but a need to power the society into becoming better prepared, more competitive. My friends state as a contrast the Finnish ruling broadband access as a citizen right. What they seem not to realize is that the proportion of taxes in Mexico (collected from the responsible taxpayers, which is not by far the way for the bulk of the money in this country) is close to 30%, taking into account the big taxes (IVA, ISR/IETU) and the host of smaller ones. In Finland, the percentage of taxes payed by every person and remember that tax evasion is way lower than here!) is over 50%.
So What is my opinion on this? What would my ideal tax scheme be?
  • Nobody likes taxes. But the country needs far more infrastructure, far wider inverstments. We need higher taxes But we need those taxes to be collected from people with higher income. And yes, that would mean I would most probably pay more (as I do sit relatively high on the income scale Qualified work, even if you do not seek money for the sake of it, pays much better than non-qualified work; remember the minimal wage in Mexico is around MX$50 a day - Less than US$4 or 3).
  • The increases should be applied to the income tax (ISR). It is supposed to be around 30% for income levels over MX$5000 a month, with a very slight increase after that point. Income tax is highly deductible now, and most people with high income manage to ellude most of it. Many cases have been documented of companies as small as Walmart paying less than MX$1000 a year due to several (intentional? you bet!) holes in the legislation. That is where the bulk of the extra government income should come from!
  • For a couple of years, since I registered as a taxpayer (people receiving money exclusively as salaries under a given limit don't have to declare taxes) I have decided not to hire an accountant to make the numbers look prettier, and just do the numbers myself over the platform provided by SAT/Hacienda (the tax collecting authority). Yes, that means I am paying more than what I could But it also means I am paying what I should! And it is an expensive point of view, but I strongly invite others to do the same. If we criticize Walmart for making numbers look prettier, shouldn't each of us do the same? Shouldn't we all care to pay what we are supposed to, so that the government has enough funds to carry out its tasks?
Yes, I am painfully aware that an important portion of what gets into the government disappears due to corruption and ineptitude. Still, the only position from where I can criticize is from being clearly legal. The same point as I do with software: I cannot ask people to comply with my Free Software licensing if I use ilegally propietary software, can I? So no, I don't use any. Even legal propietary software, free-as-in-beer (i.e. Flash player). So, please think this over before you join the Lemmings into complaining about the tax increase. Yes, this is a bad moment to increase taxes. Yes, Mexico is the worst faring country in all of America in its response to the crisis; the GDP will probably fall between 8% and 10% this year and 2010 will not be much better. Yes, it would be better to increase competitivity. But, yes, we pay ridiculously low amounts of taxes And those of us who can afford a little reduction in our expenditure should do it. And those who make gross money should just stop it. Oh, and last point, regarding the #internetnecesario Twitter hashtag: Don't be Lemmings. Internet should be recognized a basic need for a free society. But right now in our country, it completely is a luxury, even if you cannot live without it. If you are Internet-addicted as myself, you most probably will not notice the 3% increase. FFS, We will pay MX$360 instead of MX$350 a month for my Infinitum connection. Will we really notice? In Mexico, middle and upper class are Internet-enabled. Lower classes are not. Things should change, no doubt. But it is not at all comparable to an universal IVA. Things should change and universal connectivity should be a given. But right now, calling Internet a basic good... is just out of touch with reality.

21 October 2009

Lior Kaplan: Encouraging open source in education


I ve read today a case study by Gregor Bierhals about an Austrian project called desktop4education which creates a desktop environment for school based on open suse. The fact that really surprised me (and for the better) was the fact that the federal government help the project by sending CDs/DVDs to other school and even willing to award schools to move to open source software and reducing license fees. While schools don t pay the the Microsoft Office license fee (10 euro per station), the federal government has decided to pay the schools 10 euro for each station that moved to open source software.
However, by the time of writing the situation is about to change as the Federal government increasingly adopts a policy that promotes the use of open source software in Austrian schools. Exemplary to this is the government s decision to pay any school 10 for each workstation that runs the free productivity suite Open Office that is provided by Sun Microsystems in replace of Microsoft Office, for which the government introduced a calculative license fee of 10.
I think this decision is radical as it motives the schools to move to open source software, and benefiting financially from the move. So while the government might pay a bit more, the money goes to the schools instead of commercial companies. I m sure that s a better investment of tax payers money. I can just hope more governments will adopt this policy. Posted in Proud to use free software Tagged: education, free software

Maximilian Attems: Particle Physics Planet

planet.teilchen.at is a shiny new selected blog roll of prominent Particle Physics blogs. Reading it should keep you updated on progress at the Large Hadron Collider (LHC) as well as on new discoveries in High Energy Physics, Astrophysics, Cosmology, advances in Quantum Chromodynamics (QCD), String Theory, Black Holes and many other hot physics topics. Most posts should be readable for scientifically interested public. Enjoy a daily read. www.teilchen.at is the Austrian outreach site of Austrian particle and nuclear physicists. Authors are leading austrian scientists. The site just got relaunched with new features including some socialweb goodies (planet, share links on the bottom, better readability, noframes, ..). Happy if you send corrections or suggestions to mattems@teilchen.at.

MJ Ray: Royal Mail Rub Our Noses in it

So after Royal Mail shut down useful community websites causing MP comments on the idiocy of Royal Mail, I was rather surprised to get this little thing in the post today: postcode That s a postmark advert for Celebrating 50 years of POSTCODES 1959-2009 . So this is what Royal Mail does with some of the money it makes from its claimed monopoly on postcode databases: it spends it on ink to celebrate postcodes in the bit where they can t sell adverts. After the postcode-takedown, I suggested deleting postcodes from all our co-op s websites. Instead, another member has persuaded me to contribute to something like free the postcode, which I first saw on CycleStreets blog. As well as slapping its customers, Royal Mail is also currently taking on its workers who are campaigning for sustainable jobs and against the recent increase in bullying and harassment cases. I already send most of my letters, invoices and so on electronically since our three nearest post offices closed last year. I ve noticed Edinburgh Bicycle Co-op switching to DPD and Terry Lane suggesting more online use. Are those good approaches? How are you adapting to the postal delays? Have you put your postcode into free the postcode or a similar site?

Ingo Juergensmann: Webcam driver gspca with newer kernels?

Apparently in newer kernels my webcam, a Logitech QuickCam Communicate STX, does not work anymore. At least not the way it worked still in 2.6.26.2. There are some results in Google search showing that I'm not alone with that problem. Like this one.

But for the records: when I start, for example, camstream, I get the following output:

QUOTE:

[...]
D: CCamPanel::SetVisibleSize(640x480)
>> void CWebCamViewer::RecalcTotalViewSize()
<< void CWebCamViewer::RecalcTotalViewSize()
<< CWebCamViewer::CWebCamViewer(CVideoDevice*, QWidget*, const char*)
D: >> CVideoDevice::IncrementPalette(0)
D: >> CVideoDeviceLinux::StartCapture()
D: CVideoDeviceLinux::SetPalette picked palette 0 []
W: Unknown palette
D: >> CVideoDeviceLinux::CreateImagesRGB()
D: << CVideoDeviceLinux::CreateImagesRGB()
D: << CVideoDeviceLinux::StartCapture()
D: << CVideoDevice::IncrementPalette()
D: >> CVideoDeviceLinux::run()...
W: Unsupported palette 0
W: run(): VIDIOCSYNC(1) failed (Invalid argument)
W: VDLinux::run() VIDIOCMCAPTURE failed (Invalid argument)
W: run(): VIDIOCSYNC(1) failed (Invalid argument)
W: VDLinux::run() VIDIOCMCAPTURE failed (Invalid argument)
W: run(): VIDIOCSYNC(1) failed (Invalid argument)
W: VDLinux::run() VIDIOCMCAPTURE failed (Invalid argument)
W: run(): VIDIOCSYNC(1) failed (Invalid argument)
W: VDLinux::run() VIDIOCMCAPTURE failed (Invalid argument)
.
.
.


When I run camstream with the LD_PRELOAD trick from that Ubuntu launchpad entry above, I get this:

QUOTE:

[...]
D: CCamPanel::SetVisibleSize(640x480)
>> void CWebCamViewer::RecalcTotalViewSize()
<< void CWebCamViewer::RecalcTotalViewSize()
<< CWebCamViewer::CWebCamViewer(CVideoDevice*, QWidget*, const char*)
D: >> CVideoDevice::IncrementPalette(0)
D: >> CVideoDeviceLinux::StartCapture()
D: CVideoDeviceLinux::SetPalette picked palette 4 [rgb24]
D: >> CVideoDeviceLinux::CreateImagesRGB()
D: << CVideoDeviceLinux::CreateImagesRGB()
D: << CVideoDeviceLinux::StartCapture()
D: << CVideoDevice::IncrementPalette()
D: >> CVideoDeviceLinux::run()...
libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffd9


This gives me a working video image from my webcam, but sadly, the colors are bad/wrong. So, it's not usuable as well:

Snapshot with gspca webcam


As you can see, the colors are bad. Red is for example blueish/purple. The two folder on the right in thet shelf are coloured yellow and red in reality, but in the snapshot they appear to be light teal and purple.

20 October 2009

Patrick Schoenfeld: Cool PHP-Code.

Did you know that in PHP you can write something like that:

$test = "foobar";
$test = sTr_RePlace("bar", "baz", $test);
$x = sPrinTf("%s is strange.", $test);

pRint $x . "\n";
eCho "foo";
What makes me frighten is that this actually used, e.g. by this code snippet which exists (in a similar form) in an unnamed PHP-project:

echo sPrintF(_("Bla bla bla: %s"), $bla))

And yes, they do use echo to output the result of sprintf.

Update: So i got this great comment. The commentator wants to point out that the senseless use of "echo sprintf" is because of gettext. He says "That's simply the way you use gettext." But this is simply not true. The difference between printf and sprintf is that the first one outputs the string, while the second one returns it. That means that in the above example printf could be used (instead of sprintf) without a useless echo call in front of it. The reason for using sprintf (and eventually the reason because you find it in a lot of applications using gettext) is that you can use it to fill a variable with the translated string or to use the string in-place. A common use-case for this is to handle a translated string to a template engine, for example.

Gunnar Wolf: Among the reasons that brought me to Debian...

Every now and then, people ask me why Debian? Why, among so many projects to choose from, I first liked, then got into, and finally I got committed into Debian, and not anything else? Of course, one of the main points back in 2000-2001 when I started using it, and still to this very day is a strong identification with the ideological side. Yes, I am a strong Free Software believer, and Debian is what best suites my ideology. Still, I did not only get into Debian because of this And I was reminded about this by an article in this month's Usenix ;login: magazine: An anecdotal piece by Thomas A. Limoncelli titled Hey! I have to install and maintain this crap too, ya know! (article requires ;login: subscription, but I'll be glad to share it with whoever requests it to me I have of course no permission to openly put it here in whole online. Yes, I am expressly sending a copy of this text to the author, I will update this if/when I hear from him) [update] The author has kindly allowed me to redistribute his article's PDF Download it here. Before anything else I'll go on a short digression: I am writing a bit regarding the Free Software participants' culture, and this is a trait I love about it: The lack of formality. Even though ;login: (and Usenix as a whole) is not exactly Free Software, it runs quite close to it), it is a well regarded magazine (and association) with an academic format and good (not deep or highly theoretical, but good) contents. Still, it is quite usual to see titles as informal and inviting as this one. And it happens not only here I have been fearing having to explain at work, over and over, why I have requesting permissions to go to Yet Another Perl Conference, Festival de Software Libre or DebCamp, tagging them as academic settings. Or why I am wasting our library's resources on buying cookbooks, recipes and similar material on the most strange-sounding subjects. Anyway, back on track This article I found refers to the lack of value given to the system administrator's time when selling or purchasing (or more in general, as it happens also in Free Software, when offering or adopting) a product. Quoting Thomas:
A person purchasing a product is focused on the features and benefits and the salesperson is focused on closing the deal. If the topic of installation does come up, a user thinks, Who cares! My sysadmin will install it for me! as if such services are free. Ironically, it is the same non-technical executive who dismisses installation and upkeep as if they are free who might complain that IT costs are too high and go on a quest to kill IT spending. But I digress. I can understand why a product might be difficult to install. It is hard enough to write software, and with the shortage of software developers it seems perfectly reasonable that the installation script becomes an afterthought, possibly given to a low-ranking developer. The person purchasing the product usually requires certain features, and ease of installation is not a consideration during the procurement process. However, my ability to install a product affects my willingness to purchase more of the product.
Thomas goes on to explain his experience with Silicon Graphics, how Irix was so great regarding install automation and how they blew it when switching to Windows NT; talks very briefly about IBM AIX's smit, a very nifty sysadmin aid which is basically a point-and-click interface to system administration with the very nice extra that allows you to view the commands smit executes to perform a given action (and then you can copy into a script and send over to your hundreds of AIX machines) Incidentally, by the time I started digging out of what became the RedHat mess of the late 1990s and passed briefly through OpenBSD on my way to Debian enlightenment, I was temporarily the sysadmin for an AIX machine And I too loved this Smit approach, having it as the ultimate pedagogical tool you could ever find. Anyway, I won't comment and paraphrase the full article. I'll just point out to the fact that this was what ultimately sold me into Debian. The fact that I could just install anything and (by far) most of the times it will be configured and ready to use. Debian made my life so much easier! As a sysadmin, I didn't have to download, browse documentation, scratch head, redo from start until I got a package working Just apt-get into it, and I'd be set. Of course, one of the bits I learnt back then was that Debian was for lazy people Everything works in a certain way. Policy is enforced throughout. So as a sysadmin, I should better get well acquinted with the Debian policy and know it by heart. In order to be able to enjoy my laziness, I should read it and study it. And so I did, and fell in love. And that is where my journey into becoming a Debian Developer started. Why am I talking so nostalgic here? Because I got this magazine on the mail just last weekend And coincidentally, I also got bug report #551258 I packaged and uploaded the Haml Ruby library (Gem, as the Rubyists would call it). Haml is a great, succint markup language which makes HTML generation less of a mess. It is even fun and amazing to write Haml, and the result is always nicely formatted, valid HTML! And well, one of Haml's components is haml-elisp, the Emacs Lisp major mode to do proper syntax highlighting in Haml files. Of course, I am an Emacs guy (and have been for over 25 years), so I had to package it. But I don't do Emacs Lisp! So I just stuffed the file in its (supposed) place, copying some stuff over from other Emacs packages. During DebConf, I got the very valuable help of Axel Beckert to fix a simple bug which prevented my package from properly being installed, and thought I was basically done with it. I was happy just to add this to my ~/.emacs and get over with it:
  1. (require 'haml-mode)
  2. (add-to-list 'auto-mode-alist '("\\.haml$" . haml-mode))
  3. (require 'sass-mode)
  4. (add-to-list 'auto-mode-alist '("\\.sass$" . sass-mode))
However As Mike Castleman points out: This requires manual intervention. So it is not the Debian Way! Reading Mike's bug report, and reading Thomas' article, made me realize I was dilluting something I held so dearly as to commit myself to the best Free Software-based distribution out there. And the solution, of course, was very simple: Debian allows us to be very lazy, not only as sysadmins, but as Debian packagers. Just drop this (simplified version) as $pkgroot/debian/haml-elisp.emacsen.startup and you are set!
  1. (let ((package-dir (concat "/usr/share/"
  2. (symbol-name flavor)
  3. "/site-lisp/haml-elisp")))
  4. ;; If package-dir does not exist, the haml-mode package must have
  5. ;; removed but not purged, and we should skip the setup.
  6. (when (file-directory-p package-dir)
  7. ;; Use debian-pkg-add-load-path-item per 9 of debian emacs subpolicy
  8. (debian-pkg-add-load-path-item package-dir )
  9. (autoload 'haml-mode "haml-mode"
  10. "Major mode for editing haml-mode files." t)
  11. (add-to-list 'auto-mode-alist '("\\.haml\\'" . haml-mode))
  12. ;; The same package provides HAML and SASS modes in the same
  13. ;; directory - So repeat only the last two instructions for sass
  14. (autoload 'sass-mode "sass-mode"
  15. "Major mode for editing sass-mode files." t)
  16. (add-to-list 'auto-mode-alist '("\\.sass\\'" . sass-mode))
  17. ))
This will make the package just work as soon as it is installed, with no manual intervention required from the user. And it does not, contrary to what I feared, bloat up Emacs Adding it to the auto-mode-alist leaves it as known to Emacs, but is not loaded or compiled unless it is required. Deepest thanks to both of you! (and of course, thanks also to Manoj, for pointing out at the right spells in emacs-land)
AttachmentSize
Thomas A. Limoncelli: Hey! I have to install and maintain this crap too, ya know! (Usenix's ;login: October 2009144.5 KB

Andrew McMillan: Using incron to autocommit changes in a folder

A friend e-mailed me this morning asking for some help with a problem he had where he wanted to make a folder writable by a group of people without making the files deletable. Stepping back from his question, I first pointed out that if the files are editable then they can be effectively deleted by removing the content from them, regardless of whether the directory entries themselves are retained. One solution which occurred to me would be to automatically version the content of the directory, and this reminds me of why versioning of /etc has never worked for me: it only happens when I remember to commit.
<!--break-->
Normally when I edit files in /etc, I am focused on achieving something now, and not on being able to undo it later. To this end I have written myself a script which will commit the contents of a directory (including adding new files and removing deleted ones) into a git repository, as follows:
#!/bin/sh
#
# Allow for debugging.
[ -n "$DEBUG" ] && set -o xtrace
cd $1
MESSAGE="Autocommit"
# Initialise the directory if it's not in Git currently
if [ ! -d .git ]; then
  git init
  MESSAGE="Initial commit"
fi
# Any files that aren't in the directory, but are in the repository can be removed.
for F in  git ls-tree HEAD   cut -f2 ; do
  [ -e "$ F " -o -L "$ F " ]   git rm "$ F "
done
# Any files that are in the directory, but aren't in the repository can be added
git add .
# And commit...
git commit -m "$MESSAGE"
So this script takes one parameter: the name of the directory where changes have (presumably) occurred, and just blindly commits everything there. The magic glue, then, is the awesomeness that is 'incron' :-) My first target is the ~/bin directory of all of those useful little scripts that I tend to randomly edit without nearly enough version control:
incrontab -e
home/andrew/bin IN_MODIFY,IN_DELETE,IN_CLOSE_WRITE,IN_MOVE \
     /home/andrew/bin/commit-directory /home/andrew/bin 2>&1   logger -t andrew-bin
With this, it means that whenever a file changes, is deleted from, moved into, or out of the directory we are monitoring, our commit-directory script is run. Just for testing I delete some ancient files that should have been killed a few computers back. A quick 'git status' in the directory shows everything was committed nicely. I edit a file and make some quick changes. Once again, I go into gitk and can see all the history. I sit back and ratchet my laziness another notch with a nice cup of tea, happy that, for now, at least, changes to my scripts are under revision control at last. Outstanding Issues Well, ok: it's usable as is, but there are a few small things that could be improved: I'll keep monitoring in the real world if these are real annoyances, and whatever other annoyances I find, and maybe I'll tweak that commit script a bit more - add a delay and/or some locking too it. I don't think that adding some push would be too big a deal either, and I'd love to get suggestions from Git geeks as to how to do this more simply/reliably too.

Dirk Eddelbuettel: RPostgreSQL 0.1-6

A quick bug fix released of RPostgreSQL was uploaded to CRAN earlier today; it updates last week's 0.1-5 release. An editing error left one of the helper functions broken. I also updated a few of the test scripts to also allow for optional environment variable for the port at which the PostgreSQL server is listening. This is handy when you have parallel installations of different PostgreSQL versions which Debian makes really easy. As always, all the details (including the full ChangeLog) are at the local RPostgreSQL page, the RPostgreSQL package page at CRAN and of course the Google Code repository for RPostgreSQL.

19 October 2009

Robert Collins: Government data please do it right


The Australian government 2.0 taskforce has an initiative to make data available for public remixing and use: after all its public property anyway, right? They have even run a mashup competition. Notably missing from the excellent collection of data that has been opened is the NSW Transport and Infrastructure dataset for public transport in NSW. There is a similar dataset for the Northern Territory in the mashup transport section. The NT dataset is under the fantastic cc-by licence. You can write an iphone app with this, a journey planner that you can cart with you while disconnected; a find the closest bus I can walk to tool, or well let the imagination run wild. The NSW dataset is under a heavily restrictive license. Its so restrictive I m not sure its feasible to write an open source tool using its data. The meta-issue is that NSW T&I department wants control over the applications built with this data. This adds a tremendous chilling effect on potential uses of the data: the department will have to approve, with a long lead time, every use of the data, and get to tell the application developer what to changes to make to their application. I strongly doubt that a simple remixing of the data (e.g. with weather reports to prefer buses on very wet day) would be permitted, as it would allow other users to just read the remix and get the original data /without entering into a license agreement/. I m sure there is some unstated risk of openess, or benefit of control, that is shaping this problematic approach. Whatever the cause, its not open at all. Given that the overall approach is fundamentally flawed, a blow by blow analysis of the custom license isn t particularly useful, however I thought I would pick some highlights out to save folk the trouble ;)
  1. The dataset is behind a username/password wall [that you cannot share with others].
  2. Licensees may not be private everyone must know you re using the data.
  3. You must link to the 131500.com.au website
  4. You may not charge users for an app that has to be redeveloped if the dataset changes shape
  5. Any application written to use the dataset must be given to the department 30 days before release to the public.
  6. The department gets to suggest changes to any announcement related to the developers app, the license agreement or the dataset.
  7. The dataset is embargoed you cannot share it with others.
  8. The use of the dataset has to be logged and reported.
  9. There is a restraint of use in there as well related to Inappropriate and Offensive Material. It wouldn t affect me, but sheese, given all the other restraints its hardly needed.
There are more gems in the details, but in short: The department will control what, where, when and how (the data is accessed, the application s functionality/appearance, how it was used). Hell, the 30 day requirement alone makes for slow delivery of whatever someone wants to build. I really hope this can be improved on.

Next.

Previous.