• Home
  • Projects

Rev Dan Catt's Blog

A random collection of random thoughts

Feeds:
Posts
Comments
« Ornametrics, FRSTEE the Twitter Snowman
My first Instagram Christmas, a nervous step away from Flickr »

Coding and Hosting in the Cloud, Cloud9IDE + Github hosted pages.

23 November, 2011 by Reverend Dan Catt

SecondScreen

I’ve been playing with GitHub Hosted Pages, by porting whatisthelatestguardianheadline.com over to pure JavaScript and setting it up to run on GitHub. You can see the end result (maybe, I’ve only tested it on Chrome) over here…

http://revdancatt.github.com/whatisthelatestguardianheadline/

…and the GitHub page for it is here…

https://github.com/revdancatt/whatisthelatestguardianheadline

…should you want to pick apart my code, or even better make it work on things that aren’t Chrome.

The GitHub Hosted Pages Part

I didn’t realise until just the other day that you could actually host pages on GitHub. I’d seen it done a couple of time but never really paid attention until Michael Brunton-Spall posted his HTML5 + JavaScript slides fork.

I often (well often-ish) throw together quick JavaScript only hacks to play around and end up throwing them up onto a Google AppEngine instance for no particularly good reason other than habit, which of course burns up an instance quota (for various tedious reason I don’t currently self host).

Now, by making a magic branch called gh-pages hosting on GitHub is easy. Setup an index.html file, stick it into your gh-pages branch and (after a short while) there it is being hosted. Here’s the GitHub page for it with the normal folders and files for a minimal webpage.

Github

The nice thing is that I was planning to put more of my javascript (and processingjs) experiments on GitHub anyway, now I get the hosting with it too (or the other way round, by hosting on GitHub I have versioning thrown in). Having version control and hosting that tightly coupled makes me very happy for some reason.

The Cloud9IDE coding part

Now, right off the bat, I’m not really an IDE kinda guy, I like my colour syntax highlighting but I’m not that bothered about all the magic autocompletion stuff, a simple (colourful) text editor is pretty much all I need. With that in mind I gave Cloud9IDE a spin.

It’s just what you’d expect, a text editor in a browser with all the files held on the server rather than your local machine. The magic part comes when you connect it to GitHub, any of your project can be cloned into Cloud9 and then edited, here’s my project in cloud9…

Cloud9IDE

By connecting the IDE to GitHub I can pull over any project I like, work on it, and then push it back over when I’m ready. There’s a Preview option which launches the current page in a browser and because I’m dealing with just JavaScript this is fine.

Creating a new project is easy, go over to GitHub, make a new repository, pull it into the Cloud9IDE and start bashing away. Not a single file hits the local machine, all the files are *handy wavy* over there.

Obviously this pretty much only works for anything that only needs JavaScript and doesn’t need API keys you want to keep hidden, but that’s good enough for me*

I like the idea that I can sit down at any machine with a modern browser, login and start working on my files. Again the tight integration with GitHub and Gloud9′s own collaboration tools make it feel like a good way of working. It makes me feel more like I wish all the project I’m working on could work this way.

Problems and general feelings of woolliness

I have 3 general problems with this setup.

#1

The GitHub integration once you’ve done the initial clone is all (browser based) command line stuff. So I’m still typing ‘git commit -am "some message"‘ and switching branches by hand. I’m used to using GitBox and Kaleidoscope for all my Git and Diff needs, because I like a bit of luxury now and then.

It’d be great if this was more UI based rather than jumping down to type wordy stuff in.

#2

Image upload, or any binary file uploading. You can do it via commands from the annoying virtual command line but it’s a big faff. I ended up (for a different project) pulling the project down to my local machine, adding the images and pushing it back up. Which kind of defeats the whole it’s-all-in-the-cloudness about it.

Both points above are on the Cloud9IDE roadmap so I’m not that worried about it.

#3

