Like whores dancing for their trinkets

Today I’m going to announce things. One thing has a screenshot, one thing does not. The thing without the screenshot is the important bit and the thing with the screenshot is simply to get peoples attention. I know how this marketing thing works.

Gypsy

I’ve been working on Gypsy for a while now and it is a GPS daemon. It uses Glib and D-Bus and handles Bluetooth and serial port GPS devices natively (ie you don’t have to use rfcomm to create a /dev entry for a bluetooth device before you run it). It has a website – http://folks.o-hand.com/iain/gypsy

The reasons I wrote it were because I was increasingly annoyed by gpsd’s shortcomings in many areas and I think I fixed them with Gypsy. A quick overview on how it works:

The gypsy-daemon process is started (currently at system boot, D-Bus 1.2 should solve that hopefully) and waits, doing nothing. Clients use D-Bus to tell gypsy-daemon to connect to a GPS device, and gypsy-daemon parses the NMEA sentences firing D-Bus signals as things change. The clients set up listeners for what ever signals they want and they *only* get woken up when that signal is fired. This means that clients which don’t care at all about the satellites changing do not have to listen for the satellite signal and they won’t get woken up every time the satellite changes (which is generally once every second). This technique allows Gypsy clients to use the minimum of power. Which is good for handheld devices…

Gypsy also comes with LibGypsy which is a nice wrapper library that contains GObjects that make using the D-Bus API really simple. There is also full API documentation and a tutorial.

Obviously at the moment Gypsy only supports basic NMEA commands, but is perfectly usable to get GPS data. There may be bugs here and there, and as there are a myriad myriad different GPS devices out there it’d be nice if people could test it and see if it works with them. If it doesn’t, it would be nice if you could put the NMEA log of the device in question on the bugtracker . The log can be got with the –nmea-log command line option when running gypsy-daemon. Thanks…

So, that was the bit I’m most excited about – Gypsy, but I know that people like screenshots and screenshots of GPS output on a terminal isn’t the most exciting thing to look at. Trust me, I know… To that end, and so that if any fools gets excited enough about the next part to pass the word around then my Gypsy stuff will get pulled along with it….Haahaa! A cunning plan I think you’ll agree…

Anyway, I’ve also been playing about with putting a compositing manager inside Metacity. I know this has been attempted before but the aim then was to put an all singing, all dancing, superduper effects overdrive 3D GL based compositor inside it. And it failed. But I don’t think this is the right approach anyway and most people I’ve spoken to and respect don’t want silly 3D spinning cubes or desktops that you can look down the side of your windows or fish, they just want translucent windows and drop shadows. I’ve been working on shoehorning xcompmgr into metacity. I figure that with enough force you can make anything stick together. And it seems to work.Well, for various defintions of works. There’s rendering glitches and silly things have shadows while sensible things that should have shadows dont, but its working well enough for me on both my desktops to use full time. Trying to get the core stable enough before adding all the finishing bits.

The code is in the subtly named iains-blingtastic-bucket-o-bling branch of metacity. The code is ugly, evil and a nasty hack at the moment (unlike Gypsy which is lovely code. You can test it if you want, but it will contain bugs, it will eat your data, it will shoot your cat, crash your car, drink all your beer and force your children to make clothes for GAP. (Gypsy on the other hand will not do any of that stuff at all…use it, it’s lovely)

The cost of code…

Chris made a pretty map widget thing and threw down the gauntlet

I’m expecting a libjana-gtk/gypsy mash-up from a certain Mr. Burton (no pressure)

Given that Gypsy is my baby, I felt obligated to beat Ross to it 🙂 And so I present

And a massive 87 line program to how how fun and easy it can be to find out your location and then draw it on a map.

#include <gtk/gtk.h>

#include <libjana-gtk/jana-gtk-world-map.h>

#include <gypsy/gypsy-control.h>
#include <gypsy/gypsy-device.h>
#include <gypsy/gypsy-position.h>

GypsyControl *control;
GypsyDevice *device;

static void
destroyed_cb (GtkWidget *window, gpointer data)
{
gypsy_device_stop (device);
g_object_unref (control);

    gtk_main_quit ();
}

static void
position_changed (GypsyPosition *position, GypsyPositionFields fields_set, int timestamp, double latitude, double longitude, double altitude, JanaGtkWorldMap *map)
{
if ((fields_set & GYPSY_POSITION_FIELDS_LATITUDE) &&
(fields_set & GYPSY_POSITION_FIELDS_LONGITUDE)) {
jana_gtk_world_map_add_mark (map, latitude, longitude);
}
}

int
main (int argc, char **argv)
{
GtkWidget *window, *map;
GypsyPosition *position;
GError *error = NULL;
char *path;

    gtk_init (&argc, &argv);

    if (argc < 2) {
g_print ("Usage: %s <device\n", argv[0]);
return 1;
}

    control = gypsy_control_get_default ();
path = gypsy_control_create (control, argv[1], &error);
if (path == NULL) {
g_warning ("Error creating client for %s: %s", argv[1], error->message);
g_error_free (error);
return 1;
}

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "destroy", G_CALLBACK (destroyed_cb), NULL);

    map = jana_gtk_world_map_new ();

    gtk_container_add (GTK_CONTAINER (window), map);
gtk_widget_show_all (window);

    device = gypsy_device_new (path);
position = gypsy_position_new (path);
g_signal_connect (position, "position-changed", G_CALLBACK (position_changed), map);

    gypsy_device_start (device, &error);
if (error != NULL) {
g_warning ("Error starting %s: %s", argv[1], error->message);
g_error_free (error);
return 1;
}

    gtk_main ();
return 0;
}

