All the Old Showstoppers

okay, new rule1: it’s okay to install a GObject property like this:

pspec = g_param_spec_string ("title",
			     "Title",
			     "The title of the item",
			     NULL,
			     G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_TITLE, pspec);

instead of the usual way you see in other GObject-based libraries, where we l33t h4x0rs dispense from the use of an explicit GParamSpec variable. this is especially true if you are trapped in 1983 and are still using an ANSI 80×25 terminal — though you should probably know that here, in 2008, 100+ columns are safe.

oh, and fill out the name and blurb fields of the property: GObject provides a little bit of introspection, but if you willfully ignore it then we can just forget about stuff like the GObject-Introspection project.

please, every time you install a property using a line like this:

g_object_class_install_property (
	gobject_class, PROP_TITLE,
	g_param_spec_string ("title", NULL, NULL, NULL,
	                     G_PARAM_READABLE | G_PARAM_WRITABLE));

an unfortunate incident will involve a bucket of puppies and a belt sander.

comments saying “gobject sucks you should be using ${ZEALOTS_OWN}” will be deleted without mercy because they miss the point by a hundred and fortyseven miles

  1. apologies to Bill Maher []

Apocalypse Please

if you need to create a string holding a datestamp, please — for the love of everything that’s holy and just and pure in this universe — stop abusing the patience of everyone on this planet, and use the ISO 8601 format.

formats not to use:

  • seconds from the epoch – oh please. I mean: come on1.
  • HTTP date – which is defined in two RFCs but it still sucks for small things like sorting or, you know, non-human parsing.
  • ctime() output – now, give me a flipping break

and please, don’t even think that people can rely on strptime() if they want to parse your datestamps — because they might care about something called “timezone”2.

any reference to running web services and their utter lack of clue in this matter is purely coincidental. not.

this blog post should go in the overall discussion about how web services clearly showed me how the bar for writing them has been placed so low that not even “Eleven Inches” Hermes could limbo beneath it. if even a simple, clearly defined data exchange format like JSON has been abused that much3 then there’s really little hope for the rest of us that care about interoperability and third party application development.

  1. okay, I’m guilty of this insanity as well, but I’m in the process of fixing it []
  2. a huge FAIL should be photoshopped on top of strptime(3) man page, right near the “Glibc Notes” section, where it says that in most cases the corresponding fields are parsed, but no field in tm is changed; WTF? what does in most cases mean? you have to tell me in which cases, you fscking idiot! []
  3. and I’m looking at you, Tumblr []

Small Print

Could someone please tell me why notification-daemon holds ~51000 windows after two days of uptime?

Notification Daemon
51700 windows? Really?

Now, I accept the idea that maybe xrestop is lying (and mallum on my back is ready to hit me) but this sounds like a huge leak somewhere.

Please, someone tell me this is a known bug in Ubuntu Feisty and that Gutsy is already fixed.

Back in Black

Dear ATi,

if you’re not even able to make decent drivers for your own (admittedly crappy) graphic hardware, please have the decency to fail and go out of business as you rightfully deserve.

No love,
  Emmanuele.

Expect

Well, it seems that after six years a new release of Emacs is out – and it uses GTK+ as the GUI toolkit. I’d like to think that what took so long was not adding this thing to the file selection dialog:

screenshot-emacs-file-chooser.png

Otherwise, I might expect something like this for the next release.

And this has nothing to do with the fact that I’m a ViM user. No, really.

Twist The Knife

Dear LazyWeb:

I’m trying to clean up the python bindings for the next release of a GObject-based library, so I’m using pygtk and its codegen magic; unfortunately, being codegen.py an incredibly bad program, I can’t see why or how it’s failing to read the .defs and .override files, and why it doesn’t generate anything. Is there a way to have some sort of error message or information except for the quite useless statistics recap? I’m using the same build system used by pygtk, so this must work if you apply enough bad mojo somewhere. I don’t want to dwelve into the 1707 lines of dense python – I’d rather spend my time binding a library.

Thanks.

