iTunes 10, Firefly, forked-daapd

Apple recently introduced the new version of iTunes: iTunes 10. For those, like me, who are using Firefly to broadcast their music on their local network, you may have seen that iTunes 10 does not show the content of your remote playlist anymore :-( . The bad news is that a lot of commercial products are using it (especially NAS devices like Drobo…).

Someone started a thread about that on Apple’s forum: http://discussions.apple.com/thread.jspa?threadID=2564925

One guy says to have a look to forked-daapd which is a full rewriting of Firefly. So I did. On my Debian box, a package is available in “testing”:

$ sudo apt-get install forked-daapd

Change the directory where the music is in /etc/forked-daapd.conf, restart and that’s all. Then go to iTunes, the shared library should be visible and filled with your music!

Since Firefly is a dead project (no activity for a while), everybody using it should migrate to forked-daapd.

Note: this is my 100th post on this blog!

Do not check email adresses!

You may have noticed that on some rare websites (≈99.999 % of internet websites), you have to provide an email address when you register. And most of the time the application running the website check if the email address you entered is valid.

But you know what? Most software developers (you know, the guys staying all day long in front of computers, the guys you call when you have a problem with your computer because they have some magical power that allows them to fix your problems) don’t know what a valid email address is!

Why do I say such things? Because each time I register on a website, it complains that I should enter a valid email address… but my email address is valid actually! What I’m complaining about is not that they check email addresses of course, I’m complaining about the fact they are rejecting valid ones. Like for an email spam filter, you don’t care that some spam emails still reach your inbox, but you hate when a valid email is dropped because it was considered spam.

Unfortunately, most email address filters that have been written are rejecting a lot of valid email addresses. Why? Because checking that an email address has a valid format is very difficult. Have a look at this summary of RFC’s email address format, you will understand what I mean.

So, if you are a software developer and you have to check the validity of email addresses, don’t bother much checking the email address format (or the strict minimum like “there is a ‘@’ and a ‘.’) because even an email address that have a valid format may be invalid (in the way that the corresponding email account does not exists).

For registration process it’s easily solved by asking the user to click on a confirmation link you send them to the given email address. Only then you will know that the email address is really valid.

Les Cast Codeurs

Si vous êtes développeur Java, vous connaissez certainement le podcast The Java Posse, 4 experts (Tor Norbye, Carl Quinn, Dick Wall et Joe Nuxoll) du monde Java (au sens large) parlant des news concernant Java, la JVM et tout ce qui touche de près ou de loin (voire de très loin) à ça, sur un ton en général très décontracté et humoristique.

Il y a un peu plus d’un an maintenant, 4 français (Emmanuel Bernard, Guillaume Laforge, Antonio Goncalves et Vincent Massol) ont décidé de faire quelque chose de similaire, le podcast Les Cast Codeurs, mais dans la langue de Molière. Je dois avouer qu’au début je ne voyais pas trop l’intérêt, étant donné que nous travaillons dans un secteur très anglophone, ça me semblait assez redondant avec The Java Posse, à part peut-être pour les quelques irréductibles gaulois qui ne comprennent toujours rien à l’anglais (et il semblerait qu’il y en ait encore pas mal en France ;-) ).

Récemment je me suis décidé à en écouter quelques épisodes, et c’est plutôt pas mal, même si dans l’idée c’est assez proche du Java Posse, le contenu et l’approche sont assez différents pour que ce ne soit pas complètement redondant. Sans compter que l’actualité française et européenne du domaine (si si, il y en a) est un peu plus abordée. C’est entre autre par Les Cast Codeurs que j’ai découvert le BruJUG.

Continuez comme ça les gars, ça me fait quelque chose de plus à écouter dans le métro ;-) .

The Power of Abstraction

During last BruJUG third half-time, Alex Snaps told us about a presentation by Barbara Liskov (also known for the Liskov Substitution Principle) in which she tell us a bit of computer science history, how the data abstraction emerged and so on.

It’s a very interesting presentation, it’s quite amazing to see that most of programming languages principles where designed 30-40 years ago. If you are a developer, I recommend you to watch Barbara Liskov’s presentation: “The Power of Abstraction”.

BruJUG

Last wednesday (May 26th) was the first BruJUG session, and I was there ;-) .

So, what’s BruJUG? It’s Brussels’ Java User Group, so if you are a Java developer living/working in Brussels, you might be interested to attend BruJUG sessions in order to learn some stuff, talk with other developers, exchange some ideas, have a good beer…

