Planet #LUGRadio

yonkeltron

Languages, platforms, paradigms and speed

Ever since the latest round of Ruby benchmarks came out and everyone got all excited, I got to thinking about the overall discussion about languages and the interpreted vs. compiled debate. To be fair, there will always be those who take a specific side for some small-but-important-to-them reason yet this has not stopped so many projects from bridging the gap, albeit with varying degrees of success. In many instances, it comes down to the different approaches taken by various language themselves and the payoffs they offer.

In my investigation, I came across some very enlightening sources of information on the overall discussion of language speed, code optimization and the tension between different paradigms. Please peruse the following:

Something missing from this list?

July 03, 2009 02:13 AM

aquarius

Not blocking the UI in tight JavaScript loops

Everyone’s written a JavaScript loop that just loops over all the {LIs, links, divs} on a page*, and it’s pretty standard. Something like

var lis = document.getElementsByTagName("li");
for (var i=0; i<lis.length; i++) { // yes this could be more efficient, don't care
  // do something here to lis[i]
};

or, if you’re using jQuery:

$("li").each(function() {
  // do something here to this
});

This is problematic if there are, say, 2000 LI elements on the page, and what you’re doing in the loop is semi-intensive (imagine you’re creating a couple of extra elements to append to each of those LIs, or something like that). The reason this is a problem is that JavaScript is single-threaded. A tight loop like this hangs the browser until it’s finished, you get the “this script has been running for a long time” dialog, and the user interface doesn’t update while you’re in this kind of loop. You might think: aha, this will take a long time, so I’ll have some sort of a progress monitor thing:

var lis = document.getElementsByTagName("li");
for (var i=0; i<lis.length; i++) { // yes this could be more efficient, don't care
  // do something here to lis[i]
  progressMonitor.innerHTML = "processing list item " + i; // fail
};

but that doesn’t work. What happens is that the browser freezes until the loop finishes. Annoying, but there it is.

One approach to getting around this is with timeouts rather than a for loop.

var lis = document.getElementsByTagName("li");
var counter = 0;
function doWork() {
  // do something here to lis[i]
  counter += 1;
  progressMonitor.innerHTML = "processing list item " + counter;
  if (counter < lis.length) {
    setTimeout(doWork, 1);
  }
};
setTimeout(doWork, 1);

so you move the bit of work you need to do into a function, and that function re-schedules itself repeatedly, using setTimeout. This time, your user interface will indeed update, and your progress monitor will show where you’re up to. There are a couple of caveats with this: it’ll take a bit longer, and you’re no longer guaranteed to have things processed in the order you expect, but they’re minor issues.

For doing this in jQuery, a tiny plugin:

jQuery.eachCallback = function(arr, process, callback) {
    var cnt = 0;
    function work() {
        var item = arr[cnt];
        process.apply(item);
        callback.apply(item, [cnt]);
        cnt += 1;
        if (cnt < arr.length) {
            setTimeout(work, 1);
        }
    }
    setTimeout(work, 1);
};
jQuery.fn.eachCallback = function(process, callback) {
    var cnt = 0;
    var jq = this;
    function work() {
        var item = jq.get(cnt);
        process.apply(item);
        callback.apply(item, [cnt]);
        cnt += 1;
        if (cnt < jq.length) {
            setTimeout(work, 1);
        }
    }
    setTimeout(work, 1);
};

and now you can do

$.eachCallback(someArray, function() {
  // "this" is the array item, just like $.each
}, function(loopcount) {
  // here you get to do some UI updating
  // loopcount is how far into the loop you are
});

$("li").eachCallback(function() {
  // do something to this
}, function(loopcount) {
  // update the UI
});

Not always a useful technique, but when you need it, you need it.

July 03, 2009 12:55 AM

popey

UDS Karmic Videos and HTML5 Goodness

I noticed that the videos from the most recent Ubuntu Developer Summit are now online, and thought I’d have a play with the new embedded HTML5 video stuff in Firefox 3.5.

Rather than view all the videos by downloading them individually I thought I’d make a page where I can view them all sequentially.

Here is the html I threw together. Guess it will look rubbish in anything but Firefox 3.5. Of course that’s no guarantee it will look any good in Firefox 3.5. Just, y’know, you’ll see the videos :)

July 02, 2009 11:25 PM

neuro

TechCrunch Has Disgraced Mrs. Slocombe’s Pussy

Dear oh dear. The well-loved and well-respected actress Mollie Sugden has died, aged 86. In tribute to Ms. Sugden’s most famous character, Mrs. Slocombe, and to the constant running jokes about her pet pussy cat Tiddles, Jonathan Ross sent out a tweet encouraging one and all to use the Twitter hashtag #MrsSlocombesPussy in their tweets. Unbelievably rude, but also staggeringly apt! However, Twitter has decided (perhaps algorithimically) not to display search results for that hashtag: that, in and of itself, is somewhat disappointing. The hashtag became so immediately popular it appeared in Twitter’s list of trending topics, dominated in recent days by topics like Michael Jackson, and Glastonbury.

What’s more disappointing, however, is how US technology gossip blogs TechCrunch and Mashable dealt with this information. They considered it an attempt to poison the trending topics list with spam, neither bothering for an instant before publication to check and see if perhaps it was legitimate in some way.

