Search Results: "erich"

23 January 2007

Erich Schubert: More DBus: DBus-inspector

Hi folks, I've been hacking up a DBus inspector, since dbus-viewer was removed from the Debian package (to get rid of the QT dependency). Using python, it's not too hard. Enumeration of methods and similar already works, the basic UI also is in place (Glade rocks!) but I still need to feed the data into a TreeModel for GTK and do all the difficult parts of the UI. I'll post an update when I have some screenshot and code ready for you.

20 January 2007

Erich Schubert: The end of the world 2.0 is near.

I'm convinced the Web 2.0 bubble will impact soon. Granted, some will survive, some will struggle - but some will just blow up. Time to sell for these. There are several reasons why I believe this will happen "soon": Many people have been keeping an hungry eye on YouTube, Rapidshare and others. It's just a matter of time until some of these predators goes for the kill. My predictions for the post-web2.0-bubble time:

19 January 2007

Erich Schubert: Preinstalling Linux

I read today that Ubuntu is working on an "install.exe" for Ubuntu. Which apparently will install an Ubuntu image into C:\UBUNTU so you can boot that. It's not meant to wipe out or replace windows, but live alongside on the existing partition. (I'm curious how well that works with NTFS...) I'm looking forward to that - and crazy people bringing this Ubuntu.exe along on a CD whenever they go into some computer store and install Ubuntu on all the laptops on display. If the manufactures don't preinstall Linux, why shouldn't we help them out? We're not installing a virus there or deleting preinstalled software... Would be fun for a flashmob, too. Go into the shop with a dozen people, a few to distract the employees (asking difficult questions, eventually even buying something; since there is no reason to do any harm to the shop!) and others using CDs to preinstall Ubuntu. Of course it would be even more fun if the laptop booted Ubuntu the next day... All laptops looking different, but welcoming and friendly and with lots of powerful applications. Maybe one or another will think "whoa, did microsoft upgrade them to vista overnight?" :-)

18 January 2007

Gunnar Wolf: Then fix the software, not the format!

