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

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

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

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

Year End Review - Code

Like photography, I’ve ended the year better skilled than I started it. Which feels good. But in both subjects I’d still consider myself a beginner (or always in Beta!)

Highlights:

Much of the coding I do are little side projects at work, so can’t go into details, but:

  • I’ve got better at Ruby. I still stop when I get to modules, classes, etc - I could (and have) figure(d) it out, but I haven’t had a real need yet (keep it simple and all that). Since I’ve mainly been using Shoes, and quick and dirty coding is fine there.
  • Javascript and user scripting for Chrome. The interesting thing here is I moved beyond moaning and bug reporting about the intranet not working fully in anything else but IE6 and started using userscripting to actually fix stuff.
  • Starting with Java. Not finding it as easy as Ruby, but it’s certainly easier porting a concept from one language to another rather than starting completely from scratch. Looking to do a Jabber chat bot so a nice small enough project to learn on.
  • Oracle SQL. I’d done a tiny bit of MySQL before, but got the chance to write a query for an Oracle SQL database. Easier enough once I twigged the differences.

Using Shoes at work has also lead me to look at the Shoes source code:

ashbb actually did all the leg work here in actually fixing Shoes for Windows, but just trying to follow his work has been an achievement for me.

  • Even managed to dabble in a bit of C in modifying Shoes to provide Key up and down on Windows. I was, of course, subsequently totally eclipsed by ashbb, but I had a go, and that’s the main thing. And the thrill of editing C code (never been near C before), compiling and actually managing to improve the functionality of a programme, was ace.

Next year plans:

All coding I do is work based - it’s the only place I have time - just going to continue with the above. Hopefully be able to help out more with Shoes.

Comments

dhotson:

Pretty old, but worth a re-post I reckon.. :-)

This post has been gestating for too long: I was going to start with “The problem I have with side projects is that all mine seem to be at work”. This was a problem in my head because I felt I needed a side project outside of work, something visible to ‘show off’, but in the process of writing I realised that was only half true, and not necessarily a problem.

With the work thing: yes, unfortunately that means my employee gets all rights to them. Which means I can’t really share source code and have something out there as bragging rights. However, even if I could share, their relevance outside of work would be minimal, and the main benefit I would get would not be bragging rights, but rather feedback along the lines of “Gosh, that’s a really bad way to write that, you should do it like this…”. So, I am missing out on something to showcase, ok, but worse I’m missing out on feedback - personally I consider that the bigger negative. However, on the plus side it’s currently the only place I can find the time to do stuff and, equally as important, I’m inspired to do stuff: There’s an odd mix of old and new technology. Chuck in the fact that IE6 is still the defacto and designed for web browser on the intranet, and there’s plenty of scope for improvement and innovation. Especially since these are tools you have to use everyday; When you are using a tool or a bit of software, everyday, to get a job done, it is very easy to find inspiration to improve or fix things (In fact at the moment I have too many side projects at work).

I have also found this true in the past. The term “side project” not only means something you do as an aside, but reflects that these projects grow out of the side of something else. So my foray into programming started with things like visual basic scripts for CAD software, or javascript macros for FEA software I was using. Outside of work, back when I was using Final Cut Express I wrote a FXScript that would benefit me day to day.

So it seems it’s not all bad having work based side projects: I may lose out on an external showcase, but it does bring the benefit of internal networking. And seeing as how my current role is not within programming, not even within IT, but that is something I’d like to move into, that’s not necessarily a bad thing.

As to why there is a lack of side projects outside of work, well I’ve already alluded to above. One of the biggest is that I don’t use a bit of software any more to the extent that I used FCE and so I’m not inspired enough to fix or improve anything. Second biggest is probably time. And the third issue is that at home my main computing platform is now an iPod Touch; which, although a great time killer, is perhaps not so great a productivity tool. (You can’t program on it. Yet.)

When I first started thinking about writing this I was worrying about finding a side project outside of work, and thinking that perhaps because I’m mainly on an iPod at home I should go down the route of iPhone apps (although it would have to be a web app, since I can’t get on my mac to develop…). But for one I have NO IDEAS and two, well it doesn’t matter. As long as I’m using my brain somewhere.

Comments

New Tumblr iPhone/Touch app

A quick test from the new app - native editing - Woohoo!

[edit] And it does Markdown.

[edit 2] Not so happy - seems to want to tweet my posts even when I’ve got that preference turn off. Spammy.

[edit 3] Have removed all Twitter settings from Tumblr account, that seems to have solved the problem for now.

Comments

Google Wave

I didn’t bother registering interest in this when I first heard about it because I was perhaps a bit too honest when thinking about the option: “Enlist me! I’ll report bugs and give feedback (e.g. user surveys)” *. And also because I didn’t think there was much chance I’d get in anyway.

However, all the news about it piqued my interest too much and so went back to register a couple of weeks ago. They must really be opening up access as I just got in. After the initial excitement (well new toys are always exciting) I’m now disappointed - not with Google Wave itself, rather that I don’t have a decent use for it. And that’s not because it’s not useful itself - this would be great at work for collaboration, but there’s NO CHANCE we’d be allowed to use it - I can think of a couple of useful work cases:

  1. Would be great combined with WebEx for discussing presentations. For instance at the moment we tend to present a few slides via WebEx then switch to chat/open up the phone line to discuss. Wave could be used here instead to discuss, share, show examples, modify examples and collect feedback.

  2. It would be great in meetings with various remote colleagues where we are actually trying to get work done (you know one of those rare meetings) E.g. outlining presentations. It would be superb for this!

For non-work use I can again think of a couple of use cases, but that aren’t everyday occurrences:

  1. Collaborating with, or providing feedback to virtual-friends. Wave would be much better than a forum for this as it would be possible to edit the original item, but also leave comments, etc. Not as good as markup functionality found in Word or OpenOffice (it isn’t obvious to see who has modified what), but it is real time - you can see who is editing what at that instant, an so you don’t lose time duplicating someone else response. Google Docs is an alternative for this kind of collaboration, but isn’t real time like Wave and Wave also has the advantage of including messages to collaborators within the same Wave, rather than having to use a forum or emails, etc to discuss.

  2. Collaborative code editing. Wave has great potential here. I.e. doing something like subethaedit which although a great tool is constrained in a way by being OSX only (Ok, there are alternatives, but Wave will bring this to the masses - I hope!). Take the Shoes project as an example: It’s Windows, Linux and OSX with native and cross platform code. Subethaedit can’t be used here. But GoogleWave would be ideal.

Of the alternatives I guess Etherpad comes the closest because it offers permanence like Wave, i.e. you can edit real-time collaboratively, but the document is also ‘hosted’ centrally so you can all go back to see it in it’s current state and do non-collaborative editing. But then Google Wave will offer much more than Etherpad and can be used for more than colloborating on documents - it already has better code support:

Ok, although nativley it isn’t really suitable for collaborating on code, there are two extensions that allow you to do so:

  • kasyntaxy (kasyntaxy@appspot.com) is a bot that does syntax highlighting on blips
  • CodeSnippet (search with:public codesnippet) is an Gadget that does syntax highlighting with line numbering.

Both are useful. Kasyntaxy would be better for realtime collaboration with more than one person editing a blip, although there is a bit of a delay in it applying the syntax highlighting. Whereas CodeSnippet looks better, offers line numbering and would be better for wiki-style editing.


* Turns out I needn’t have worried Google Wave Product Ideas has already collected over 5000 ideas so pretty much most of the bugs or suggestions you come up with will have already been logged, all that’s left to do is vote them up/down.

Comments