Making an impact

Today marks a time in my life where I can do even less work that I’ve been doing so far; the Easter holidays. In fact, it’s more like breaking up for the year. The only reasons I have to return to university are two exams in May, after that I’m free to be where I like until October.

I’m not going to set out aims because I never reach them, and I look like someone that sucks at keeping to lists. Instead, I’m just gonna say somethings that it’d be cool to get done.

First thing is making an actual web app that actually does something and release it. My problem here is I always have ideas and then typically seconds later I read on Techcrunch that a start up has had an amazingly innovative idea that’s shockingly like mine. So, I’ll at least try and make a cool bookmarklet over the holidays. It’ll do something cool, honest.

I totally want to make my Tumblr the top search for shamess. It pretty much has everything to do with me; my tweets, my shared RSS stories, even this blog. It’s pretty damn nifty. I don’t know many people that use it though. Tumblr was actually an idea of mine too, which I guess I had an age too late. I was thinking of making an extension for Firefox that’d let me grab a piece of text/image/video and stick it on another site for later viewing. Then I found that’s exactly what Tumblr did, so I started out there.

Another idea I had a while ago was what start.io is doing. In fact, I already have that system on my localhost page, but I think I’ll likely switch to start.io now. Anything I don’t like about it I can just change using a Greasemonkey script (like showing the links in a different order depending on what time it is).

I picked up WoW again today, in all it’s lowest graphical settings, OpenGL glory. I played a hefty amount of hours before I wasn’t having fun. Maybe I should just limit myself to an hour or two playing? That’s the height of fun before I get bored and leave the game thinking “I can’t believe I just spent so long playing this dumb game.” That’s just a downer. It’s just so damn easy to forget that you’re supposed to be having fun.

Same as Tribal Wars, really. My tribe is proper hardcore playing, and up annoyed at me for lagging behind. To be honest, I have been trying, I’ve no idea what has caused me to fall behind so much. But either way they’re acting like I’m a bad person because I’m not up in the tens of thousands of points and have three villages. Really? I play the game till it stops being fun each day, if that’s before I reach optimum pointage, then that’s the way it is.

Being a geek makes me happy :D

I came to this page and was immediately hit with a massive bout of exhaustion. That makes no sense, since I slept all night, if anything I’m over sleeping as of late. Despite that, I’m determined to explain why I’ve been so happy for the past few days.

First, my passion for working in industry, with a team of people, has totally been reignited. For some reason I found myself on Tumblr again, which I’m loving. Somehow I ended up at the official Tumblr staff account, and dawdled around people like Jacob Bijani’s tumblelog. I honestly spent an entire night, probably the best part of six hours, reading the latest ten pages. Wikipedia style, I kept ending up at random web pages he links to (and then pages those pages link to) and found masses of amazing stuff.

Ultimately that night I ended up at taking a look around tumblr offices. Gosh, how much I’d love to have a desk like that, have actual projects to work on, and people around me to do that stuff with. I mean, I’m all for being a lone programmer when I need to be, but sometimes it’s just cool to geek out of programming. I don’t really have anyone like that at the moment.

Second, I found an article on Wired (via reddit) on “hack spaces“. Pretty much a workshop for awesome people to meet up and work on stuff. Hardware tinkering, programming, tonnes of different stuff. They usually have a persistent space, like a rented room or something, where they can keep their stuff and just waste an entire day away. I hear that some are open 24/7.

Turns out it’s not just an American thing (it didn’t even start in America), but there’s a whole group of people all over the world. I found that there’s a hack space being created in Birmingham that I really want to be apart of. I’m not sure how I’m going to afford it; these things are funded by their community, with members paying a subscription. There was talk of it being about £50 a month, which I don’t think I’ll be able to make. Since I’ll be in Leicester most of the time, it might work out cheaper to just pay for meets I attend.

I’m massively excited about this.

The third thing is MCR  released a song for Watchmen. You’ve no idea how happy it makes me to hear their music again. Gerard’s voice just makes me grin like a lunatic. Honestly, standing in the middle of the street with a huge grin, lunatic. Considering it’s the thing that makes me happiest, I’ve no got much to say about it…

Really quick run down of storing and retrieving data in Firefox

Last time I quickly ran through how to add a button to your Firefox bar by making your own extension, but all it did was open a cruddy, static alert box.

In an effort to remind myself how to manage preferences, I’m going to make it so the user can decide what text should be alerted.

First we’ll be needing to add some kind of options dialogue box. For now, I’m just going to add a pane to the options window. We need to make another overlay for the preferences in that case. Create a new text file called prefs.xul. Doing that is explained pretty well in the pane creation section of the Rietta tutorial.

