i5m

Google Buzz Is (was anyway) Perfectly Private Enough, Thankyou

I’ve missed the boat entirely with this as Google have addressed some of the ‘issues’ now, but anyway I started writing the post so I’ll finish it. There were basically three points I wanted to make:

  1. Spamming of “trending topics” by a plethora of websites / news outlets. Everyone seemed to jump on the Google Buzz Bash Bandwagon at the launch. And although there were legitmate (but realistically minor issues) it was hard to sift these out from the noise.

  2. Privacy is as much the end users responsibility as it is Google’s. Quite awhile ago now I moved to having a ‘formal’ gmail address, which I used for friends and family and job sites, job applications, etc. And also an ‘internet-persona’ address that I use everywhere else. I realised that, when I started signing up to sites like Twitter and Tumblr and it offers to “find people from your address book”, well, that also works in reverse as well! So perhaps I didn’t want a potential employer finding my Tumblr blog or Twitter feed and I had best not mix my real name and an internet persona. I can’t say I’ve been 100% infallible over the years, but as a general rule I have one address for one thing, and one for another.

    So when Google Buzz launched I had no public profile (intentional) with my formal account, no automatic followers and only three people (one of them my missus) I was signed up to follow, none of which are using Buzz. No privacy worries there then.

    Regarding mobile locations, I have to say Buzz mobile does look scarily accurate with locations like “28-43 Somewhere St”. But Buzz makes it plainly obvious that you are posting with location, allows you to pick alternative locations. Or turn off the location altogether. Or make the post private - which isn’t something you can selectively do on Twitter.

    This issue seems like a legitimate one at first: How Buzz Exposes Private Email Addresses in Replies, but it isn’t Buzz’s fault. Anyone who knows you can expose your details if they happen to have them. You have to trust others not to be plonkers.

    The EFF report on Google abusing their position. And as a rule I’d be inclined to believe and trust the EFF, in subjects they are far more qualified than me to speak about. Apart from the bit where they quote the Register as a source. What happened there? El Reg is a good read, but EFF, come on! So Google slightly abused their position. How unsuprising. They are a business afterall. You can’t trust any large corporation (think your employer). You should always safeguard yourself.

  3. I like Google Buzz. Not so much for the social aspect, more for the ease of consolidation of an online presence. It’s something I’ve been trying to do on my websites for years through sidebars, headers and footers, using pre-built javascript snippets, or custom queries, i.e. to say “this is my blog, my internet presence home, but here is everything else I do”. Buzz makes this remarkably easy. I’m thinking of tidying up my website now to take advantage of it. I’ll just keep my blog posts here and link to Buzz, just on the off chance that someone might want to be as nosey as me.

Comments

Java Smack API and java.io.EOFException

I came across this confusing error using the Smack API:

java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream> from line 1, parser stopped on END_TAG seen ...EZah/08YglY=\' xmlns=\'http://jabber.org/protocol/caps\'/></presence>... @1:2797
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1144)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:36

Turns out this was because I was trying to send a message containing the string “&nbsp;”.

I was pulling data from an xml document, that unfortunately rather than containing nothing where there was no entry for an element, contained four “&nbsp;”.

It seems even trying to pass one makes Smack throw a major wobbly.

Figuring out the error took ages. Fixing was easy as I just stripped out all “&nbsp;” characters.

Comments

Very handy, and not as scary as I first thought. I’ll add that to fix the error I had to replace the svn-base file and the file itself. E.g: say I have this directory:

+-trunk/
 |
 |-file.java
 |
+-.svn/
    |
    +-text-base/
     |
     |-file.java.svn-base

I had to copy both file.java.svn-base and file.java in order to resolve the checksum mismatch.

Comments

Related to the previous post, I guess I should mention the rest of my Kodachrome shots. With the demise of Kodachrome I knew I had to shoot one roll before it was gone for good, and realistically I knew I&#8217;d have to limit myself to just one roll. So I was determined to make it a good one.