Both sites have since been put right by blog commenters, and they’ve updated their posts to reflect that, but their knee jerk reaction was to condemn the tag as spam. $deity forbid that a territory outwith the US with a better sense of humour, and with less instinct to consider mild double entendres as nasty in some way, would gather up the power to invade the hallowed Temple of Twitter’s Trending Topics.

The blogs’ concerns were that the system could be gamed, but are we saying that those clicking through the trending topics list are stupid, and can’t tell the difference between targeted spam, and legitimate trends?

July 02, 2009 11:13 PM

sheepeatingtaz

Twitter Updates for 2009-07-02

  • http://twitpic.com/8yrx6 I say mummy, Hannah says <grin> #
  • Quick #lazytweet – should I watch Superman returns or Mock the week? #
  • did 20 press ups and 20 sit ups yesterday. Today, I need a wheelchair and a stairlift. #
  • Hugs #python for making things easier #
  • Has attained a whole new level of awesome #

Powered by Twitter Tools.

July 02, 2009 11:00 AM

sheepeatingtaz

Twitter Updates for 2009-07-02

  • http://twitpic.com/8yrx6 I say mummy, Hannah says <grin> #
  • Quick #lazytweet – should I watch Superman returns or Mock the week? #
  • did 20 press ups and 20 sit ups yesterday. Today, I need a wheelchair and a stairlift. #
  • Hugs #python for making things easier #
  • Has attained a whole new level of awesome #

Powered by Twitter Tools.

July 02, 2009 11:00 AM

sheepeatingtaz

Twitter Updates for 2009-07-01

  • got horrible trapped wind. without the trapped. #
  • debating whether to get breakfast, knowing full well as soon as I do, Hannah will wake up. #
  • http://twitpic.com/8xiup no daddy, no breakfast for you! #
  • Needs something to do while mother & baby do their daytime tv routine. #
  • Re-watching last week's top gear, Lisa spotted The Stig photocopying his head! :-D #

Powered by Twitter Tools.

July 01, 2009 11:00 AM

sheepeatingtaz

Twitter Updates for 2009-07-01

  • got horrible trapped wind. without the trapped. #
  • debating whether to get breakfast, knowing full well as soon as I do, Hannah will wake up. #
  • http://twitpic.com/8xiup no daddy, no breakfast for you! #
  • Needs something to do while mother & baby do their daytime tv routine. #
  • Re-watching last week's top gear, Lisa spotted The Stig photocopying his head! :-D #

Powered by Twitter Tools.

July 01, 2009 11:00 AM

sheepeatingtaz

Twitter Updates for 2009-06-30

  • now needs a new network card too. Looks like frankenstein's monster is dying :-( #
  • thinking about going to sit in the fridge #

Powered by Twitter Tools.

June 30, 2009 11:00 AM

sheepeatingtaz

Twitter Updates for 2009-06-29

  • Right, that's it. I need new hosting. I don't mind whether it's a VPS or shared, as long as I can run up-to-date django apps (python >=2.5) #

Powered by Twitter Tools.

June 29, 2009 11:00 AM

sheepeatingtaz

Twitter Updates for 2009-06-29

  • Right, that's it. I need new hosting. I don't mind whether it's a VPS or shared, as long as I can run up-to-date django apps (python >=2.5) #

Powered by Twitter Tools.

June 29, 2009 11:00 AM

GingerDog

Timberhonger 10k Race - June 2009

I came 29th - with a time of 42 minutes 50 seconds - it was pretty hot, and I was therefore quite pleased with my time - which was better than last year.

thanks to the organisers; more info here

June 29, 2009 06:38 AM

neuro

