Charles Carreon sues charities. I think he’s a dick.

FunnyJunk is a website which publishes funny images. Many of these images are stolen from various sources – including hundreds stolen from TheOatmeal. When Matthew Inman, owner of TheOatmeal called out the owner of FunnyJunk.com for hosting lots of stolen comics, including a lot of Matthew’s material. The owner of FunnyJunk.com deleted some of them, but a large number still remained, some with attribution removed to hide the fact they’d come from TheOatmeal.

Matthew just left it at that, and the remaining stolen comics continued to be hosted on FunnyJunk without attribution or permission.

Recently, almost a year later, Charles Carreon, a lawyer who became famous in the 90s after successfully litigating sex.com, served papers on Matthew representing FunnyJunk, demanding that Matthew remove “false statements about FunnyJunk” from his website, and accuses Matthew of using SEO practices to attempt to come up when people search for “funnyjunk”. (Er, yes, a page written about FunnyJunk will indeed appear in search results for “funnyjunk” – that’s not SEO trickery or any negative action, that’s how the Internet works.)

Worse, though, he also demanded payment of $20,000 to be made! Er, yes, good luck demanding unsubstantiated amounts from a fellow citizen; as a lawyer, I’m sure you’d know that Matthew has no obligation to comply whatsoever, until you take a case in front of a judge, and get awarded damages; how you could substantiate that level of damages I’m not quite sure.

In response, Matthew launched a fundraiser, intended to raise the $20,000 demanded, which would then be donated to the American Cancer Society and the National Wildlife Federation, two worthy causes. The $20,000 was raised in around an hour, and ballooned to an incredible sum of over $186,000 at time of writing – that’s an incredible achievement and something Matthew can be proud of.

Charles Carreon apparently took offense, though, and told a journalist at MSNBC that he “has sent a request to disable the fundraising campaign”. So, he wants to prevent the American Cancer Society and the National Wildlife Federation from receiving over $90,000 each? That seems like something that’ll make you popular.

Amazingly, he decided to go on and launch a lawsuit not only against Matthew, but also against IndieGoGo, the company hosting the donation appeal, who are uninvolved in the whole original bitchfight. That wasn’t dickish enough, though; he also decided to sue the National Wildlife Federation and the American Cancer Society, who have no involvement other than being the intended recipients of the fundraising results.

Seriously, dude, what the fuck?

I can’t find better words to summarise the situation than these by Ken at Popehat in the link above:

Yes. Charles Carreon, butthurt that someone had leveraged his douchebaggery into almost two hundred thousand dollars of donations to two worthy charities, sued the charities.

Charles Carreon, I think you are indeed a grade-A douchebag. I do hope nobody will ever consider hiring you to represent them in future, except perhaps to unblock their toilets with your tongue. Matthew Inman, I’d like to buy you a beer.

Dancer talk at YAPC::NA 2012

Mark Allen will give a talk at YAPC::NA 2012 on the Dancer Perl web framework he describes as:

This talk presents the Dancer web framework beginning with “Hello World” and progressing through a couple of easy to digest introductory applications. All of the primary Dancer features are presented including URL routing, writing handlers, and output templating. A selection of useful and common Dancer plugins will also be covered. This talk is best suited for beginning and intermediate Perl programmers.

(via JT Smith, in turn via the YAPC::NA blog.)

I hope it’s recorded, as I’d like to see it, but won’t be able to afford to attend YAPC::NA.

VLC getting proxy settings via gconf

I had a problem with VLC, using outdated proxy settings rather than connecting directly, even with no proxy configured in VLC’s settings (and even when trying to override it using command-line options).

(It would show that it was trying to use a proxy:

[0x134b4b0] main access error: connection failed: Connection refused
[0x134b4b0] access_http access error: cannot connect to supernova:3140

(supernova:3140 was the proxy setting it was picking up.)

After using strace to follow the execution of VLC when trying to play a network stream, I realised it was getting the settings via gconf; I needed to execute gconf-editor, navigate to system, http_proxy, then untick use_http_proxy – and also edit the value of the host setting to an empty string (without doing this, VLC ignored the use_http_proxy setting being false, and tried to use the proxy anyway!).

I could have done the same using gconftool-2 with:

gconftool-2 -s /system/http_proxy/use_http_proxy --type bool false
gconftool-2 -s /system/http_proxy/host --type string ''

Blogging for my own future reference, and for anyone else who’s using vlc on XFCE and wondering where it was getting the proxy settings. I’ve used Gnome 2 on this machine before, and I think that system proxy setting was set by Chromium (Google Chrome).

Perl Advent Calendars for 2011

Well, December is upon us – time for advent calendars, and as usual, the Perl community doesn’t disappoint – here’s a list of the Perl-related advent calendars I’m aware of:

There are also several Japanese-language advent calendars:

If you know of any others, please feel free to let me know and I’ll add them to the list :)