Three hours, and many curses, later: it seems that I have mistakenly deleted a '%%' between a ‘ignore-blob’ declaration and the body of the override file. This, for posterity, is logically equivalent to “ignore whatever exists after this space”. which is, all in all, logically coherent, and I’m more than willing to beat my head against the wall for my stupidity. But if codegen.py had a “verbose” mode (instead of me sprinkling the code with “print” statements) I would have found this way sooner than the three hours it took me. A simple line redirected to stderr telling me “hey, I’m ignoring this and that” would have been sufficient.

How Good It Can Be

Corey, why on earth should we switch from an entire set of system configuration tools written in Perl to another one written in Python? Just for the sake of Python? Just because there are more Python zealots^Whackers on GNOME than there are Perl ones?

I understand that Ubuntu loves Python, but please: rewriting every tool in Python just for the sake of it is totally useless. What Python gives us over Perl, for system configuration backends? (No, it’s not a rethorical question: I’m serious).

EpS.O.B.

Davyd is absolutely right: steer away from any new-ish Epson printer you see, no matter how cheap they throw it at you.

When I was living with my parents, I “inherited” an old StylusColor 760 – easily the best printer I’ve ever had under Linux. When I moved in with Marta, we decided to buy a combined scanner/printer CX3650 (it came cheap at ~100€). Making it work under Ubuntu wasn’t that hard: only the scanner required adding a line in /etc/sane.d/epson.conf; it actually required more work for installing it on Marta’s iBook. But unless you print at least a page every day or so, the ink solidifies on the heads and creates white stripes on the printouts. You try and clean the heads, and you get a puddle of ink on the bottom, which marks the paper.

To make a long story short: the printer is now sitting on a shelf, disconnected, and I’m really thinking about buying an HP – which would suck, because I still got a perfectly working scanner attached to a useless printer.

Unless, my dear Lazyweb, someone knows a way to clean the heads of an Epson without a) calling tech support or b) destroying the chassis. Thanks.

Third-graders

This is a comment I left on Philip’s blog in response to Ross’ blog.

question: what are we, third graders that we must do all this touchy-feely, “we must not make comments” stuff?

ross’ comment was a bit on the edge, but its his blog, and he has any rights to write that the player sucks; the other blog post from joe is the more relevant: the entire free software/open source thingie works because we have copyright and because we have peer pressure. the “author” of listen stole code, because it didn’t simply lift it and put it into his project: he also removed the copyright notices. I copy code from many projects (as far as the license enables me to do it safely) but I leave at least a note saying from where I took the code and who’s the author. if a big company did the same thing we would all be jumping and screaming around.

what strikes me the most is that, instead of integrating stuff by talking to the various projects and – at most – forking some code base, the guy just went lifting code, collating stuff like a frankenstein movie, and then releasing the resulting “monster” without even a mention of the other projects. and all these people say: “oh, the media player situation demands it” or: “oh, amarok is such a fine player that we need a poor man’s clone for gnome” – basically insulting every author of the other media players around, insulting an author that want his contribution to the f/oss community recognized as he well should, and justifying the copyright infringement for the sake of having their pretty little clone.

these are energy stoppers. If I was a developer of another media player I would simply cease all my work instantly, out of such blatant ingratitude.

After having read some of the comments on Ross’ blog, and after the querelle about the NLD10 stuff that happened on the desktop-devel-list, I’m wondering if the major problem of the Gnome community is its being made of third graders, where one must not say bad things about someone else’s work because of a “we are all special”-kinda-like agreement that, it seems, you implicitly sign when you get an account.

Come on! If I think that a projects sucks I’ll write that it sucks, ferchrissake! I expect none the less from my peers, and I expect none the less from the many people that is well above my skills. If I wrote a piece of software and someone comes along saying that it sucks because of this and that, then I’ll respond or I’ll say fuck dude, you are right and will change it, or I’ll say yep, but it’s my project and I will go on. Gracefully taking criticism for your work is a valuable indicator that you are not a child anymore.

If you cannot cope with this, then please don’t even begin coding; because peer pressure and peer review are what makes F/OSS such a great endeavour.