2009-06-29: neuro’s Tweets from Last Week

  • Watching Hantuchova v Robson, blissfully free from shrieks and grunts #wimbledon #
  • A very promising seniors debut from Laura Robson, hopefully she'll have more confidence next year #wimbledon #
  • RT @stephenfry: One of my all time heroes Alan Turing was born today 1912! Find out more here: http://www.bletchleypark.org.uk #bpark #
  • Tonight there's gonna be a(n iPhone) jailbreak, somewhere in this (unlocked) town! #redsn0w #ultrasn0w #
  • iPhone now says "T-Mobile" at top left of screen … ah, sim unlocking is fun! #ultrasn0w #
  • Jeff Goldblum death reports sourced from fake news site; if you're at mediafetcher.com change name at start of the URL! #
  • BBC News just trotted out their old hackneyed "give us a sense of … " question, can we get some real journalism on the go please? #
  • BBC News: "[Michael Jackson's] 50-date tour, which will now of course not happen", really?! #
  • RT @demonbaby: If you have any doubt left that Perez Hilton is a worthless shitbag, let me fix that for you: http://twitpic.com/8et2f #
  • RT @demonbaby: Show the world you value culture, taste, and intelligence, not mindless hateful garbage: #unfollowperezhilton – RT this! #
  • shops on a friday, mental :P – Photo: http://bkite.com/08VFk #
  • BBC on Andy Murray: "An hour and thirty minutes of controlled brilliance" #wimbledon #
  • Requesting an invite for Tweetboard Alpha (http://tweetboard.com) by @140ware, for my site: http://neuro.me.uk #

June 29, 2009 01:41 AM

tonytiger

Teeching Me A Lesson

Yesterday I went to see the second of two performances of “Teechers” by John Godber at the Oasthouse Theatre in Rainham. The play was being performed to raise money for Jenny’s trip to Ecuador. She assures me that this isn’t just a holiday, but that she’s going to help teach young children. More importantly, it was an opportunity to see three very good friends of mine acting. It’s been a long time since I’ve seen Chris performing, I’ve never seen Jenny in as big a big part and I’ve never seen Heidi perform in a play at all! It was all very enjoyable and hopefully raised some cash to help swell the charitable coffers. Particularly impressive was that the cast of three brought to life about twenty different characters, which was an excuse for some particularly tongue-in-cheek performances which I’m sure would be recognisable by anyone who has worked in education. Not, I should add, just characterisations of students, either. It was certainly fun to see some classic silly voices be wheeled out for some of the smaller characters.

The Teechers cast

The Teechers cast

The programme for the play was also special, as I had taken the cast photos for it. It was, pretty much, my first commission, albeit not a paid one! The session, which was a couple of months ago now, was fast and fun, but I learnt the same lessons as Graham “codedragon” Binns did recently shooting outside in strong direct sunlight. Although I did have a reflector, there wasn’t time to use it as effectively as it could have been. This was because I was rushing. (To be fair, there wasn’t much time, we all had other appointments to make.) I shot lots and hoped they would be OK, rather than taking a bit longer to ensure the shots were set up properly. So I learnt some important lessons and am looking forward to the next time a similar opportunity arises.

I gave a CD with the JPEG versions of all the image to the cast with a list of of images I recommended, although I was doing so without knowing the context of the play. It was therefore quite interesting to see the ones that they selected for use; on the programme covers, a centre-page scrapbook montage and for each character (not cast) biography. (The image above is the one they picked for the poster.) It was surprisingly gratifiying to see photos I had taken all over the programme.

I also won a bottle of wine in the raffle. Having previously scoffed at the auction of cakes and comestibles at other AmDram productions, I am now convinced by this activity and will petition the National Theatre to follow suit. I want to see Trevor Nunn giving away Blue Nun forthwith!

June 28, 2009 09:33 PM

sheepeatingtaz

Twitter Updates for 2009-06-28

  • http://twitpic.com/8lmte – @spudulike yeah, I'm sure :-) #
  • new blog ready to go, both engine and content wise. Just need to do the styling and deployment. Maybe tomorrow. #
  • has woken up at 0530 for a feed. No-one has informed the baby though, who is still asleep. #
  • am trapped by baby and cat. they seem happy, but I want a cup of tea. #
  • Is probably going to have to move away from @dreamhost, as their system is too old. #
  • attempting to install a local version of gcc on shared hosting. I sense this isn't going to end well #

Powered by Twitter Tools.

June 28, 2009 11:00 AM

sheepeatingtaz

Twitter Updates for 2009-06-28

  • http://twitpic.com/8lmte – @spudulike yeah, I'm sure :-) #
  • new blog ready to go, both engine and content wise. Just need to do the styling and deployment. Maybe tomorrow. #
  • has woken up at 0530 for a feed. No-one has informed the baby though, who is still asleep. #
  • am trapped by baby and cat. they seem happy, but I want a cup of tea. #
  • Is probably going to have to move away from @dreamhost, as their system is too old. #
  • attempting to install a local version of gcc on shared hosting. I sense this isn't going to end well #

Powered by Twitter Tools.

June 28, 2009 11:00 AM

sheepeatingtaz

Why should I run my own site?

I’ve been doing some tinkering on my site this morning, and I’ve just come to the realisation that I am now sure why I run my own domain any more. The only reason I can think of is to keep some sort of online identity.

I haven’t bloggied (apart from this, of course) in months. I use twitter instead, as most of what I want to say can be summarised in 140 Chars.

I don’t use any of the photo galleries I set up as Facebook/Flickr/Picasa all work so much better

Lugradio shut down a year ago (although I still get a lot of traffic on this)

I did run a site for my Mother-in-Law’s dance school, and I have just found out that it doesn’t even work anymore!

I need to either resolve to do more on the site or get shut. My problem is my attention span. For example, I have decided to re-do the dance school site. I have also decided to do it in django. I strongly suspect that this will go out of the window, as I’m looking after Hannah on my own for the first time in the afternoon/evening and I reckon this will re-shape my priorites. Again.

June 27, 2009 12:49 PM

sheepeatingtaz

Twitter Updates for 2009-06-27

  • eating Ben & Jerry's while playing with django #
  • Needs a desk #
  • Going to try and install django on dreamhost. Time for a redesign of boothferrydancentre.com #
  • my website has done ~15GB of traffic in the last month. Wow. #
  • !ubuntu @netbeans !python !django failure – crazy python paths added #

Powered by Twitter Tools.

June 27, 2009 11:00 AM

jono

Tracking Ubuntu Community Issues

Recently Melissa wrote a post about how we track problems with community, and how she feels that blogging about community problems is a reasonable approach. As part of her post she says:

Blogging about problems we see in our community should be seen as a good thing, not a bad thing. Why? Because this blogging is action. The alternative is no action, and that is much worse.

Firstly, I entirely agree with Melissa that we need a better way to track issues with community, which I will get to a little later in this post. While blogging has become a tremendous tool in online communities and enabled community members to have a platform in which to share their opinions, ideas, perspectives and achievements, I don’t feel blogging is the most suitable means of tracking community issues, improvements and regressions.

Blog entries are single shot capsules of feedback, wisdom and opinion ejected onto the Internet and often aggregated in places such as Planet Ubuntu. They are typically highly personalized, lurking in personally-driven locations (such as a homepage or personal blog), have no facilities for applying status, assignment, milestones or priority, provide little or no means to subscribe to specific problems, and lack facilities for communicating when a problem has been solved: if the issue is resolved the blog is sometimes updated and sometimes not.

While a blog entry can express a concern about something, they are not really useful for finding solutions to the problem. Notification of a problem is one tiny element in the issue-tracking process and although blogs can indeed be used for this, it is equivalent to asking your neighbour to move his car by opening your window and yelling out through a loudspeaker. Aside from more elegant and better directed methods of communicating that a problem exists, we ideally want to attach problem-solving capabilities to the reporting of an issue: I care only a small amount about hearing the problem, what I am really interested in is collaborating with that person and others in trying to find a solution. Blog entries are not really cut out for that kind of collaboration.

Bugs are though.

Bug reporting systems were designed to allow people to collaborate around defects in software and include facilities to identify, track, prioritize, milestone, subscribe and share information. Although everyone complains about bug reporting systems, they are generally productive in finding problems, developing solutions and having visibility over the lifespan of a problem.

I think it could be useful for us to use Launchpad for filing bugs for community, process and governance issues. To this end I have registered the Ubuntu Community project in Launchpad which we can use for tracking these kinds of bugs. There are some benefits to this:

  • Visibility - this is going to help everyone keep visible on community issues. On a slightly selfish note, this will also help me keep visibility over issues for me and my team at Canonical. This should mean more bang for your buck with your friendly horsemen.
  • Tracking / Triage - this will make tracking, prioritization, feedback and potential milestoning much easier.
  • Assignment - this improved visibility will help us assign bugs better to the right people.
  • Familiar - many of us live and breath bug reports: the interface is part of the furniture. No new systems to learn, no random blog entries to keep an eye on.

Before I wrap up, there is one simple caveat here. I have literally just set up the project this afternoon and we will need some documentation, guidance and best practise written and shared around these bugs, and this will take a little while to be developed. As such, you may have some questions which we will need to document the answers to over the coming weeks. In the meantime we can work with existing bugs and file new bugs there. Feedback on this is of course welcome!

June 27, 2009 12:59 AM

grifferz

Web developers who don’t understand how email works

More annoying that companies who don’t believe ‘+’ in an email address is valid, are ones that did until their site got redesigned, leaving you unable to log in and having to explain the problem to people that can only read scripts. I’m looking at you, MBNA.

Update:

  CustomerService@MBNA.co.uk
    SMTP error from remote mail server after RCPT TO:
    <CustomerService@MBNA.co.uk>:
    host mbna.co.uk.s7a1.psmtp.com [64.18.6.14]: 554 No
    relaying allowed - psmtp

Update:

From: autoreply@customerservice.mbna.co.uk
Subject: Customer Service Reply

Thank you for replying to this email.

Any emails sent to this inbox are not
responded to. If you have a query about
your account please check your account
details online.

June 26, 2009 11:53 PM

aquarius

Why not to use domain sockets for a desktop CouchDB

The obvious idea that pops into everyone’s head, including mine, when talking about having a running CouchDB that’s specific to me is: why use TCP for it? Why not just use a unix domain socket? Then you don’t have to worry about other people on the same machine trying to access it. Everyone thinks this, and on balance it’s not the way to go. This is why.

  1. You can’t browse to a unix domain socket in your web browser. This, by itself, is enough to kill the idea for me. I genuinely love the idea that applications store their data and then I can see that data in my browser using Futon, the CouchDB web UI. I can edit that data. That’s fantastic. Using unix sockets would break that.
  2. One other nice thing about CouchDB is that you can do replication between two different databases; I like this because I can have the same data on my laptop and my netbook if I want. That doesn’t work if you use domain sockets, because the two CouchDBs can’t see one another.
  3. As far as I can tell, Mochiweb, the underlying Erlang HTTP library that Couch uses, doesn’t do domain sockets anyway. (Obviously fixing this is only a Small Matter Of Programming.)

This has been a public service broadcast on behalf of the Write These Reasons Down So I Have Them To Hand Next Time Someone Suggests Unix Domain Sockets party.

June 26, 2009 09:47 AM

jono

VMWare: Rock and Roll

In a world where most companies would give their hind teeth to get your email address into their marketing database, it was refreshing to see this from VMWare:

Thank you for your past interest in VMware. As part of our routine scheduled maintenance, we will be removing email addresses and associated subscription information from our marketing database for contacts who have not updated their profile and/or subscription preferences within the last 6 months.

If you would like to remain on our mailing list and wish to receive updates on news, specific solutions, offers and much more, then please update your current profile.

This is great: it clearly states that if you are not engaging with VMWare, they won’t spam you. Good work. Let’s see more of this from other companies.

June 25, 2009 12:34 AM

Cillian

Jentoo/wista fun

A while back, I decided it would be a good idea to dual boot my laptop with gentoo and vista.  All went fairly well, never used linux much, because rebooting’s a pain. I was bored a minute ago, and wondered if I could make the same linux install work in a virtualbox VM.  A bit of [...]

June 25, 2009 12:05 AM

tonytiger

We should eat lots of pasta before recording

Despite my best intentions, it’s been a while since I posted here. Last time it was to shamelessly shill the latest editions the Ubuntu podcast from the UK LoCo team. This post may not be significantly different as it seems most of the trivia of my day is increasingly dissected and distributed on twitter and identi.ca. Not that I ever intended this blog to be a log of thoughts of the calibre frequently shared via twitter and the like, but it seems I don’t feel the need to write long missives any more. (Although there may well be one about ISPs on the way. Watch this, erm, site.)

Episode 7 of Season 2 of our little podcast has hit the (community donated) mirrors this evening and is already sneaking its way onto all manner of computers and portable media playing devices around the world.This episode features an interview with the executive director of the Open Rights Group, an organisation of which I am a supporter, Jim Killock. Unfortunately the output from the phone interface was very low during the interview, which I didn’t really notice at the time. (We use a digital output from the desk into the laptop which records the show, so I should have just brought everyone else down to the same level then boosted the whole lot in the mix.) But despite a shed-load of compression, I wasn’t able to iron out the difference satisfatorily. At least for me. Technicalities aside it was good to catch up with all the latest campaigns that ORG is working on.

It is always exciting when we release an episode to see the first few hundred downloads hit the logs in a couple of hours. It feels to me that we’re hitting our stride with the new series and format now. We regularly record over an hour of material in two hours. The secret is in the preparation. It’s also in the concentration; our biggest slips have happened when someone has drifted off for a bit. The downside of hitting some kind of stride is that is feels like we’ve been doing it for a while. I feel like we’re half way through the season already, when realistically we’re only one third of the way in. Podcasting is a marathon, not a sprint, maintaining pace without burning out is the key. That’s one of the good things about doing a fornightly show; you get almost an entire week off between episodes. (We keep and eye on the website and news stories betweentimes of course.) At the moment we’re using that “time off” to tweak some of the systems behind the scenes. This has involved upgrading Wordpress and various plugins, patching podcoder and so on.

So, please download the show and listen. A lot of work goes into it. If you like it, or dislike it, please send us feedback through the various routes given on the website.

June 24, 2009 09:00 PM

jono

Ubuntu Free Culture Showcase Deadline Draws Near

Just a quick note to you lovely folks that the Ubuntu Free Culture Showcase, a competition to have your audio, video or imagery included on millions of Ubuntu systems, has it’s deadline drawing near on 16th July 2009. If you know some creative types who you think would love the opportunity to have their art on all those delicious Ubuntu systems, point their beady eyes in the direction of this page and tell them to get cracking. :-)

