<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>freedom blog reloaded &#187; foss</title>
	<atom:link href="http://blog.peijnik.at/topics/foss/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.peijnik.at</link>
	<description>Stephan's Free Software blog</description>
	<lastBuildDate>Tue, 10 Nov 2009 18:04:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Android&#8217;s roaming detection &amp; its implementation</title>
		<link>http://blog.peijnik.at/2009/11/08/androids-roaming-detection-its-implementation/</link>
		<comments>http://blog.peijnik.at/2009/11/08/androids-roaming-detection-its-implementation/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 19:04:32 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gsoc]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=173</guid>
		<description><![CDATA[I know I wrote about Android already today, but there is another thing that concerns me right now. I am owner of an Android-based phone (an HTC Dream) and recently switched my mobile network provider. The problem is that my new provider is a virtual provider and as such there is no real network of [...]]]></description>
			<content:encoded><![CDATA[<p>I know I wrote about Android already today, but there is another thing that concerns me right now. I am owner of an Android-based phone (an HTC Dream) and recently switched my mobile network provider. The problem is that my new provider is a <a href="http://en.wikipedia.org/wiki/Mobile_Virtual_Network_Operator">virtual provider</a> and as such there is no real network of that provider. Now Android has a feature to turn off broadband connections when in roaming mode, which itself is a great idea and can save you from paying quite a lot of money when the phone connects to 3G abroad, but this feature also turns off broadband connections when roaming locally. All this is being discussed in bug report <a href="http://code.google.com/p/android/issues/detail?id=3499">#3499</a>.</p>
<p>After noticing this problem I became curious on how Android detects that it is roaming and I found the GsmServiceStateTracker.isRoamingBetweenOperators method to be responsible for that magic, but soon noticed that the method is not only inefficient, but also doesn&#8217;t work as intended. This is hardly related to the bug mentioned above, but let&#8217;s have a look at the code in question:</p>
<pre name="code" class="java">/**
* Set roaming state when gsmRoaming is true and, if operator mcc is the
* same as sim mcc, ons is different from spn
* @param gsmRoaming TS 27.007 7.2 CREG registered roaming
* @param s ServiceState hold current ons
* @return true for roaming state set
*/
    private
    boolean isRoamingBetweenOperators(boolean gsmRoaming, ServiceState s) {
        String spn = SystemProperties.get(PROPERTY_ICC_OPERATOR_ALPHA, "empty");

        String onsl = s.getOperatorAlphaLong();
        String onss = s.getOperatorAlphaShort();

        boolean equalsOnsl = onsl != null &amp;&amp; spn.equals(onsl);
        boolean equalsOnss = onss != null &amp;&amp; spn.equals(onss);

        String simNumeric = SystemProperties.get(PROPERTY_ICC_OPERATOR_NUMERIC, "");
        String operatorNumeric = s.getOperatorNumeric();

        boolean equalsMcc = true;
        try {
            equalsMcc = simNumeric.substring(0, 3).
                    equals(operatorNumeric.substring(0, 3));
        } catch (Exception e){
        }

        return gsmRoaming &amp;&amp; !(equalsMcc &amp;&amp; (equalsOnsl || equalsOnss));
    }</pre>
<p>Okay, let me summarize what this piece of code does wrong, at least from my understanding:</p>
<ul>
<li>It takes both the network operator alphanumeric identifier and alphanumeric long identifier and compares both to the alphanumeric identifier coming from the SIM card, whilst&#8230;</li>
<li>&#8230; it could simply use the network and SIM card numeric identifiers and compare those, which should be a lot cheaper than comparing those strings</li>
<li>Then it takes the first three characters/digits of the numeric identifiers (which indicate the country) and compares those</li>
</ul>
<p>Now in my case my SIM card doesn&#8217;t seem to provide the phone with a alphanumeric identifier, so the first two comparisons always fail for obvious reasons and, looking at the inline-if in the last line of that method my phone will always indicate that I am in roaming mode, even when I am not.</p>
<p>The problem is not only the logic which seems to be wrong, but I rather see the inefficient comparisons used there to be a major problem in embedded systems like mobile phones. This is the first piece of Android code I have had a look at, but if all other code is as ugly and inefficient as these few lines Android really needs some major fixes. Related to this I have reported bug <a href="http://code.google.com/p/android/issues/detail?id=4590">#4590</a> and forked the <a href="http://github.com/speijnik/android_frameworks_base">git repository in question</a> over at github, to fix this method, should be a matter of 5 minutes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/11/08/androids-roaming-detection-its-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android, Mythbusters and openness</title>
		<link>http://blog.peijnik.at/2009/11/08/android-mythbusters-and-openness/</link>
		<comments>http://blog.peijnik.at/2009/11/08/android-mythbusters-and-openness/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 03:49:41 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=170</guid>
		<description><![CDATA[I have been reading a great many posts about Android lately, some consisting of criticism, some of praise and some simply addressing issues in the Android &#8220;community&#8221;. Let&#8217;s have a look at those.
Matt Porter&#8217;s Android Mythbusters presentation and Harald Welte&#8217;s reaction

I haven&#8217;t seen the presentation live, but I had a look at the slides. Impressing [...]]]></description>
			<content:encoded><![CDATA[<p>I have been reading a great many posts about Android lately, some consisting of criticism, some of praise and some simply addressing issues in the Android &#8220;community&#8221;. Let&#8217;s have a look at those.</p>
<p><strong>Matt Porter&#8217;s </strong><strong>Android Mythbusters presentation</strong><strong> and Harald Welte&#8217;s reaction<br />
</strong></p>
<p>I haven&#8217;t seen the presentation live, but I had a look at <a title="Mythbusters_Android.pdf @ tree.celinux.org" href="http://tree.celinuxforum.org/CelfPubWiki/ELCEurope2009Presentations?action=AttachFile&amp;do=get&amp;target=Mythbusters_Android.pdf">the slides</a>. Impressing work done by Matt putting all this information together. However, we all knew that Android only (ab-)uses Linux, without making use of the GNU userland for a long time, didn&#8217;t we?</p>
<p>In his presentation Matt has shown things such as Android&#8217;s udev &#8220;replacement&#8221; that uses hardcoded values for device node creation and (on his <a title="Android Mythbusters (Matt Porter) comment @ laforge.gnumonks.org" href="http://laforge.gnumonks.org/weblog/2009/11/04/#20091104-android_mythbusters">blog</a>) Harald has then come up with a statement I have found to be very strong:</p>
<blockquote><p>The presentation shows how Google has simply thrown 5-10 years of Linux userspace evolution into the trashcan and re-implemented it partially for no reason.  Things like hard-coded device lists/permissions in object code rather than config files, the lack of support for hot-plugging devices (udev), the lack of kernel headers.  A libc that throws away System V IPC that every unix/Linux software developer takes for granted. The lack of complete POSIX threads.  I could continue this list, but hey, you should read those slides. now!</p></blockquote>
<p>Now both of these statements target technical details, but the root of the problem seems to be elsewhere.</p>
<p><strong>Where is my Android 2.0?</strong></p>
<p>Okay, that heading might not be making any sense in the context of this post at a first glance, but let me elaborate on that. Google and the Open Handset Alliance refer to Android as being an &#8220;Open Source&#8221; operating system, but the project is different from &#8220;real&#8221; Free Software projects: development takes place in a closed group and the results are shared with the community later on, when they are deemed to be ready.</p>
<p>This means that innovation also takes place behind closed curtains and that the community is not involved in the actual development process at all. Lately we have seen the result of that, as Motorola is bragging about working close with Google on Android 2.0 (&#8221;Eclair&#8221;), but the AOSP source trees, open for everyone to have a look at, show no signs of version 2.0. In fact no changes that might even remotely suggest the release of a new major version have been made public in the past few weeks. So where is the openess there?<br />
Actually, the Motorola Droid has already shipped with Eclair on 6th, but still, there is no indication that Eclair will be made available to the broader public.</p>
<p>In short Android seems to be developed behind closed curtains, with hardly (read no) community input whatsoever and is sometimes released as Free Software, not what I would describe as an open development process.</p>
<p><strong>The Android Market problem</strong></p>
<p>As we have seen in the past Google is enforcing their copyright on proprietary applications that ship with pretty much every Android device, such as the Android Market. This has become really clear when Steve Kondik received  a cease and desist letter when packing the Google-proprietary applications into his ROMs. Okay, it&#8217;s Google&#8217;s right to enforce their copyright and there is nothing wrong with actually doing so, the thing I really have a problem with is something else: the Market is proprietary.</p>
<p>Now what this means should become rather clear. You can have an Android device without Google&#8217;s proprietary bits, but with default settings you just do not have any way of installing additional software. In my opinion the Market should be freed by Google themselves, or the community has to react and come up with a free replacement to overcome the vendor lock-in. Oh, you might know a replacement called <a href="http://www.slideme.org">SlideMe</a> (or Mobentoo) already. Well, that bugger is proprietary too, so not a solution at all.</p>
<p><strong>Nokia and Maemo to the rescue</strong></p>
<p>In most discussions about the openness of Android someone throws in Nokia and <a href="http://www.maemo.org">Maemo</a>, as a solution to the dilemma. Reading all those positive comments I simply had to give it a try, but all my hopes were destroyed within a few minutes.</p>
<p>Let&#8217;s start with the good news and let alone the reason why my hopes were destroyed for another minute or two. Maemo is based on Debian GNU/Linux and various Free Software components, such as GTK+, gstreamer, esd and friends. Most of the system is Free Software which is a good thing(tm) and reading all of this really got me into Maemo. Okay, some applications seem to be proprietary, but I am sure that could be fixed rather easily, so I could once for all use a truly open phone.</p>
<p>&#8230;and then came the <a href="http://repository.maemo.org/stable/fremantle/maemo-sdk-install_5.0.sh">SDK installer shell script</a>:</p>
<blockquote><p>#!/bin/sh<br />
# Copyright (C) 2006-2009 Nokia Corporation<br />
#<br />
# This is proprietary software owned by Nokia Corporation.<br />
#<br />
# Contact: Maemo Integration &lt;integration@maemo.org&gt;<br />
# Version: $Revision: 1110 $</p></blockquote>
<p>Now there is one question you should ask yourself: Why would someone trying to promote his platform as being open make the *installer* script for its SDK proprietary? Come on, it&#8217;s an installer script, how much of your secret juice could be in there? What&#8217;s the problem with people modifying it and working on this installer script in an open development environment?</p>
<p>I had high hopes for Nokia actually doing a bit better than Google, but it seems they&#8217;ve failed to do so. It may be me overreacting, but a proprietary SDK installer shell script scares me enough not to install the SDK and have a look at it for now nor to think about buying a Maemo-based device in the near future. Please Nokia, either get the facts straight or provide us with a free SDK to your free &amp; open platform.</p>
<p>So, in short, Google is bad at working with the community and creating a truly open development process, and Nokia simply fails in terms of not scaring off prospective developers for their open platform with the proprietary SDK installer. Do you have any solutions in terms of an open phone environment, apart from what OpenMoko has come up with?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/11/08/android-mythbusters-and-openness/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to move panels in Gnome 2.28</title>
		<link>http://blog.peijnik.at/2009/11/04/how-to-move-panels-in-gnome-2-28/</link>
		<comments>http://blog.peijnik.at/2009/11/04/how-to-move-panels-in-gnome-2-28/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 09:04:07 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[observations]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=162</guid>
		<description><![CDATA[I just installed Ubuntu Karmic Koala on my workstation and came across the problem of not being able to move/drag Gnome panels around in order to have the panels on my primary monitor.
On the Debian system that was powering the workstation before this was a non-issue as I could simply click, hold and drag both [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed Ubuntu Karmic Koala on my workstation and came across the problem of not being able to move/drag Gnome panels around in order to have the panels on my primary monitor.<br />
On the Debian system that was powering the workstation before this was a non-issue as I could simply click, hold and drag both the upper and the lower panel, but this didn&#8217;t work.</p>
<p>So, after a few minutes of googling I came across an entry at answers.launchpad.net[0] and a blog post, but I cannot seem to remember the URL to that one. I can imagine that some of you might be having the exact same problem, so the solution is holding down the ALT, whilst dragging as usual.</p>
<p>[0] <a href="https://answers.launchpad.net/ubuntu/+source/gnome-panel/+question/264">https://answers.launchpad.net/ubuntu/+source/gnome-panel/+question/264</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/11/04/how-to-move-panels-in-gnome-2-28/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer Of Code 2009: Working for Debian</title>
		<link>http://blog.peijnik.at/2009/04/21/summer-of-code-2009-working-for-debian/</link>
		<comments>http://blog.peijnik.at/2009/04/21/summer-of-code-2009-working-for-debian/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 06:10:27 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[gsoc]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=114</guid>
		<description><![CDATA[Yesterday Google announced the students and projects that have been accepted for Google Summer Of Code 2009 and guess what: my project was accepted. This means I will be working full-time on FOSS this summer.
So I guess it&#8217;s about time to introduce my project to you: Distribution-independent update manager, mentored by Michael Vogt (mvo).
Okay, I [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday Google announced the students and projects that have been accepted for Google Summer Of Code 2009 and guess what: <a title="Distribution-independent update-manager @ wiki.debian.org" href="http://wiki.debian.org/SummerOfCode2009/Distribution_independent_update_manager">my project</a> was accepted. This means I will be working full-time on FOSS this summer.</p>
<p>So I guess it&#8217;s about time to introduce my project to you: Distribution-independent update manager, mentored by <a title="mvo @ launchpad.net" href="https://launchpad.net/~mvo">Michael Vogt (mvo)</a>.</p>
<p>Okay, I believe some of you might wonder what this project is all about, as <a title="update-manager @ packages.qa.debian.org" href="http://packages.qa.debian.org/u/update-manager.html">update-manager</a> is in the Debian package archive already. There is a problem with update-manager though. As you see in the package&#8217;s version number (it contains &#8220;.debian&#8221;) update-manager has been adapted for use in Debian. Also, Debian contains update-manager 0.68 right now, whilst upstream (Ubuntu in this case) has released <a title="update-manager revision log @ bazaar.launchpad.net" href="http://bazaar.launchpad.net/~ubuntu-core-dev/update-manager/main/revision/1374">0.111.6</a> (actually there were quite a few upstream versions meanwhile). The reason Debian is nowhere near being up-to-date with upstream is that right now a lot of effort has to be put into porting update-manager to Debian every time a new upstream release is made, because certain Ubuntu-specific functionality breaks update-manager in more or less severe ways on Debian.</p>
<p>This leads me directly to what my project is about: making update-manager (Ubuntu-) distribution-independent, but not package manager independent.<br />
There are 6 main goals for this project, which I will be working on in the order below.</p>
<ul>
<li>Analyzing the code and identifying Ubuntu-specific parts.</li>
<li>Creating a distribution-plugin interface and moving the Ubuntu-specific parts into a distribution-plugin, creating a core package that is distribution-independent.</li>
<li>Creating a special notification for important/security related updates and providing the code that handles updates from security.debian.org as such.</li>
<li>Creating a backend-plugin interface, moving the synaptics backend into a backend-plugin and optionally create a python-apt based plugin.</li>
<li>UI redesign, providing a simpler interface to average joe, whilst allowing more experienced users to optionally display more information.</li>
<li>Automatic downloading &amp; installation of updates. This is still up to discussion, as automatic downloading is already provided by software-properties (-gtk and -kde) and automatic installation can be handled by unattended-upgrades. Both packages are part of Debian already.</li>
</ul>
<p>Please note that this list should not be considered final and may be extended or modified over time. It exists to give you an overview of what exactly my project is about and how I am planning on carrying out the tasks.</p>
<p>Finally I wanted to let you know that I will keep you posted on the progress I am making, via this blog. Alternatively a blog aggregator for Debian&#8217;s GSoC students has been set up over at <a title="Debian's GSoC blog aggregator" href="http://soc.alioth.debian.org/feeds/blogs/">http://soc.alioth.debian.org/feeds/blogs/</a>, where you can not only find my posts, but those of all of Debian&#8217;s students.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/04/21/summer-of-code-2009-working-for-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python everywhere: computer games</title>
		<link>http://blog.peijnik.at/2009/04/02/python-everywhere-computer-games/</link>
		<comments>http://blog.peijnik.at/2009/04/02/python-everywhere-computer-games/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 16:35:44 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[everywhere]]></category>
		<category><![CDATA[foss]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=92</guid>
		<description><![CDATA[This is the second article in my series Python everywhere and covers the use of Python for in computer games. The first article of this series covered the use of Python for the conficker worm scanner tool and can be found here.
Games written in Python
As PyGame provides a nice library for writing games purely in [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second article in my series Python everywhere and covers the use of Python for in computer games. The first article of this series covered the use of Python for the conficker worm scanner tool and can be found <a title="Python everywhere: conficker scanner" href="http://blog.peijnik.at/2009/03/31/python-everywhere-conficker-scanner/">here</a>.<br />
<span id="more-92"></span><strong>Games written in Python</strong></p>
<p>As <a title="pygame.org" href="http://www.pygame.org/">PyGame</a> provides a nice library for writing games purely in Python it is becoming more common to use Python for this task too. The book &#8220;<a title="Beginning Game Development with Python and Pygame  @ apress.com" href="http://www.apress.com/book/view/9781590598726">Beginning Game Development with Python and Pygame</a>&#8221; is linked directly from the PyGame homepage, and thus is probably a good resource if you want to start writing games in Python.</p>
<p>However, I do not want to go into detail on how this library works, but rather provide you with a few examples of games written in Python. To provide you with a few examples I had a look at the <a title="pyweek.org" href="http://www.pyweek.org/">PyWeek</a> homepage. PyWeek is a Python Game Programming Challenge which invites everyone to participate, so the winners of this contest are of high-quality, and I&#8217;m showing you the latest two winners.</p>
<p>There are always two winners of PyWeek in for indivduals who have created games and teams. The latest winners are &#8220;<a title="Team Rambo @ pyweek.org" href="http://www.pyweek.org/e/Rambo/">Team Rambo</a>&#8221; in the individual effort category and &#8220;<a title="Midnight Sun @ pyweek.org" href="http://www.pyweek.org/e/midnightsun/">Midnight Sun</a>&#8221; with their two-man team.</p>
<p><strong>PyWeek: Team Rambo&#8217;s Stringrolled (individual)</strong></p>
<p style="text-align: left;">Stringrolled makes use of the pygame library I mentioned earlier and is a <a title="Platform game @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/Platform_game">platform game</a>. In a mere 2377 lines of code, including comments and blank lines, Team Rambo created an impressive game, coming with a story, easy-to-learn controls and nice 2D-graphics, screenshot below. <a href="http://media.pyweek.org/dl/7/Rambo/pyweek3.png"><img class="aligncenter" title="Screenshot of Stringrolled" src="http://media.pyweek.org/dl/7/Rambo/pyweek3.png" alt="Stringrolled screenshot @ media.pyweek.org" width="384" height="240" /></a></p>
<p style="text-align: left;"><strong>PyWeek: Midnight Sun&#8217;s Kite Story</strong></p>
<p style="text-align: left;">Kite Story is yet another interesting game, with game mechanics I have not seen ever before. You are controlling a kite with your mouse and are trying to catch objects, such as bees and birds, with the kite&#8217;s rope. So what you basically do you draw a loop around an object with<a href="http://media.pyweek.org/dl/7/midnightsun/ss2.png"><img class="alignleft" title="Kite Story: catching a sky diver" src="http://media.pyweek.org/dl/7/midnightsun/ss2.png" alt="Kite Story screenshot @ media.pyweek.org" width="357" height="359" /></a> your mouse and that way catch it. Every third cought object you advance to the next level, but keep in mind not to collide with the objects, because you will lose them and in turn be doing the previous level again, screenshot below. It should be noted that this game does not make use of PyGame at all, but rather relies on <a title="pyglet.org" href="http://pyglet.org/">pyglet</a>, and is 1997 lines of code in length, again counting blank lines and comments too.</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;"><strong>Games using Python</strong></p>
<p style="text-align: left;">You have seen now that it is possible to write a game completely in Python, but there&#8217;s another use-case of Python in games: scripting.<br />
Some (proprietary) games, such as <a title="Modding Sid Meier's Civilization IV @ 2kgames.com" href="http://www.2kgames.com/civ4/blog_03.htm">Civilization IV</a>, offer Python support in their editors and SDKs. This quote from the article at 2kgames.com should give you a good idea of what can be done using Python in Civilization IV:</p>
<blockquote>
<p style="text-align: left;">The next level offers <strong>Python and XML</strong> support, letting modders with more experience manipulate the game world and everything in it. XML (eXtensible Markup Language) files can be edited in standard text editors or in special XML file editors that have ease-of-use features like a grid view. Editing these files will allow players to tweak simple game rules and change or add content. For instance, they can add new unit or building types, change the cost of wonders, or add new civilizations. Players can also change the sounds played at certain times or edit the play list for your soundtrack. NOTE: You can have custom soundtracks simply by adding music to the custom folder. You only need to edit the XML in order to assign certain pieces to specific eras or remove certain pieces.</p>
</blockquote>
<blockquote><p>The Python scripting language is fully integrated throughout the game and offers experienced modders a chance to really strut their stuff! People with some programming skills will be able to do things to alter the game in interesting and extraordinary ways. For instance, all of the game interface screens are exposed to Python, so modders will be able to change the information that&#8217;s displayed, as well as how it&#8217;s positioned on the screen. We also use Python to create and generate all of the random map scripts that are included in the game. So, players will now have the ability to add scripted events to the game like automatically generating units when a tile is reached, having specific situations trigger automatic war, or get this, bringing back Civil Wars caused by unrest, Civ II style!</p></blockquote>
<p><a title="EVE Online Homepage" href="http://www.eveonline.com/">EVE Online</a> is another game making use of Python, as an <a title="stackless python 2.5 @ eveonline.com" href="http://www.eveonline.com/devblog.asp?a=blog&amp;bid=488">article</a> over at eveonline.com points out.</p>
<p><strong>Python everywhere &#8211; also in compuater games</strong></p>
<p>Even though I am sure you can come up with a lot more examples of Python being used in computer games I think I have proven my point. Python is being used not only to create computer games, but sometimes also to provide developers with a way of extending games. To me personally it feels as if adoption of Python for this very task is increasing too, and I expect Python to be used even more by the game development community in the future.</p>
<p>You can expect the third part of this series to be released in about a week, so please check back regularly if you like the series.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/04/02/python-everywhere-computer-games/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Python everywhere: conficker scanner</title>
		<link>http://blog.peijnik.at/2009/03/31/python-everywhere-conficker-scanner/</link>
		<comments>http://blog.peijnik.at/2009/03/31/python-everywhere-conficker-scanner/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 11:30:23 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[everywhere]]></category>
		<category><![CDATA[foss]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=87</guid>
		<description><![CDATA[This article is the first in my new series &#8220;Python everywhere&#8221;.
As this is the first article in this series I would like to explain what the series is all about.
As an avid Python user and developer I want to share my observations whenever I find Python applications doing not-so-unusual things, Python applications running on embedded [...]]]></description>
			<content:encoded><![CDATA[<p>This article is the first in my new series &#8220;Python everywhere&#8221;.</p>
<p>As this is the first article in this series I would like to explain what the series is all about.<br />
As an avid Python user and developer I want to share my observations whenever I find Python applications doing not-so-unusual things, Python applications running on embedded devices. In the end I want to point out just what the name of this series suggests: Python is everywhere and can be used for everything.</p>
<p>So, straight ahead to the first issue: the conficker scanner.</p>
<p><span id="more-87"></span>When reading an article about a detection mechanism for the conficker worm on <a title="Deutsche Forscher entwickeln Netzwerk-Scan für Conficker-Wurm @ heise.de" href="http://www.heise.de/security/Deutsche-Forscher-entwickeln-Netzwerk-Scan-fuer-Conficker-Wurm--/news/meldung/135434">heise Security</a> [german] I was myself wondering a few things, but wanted to give it a try. So I followed the link to the article <a title="Detecting Conficker @ honeynet.org" href="http://honeynet.org/node/388">Detecting Conficker</a>, by <a title="Werner Tillmann\s blog @ honeynet.org" href="http://honeynet.org/blog/9">Tillmann Werner</a>. Before clicking the link I was wondering whether I could get this tool running on GNU/Linux using wine, or another method.</p>
<p>After downloading the ZIP file and unpacking it I thought I was dreaming. There were two Python files, along with a <em>COPYING</em> file.<br />
So, even though before having a look at the code I wanted to know the COPYING conditions, and again I saw something unexpected: it&#8217;s licensed under the <strong>GPLv3</strong>, great!</p>
<p>As there are some computers running a proprietary operating system from Redmond on this network I immediately gave it a shot. I started the script (<em>scs.py</em>), and after fulfilling its requirements (namely the <em>impacket</em> Python module) I ran it on the local network and it worked without any problems. No conficker found on this network, after all my flatmates have their systems secured &#8211; good.</p>
<p>So there you have another use-case for Python: detecting malware over the network.<br />
Kudos should go to Tillmann Werner, not only for this piece of Python code, but also for his work on the <a title="honeynet project (honeynet.org)" href="http://honeynet.org/">honeynet project</a> and, together with Felix Leder, the great <a title="Know Your Enemy: Containing Conficker paper @ honeynet.org" href="https://www.honeynet.org/papers/conficker">analysis</a> of conficker. Keep up the good work, and thanks for proving Python can also be used for this task.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/03/31/python-everywhere-conficker-scanner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing pyttpd</title>
		<link>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/</link>
		<comments>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 23:27:07 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[pyttpd]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=85</guid>
		<description><![CDATA[In this article I would like to inform you about my newest pet-project: pyttpd.
pyttpd is my effort of implementing a webserver in Python, with a focus on security (through privilege separation), extensibility and scalability.
I started this project because I was not entirely happy with the lack of flexibility and support for privilege separation by popular [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I would like to inform you about my newest pet-project: <a title="pyttpd project @ code.sp-its.at" href="http://code.sp-its.at/projects/pyttpd">pyttpd</a>.</p>
<p>pyttpd is my effort of implementing a webserver in Python, with a focus on security (through privilege separation), extensibility and scalability.</p>
<p>I started this project because I was not entirely happy with the lack of flexibility and support for privilege separation by popular webservers. Whilst both <a title="lighttpd.net" href="http://lighttpd.net">lighttpd</a> and <a title="httpd.apache.org" href="http://httpd.apache.org">Apache httpd</a> provide means of running processes under different users these usually require hacks like <a title="suexec (apache 2.0 documentation)" href="http://httpd.apache.org/docs/2.0/suexec.html">suexec</a>. Additionally I am somehow curious about how a fully-fledged webserver implemented in Python would perform compared to the mentioned daemons.</p>
<p><span id="more-85"></span></p>
<p><strong>Security through extensive use of Privilege Separation</strong></p>
<p>Whilst it is common for daemons to initially run as a privileged user and drop privileges as soon as possible it is possible to make more extensive use of setuid and friends.<br />
pyttpd&#8217;s design aims at creating one <a title="pmaster (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#privileged-master-process-pmaster">privileged process</a>, which only binds to privileged ports and spawns subprocesses.<br />
All subprocesses have specific tasks, such as routing <a title="umaster (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#unprivileged-master-process-umaster">between all processes</a>, <a title="listener process (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#id1">protocol-specific parsing</a> of incoming requests and handling <a title="vhost process (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#id2">processing</a> of those requests.<br />
The point is that all these processes do not run as &#8220;<em>www-data</em>&#8221; or another common account, but that a logic separation takes place on a per-host basis. This means that if the webserver is hosting <em>www.example.org</em> and <em>webapp.example.org</em> those will be running under different system accounts, making it hard to interfere with each other. This method should also enable the use of <a title="Mandatory Access Control @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/Mandatory_access_control">MAC</a> mechanisms such as <a title="SELinux @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/SELinux">SELinux</a> or <a title="SMACK @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/Simplified_Mandatory_Access_Control_Kernel">SMACK</a> more efficiently.</p>
<p>The design choice of having separate processes for each vhost comes with another benefit: users (or customers) &#8220;owning&#8221; a vhost could potentionally be allowed to modify parts of the vhost&#8217;s configuration (excluding UID, GID, and other security-relevant options) on their own.</p>
<p><strong>Early status</strong></p>
<p>Right now pyttpd is in a very early planning stage, with no code to show yet. I am still in the middle of the process of writing down all ideas that come to my mind, weeding some out and documenting the others.<br />
So what do I have to show you then? Well, the the concept section of the <a title="Concepts (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts">documentation</a> is online now and I am planning on extending it in the next few days and eventually start writing code rather sooner than later.</p>
<p><strong>Your ideas&#8230;</strong></p>
<p>&#8230;and opinions are what I am really interested in. If you are interested in this project I would love if you got involved in some way. Feel free to create tickets at pyttpd&#8217;s <a title="pyttpd project @ code.sp-its.at" href="http://code.sp-its.at/projects/pyttpd">project page</a> if you have an idea you feel is worth adding or if one of my ideas is flawed, create a comment here or send me an <a title="send email to stephan at peijnik dot at" href="mailto:stephan at peijnik dot at">email</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How using proprietary software can affect system security</title>
		<link>http://blog.peijnik.at/2009/03/29/how-using-proprietary-software-can-affect-system-security/</link>
		<comments>http://blog.peijnik.at/2009/03/29/how-using-proprietary-software-can-affect-system-security/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 10:17:00 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[observations]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=66</guid>
		<description><![CDATA[There has been a lot of discussion on whether Free Software is more secure than proprietary software, but I have an additional argument that shows how the use of Free Software can improve system security.
Now you probably expect me to come up with a pure technical reason showing superiority of Free Software, but I am [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of discussion on whether Free Software is more secure than proprietary software, but I have an additional argument that shows how the use of Free Software can improve system security.</p>
<p>Now you probably expect me to come up with a pure technical reason showing superiority of Free Software, but I am taking another path this time: let&#8217;s talk about user trust.</p>
<p><span id="more-66"></span></p>
<p><strong>Software updates on pure Free Software operating systems</strong></p>
<p>Firstly, let&#8217;s take a look at how security updates are deployed on pure Free Software operating systems.<br />
All major GNU/Linux and *BSD distributions come with built-in update systems for all Free Software packages provided by the distribution. Once a security update to any piece of software is released you will get a notification saying updates are available and that you should install them and after doing so your system should be in a quite secure state.</p>
<p><strong>Updater-applications of proprietary software</strong></p>
<p>Okay, proprietary software does often come with its own update mechanisms, giving you pretty much the same functionality. But here is my point: users tend to block these updater-applications from accessing the network with personal firewalls and similar tools, which basically disables the updater and most likely will cause the system to be more vulnerable rather sooner than later.</p>
<p><strong>But why do people even consider blocking an updater-application? </strong></p>
<p>When I asked people why they blocked these applications a lot of reasons came up, but it usually boils down to lack of trust for proprietary software vendors. People seem not to trust software vendors for a variety of reasons. The most common reasons seem to be that they are either worried about the disclosure of private information or the lack of a license for a piece of software, combined with the first reason.</p>
<p>So people actually seem to be scared by what a piece proprietary software could do, and when not having their software licensed people seem to be even more scared. When I ask people why they are running these programs, even though they do not trust their vendors they usually shrug and I get replies that can be summed up as &#8220;it just works&#8221;, &#8220;but I don&#8217;t have a choice&#8221; and &#8220;I am used to software X&#8221;.</p>
<p><strong>The solution is Free Software</strong></p>
<p>Free Software can be a solution to all these problems. The most important thing people should be aware of that they do not have to fear Free Software vendors. After all, when using Free Software you do have a valid license and you can, at least in theory, check exactly a program is doing to your system. Also, if you are not capable of doing such checks yourself, you can rest assured that other people are doing such checks and give back to the project in question, improving your favorite Free Software applications.</p>
<p>Free Software is a choice, and there is hardly any proprietary piece of software which cannot be replaced by a free equivalent. Free Software is my first choice, not only for me but for my family too, with great results so far.</p>
<p><em>Rest assured you can trust in what your software is doing, free yourself today</em> &#8211; <strong>use Free Software</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/03/29/how-using-proprietary-software-can-affect-system-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>python-argvalidate 0.9.0 released</title>
		<link>http://blog.peijnik.at/2009/03/24/python-argvalidate-090-released/</link>
		<comments>http://blog.peijnik.at/2009/03/24/python-argvalidate-090-released/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 15:02:32 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[argvalidate]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=57</guid>
		<description><![CDATA[Even though I planned providing a release candidate first, which can be seen in the project&#8217;s Mercurial changelog I have released python-argvalidate 0.9.0 today. Tarballs can be obtained from the Python Package Index (pypi), as usual.

So what&#8217;s has changed compared to 0.8.2

Basically a lot of code has been rewritten or reviewed and modified. The most [...]]]></description>
			<content:encoded><![CDATA[<p>Even though I planned providing a release candidate first, which can be seen in the project&#8217;s <a title="Mercurial changelog between 0.8.2 and 0.9.0" href="http://code.sp-its.at/projects/argvalidate/log?action=stop_on_copy&amp;mode=stop_on_copy&amp;rev=23&amp;stop_rev=14&amp;limit=100&amp;verbose=on">Mercurial changelog</a> I have released <a title="python-argvalidate homepage @ code.sp-its.at" href="http://code.sp-its.at/projects/argvalidate">python-argvalidate</a> 0.9.0 today. Tarballs can be obtained from the <a title="Python Package Index" href="http://pypi.python.org">Python Package Index (pypi)</a>, as usual.</p>
<p><span id="more-57"></span></p>
<p><strong>So what&#8217;s has changed compared to 0.8.2<br />
</strong></p>
<p>Basically a lot of code has been rewritten or reviewed and modified. The most important change lies in argvalidate&#8217;s internals though.<br />
Instead of relying on Python internals, those are the<em> func_*</em> and <em>func_code.*</em> attributes of every function argvalidate uses another mechanism for obtaining the information about functions now, the <a title="inspect Module documentation @ docs.python.org" href="http://docs.python.org/library/inspect.html">inspect</a> Module. In short this means that argvalidate should be more resistant to possible changes in the format of these attributes, because the <em>inspect</em> Module that ships with Python should be changed accordingly and it is unlikely that its public interface is going to break.</p>
<p>Which leads me straight to the next point regarding argvalidate: the public interface. The most visible change was the deprecation of the <em>method_args</em>, <em>func_args</em> and <em>return_value</em> decorators. These decorators are still present, but will be removed in one of the next upcoming releases of argvalidate. The functionality of <em>method_args</em> and <em>func_args</em> has been combined into the <a title="argvalidate.accepts @ argvalidate 0.9.0 documentation" href="http://code.sp-its.at/doc/argvalidate/v0.9.0/argvalidate.html#argvalidate.accepts">accepts</a> decorator, whilst the <a title="argvalidate.returns @ argvalidate 0.9.0 documentation" href="http://code.sp-its.at/doc/argvalidate/v0.9.0/argvalidate.html#argvalidate.returns">returns</a> decorator replaces <em>return_value</em>.</p>
<p>accepts now includes some magic for automatically determining whether a function or method has been decorated. Initially the plan was on using inspect&#8217;s <a title="inspect.ismethod Module documentation @ docs.python.org" href="http://docs.python.org/library/inspect.html#inspect.ismethod">ismethod</a> function, which did not work out as when the decorator is called for methods the method has not been bound to the class yet and looks like a simple function to ismethod. However, the magic added checks the first argument&#8217;s name and decides that functions having either &#8220;<em>self</em>&#8221; or &#8220;<em>cls</em>&#8221; as their first parameter are methods, whilst everything else is a simple function.</p>
<p>There is more to say about <em>accepts</em>. Internally some checks which were done at every call to the decorated function in the past are now done only once, when the decorator is invoked. This should reduce the overhead argvalidate adds when the function (and thus the internal wrapper doing the checks) is called, but most likely will slow down decoration itself. However, decoration is only done once, whilst a function is likely to be called several times in its lifetime, which should give us an overall improvement of speed.</p>
<p>The <a title="argvalidate Documentation @ code.sp-its.at" href="http://code.sp-its.at/doc/argvalidate/v0.9.0/">documentation</a> has been updated accordingly and can be found at the usual place.</p>
<p><strong>What&#8217;s up next?</strong></p>
<p>There is no real further <a title="argvalidate roadmap @ code.sp-its.at" href="http://code.sp-its.at/projects/argvalidate/roadmap">roadmap</a> for argvalidate right now. No issues were left open, except for Python 3 <a title="ticket: Python3 compatibility meta @ code.sp-its.at" href="http://code.sp-its.at/projects/argvalidate/ticket/3">testing &amp; support</a>. Further releases are going to be made when needed, that is when you <a title="argvalidate: submit bug report @ code.sp-its.at" href="http://code.sp-its.at/projects/argvalidate/newticket">submit</a> a bug report and it is fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/03/24/python-argvalidate-090-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EuroparlTV for everyone? No, only for users of proprietary software!</title>
		<link>http://blog.peijnik.at/2008/09/18/europarltv-for-everyone-no-only-for-users-of-proprietary-software/</link>
		<comments>http://blog.peijnik.at/2008/09/18/europarltv-for-everyone-no-only-for-users-of-proprietary-software/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 11:19:55 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>

		<guid isPermaLink="false">http://espi86.wordpress.com/?p=44</guid>
		<description><![CDATA[The European Parliament (EP) has just recently started a new service: EuroparlTV. A web-TV service which should give citizens of the European Union (actually everyone around the world)  a way to inform themselves about how the EP works, what it does, and so on.
After I first read these news over at heise (german) I was [...]]]></description>
			<content:encoded><![CDATA[<p>The European Parliament (EP) has just recently started a new service: <a title="EuroparlTV homepage" href="http://www.europarltv.europa.eu/StartPage.aspx">EuroparlTV</a>. A web-TV service which should give citizens of the European Union (actually everyone around the world)  a way to inform themselves about how the EP works, what it does, and so on.</p>
<p>After I first read these news over at <a title="Europäisches Parlament startet Internet-TV" href="http://www.heise.de/newsticker/Europaeisches-Parlament-startet-Internet-TV--/meldung/116144">heise</a> (german) I was impressed, but started to fear that yet again some sort of government has invested in proprietary software and is able to bring its services only to users of such software. Seconds later my fears became reality.</p>
<p>EuroparlTV seems to work only for users of either Adobe&#8217;s proprietary <a title="Adobe Flash" href="http://en.wikipedia.org/wiki/Adobe_Flash">Flash player</a> (via the proprietary Adobe Flash file format) or users of Microsoft&#8217;s <a title="Windows Media Player" href="http://en.wikipedia.org/wiki/Windows_Media_Player">Windows Media Player</a> (via the proprietary <a title="WMV" href="http://en.wikipedia.org/wiki/WMV">WMV</a> file format).</p>
<p>What this means to an open web, that is usable for everyone, should be clear.</p>
<p>Basically this is a service all citizens of the European Union pay for, but some cannot use. Is this really how governments (and the EP is some sort of government) should treat their citizens? Rather not.</p>
<p>On the one hand the European Commission is fighting vendor lock-in and monopoles, but on the other hand it directly helps these vendors by creating such services. Not a smart move in my opinion, neither is it understandable.</p>
<p>What I am asking myself though is why the EP was unable to create such a service, which itself could be quite interesting, without having all users of that service use proprietary software?<br />
Is it so hard to deliver the service in a free (as in freedom), standardized format?<br />
I will let answering these questions to you, but keep in mind that there are alternatives to this whole proprietary mess, like <a title="Ogg" href="http://en.wikipedia.org/wiki/Ogg">Ogg</a>, which are completly free.</p>
<p>Personally I am pretty disappointed by this move. However, I hope that I at least informed people that there is a problem with EuroparlTV.<br />
Putting it simple and short this way the EP does a great deal with helping vendor lock-in whilst fighting the freedom of its own citizens. Even though it should be the other way round.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2008/09/18/europarltv-for-everyone-no-only-for-users-of-proprietary-software/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