Erich: Of course that I know XML's obstination on manually matched closing tags is intentional - That and several other points simplifying SGML were what in the end allowed SGML to succeed (and wildly). However, I still not agree. If you have a tool that generates broken files (which are expected to be read, no less, by any other arbitrary tool which does not require to be very bright), whose fault is it? The file format? No - The generator's. Besides, if you have a configuration format that's expected to be used by al kinds of tools, and sent over every conceivable type of configuration channel (including slow and expensive ones, such as mobile phones), or that can contain arbitrarily deeply nested structures and become just huge, shouldn't your priority be to make the protocol less repetitive instead of more? If you want a format to be robust, yes, you should insist on well-balancedness (what's the last time you were able to compile C code with unmatched braces?), and reject unbalanced documents (possibly even, yes, pointing out where the match was probably broken - Yes, this last point favors XML over simple braces, but still, a compiler often makes a decent job at finding where a nesting problem lies)... Yes, I don't have the authority to question what has become a world standard - But I still have to be persuaded XML is the way to go for many (no, of course, not all) of its uses.
No, I'm not pushing YAML too hard - I just happened to like it for several uses, but I'm far from an informed fan. I'm just bashing XML, which is fun enough for me ;-)
Oh, and about your blog: Right, it seems the culprit is Google Reader. Planet links just fine, and using RSS 1.0, the only link I get is the right one. Planet's RSS 2.0 generator should be to blame then.

Alexander Schmehl: Storm

Erich mentioned a storm warning for Germany and the recommendation at his university to not do any lectures. Well... Here in the north we have quite some wind blowing, believe me... the first time I actually saw roof tiles been blown off the roof. Makes you feel very comfortable when walking home ;) Interesting: All universities in the neighbourhood have been closed and schools closed at 11:00am. Only we needed to stay till 7:00pm for our math course :( Wish us luck: We live in a attic floor flat and already lost some roof tiles. And according to the forecast it might still become stronger...

MJ Ray: Is this storm coming for you?

One of the bad things about moving to live in the west country is that we are now on the front line of any storms that leave the Atlantic for England. To make matters worse, we are on a hillside and some idiot put the boiler vent facing into the prevailing wind, so I have to relight it at least once each bad storm. Today's storm is the worst yet. Average wind speed is reported by TV as 35mph, gusting over 70. Anything that wasn't bolted down or very very heavy and hadn't already been blown away has now gone. I keep going out quickly to do things like add weights to the bin or wedge one of the garden tables against the fence, but I don't feel like fixing my bicycle and riding to town along the coast today. On the first trip out, as I was checking the roof for damage, one of the neighbours' six-foot fence panels flew off. On the second trip... well, this used to be a fence on the other side of the path by our back wall: Photo of no fence Now it's just a concrete post surrounded by debris. If this is part of the storm heading for Erich Schubert then I think Munich has done the right thing.

Erich Schubert: A major storm is heading our way, according to weather forecasts

This is the first time I can remember, that the university is recommending to not hold lectures and go home early. They are expecting the ministerials to formally close the university, like they did with schools at noon. This will be the strongest storm we've had in years, apparently (well, others have been similarly strong I think, but not as big). It's now 15:18, and when I look out of the window it's still surprisingly quiet. The trees are moving, but only slightly. But it's the wind protected side of the building. The university warning email said that they expect public transport - and Munich has a huge public transport system - to stop service at 18:00 "the latest". Guess I won't be able to go dancing tonight then. It would start at 19:00, and I need about 30-40 Minutes by subway to go there. I guess they will shut down subway to make sure noone gets stuck in the tunnels if there is a power loss. Such huge storms are a threat to power supply. [Update: 21:08 you can tell now it's a storm, but it's not bad here. But all train traffic is stopped in bavaria, grounding a few hundred people who didn't make it home in time. They've been taken care of. In Munich, busses and the subway are supposedly still in service. I went to go dancing, but there was a note on the door it's closed tonight; same for the karate training of a friend. From what I heard in the radio there were only few fatalities so far and limited damage, but we havn't reached the peak of the hurricane yet. Few reports of blackouts in some small towns. Schools remain closed tomorrow.] [Update: 19. Jan, noon - trains apparently still aren't back to schedule everywhere, but the system is recovering. Not many major damages reported in the media and not many fatalities. It's still windy. IMHO it was "typically german" how we handled the hurricane, urging people to stay at home and not risk much...]

Erich Schubert: More on XML

Gunnar, first of all, let me point out that repeating the closing tag makes the format more robust. If the parser encounters a non-matching closing tag it knows that something isn't right. Thats a feature, not a bug. IIRC SGML had shortened closing tags (</>) and closing tags were partially optional; if the parser encountered a closing tag it would assume all other tags closed up to the previous matching tag. I guess some people who used SGML and were involved with XML had made the experience that this was a bad idea. It makes parsing harder and the file format more likely to break. If XML would only be written by perfect tools, we wouldn't need the verbose closing tags. We could probably use some binary syntax like "\1tagname\0\2contents\0". Parsing would be fast and easy. Or something along
tag   "string contents" tag    
(which I like a lot). Or S-Expressions. But it is a strength of XML that you can detect certain common errors such as incorrectly nested tags: XML data is generated by broken tools all the time, so we need a syntax which allows us to detect such errors. As for my RSS feed: the links are correct. The tool you are using mishandles the guid tag, which is just a unique identifier; the sole responsibility of my blog is to make them unique. Many tools use a link for the guid, but that is not required by the spec. In fact my blog is quite verbose about not using the full URL there: isPermaLink="false". Instead it provides the "link" element. Look at the source of my RSS, no repeated "en/" in there. Planet is broken here, and your reader:

Erich Schubert: Putting a CV on the homepage

Dear Lazyweb, what is you opinion to having a CV on your homepage? There are definitely privacy issues associated with this. Even having your birthday there makes abuse easier. On the other hand, many people will write a blog posting on their brithday and thus expose it anyway. I'd never put a full CV on the homepage (a good CV is adopted to the audience anyway), just with the bare minimum such as the university graduation and such. Having some project and research information there might get you some interesting job offers; putting a mini CV there as "teaser" along with the offer of a full CV on request could prove beneficial. On the other hand, such as CV could be a dangerous source material for "social engineering [wikipedia]" attacks. The maiden name of your mother used to be a suggested backup password for many websites, and is found in some CVs; people tend to trust people more that claim to have been on the same school or university (even if they can't remember them; especially if they are made feel embarassed by not remembering...). Where is your privacy limit? How much of your privacy did you expose on the web already anyway? Do you still avoid having a one-stop download of that data? Do you think there is a way back, with all the indexing, caching and archiving of web pages? My blog does intentionally not have comments; to reply please post in your own blog or email me at erich@debian.org; I read a couple of OSS planets and I'll also notice if you link to this blog entry and ping technorati.