Also, thanks to our friends at the Creative Commons for blogging the competition.

June 24, 2009 02:03 PM

jono

Learn How To Run a Jam

Recently we announced to epic Ubuntu Global Jam that is set to go down from 2nd - 4th Oct 2009. In this event hundreds of Ubuntu fans and contributors get together in their local area to work on Ubuntu, get to know each other and just have a big ‘ol barrel of fun. With the scheme recently announced we are still building up the list of events and are looking for you wonderful people to start organizing events. Sound interesting but don’t know how?

Well, I have good news.

We have organized a number of tuition sessions and events that will help you get started organizing a rocking Ubuntu Global Jam event. Here’ the skinny:

  • Live Video Tutorial - Mon 29th June @ 6pm UTC - I will be hosting a live video tutorial with a live Q+A. You can watch it here.
  • IRC Tuition - Jorge Castro will be running some IRC tuition sessions on these dates:
    • June 27 - 1500UTC - #ubuntu-classroom
    • Sept 4 - 2100UTC - #ubuntu-classroom
    • Sept 18 - 1500UTC - #ubuntu-classroom

So there you have it, a good solid toolkit for how to get started. Go learn, organize and have a great time. If you need further help, be sure to ask the rather nice folks in #ubuntu-locoteams on Freenode. :-)