When I was in Paris, I was going quite often to the ParisJUG, which was the first JUG in France. BruJUG just started but it’s not the first one in Belgium, there is also BeJUG which is moving from cities to cities in Belgium.

What happens in Wednesday’s session? First of all it was in Google‘s office, aka GooglePlex,  which is quite a nice one and there was two presentations, a non-technical one on content strategy and a technical one on ehcache (and a bit of terracotta of course). Both were very interesting, you can read the session post on BruJUG website or on BruJUG’s wiki (there are some pictures too!).

Moving to WordPress

I started blogging a long time ago using COREBlog on Plone on Zope (if I remember right), then I moved on dotclear 1 with some friends, then I opened my own blog again using dotclear 2… and now I’m using WordPress.

Why moving from dotclear to WordPress? First of all, my linux server moved to PHP 5.3… with is not supported by dotclear yet. So I had to install an alpha version of dotclear that supported it… kind of. It was a true alpha version (meaning lots of stuff were not working anymore, if you used to navigate on my blog you may have noticed that). And I feel a bit like dotclear is on the dying side (maybe it’s not true, but that’s my feeling). I don’t know if it’s related by the departure of the creator of dotclear (Olivier Meunier) last year, maybe they are adjusting from that change, but in the mean time, dotclear is not moving fast enough and I had to do something about getting my blog working.

I know, since I’m a developer, I could have helped dotclear guys supporting PHP 5.3, by fixing some bugs… I don’t remember PHP a lot but it’s a quite simple language, I should have been able to help quite quickly I think. But I’m also lazy and I did wanted to try WordPress since some people recommended it to me.

So, this is my first post written with WordPress, and it’s quite nice, the interface is quite good but I have to admit that it’s far from being perfect too.

Installation

As usual I used the debian package, which is already an improvement over dotclear since there is no dotclear debian package. On the downside, I encountered several bugs that seems to stupid to be there. And looking on the internet, they are known bugs, but not fixed. For instance:

  • You can’t specify an absolute path for your upload folder (which is what is done by default by the debian package… so uploading anything was not possible until I changed the path)
  • When you try to install a theme or a plugin using the admin interface, WordPress checks if it’s authorized to write files first, if not WordPress allows you to upload it through FTP. That’s nice except that the script checking authorization is bugged (and that FTP is a protocol that should died but that’s an other story ;-) ). The script checks that the user executing it is the owner of… the script file! instead of checking that it’s the owner of the theme/plugin directory. Since they do the things right in debian, the script is owned by root but executed by www-data (apache’s user). So I had to change the owner of the script to make it work.

Migration

In WordPress tools, there is a script to import data from dotclear… which does not really work. Maybe it was done for dotclear 1, or my alpha version did have a lot of changes but obviously there was a lot of differences between what the import script was excepted and what my dotclear database looked like. I customized it a bit so it was able to import my posts and comments but I had some encoding issues (mostly solved), and of course I had to upload again all the pictures, audio files and videos… It took me several evenings to do the migration. Maybe I should have done it all by myself without using the original script.

After the import, the comment count was not set on the blog posts and I saw that other people had the problem (comment count not matching the actual number of comments) at some point for a reason or an other and the solution I saw was usually a small PHP script looping on each post and executing the same SQL query. So here is the same solution but with only one SQL query, no PHP involved:

UPDATE wp_posts SET comment_count = (SELECT count(*) FROM wp_comments WHERE wp_comments.comment_post_id = wp_posts.id);

Usage

I just started using it. For the people reading my blog from the RSS feed, check out the new URL. On the overall it looks quite simple, but there are some stuff I don’t really like. For instance I have to use categories. So I put everything in the “Uncategorized” category. On dotclear I was able to say that I don’t want to use categories. Tags are way much better than categories… and they are optional.

The visual editor is quite good but the HTML editor is a “simple HTML” editor, not showing the full HTML, and switching from one editor to the other change the HTML code you may have write, and sometimes you don’t want to. For instance putting audio and video tags (HTML 5 tags) in an XHTML 1 page… is not really allowed, and switching from the HTML editor to the Visual editor simply remove them :-( . There is no wiki syntax, I can understand that choice but I was a bit used to it.

The plugin and theme system work quite well (except for the bug I talked about earlier). For the theme I chose Garland-revisited, which is a copy of Drupal‘s default theme (I used Drupal once and I had to customized the theme for the website but I love their Garland theme, so here is a way to have it ;-) ).

I also like the idea of having fixed pages. And I should start by filling the “about” page. That’s all for today, I still have a lot of stuff to configure.

Post FOSDEM 2010

