Julien Palard

Python Developer and Trainer

Articles in the blog category

squid: (101) Network is unreachable when DNS returns IPv6

If you have a Squid proxy configured on a machine that have no IPv6 connectivity, and try to reach an IPv6 compatible site, you squid will try to reach the site using IPv6 (I use squid 3.1.6 from Debian Squeeze) and will fail without even trying IPv4, displaying …

The art of Events

The art of using events to build more independent classes. /* Found a better example */ Imagine you have a class A and a class B. A builds B, and B have to communicate with A (call methods ... ?) Some developers (Boooo (I've done it ... (Booo >> me))) will pass a reference of A …

The ?? operator aka the Null Coalescing Operator

If are familiar to the use of ternary operators, you must have encountered several situations like this one :

:::csharp string pageTitle = getTitle() ? getTitle() : "Default Title";

You would want to call getTitle() only once, but then you wouldn't have a simple one-lined initialization of you variable. Actually there is a simple …

YAUIB : Yet another useless IRC Bot !

After 2 years of... non blogging... I'm back! This time I stopped C# (Oh yeah !) and I'm writing a lot of Python! (Oh YEAH !) So to say HELLO I'll present something useless: My Python IRC Bot. But this article should be usefull, so I'll speak about the Unix Philosophy: As …