That website it clearly out of date though, since it says this:

If you did not know what you want to merge with, the DOM Inspector is your best tool for looking through browser code and finding element IDs.

Which is no longer true; Firefox doesn’t ship with that DOM Inspector anymore. So, I’ve really no idea how to find the DOM element ID’s I’m supposed to be merging with.

Rietta do a good job of explaining how to link preferences with the inputs too. They don’t mention how to make your stuff get laid out nicely though. I think you can use CSS like normal (using style). There’s a page on tags you can use over MDC.

Once you’ve designed your overlay in XUL, you’ll need to actually overlay it by adding it in your chrome.manifest, like you did with the browser.

overlay chrome://browser/content/preferences/preferences.xul chrome://your-addon/content/prefs.xul

Open up your options window, and you should see your pane there now.

Mine definitely needs to be prettier. (The screenshot is for the addon I'm working on, not this example.)

Mine definitely needs to be prettier. (The screenshot is for the addon I'm working on, not this example.)

When you change the data in your fields and press ‘Ok’ they’ll automatically be updated and saved. You’ll be able to see them in your about:config too.

Now we can go ahead and make our javascript file, save it in your content folder. This’ll just be like any other javascript function you’d normally write.

We need to use XPCOM in order to get and set preferences from inside a javascript file. That makes my javascript file look like this:

//  Gets the text from the store user preference and returns it
function getAndReturnText () {
  //  Installise the preferences service
  var pref = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);

  //  Message box showing the text the user entered on the options pane
  alert (pref.getCharPref ('extensions.timesink.possibleWebsites'));
}

Doesn’t do much at the moment, until we change the oncommand event we added to our button (in browser.xul). You also need to include the javascript in any overlays with you’re using it.

<script type="application/x-javascript" src="chrome://your-addon/content/mycode.js" />

After learning all that, I ended up with these tabs open, which may be more help to you.

Hacking and torrenting

The game I’m working on at the moment is a little bit of a clone of Uplink, an awesome hacker style game I played back in the day. I was too young to buy it back then (I think I was just playing the demo), and I sort of stopped playing it after a while.

I’m designing my game pretty much from memories of Uplink, but I’m a little bit stuck for inspiration on how to do a certain aspect (gosh, check me out being all secretive and careful with my words) so I decided to nab Uplink again and try see how they did it.

I decided to pirate it until I have money – I know I’m strongly against the “I’m allowed to pirate because I’m poor” argument, but I genuinely will buy the multipack of their games when I do have money next. It pains me even more than it’s a small development company and not some multi-conglomerate that I’m stealing from.

But the reason for my posting here is the comments on the torrent page. First, it’s ironic that people trying to download a hacker game don’t know how to install it. Second, it’s awesome to see that some of the people on there have already bought the game and they’re just torrenting it now for their own reasons. I’m against the “Oh, I bought a copy on CD, so now I’m allowed to bit torrent it” argument too, but it’s better than nothing. It at least shows that bit torrent sometimes does drive sales.

Super quick guide: Adding a button to the Firefox toolbar

My button: look how cute he is!

My button: look how cute he is!

What I’ll cover here is the steps that you should take to add a button to your Firefox toolbar, I think Thunderbird and stuff might be the same too. This isn’t a comprehensive guide, the links I link to are for that.

This is basically an article for me to dump loads of information I’ve accumulated. You won’t learn much just by only reading this article. Take a look through the links I give.

You’re basically making an extension, so you need the same file layout to start with. Here’s assuming you’re building your extension inside a folder named “extName”, call yours whatever you want though.

extName/
        chrome/
               content/
        chrome.manifest
        install.rdf

More indepth look at setting up the environment and folder structure.

Open install.rdf and paste the following:

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <Description about="urn:mozilla:install-manifest">
    <em:id>addonname@whatever.com</em:id>
    <em:version>0.1</em:version>
    <em:type>2</em:type>

    <!-- Target Application this extension can install into,
         with minimum and maximum supported versions. -->
    <em:targetApplication>
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>1.5</em:minVersion>
        <em:maxVersion>3.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>

    <!-- Front End MetaData -->
    <em:name>Addon name</em:name>
    <em:description>Description for addon</em:description>
    <em:creator>Your name</em:creator>
    <em:homepageURL>http://yourhomepage.com</em:homepageURL>
  </Description>
</RDF>

Change whatever stuff. Don’t make the minVersion less than 1.5, because you’re blatantly lying. Lots changed in 1.5 that doesn’t act the same way now. Don’t change that weird looking id. The first id needs to be changed though. It doesn’t have to be a real email address, but it does have to be in email address format. More indepth look at install.rdf.

Firefox’s appearance is created by using XUL (“zool”). We create our own XUL documents which we tell Firefox to merge with the base template. We say stuff like “add this chunk of XML to the status bar” and it merges that data. You can overwrite sections too. We call our XUL “overlays“.

Add these lines to chrome.manifest.

content     youraddon    chrome/content/
overlay chrome://browser/content/browser.xul chrome://youraddon/content/browser.xul

That basically says “the content of youraddon is in ‘chrome/content’, which is  direct relative to this file.” Here’s a more comprehensive explaination of what it means.

Time to make some images for your button to display. You need to make two, one 24×24 pixels, and a smaller version 16×16 pixels. I stuck them in chrome/content/images/ but so long as they’re in chrome/content/ it shouldn’t matter. Then you need to make a CSS style for those buttons. This’ll do:

/*  skin/toolbar-button.css  */

#youraddon-button {
  list-style-image: url("chrome://myextension/content/btn_large.png");
}