So last week-end I was at FOSDEM. First, it’s quite huge. Several thousand geeks in one location (if somebody hates open source, it’s the place to drop a bomb, lots of projects might also die afterward (I’m just saying that it’s not so cool on a risk management point of view, I’m not encouraging anybody to do such a bad thing ;-) )). A lot of smart people, good ideas, interesting stuff to see, to hear and free WiFi everywhere (such thing would be illegal in France nowadays :-\).

As usual with conferences, goodies review. What do we get: – conference program (on paper) – a bag (made from biodegradable material)

That’s all good to me. Quite eco-friendy and nothing is unnecessary.

Here is the list of sessions I attended:

Welcome (FOSDEM Staff)

Quick history of the FOSDEM and of course the FOSDEM dance.

Promoting Open Source Methods at a Large Company (Brooks Davis)

Brooks Davis told us how they managed to bring some of the open source way of working in a big aerospace company. I find incredible that in a company working for aerospace (and even any company doing software) some developers are still not using any version control system.

Evil on the Internet (Richard Clayton)

Quick presentation of what “bad people” are doing on the internet and how it works, with live examples of phishing/fake banks/fake escrow websites.

Visit the AA419 website for more information.

Mozilla Europe/Mozilla Foundation (Tristan Nitot/Gervase Markham)

Some info on current status and future stuff at Mozilla. Some discussion about the ballot screen.

Personal note: the ballot screen will appear for every Windows XP/Vista/7 users how do not have installed any other web browser. This is a decision of the European Commission imposed to Microsoft. But what about people working at the European Commission? Are they going to see the ballot screen on their computers? Obviously, like in any company managing their computers, this is going to be blocked in order to keep the “homogeneity” and ease of system administration. Guess what? I am working at the EC (as external contractor). Since I’m a developer, I can install whatever I want^H^H^H^Hneed on my work computer so I don’t have the problem (and in fact since I’m doing a bit of web development I’ve all major web browsers installed). Anyway, I will see if my colleagues get some choice for their web browser.

FLOSS: a key to self-determination in Internet life (Mitchell Baker)

OK, I can’t really summarize but it was interesting. Free and open source software have values, freedom related ones (at least). To some extent we can see those values in how the internet has been built and we need to be sure that those values are still going to drive the future of the internet and even take a more predominant place.

Hackability (Tristan Nitot/Paul Rouget)

Do you want the internet to be a place only for for-profit companies to sell you their products? I hope not (if you do, what the hell are you doing here?). An important thing that will prevent that is to be sure that the internet is hackable. That mean we can do what we want with it, event if it was not designed for.

I would like to give an example of a hackable product by design: a Lego box. When you buy a Lego box, it’s shipped with a manual with one or two (sometimes more) patterns to build what Lego thinks you might want to build with. But obviously, it’s for fun, and Lego does not forbid you to do anything else with it, on the contrary, they encourage you to do stuff they didn’t think you could do with it… and it’s quite normal since Lego bricks are done to build whatever you want.

On the internet it’s quite the same. You have bricks. Different kind of bricks, versatile ones (bits and bytes) on top of which people have created more complex bricks (HTML, HTTP, SMTP, IMAP, XMPP, XML, CSS, JavaScript…) allowing you to do any kind of things. But there are some stuff that are not following that concept. Take Flash for instance, here you have the Logo box already mounted and you can’t unmount it, you can play a bit with it but not that much.

Paul did a demo showing that the web is hackable (changing the UI of a website and with the help of Firefox/Greasemonkey change how to interact with the website), that Firefox is hackable (switching from a tab to an other by shaking his wiimote!).

HTML 5 (Paul Rouget)

The “theorical” part of the presentation was done by someone else but I don’t have his name (sorry). Anyway, since most of the stuff I developed so far were web applications, I was quite interested in this presentation (and of course because I have been too lazy to check by myself what’s new in HTML 5).

HTML 5 syntax, very pragmatic. HTML has been slaughtered on so many web pages that web browsers are now very good at understanding the understandable. So of course, instead of imposing a drastic syntax (like XML based stuff requires usually) that nobody is going to apply, HTML 5 is quite “user friendly” (in the way that you can type whatever you want, it’s going to work (uppercase, lowercase, it doesn’t care, you don’t close your tags? not a problem…)). I think web browsers (except IE of course ;-) ) are the perfect example of “be strict in what you send, but generous in what you receive”.

Anyway, lots of new tags like header, footer, aside, of course video, canvas

Paul did an amazing demo with a “simple webpage” turning out to be an interactive presentation with CSS transitions, video playing, 2D transformations, 3D ones… impressive.

Amarok 2.2 Rocking (Sven Krohlas)