What I am worried about though is the whole losing edits and changes bit. Locally the files I’m working on sit within my Dropbox folder. So every time I hit save, which I do often, up they go to Dropbox where they are safe, or at least safer than just on my machine.

If my machine were to die, I could just pop over to another one of mine and pickup from where I left off. In the worst case I’d need to install Dropbox on a new machine and grab the files.

With Cloud9IDE I’m only as safe as my last push command, if I spent the afternoon working, previewing and committing, but not pushing and cloud9IDE went away, I’m only as good as my last version on GitHub.

I’m not yet sure quite how I feel about that.

 

*Well you can do NodeJS stuff and stick things in a private account, but where’s the fun in that?

Posted in general, guardian, hack | Leave a Comment

  • About

    Dan Catt works at the Guardian doing some serious (and not so serious) number crunching. Previously he spent 4 years working at Flickr as a frontend engineer (+stuff), from when it had newly moved to California until about 4 Billion photos later.

    These views do not reflect those of the Guardian or Flickr. Apart from any sweary bits which totally reflect those of Flickr.

    Twitter: @revdancatt

  • Subscribe

    Posts.

  • Recent Posts

    • The last tiny problem I had with Blue Peter Totaliser as a child
    • Guardian Hack Day, Secondary Attention and 24 Hour Drone News Headlines Internet Radio
    • 2012 – A Year in Review
    • Last Friday, in photos
    • Flickr, Instagram, the Social Graph and Interfaces effecting behaviour
  • twitter

    • Of course a news headline broadcast would probably be helped by the guardian publishing some more news headline, 8pm prob not best time. 2 hours ago
    • Yup, giving the 24h drone news @guardian headline radio station another spin, http://t.co/79HzKNkp (24h until it crashes anyway) 3 hours ago
    • RT @mixlrlive: Live broadcast from @revdancatt: "24 hour news drone radio, l..." http://t.co/79HzKNkp #mixlr #live #news #ghack 3 hours ago
    • I think I'm building up to my "How the Adventure Game & Noel Edmonds shattered my believe in TV" cathartic post with small practice posts. 4 hours ago
    • Because I sweat blood to write, a 2nd time: The last tiny problem I had with Blue Peter Totaliser as a child http://t.co/uP1eHu4m 4 hours ago
  • Archives

    • February 2012 (2)
    • January 2012 (5)
    • November 2011 (3)
    • October 2011 (1)
    • September 2011 (1)
    • August 2011 (1)
    • June 2011 (5)
    • May 2011 (4)
    • April 2011 (5)
    • March 2011 (3)
    • February 2011 (3)
    • January 2011 (5)
    • December 2010 (5)
    • November 2010 (6)
    • October 2010 (1)
    • September 2010 (3)
    • March 2010 (2)
    • February 2010 (2)
    • January 2010 (5)
    • December 2009 (1)
    • November 2009 (2)
    • October 2009 (8)
    • September 2009 (5)
    • August 2009 (6)
    • July 2009 (8)
    • June 2009 (12)
    • May 2009 (13)
    • April 2009 (9)
    • March 2009 (14)
    • February 2009 (18)
    • January 2009 (17)
    • December 2008 (17)
    • November 2008 (10)
    • October 2008 (3)
    • August 2008 (4)
    • July 2008 (2)
    • June 2008 (3)
    • May 2008 (5)
    • April 2008 (6)
    • March 2008 (2)
    • January 2008 (4)
    • December 2007 (1)
    • November 2007 (1)
    • October 2007 (1)
    • August 2007 (9)
    • July 2007 (1)
    • May 2007 (11)
    • April 2007 (8)
    • March 2007 (7)
    • February 2007 (10)
    • January 2007 (25)
    • December 2006 (8)
    • November 2006 (32)
    • October 2006 (5)
    • August 2006 (1)
    • April 2006 (1)
    • March 2006 (6)
    • January 2006 (3)
    • September 2003 (1)

Get a free blog at WordPress.com

Theme: MistyLook by Sadish.