How on Earth do I contact Adsense support?

Some time ago, I had a Google Adsense account, which was separate to my main Google account (as they weren’t linked back then).

It didn’t seem possible to move the Adsense account to become part of my main Google account, so at some point I signed up for Adsense again with my main Google account, intending to then close the other one; that signup was rejected, because I already had an account.

I’m now left in the position where I have an account I can’t access, because the email address used for it is associated with my main Google account, so when I try to log in, I get logged in to my main Google account instead, where I am simply told of the rejected application.

Can I contact Google to get this sorted? Hah! Their ugly help pages mention I can contact them, but not how:

(From their How can I contact AdSense support? “support” page).

Seems the only way is to post on their public AdSense forum, cross your fingers and hope for the best. I tried that months ago, with no luck.

Oh well.

</rant>

EDIT: I did eventually find a link in a random forum post to a form to submit to indicate that I had no access to the old account and wanted it dropped in favour of the new account: https://www.google.com/adsense/support/bin/request.py?contact=noaccountaccess – I submitted the form, and fairly soon after, I received an email indicating that it had been done. So, it was eventually sorted, but the whole process was harder than it needed to be, and customer-unfriendly.

LPW2011 : my thoughts overall

Yesterday, I attended the 2011 London Perl Workshop – my first ever Perl conference.

I had a good day, met a few members of the Perl community I knew from online interactions who I’d never met in person before, saw some good talks, and partook in some free food and beer (kindly paid for by the sponsors, including my employer, UK2).

Some brief mentions of talks I attended:

Matt S Trout (mst) – First, Tak wrote the world‎

I have IO::Pipeline. I have App::FatPacker. I have IPC::Command::Multiplex. And yet I still couldn’t whip up a five line example of bolting them all together that made a compelling argument for a perl-loving sysadmin to stop using fabric.

This problem, among others, will be solved by the conclusion of this talk.

Tak sounds like something which will be very useful to me – running code on multiple other hosts via SSH, but including Perl code – with all locally-installed modules available for use at the remote end!

As mst went through explaining how it all worked, my thoughts went from “hmm, useful”, to “hmm, useful but looks over-engineered, not sure it needs to be that complex” to “whoah, that’s genius”. Fatpacking and sending code to the remote side, which then adds a coderef to @INC which requests other modules from the local end, sent over and loaded remotely, is awesomely creative.

These kind of tricks remind me of why I love Perl.

Mike Whitaker (‎Penfold‎) – ‎Perl and Unicode, the 5.14 edition‎

A very good talk on handling Unicode safely in Perl, and the gotchas to avoid. Provided major impetus for me to upgrade to 5.14, too.

Zefram – ‎why time is difficult‎

Dates, times, time intervals, clocks, calendars, and related phenomena are major contributors to hassle in programming, and the source of innumerable bugs.

Zefram’s talk, whilst barely Perl related, was very interesting, and very well delivered. I hadn’t realised quite how complex time was :)

Zefram’s amusing lightning talk on doing away with source code by simply storing bytecode and editing it by deparsing the source, editing it, then “compiling” back to bytecode was also entertaining.

Claes Jakobsson (‎claes‎) – ‎Don’t debug now, debug later

Runops::Recorder is a alternate runloop for perl that writes down what your program does to disk for playback later

It also comes with a viewer and some helper classes for you to write your own playback tools such as diffs etc.

This looks like a very useful debugging tool, recording the path of execution through your code and writing it to a file which can then later be “replayed” using a viewer – much like single-stepping or tracing through the debugger, but after the fact. The ability to leave it running and have it dump out a configurable amount of trace data when a die is encountered looks excellently useful for catching intermittent / rare problems – you should be able to leave it in place, wait until the problem occurs, then replay what happened leading up to the die to see what was going on.

Future versions should also be able to track changes to variables, etc, which will be very useful indeed.

There were a couple of workshops I’d like to have attended, but which I didn’t; partly because they conflicted with talks I wanted to see, and partly because I didn’t have a laptop with me to “work along” and didn’t think I could take much of value away from them.

Andrew Solomon – ‎[[TRAINING SESSION]] Web development for beginners using Dancer‎

As a core developer for the Dancer perl web framework I’d love to have attended Andrew Solomon’s workshop, to see what was being taught, and offer any input desired. Unfortunately, I wasn’t there, but I’ll be looking with interest for any feedback from people who were, and what they learned and what they thought of Dancer if they hadn’t encountered it before. Making Perl accessible for new users is an important thing.

Gabor Szabo (‎szabgab‎) – ‎[[TRAINING SESSION]] Testing in Perl

I’d also like to have taken part in Gabor’s workshops, but they were in two parts and conflicted with several other talks I wanted to see.