I was an Amarok user for a long time but since I switched to the Mac it’s not the case anymore (even though Amarok runs on Mac). Anyway, the moodbar is back!

I haven’t played a lot with Amarok 2.x, but I don’t feel very comfortable with the UI. In 2.2 it’s a bit better. Maybe a part of the problem is that I don’t like KDE’s default theme.

It was a conference on free (as in free speech) softwares, but there are not only softwares that are free, there is also music. Go to Jamendo and listen/download a bit of music, you might discover good music under Creative Commons licenses (I recommend: Diablo Swing Orchestra and David TMX)

NoSQL for Fun & Profit (Tim Anglade)

A quick overview of what is NoSQL, no technical details, more a presentation for managers. Anyway, like lots of people I have suffered of SQL. For several reasons, first, it’s hard to find a project where a relational database is not badly used, a RDBMS can be very good at what it does (like PostgreSQL), it still needs to be used correctly, and secondly, because it was almost the only way “managers” did know about storing data. Who have never seen that kind of situation:

The manager: “On our new software we are going to use this programming language and that relational database.”

The developer: “I can understand that we need a programming language since we are going to write a software, but we don’t need a relational database for it.”

The manager: “Of course we need a relational database, every software use a relational database.”

The developer: “Well… no.”

The manager: “I’m the one deciding, you are only the mindless developer coding the stuff I ask so shut up.” (OK, maybe not that part)

Well anyway, NoSQL is a good idea to make sure that people know that we have choices on how we store data and that there are some ways better for some kind of tasks and others ways better for other kind of tasks.

Mozmill (Henrik Skupin)

A quick presentation of Mozmill, a tool used to do automated functional tests on Mozilla products (Firefox, Thunderbird…). Each version of Firefox in fact 225 versions of Firefox (75 languages on 3 platforms) and all of them should/need to be tested. It looks like at Mozilla they are not really in the test driven mindset (yet), and they are lacking of tests. Wait… sorry, when I say tests, I always think “automated tests”, it’s inhuman to make a person run a test suite manually, unfortunately to many people are paid for that. From what I understood they have some manual test suites for Firefox and fortunately they are trying to automate them.

You can see the mozmill generated reports for Firefox here: http://brasstacks.mozilla.com/couchdb/mozmill/_design/reports/_list/summary/summary

Towards GNUstep GUI 1.0 (Fred Kiefer)

GNUstep has been in development for ages and there is still no 1.0 version. So the question was “do we need to do one and if yes, what needs to be in”. Obviously, the answer for the first part is “yes” (so it will attract more developers, *BSD and Linux distributions will update their packages…). The second part of the question was not really solved. One proposition was to name the version 10.2 and has complete support of Cocoa 10.2.

L20n (Axel Hecht)

I’m not a specialist of internationalization (i18n) and localization (l10n), I know some issues regarding that but quite frankly, I didn’t really understood the presentation. It’s a bit more clear after a look on the l20n wiki. Sounds interesting to me since I think that the current way of doing (key/value) sucks a lot as soon as you have some non ultra-trivial stuff to do.

Étoilé: Where it is, where it’s going, why it isn’t there yet (Quentin Mathé/David Chisnall)

What have they done since the beginning in 2004? This is a project with few people but lots of ideas. One thing I find interesting is the CoreObject framework. Well in fact not the framework, but the ideas behind. From a user point of view, having to save your documents sucks. Why the default state is “in case of problem you are going to lose all your unsaved work” and not “in case of problem all your work is saved”? So here the idea is everything you change on your document is recorded, so you can do/undo/redo modification, close your document, open it again, ask to undo stuff you have done before… the history of your changes on the document have been saved all along.

Such ideas are not new, we have been talking about that for decades (well, not me, I’m talking about it only for years, I’m not that old ;-) ), but mainstream operating systems are still not implementing it.

Women and Mozilla (Delphine Lebédel)

Quick presentation of WoMoz.

Nepomuk (Sebastian Trüg)

Recent operating systems are now indexing datas so it’s fast and easy to search for stuff on your computer. Nepomuk is a “semantic” way of doing so (using RDF and so on).

Several functionalities are similar between Nepomuk and what I think Étoilé’s CoreObject do. But Nepomuk is based on “standards” like RDF and SPARQL.

Mozilla Panel Discussion (Mitchell Baker/Tristan Nitot/Mark Surman)

A discussion on Mozilla’s mission. Lots of questions about privacy. I confirm, Mozilla’s people have the right mindset (at least the mindset I like) and I’m glad that they are caring about the Internet.