toolbar[iconsize="small"] #youraddon-button {
  list-style-image: url("chrome://youraddon/content/btn_small.png");
}

I think it’s standard to separate your content from your skinning, but I’ve not bothered with that. It’ll probably cause me all sorts of problems later.

Create chrome/content/browser.xul:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://youraddon/content/style.css" type="text/css"?>
<overlay id="youraddonBrowser" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="youraddon-button" class="toolbarbutton-1"  label="Your addon name" oncommand="alert ('hey');" />
</toolbarpalette>
</overlay>

Pretty standard XML styling. Define it as your overlay. Tell it you want to merge with the “BrowserToolbarPalette“, and add a button. That class is required to style it like a toolbar button. The label is the mouse over text. oncommand is the Javascript that will run when you press the button. That’s another article though.

I bookmarked and shared (foxmarksxmarks is cool) all the pages I ended up having open at the end of button creation, so go ahead and look through them.

Read it, disregard it, drive into walls.

You know what? stfu, valleywag. I know you’re the Internet’s answer to The Sun, so I’m just going to disregard everything you just said in that article. I mean really? Alex is “forgettable”? Please, Alex is far more interesting than Kevin. If I had to pick one of them to go out and grab something to eat with it’d definitely be Alex.

If it’s true about Alex wanting to leave Diggnation, then Diggnation is dead. No really. Just Kevin sitting on a couch, with Glen and Prager? That’s not interesting. Alex’s retorts and spontaneous jokes (which sometimes are so spontaneous they don’t make sense) are what make that show interesting. They can’t get another co-host, because they just can’t afford to. They’d have to come from in house, and I’m not sitting thrugh 40 minutes of Martin Sargent.

Anyway, whilst I’m here. My ‘Freelance’ label in my gmail has never been more active. It’s quite intimidating. Priorities say I have to finish that website assignment first though. Well, first food, then website. I’ve decided on just using CC and GPL content to fill the pages. Perfectly legal, if a little lazy.

Link round up

I got home about seven today, with achy feet, and I decided I was in need of a nap. That nap lasted from seven till midnight, so I’m fairly alert now. I managed to get through sixty RSS items, and even wrote up some ideas on two of them (which you probably just read). Anyway, on my travels I stumbled upon very few interesting things. I did find out amazingly that awesome things happen when you live in San Fransico.

Prager, producer of Diggnation,  had a random guy just stumble into his apartment, use his bathroom, take his trousers off and try to go to sleep. Being a third generation news provider that he is, he decided to twitter and ustream it up. I saw that article on in Reader and thought “lol, some people are dumb”. Then realised that it was Prager (why isn’t his name headline news? that guy’s awesome) and lolz ensued and I was slightly less shocked.

Lifehacker found an awesome Greasemonkey script that keeps your place on long pages. (In fact Lifehacker didn’t find it, gHacks did but their website is ugly, I mean serious, more ad space than content.) I was actually just about to make a Firefox extension that allows you to click a place on a page which inserts a name link tag, so that you could then bookmark that. But since I’ve just found this, I guess it’ll do.

If you find that you do decide to read Watchmen, then you’ll be needing something like this comic book reader. Whilst I’m linking to comic book stuff, I rediscovered StopTazmo the other day, free manga for the win.

Product placement should save piracy

I’m just going to throw this idea out there; when TV show marketers are selling out slots for their product placement bits (whenever you saw a phone on 24, someone had paid for that to be there) do they take into account the number of expected illegal downloads the program will receive?

What phone does Elle use... Oh yeah.

What phone does Elle use... Oh yeah.

Lost is one of the most expensively produce shows on Earth, maybe even the most expensive (the reason we’re not so much in Hawaii this year? because that was costing about half a million dollars each episode, probably more now). Heroes, Battlestar, and 24 are all probably ranking up there in the hundreds of thousands of pounds per episode too.

