Mac-on-Linux - strangely never blogged about, so now. Running Mac operating systems in a virtual environment under Linux on Macs - ideal for Linux-powered Mac Minis where you still want to have the one or other OS X program ...
Archive 23.10.2005 - 12.11.2005
Mac-on-Mac is the inverse counterpart to Mac-on-Linux - a port of the virtual machine to OS X, with which you can then run Linux or other Mac systems under OS X in a virtual environment. Status is still very raw ...
Dream Dancer at Work
Who wants to have a good laugh: RatcliffeBlog—Mitch's Open Notebook: Measuring podcasts: The right first step - about the pathetic attempts of Audible to make money from podcasts. Regardless of what you think about podcasts (I don't think much of them, their accessibility is simply terrible), Audible's ideas (which sell DRM-infested audiobooks) are simply laughable.
Boycott Sony-BMG!
Their rootkit nonsense is now also affecting Macs:
Sony BMG has turned the Windows universe against itself with the XCP copy protection from First 4 Internet. Now a copy protection method also appears that is supposed to perform similar tasks in the Mac cosmos as the XCP software. Until now, there were hardly any Trojans and rootkits known for Mac systems.
Great. Hardly any rootkits and Trojans - until now the music industry pushes such nonsense in our face. What are they smoking at Sony-BMG anyway? One thing is clear: a CD from them will not come into my player again. Stigmatizing consumers as criminals and whining about how bad they have it, and then launching an attack on my computer with CDs? Forget it.

Phishing: iTAN offers no protection either - which was actually clear to everyone beforehand, but of course did not stop the banks from marketing this nonsense as the best invention since sliced bread ...
Loss of Reality Among SAP Board Members
SAP Executive Rants Against Open Source:
Otherwise, it is important not to mess too much with the code of high-quality software programs.
Wait a minute. "High-quality software programs". He works at SAP? Where do they have any high-quality software programs? I mean, if you don't consider "high-quality" as "hopelessly overpriced junk", as he probably does?

