Archive for the ‘My Code’ Category.

Results, (Young) RewiredState, and Revolutionary Webapps

There’ve been quite a few interesting things that have happened me over the last week. Firstly, last Thursday, I finally (after 2 months of waiting), received my A-Level results – AAAA, in Maths, Chemistry, Physics and General Studies – so, I will definitely be going to Cambridge University in about a month’s time. Also, well done to everyone else who got their results, A-Level and GCSE, and good luck with your new colleges/universities.

Secondly, last weekend, I went with the rest of DFEY, to Young Rewired State -  an event to get young (~15-18) coders doing cool stuff with government data. Me, Joe and Richard worked on creating something to give bloggers opinions on the various bills currently going through parliment – Blog-o-tics. This uses Google blog search, and then does a manual count of predefined positive and negative words – as a result, it is heavily inaccurate, as our word lists were limited and language can be used in confusing ways (this is not *good* at all). I do plan on reworking blogotics to use a different, more reliable source of sentiment data at some point, but I’ve not got round to it yet.

The event it self rather good, and accommodation and travel costs were kindly provided. The venue used was Google’s UK offices, which was quite cool. The food was okay, not amazing, but much better than at 2morro (the other event DFEY attended this summer). The whole thing seemed quite well structured, each group had a mentor to help them along. I would very much like to thank Prem (who also blogged the event) for being our mentor. I don’t think our group would have managed to pull it all together without him.

Finally, this week I’ve be coding the innovative new Web2.0 app, pokebook. Which has just as much importance and relevance for the future web as its ad campaign suggests.

Web Apps, Revisited

Over the past few years, Web 2.0 has become all the rage. Closed web apps and social networking services, however have a serious problem – the user’s lack of control over their data, and their inability to interact well with other services. However, it is good to see that the “free software community” (for want of a better term), are increasingly starting to compete offering open Web Apps. Laconica/identi.ca, for micro blogging, libre.fm for music “scrobbling”, and most recently daisychain, which should soon be a facebook competitor.

However, the one thing I have not yet managed to find a good replacement for, is Google Mail (Gmail). To this end I have resurrected my long dormant libreapps project. I’ve got the site back up and running, and my two “Apps” functional – mail and rss.  Anyone interested in testing/evaluating these as they are should ask me for an alpha account (this is only to make sure no-one expects stuff to Just Work, and so I can keep track of resources), or if you’re adventurous, check out the source code (bit of a mess atm). The site is still in a very alpha, or even pre-alpha type state, but any feedback would be appreciated.

The RSS code on libreapps is TT-RSS (GPLv2) but the Mail code I have written myself, and had previously released as AGPLMail. Now, however, I have released it under the MIT license (the most permissive commonly used license there is). Why? Well, firstly, I’m no longer happy with using the governmental force of copyright to affect what people do with my code (see this blog post). Yes, I disagree with people not sharing the source to code they write, but I am not willing to threaten/hurt them to make them change their mind. This is a very contentious and political issue, but, there are other reasons why I think the AGPL is not as great as some claim.

Firstly, compatibility – this is the killer with any copyleft license. Because I am using TT-RSS, my core libreapps code needs to be at least as permissive as GPLv2. Since I plan to add other apps, most likely under other licenses, my core code needs to be permissive so it is compatible with all.

Next, how much “protection” of a Web App does the AGPL actually provide? It is supposed to force the release of the code of a hosted modified version. But, what defines modification? Or, rather, where. Obviously, changing one of the files of the application is modifying, but the (A)GPL is supposed to also cover linked works. But, with webapps, it is possible to make a site that behaves differently with out technically linking (eg. php include). One example I can see is an ajax script added to the main app (and source released)  could pull data from closed app, and the user experience would be the same. Also closed software could read/write to the db of the AGPLed software without technically being linked.

So, whatever the license of a web app, there are ways to change it and not return source. And, it is hard to prove anything, all that is returned to the user is html and js files – they can not be sure how they are generated. Returning source for AGPL apps relies partly on good will, something that also benefits an MIT app.

However, there is a more important point here. I would argue that it is not really the software that is the biggest issue in webapps – it is the data. Writing a twitter, facebook or other webapp clone is perfectly possible, and compared to some tasks, not that difficult. However, what really sets open web apps apart is primarily the availability of source, its the fact you can run your own copy and, crucially, communicate with the original site. The AGPL can do nothing to stop someone creating a large laconica instance with the federation turned off. A federatable twitter is many times better than one with source code released. (Interestingly, facebook actually releases some of their source code, but, for the reasons above, it is useless).

Finally, one of my other personal reasons for choosing MIT it means I get more users of my software I write (people can reuse snippets/functions in whatever they are writing, for example). True, someone could create a non-free fork, but, they would be silly to do so. For those who “hate freedom” there is Goole Mail/Apps. The main thing that makes libreapps mail valuable, is not the code itself, but the fact it is open/free.

