Update to My Last.fm Scrobbling Test

I spent a bit of time this evening updating my Last.fm scrobbler (if you can call it that), which I have written about before.

It simply makes it a lot easier to use: enter your username and password, click the button (I know the enter key doesn’t work, and I hate myself for not being able to fix it). You’ll move to a page where you need to enter three fields (artist, track and length) and click submit. Done. When compared to the old method, it’s several thousand times better.

I feel much happier. I’m trying to do something interesting with it involving Delicious, but we’ll see if I can get the code working or not…

By the way: not including a giant, massive link to the new page is one of the smartest things I’ve ever done. *facepalm*.

Posted at 2:21 on November 16th 2008, tagged as , , , , with 2 comments

Other People’s Data

Here’s a question I’d like to throw out to the crowd: what am I supposed to do if I want to keep track of things that other people have uploaded to the web – in short, how do I track other people’s data?

Let me give an example to help explain: I’m at the Future of Web Apps conference (as I was last month), and somebody I’ve never met before takes a picture of me and uploads it to Flickr. I’d quite like to keep an eye on all the photos of me that are on Flickr, maybe to read comments, maybe to show somebody else at some point in the future. What can I do to help me keep an eye on this photo?

Tags!Answer: tag it. You might think that tagging is perfect for this, and you’d be wrong. To continue with the Flickr example: some people have it set up so that nobody can tag their photos, some people let their friends tag photos, and I’ve got no guarantee that the owner won’t remove the tag in a week, two weeks, three weeks time.

I need a way to edit the photo so that nobody else can change it, basically. At the moment, the way I’m doing it (and the only way I can think of to achieve this) is to “favourite” the photo. That’s crap, as it’s obviously not what the favourite feature was meant to be used for.

You might think I’m being anal about stuff which at the end of the day is just "on the Internet", but I think this example highlights a broader problem. I’m stuck for ideas.

Posted at 2:13 on November 15th 2008, tagged as , , , , , with 3 comments

Twitter’s Lacking

I’m not too sure where I stand on how Twitter is evolving and growing at the moment. Guess if I was forced to opine, it would be that they’re not developing, improving or evolving fast enough. I know they’re trying to keep the service simple, but the lack of a few would-be-amazing features (groups, anyone?) makes it seem stale and unloved.

This was prompted by me thinking up ways that they could make the site more useful, primarily in terms of adding more user-generated information while still keeping the original, simple tweet structure. How about a community wiki-esque (oooh, but limited to 140 characters – I just thought of that) system for explaining what the hashtags actually mean. I searched for #pop this morning (it’s a course I’m doing) and it came up with a whole load of results about burgers. I’d love to have been able to hover over #pop in the tweet and see a 140 character explanation of what this place was.

Spam’s an issue, clearly, which is why the system would be community moderated. Once a site has the giant user base that Twitter does, I reckon they could leave a lot up to the users.

Finally, a really, really basic screenshot of the kind of thing I’m thinking about:

New Twitter Feature?

Posted at 11:53 on November 14th 2008, tagged as , , , with no comments yet

Lack of Security

I quite like random little anecdotes/stories/tales, so thought I’d share:

There’s an office here that the porters look after the keys for. If you want to get in the office when there’s nobody else around, you have to ask them for a key; they check your university card against a list of people who are authorised to borrow keys.

So here’s the kicker: anyone can give in a new key list, even if you’re not on the old one. They don’t check, they don’t care. If this was a program, it would be the most horribly flawed code.

Posted at 15:25 on November 13th 2008, tagged as , , with no comments yet

The Shell

Shell scripting is really pretty good fun. I’m nowhere near claiming to be an expert (hell, I’ve been doing it for about three weeks now), but I kind of feel like I’m getting somewhere. Here’s some stuff I’ve been messing around with, hopefully accompanied by some clear explanations that, if nothing else, will help me get my head around it a little better. I’m playing with my chat logs because I’m obsessed with stats (hopefully you’ve figured that out by now).

Redirecting output

One of the most simple things, but it bears noting down. You can redirect the output of the bash shell by using the greater than symbol (>). Let’s build it up:

% ls

Will list all the files and folders in directory.

% ls -R

Applies the recursive -R switch, which will list all the files and folders, as well as any files inside any folders.

% ls -R > output_list.txt

Now we get on to the redirecting output bit: the > part followed by a filename will take the output and put it in the file you named. Here’s the output – not that you care, or anything…

Grep

Grep is something different: a command for searching, basically. I’m going to use it with the file that was created above in order to make it more readable.

% grep hello example.txt

Will search for (and print) the lines containing “hello” in the file text file “example”. Clearly this is a pretty basic use of the tool, but it works. To get a bit more complicated:

% grep .chatlog output_list.txt > filtered_list.txt

Will print all the lines in the output_list file that contain the phrase “.chatlog”, and save them to the filtered_list file.

% egrep .chatlog$ output_list.txt > filtered_list.txt

What’s changed? The egrep just tells grep to apply the -e flag, which will make it use regular expressions for searching. I haven’t bothered trying to understand these. For me, it’s only to add the $ sign to the end of the string to indicate it should only search for that at the end of a line. Here’s the output from the second part. Much easier to read, much easier to do stats on/with…

There you go

Hopefully that helps someone understand something a little better. If I’ve got something wrong, let me know please. I might report back if I can find it in me to manipulate the text file a little bit.

Posted at 20:04 on November 9th 2008, tagged as , , , with one comment

Here’s One I Made Earlier

This is hardly complicated, but it’s something that’s been bugging me. A few minutes later, tada: a script that will open the Last.fm page of the currently playing iTunes track.


tell application "iTunes"
  try
    set theArtist to artist of current track
    set theSong to name of current track
  end try
end tell

tell application "System Events"
  open location "http://www.last.fm/music/" & theArtist & "/_/" & theSong
end tell

–– Alex Muller
–– http://alex.mullr.net/blog/
–– Do what you want with it…
–– Sunday November 9th, 2008

Copy and paste the above into Script Editor (Applications > AppleScript) on the Mac, and hit compile. As the comment in the code says, this is hardly my finest piece of work (at least, I hope it isn’t), so I’m not too bothered what you do with it. Enjoy it, whatever happens…

Posted at 16:05 on November 9th 2008, tagged as , , , , with no comments yet