Erich Schubert: Putting a CV on the homepage

Dear Lazyweb, what is you opinion to having a CV on your homepage? There are definitely privacy issues associated with this. Even having your birthday there makes abuse easier. On the other hand, many people will write a blog posting on their brithday and thus expose it anyway. I'd never put a full CV on the homepage (a good CV is adopted to the audience anyway), just with the bare minimum such as the university graduation and such. Having some project and research information there might get you some interesting job offers; putting a mini CV there as "teaser" along with the offer of a full CV on request could prove beneficial. On the other hand, such as CV could be a dangerous source material for "social engineering [wikipedia]" attacks. The maiden name of your mother used to be a suggested backup password for many websites, and is found in some CVs; people tend to trust people more that claim to have been on the same school or university (even if they can't remember them; especially if they are made feel embarassed by not remembering...). Where is your privacy limit? How much of your privacy did you expose on the web already anyway? Do you still avoid having a one-stop download of that data? Do you think there is a way back, with all the indexing, caching and archiving of web pages? My blog does intentionally not have comments; to reply please post in your own blog or email me at erich@debian.org; I read a couple of OSS planets and I'll also notice if you link to this blog entry and ping technorati. [Update: first interesting replies coming in - let me quote:
If I do get a call from someone who spotted it (rare, once every 3 months), the recruiter is 99/100 an asshole he isn't going to ask you to do something you want. Really!
Yeah, I can imagine that. One of the reasons I've put up a mini CV is that every few months I'm asked some of these basics usually found on CVs because of my art - I have some poetry on my page that is very popular, and every now and then someone wants to use it in school; teachers always want people to be able to tell something about the author. In such cases, I find it actually worth to highlight that I'm a math and computer science guy, to make people see that it isn't an either-or thing, language and science.]

17 January 2007

MJ Ray: Debian: Fun with no builder 3: pbuilder fans to the rescue

Erich commented:
"Pbuilder is great (and cowbuilder even more so). First of all, it makes setting up and upgrading chroots easier (even easier than dchroot etc.), but it will also handle dependencies and do install/removals (well, technically it won't remove stuff, the chroot is just thrown away afterwards). That way, pbuilder helps getting build dependencies right, and ensures the package is currently buildable (not with some library package you still happen to have on your system, but that has been removed from Debian; not uninstallable for some reason etc.). This makes the job easier for porters, since a FTBFS is less likely to be an error in packaging by the maintainer... At some point I had like 6 pbuilder chroots... woody, sarge, unstable, woody with some backports, sarge with SELinux backports, unstable with experimental. Sure, we don't need debhelper either? After all, it just does some cp and mvs, doesn't it? There IS some benefit in having stuff automatized in a standard way; even though we could all do our chroots ourselves, I want to express my thanks to the pbuilder (and cowbuilder) authors and maintainers for making life EASIER for me. A lot easier. I could live without, but I would probably not keep that many chroots."
Ken Bloom added:
"One important feature of a pbuilder chroot is that pbuilder installs build-dependencies as you ask it to build debian packages, and removes them as soon as it finishes building the packages. In this sense, pbuilder is specifically intended to replicate the buildd environment, so you can find out whether your packages will break on a buildd (e.g. whether you've remembered to include all of the build-deps in debian/control, because things will break on the buildds if you forgot to add a build-dep because the build-dep was just lying around on your system (or in your unstable chroot)."
Sven M ller wrote:
"Well, pbuilder has several benefits, but the most important one to me is that it restarts from a clean system (only base packages + build-essentials installed) on each build. Sure this adds to the time needed for the build, but it also makes sure that I get all build-deps right and that the whole build process is as reproducible as possible."
Ben Hutchings commented:
"The major difference between pbuilder's approach and simply building in a chroot'ed installation is that pbuilder tries to build on a minimal system plus the specified build-dependencies. If you always build with pbuilder or similar it's much less likely that you will miss a build-dependency or otherwise produce a package that can't be auto-built elsewhere."
I take the clean chroot point as a clear benefit, but it still strikes me that there are easier ways to do the same thing (rsync --delete) without all the waiting around for pbuilder on my slow mipsel. I guess that's the difference with debhelper: debhelper use doesn't seem to slow me down.