UPDATE: I have needed to re-schedule the video tutorial until Monday 29th June 2009 at the same time (6pm UTC).

June 24, 2009 05:58 AM

Bryn_S

Yma o hyd || Still Here

Mae hi wedi bod peth amser ers i mi gwastraffu eich amser gyda helyntion beth sy’n digwydd yn fy mywyd i,

Yr un hen esgusodion sy’n dod gen i, ond y gwir ydi mai bod yn ddiog a diffyg syniad iawn o beth i ysgrifennu sydd wedi achosi i mi peidio mewn-gofnodi i’r blog ‘ma. O do, dwi wedi bod i ag o bron pob gornel o’r wlad ma (blaw am Cernyw… dim bod fi’n cwyno). Y gwir yw, dwi’n gweld hi llawer yn haws gyrru neges i Trydar nag i eistedd lawr a ysgrifennu rhywbeth sylweddol.

Fod bynnag, gwnâi’n gorau i peidio anwybyddu’r gwefan bach ‘ma. Os rhywbeth, mae’n rhoi cyfle i mi ceisio ail-afael ar ysgrifennu yn y Gymraeg. (Mae’n wir ddrwg gen i am unrhyw gwallau gramadeg a sillafu… dwi heb ysgrifennu’n iawn yn y Gymraeg ers bron i 8 blynedd).

