“If you help block Ads, you should be in prison!”

I don’t understand how ad-blocking is even legal. It’s like stealing – stealing content for free, IMHO there’s no difference between stealing MP3s and news or any other content. There’s some kind of user agreement between websites and its users – “you can use our site for free, but you have to watch the ads”. Adblock violates this agreement. The people responsible for this should be in prison, they’re thieves. And I’m pretty sure the time will come they will.

From HN

:D

DevLog for Sun, Aug 25, 2013

DevLogs have been something I’ve not been writing much of of late. Time to fix that!

WLM Android App

Spent some time reviving the WLM Android App. Wasn’t too hard, and am surprised at how well it still runs :) Some work still needed to update the templates and other metadata to refer to WLM2013 rather than WLM2012 – but that should not be too hard. The fact that it is an issue at all is simply because I ripped out all the Campaign related APIs a few weeks ago with my UploadCampaign rewrite.

multichill was awesome in moving the Monuments API to Tool Labs – hence making it much faster! Initially we thought that the Toollabs DB was too slow for writes – but this turned out to be a mistake, since apparently the Replica Databases had slow writes, but tools-db itself was fine. There’s a bug tracking this now. Toollabs version of the API still seems much faster to me than Toolserver’s :)

UploadCampaigns API

Mediawiki sucks. Eeeew! Specifically, writing API modules – why can’t we just be happy and have everything be JSON? Sigh!

I’m adding a patch that allows UploadCampaigns to be queried selectively, rather than just via the normal page APIs. Right now, this only lets us filter by enabled status – but in the future, this should be able to also filter on a vast array of other properties. Properties about Geographic location come to mind as the most useful. That patch still has a good way to go before it can be merged (continue support being the foremost one), but it is getting there :)

The ickiest part of the patch is perhaps that it sends out raw JSON data as a… string. So no matter which format you are using on your client, you need to use a JSON parser to deal with the Campaigns data. This sortof makes sense, since that is how the data is stored anyway. Doesn’t make it any less icky, though!

Not bad for a lazy Sunday, eh?

Update: After not being able to sleep, I also submitted a patch to make phpcs pass for UploadWizard, and also fought with the UploadCampaigns API patch to have it (brokenly?) support continuing. Yay?

Disconnecting, for real

I’ve been on the Internet since I was 14. And I don’t remember a time when I did not have a computer – I think I got mine when I was 10. Growing up, writing code has always been a major part of me – my identity. I’ve never quite managed to separate ‘me’ from ‘my code’ – despite mouthing off the soundbite ‘You are not your code!’ to plenty of people.

After Wikimania 2013, I spent a week in Hong Kong. The first few days were rough, but after that – it was amazing. For the first time I could imagine, I had completely managed to not think about code at all! I had my laptop locked in a locker somewhere, and didn’t even bother getting to it. I didn’t feel the burning urge to make a commit. The feeling of guilt that keeps gnawing at you from the back of the head ’teehee you have been so unproductive today!’.

That was a rather great feeling. Put things into a little bit more perspective. A step towards separating my identity from my code. I gave up on my GitHub streaks after that. I’ll probably also be less of a codeaholic.

I could write about ‘oh my god, this was amazing!’ and detail where I travelled in Hong Kong, but I think what was far more fascinating was how. I did not feel in a hurry. Did not feel like having to ’tick all boxes’ before leaving. Just… actually relaxing. And doing whatever.

Vacations are good :)

Die ’80 cols or die!’ guidelines!

Python’s PEP8 has just been changed to no longer recommend sticking to 79 columns! The new text says:

Aim to limit all lines to a maximum of 79 characters, but up to 99 characters is acceptable when it improves readability.

It would be nice to not have any such set limits at all, and just depend on programmers not being insane, but this is still an improvement!

Sprinkling some Douchebaginess in code

After being frustrated at Java’s lack of a generic ‘callback’ type, I created this interface:

    public interface ContributionUploadProgress {
        void onUploadStarted(Contribution contribution);
        boolean isJavaAPieceOfShit();
    }

And randomly throw around (with onComplete implementing ContributionUploadProgress)

    assert onComplete.isJavaAPieceOfShit();

This, of course, is trivial to fix with an IDE. Should be more fun with a dynamic language :)

(And yes, I removed that code before committing)

GitHub Streaks

I’m on my longest GitHub Streak this year – currently 20 days (was previously 18 days). That means I’ve had at least one commit (though usually more!) each day for the last 20 days. Sounds much easier than it actually is. Wanting to keep my streak unbroken is also making me write more diverse code – I think those 20 days feature code in Javascript, Python, Java, PHP and Python. It’s also distributed across a lot of projects – at least 8-9 different ones on last count. Streaks are helping me a fair bit! Getting the first commit of the day is the hardest – seems to get easier to keep things after.

So I’ve beat my previous streak length for this year (18 days). Next step would be to get over the awesome/scarily productive legoktm’s longest streak (29 days). Eventual goal would be to match ori-l at some point in productivity.

Game of Life in APL

Ran across a video explaining building Game of Life in APL. Pretty awesome, and surprisingly – quite understandable too!

I should learn J at some point, I think. My problem with trying to learn such languages is that I find it hard to find something to build that’s not a mere academic exercise, and I still do not have a solution as such. Just ’try harder’ doesn’t really work. Perhaps invent some sort of wonderful number crunching idea and then implement it?