The Elegant Chaos Blog

October 07, 2010

Well, the electrical work seems to have finished, and other that a bit of local DNS weirdness that I’m experiencing here, everything seems to be ok.

Let me know if you have any problems viewing this site.

more...

October 06, 2010

We’re having some electrical work done here at Chaos Towers in the next day or two*, which I fear will mean that our servers may be coming and going a bit, since they are hosted locally.

So if everything disappears for a while on Thursday/Friday, fear not - it should be back by Saturday at the very latest.

(* it’s amazing how much power killer death rays draw - turns out that world domination can only be achieved with three-phase power**)

(** actually, that’s a lie, we just need a new fuse box***)

(*** or is it…?!)

more...

October 01, 2010

You might have been wondering what I’ve been working on since leaving Sports Interactive.

Yes, ok, you haven’t been wondering at all, you’d forgotten that I exist, but I’ll tell you anyway…

The answer is “lots of stuff”.

One thing I’ve been doing is an iPhone application for my friends at Pod Point. Pod Point make cool high-tech charging posts for electric vehicles, and they wanted an application that allowed users to find the nearest post on their iPhone. Version 1 of the application is done, but isn’t in the store yet. Unfortunately there are some issues with having a product that legitimately has the word “pod” in its name…

Something else I’ve been working on is Neu, which I’ve blogged about a little bit before. It’s quite a small application, but I’ve used it to get up to speed with a number of Cocoa technologies. I’ve been juggling time between projects recently, but the proper release version of 1.0 should be coming just as soon as I finish sorting out my online store.

I’ve also been working on a number of my own iPhone projects. Some of these have been vehicles for learning about one or other iPhone technology, but others are intended to make it into the store as fully fledged products. The one I’m nearest to completing at the moment is code named “Ici”, and it’s a sort of special purpose Twitter client. There are quite a few other projects on the drawing board too.

All of this development has also resulted in me developing a fair amount of shared libraries and utility scripts, many of which can be found on either my public git repository or the Elegant Chaos git repository.

I’m the kind of programmer who likes to build tools and generalise code into libraries. If taken to extremes this can distract from the product that I’m working on, but it can also lead to serious increases in productivity. Computers are great at doing the same thing again and again, yet I’m always amazed by the number of programmers who are quite happy to continue to do tasks repeatedly because they don’t think they’ve got time to write a script to do it for them.

Of course there are times when you just have to knuckle down and finish the job you’re on, and I’ve certainly learnt something from the Extreme Programming mantra of “the simplest thing that works”, but like most things in life it’s a balancing act, and there are times when taking a day up front will save you a week or a month later.

Luckily, most of my time pressure at the moment is self-imposed, so I’ve had the luxury to write tools and generalise code into libraries. I really hope that this pays off, but even if it doesn’t, I’ve had fun along the way.

I’ve made some of this stuff open source, not because I particularly thing that it will be an off-the-shelf solution for anyone, but more in the general spirit of sharing. In particular my Cocoa libraries ECFoundation, ECTouch and ECAppKit are things that I am using myself, and will continue to maintain for my own benefit. They aren’t brilliantly documented at the moment, but my plans do include producing some better documentation eventually, for my own benefit and for the eventuality that I end up collaborating with other coders on a project that needs them. It would be hard for people to use all the code in these libraries right now without knowing what it does, but some chunks might come in handy. If you find something that you’re interested in, feel free to get in touch.

[Updated Feb 2012 to correct some broken links]

more...

September 30, 2010

A while ago in my post Managing Dependent Libraries with Git I talked about some shell scripts that I’d developed to help me to work with the git subtree command.

Since then I’ve updated them quite a bit and rewritten them in python, so I thought I’d revisit them slightly on the blog… There is now just one command line command ‘subtree’ which takes a number of options, like so:

> subtree <command> <tree>

Tree Configuration

The tree parameter is used to look up a configuration file at the path

subtrees/<tree>.subtree

relative to the root of the project.

The configuration files are very simple, and basically just define three variables which the commands use. For example, the ECFoundation.subtree file for my foundation library looks like this:

TREE="ECFoundation"
LOCAL="frameworks/ECFoundation"
URL="git://github.com/samdeane/ECFoundation.git"

The first variable gives a name for the branch that the git subtree system will use to track the module. The second variable gives a location to place the subtree, relative to the root of the local project. The third variable gives the URL location of the repository containing the master copy of the module.

Subtree Commands

Add

> subtree add <tree>

This command grabs a subtree from a remote depot and adds it to your project.

For example, when I first set up a new project and want to import ECFoundation, I first make a “subtrees” directory and copy into it ECFoundation.subtree. Next I cd into the root folder for the project in the terminal, and run:

> subtree add ECFoundation

If all goes well, I end up with a new folder called frameworks/ECFoundation/ containing the latest version of the library.

Push

> subtree push <tree>

This command pushes back local changes to the remote repository that the subtree came from.

For example, if I’ve changed ECFoundation in my project and I want to push my changes back to the master repository, I again cd to the root folder of the project, and run

> subtree push ECFoundation

Pull

> subtree pull <tree>

This command grabs any remote changes to the subtree and merges them into the local project copy.

For example, if I want to pull the latest version of ECFoundation into my project, I cd to the root folder of the project and run:

> subtree pull ECFoundation

Log

> subtree log <tree>

This command runs git log over the local directory containing the subtree.

Commit

> subtree commit <tree>

This command runs git commit on just the local directory containing the subtree. It’s a good idea to commit local changes to the subtree separately from other project changes, so that you don’t end up with weird project-specific commit messages when you push back subtree changes to the master repository for the subtree.

Status Of These Scripts

These scripts are still pretty simple (though more complicated than they were when I started), but they do the job for me.

You can find them on github here.

Comments and improvements to the scripts are welcomed!

more...

September 08, 2010

I’ve just released a new version of Neu - 1.0b20.

Recent changes include a new “Launch at Login” preference, and a new UI for adding, removing and editing templates.

I’ve also started adding the infrastructure for purchasing the application - it’s free a the moment but I intend to charge something for it once it is officially released.

Whilst it is still free, if you would like to help me test it, please download it. If you’d like a free license, to help test the registration system, send me some feedback and in return I’ll send you a license file which will continue to work once the application has been released.

more...