wikiCalc - a mixture of spreadsheet and wiki. Strange. By Mr. Visicalc himself. Currently only Windows-compatible despite Perl. Well, spreadsheets fit for me with Perl and Windows - all shady stuff.
another week in Munich
And therefore, here are only sporadic updates when I feel like it and have the time. Given the interesting project and the quite pleasant weather, this will probably be rather rare.
SPD Sells Job Protection
To continue playing a role in the Berlin government, the SPD sells out job protection:
The experts from the Union and SPD have agreed to further relax job protection in a grand coalition. As reported by the "Bild am Sonntag," the probationary period for new hires may be extended to up to two years in the future. "This does not shake the substance of job protection," SPD labor market expert Klaus Brandner told the newspaper.
Okay, the whole thing is from Bild am Sonntag, so you can't put much stock in the truthfulness, but if it's really true, that's quite an outrageous audacity. A probationary period of two years is de facto an abolition of job protection, no matter what this SPD blowhard says - new hires then have no security at all, and the slightest disagreement and the contract is terminated. That's simply absurd.
Especially since employers already have a comparable option with fixed-term contracts today, only the employee then at least has some security for the duration of the fixed-term relationship - with the idea sketched above, there is no security at all.
And let's be honest: a boss who needs two years to determine if a new employee is suitable for the job (and that's exactly what the probationary period is for, not as a dishonest way out for the abolition of job protection), must either be a lying piece of shit, or dumb as a piece of bread in the puddle...
The lies of the SPD in recent years (with Hartz IV and all the crap from Schily) and in the current coalition negotiations is in any case a clear sign that the SPD no longer deserves its own name. It has nothing to do with social anymore. This is the sale of the welfare state purely out of power greed and obsession.
sql relay is a SQL connection pool that can serve various databases and handles client connections to the database via a central pool. Ideal in multi-host environments and when the connection load is too high (e.g., Django generates a connection per request).
Off to the Police State Germany!
Coalition of Social Democrats and Christian Democrats to review data protection:
Under the title "Germany – a safe and free country," the fight against terrorism is described in the paper available to heise online as "a very important task for all German security authorities." In addition, a "claim" of citizens is postulated "to be protected from crime." According to the interior experts of the grand coalition, other constitutionally guaranteed civil liberties must be subordinated to this. It is necessary to examine, as stated in the eight-page contract document, "to what extent legal regulations, for example in data protection, stand in the way of effective combating of terrorism and crime" and whether the "proven security architecture" needs to be further developed.
Speechless.
Value Added Tax vs. Wealth Tax
Open Letter: The Wealthy Want to Pay More Taxes:
Krämer said it cannot be that seriously considering an increase in the value-added tax without also taxing the wealthy more. An increase in the value-added tax would hit average earners, retirees, and the unemployed much harder.
Funny how people with money can understand this, but our federal proles can't ...
The Cowardice of the SPD
She shows herself in the position on (not quite?) General Secretary Nahles:
Nahles had previously been sharply attacked within the party. The spokesman of the conservative Seeheimer Kreis, Johannes Kahrs, said in the ARD morning magazine: "I think it is absurd that someone is rewarded as a regicide who, with his stubbornness, has led the party into crisis."
I think it is absurd that a right-wing pile of trash like the Seeheimer Kreis gets a voice in the SPD at all. He should just go over to the Union ...
The "regicides" were, by the way, not Mrs. Nahles, but the party executive - of whom 8 also did not attend the meeting. But criticizing them, the little coward naturally does not dare, because they could cut him back in his perks and trim him down to what he is: nothing.
But unfortunately, the SPD executive probably does not have the guts and will chicken out in front of the conservative forces and thus help to make the SPD just as boring, uninteresting, predictable and insignificant with new personnel as it already is. Just a red-painted Union. Who needs that? When we have Stoiber and Seehofer?
Rumsfeld denies UN access to detainees
In the Land of the Free and the Brave:
The United Nations has accused the United States of imposing unacceptable conditions on a planned inspection of the Guantanamo Bay detention camp. Even China does not set such conditions for visits to its prisons, said the UN Special Rapporteur on Torture, Manfred Nowak, in New York.
With the current administration, perhaps rather a land of cowards and liars?
coverage is a tool for creating coverage reports - which parts of a program were executed and which were not. Useful as a supplement for unit tests to ensure that the unit tests also cover all areas of the code.
Sony BMG's Copy Protection with Rootkit Functions
At Heise, there is a report about the problems with Sony BMG's copy protection:
This software emulates rootkit functions - rootkits also hide their (illegal) activities from the computer user. The copy protection installs filter drivers for CD-ROM drives and IDE drivers, through which it controls access to media.
Ultimately, this is another breach of user data integrity. And considering the idiotic copy protection laws in Germany, you're not even allowed to do anything about it. And so, the individual's right to their property (this is not just about Sony's silly CD, the entire computer is affected!) is once again sacrificed on the altar of the music industry's arrogance.
By the way, this copy protection also includes monitoring functions for media other than its own protected content - and in my opinion, this massively violates data protection regulations, because regardless of what Sony wants to protect, what else is going on on the computer is none of their business.
Another reason not to buy CDs from Sony BMG.
Stoiber has dusted off
Stoiber is not going to Berlin - the signs of decay of the grand coalition are already evident before it even comes into being, and they are really quite amusing. On both sides, people are falling apart like cardboard boxes.
The entertainment value of this Berlin docu-soap is certainly remarkable.

A Test Framework for Django
DjangoTesting is part of my DjangoStuff project and is the start of a testing framework for Django, modeled after the testing framework that Ruby on Rails provides. Currently only model tests are implemented, request/response tests are planned.
The testing framework is built solely on unittest and django, so you don't need additional modules (besides my DjangoStuff project, of course). It provides python-based fixture notations (fixtures are just python classes with attributes in a DATA subclass) and a basic command line utility to make use of those tests and fixtures.
Tests and fixtures are stored in applications and projects, so you can have application specific tests (especially usefull with generic applications) and project-level tests that will integrate stuff over several applications.
I think a good testing framework would really be important for Django applications, especially for applications that should be shared between projects. But I do think that a good testing framework needs some banging on, too - so I started it as a small subproject on my own. But if it grows into something useful, I will opt for inclusion into Django trunk.
Education and Prosperity - But Not for Everyone
Go together - education only for those who can afford it. The others should better stay stupid: Chances of inequality have grown further. And our state governments (on whose behalf education policy grows) will make sure that this remains the case. With certainty at least in the Union-governed countries, to which NRW unfortunately now also belongs.
For someone like me, who comes from a working-class family, this development is more than shocking. In my time, children from working-class families were not the majority in the classes at the grammar school, but there were some there. But with today's developments - school fees, teaching material fees, later tuition fees - the politicians make it very clear what they think of workers: nothing at all.
We are Germany? Up the arse. Money is Germany.
Müntes Departure?
I can't help but crack a small, nasty grin about Müntes' preferred candidate for General Secretary losing to Andrea Nahles. Guess that's nothing for Münte as the new Wehner, pulling the strings from behind and everyone dancing to his tune - he's been whistled off.
Selenium is a test automator for web applications. It runs directly in the browser and uses IFrames and JavaScript to hook into the page being tested.
Case/When/Otherwise for Django
If you have any evil plans for a switch statement for Django (hia rjwittams! ), you might want to look into my TagLib. There is a case/when/otherwise statement in there. It's quite easy to use:
{% case variable %}
{% when "value1" %}
{% endwhen %}
{% when "value2" %}
{% endwhen %}
{% otherwise %}
{% endotherwise %}
{% endcase %}
The reason for the tag structure is that the django template parser only looks for parameterless block-closing tags in the parsefor function and so you can't just pull an easy one like this:
{% if condition %}
{% elif condition %}
{% else %}
{% endif %}
You would have to copy over much from the template parser to get a parsefor that looks for a token with a tag and parameters to close the current block.
So I opted for the scoped tags approach where the "case" tag only sets up a context variable "case" and populates it with a dictionary with "value" and "fired" - with the latter one a trigger that can be fired by any "when" tag to prevent other "when" tags or the "otherwise" tag to fire themselves. A bit ugly, but working.
Walk along the canal
Walking along the canal and captured a few impressions:
Adhoc-Organization in CM-Systems
Adhoc organization is what I named the basic design decisions for my new content management system (blog system, personal wiki, digital image shoebox - whatever). It's coming along nicely, even though up to now I only used it as a sample application to make use of my little tools from the DjangoStuff pseudo-project. And it still is one of the best ways to see how tagging or searching or the new calendar tag or other stuff is used.
But it's coming along so good that I think I will be able to change over some sites in the near future. The basic design decisions are somewhat documented in the linked document in my trac-wiki. The main objective for me is to get something that I can use as easy for image presentation as for text presentation and that allows me to really integrate both parts. So that articles really can consist of a multitude of media and text.
It's quite fun to work on a project where you tear down the model and rebuild part of it from time to time, or make major refactoring decisions that leave you with a broken heap of python-bullshit for a while
Advertising Banners in 2005
Do site operators actually look at their own sites? If I need 30 seconds to close a page on Netzeitung because a crappy ad banner is blocking all resources, I don't find that funny anymore. I already thought it was stupid that you could barely scroll through the TV program on Yahoo because of all the Flash ads. But a newspaper that claims to understand the internet should perhaps take a look at its own pages and do some quality assurance on the ads it places ...
Aperture and Performance
From creativepro.com - Stripping Raw Naked - an interview with the maker of Aperture:
JS: It depends on what you do with Aperture. I mostly run it on my 15-inch PowerBook. That's not to say that I don't enjoy the refreshing wind-blowing-through-my-hair feeling when I sit down in front of a G5 running Aperture. But a PowerBook is fine for what a lot of photographers do in the field with their laptops: browse images quickly and step through the thumbnails. Maybe tag the images they like, maybe zoom in closely on one. The photo edit stage. For that, a PowerBook does take a speed hit, but it's totally usable.
This is where our scheme of loading a proxy image comes in -- the 1024 proxy is often all I need to see at this stage. Depending on how many megabytes each image is, Aperture on a G5 can load the full Raw image in less than a second. On my PowerBook, that same image may take three to four seconds to load fully.
For heavier duty image processing, faster GPUs and multiple processors are of huge benefit. Aperture does make extensive use of dual processors, but you do not need a Quad [a new model from Apple that has two dual-core processors].
That sounds more usable - if a 15" PowerBook is actually considered operable.
Bock: meet Gärtner
And that with Scatman Ede as the economic miracle. Well, whether his underlings would have turned against him would be doubtful anyway. But certainly a great idea if those who are well greased by the industry are the ones to decide on the use of biotechnology ...
cucumber2 is a very interesting Object-Relational-Mapper for Python and PostgreSQL, which also supports table inheritance in PostgreSQL.
Django Project - a very nice web framework that I use here.
PostgreSQL 8.1
PostgreSQL 8.1 with Two-Phase-Commits and User Roles:
Transactions can now be prepared on multiple computers with PREPARE TRANSACTION and executed together later. If a machine fails after PREPARE, the transaction can be correctly completed with COMMIT after the restart.
Yes!
Eerie Alliance
When industry, union members, and the CDU join forces to prevent the nuclear phase-out.
XML under Patent Protection?
Patent nonsense in extra strength: XML under patent protection?. But patents are such a great innovation engine, so it's quite right when a company with a patent that it has never implemented in any form, suddenly makes itself a presence in an area that has been in practical application for many years.
Akismet - Centralized Anti-Spam Filter
Photomatt (from WordPress) has built a central anti-spam service called Akismet that can be used with WordPress via a plugin. Additionally, there is an API that allows other services to be integrated. Basically a good idea - even though I generally have an aversion to central services, unless I myself operate these central services.
What really bothers me, however, is this small excerpt from the FAQ:
Well without giving too much of the secret sauce away, we can safely say that it would be pretty difficult to poison Akismet.
So central service - okay. I don't like it, but it certainly makes sense for others who cannot or do not want to operate such a service themselves. But "secret sauce" - I should send my comments with the personal data of my commenters to a foreign system, where I can't even see the software running behind it? Sorry, no thanks.
"Fitting on" some framework
How do you know wether a framework fits your style of thinking? It's not as if you could just look into a mirror wether it suits you nicely, you need other ways to decide that. One way to decide it is productivity - how fast you get your project up and running.
But does that really tell you the whole story? What if the project would have been something completely different? Did you just hit the sweet spot of the framework? Where you just lucky?
One way to decide wether some framework, language or tool fits my style of working for me is to look at the basic abstractions this tool gives me. And to look how I can use them and how naturally they fit my thinking - do I stumble on problems, not immediately knowing what abstraction to use, what tool to pull? Or do things just fall in place?
I discovered quite early on that I am a bit uncommon in programming, in that I don't build my own abstractions and try to translate from them into what the language or framework gives me, but that I start to think directly in the abstractions and syntaxes given to me - but only if they match my way.
So that's for me the ultimate measurement of wether a framework really fits into my thinking: checking from time to time wether I try to do translations or wether stuff just flows. Reaching "the flow" is what it's all about for me nowadays.
So how does Django match up? Quite nicely. It really gives me what I need in most cases, there are only very few areas where "the flow" is broken, where I need to think around problems, start to do translations. One area is special behaviour of entry fields - this curently is done in Django with parameterized instances of predefined field classes. There is no really nice way to do subclassing, you end up copying code from other parts of the django source - definitely breaking "the flow".
But most other parts just fall into place: middleware for global management of the request-response span. Template loaders for - well - template loading (yes, it's not a big deal - but being able to write your own template loader really is helpfull). The urlpatterns -hey, that's really a cool idea, because of it's absolutely loose couplying you don't even try to model your urls after your code structure, but tend to design them. And that's how it should be.
Models just powerfull enough to really move the model-related functionality there (although the class MODULE stuff will make it even nicer, especially the kind of ugly module_globals thingy). It would be cool if model classes would support mixin classes, so that abstract apps could provide stuff that just would be referenced by users to add functionality. But you can solve many of those problems with generated classes - thanks to python introspection (although you need to know a bit about djangos model-magic).
Most complex stuff tends to go into template tags and generic views - my CMS project currently only has 3 view functions of it's own, the rest is abstracted away into generic views (for searching and tagging). Template tags could be a bit easier to write, especially the parser is too primitive - a library of helper functions for easy deconstructing the tag string would be good (hey, maybe I write one, the basics arealready in my SVN repository).
Template filters are a big of an ugly duckling - they don't see the request context, so they can't do much more than just take the incoming object and some constant parameters. I think they should get the context passed in, so that they could be a bit smarter, if needed (like allowing filters to resolve a parameter against the context).
Generic views are quite nice, too - even though I don't use the predefined ones that often. The main reason is that more often than not I end up in wrapping the generic views in some code that modifies their behaviour - and then it's quite often simpler to just roll my own. But they are great for first starts into areas, just tack them into your project and funcitonality is available. You can allways exchange them with your own view functions if you discover that you need to.
And the admin, the one thing that makes Django stand out in the crowd? In my first play-projects I loved it, in later ones I didn't use it (the Gallery doesn't need it), but with the CMS project I did the first one that makes really heavy use of it. And I have to say, I like it. It should get a bit more flexibility (the new_admin branch might help there, as it moves more stuff into templates, so they can be overridden), but overall it's really cool and usefull.
Two things, though, are definitely needed for the admin: full transaction support bound to request-response (ticket #9 in the django trac), because changing stuff and ending up with inconsistent tables is no fun. Like getting an exception because something broke in repr , so the log entry isn't written, but the object is written. Of course you don't notice it, go back, send again, end up with two objects and still no log message ...
The other thing that is needed: basic hooks for object-based authentication. Not a full blown ACL or anything like that, just some really simple hooks from the admin to the model that the user can define to tell the admin wether some object should be editable or should only be shown readonly. The main problem with the current solution is, it only handles full tables - you can't even tell the admin that some user can only work on the current site and can't change objects of other sites (my CMS project makes heavy use of the multi-site capability in Django - one admin server should manage multiple sites in one admin interface).
But all in all webapp building with Django is real fun. It's not only productive to me, it just feels natural to do things the Django way. So, yes, Django fits my thinking style. Seems to have hit home right on.
The JavaScript Interactive Interpreter is a nice toy: you can enter JavaScript expressions and see the results directly. So in principle a JavaScript shell - only it runs in the browser window, of course.
Markdown for Django
Django already includes a markdown filter (in contrib.markup), but I nonetheless rolled my own Markdown for Django mini-app. The main benefits are link integration with django models (by using generic model queries and get absolute url), a documentation generic view that handles language switching and a nice macro facility for markdown. Macros are a usefull way to extend markdown by writing Django template snippets that are called whenever the users calls the makro in his markdown source.
It was formerly part of the CMS project, but I think it's usefull in it's own and so much better put into the stuff pseudo-project.
Scatha and Glaurung are two chess programs written in OpenMCL, with Cocoa support from OpenMCL. Nice examples of how to build native OS X applications with OpenMCL - and they are also interesting to play, especially the hexagonal chess version.
Twisted Book is out
Those who can't easily squeeze their brains into the twisted world of Twisted might find help in Twisted Network Programming Essentials - a new book on what is probably the most powerful internet protocol platform for Python.
akaDAV - Lightweight WebDAV server and python module is a WebDAV module for Twisted. With it, you can build your own WebDAV server. Could be useful for me, because then I can run it under user rights, instead of under the rights of the web server ...
Google's Web Accelerator and Damager
Google at it again - Ian pretty much says everything there is to say about it. Google claims they don't want to be "evil." But they are infinitely stupid, as shown by the repeated launch of the Web Damager.
What does the Web Accelerator do, and why is it such a stupid piece of software? Well, it simply follows links. And it does so in advance, before the user does - so to speak, speculative web crawling, but privately for the user. That doesn't sound so bad at first, except that servers are bombarded with traffic they might never have otherwise - because every link is followed, even if the user doesn't go there. And that multiplied by the users who use this thing...
But the traffic is not the real problem - the real problem comes when you consider the context in which this thing runs. And that is, it runs on the user's private computer, between the browser and the network. Just a little proxy of its own. Which, for its work, remembers cookies and similar things and then sends requests to the pages that look as if they come from the user's browser. With their security headers. And cookies.
Apart from the fact that I wouldn't particularly like it if my headers with passwords or session cookies appeared anywhere other than in the browser and the target server - this approach also enables the Web Accelerator to look at areas that a central crawler would not see. For example, areas of pages that are behind logins. Content management systems, where additional links appear after login. Wikis, whose edit links then appear when someone starts a session. Webmail systems, where each mail is represented as a link.
All these systems have one thing in common: for changing actions, a form submission is not always necessary. Often, it is enough to click a link. The current version of a page in the wiki to delete quickly to remove wiki spam - a simple link, only visible to the logged-in user. The mail in the webmail inbox, which is automatically marked as read when called up. The publish link in the CMS, with which a page is put live.
Of course, responsible web application programmers try to put destructive actions behind forms (and thus POST requests) so that a simple link doesn't destroy anything. But this usually only happens in the publicly accessible areas, where otherwise the web robots of the various search engines and spam automata would cause chaos.
But precisely in the areas shielded by login, one normally does not expect automated clicks - and therefore builds comfort features, because one can be sure that a link is clicked consciously and intentionally.
Well, until the Google Web Accelerator came along. From the company that claims to understand the web. Thanks a lot, you assholes.
PS: and contrary to the first version, the new version no longer sends a header with which one could recognize the prefetch requests in order to block them in such critical areas.
python webdav server is another WebDAV server for Python - not updated since 2000, but if it works, it might be sufficient. Perhaps more understandable than Twisted code.
Spam Block List Ran Amok
Guess who that was? Exactly - SORBS. My favorite collection of technical incompetence and social stupidity. Couldn't someone initiate a UDP against the pipes?
Launch Box is a QuickSilver clone for Gnome. Seems a bit rough around the edges and the installation might be a bit hairy due to the hard dependencies.
Linux and RAW Digital Photography provides a lot of information about RAW formats and Linux.
Lphoto is a photo database for Linux, structured similarly to iPhoto for Mac.
generic search service for Django
If your Django application needs searching capabilities, you can roll your own. Or you can use my generic search view. This provides a parser for queries and a search machinery that is suiteable for moderate database sizes. It provides an extensible google-like syntax.
The main problem is that django doesn't support OR query combinations and that it doesn't support "icontainsnot" queries. So the search engine does multiple selects to get one query. It starts with the longest search word and goes down in size from that result set, restricting it from one step to the next. But since it needs to keep the last result set in memory (at least the list of IDs), if your database contains too much rows, this might pose problems to your server (especially if the users do silly queries that produce large resultsets).
Maybe in future this will learn some optimizations to make it work better with larger databases, but it's quite fine as a search engine for your blog or standard content management systems.
Ubuntu Breezy Badger
I pulled the Live+Installation DVD (hey, T-DSL 3000 rules!) and must say, I'm really surprised. Okay, there are a few issues: the keyboard layout is suggested as the default for the PC - but a Mac notebook can have different layouts (externally a PC keyboard, but internally always a Mac keyboard), so the selection should be a bit more clever. If you switch to the Macintosh keyboard in the selection, special characters like the pipe symbol and curly and square brackets and AT and such no longer work - with PC allocation, however, the labeling of the Mac keyboard does not match. And there is no allocation for the Mac special characters.
What also doesn't work is the second monitor - it is simply not detected and activated, not even initialized. Too bad, because Macs do have multi-monitor support by default, at least the PowerBooks and PowerMac models (the iBooks and iMacs only partially and then only with hacks). That should also be included in my opinion.
But otherwise - nice thing. That WLAN is not recognized is normal - or it is recognized, but not usable. Apple's WLAN chips are often not supported there. I also don't know where Bluetooth is configured - I probably need to install packages first. But that could also be done automatically in my opinion if a Bluetooth adapter is detected. Nevertheless, Ubuntu seems quite nice overall - it starts with usable defaults and already supports a lot of the computer. And the extensive translation of at least menus and dialogs in Gnome is very pleasant.
And that a Debian architecture is working underneath is of course particularly dear to me.
However, it is catastrophic that in the Live CD it seems that no terminal can be started anywhere ...