Write and Submit your first Linux kernel Patch (Greg Kroah-Hartman)

A live example on what you need to do and how to do a patch for the Linux kernel.

That’s all

There are several presentations I would like to went to but we still have not invented a device giving us ubiquity.

I now have a lot more thinks to thing about, I may write down some of my thoughts here soon.

Anyway, a big thank you to the FOSDEM staff for organizing all that, to all the speakers and finally to all the people attending the event.

FOSDEM 2010

FOSDEM (Free and Open Source Software Developers’ European Meeting) 2010 is happening this week-end (6-7 february) in… Brussels! At ULB, about 10 minutes by foot from home. So guess what?

I never had the opportunity to assist FOSDEM before, so this time I’m not going to miss it.

I haven’t look at the planning seriously yet, there is a huge amount of stuff going on there, it’s going hard to make choices. At least I have seen that Mozilla is presenting some stuff, I hope I will be able to see Tristan at last (though I’m not sure it’s really fulfilling to listen to someone I always agree with (well, I’ve been reading his blog for several years now and I don’t really remember not agreeing on something)).

This reminds me I should find a way to start sharing with the community. I have been using open source softwares for years, on my day to day work, what frustrates me the most is each time I’m struggling with proprietary softwares (which I tend to avoid) while I know that the same problem with an open source software would have been solved much more easier (because of the help of the community and the availability of the source code).

So, are you coming?

OpenBSD 4.6

The new version of OpenBSD has been released! Yes, they are more than 10 days ahead schedule, since OpenBSD is usually released May 1st and November 1st.

I upgraded my router with this new version and before doing so, you should read the upgrade page (which I didn’t).

Of course my firewall configuration was not working anymore, so I had no internet access because I was using scrub statements which are not there anymore. Rules need to be rewrite a bit.

The installer seems to have changed, some questions were different… and since I was going too fast through the process I installed X related packages (they were selected by default even if I haven’t installed them before).

Anyway, OpenBSD is still working nicely, using nearly no CPU and few MB of RAM. I really like this operating system for my router, I install it and forget it (until the subsequent release).

Posted in Uncategorized. Tags: , . 2 Comments »

OpenBSD and PPPoE

I’m using a new ISP (since I moved in a different country) which does not provide a DSL modem as part of the subscription. So I bought the first ADSL2+ modem I found that was not also a router (since I have my own router).

I ended up with a D-Link DSL-320T. I was a bit disappointed to see that the modem DOES some routing… but quite poorly. I tried several configurations and my conclusion is that this modem is severely bugged. It’s based on an old BusyBox 0.60 (you can telnet the modem to see that and do some stuff manually (if you manage to…)). I went on D-Link website to find firmware updates… the firmware loaded in the modem is more recent that the ones I found on the website! Anyway, after some research, it looks like D-Link people have no clue about how to manage version numbers (it’s a complete mess), but it’s not a problem since the modem does not want to load any firmware (there is something in the interface to do that but it did nothing when I tried).

At some point I find out that the modem has a “bridged” mode, to it will does mostly nothing and I will have to do the authentication with the ISP on my OpenBSD 4.5 router.

PPPoE

Configuring PPPoE on OpenBSD is quite easy. The modem is connected to the rl0 interface, first we need to create a configuration file /etc/hostname.pppoe0 for the new PPPoE interface pppoe0:

inet 0.0.0.0 255.255.255.255 NONE pppoedev rl0 authproto pap authname LOGIN authkey PASSWORD up
dest 0.0.0.1
!/sbin/route add default 0.0.0.1

Replace LOGIN and PASSWORD with the credentials given by your ISP. The rl0 interface does not need any configuration except telling that the interface must be started. /etc/hostname.rl0 must contain only:

Restart network interfaces with the following command:

# sh /etc/netstart

ifconfig should now include pppoe0 configuration.

NAT and PF

I saw on some forums/mailing lists that since PF is started before the pppoe0 interface, PF might block the connection. I’m not having the problem right now, maybe for older versions of OpenBSD. Anyway, I had a different one. When PF starts, the pppoe0 interface does not have yet retrieve an IP, so PF is using “0.0.0.0”.

For instance in /etc/pf.conf, I had the following lines to create a NAT between pppoe0 and rl1 (rl1 is the interface on my local network):

ext_if="pppoe0"
int_if="rl1"
 
nat on $ext_if inet from $int_if:network to any -> $ext_if

In order to tell PF to monitor the external interface’s IP, it just needs to be put between brackets, so the NAT command becomes:

nat on $ext_if inet from $int_if:network to any -> ($ext_if)
Links