As you can see, its really not a lot of code. I also added 10 lines to libjana-gtk to draw the marker. Total time taken, about 40minutes, including testing, debugging and discussing a few bugs with Chris. So lets see what sloccount says about it:

Total Physical Source Lines of Code (SLOC) = 80
Development Effort Estimate, Person-Years (Person-Months) = 0.01 (0.17)
Schedule Estimate, Years (Months) = 0.11 (1.27)
Estimated Average Number of Developers (Effort/Schedule) = 0.13
Total Estimated Cost to Develop = $ 1,905

Hmm, we should have scheduled 1.27 months for it and I should have earned 2grand? (not including the code I added to libjana-gtk which would have increased the line count to 90)
Oh, whoops, almost forgot this:

Please credit this data as “generated by pulling numbers out of David A. Wheeler’s ass”

sloccount – for when you need to over estimate EVERYTHING.

A history lesson

A few days ago, I too got an interesting email from a young chap

hi iain,

OMGLOL my name is iain and I am like, sooooo your biggest fan!!! Like, I totali love reading your blog and ur awesome KDE reviews and shit like that!!!1!!LOL that was sooo funni LOL ur awsum!!!! when I grow up (im 29 @ the moment) i want 2b just like u! how xactly did you get 2b sooooooooooo awesum, OMG i  hop u answer soon LOL!!!!!!!!!!!!!!

iain

It is an interesting question and one I think about a lot. How did I come to be so awesome? I’d encourage other bloggers to write about how awesome I am as well, then I can say I started the “how awesome is iain” meme.

But the long answer to iain’s very intelligent and interesting question is this:  I was born and I grew up and there is not a time in between then and now when I wasn’t totally awesome. They say that good leaders are not made, they’re born and that is the same for awesome people such as myself. I am, have always been, and will always be awesome and the sad answer is that no matter how hard you try, you won’t ever be as awesome as me. Maybe you should just buy me something to show your appreciation for all the awesomeness that I bring into this world. I think you should. Unless you’re french and like ManU, we don’t want another “incident
now do we?

Alms for the poor

Well, it’s October and October is that time of year for getting really drunk and inflating the value of your project to scrounge some cash. So I thought I’d join in too.

Obviously the Marlin development costs are astronomical, so please get very drunk and give generously. I spoke with my accountant Jimmy “The Snake” Twoteeth and we’ve worked out that £10grand (thats about $20,000) will cover hosting costs (the live.gnome.org guys are running a racket here), a couple of holid…sorry “developer conferences” in The Seychelles and lets not forget that hookers and crack don’t come cheap…

Obviously I don’t expect you to donate to Marlin without first looking at what we’ve accomplished over the last year or 2. Firstly, most importantly and lastly, we’ve actually made a release. What more can you want?

So give give give today. It’ll cure all headaches and make you attractive to the opposite sex and you can tell potential employers/girlfriends about it.

A public announcement for all potential employers/girlfriends reading this blog

Hi,

