Category Archives: Miscellaneous

Why iCloud isn’t Going to Kill Dropbox

One of the most exciting new features in iOS5 is the iCloud. It is a very cool way of easily making it possible for iOS applications to sync data to the cloud. Apple provides an easy to use API which makes the remote saving of data as easy as saving a file locally.At a first glance in would seem that this would be the dropbox killer. A really frequent use case for many people is for dropbox to be used with their iDevices. Using dropbox to store their data remotely.

Apple as usual isn’t chasing what their competitors do. Instead they are walking their own walk, and doing what makes sense in their environment. They aren’t trying to provide the general file storage and sharing capabilities that dropbox provide, instead focussing on making it easy for a single “application” and “user” to share it’s files between devices. The advanced folder sharing capabilities of dropbox, and the independence of files and applications provided, aren’t given by iCloud. Apple let’s you store your stuff on the cloud, but keeps things “sandboxed” to your application.

There’s three key terms above: application, user, and sandbox.

  1. An application is defined by the application key provided by apple. Each application has it’s own unique key.
  2. A user is specified using an Apple ID. appleid.apple.com . This is the id that you use for interacting with apple to do things like buy stuff from iTunes etc.
  3. A sandbox is a way of providing limited access to a particular resource. The apple sandbox is a tight one, coupled to the application id. Applications on iOS devices have the ability to interact with files on the local filesystem, but only within their local sandbox. They are not able to share files between applications.

The sandbox has been continued with iCloud. Applications can only access files within their own sandbox. While it is possible to share files between a laptop, an iPhone and a iPad easily, it is not possible to share files between two different applications. Also iCloud does not support sharing files between users. These two key limitations are why iCloud is not going to replace dropbox.

The Art of Community – Jono Bacon

The Art of Community provides good coverage of community, helping readers to think about building a community and the tasks and work involved in doing so.

For me this book comes at a good time as I step into a new role at Ephox, leading our JavaScript and TinyMCE work, looking at getting involved with the TinyMCE community and thinking about how Ephox can best get involved with enterprise and the greater community.

Jono writes well making the book a good read, presenting his experience and thoughts very clearly and coherently.  The book makes good use of examples and is definitely readable. It struck me as useful in my early stages of thinking about community (myself being earlier in thinking than the community I’m getting into), and had information and examples pertinent to much bigger communities as well. I’ve highlighted and bookmarked many  pages in iBooks for my future reference, as I expect that the topics will come up in future communities that aim a part of. Many other parts matched and confirmed my experiences and conversations that I’ve had with different people about community in the past. In particular the comments around programmers and mailing lists rang true.

Overall I wouldn’t hesitate to recommend the book to anyone who is interested in the topic.  The Art of Community provides good information and food for thought around building communities.

Inter-Servlet Communication using a request dispatcher

In code, here is how to pull in data from a different JEE web-app

String pathToWebApp ="/otherApp"
String pathToServlet ="/myServlet" //relative to the otherApp context
ServletContext configContext = context.getContext(pathToWebApp);
RequestDispatcher dispatcher = configContext.getRequestDispatcher(pathToServlet);
dispatcher.include(request, response);

Rule Zero for writing a JavaScript Widget

If you are adding ID’s you are doing something wrong.

This will cause issues for people who want to have multiple copies of the widget in
the page.  There is to much risk of ID collision.

There is always a way of navigating down the tree to find children (Especially if you
are writing a JQueryUI widget).

Classes are ok – and use them to find children – but DO NOT add an ID.

(This blog post written as a public service, after having seen way to many JQueryUI widgets that don’t get this right).

Mounting a folder on OSX over SSH

It’s suprisingly easy to mount a folder via ssh. This is especially useful when you need to access something via ssh tunnels. Following is the process to follow when using an ssh tunnel.  To do without the tunnel, remove step 3, and make the sshfs command directly reference the server in step 4.

Step 1) get and install macfuse http://code.google.com/p/macfuse, along with the ssh filesystem http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS

Step 2) create a folder to mount to. mkdir -p /mnt/remote

Step 3) setup the ssh tunnel: ssh -C -L 2022:server_with_data_to_get:22 ssh.tunnel.server (going into server_with_data_to_get via ssh.tunnel.server, making this available at localhost:2022).

Step 4) Use sshfs to mount the drive: sshfs -C -p 2022 username@localhost:/path/to/folder_to_mount /mnt/remote (connect to the localhost -ssh tunnel end point- mount remote folder /path/to/folder_to_mount to the local folder /mnt/remote).

Executing Play! from outside of Play! code

As I’ve said earlier, I think that the Play! framework is lovely. It makes it easy to develop and write code quickly. One of the ways that it enables this is through performing runtime byte code enhancement of the code. This makes execution of your code somewhat non-trivial when coming from a non-Play! context. Play! aims to meet all your needs, but use cases exist where it is important non-Play! code with Play! code, and have your non-Play! code call into Play!

Having said that this is non-trivial, it is reassuring to know that the process to do this is very straight forward.

  1. Create a subclass of play.Invoker.Invocation.
  2. Override the public void execute() method.
  3. Call the run() method of the invocation.


Invoker.Invocation invocation = new Invoker.Invocation() {
public void execute() {
//do stuff with play here
}
};
invocation.run();

With this simple snippet of code, it is possible to have non-Play! code easily and cleanly call your Play! application code.

The Shack — Book Review

I have just finished reading the book The Shack. Through its powerful narrative story, The Shack presents the most powerful images of God that I have seen for a long time. The book challenges the reader's assumptions and views of God and the bible. I'd highly recommend it to anyone remotely interested in God, Jesus and the Trinity. When making this recommendation, I'd only add that this is a book of fiction, that doesn't have everything perfect about God.  IMHO the best place to understand and learn about God is the bible, it is the direct source.  Reading the accounts of the life of Jesus for yourself as an adult will challenge mosts peoples perceptions and understandings of Jesus. The Shack been touted as a modern day successor to The Pilgrim's Progress, a title which (while somewhat bold) is at least partially justified. It's a fresh, unique and thought-provoking book that manages to touch the heart in very real ways

Bayside House For Sale

My father-in-law is experimenting with selling his home privately. I’m not sure how it will go, but it will be interesting to see how the internet helps make it all happen. He’s started with an early launch of the website, before sending it out to some of the relevant Real Estate sites soon.

If you are interested in having a look at the site he put together, or if you are interested in buying a house in the coastal suburb of Wynnum, in Brisbane, Australia, take a look at Bayside House For Sale.

UCSB iCTF 2008 Notes Before Sleeping

Another UCSB iCTF is over, and I'm once again wishing that the earth was flat.  It is a fun competition, but entering from Australia is a pain when the competition starts at 2:00AM AEST.

Thanks to the guys at UCSB for a very different image, and competition again.  The imagination and effort that goes into creating the images is always great.  The delivery of a PCDos image to start the competition off was a nice touch.  It was somewhat frustrating that the preparation work put in by our network infrastructure team went to nothing, but the idea of each team having an independant network to work on was good.

My biggest lesson for the night was that google is a great tool for looking up the sources for md5 hashes. google: md5hashstring will often return the source string for the md5 hash.

My other discovery was the power of nc, and just how bad allowing shell code to be executed is (php exec combined with system and nc allows really nasty attacks — especially when the server is configured to allow them).

A combination of firefox plugins, and Java with HTTP Client were my primary attack tools this year. I was pretty happy with the setup, missing one or two plugins that some others on my team had, but overall it worked pretty well for me.

Overall it was a good night out.  I'm shattered now, and off to bed.  I might either update this or post a followup after getting some sleep.