18 December 2007

KDelicious 3.0 (+ roadmap)

After a few days of obsessive bugfixing, I've finally released KDelicious 3.0.

This is a big step forward from pykeylicious: it now uses PyKDE components to save preferences and interact with the network, which means transparent support for proxies and KWallet.

On the usability side, I've moved the option "Tag this post on del.icio.us" to its natural place, out of the submenu. There's now a GUI to manage options, which means that you can now switch del.icio.us username or choose how to rearrange your locally-synchronized bookmarks, all from a nice and simple interface.

Unfortunately, the resulting proliferation of files forced me to adopt a "proper" installer mechanism, and for now I settled on distutils. This has one major drawback: non-root installs are much harder than they used to be, if you don't know your way around python.

Mainly for this reason, I (foolishly) decided to maintain two codelines. Pykeylicious 2.x will still be available for people who can't be root or don't have/want the KDE bindings for python, in bugfixing mode. It will not have support for proxies, unless somebody else hacks it in. I hope this doesn't come back to bite me; I'm actually tempted to "downgrade" pykeylicious to 1.0, which got better feedback than 2.0.

In the short time (3.1) I'd like to get rid of all calls to kdialog. I resisted up to now because they work and are fairly low-maintenance, whereas using the proper bindings need a little bit more infrastructure, but they are really ugly and slow and I hate when dialogs stick around after the program crashes. I am also tempted to use the python-dcop bindings, but they look complicated and dcop is going away in KDE4 anyway, so I don't know if it's worth it.

One thing that didn't make it in KDelicious 3.0 is support for Ma.gnolia.
I personally don't use the service, but they (very cunningly) expose a mirror of the del.icio.us API to allow for an easy switch, so adding the new backend shouldn't be too time-consuming. Unfortunately they don't support bundles, which in KDelicious are very useful for sorting the locally-synchronized bookmarks. I'm thinking to add this "multi-backend" option in 3.5.

For 3.2 I might package it for debian. The only reason for the effort is to have an "uninstall" option, that distutil hasn't. It's a boring job, but probably necessary. I'll also try out other del.icio.us plugins to steal featu--- ahem, get "inspiration" for new features.

By the time all this is done, KDE4 will have been around for a while (see my previous post)... KDelicious 4 might be a very nice app by that time ;)

17 December 2007

Things I learnt last week on Python, PyKDE and KDE

  • if PyKDE segfaults on you, don't despair: you are probably just using the wrong arguments for a method call. Get the right invocation and you'll be fine, no need for recompilation or other drastic measures.
  • KCmdLineArgs is cool!
  • how to use KConfig from python (saves so much time):
    conf = KConfig("your_rc_file") # ends up in $KDEHOME/share/config/
    conf.setGroup("yourgroup")
    conf.writeEntry("your_option","your_string")
    # non-string values DON'T work
    conf.sync() # this will actually write out the stuff
  • KIO.NetAccess can save a lot of trouble storing passwords etc., seamlessly integrating with konqueror and kwallet
  • distutils is cool, in its own way. PyPi integration looks terrific, can't wait to upload my stuff there...
  • dependency checking in distutils still sucks. Either you go with setuptools, or you have to litter your setup.py with ugly import tests.
  • kdedistutils (from pykdeextensions) looks useful enough
  • the KDE TechBase is very good for KDE4. For KDE3, better to get the kdelibs-apidoc packages in your distro. Don't understand why (on Debian Etch) it doesn't register with QtAssistant.
  • Google Translations can be weird.

I'm very close to releasing "KDelicious 3.0", which is a big improvement on pykeylicious. While adding a few "simple" options to manage how del.icio.us bookmarks are imported into Konqueror, I tried to refactor out nontrivial code from the main script into modules, and added a GUI to manage these options. I also pushed the integration with KDE in order to do things like transparent proxy support and kwallet integration, which spared me from maintain connection code, passwords, etc... I ended up with several files to distribute, which required a "proper" installer.

This release will still use the kdialog hacks. I'll get rid of them in 3.1, because I really want to put this out before the end of the week and get some feedback.

On bookmark synchronization: in an ideal world, synchronization would be done in the background, if we are online, every couple of hours, and by just pulling the more recent posts. But this is a bad world, and I'm a bad coder... KDelicious will only synchronize manually, will download all your bookmarks each time it runs, and will just try to stop you from getting banned by del.icio.us if you launch it too often. The only way around this would be to write a KService or a systray applet (which would also allow me to support other "minor" browsers like Opera), but this stuff is changing in KDE4 so I don't want to spend time on it before march.

After Christmas I'll think about putting the code on sourceforge (or savannah, or something) and have a proper homepage for it. But first, let's release ;)

04 December 2007

pykeylicious 2.0

Why stop when you're having fun? :)

pykeylicious 2.0 is out, with a brand new feature: local synchronisation of your del.icio.us bookmarks! I hope people will like that one (and the few bug fixes here and there).

