User loginNavigation |
News aggregatorLinks for 2008-08-27 [del.icio.us]
Linkinus, my new X-Chat?For many years now I've always been using X-Chat whenever I wanted to go on IRC. First under Linux (with some small side-trips to BitchX) and since 2 years now on OSX thanks to the X-Chat Aqua port. Yesterday MacApper ran a story about Linkinus, a relatively new IRC client by Nicolas Lapomarda, that tries to revive the IRC market on Apple's operating system. Besides X-Chat there is only Colloquy from the open source community, that doesn't have any kind of proxy support, which is simply essential to me ... besides: I really don't like its UI And Limechat is a bit to minimalistic for me. When you look at the commercial front, you have Xirc, which is dead (and remarkably went dead only a year after going commercial, which is exactly what I always fear when I pay for software) among a load of other apps in the < 30 USD price range. macirc has a really great listing in this regard. The problem is, none of them really convinced me since no one really offered anything new compared to what X-Chat had to offer ... except Linkinus. First of all: Linkinus offers a really nice and clean user interface with keyboard navigation for basically everything. But for me the really important thing about it is the split view. Think a light version of what VI has to offer here. You can horizontally split the main window to keep an eye on multiple channels. And all you have to do is how ctrl on the keyboard while selecting the channels from the sidebar. Yes, I know. Quite a few of the terminal based IRC clients have something like that, but this is the first GUI client I've seen so far, that let's you split the main view. Linkinus' split view in all its glory Linkinus is shareware and costs 20 USD (or 15 if you are a student). At least the testing period is with 15 days relatively long, so I still have quite some time to give it more time. There are still some things that bother me (some regarding the keyboard navigation, some regarding the proxy settings), but at least some of them are already in the list for the next release Links for 2008-08-25 [del.icio.us]
Speaking at SymfonyCamp 2008After having organized the event last year, I am very happy to announce that I will be speaking at this years edition of the SymfonyCamp in Leusden, The Netherlands. SymfonyCamp is one of the best ways of getting in touch with the symfony community - and you'll learn something in the process.
Django Documentation Refactor has landedA long time coming the documentation refactoring has finally landed on docs.djangoproject.com and in trunk. Compared to the previous format this one now uses Georg Brandl's Sphinx documentation system, which also finally gives you as a user a simple way to have the documentation bundled with Django itself to be converted to HTML with one command (if everything works) . To do this, simply go to the docs folder of your Django checkout and run make html (naturally after installing Sphinx) and if everything works you should end up with a whole bunch of HTML files. Great work Jacob et al. So far for me this isn't working yet, probably because I'm living on the bleeding edge with Sphinx for a couple of reasons, but perhaps I can find some time to dig into this. The structure is new too and it will definitely take some time getting used too, but the separation between primary content (the one on the left side of the index page) and additional articles (in the boxes on the right side) definitely makes sense For now it isn't linked yet in the main menu on the site, probably because it's still in testing stage. Focus - Improving Form usability using jQueryJanko Jovanovic’s got an excellent tutorial which shows you how to highlight the current active form area to improve usability of forms. He achieves this using jQuery. He shows how to construct the form, style it and uses jQuery magic to get this functionality working for the form. He mentions that this improves the usability of large forms by focusing the user on the current action on the form. You can see a demo of this over at: Head over to the tutorial over at: Context highlighting using jQuery Related articles by ZemantaLinks for 2008-08-22 [del.icio.us]
Next Ma.gnolia to be open-sourceIf you follow the blog on the social bookmarking service Ma.gnolia you probably know that the team behind it is far from being lazy. Every month there is something new. Most of the time it is something that only a couple of people will probably be interested in (like the integration with Gnip or the EAUT+OpenID support added this month), but nonetheless. But today, they had something way bigger to announce: The next version of Ma.gnolia will be open-source. But this is only part of the story. M2 (as the new version is called) will not only make it possible to install your own little bookmarking service for you and your friends, but it will also be possible to link installations (including Ma.gnolia.com). The whole open development project will launch next month on github. For links to the respective project parts visit ma.gnolia.org. According to the published charter this move also opens the doors for a whole new business direction: consulting and support regarding custom installations. The whole business this around Ma.gnolia was always a little bit of a mystery to me. Last year there was some talk about finally introducing a pro account, something that never happened. But with M2 all roads are open again. Esp. if you want to sync your own site with Ma.gnolia.com, I can imaging, there might be a new pro account somewhere in there. Anyway, great move and I can't wait to see what the final infrastructure will look like. I'm esp. curious how the whole federation between multiple services will be handled and esp. with the "root" servers. Embed your Flickr slideshows ... officiallyJust last monday the question came up how do you actually embed a bunch of Flickr photos into your blog? Back then all I knew was that there was a well document yet not really official trick which basically gave you the slideshow in an iframe. Since this was obviously too complicated for some people, flickrslidr.com appeared on the net. Today Flickr itself finally announced an official way to embed a slideshow which thankfully doesn't use an iframe For this you can now find a new "share" link whenever you're watching a slideshow. Embed your slideshows (with options) If you don't want the default size, just follow the "Customize this HTML" link indicated in the screenshot above and you get to a simple form for doing just that. Geoserver with OpenJDK on Ubuntu? I guess notOr at least not for now. Today I had to install Geoserver on a new Ubuntu 8.04 server within a current Tomcat (6.0.18) for a colleague and was greeted by a nice error message related to casting and the javax.imageio package (or earlier on with a ClassDefNotFound exception related to the same package). The problem here seems to be that the stable Geoserver 1.6.x is not really compatible with OpenJDK yet. So for now the fastest way to get it working again (that is, if you don't absolutely require OpenJDK) to move back to the old Sun Java 6 package by first installing "sun-java6-jdk" and then by switching to it using update-alternatives --config java. At first I thought I had to install some external libraries and miserably failed to install the jai_imageio binary package thanks to the package being broken and naturally Sun has to have internal checksums so that you can't easily fix this. But luckily this has become a non-issue with the move back to Java6 for now, but I'm really curious if I just messed up something there or the missing jai_imageio package was really the problem here. I guess, this is a problem for later, now that I have a workaround in place Geoserver with OpenJDK on Ubuntu? I guess notOr at least not for now. Today I had to install Geoserver on a new Ubuntu 8.04 server within a current Tomcat (6.0.18) for a colleague and was greeted by a nice error message related to casting and the javax.imageio package (or earlier on with a ClassDefNotFound exception related to the same package). The problem here seems to be that the stable Geoserver 1.6.x is not really compatible with OpenJDK yet. So for now the fastest way to get it working again (that is, if you don't absolutely require OpenJDK) to move back to the old Sun Java 6 package by first installing "sun-java6-jdk" and then by switching to it using update-alternatives --config java. At first I thought I had to install some external libraries and miserably failed to install the jai_imageio binary package thanks to the package being broken and naturally Sun has to have internal checksums so that you can't easily fix this. But luckily this has become a non-issue with the move back to Java6 for now, but I'm really curious if I just messed up something there or the missing jai_imageio package was really the problem here. I guess, this is a problem for later, now that I have a workaround in place BlueprintCSS alive againA small update on the whole BlueprintCSS front from what I could gather on the mailinglist etc.: The old site on Google code is basically dead. The development will probably continue on a new repository on GitHub with a tracker on Lighthouseapp thanks to Joshua Clayton, where I moved all the currently active tickets to a couple of days ago. Christian Montoya, who's been in the same boat as contributor to BlueprintCSS as Joshua before, has now also set up a new website on blueprintcss.org that first of all points people to the new repository in order to make people aware of the change. The goal here is to get a high enough pagerank so that people won't stumble upon the "old" project site and think the project is dead. Another problem that arose due to the project founder basically dropping off the net was that the associated group on Google Groups slowly but steadily got filled with spam since he seems to have been the only person with admin or moderator privileges there. So Christian also created http://groups.google.com/group/blueprint-css as a replacement. He first tried to get a higher access level to the group but, I guess, this wasn't possible according to this post. Please note, that I'm just a spectator (with only minimal involvement and I actually don't want to become more since I enjoy my independence ) of this whole movement that seems to have enough contributors anyway, now that Christian and Joshua have revived the project and Chris Eppstein seems to be hard at work on the SASS integration. With the new infrastructure in place and enough active members (the new mailinglist has already 24 members after only a couple of hours since its announcement) and enough people who have write access to the repo as well as moderator privileges on the tracker and the mailinglist, I guess, BlueprintCSS has once again become an actively maintained project. Big thanks to everyone involved in this development BlueprintCSS alive againA small update on the whole BlueprintCSS front from what I could gather on the mailinglist etc.: The old site on Google code is basically dead. The development will probably continue on a new repository on GitHub with a tracker on Lighthouseapp thanks to Joshua Clayton, where I moved all the currently active tickets to a couple of days ago. Christian Montoya, who's been in the same boat as contributor to BlueprintCSS as Joshua before, has now also set up a new website on blueprintcss.org that first of all points people to the new repository in order to make people aware of the change. The goal here is to get a high enough pagerank so that people won't stumble upon the "old" project site and think the project is dead. Another problem that arose due to the project founder basically dropping off the net was that the associated group on Google Groups slowly but steadily got filled with spam since he seems to have been the only person with admin or moderator privileges there. So Christian also created http://groups.google.com/group/blueprint-css as a replacement. He first tried to get a higher access level to the group but, I guess, this wasn't possible according to this post. Please note, that I'm just a spectator (with only minimal involvement and I actually don't want to become more since I enjoy my independence ) of this whole movement that seems to have enough contributors anyway, now that Christian and Joshua have revived the project and Chris Eppstein seems to be hard at work on the SASS integration. With the new infrastructure in place and enough active members (the new mailinglist has already 24 members after only a couple of hours since its announcement) and enough people who have write access to the repo as well as moderator privileges on the tracker and the mailinglist, I guess, BlueprintCSS has once again become an actively maintained project. Big thanks to everyone involved in this development Links for 2008-08-14 [del.icio.us]
Online leaderboard for Geometry Wars RE2Nice, Bizzard Creations has now also put the leaderboard for Geometry Wars Retro Evolved 2 online. Flash ... but better than nothing Now I just have to get a higher score in all, I guess, all modes. Lurking around in the lower 50,000 isn't all that nice.
I already thought that my 800 MS space bucks were already well invested, but with an online leaderboard, I really have to start getting into the higher score-ranges ... Sometimes achievements simply aren't good enough. [via Joystiq] Online leaderboard for Geometry Wars RE2Nice, Bizzard Creations has now also put the leaderboard for Geometry Wars Retro Evolved 2 online. Flash ... but better than nothing Now I just have to get a higher score in all, I guess, all modes. Lurking around in the lower 50,000 isn't all that nice.
I already thought that my 800 MS space bucks were already well invested, but with an online leaderboard, I really have to start getting into the higher score-ranges ... Sometimes achievements simply aren't good enough. [via Joystiq] DbFinderPlugin: The ORM isn't important anymoreToday I tried the DbFinderPlugin for the first time. I am truely impressed. Using this plugin, it is not necessary anymore to really care about which ORM you pick for your project. It's the thought behind symfony 1.1 taken into the symfony ORM-selection.
GenericForeignKeys with less queriesWhen working with generic relations in Django you have to be quite careful not to end up with n+1 queries for a simple fetch of n elements. The reason for this is that internally a generic relation is not really a true foreign key (naturally) but just an id combined with a foreign key to a content-type. But there are some ways around this problem. Among them a quite simple one: Doing the actual content-loading by yourself. Inspired by Ryan Berg's tutorial about how to build a small tumblelog with Django, let's adapt this example a little bit. If you're using generic foreign keys you will probably end up with a structure like this: class Item(models.Model): pub_date = models.DateTimeField() content_type = models.ForeignKey(ContentType) object_id = models.IntegerField() content_object = generic.GenericForeignKey('content_type', 'object_id') class Post(models.Model): title = models.CharField(max_length=255) pub_date = models.DateTimeField() content = models.TextField() item = generic.GenericRelation(Item) class Link(models.Model): title = models.CharField(max_length=255) pub_date = models.DateTimeField() description = models.TextField(null=True, blank=True) url = models.URLField() item = generic.GenericRelation(Item) class Photo(models.Model): title = models.CharField(max_length=255) pub_date = models.DateTimeField() item = generic.GenericRelation(Item)Combined with a simple signal handler that gets triggered everytime you change a Post, Link or Photo instance and that updated the Item of that instance, this gets the job done pretty nicely from the writing-point-of-view. from django.db.models import signals def update_item(instance, raw, created, **kwargs): if created: item = Item() item.content_type = ContentType.objects.get_for_model(type(instance)) item.object_id = instance.id else: item = instance.item.all()[0] item.pub_date = instance.pub_date item.save() signals.post_save.connect(update_item, Post) signals.post_save.connect(update_item, Photo) signals.post_save.connect(update_item, Link)When it comes to reading that data, you'd normally not want to use something like this: Item.objects.select_related().all()... for the simple reason that it would pull every related object in its own query. But since there is probably a much lower number of content types in your model structure than items, you could lower that count from n+1 queries (where n is the number of items) to something more like 1+m (where m is the number of models queried through the content_type property of the Item-class). The trick is pretty simple: Don't do .select_related(), but be a bit more specific what related object you actually want to have. For now, all that is actually needed is (as the whole m-thing from above indicated) the content-type of each item. So a .select_related('content_type') is enough. With this we end up having all the references and content-types within one query (at least after the content-type's have been cached). Now all that is left to do is to do one query for each content type to get the actual Posts, Items and Photos that were referenced in the Items: items = Item.objects.select_related('content_type').all() model_map = {} item_map = {} for item in items: model_map.setdefault(item.content_type, {}) \ [item.object_id] = item.id item_map[item.id] = item for ct, items_ in model_map.items(): for o in ct.model_class().objects.select_related() \ .filter(id__in=items_.keys()).all(): item_map[items_[o.id]].content_object = oIn order not to repeat myself here, I simply put that snippet into a simple manager and associated it as secondary manager with the Item class. With something like this in place, GenericForeignKeys are once again quite high on my list of features I really like about Django. Sometimes, as nice as it is to have, model inheritance simply isn't what you want and for something like a tumblelog where you just want to have a meta-object that helps you basically merge queries, they are IMO simply still the way to go. And with < n+1 queries for a simple page, all the better ... GenericForeignKeys with less queriesWhen working with generic relations in Django you have to be quite careful not to end up with n+1 queries for a simple fetch of n elements. The reason for this is that internally a generic relation is not really a true foreign key (naturally) but just an id combined with a foreign key to a content-type. But there are some ways around this problem. Among them a quite simple one: Doing the actual content-loading by yourself. Inspired by Ryan Berg's tutorial about how to build a small tumblelog with Django, let's adapt this example a little bit. If you're using generic foreign keys you will probably end up with a structure like this: class Item(models.Model): pub_date = models.DateTimeField() content_type = models.ForeignKey(ContentType) object_id = models.IntegerField() content_object = generic.GenericForeignKey('content_type', 'object_id') class Post(models.Model): title = models.CharField(max_length=255) pub_date = models.DateTimeField() content = models.TextField() item = generic.GenericRelation(Item) class Link(models.Model): title = models.CharField(max_length=255) pub_date = models.DateTimeField() description = models.TextField(null=True, blank=True) url = models.URLField() item = generic.GenericRelation(Item) class Photo(models.Model): title = models.CharField(max_length=255) pub_date = models.DateTimeField() item = generic.GenericRelation(Item)Combined with a simple signal handler that gets triggered everytime you change a Post, Link or Photo instance and that updated the Item of that instance, this gets the job done pretty nicely from the writing-point-of-view. from django.db.models import signals def update_item(instance, raw, created, **kwargs): if created: item = Item() item.content_type = ContentType.objects.get_for_model(type(instance)) item.object_id = instance.id else: item = instance.item.all()[0] item.pub_date = instance.pub_date item.save() signals.post_save.connect(update_item, Post) signals.post_save.connect(update_item, Photo) signals.post_save.connect(update_item, Link)When it comes to reading that data, you'd normally not want to use something like this: Item.objects.select_related().all()... for the simple reason that it would pull every related object in its own query. But since there is probably a much lower number of content types in your model structure than items, you could lower that count from n+1 queries (where n is the number of items) to something more like 1+m (where m is the number of models queried through the content_type property of the Item-class). The trick is pretty simple: Don't do .select_related(), but be a bit more specific what related object you actually want to have. For now, all that is actually needed is (as the whole m-thing from above indicated) the content-type of each item. So a .select_related('content_type') is enough. With this we end up having all the references and content-types within one query (at least after the content-type's have been cached). Now all that is left to do is to do one query for each content type to get the actual Posts, Items and Photos that were referenced in the Items: items = Item.objects.select_related('content_type').all() model_map = {} item_map = {} for item in items: model_map.setdefault(item.content_type, {}) \ [item.object_id] = item.id item_map[item.id] = item for ct, items_ in model_map.items(): for o in ct.model_class().objects.select_related() \ .filter(id__in=items_.keys()).all(): item_map[items_[o.id]].content_object = oIn order not to repeat myself here, I simply put that snippet into a simple manager and associated it as secondary manager with the Item class. With something like this in place, GenericForeignKeys are once again quite high on my list of features I really like about Django. Sometimes, as nice as it is to have, model inheritance simply isn't what you want and for something like a tumblelog where you just want to have a meta-object that helps you basically merge queries, they are IMO simply still the way to go. And with < n+1 queries for a simple page, all the better ... Zend Framework to get AMF supportAndi Gutmans has announced that Adobe will be contributing towards AMF (Action Message Format) support on Zend Framework. This will allow with apps made in Flex or Adobe Air to communicate with PHP. Earlier, libraries like AMF-PHP allowed this interaction between Flash and PHP. Adobe’s proposal for this support on the Zend Framework can be viewed over at: http://gourl.in/1p Andi mentions over at his blog that AMF support is targetted for the Zend Framework 1.7 version. More over at Andi’s Blog. Related articles by Zemanta |
Ufdi is "hiring"The Ufdi Network is looking for new members. Do you have a website / weblog about technology related topics? Check here for more information on submitting your site to the network. Members |