16 January 2007

Gunnar Wolf: Ok, now we are getting somewhere! (Re: XML-based configurations)

Ok, at least Erich states something I agree with (and, lets be fair, its also told by Marius on a comment to my previous post): XML should not be pushed where the data to be represented is flat (or flattish - Say, a INI-style configuration is enough with a not-exactly-flat-but-still-unnested configuration).
Still, I do not buy XML as adequate. Erich insists on the Apache configuration file as an example of how not to do things - And I agree wholeheartedly: It sucks and makes no sense. However, it's just too easy to break proper XML nesting (for the love of the FSM, why is it necessary to repeat the element name we are closing?!) to be something I want to deal with when in a hurry. XML might be great as a data interchange language, but -in my always humble opinion- not more than that.
PS- Erich, your blog is broken as well ;-) The generated RSS has URLs which repeat the '/en' part. Oh, and about my blog complaining about XML: Yes, I was syndicating another site - And the XML parsing engine I use was somehow b0rked as well. Nah, I don't feel like changing my blog's software, it's mostly fine as it is ;-)

Erich Schubert: Config files

Gunnar, the apache configuration files for example are a mess, and certainly wouldn't become harder to edit if they were some real XML. Similar things apply to other applications. And if you reread my first post, I never suggested to use XML for all configuration files, but just for those who need some nesting structures. If you don't need nesting, some other format with proper character encoding information is fine with me. It should just be standardized e.g. with respect to quote handling, whitespace handling etc.
key = value
and
key="value"
are already sufficiently different that most applications can only read one or the other. P.S. I couldn't reach your blog the last few days; today it worked after a long time and with some error message on top: "not well-formed (invalid token)" seems like you're having some problems with the XML for your blog? :-)

Erich Schubert: DBus for music players