It has recently been brought to my attention that my actions, comments, opinions and things I do, make, say and think (teehee) may make me a less attractive candidate for your employment/affections. Well, to be completely honest this isn’t the first time I’ve been told this and really I don’t care. If you are a potential girlfriend who does not allow me to be me then I don’t really know why I’d want to date you. And if you’re a company who doesn’t let me be me, then I definitely don’t want to date you either. Even if you pay me. I ain’t no cheap hooker.

Nor do I understand why you would want to employ/date me if I was pretending to something I’m not. I wouldn’t like to find out you were only pretending to like Gabriel García Márquez because I had a book by him or you said you thought Slint were the most influential band of the 80s and 90s, but then I caught you crying at a Snow Patrol song. I’d think about quitting right on the spot if I found that out. And if we were out on a date and you said “Iain, I’ve been lying to you, our corporate goal is actually to oppress the workers in Indochina and force them at gunpoint to create cheap OEM software that we will sell using a spam marketing campaign starring Oprah Winfrey”, well, that’d be you dumped on the spot baby. You can be sure of it. No second chances, no crying at your office door singing “Iiiiieeeeeeiiiiiiieeeiiieeiiiii willlllllllllllll aaaaaallllllwwwwwwaaaaaaaayyyyyyeeeeeeessssss love   ….     ewwwwwwwwyyyyyooooooouuuuuuuuueeeeuuuuuuueeeeuuuuu”. Not after the last time.

If on the other hand, you read this blog and find its fine blend of cheeky satire, surrealism, commentary of varying levels of insightfulness with some pretentious big words sprinkled on top like icing sugar on a big chocolate muffin (one of those milk chocolate ones with the white and milk and dark chocolatey bits mmmmmm) amusing and refreshing like lying in a cool spring breeze and allowing it to wash all the dirt and filth off then get in touch(*), or buy me stuff. Or dont, its up to you, I don’t care either way.

As for the rest of Seb’s (can I call you that Seb, I feel like we’ve got a brother-i-never-had bond thing going on here) post, I’ll probably just keep posting what I feel like, when I feel like it, and its up to you (plural, not you personally Sebby-baby) to like or dislike it. Can’t say fairer than that really.

(*)Unless you’re a potential employer, I’m quite happy where I am actually. And I’m not really on the lookout for a relationship either, so yeah, no-one has to get in touch at all actually. Except movie producers in Hallywood…hallywood!

My Voyage of Discovery

Luis asked if anyone had tried the KDE4 live CD, so being a funlovin’ guy I downloaded it from http://home.kde.org/~binner/kde-four-live/ and gave it a shot. Once it loaded I was dropped to a login screen with a username and password. I didn’t know the username/password. While I was staring at this screen I noticed that some fonts were anti-aliased and all sexy smooth, and some were all jaggy. Looked weird. It said “linux” in a list at the side, I clicked it, and it added “linux” to the username field. Now for the password. I tried “linux”. It didn’t work. Then I tried just clicking login. It worked! Wooo. Bad start though. I know this isn’t really KDE4’s fault but rather the LiveCD, so i’m not judging it.

While using this login screen I did notice that I still don’t like the look or feel of QT. Guess I never will.

Once the desktop (plasma) loaded, it seemed like the background was running on a 16colour amiga display. Big chunks of greyscale in a clouds pattern. Then there was a blue-black-blue gradient bar at the bottom. There was an icon that had a large “?” on it. On the screen were 3 windows. One just had an icon in it and the title read “Klipper”. Then there was a crash reporter and a Tip of the Day window. Each of these had a corresponding text in the blue-black-blue bar.

On the desktop itself was an icon surrounded in a black square. Double clicking it started a calendar application. Ohhhhhh. And there was a swirly grey/green thing in the corner that said “esktop Toolbo”. Putting the pointer near the “esktop Toolbo” made a menu of sorts slide out with some things like Lock Desktop, Zoom in/Zoom out and a list of Plasmoids. The word plasmoids makes me think of the game Asteroids, and I’m always disappointed.

Anywho, I added a clock to my desktop. It gave the wrong time. I added a few more. And a few digital ones as well. Then I zoomed out and I had lots of tiny clocks on my desktop, all giving the wrong time (I assume they were anyway, they were too small to actually read). I added a few more things, and then I added some map of the world thing and the desktop crashed, and I was left with the Klipper icon. Ctrl-Alt-Backspace and clicking linux logged me back in.

I set everything back up again. I tried to take a screenshot for posterity. PrtSc didn’t do anything. I clicked the mystery “?” icon on the blue-black-blue bar assuming it to be a menu. It didn’t do anything. So I drew a screenshot instead.