Now I'll probably take a break; further features (heck, even the current ones) will require a configuration screen, and there is only so much you can do by leveraging kdialog. The logical step would be to implement a "proper" PyQt application, which will require a bit of time and effort; in the short term, I'll probably just release a 2.5 version to support system-wide installs (the only feature from konqil.icio.us that I didn't replicate).

del.icio.us API is rid.iculo.us

https://api.del.icio.us/v1/tags/get
Returns a list of tags and number of times used by a user.

Unfortunately, the returned list of tags is incomplete. Ahah, very funny. Almost as funny as banning everyone if they dare to request https://api.del.icio.us/v1/posts/all more than once per hour (no exceptions, no grace period for development purposes, no clear info about when the ban is lifted), then silently adding backdoors for the official plugin.

29 November 2007

On pykeylicious, Python vs Perl, and the state of Konqueror

If you use KDE, as I do, you should check out KDE-apps; it's a nice site full of all sorts of programs and add-ons for the desktop environment, from full-featured applications like K3B and Amarok to simple enhancement to the UI, kicker replacements, etc etc.

On this site, there is a fantastic little feature that allows you to "subscribe" to an application; when the application is changed/updated, you get a reminder via email. I personally subscribed to a few little apps (KShutdown, QtEmu, kio-locate...) that are not included in the standard KDE and are often off-the-radar for mainstream distribution packagers, so they are a bit difficult to track in the regular ways.

One of these apps was konqil.icio.us, an addition to the Konqueror right-click menu to do a few things with del.icio.us. Last night I found the email saying that a new version was out, so I went there and downloaded it; while reading the description, I immediately thought "why do I need to do all this messing with folders and permissions, a little installer could do it for me!". Then I checked the dependencies, and found that the script was in Perl... there was no chance I'd write an installer in Perl (I hate it) and send it to the original developer; also, adding a dependency on python for the installer looked a bit silly. So I decided to rewrite the script in python, add the installer, and upload it, and pykeylicious was born.

All this reminded me of how easily "tweakable" Konqueror (and KDE in general) is. You add a file in the right place under $HOME/.kde/, and you have just hooked the interface to your programs and scripts. The problem is often finding the right place; documentation exists in non-obvious places, as KDE developers tend to talk more about the C++ infrastructure.

I personally think this is one of the factors that stopped people from moving to Konqueror from Mozilla/Firefox: developing third-party extensions seems hard in comparison. This might or might not be the case; as konqil.icio.us demonstrated, it is fairly trivial to build a simple extension... however, if you want to manipulate webpages and the internal DOM, you have to write a C++ plugin, which might be easy for C++ coders, which net-people usually are not. Net-people like "easy" languages like java, javascript, python or ruby.

Last time I brought this up (yes, it's one of my pet-subjects) on the pykde list, I found out that yes, you can probably build plugins in python, but you have to jump through several hoops and basically try to fake that you are a C++ program. Not good enough. The day this sort of things becomes easy is the day that Konqueror goes back to be a serious alternative to FF in the Linux world.

21 November 2007

On the Samurai Principle

Some blogs recently pondered on the Samurai Principle. It made me think, because I'm one of the many "guilty" of returning None/null rather than raising an exception. To me, it happens more often when working with Python rather than Java, because it's very natural to write "if something_not_found: return None". Also, abusing exceptions can end up polluting your code with dozens of nested try-catch/except, which kill readability and tend to be much worse than a simple "if (obj is None):".

This said, I agree that NullPointerExceptions are a royal pain, and "AttributeError: 'NoneType' object has no attribute 'something' " is equally bad to deal with. API programmers in particular should try hard to return this sort of stuff as little as possible.

I guess the bottom line is that in medium stat virtus, as it's often the case with these "absolute principles of programming"; at the end of the day, when we program we are applying science, not demonstrating it. And as much as we love them, samurai lost all their wars ;)

17 November 2007

Google spamming LinkedIn profiles?

I just got a message from somebody on LinkedIn who (apparently) works for Google, saying they have an "engineering opportunity" and to reply with my word or pdf CV. While I'm flattered, I'm not sure I should reply to the message. Call me paranoid, but I don't see how I'd ever be Google-material (no strong academical background, no open-source fame...); maybe I ended up in some strange list (maybe matching LinkedIn profiles with emails on Monster?), maybe something worse.

14 November 2007

Hey Seagate, here's a business idea for you

The paper mountains will stay with us until such time as write-only media become as common as today's hard disks. We need storage sub-systems that never, ever delete anything. Storage systems that automatically - at hardware level - ensure that updates are stored as new versions and that delete operations are really archive operations. To be widely adopted, we need the confidence that only legal standing can bring to the evidential reliability of such devices.

Sean McGrath - Paper doesn't dance

10 November 2007

introducing #python-north-west and #pythonaro

Was feeling tired but slightly "hyper" last night, so I set up an IRC bot and registered two channels on irc.freenode.net. One is #python-north-west, for the group, and the other is #pythonaro, for me & friends. Come and say hello :)

29 October 2007

Pain can be useful

So, I've spent a few hours improving my little J2ME project. It's pretty much done, what I need now is a little bit of polishing and, more importantly, the server-side app, which I just started to "conjure up" in django.

I didn't remember how painful Java development can be. Fixed-size arrays, .put() and .get() every five seconds, loads of redundant declarations (if a method can only return a String, why should I also declare that a reference to the result is of type String? what else could it be?), not having an interactive environment to quickly test out ideas. Eclipse goes a long way to reduce the pain, but it's still so much more painful than doing the same thing in Python. And when everything is done... NullPointerException.

The good side is that fear of pain forces you to really think things through before you write them down. In Python, I end up re-writing things over and over again, because there's no (perceived) penalty in doing it, and I more or less "code my thoughts"; of course, I eventually end up spending lots of time on this sort of messing.
With Java, I'm forced to think about the proper structure up-front, because I dread having to write it down more than once; but this means that it's then a matter of monkey-coding a clear structure, and once it's done, it's done, and I can get on with other things.

Python North-West meeting

Tuesday, November 6, 2007 - 6:30 PM at MDDA (Lower Ground Floor, 117-119 Portland Street, Manchester, England M1 6ED)

New meeting of the Python North-West community!
Michael Sparks will talk on "Greylisting using Kamaelia", how to reduce spam using the Kamaelia framework. See this post from Michael's blog for some details.

After the talks, people will be able to showcase their cool python stuff, get tips from others, or just have a chat with fellow-minded python geeks.
Free wifi and refreshments will be provided! Feel free to bring your gear to showcase cool python hacks.
If you want to give a talk at this meeting (or the next one...), just post the idea on the mailing list or drop me a message.

Empowering programs

I remember being impressed, more than three years ago, by this post by Joel Spolsky on Microsoft's "Empowering" partner program. It looked like Microsoft was (for once) doing the right thing to help the little guy.

Now that I'm starting to explore the possibilities of setting up shop by myself, I'm looking around for similar programs; I don't plan to use MS stuff, so Empower is simply not for me. I intend to use mainly free open source tools at the moment, but chances are that sooner or later I'll have to pay my tribute to some Big Company, so it might be good to get some info on ways to save a few bucks or get good tech tips.

My biz plan involves J2ME apps, Python (for django, so web stuff) and the inevitable database; it might (or might not) include some very small (and collateral) piece of desktop software sometime in the future.  A proper custom-built server will probably enter the equation very soon, and sooner or later I'll need new hardware anyway. So, what's out there that might interest me?

First I checked the Sun Partner Advantage program. It seems to consist mainly in hardware discounts (fair enough, they are first of all a hardware company... aren't they?); the Mobile initiative is limited to big players, not everyday members (bad, bad move). Not sure is worth the hassle, as their gear is really uber-priced and I couldn't ever make them my preferred hardware supplier. I might be wrong though; the Sun website is a perfect reflection of the company: huge, disparate, often byzantine, full of hidden gems here and there as well as boatloads of useless marketing spiels... I might have missed the great bits, who knows.

I've also looked into the Trolltech partner program, for the (inevitable) little desktop bits. As much as I love the technology, anything technically significant comes with the $1500/yr option; overall, it feels more like a commercial relationship than technical partnership. Probably too pricey for what I need.

Uhm, what else? Where's the killer partner for new mobile/web startups?

25 October 2007

GMail can now be accessed via IMAP

Yay, it works! I'm currently downloading my 250Mb of mail archive... This means I can now use KMail again (which has the best implementation ever of GPG integration).

P.S., if you don't see the option under Settings ("Forwarding and POP" is now "Forwarding and POP/IMAP"), try changing your language settings to en-us and then logging off and back on.

22 October 2007

New office, old (stale) job

Sigh.

It's so depressing to compare my little home project (codename "BeanCounter"), all the excitement of building apps for mobile phones, and web services, and learning and learning and learning... with the day job, which (even in the new "big red O" building with fancy chairs) is just strolling through customers' complaints for bad software, and a constant flow of regressions, with zero help from developers (or anybody else).

For once, I'd want to do something that makes sense, build something new... and be paid for it.

20 October 2007

Crazy thoughts (pazza idea)

While going through the periodic find-new-job-which-sucks-slightly-less-than-previous routine, I keep having crazy thoughts about starting my own business.

I don't want to do yet another webdev shop, competing with 18-year-olds undercutting you from their bedrooms. I have a few ideas that I think are marketable; some of them are completely original, some aren't but their market is potentially so big that it doesn't matter.

One falling in the latter category involves mobile phones, and how to use them in companies to streamline certain processes. To do this kind of things, you don't need much on the phone UI; random sync with some sort of networked server is easy to do.

I've looked into Python for S60, but unfortunately, while potentially fantastic, is not really there yet in terms of adoption and ease of deployment. The only realistic choice is J2ME; to my surprise, it looks easy enough to build what I want with it, and pretty much all recent handsets support it well enough for my needs.

So I installed EclipseME and the Sun Java Wireless Toolkit, and I'm already 40% towards having a working protoype. I just need to wire it to a simple django app at the other end, and then I could really sell it, or at least do a round of funding (there are some fantastic government schemes for small new businesses here in England).

What scares me at the moment is setting the right price for it; it's not the kind of thing that will save massive amounts of money to a company, but it will speed up some operations. I need to quantify these improvements in order to have a strong sales pitch to set the right price, and to be able to build a proper business plan which will take into account development time, expenses, etc. I also need to catch up fast with the main player in the market already (a small Portland-based operation) which has a head-start but, I think, not yet the amount of money required to break it big in the European space. As I said, the market itself looks big enough for more than one player, and after you establish relationships with customers you can go and build new things for them.

In the meantime, I'm using friends as focus groups ;) and the feedback is good. A colleague even offered himself as part-time head for development, which is something I'd really want before doing the jump.

In all this, the folks at GeekUp are being really supportive. I wish I'd found that list 3 years ago.

IEs4Linux

If you have a linux box, and still don't know about IEs4Linux, you positively must go and download it. 5 minutes and you'll have a complete IE6 (and 5.5, and 5.0 if you really want) installed in its own directory, no root privileges required, no messing with wine configuration. So now you can test your websites, or access all those boneheaded IE-only services, straight from your linux box, no nede for vmwares and double-boot setups. Nice!

11 October 2007

Moving on

I'm officially looking for a new job. Feedback has been good so far, even though all replies are really for java/asp/php roles; I'd rather move straight to Python if possible.

If anyone knows about interesting python roles in the North of England (London doesn't really appeal to me, but I guess I wouldn't say no to boatloads of money), please drop me a line at g dot lacava at gmail dot com.

03 October 2007

Post-meeting

I published my django presentation slides on the Files section of the list page (in ODP and PDF).

My notes on the meeting are in the relevant post at Happenings in Python Usergroups.

I certainly enjoyed it, and I hope the other guys did too. The presentation was ok (even though I slightly fudged the demo, and didn't really go too deep into details); I think people enjoyed the overview, and I tried to communicate what django was all about, more than showing clever tricks or how to satisfy obscure requirements.

Who knows, maybe one day I'll actually make a living out of this stuff...

26 September 2007

Python North-West meeting

So here it comes!
We sorted out the location thanks to the fantastic Manchester Digital Development Agency. They offered us their room free of charge, with projector & free wifi! For once, I'm very happy about paying taxes (MDDA is funded with public money).

The first meeting of the Python North-West community will feature a short talk on Django, "the web framework for perfectionists with deadlines"; I'll share my experience in building a django-powered site using some of the "contrib middleware", and what you can expect from it. I'm confident I'll lower the bar so much, that people will step up for further talks real quick ;)

Then people will be able to showcase their cool python stuff, get tips from others, and just have a chat with fellow-minded python geeks. Since there's free wifi and the room is secure, laptops are welcome!

If anyone wants to give a talk at this meeting (or the next one, or the one after that...), they can post the idea on the mailing list or contact me. Michael Sparks will probably talk about "Greylisting with Kamaelia" next month.

I also created a Python North-West Google Calendar, to track meetings & other stuff: feed - iCal - HTML.

See you there!

Alive and (almost) well

Still recovering from a week of bad health, trying to get back to speed at work & at home... BTW, I'm looking for other (popular) social networking sites apart from the Facebook/LinkedIn/Orkut "trimurti"... suggestions?

18 September 2007

Back from Oslo

Back after a 3-days "city break" in Oslo. It was ok, I guess. Smooth experience: everyone will speak English and nobody will ever judge you from appearances (they kept trying to talk to us in Norwegian first). Lots of smiles, lots of new buildings, lots of money (it's freakingly expensive, even for people coming from "rip-off Britain"), lots of tech, lots of water, lots of people trying to make the world a better place... We packed quite a few activities thanks to the Oslo Pass, which you certainly want to buy if you are in town for one or two days; it looks expensive at first, but check the museum entrance fees and you'll see that it's extremely easy to break even in a couple of hours, plus it gives you free travel on all the (ubiquitous, clean and well-run) public transport.

To be honest though, I left with an "underwhelming" feeling that there was nothing to discover, nothing that wasn't perfectly organized, nothing terribly unique apart from the unique efficiency. Even bakeries all looked like classy joints straight out of the IKEA catalogue. Also, I expected more "Nordic specificity" but the city looks astonishingly like your average central-European town (plus the fantastic fjord). It looks like a very nice city to live in, but not the most appealing to tourists. If I ever go back to Norway, I'll probably skip Oslo and go straight to the northern fjords to enjoy the wilderness, which is the best thing in the country (as the fantastic panoramic movie at the Maritime Museum clearly demonstrates).

10 September 2007

Introducing Python-North-West

On the wave of the great time we had at Pycon, it was decided we should have a proper mailing list dedicated to North-West-based Python users... so here it comes!

The list is open to everyone in the area who loves coding/playing/enjoying Python. To join, you don't need to know your django from your pylons or your pyqt from your wxwindows... and certainly you don't need to pronounce WSGI. Don't worry, it's going to be uber-informal and very low-traffic, and I promise we won't use lolcats (not much anyway).

You can subscribe from the Python North West googlegroup page. Introduce yourself to fellow pythoneers, talk about your Python projects... you might get help!

Ideas on how to link this to other social software (facebook etc) are welcome.

PyCon UK fantasy stats

 Thomas Guest (aka "the one with the freaky 70s shirt", aka "pitch Python as "high-level" language") invented statistics which look pretty accurate:

I’ve invented some statistics about the conference.

  1. 123% better attended than first predicted
  2. 72% of laptops used were apple macs
  3. 50% of keynote speakers were female
  4. 20% of conference organisers were female
  5. Less than 1% of the remaining delegates were female
  6. Sessions were 99% punctual
  7. Virgin trains to and from Bristol were 68% punctual
  8. Beautiful Code, a book I’d hoped to browse at the book-stand before buying, was 100% sold out just 10% into the conference

PyCon UK: statistics, pictures and perennial problems

I think the only one he got wrong is the first 123% (my guess is 160%+), but only Midlands guys can tell. And hey, 3 statistics about female attendance... Thomas, did you hope to pull?

I'll add my own fantasy number too:

  1. 70% couldn't pronounce WSGI (whiz-gee? whis-ge-hai? double-u-es-WTF ?).
  2. 20% of attendees were Django junkie, 20% were Turbogears supporters, 20% said a prayer to Pylons before every meal, and 40% didn't really care as long as it got the job done.
  3. 100% of available large-sized Debian t-shirts were bought in the first 10 minutes.
  4. 90% of lightning talks were cut short (people talk too much! off with their time!).
  5. 10% of lightening talks were kind-of-related-to-Python-but-not-really (I'm not complaining here, just had a couple of WTF moments).
  6. 100% of the attendants to the PyQt tutorial loved the Trolltech goodies.
  7. 100% of dinner attendants thought Jono Bacon was funny, or they were already too drunk to notice.
  8. 20% of all clapping time was reserved to John Pinner. We should raise it to 30% by law.
  9. I didn't know 85% of North-West pythonistas who showed up.
  10. 3% of attendees got a prize. One of them even renounced his prize out of sheer generosity.
  11. 15% were over-50, which means it's never too late to learn Python.
  12. 15% were under-21, which means it's never too early to learn Python.
  13. 5% were labeled "Large Type" on their badge. I suppose it's better than "Medium Unbounded Variable" or "Extra-Large Exception".
  14. 5% of presenter used lolcats in their slides.
  15. 30% were a bit uneasy eating food bought by Microsoft, and made sure it wasn't poisoned before trying it. (MS geeks were awesome anyway.)

09 September 2007

See you next year!

PyConUK is now done! Thanks to all the amazing people at Python West Midlands and Python London! Also to all the sponsors (Revolver, Microsoft, Trolltech, and all the others -- including Ravenbrook!)

The breaking news are that not only PyconUK will happen next year too, but John Pinner wants to submit a bid for EuroPython 2008/2009! woot woot! John, you are full of win.

Oh, sorry if I didn't liveblog the last few talks, they'll be posted to the pyconuk site anyway. The presenter for the (impressive) gSculpt project won the xBox (bad! it lowers productivity!) and Mr. Etienne from Belgium was the lucky N800 winner! (and btw his ideas are very worth checking out, if you are a medium-small python shop interested in public money you should check it out and consider proposing to the EU commission or something).

Liveblogging PyconUK 2007 - Sunday

Whew, was saturday a busy day! Simon Willison's keynote on OpenID was disappointing, he basically responded to any critique of the (flawed, IMHO) security model by saying "well, recovering passwords through email is as insecure as this!" which is balderdash :) (there are legal QOS agreements between email providers) and then "well, of course banks will never use this, but your generic stuff might" which again is balderdash because even people behind "generic" stuff do care about security of their data UPDATE: see Simon comment further down for clarifications... Simon is a good speaker, but feedback from people was still sceptical to say the least.

Dinner was awesome, met lots of great people and Jono "LUGRadio" Bacon delivered a "rock&roll" after-dinner (what next, LUG-StandUpNight?) on why his pet-project JoKosher ended up being written in Python, and be fairly usable in less than a year (for an audio editor, apparently, that's a good timescale).

And we start again! David Boddie on the awesome QtDesigner, looks easy to do custom widgets, and autoconnecting features promise to do away with the signal/slot paradigm as much as possible.

UPDATE: Jonathan Hartley on the basics of TDD in python; I was probably expecting a more "theoretical" talk, or something more advanced, but it was just an introduction really. I suppose I should just be glad I already know about this, stop being lazy and JUST. TEST. IT.

UPDATE: The European Union gives 2.5 million euros to the SQO-OSS people to find new ways of measuring software quality: impressive! Paul Adams made an important point on developer turnover and how to get people on your project: open it! (mailing lists, wikis, svn, etc).

UPDATE: the presentation on Python EGGs was very informational, there are lots of ways on which you can use easy_install, not just to install stuff but also to update it, have multiple versions, get svn versions of installed software, and aslo package un-EGGed software. It's a shame that the presenter was trolled in Q&A time, it shouldn't have happened.

I confess I didn't really listen to the Pylons/WSGI talk. Middleware doesn't really turn me on. I filled in my (great) feedback form for a chance to get my dirty hands on a Nokia N800 -- apparently the best presenter will get an Xbox! Lunch was also sponsored from Microsoft, am I supposed to feel guilty? ;) I see the first slides are being posted online already, I shared some of them in my Google-powered sidebar feed as I find them, I'll try to link them all in the next few weeks, many were also recorded so they should appar on the pyconuk site.

I'm almost sad that in only a few hours everything will be gone... My target now is to have a lighting talk next year on my (very cool) django-powered app! The countdown begins, better start coding...

08 September 2007

Liveblogging Pycon UK 2007 - first notes

Lots of people, fantastic atmosphere, lots of kudos to the Birmingham user group. "Msdn magazine" in the goodie bag sounds like MS really wants to invest in Python, that's probably why Sun decided to go on Ruby instead.

First talk on SQLALchemy by Paul Johnston, very very interesting, too bad it was a bit squeezed, another 15 minutes would have helped. Must investigate the reflection vs autoupdate stuff & migrate (django doesn't manage db changes very well at the moment).

Second talk: Mr. Voidspace (Michael Foorde) on Silverlight & IronPython -- lots of possibilities there, but still very very early. 1Mb of local space is very little for serious usage, there are accessibility issues (but possibly less than Flash) and limitations (1 Canvas only). But having an embedded mini-CLR/DLR in every browser (currently IE/FF/Safari, with Opera in the works) gives me a feeling of "ActiveX done right", something Java should have done 5 years ago.

Made contact with other Manchester pythonistas, it's really true that pythons hide under rocks! Looking forward to build a community in Manc when we go back, people really wants to invest serious time on Python apparently. Oh, and Resolver is hiring, but it's London-based and they do Xtreme (pair) programming, so no telecommuting, but if you are in the area and you fancy "coding the way Guido indented it" give it a go, they seem very nice guys.

Time for Django stuff with Simon Willison!

UPDATE: Simon rocks. Fast as lightning and to the point, lots of goodies for serious django usage, I hope the session was filmed because it was really worth it.

UPDATE: I met Phil Thompson, the creator of PyQt! Jeez, I probably sounded like a fanboy (that I am). And I also met a guy not just from around Manchester -- from Stockport! Astonishing, the world is so small these days. Am now on the PyQt tutorial from Mark Summerfield (who has a book finally coming out on PyQt! fantastic), Trolltech provided some very nice freebies. I feel in geek heaven.

UPDATE: Mark was great, but 2 hours straight are a bit much, so in the end the class was clearly a bit tired. Will definitely go back to his presentation very soon. Break now, then on to the lightning talks -- the list looks endless, might not do them all. Organizers expected about 100 people, got more than 200...

UPDATE: the first lightning talks: Open Spaces (weird, not sure I got it), a lovely chap trying to convert the Hansard (which is getting XML already) in RDF, Jeff Tupholme on putting javascript inside python (crazy) within LiveConnector.

UPDATE: pydoctor statically analyses code to generate docs and then uses a pseudo-wiki interface to correct typos and generate diffs (sounds nice); a lexer parsing thing which went over my head; a freakily-dressed guy from ACCU on how to pitch Python to C(++) shops (use "high-level"!); Software Freedom Day next week (eek! I'm in Oslo)!

31 August 2007

In which my life gets rock&roll for 5 minutes

Several glasses of Champagne at 4PM, having had only a cake in the entire day, are probably not good. Can't remember passwords. Can't read pop-ups. Life is tough for a drunken geek.

29 August 2007

Firefox Add-ons :: Better Gmail

Lovely little extension containing the most useful greasemonkey scripts for GMail. Google Reader and Calendar integration is a must, the "filter assistant" is also a better way to create filters than the standard wizard. Lots of other goodies, definitely a keeper.

28 August 2007

Unfocused + unsolicited reviews of popcult items

That's what I feel right now. Spent three days pretty much doing fuck all, fixing the odd thing on the new home server and that's it. I have a horrible queue of books to read, but didn't feel really compelled to touch any of that. I have at least two projects to work on, but I wasted much of the time allocated to those.

We watched a couple of weird movies (which were the only ones mildly interesting at our local Blockbuster). Probably the weirdest was "Frozen Land", a Finnish flick on chaos theory, human depression, and the "interconnectedness of it all". Finnish movies are always so bare, they probably get it from their climate... Or maybe these movies are the only ones sold abroad, and as such they reinforce stereotypical images of "cool Helsinki", this "frozen land" of desperation, drugs, technology and strange sunlight. Suomi is extremely weird to hear, very odd in the European landscape, only vaguely Slavic... Should I ever need a language for talking whales, I'd use that.

Also seen "The Darwin Awards", a quick-buck-job for everyone involved (including Winona Ryder and Joseph Fiennes). "Inspired" by darwinawards.com, the plot is an excuse to link together some of the freakiest (real) accidents described on the site. Production is TV-like and direction is simply bad. You can really see the Hollywood team, meeting over a (vegetarian) meal, banging together the movie... "ok, this one is basically like Jackass, but we wanna sell it to the Ryder crowd too which is a bunch of Gen-Xers with degrees... we need a "higher" subplot here, what about... a serial killer? maybe a literate serial killer?" "Yeah, that's clever! He could quote poets... like, beat poets!" "But we also wanna make it like this stuff if really real, or we lose the Jackass crowd... what if all was kind-of-filmed-on-super-8-sorta-thing?" "Yeah, cool!"... So Winona can pay the rent and Ferlinghetti can pay for the drugs (or the other way round), and you can have the odd laugh here and there while waiting for Joe Fiennes to get laid (which he'll invariably do, I guess his agent put it in the contract as usual) and go away. Did I say this caters to the Jackass crowd? It even has the unavoidable Metallica guest appearance, full of shit as they usually are.

I'm currently in the middle of The Third Policeman, surreal book recently rediscovered thanks to random product placement on Lost. Better books than BMWs, I guess. Review when I'm done.
( And since we are on product placement, the last Bond movie was a very stylish 20-minute-long film followed by an hour of adverts. What a waste. )

The Third Policeman
by Flann O'Brien

Read more about this title...

I've finished the first book from the Earthsea tetralogy (or "quartet", as they put it). I hadn't read fantasy for a looooong time, and this book reminded me why. The careful use of epic language never falls in common traps and avoids boring down the reader in useless world-building details... but it left me with a sense of "so what" which didn't really push me to read the following books. Enjoyable distraction, probably very good for teenagers (no disrespect intended here).

The Earthsea Quartet
by Ursula K. Le Guin

Read more about this title...

So many other books on the shelf... "From the Gracchi to Nero" is a lovely introduction to Roman history; it reminds me at every page of how similar they were to us, how they really built the foundations on which every "democracy" (i.e. "extended oligarchy") now runs. We went from daggers in the dark to sex scandals, but the concepts are the same, the political questions are still the same (who is a citizen? What is Law? Who executes the Law?). You could probably write "The Emperor's West Wing" in five minutes; now that i think of it, HBO's "Rome" is more or less that, plus the customary brawls and orgies.

From the Gracchi to Nero: A History of Rome from 133 BC to AD 68
by H. H. Scullard

Read more about this title...

27 August 2007

For people tired of technical (or personal) posts...

You can subscribe to only the "personal" part of my blog. You need to use this feed (right-click, copy link): Subclassed (only "personal" posts) (if your news aggregator doesn't like it, try adding "?alt=rss" at the end). I should probably put this on the sidebar... Added to the sidebar (broken in IE, fantastic).

UPDATE: if you'd rather have only the tech posts, you can use this other feed: Subclassed (only "GeekDiary" posts).

svn+ssh from Windows

Another one for Google, since currently the first hit is from a muppet advising to use a commercial product... If you want to connect to a Subversion repository using the standard SSH tunneling (svn+ssh), but you have a Windows workstation, you can use the Putty utilities. Here's what you need to do:
  1. Go to the Putty download page and download putty.exe, plink.exe, puttygen.exe and pageant.exe (since you are there, you might as well get the full installer, since stuff like pscp is also very useful). Put them in your Windows PATH (e.g. C:\Windows) -- you don't need this if you ran the installer).
  2. Start puttygen.exe and click Generate to generate a key. Enter the comment (usually your email) and a password. Then save the private key somewhere safe.
  3. Start Putty.exe and connect to your machine, with the user/pass you use when working in Subversion.
  4. go back to the puttygen window, and copy the generated key text
  5. in the open ssh session, type
    echo '

    then right-click and Paste then
    ' >> ~/.ssh/authorized_keys

    then Enter
  6. close Puttygen ad exit the ssh session, start Pageant. A small icon will appear in your taskbar.
  7. Right-click on the icon, "Add key". Select your private key and OK, enter the password.
  8. open a new command window, and try this:
    plink your-username@your.host.com

    You shouldn't be asked for a password, and be straight in. Perfect! One last thing...
  9. go to your %APPDATA% directory (C:\Documents & Settings\your-name\Application Data), and enter the Subversion folder. Open the "config" file, locate the [tunnel] section and add this line before saving & closing:
    ssh = plink
  10. Now you should be set! Try doing
    svn co svn+ssh://your-username@your.host.com/your/prj

I don't know if using TortoiseSVN or other UI this process can be easier or more complicated. This works, and it will give you the standard basic svn+ssh features.

Technorati Tags: , , ,

26 August 2007

It's 4.52 AM (GMT +0)

This, folks, is why I stopped drinking coffee. Also, this is why they call 5 PM "tea-time". Tea-time, not "latte-time" or "espresso-time". I wonder how long I'd stay awake with amphetamines. Better not to try.

Notes on mod_mp3 running on OpenBSD 4.1 default apache (under chroot)

The default Apache instance on OpenBSD runs as chroot (8) in /var/www. This creates problems when trying to run mod_mp3, which needs binary modules outside the chrooted environment. To fix it:

mkdir -p /var/www/usr/local/lib /var/www/usr/local/sbin
cp /usr/local/libmod_mp3.so /var/www/usr/local/lib/
cp /usr/local/sbin/mod_mp3-enable /var/www/usr/local/sbin/ 
(not sure if mod_mp3-enable is really required, but wth)

Also consider that the directories containing MP3s must be reachable by the chrooted environment with the same path as in the original environment. So for example you want to do something like this:

mkdir /var/www/music
mkdir -p /var/www/var/www
cd /var/www/var/www
ln -s /var/www/music music
and then in /var/www/conf/mp3.conf you'll specify the directory as /var/www/music.

(And after figuring this out, I've found that I'm screwed anyway, because I'm storing the MP3 files on a different disk, which by design is not reachable inside the chrooted environment. Either I move the entire chrooted environment on that disc, or I stop worrying and learn to love samba shares.)

Technorati Tags: , , ,

25 August 2007

how to configure WG311v3 / Marvell Libertas 88W8335 on OpenBSD 4.1

This post is for Google (and for my future self).

The Netgear WG311v3 PCI wireless network card is listed as "supported" by OpenBSD 4.1 thanks to the malo driver. Unfortunately, you need a binary firmware blob which is not legally distributable, so it's not included by default; it's somehow available anyway and linked by the man page for the driver. The abovementioned man page also implies that you are only a pkg_add away from making it work, which is not really true. This is what you need to do:

  1. Go to the malo firmware repository and download both the 1.2 and 1.3 package.
  2. Install the 1.3 version with pkg_add (1)
  3. untar the 1.2 package
  4. copy the extracted mrv*.fw files to /etc/firmware
  5. set all your options with ifconfig, keeping the interface down (VERY IMPORTANT). In my setup, I set the nwid (aka ESSID) and nwkey (aka WEP key, which must have the "0x" suffix if expressed in hexadecimal); setting the channel or the bssid was counter-productive, better leave the interface figure it out by itself.
  6. Then bring up the interface, and do the dhclient dance if required.
NOTES: in my experience, setting a hostname.malo0 file for the interface doesn't work. Somehow, it only works if you use standard ifconfig (8) commands, making sure all the required options are set before bringing the interface up. I don't know if this depends on the network startup scripts or what, but eventually I had to add the command sequence in my rc.local.

Also, bringing the interface up & down can have unpredictable results. Sometimes the firmware won't load when you try to bring it up again, sometimes it will error out; in these cases, better to reboot. There must be a way to unload these blobs from the kernel, I just don't know it yet. Lazyweb...?

Ah, the evils of closed drivers. Unfortunately, my trusted hardware pushers didn't have any other supported PCI wifi card, and USB ones are even more evil. Anyway, I'm happy it works now. I hope this post will be helpful to somebody else as well.

Technorati Tags: ,

23 August 2007

PyConUK 2007 update

The full schedule of tutorials and talks at PyconUK 2007 has just been posted. Yay! Anyone from Manchester going? I'm currently thinking of using the train, but I'd happily share car costs with someone else.

I'm probably going to see this list of talks: Saturday

Sunday

Looks like it's going to be a fantastic weekend!

20 August 2007

Live Search Maps sucks

I wanted to post a simple map about my daily commuting, using the "insert map" plug-in for WLW, but the map at Microsoft's Live Search Maps is so spectacularly bad and inaccurate that I really can't (and of course, the plug-in doesn't work with GoogleMaps). Entire areas of Stockport, UK (one of the primary business destinations in the North-West of England since the XIX century, not your average residential 'hood) are completely unmapped. The maps are provided by NAVTEQ, so shame on them... I remember seeing one of their cars regularly parked, when I used to live in Chorlton (one of the most expensive areas in Manchester right now), but apparently they couldn't be bothered to properly map that zone as well. And this stuff supposedly powers GPS navigators. Did Microsoft buy 10-year-old maps...?

We Meet Again, Mr. BSD

Over the weekend, while weathering a cat.5 thunderstorm called "wife", I managed to finally install OpenBSD on the spare machine I got from a friend. These are my thoughts on the experience.

I had a few run-ins with *BSD flavours in the past (especially NetBSD, with which I was, for a few months, slightly obsessed when I was 19). I honestly didn't remember the "disklabel(8)" thing, which is, at the same time, quite an ingenious device and a fairly big PITA. The concept is that FFS, (the filesystem used by BSDs -- from what I understand, a variation on UFS) doesn't really need more than one primary MBR partition, and doesn't really want to deal with "classic" (DOS) logic partitions either. They take one primary partition and "slice" it in "labels", basically implementing their own logical partitioning scheme. This is all fine and dandy, but unfortunately the tools for this sort of slicing are really bare, and still force you to work with cylinders and heads and sectors; party like it's 1981!
Something slightly more intuitive, like cfdisk(8), would work wonders for adoption rates, but it's clear that the OpenBSD project doesn't really care about adoption rates(which is fine, their priorities are different).
So, the main giveaway is this: don't try to do anything clever, just get a big primary partition and leave other filesystems alone.

Once past this initial hurdle, however, installation is incredibly easy, and will leave you with a bare system in which everything is turned off, apart from (optionally) the OpenSSH server. This is perfect for a server machine, and that was exactly my aim for this box. 

OBSD's hardened version of Apache comes preinstalled, but I had to install Subversion, Python, MLDonkey and a few other apps, so had to learn a little bit about pkg_add(1) (ah, memories of Slackware here...). Apparently, you can configure it to automatically download binary packages (pkg_add -i), but somehow I missed this and ended up manually downloading the binaries, which was a bit slow. I didn't attempt to get java, I understand you have to compile it from sources and can take ages. I did setup the ports source tree, though, and successfully built a couple of utilities, just for kicks; being a predecessor to the Gentoo "portage" system, it looks like a simplified version of it, and works fine.

Samba was so easy to set up, it wasn't even funny.

The only thing I didn't manage to fix, being a newbie admin when it comes to serious stuff, is DNS. This machine will not act as DHCP server (have an integrated router for that), but I'd like it to work as nameserver for the other computers in the LAN. I read a few howtos here and there, but they either cover a dhcp+dns configuration or pure Internet-facing stuff, which is not what I want. Any pointers would be appreciated.

Now I just have to buy a wireless card for it, being careful to get a supported one (either this Netgear WG311 or the Edimax EW-7128G), and then I'll finally have an always-on box to use for downloads, mp3 streaming, svn repository etc etc. Who knows, I might even expose ssh and apache to the Internet. Scary! :)

Technorati Tags: , , , ,

14 August 2007

Jonathan Mayor - thumbs up

Seen him at the iguana bar last night, it was funny. Black spin on stereotypical gay/trans stand-up routine, well executed, definitely worth the £3 ;)

I was wondering, there must be at least one or two places like this in every major city... What about Bologna? A cheap place where you can see live stand-up every week? There used to be the "Ruvido", but from what I understand it's now just another disco.

10 August 2007

Switching from Bloglines to Google Reader

Ok, I switched. Two things made me jump:

  • Bloglines doesn't understand when changes to posts are significant (e.g. one or two paragraphs added / removed versus single characters fixed here and there after normal spellchecking).
  • I tried to "claim" my feed to use the "Publisher Tools", and it fails to authenticate me to Blogger. From the support forum, this has been an outstanding problem for months, and nobody cares. Ridiculous.

So I proceeded to do the OPML dance and now I'm trying out Reader. First gripe: it doesn't let me rearrange folders in non-alphabetical order. Second gripe: you have to scroll the flipping page, even when it only contains one post, to mark it read while in "expanded" view. I don't understand why they can't launch the JavaScript on display, instead of waiting for the scrolling event. On the plus side, updates seem fast; the "starring" concept is more appealing than Bloglines' "keep new" and (slower) "clipping"; the "sharing" feature could be nice (once I understand exactly how it works). The provided stats are nothing more than novelty, I'd rather have some serious "publisher tool" (eh) without having to switch to flipping FeedBurner.

I've also heard good things about NetVibes, but I hate "boxes" views so I was instantaneously discouraged from trying it. Any other aggregator out there? I'm interested in "same or more features than Bloglines", not in "simple" tools.

Update: I'm also trying NewsGator. So far: very slow, cluttered, "unread" numbers completely made up, and for some reason I'm always subscribed to 100 feeds when Reader tells me it's 101.

(Oh, and I'm trying to tag this post.)

09 August 2007

Testing Windows Live Writer

It seems only fair to give WLW a shot as well. It's actually very, very good, certainly the best blog client I've ever tried (even though I wish it'd allow you to enter arbitrary HTML tags -- but hey, plugins!).

As usual, Microsoft gets there late, but will probably manage to steal the show.

BTW, just to test a few plugins... last night we watched this "little" movie:

(uhm, what a huge box. And why the hell does it include various people in the link? Whatever.)

Update: when you update a post, sometimes a Blogger blog is not automatically republished. Bit of a PITA.

Testing Atomic

Posting this with the Atomic plugin for Firefox, an APP client. Maybe i should try Windows Live Writer too...

Update: after managing to adding a "Service" (required a second Firefox restart after creating the new file to store preferences), it works very well. Pity that the WYSIWYG editor only works when creating new posts, not to edit old ones. Not sure what the "Categories" tab is supposed to work, I guess i'll have to RTFM. Who knows, maybe i'll start updating this blog again...

22 June 2007

Linux reloaded

Linux users are fiddlers.

They like to poke stuff, prod around, fix this and that, curious like little monkeys. They can be extremely individualistic, never satisfied by someone else's solution, willing to customise the very last bit of everything.

That's why there's such a plethora of Linux "flavours" on the net: every taste is catered for by a niche community of fellow fiddlers. It's quite a rare event when one distribution emerges as a major player, calling to itself a wide number of sysadmins, developers, hobbyists and other variegated humanity. It's even rarer to see a not-for-profit enterprise gain and maintain such a high level of quality and success through the years, instead of waning and eventually fold or "sell out" to market forces.

Debian and Gentoo are two of a kind. Apparently very different in their approach to technical issues, they actually manage to channel their developers' and users' geeky enthusiasm in something bigger, thanks to explicit and implicit ideological premises which look much more similar than what their communities might think.Gentoo is the ultimate fiddlers' choice. The implicit philosophy is rooted in believing the user must have total and complete freedom with their software, without being obstructed by the distribution developers in any way. Absolutely everything is “tweakable”, as close to the metal as possible, as faithful to upstream sources as possible. You can rebuild an entire system literally from scratch, modifying every flag, every variable that you care of (and more) and still end up with a configuration which will (usually) allow for easy maintenance and upgrade; applications will look and work pretty much as their original developers intended, with very little distribution-specific glue.

The problem of this approach is that there is no opt-out. Very few packages have a pre-built binary, and even then switching between binary versions and regular ones is not really foolproof. This means long compilation times, and a more stressed hardware overall. The community is a bit more anarchic than the average bunch of Linux geeks (if possible) and efforts to institutionalise it resulted in alienating several key developers, and accusations of getting too close to the disparaged "political" model followed by Debian. The original founder moved on (to Microsoft, the enemy!), then dwindled back to find its child creature having changed too much for him to bear. It's not clear if Gentoo will "still matter" in a few years.

Debian started in a similar way (much earlier than Gentoo), but slowly settled on a very different philosophical stance. If Gentoo's credo is "as bare as possible", Debian wants to be "as perfect as possible"; Debian developers won't release sub-par solutions, systems that (might) fail to deliver, even when the alternative is to not release anything at all. They'd rather think something through, to come up with ideas which are rational and solid, than to introduce short-lived hacks that might, one day, wreck your system or embarrass the developers.

This philosophy produced what is currently regarded as the best software packaging system ever deployed (dpkg/APT), which manages to be both extremely simple for users to adopt, and extremely flexible for developers to customise. It also resulted in the biggest software repository ever maintained, with thousands of packages available for dozens of supported architectures, whose maintenance is an extremely challenging task by itself.

This also reflects in Debian's social stance, which is both more logical and radical than any other distribution. While Linux vendors will usually play in a very grey area, mixing commercial and not-for-profit interests (with very little safeguards for both parties), the original Debian community unapologetically chose to always guarantee the interests of not-for-profit initiatives (and the rights of end-users) over corporative greed.

While Linux communities usually favour informal structures and processes, Debian developers laid out a complex (and often Byzantine) system to guarantee that participation be open to everyone on a fair basis, and that solutions be transparently chosen in democratic ways.

The problem of this approach is that, in the very apolitical geek community, it can look very slow and "untidy". Lists and forums are prone to flame wars and politicisation, slowing the pace of development. Zealotry, that very human phenomenon which routinely appears as soon as social laws are drawn, runs wild in the non-technical elements of the community, sometimes forcing it to introduce unpopular changes (if extremely logical ad precise).

Recent examples of this behaviour include the year-long license "purge" (dozens of packages were removed from the repository or forced to explicit their license as GPL), the ABI migration (a change in the GCC compiler which required all packages to be rebuilt or modified, delaying release of the 3.0/"Sarge" release) and the fight with the Mozilla community (which, after becoming a corporation, challenged Debian's independence in handling their sources, to which Debian developers replied by ditching the official Firefox/Thunderbird names and logos in their builds, replacing them with ironic Iceweasel/Icedove counterparts -- a move, they say, which was then technically obligatory on legal grounds). These were all but uncommon events for Linux distributions, however only Debian managed to choose the most unpopular ways to resolve them... because they were, strictly speaking, the most radical and logical as well.

This "infrastructural" work (both legal and technical) allowed Debian to eventually emerge with two major releases in a relatively short frame, and a very good outlook for the future; while all distributions experience a shrink of efforts based on their codebase, Debian produced a spin-off that emerged as possibly the most popular distribution for non-geeks (Ubuntu), the revolutionary "LiveCD" approach (pioneered by Knoppix), and went on to become the de-facto standard for new efforts.

...

This post started with the idea of explaining why yesterday, on my laptop, I switched from using Gentoo back to Debian. Having experienced Gentoo for a year, I grew a bit tired of huge compilation sequences; moreover, the pace of changes and breakages in the "portage" package repository is currently very high. I used to rave for the latest and greatest version of each application, but now I find that 99% of my requirements are well catered for by year-old software. So I moved to Debian's stable release (4.0/"Etch"), whose rock-solid quality I already know. I used to run the unstable "Sid" branch, but I no longer need bleeding-edge stuff, neither need I heavily tweak a system in order to make my laptop devices work, which was the experience that had led me to Gentoo. I know that the Debian community is massive, and there are thousands of support resources on web and IRC, so I'm confident that, should I have a problem, somebody will know the solution already. And I know that I'm running software with a social purpose, to which I can contribute something back without feeling that I'm just being used for cheap labour.

Is this a sign that Linux is finally mature, stable, and ready for the masses? Or it's just that I'm getting old?

For sure, I’m still a fiddler; and that’s why I still run Linux.

08 May 2007

Now married (and with 50% more milk chocolate!)

So, I got married, as you can see here. Pics to follow as soon as we get back from the honeymoon at the end of May. My friend (and witness) Simone posted some "unofficial" ones at on his blog. Yes, the cravat was all over the place after 5 minutes :) It's amazing how many people showed their love for us in the last month. I really don't know how to thank my parents and all our friends that helped them make that day absolutely memorable. Closing my eyes, I can still see all of them talking to me, one by one, and I wish I could have spent more time with each and every one of them. It was amazing and I'm really, really happy that everyone "got" what I wanted to communicate with this. I honestly don't know what to say now. It will take some time to "rationalise" all this. Emotion is a bitch ;.-)