I was considering to modify mpd, my favourite music player (using a daemon and multiple frontends, however I usually don't interact much with it anyway except the casual 'skip' button press). I wanted it to support DBus, so I could more easily add e.g. a "love" and a "hate" button, and start collecting data which songs I like. Seaching for "mpd dbus" quickly turned up a proposed freedesktop.org standard by VideoLan people and some discussion by for example the XMMS2 folks. I'm looking forward to that. Right now, my "Multimedia buttons" are bound to some shell scripts that try to find out which media player I'm running and trigger the appropriate command there.

Gunnar Wolf: More on the unkillable XML-for-configuration rant

In short, Erich says that XML, plus the right editor, Just Works(tm). Well, yes. But when you are over a slow link, or when you are desperate with a b0rken system, you just don't have Eclipse at hand to edit a config file. Of course, you could use the half-existing XML support you talk about in vim (I have not tested it, cannot be sure of it), but it is still a PITA if your /usr is not working fine or if your termcap is too dumb to manage. Yes, there are each time less of those situations, but anyway...
I won't start ranting on how YAML is the right tool for every situation where XML is used - It's clearly not. XML is, after all, a standard. Some configurations can be done by XML, say, if you have any of those Java frameworks (I've only suffered^Whated^Wgot despaired^W^Wset up JBoss), but still... Configuration files, at least the important ones, should be editable by using a lightweight, easy and available tool like nvi, pico, or even cat sed.
Oh, and about YAML's site being valid YAML: Of course, it only looks like it. But cut and paste it - It works for me :) Of course, it is not meant to replace or work over HTML. I would never dream of using YAML as a web-services language or anything of that sort. There are better tools for that.
But please, leave config files hand-editable. With common, light and hard-to-break editors.

15 January 2007

Erich Schubert: Smoking kills

Nothing new, but fun: Sometimes, smoking can be a very bad idea. Darwin award 2006.

14 January 2007

Erich Schubert: Config files

Our top-10 female geek "helix" (congrats!) suggested (jokingly) we could do an Ajax interface for configuration files. Well, if you want, you can run a tomcat as root, and have it access your configuration files. If you're crazy enough. :-) No, there are actually secure ways of doing such things, if you want even with Ajax. Just have a secure web server for administration, which will then push the updated configuration file to the actual hosts e.g. via cfengine. Since people still tend do read "all configuration files should be XML", and "but I hate XML": please get down. We already have quite some XML-lookalike configuration files (e.g. apache). We have S-Expressions. We have some deeply nested INI files. We have true XML config files (e.g. /etc/fonts/fonts.conf). All I'm asking is that we should maybe use one single format for all applications that have similar requirements for their configuration. And no, not every application can be sanely configured with a linear, flat configuration file. Sometimes, a tree-based data model is much cleaner. You know, thats why we're using a tree directory structure, and not flat files. And face it, if you like it or not: XML is the most widely accepted choice for exchanging (tree structured) data. And if you manage systems, you want to be able to sanely exchange data between e.g. a configuration management tool and the service you're configuring.

Erich Schubert: More on DBus

I was asked how I found out about the proper DBus signals etc. - well, that was the difficult part. DBus is supposed to allow introspection (I guess the dbus-browser that used to exist was using that), but not all appications provide this information. So often you have to browse some applications source code to find the appropriate values. For NetworkManager, I read to source of the gnome applet to locate the "wake" and "sleep" calls. For Gaim, I was reading the gaim source code. If you are lucky, Introspection could do the trick for you. Just fire up Python and do e.g.:
import dbus, dbus.glib
sysbus = dbus.SystemBus()
nm_obj = sysbus.get_object('org.freedesktop.NetworkManager',
                        '/org/freedesktop/NetworkManager')
nm_obj.Introspect()
which result in something like this:
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="Devices"/>
  <node name="VPNConnections"/>
</node>
... which unfortunately doesn't seem to be complete, but a hard coded pre-alpha reply to the Introspect() call. Maybe that's why the dbus browser has disappeared?

Erich Schubert: DoSing spammers?

Has anyone experience with DoSing spammers by deliberately flooding them with incorrect email addresses? I mean, it should be easily possible to put new (fake) email addreses up on web pages in a huge scale (actually this is an old idea of deterring spammers). Any spammer grabbing them will have his database grow somewhat out of control. At some point they'll probably notice that you have been providing them with bad data, and maybe drop all of your domains' email addresses harvested? Or do they just not care?

13 January 2007

Erich Schubert: More on configuration files

Gunnar doesn't like the idea of recommending XML for configuration files, why do you need to be able to edit a XML-file with a non-XML-aware editor if you don't like the raw syntax? If you don't like the raw syntax, use an editor that gives you a different representation. Or use some transformation. Write a tool that converts YAML to XML and back, if you like YAML better. (Btw, this is another reason to use a common library for configuration file handling - let people choose their configuration file formats!) Writing XML in the raw with a good schema-aware editor with syntax highlighting is actually quite nice. Have you ever edited an XML file with eclipse? You really should do that... I once opened my Openbox (a rather minimalistic window manager) configuration file in eclipse. Guess what, it was giving me useful syntax completion! It had loaded and used the referenced schema file. openbox configuration in eclipse It's not as if I think XML is the ultimate thing; (nor is Eclipse an editor I'd use for configuration files; startup takes years and it frequently crashes for me. vim also has some XML support...) IMHO there is a lot in XML that should be stripped (such as attributes); I like JSON syntax better, except it's in turn lacking essential information such as character encoding, namespaces and schema information. I also don't thin JSON allows comments. But when handling information from multiple sources (and multiple schemes), XML is really useful. It removes most of the quessing needed for handling other formats. And that is what I'm precisely advocating: use standardized formats. Consider for example the apache configuration. Do you know of any tool that can parse the apache configuration files other than apache? Some parts look like SGML/XML, but they don't have much more in common than using < and >. When you are in need of automating something with apache, you'll be annoyed by this. If apache would be using something where you have a reliable parser ready for - that would be nice. Have a look at the xchat.conf configuration file. It uses "key = value", but they have these extra spaces there and don't use quoting, this means the file can't be loaded by many parsers, e.g. bash. Now lets use at buttons.conf - compeltely different syntax, "KEY value" blocks, separated by empty lines... Btw, note that configuration handling with XML to me means also keeping comments somehow... most applications will nuke any comments in their configuration files; which is funny since most configuration syntaxes do have a notion of comments, but did you ever come across an application using sh-style configuration (i.e. that you could source in bash/dash/zsh), that keeps comments? P.S. The YAML homepage is not YAML. It's valid XHTML. Only if you strip out all the tags and attributes and use only the text content within the /html/body/pre tag, then you have something which probably is YAML. This compatibility with HTML is probably why XML was at all successful.

Next.

Previous.