I met a few members of the Perl community who I knew from online interactions but had never met in meatspace, so it was great to meet them. Unfortunately, there were a few others I’d meant to go introduce myself to, but never got a chance to do so – including Tatsuhiko Miyagawa and Gabor Szgabo.

Overall, it was a good day, and I imagine there’s a very good chance I’ll be back next year :)

LPW2011 : abigail’s “Business Aware Developer” talk

I caught abigail’s “Business Aware Developer” talk yesterday at the London Perl Workshop 2011.

Overall, I think it was a good talk, and raised some good points, even if the “you don’t always have to write tests, write them only if they provide value” is a little controversial with some of the audience, leading to a reasonable amount of debate and running late with the talk so having to skip some slides.

Personally, I agree to some degree – I think some people write tests simply to push up their test coverage figure, without really writing tests which are likely to catch bugs (exercising the code in both expected and unexpected ways, providing strange input and edge cases (does it blow up if given undef or a ref, say).

However, I do think a fair amount of the talk is summed up by advice given to me by a boss at work, Ditlev, with regards to getting stuff out – sometimes you have to “launch crap but launch” – sometimes code that works well enough to be put into use and making money for you can be more valuable than taking longer to produce better quality code – which may be nicer and better to work with in the future, but isn’t ready to launch now. In other words, examining the trade-off between quick results now, and better quality code which becomes more valuable later – but “what if later never comes?”.

The impression I took away from the talk, which might be a misconception, is that Booking.com don’t do code reviews or refactoring, which would seriously put me off applying for a position there – I think code review in particular (even if just casual – it needn’t be a formal procedure) is very valuable to push yourself to be a better coder. If you know other members of the team are going to be glancing over your commits when they have time and pointing at bits you could have done better, that’s a good motivation to write good code, and also often helps you realise other ways you could have done things.

I’d be interested in seeing the other slides which abigail had to skip over, but I haven’t been able to find them anywhere online.

Graphing time-based data in Perl

I recently wanted to produce some graphs from a web app powered by the Dancer Perl web framework, and reevaluated the various Perl graphing moduiles out there.

Modules I considered were:

  • Chart::Strip
  • Chart::Graph
  • Google::Chart
  • Chart::Clicker
  • Chart::Gnuplot
  • Unfortunately, I didn’t have time to do a full in-depth writeup trying every module like the excellent ones Neil Bowers has been doing, but I thought I’d write up a quick post on the choice I made, with example code, in case it helps other people looking to graph potentially irregularly-spaced time-based data samples in Perl easily.

    Chart::Clicker looked to be a nice choice (with a nice example of doing just what I want given as the topic answer to a question on StackOverflow), but had a huge chain of dependencies, finally failing when demanding Cairo and various X11 libraries (on my headless server).

    Chart::Strip seemed to do exactly what I wanted in a simple way, but I encountered a div-by-zero bug when dealing with a certain dataset with > 89 data points.

    I reported this to the author, Jeff Weisgberg in RT #72288, and he promptly released 1.08 with a fix (thanks Jeff!).

    Chart::Strip made it simple to do what I wanted:

    my @dataset;
    while (my $row = $sth->fetchrow_hashref) {
        push @dataset, { time => $row->{timestamp}, value => $row->{value} };
    }
    
    my $chart = Chart::Strip->new( title => "My chart" );
    $chart->add_data(\@dataset, { style => 'line' });
    
    # then get the chart as an image with $chart->png
    

    Nice and easy, just what I wanted – a way to say “here’s some timestamps and values (quite possibly irregularly spaced) – work out how to plot this sensibly for me”.

    The resulting graphs look good enough to me, e.g.:

    (Rendered intentionally a little smaller to fit the blog; naturally the graphs can be whatever size you want. Also, I had to use the transparent option to disable transparent backgrounds.)

Why I love Perl : It makes things easy and fun

A short example of why I love Perl. The other day, I was picking my parents up from the airport; I do this reasonably regularly, as they go to visit family out in Ireland. Anyway, I’ve often wanted something to monitor the status of the incoming flight on Luton Airport’s website and tell me when it changes (if it’s delayed and a new estimated time is announced, or when it’s landed, etc). I looked around for decent services which do this, but found nothing which really appealed.

So, the other day, I decided “write it yourself, it’ll only take a few minutes”. Sure enough, with the aid of LWP::Simple, HTML::TableExtract, SMS::AQL and a little glue code, it was done:

#!/usr/bin/perl

use strict;
use LWP::Simple;
use HTML::TableExtract;
use SMS::AQL;

my $flight = shift or die "Usage: $0 flightnum";
my $url ="http://www.london-luton.co.uk/FlightData.ashx"
    . "?dir=arr&lang=en&id=1&r=20016807";
my $dest = '+44******';

my $sms = new SMS::AQL({
    username => '******',
    password => '******',
    options => { sender => '+44*****' },
});

my $last_status;
check:
while (1) {
    sleep 30 if $last_status;
    my $html = LWP::Simple::get($url) or warn "Failed to fetch HTML" and next;
    my $te = HTML::TableExtract->new(
        headers => [ 'Flight No', 'Airport', 'Scheduled', 'Flight Status' ]
    );
    $te->parse($html) or warn "Failed to parse HTML" and next;

    for my $row ($te->rows) {
        if ($row->[0] eq $flight) {
            if ($row->[3] ne $last_status) {
                $sms->send_sms($dest, "Flight $flight now $row->[3]");
            }
            $last_status = $row->[3];

            next check;
        }
    }
}

How easy was that?

(The code isn’t quite up to the quality I’d aim for if I was releasing it as an actual project – I’d tidy it up a bit, add more error checking/handling and have it read details from a conf file if I were to do that, but it’s a good example of what you can quickly rock up with the power of Perl and CPAN. I’d probably also swap it to SMS::Send, so it could be more easily used with various SMS gateways (I use www.aql.com – there’s an SMS::Send::AQL driver I wrote for that, which uses SMS::AQL under the hood anyway).)

Battlefield 3 – party join problems and unlockable flares

So far, I’m loving Battlefield 3 – it’s great fun, and, I feel, an improvement on Battlefield Bad Company 2.

It’s not without its problems; though – here are my thoughts on what I’d like to see fixed:

Flares should be available by default

Flying is very difficult indeed, due to the fact that flares are an unlockable item, requiring you to score sufficient points in that type of aircraft to get them. So, you’ll take off in a jet armed only with its cannon, and no flares to shake off heat-seeking missiles; as soon as you’re airborne, people will be firing missiles at you, and, with no flares to throw them off, you’ll struggle to shake them, and will likely be shot down quickly, or spend your time in a series of desperate manoeuvres trying to shake off the missiles; you’ll not stay alive long enough to chalk up enough kills with the puny machine gun/cannon to score enough points to earn the flares

This means that players who have already unlocked the flares and missiles have a massive advantage over those players who haven’t yet, making it very hard for those who haven’t yet unlocked them to take part in jet/helicopter flying.

I’d like to see flares changed to standard equipment rather than an unlockable, so that you can at least have a chance of defending yourself while you try to get enough kills to unlock heat-seeking missiles yourself (something which, I believe, you’ll need to repeat for each individual type of plane in the game…).

Splitting parties on joining a game

Match-making can be a little shabby at times, too – invite friends to your squad, join a game, and you’ll quite often find you’ve been split up across different squads, and, often, even on opposing teams (even if there were only two of you) – a big failing for a game where teamwork and co-operation is important, in my opinion.

I think the match-making code needs to be able to look for servers with sufficient space to take all members of the party in a single squad on the same team without the game becoming unbalanced, and ignore that server if it’s not suitable.

(Note that I play on PS3; I do not know if the above points are valid for XBox / PC players)

EDIT: going by the number of people reaching this post with search queries like “battlefield 3 party join not working”, “battlefield 3 party problems”, “can’t join party battlefield 3”, it seems I’m not the only one annoyed by this.

EDIT 2: Looks like this is being worked on – EA blogged:

2) JOINING SQUADS AND STAYING THERE
Status: Fix pending in the very near future