I’d be pretty annoyed if I was a network publisher and we weren’t capitalising from the ten and a half million people illegally watching TV by downloading it. Product placement must be worth more than traditional ads when trying to improve company image and recognition. Traditional ads are removed from every downloaded piece of TV I’ve ever seen, making the benefit to the advertisers zero. Whereas product placed adverts can’t be removed easily, and who would want to anyway? They’re not in the way. They rarely dilute the story. So all those millions of people are definitely going to see your business’ logo, which is what you wanted, right?

I expect that if they don’t incorporate those statistics into their pricing it’s because there’s no reliable statistics out there. ShowInsider grabs their data (I’m guessing) by monitoring how many seeds and peers a torrent has. That’s really not a very effective method that promises much accuracy. Some people hide their tracker data, they can’t be looking at data from private trackers, or just trackers that are too small to know about. There are a lot of fake seeders out there (MediaDefender-esk). Lost’s 1,700,000 downloads this week could easily be as little as a million or as great as three million. It’s just not possible to find out well.

Even if you do trust ShowInsider’s data, you still have absolutely no demographics on who’s downloading. It’s incredibly hard to find advertisers when you can’t tell them who’s watching your show (BMW don’t want be advertising to twelve year olds). I know that’s one of the reasons there was such a big overhaul in the distribution method over at Revision3.

Back in the day you used to be able to donate $5 a month (or however much, really) to get Diggnation earlier. What happened was that one guy donated teh $5 a month, ripped the video from the site, and posted it on his own, days before it was released to the general public on Rev3′s website. I don’t think Rev3 minded that so much (this was before there was advertising on their website) as it was all extra coverage for them, but the problem it lead to was who the hell was this extra coverage? Because they weren’t going to Rev3′s website they couldn’t poll them to find that information out.

That’s largely I suspect why things like Hulu and iPlayer exist now. ABC got annoyed with not having the demographics on their veiwers, so they decided to release their content in a way that they could. Piracy is so arrife because I can’t watch Hulu though…

How Google should make money

Ages ago I did a post on how ad-funded services were likely to die off, and other methods of monetization that people could use. I didn’t even think about how all that would affect Google until I just noticed a post on valleywag regarding them making more of their services paid for.

That really doesn’t surprise me though; Google is the prefect company to be making money through freemium services. At the moment they’re focusing mainly on the business markets, which makes sense since they have more motivation to pay for a service and they’ll also need better customer support which comes at a price, and they know it. No feathers are ruffled there.

It just makes sense to charge those guys.

How about making money from us individuals using freemium revenue sources?

I’d be pretty pissed if Google Reader started limiting the number of feeds I can subscribe to, unless I paid $5 a month. It’s not that the service isn’t worth paying for – I love it, it’s been my  homepage for the past few years – but there are alternatives out there that I could easily switch to. If all else fails, I could just program my own. I wouldn’t put up with having to pay for it.

So how can Google make money from it, that isn’t advertising (which they don’t)?

We can just go back to the idea of charging businesses, or power users. I know that some of the blog author’s that I read use Google Reader for research and second-hand-news purposes (which most of it is on the internet, like this post for instance). I’m sure if Google paneled them they’d find a whole host of features that reports need and are willing to pay for in order for their job to be easier or for them to produce better content, finding news quicker.

There could be a feature for paid users only which gives links and citation data to other websites and even news papers which Google have archived. They have all the known internet at their finger tips, why not tell the people looking for it about it? They could order these links by the sentiments of the pages; are you looking for pages pro-, or anti-Apple? is the author liberal or conservative? Those kinds of things would help authors do their job, and I’m sure Gawker or Wired wouldn’t mind paying for it. Hell, if I could afford it, I’d get it for when I (very occasionally) do reviews on here.

So, again I’ve come to the conclusion that service providers should charge their business and pro-users, becuase they aren’t willing to leave. Give them a few nicher features and you’re good to go.

Food for thought

In an idea that’s two parts to have a use for the account, and one part to keep track of my diet, I decided to use my twitter as a food journal! I’ve decided to list pretty much everything I eat, and I’ve done so so far. Most of the time a meal can be summed up in 140 characters, and you can text to update twitter, so it seemed the most ideal platform. I could do that on this blog, but I can’t text to update, and I’d rather this blog not be spammed up with “cheese on toast” every few hours.

Depending on how long twitter keeps your tweets, and if they let you search them (I’m sure there are tools), it’ll be cool to see what I’ve tried before and see how my diet changes. I’ll also put if I like that type of food so people can see and know what I like. It’s not exciting but meh, it could be fun, if not interesting.