Hwyl am y tro!

It’s been a while since I’ve wasted all of your time with the trivialities of what’s going on in my life.

It’s the same old excuses I have, but the truth is that it’s lazyness combined with a complete lack of any idea about what to write that’s kept me from logging into the blog. Oh sure, I’ve been to nearly every corner of the country (Except for Cornwall… not that I’m complaining about that). The truth is, I find it a lot easier to send a message to Twitter than sit down and write something substantial.

In anycase, I’ll endevour not to ignore this little website. If anything, It’ll give me a chance to restart writing in Welsh. (As a note, I truly do appologise for any spelling or grammar errors… it’s been nearly 8 years since I’ve written properly in Welsh).

Bye for now!

June 23, 2009 09:12 PM

GingerDog

Go away spammers

Since I've been messing around with this drupal site, and upgrading/downgrading etc, I seem to have lost my spam protection/armour. Since Saturday, the approval queue today (48 hours later) contained 1500+ comment spam things.

Like FFS... I know you're not reading this M[rs]{1} Spammer, but really - just don't bother trying. I won't let you get through.

I've now installed some ASCII art anti-spam stuff, hopefully this will work better than whatever chocolate teapot there was before.

DELETE FROM comments WHERE status = 1

June 22, 2009 02:05 PM

GingerDog

iphone hippy geek freak

On Friday, I bought an iphone 3gs, it comes with a 24 month sentance to pay o2 a load of money.

On the positive side of things ....

  • It's easy to use and has an excellent UI
  • Great for passing the time
  • Using Trails I can log where I run/walk etc, so perhaps I'll finally be of some use to OpenStreetMap (e.g. I logged Sunday's run which gave me times/speeds/elevations etc)
  • Means I'm no longer ever away from work (is this good?)
  • It's dead easy to take and upload pictures to the internet (flickr, facebook, email etc etc)
  • It can also take and upload videos (youtube) in one simple motion
  • It's very easy to install additional stuff (e.g. Twitterific, Bejewlled 2, Fring, Simcity, SpaceX, BBC Iplayer, Skype, Remote, Sudoku, Traffic Info and other crap).
  • It supports even my mail server configuration with no issue

Bad points :

  • Cost
  • Apple Monopoly++
  • Can't run stuff in the background (e.g. I can't keep an instant messenger running while browsing the web)
  • Battery life - it will last a day... but if you plan to watch video on it for more than a few hours, or spend sometime browing the web - you'll probably need a charger)

Not sure about :

  • Voice commands - it started dialling a taxi company when I asked it to phone Kat....

June 22, 2009 01:56 PM

neuro

2009-06-22: neuro’s Tweets from Last Week

  • catching up with The Apprentice, managed to not watch any after wk 4, and have also managed to avoid the result! no spoilers! #apprentice #
  • downloading iPhone OS 3.0 and updating now … one of these days apple will release at 00:00 PDT rather than waiting til 10-11am #iphone #
  • Just listened to Sleeper, "Smart" for the first time in ages. Took a minute reminiscing about buying it on tape from Byres Road Fopp in 1995 #
  • Rapidly coming to the conclusion that the world doesn't want me to succeed in life. Hopefully some Crystal Method will assuage that feeling. #
  • Barr's Limeade helping. #
  • Corona cerveza para la ganar #
  • You never quite twig how fast your network is until you have to rely on a secondary local nameserver while your primary is down … #
  • iTunes DJ is now playing Röyksopp for me. All is well with the world again. And, melt. *sigh* #
  • RT @capn_b: LOL: "Apple is kind of like scientology but with gadgets." #
  • Talkin' sweet about nothin'. Cookie, I think you're TAAAAAAAAAAAAAAAAAAAAAAME! TAAAAAAAAAAAAAAAAAAAAAAME! #pixies #
  • Some say he knows Megan Fox's mobile number, and that he eats polystyrene and superglue for lunch. All we know is, he's called #thestig #
  • The Guardian is using crowdsourcing to rattle through over 262000 pages of MPs expenses and make them readable/searchable http://is.gd/15sQl #
  • finally getting round to listening to the new ISIHAC http://is.gd/16fj4 … liking stephen fry so far, but missing humph terribly #
  • RT @jenny_ricks: Worst Daily Mail poll ever. Vote yes to skew the results and pass it on http://bit.ly/16uEaD #
  • We're up to 93% YES 7% NO on the Daily Mail gipsies NHS poll http://bit.ly/w4b6Q … go on, VOTE YES to wind up Mail readers #voteyes #
  • It's 10 to 5. I want beer. #
  • Gipsie poll dead but: RT @Glinner: Vote NO and tell the Daily Mail we love our wheelie bins, even if we actually don't! http://bit.ly/1kFYK #
  • Setanta loses Premiership TV rights http://is.gd/16FYT Setanta can't have much life left in them now; I wonder where the SPL rights will go? #
  • Some say when his identity is almost revealed, he morphs into another human form to avoid detection. All we know is, he's called #thestig #
  • Nom nom – Photo: http://bkite.com/08Iqn #
  • Settling in to watch Lethal Weapon on itv1 … ooh, it's the director's cut! #
  • Hmm, just realised, not the director's cut of Lethal Weapon. At least it's not cut, eg "let's get the funsters", "this is a real firing gun" #
  • my nana just told me to shave my beard off because it's going grey … #
  • Jeremy Clarkson has just given us a hint of what's to come this series on #topgear and holy crap it looks all kinds of awesome! #
  • OUT OF MY WAY, FRENCHIST! #topgear #
  • It's a shame Jalopnik outed the apparent identity of #thestig on #topgear instead of just shutting up for a few days #
  • Over at my folks, using iplayer to watch top gear cos they're watching some guff on bbc 1 – Photo: http://bkite.com/08KVv #
  • Saw that ending coming … roll on next week's show at any rate! Top stuff! #thestig #topgear #