I would have liked to have got it scanned sooner, but I have to try and spread out the film costs through the year. With the hiccups I had with my Praktica and Yashica over Christmas I was feeling pretty fed-up with my photography so I decided now was the right time to get the Kodachrome scanned as I knew that would cheer me up.

Related to the previous post, I guess I should mention the rest of my Kodachrome shots. With the demise of Kodachrome I knew I had to shoot one roll before it was gone for good, and realistically I knew I’d have to limit myself to just one roll. So I was determined to make it a good one.

I would have liked to have got it scanned sooner, but I have to try and spread out the film costs through the year. With the hiccups I had with my Praktica and Yashica over Christmas I was feeling pretty fed-up with my photography so I decided now was the right time to get the Kodachrome scanned as I knew that would cheer me up.

Comments

I took this last summer whilst out for a bike ride, but it was on Kodachrome so it took awhile to come back and then the slides just sat in my wardrobe until I had the cash to send them off for scanning. So eight months later I&#8217;m trying to remember where the hell I took this. All I can say is &#8220;Who needs GPS when there&#8217;s Google Street View&#8221;

I took this last summer whilst out for a bike ride, but it was on Kodachrome so it took awhile to come back and then the slides just sat in my wardrobe until I had the cash to send them off for scanning. So eight months later I’m trying to remember where the hell I took this. All I can say is “Who needs GPS when there’s Google Street View

Comments

Comments

I had a clever idea to use my flash with my Yashica, and use a low iso film so I could shoot wide open (My flash is only basic so aperture is determined by film speed). Unfortunately it all went a bit wrong. It seems I over diffused my flash, making it as effective as a candle. This photo is the best recovered.

I did not have a brilliant Christmas for Photograpy: My Praktica 35mm shutter broke, but in a clever way so that it took me four rolls of film to realise. Aaargh!

I had a clever idea to use my flash with my Yashica, and use a low iso film so I could shoot wide open (My flash is only basic so aperture is determined by film speed). Unfortunately it all went a bit wrong. It seems I over diffused my flash, making it as effective as a candle. This photo is the best recovered.

I did not have a brilliant Christmas for Photograpy: My Praktica 35mm shutter broke, but in a clever way so that it took me four rolls of film to realise. Aaargh!

Comments

Java, Vim and Windows

I’ve been having a bit of a play about with Java at work and creating a Jabber Bot. It’s yet-another-side project of mine, but it is for work and about as legitimate as side projects can get. It’s been a nice intro to Java as there are plenty of examples out there and I actually have a real app to produce at the end; I find just doing tutorials gets me no where.

After I got over the initial shock of squiggly brackets (It looks way harder than it is), I’ve actually learnt a couple of things in a couple of weeks that I’ve not learnt in five years of playing with Ruby (the benefit of Java being so fussy):

  1. Using Classes. Somehow I’ve managed to be remarkably lazy in Ruby and write an app with a thousand lines of code without really having to use classes (I use just one, based on this to post arbitrary data with Mechanize). Other than that the code is just all methods. Although I have now relented and split stuff into modules.
  2. Logging - I’ve never logged anything in Ruby, having just used IRB for all my developing and debugging.

One of the example programmes I was working with used System.out.println to debug, but I quickly found I should be using an actual logger. I went with the built-in logger:

Logger.getLogger("global").fine("Here's what's happening: "+stufftooutput);

Because then you can control/grade which messages get shown according to their severity:

Logger.getLogger("global").setLevel(Level.FINE);
Logger.getLogger("").getHandlers()[0].setLevel(Level.FINE);

I found out I had to use both lines above to change this setting, rather than just one command. Don’t know why.

It seems every tutorial sets out by telling you to get an IDE, but you really don’t need to for simple programmes. I just used Vim and a couple of little tricks on Windows. To deal with classpaths, I stored them in a text file, so I could read them into an environment variable. I.e. create a empty text file called “classpath.txt”. Open it in Vim and then read in the directory of the jar files you are referencing:

:r !dir /b

Then do a quick find and replace to get this all on one line, add in necessary path prefixes and semi-colons to separate. Then in Command Prompt I could just do this each session, to read the classpath into an environment variable:

set /P cpstr=<classpath.txt

Compiling and running was then dead simple from the Command Prompt:

javac -cp %cpstr% -d ./bin ./src/File.java
java -cp %cpstr%;bin File

If you want to be ultra-Vimmy and not leave Vim to run commands in the Command Prompt, unfortunately I found you couldn’t do this in Vim:

:!set /P cpstr=<classpath.txt & javac -cp \%cpstr\% etc

as it just puts “%cpstr%”. Even though I was escaping Vim’s use of the % to reference the current file. Yet if you do

!:echo \%HOME\% 

it does what you expect. Grrrrrrr….. You might be able to get around this using setx (to set user environment variables), but you would have to run two separate commands, as setx only affects future Command Prompt windows. You can create a little batch file to work around this, i.e. a file “c.bat” containing:

set /P cpstr= <classpath.txt
javac -cp %cpstr% -d ./bin %1

then in Vim, assuming correct directory, just do

!c.bat %

and create a similar batch file to run the app. Although I found you have to write the actual class name from Vim:

!start j.bat classname

as % includes path and extension (%< removes the extension, but it still includes the path. Aaargh!)

Comments

Kindle Books

A different version of what I’ve posted elsewhere, but I’ve recently bought, and now finished reading, my first Kindle book (bought on the iPod/iPhone Kindle app). I don’t know exactly why, but this feels more momentous than when I first purchased music from iTunes - I guess it’s something, but not completely, to do with the fact that I’ve been comfortable listening to music on my computer ever since I had an iSub (I miss that, that was a lot of fun!), but to read a book, well, it’s not until hand held portable devices have come along that I’ve felt able to read a book (on a ‘computer’). Prior to buying this book, I had read free Creative Commons versions of Blood, Sweat and Tea, and the sequel. Which is why I say it’s not just the reading of an electronic book that made this feel momentous; It’s something to do with buying it as well.

The book itself was good, but then I’ve liked Octavia Butler for a long time. Wasn’t that keen on the thought of a vampire book, but she did a good take on it. It’s a shame she’s not around to write the sequel.

It’s also a shame about all the typographical errors that seem to plague Kindle books (there’s even a Tumblr blog: Badly Done Kindle Books about it): Missing spaces; spaces where there shouldn’t be; spelling mistakes; hyphernations for line breaks, but now in the middle of the line. There aren’t loads, not enough to ruin the book, and no where near as bad as the formatting of the free ebooks I read, but more than I’d expect from a printed version. And a 2nd hand print version is a lot cheaper than a Kindle book, plus has no DRM.

Comments

guillee:


I’m done: Star Wars opening crawl, using only HTML &amp; CSS. Caveats: It only works in Snow Leopard in Safari 4.0.4 and the WebKit nightly. Nothing else supports the CSS 3D transforms and animations I used, but I just wanted to see if it could be done.

(Here’s a video of it on YouTube, in case I run out of bandwidth for the day and it stops working.)


Wow, this is ace. Almost working on Windows in Chrome/Chromium development builds as well, it&#8217;s just that the text appears in a rectangle shape, rather than the trapezium above.

guillee:

I’m done: Star Wars opening crawl, using only HTML & CSS. Caveats: It only works in Snow Leopard in Safari 4.0.4 and the WebKit nightly. Nothing else supports the CSS 3D transforms and animations I used, but I just wanted to see if it could be done.

(Here’s a video of it on YouTube, in case I run out of bandwidth for the day and it stops working.)

Wow, this is ace. Almost working on Windows in Chrome/Chromium development builds as well, it’s just that the text appears in a rectangle shape, rather than the trapezium above.

Comments