Some people have experienced difficulties joining and staying in squads on console. We have identified the cause of this problem and will hopefully have a fix ready to roll out very soon. […] We will return tomorrow with an update on when this fix is live.

They also suggest following their guide to using the BF3 server browser. It’s not entirely clear, but it sounds like the filter settings chosen in the server browser apply also to the “Quick Match” feature, too.

M98B seems excessively powerful

The M98B seems to be excessively powerful compared to other sniper rifles in the game (although it may just be that I’ve just been unlucky and just seen it in the hands of very skilled players who managed a headshot every time – although I’ve been taken out with it in Canals was set up as an industrial harbor, featuring a mix of infantry, land vehicle, and boat gameplay. The attackers in Rush start out on an carrier ship and can reach the beachhead by amphibious vehicles, boats, and helicopters. All of the bases on the map hava single hit even whilst running a few times…)

You can’t quit after a round

When a match is complete, you see your stats, but there’s no option to quit – you have to wait for the timeout, then for the next map to load, and finally, when you reach the spawn selection screen, you can then quit. The most logical time to decide to quit is at the end of a round, so why not provide a quit option there? That would save a lot of wasted time, save the effort of loading the next map for no reason, and perhaps even give the server a better chance of making sure the teams are balanced, etc (it can have a clue who is planning to stay in the game, rather than doing balancing etc, only to see people drop out afterwards). Pure logic and usability would suggest allowing you to select to quit as soon as the stats from the completed round are displayed, I feel.

David Precious – professional Perl developer, motorcyclist and beer drinker