June 22, 2009 01:41 AM

grifferz

Some harsh realities

Recently BitFolk has been accused of overcharging for disk space.

In general I don’t try to defend BitFolk’s price-point - the unmanaged VPS hosting market is flooded and it is very easy to find stuff hosted out of the US or continental Europe for just a couple of pounds per month. Clearly I am not going to try to compete on price alone, yet BitFolk does sit firmly towards the cheap end which I feel is fair given that there isn’t a 24-hour team of support persons in nice business premises.

This particular complaint however seems to stem from the perception that “disk is cheap.” Well, yes, it is fairly cheap. That’s why we sell it at the “fairly cheap” price of £6/5GiB/year (10p/GiB/month), with no VAT added on top. Just because you can buy a 1.5T consumer hard drive for about 9p a gigabyte doesn’t mean that you should expect to find 1GiB of usable disk space on a server in a decent datacentre for anywhere close to that figure!

I try to keep costs down by using a configuration based around 4×7.2kRPM 3.5″ SATA disks with hardware RAID. I would dearly love to have a nice shared storage solution with 10 or 15kRPM 2.5″ SAS disks, or even to use them as local storage. Lack of disk I/O is the limiting factor for how many customers I can put on one machine. The problem is that the storage costs would be around 10 times as much and the target market (mostly people looking for cheap personal hosting) will not pay for it. They don’t understand why it would be desirable; for many of them it may not even be necessary since if they do only a little I/O they get the same performance either way.

So okay, if we resign ourselves to 4×7.2kRPM SATA disks and a RAID card as local storage, the next way to keep the price down would be to buy the disks with the sweet spot for price per gigabyte. At the moment that would be 1T. The problem now is that I’d end up with roughly twice as much disk space as I could ever sell on each server. I don’t get to keep adding customers until the disk space runs out — the I/O operations per second run out first. At the moment I can sell around 700GiB per server.

I thought I would not need to explain that 2×500G in a stripe with no redundancy would be insane, but apparently not, because I am told that some people “don’t need RAID.” I have to disagree, and I feel the ~49 or so other people on the server would also disagree when the first disk failure sees their service down and all their data lost (apart from the ones who have a backup strategy, right? No, really, why are you laughing?). Let’s not go there.

If you recall, I/O is what runs out first. So any sort of RAID-5 configuration is a bad idea because of the read-modify-write problem. The minimum number of disks and the most sensible RAID level then is a 4-disk RAID-10. Four 500G Western Digital Green Power drives will set me back around £165+VAT. You’re looking at around a further £225+VAT for a 3ware 9650 RAID controller. After the manufacturer lies are accounted for and an operating system is installed, there’s going to be about 930GiB of usable space left. We’re now at £390 for the lot, or 41p/GiB of usable space. Excluding VAT.

By the way, I am repeatedly told that Linux software RAID is good enough and I needn’t bother with hardware RAID (even a cheapy one like 3ware). I started off using Linux software RAID and still have one server using it, but that’s due for decommissioning next month. In general it does perform well enough. Unfortunately, hard drives accumulate errors and the only way to find them is to read the disks looking for them. The code for doing so on software RAID needs to be in the main operating system and the Linux mdadm package in Debian (and presumably elsewhere) handles it by means of a cron job that runs once a month to verify all the disks. Because it’s running on the host all the data has to go through the OS and while the machines are under moderate write load I have found that this verify process will take several days to complete and will impact I/O performance. In short it’s actually more cost effective to spend more on a RAID controller and put more customers on one machine.

Now consider the power usage. More than 60% of BitFolk’s recurring hosting costs are directly related to power. Disks aren’t huge power draws when compared to the CPU or chipset, but it’s not an inconsiderable extra cost and it’s often overlooked.

We’re already up to 41p/GiB cost price, but you may be thinking that this is no problem since at 10p/GiB/month, 700GiB sold brings in £70 a month, paying for all the disks and RAID controller after about 6 months. The reality is nothing like this. The full price has to be paid up front to get the hardware into service, but it’s going to be months before the server is full of paying customers. And if those customers don’t happen to want any extra disk space, then still around 50% of this capacity will remain unsold. The remaining capacity is not usable when the IOP/s have run out, but it has to be there from the start just in case there is demand. Does 10p/GiB/month start to look more reasonable yet?

If not, maybe you would be better off going to a really big cloud computing vendor who can take advantage of massive economies of scale to really drive the price down for you. Like say, Amazon S3 who will charge you $0.18/GiB/month for storing stuff in Europe. Plus $0.10/GiB/month more to write it and $0.14/GiB/month to read it.