So, that’s why I use MIT, even for Web Apps. However, it does really mostly boil down to my dislike for the governmental copyright system – the above are just reasons why I don’t feel like I’m missing much. I know many people don’t come from that angle, so AGPL makes sense to them. That’s fine. I’m happy to support any web app that federates and gives me access to source. I’m an identi.ca user, and am looking forward to trying daisychain. Hopefully though, people will now understand why I personally use MIT, and respect that.

Revisiting

Firstly, a couple of updates on recent posts – I gave up getting my new wifi to work upstairs, its just too frustrating. I’ve also had further problems with the fan on my downstairs computer. The new fan is larger than the previous one, and catches on the motherboard, causing the machien to overheat again. However, I think I managed to solve this problem by wedging some paper underneath the powersupply.

So, I’m on school holiday now, so I have the time to resurrect a couple of projects I started a while ago. The first is multistanza, my free version of ubuntu’s multiverse repo. Now that I run gnewsense, not having packages like vlc or mplayer in main or universe is becoming quite annoying. I rewrote a substantial part of my multistanza creation script, so that it doesn’t require root, and doesn’t accidently include the non-free povray. My rewrite should also make it easier to support multiple archectures, as I am now working out the package url and wgetting it, rather than relying on the system-specific apt-get cache. I am also using my new(ish) hosting to host a repository – multistanza.freedomdreams.co.uk – but I must be careful not to pull too much bandwidth. I wonder if the people at gnewsense would be willing to host it for me.

The other thing I’ve had another look at is my Freedometer. This is a program that will scan your system, tell you how free it is, and help you make it more free. I wrote some code for it a while ago, but never publicised it. What I’ve done recently is clean up the code a little, and build a proper website, so that I can publicise it to try to find other people to work on it with me. At the moment, its written in python and only works fully on debian based distrobutions.

Reaction testing and removing languages

So, I’ve done a couple of interesting code related thing recently. I’ve created a reaction tester which someone was asking for on the schoolforge mailing list. You can try it, or if you really want to download it. If anyone else finds it useful, uses it for anything, can think of any (not too difficult) improvements then I would love to know.

In other news, I tried to slim down my mediawiki installation (used mainly for ADFA wiki) by removing language files, but seemed to get an error:

Warning: preg_match() [function.preg-match]: Empty regular expression in /path/to/wiki/includes/Linker.php on line 1259

Turns out the error was unrealted, and I got rid of it simply by clearing the cache DOH (add &cached=no to the end of the url). I’m not sure what was causing that though. Its supprising though, after actually deleting the unwanted language files, I managed to free up 19M of disk space. Quite a bonus when my account only has 50M of space! The moral of the story is, check something is working before trying to improve it.

Multistanza and Medibuntu

Note: If you just want to look at my bash script and related text files (without packages), you can download them here.

Following from my last post, I decided that the best way to try and solve this issue would be to create a free-multiverse repositroy. To do this, I hacked together a bash script that would compare sid-main with ubuntu-multiverse (using packages lists I downloaded manually and removed the headers from) and pull any of the packages that overlapped between the two. I also got it to read an extras file, for packages that are in multiverse but not sid main, but yet are still free.

So, I now have a demonstration free-multiverse (which I call multistanza). This is currently hosted on my own pc, so will dissapear at night. If you are interested, try this link. compare.sh is the main script and the repo an be added as “deb http://bjwebb.homelinux.com:81/multistanza/ binary-i386/”. I will look for some off site hosting if I decide to pursue this further. If anyone does use my repo, I suggest using it in conjunction with medibuntu (see below).

But, the question is. Is this the best way to pursue this? What I’ve done so far has been no loss to me, because I’ve learnt some more bash scripting; but it is only worth continuing if my new repositry will be of use to other people. Thus, it would be a good idea to know if this has been done already. As far as I know, it hasn’t quite been done the way I want it. However, there is medibuntu, which contains packages not allowed in ubuntu, and is separated nicely into free and non-free. In fact, since I have the repo added, some of the apps get pulled from medibuntu instead of my repo. Unfortunately, not all the packages in medibuntu are as new as the ubuntu ones (hence why my repo and medibuntu could be complimentary) and some are not there at all (vlc for example).

So, I think that the best and most consitent way of having a free “extras” repo, and to avoid duplication of effort, would be for medibuntu to offer all of the free packages in multiverse in their free repository. I think this would fit in with their goal, but I’m not sure if they’d agree. I will contact them about this issue, and see where to go from there.

Firefox Theme Mod

This is the beauty of freedomware, you can take it into your own hands and make it how you want.

I was using the theme Midnight Fox, but due to my dark kde theme, the history and autocomplete box were unreadable. Nevermind though, after reading an easy tutorial on editing themes, I was able to fix these problems myself. I’m uploading it here just in case anyone else finds it useful.

Note: If your setup is not similar to mine, with a dark system wide theme, it will probably look even more broke than the original.