[Where it says “Kicker” it should say “Klipper”, I get Konfused with all these Kute KNiknames, and actually the background wasn’t that smooth, it had about 248 less colours in it – I am quite proud of my “esktop Toolbo” icon though]

So, yeah, maybe the LiveCD wasn’t working too good on my laptop. I dunno, don’t think I’ll be switching tomorrow…
but there were some nice things. I really liked how the window bar buttons faded between different states (everyone knows I’m a sucker for fading), and the idea of having some subtle animations is nice, with things sliding and growing.

Man, I’m so dead…

Vitriol

Fullish disclosure: I am and have always been a GNOME developer/user. I used KDE for about 30 seconds at V0.9a (Or there abouts, all I really remember was that it was some version just before 1.0 came out). I read about what they do because I’m interested in what they are up to, but really what they actually do doesn’t bother or concern me at all. They could make all the buttons pink with hello kitty icons and reverse the X axis when you move the mouse and I’d not lose any sleep over it. I’d find it funny and think it stupid, but its their project to do whatever they think is best, I don’t use it so really it doesn’t concern me in the slightest what direction they decide to take it.

With that said:

Two KDE developers, Kurt Granroth and Andreas Pour once wrote:

What do we do when “one of our own” turns their back on our community’s code of ethics? I remember a time when it was all about the code. We worked on free software projects (the term “Open Source” came later) in our spare time, caring little about “marketing” and even less about other business concerns.

Reading some KDE blogs recently disturbed me: Troy Unrau and Jos Poortvliet. They discuss, in varying amounts of detail, their visions on how to market KDE. I do have a low opinion on marketing in general as mainstream marketing is mainly just an exercise in manipulation to get people to buy shit they don’t need with money they don’t have, but open source marketing has generally stayed on the ok side of a fine line.

Troy outlined his 4 point plan and I don’t have a problem with 3 of the 4 points (although as a side note, I do find the irony of suggesting that KDE targets nonKDE distro users with google adwords amusing, but maybe Troy hasn’t been around long enough to remember this fiasco from where the opening quote comes from). The part I have issues with is the second half of point #2 – “Third Party Press” and this is the same idea that Jos picks up on in his blog.

In Point 2.1.1 Troy laments that dot.kde.org isn’t picked up on things like Google News because it is seen to be rather partisan, so the solution he suggests in 2.2 is to have external writers on the payroll (as it were, I’d imagine there wouldn’t be payment in this arrangement) to make sure that the news KDE wants to get out gets out “so that we sound more impartial” (emphasis mine)…in other words, to turn every news site into a propaganda site for KDE, but one that is less obvious. Jos continues that he is creating a guide on How to write about KDE, which he didn’t link to, so I have no idea what the content may or may not be though I’d be interested to find out. [Update: http://lists.kde.org/?l=kde-promo&amp;m=118617671431472&amp;w=2]

The reason I don’t like this, is not because I am scared by these tactics (as someone suggested in an earlier comment) but because I dislike the media being used in this way as it destroys the idea of a free and independent press. If the press cannot be trusted to tell the truth no matter what, what use are they? When the press is no longer free, the people are being manipulated into believing things that do not serve the common good, but serve the organisation that planted the story, and when the people are being manipulated in this way, they are no longer Free. What good are the freedoms granted by the GPL and other Free software licenses if the people who use them have lost the freedom to find out the truth?

If another software vendor were to write a document to suggest tactics like these, I think we would be up in arms about it and rightly so, so how can we let it slide when it is “one of our own?” Come on guys, compete on code, compete on ideas. Do not stoop to strategies like this. You think you have a better product than the competitors, fine, then let the product speak for itself. Allow reviewers and writers to test what you’ve done and say what they think. Don’t fill the media with puff pieces shouting your praises, while ignoring the mistakes. What would come after that, sponsoring “independent” studies into desktop environments?

If you are so proud and confident of what you’ve done (Troy: 3.6) then stand up beside it and let the chips fall as they may. To do anything else seems like you are not proud or confident of it and are scared of possible criticism. Surrounding yourself with sycophantic yesmen is the start of a downfall. Take the criticism and let downs along with the praise and compliments and use them to create an even better thing.

[As another aside I have chosen trivial and amusing instances of media manipulation, but finding serious and inportant issues where media manipulation by governments and companies was not such a laughing matter is not difficult – try here for a start]