Finally, the entire point of paying for a virtual server is that you don’t need to worry about the hardware. If it breaks, it’s BitFolk that replaces it, hopefully without you even noticing. If you are sitting there thinking “I could buy a 1.5T hard disk for 9p a GB, screw this!” then you just don’t get it. If from the outset you are prepared to manage your own hardware, and your needs justify purchasing an entire machine, then guess what? Don’t buy a virtual server on someone else’s hardware! Buy your own hardware that is set up exactly how you want (and please feel free to have no RAID and host it under your bed). With this mindset, pretty much every “* as a Service” product is going to look expensive to you because you have missed the point.

June 21, 2009 01:00 PM

aquarius

Using CouchDB to store contacts

One of the things I’m looking at is using CouchDB to store data for applications on your desktop as part of the desktop data/settings idea that Rodrigo’s already written about. Obviously one of the great things here is that applications can collaborate on data stored in there; obviously one of the pre-requisites for collaboration is that everyone’s speaking the same language! So various people working on a number of different mail clients for the Linux desktop and so on are working out what the schema for contact records in CouchDB should look like.

Being able to browse around your database with a web browser is dead handy for writing this sort of thing, I have to say :-)

At the moment, this is the sort of direction we’re heading in. A CouchDB document is JSON, and an example contact looks like this:

{
   "_id": "362cbeae5f408d6863bb70892d5ba345",
   "_rev": "1-182987891",

   "record_type": "http://example.com/contact-record",
   "record_type_version": "1.0",

   "first_name": "Joshua",
   "last_name": "Molby",
   "birth_date": "1945-07-04",

   "addresses": {
       "85cf156f-fcf6-4901-9201-82ee90859213": {
           "city": "Bedford",
           "state": "",
           "description": "home",
           "country": "Scotland",
           "postalcode": "cw12 3hi",
           "address1": "Nicol Street",
           "address2": "",
           "pobox": ""
       },
       "d20f7364-e80b-47a2-a7e7-0677cb293745": {
           "city": "Bedford",
           "state": "",
           "description": "work",
           "country": "England",
           "postalcode": "dk12 3av",
           "address1": "Rush Street",
           "address2": "",
           "pobox": ""
       }
   },
   "phone_numbers": {
       "f0bac2a0-83a3-46f9-b079-d41533b87391": {
           "priority": 0,
           "number": "+84 63 6220 9178",
           "description": "work"
       },
       "cf01fc9c-703b-4ae4-b303-fcc6f8ce5a53": {
           "priority": 0,
           "number": "+91 99 6920 2837",
           "description": "home"
       },
       "f0c05bf4-de4a-48f2-bbaf-f9698e52d491": {
           "priority": 0,
           "number": "+97 52 9211 6455",
           "description": "other"
       }
   },
   "email_addresses": {
       "6e3178d8-fee6-45b1-b95a-2c76be090e2b": {
           "description": "home",
           "address": "Joshua1.Molby@uck.com"
       },
       "adb1fc2a-0468-4deb-bb6c-974db23ef7fd": {
           "description": "work",
           "address": "Joshua1.Molby@vkc.com"
       }
   },
   "application_annotations": {
       "Funambol": {
             "jobTitle": "Director",
             "company": "ACME Ltd"
       }
   }
}

Fields in this are as follows:

CouchDB fields
_id
Unique document ID, provided by CouchDB (or you can choose it explicitly if you want)
_rev
revision number for this document. Managed by CouchDB.
Contact schema fields
The contact schema is the list of fields that are stored for a contact. Since this is a shared schema, everyone can rely on it. Fields that aren’t in this list can be stored by applications in application_annotations, if an application cares about extra stuff.
  • first_name (string)
  • last_name (string)
  • birth_date (string, “YYYY-MM-DD”)
  • addresses (MergeableSet of “address” dictionaries)
    • city (string)
    • address1 (string)
    • address2 (string)
    • pobox (string)
    • state (string)
    • country (string)
    • postalcode (string)
    • description (string, e.g., “Home”)
  • email_addresses (MergeableSet of “emailaddress” dictionaries)
    • address (string),
    • description (string)
  • phone_numbers (MergeableSet of “phone number” dictionaries)
    • number (string)
    • description (string)
Basic “record schema” fields
The record schema is the basic format we’re talking about for storing any data in CouchDB; it’s a couple of fields that are in every record that everyone can rely on.
record_type
A URL which is a unique identifier for this type of record. It would be good if that URL had a page at it describing the record schema, but (importantly) this is not a reference to some sort of JSON DTD or anything
record_type_version
Version of this record type schema (so you can make updated versions if you want to make changes to field names, etc)
application_annotations
The application_annotations section of the document is where apps put their own data that isn’t part of the schema. For example, Funambol knows about “company” for a contact, but the contact schema doesn’t directly include that field. So Funambol stores it on the contact record in a Funambol-specific section, so it can happily get it back later. If it turns out that everyone’s storing their own version of the same field, then that field is probably a good candidate for being in the schema (making this sort of change is what the record_type_version field is for :))

Quick script to drop contacts in this schema into a CouchDB database: createCouchContacts.py. Requires python-couchdb (and Couch, obviously).

June 19, 2009 11:51 AM


© LugRadio 2007 · Site designed by Michael Evans

© LugRadio 2007 · PlanetPlanet theme by D. Rimron