Early Spring in Bourne Woods, Lincolnshire

19 03 2011

Today was my last day in Lincolnshire before I return to the hustle and bustle of London. To make the most of my last day, we ventured into Bourne Woods, where I was lucky to spot a lot of signs of early autumn! Four of my photos from the day are below – please see them on Flickr for full descriptions :)

Wood Anemone [Anemone nemorosa]

Peekaboo

Comma Butterfly [Polygonia c-album]

Common Toad [Bufo bufo]





Sunny Spring Afternoon in Lincolnshire

18 03 2011

It’s my penultimate day back in the Shire and the sun has finally emerged! I ventured out into the garden with Amber, and inbetween playing fetch with her, got a few photos:

Sparrow

Snowdrop

Afternoon Snooze

Frog spawn

Amber's Pig Impression





Spring has Sprung!

14 03 2011

Spring has officially sprung in rural Lincolnshire! This pretty pink primula has flowered in my parents’ garden, along with many other delicate flowers.

I tried to keep this shot bright, but softly focussed to give a sense of spring/summer daydreams. :)

Pink Primula





Frampton Marsh

20 02 2011

This weekend, I’ve been back in rural Lincolnshire, visiting my family in Donington. While here, I hoped to get some time for photography, and so today, my Dad and I went to Frampton Marsh. It was a lovely day out, with Dad impressing me with his knowledge of birds. I still have a lot to learn!

Frampton Marsh is an RSPB reserve near The Wash; on the low-lying, flat, water-logged plains of south east Lincolnshire. This whole area is mostly reclaimed marshland and fens, so is great for wildlife photography.

As per usual, the February weather was grey, dark and sun-less. Not the best conditions for photography, but I still managed to get a few decent shots.

Here are the three I kept. Please click them through to Flickr for full descriptions and details of the birds:

Male Reed Bunting in Winter Plumage

Open Space

Barn Owl





Richmond Park

12 02 2011

Today, I spent what was mostly a cold, grey day (yet again!) in Richmond Park with some friends. While the conditions weren’t great for photography, we were lucky to stumble across some deer just as the sun made an appearance! Cue lots of sneaking about on my knees in the mud with my camera. Always good fun!

Richmond Deer 7

Richmond Deer 6

Richmond Deer 5

Richmond Deer 4

Richmond Deer 3

Richmond Deer 2

Richmond Deer 1

And a few that aren’t of deer! One of a jackdaw, and one of Emma’s dog, Phoebe :)

Jackdaw

Phoebe





Wildlife Photography Course at WWT London

6 02 2011

Yesterday, around 10 of us went to WWT London for a wildlife photography course led by Iain Green. I was very excited to meet everyone and learn some tips from a true pro! It was very grey, and blowing a gale all day, but I was glad of this as these are the conditions I most needed help with.

The 6 hour course was spent wandering the entire of WWT London, taking photos and being offered advice where needed. I found it very valuable! And Iain was kind enough to let me borrow his 1.4x extender to use with my 100-400mm lens. Gave me some great views of the pair of peregrine falcons sitting on a distant island on the lake!

Thanks very much to Iain, WWT London, and the rest of the people on the course for making it a wonderful day :)

Here are my best shots from the day:

Parakeet

A Pair of Peregrines

Magpy

Heron

Spreading Your Wings

Mating Dance of the Geese

FIGHT!

Edit (Tues 8th Feb)
Adding this extra shot at the request of Iain. Personally, I don’t think it’s sharp enough, regardless of motion blur and water splashes! Must try harder! :)
Splash Landing





Taking Flight

16 01 2011



Taking Flight

Originally uploaded by Cat Burton


A windy, rainy, dark day is perhaps not the best day to practice my wildlife photography! A three hour trip to WWT London resulted in lots of unclear, noisy images. This one of a goose taking flight was the best of a bad bunch!

Bring on the spring and some sunny days! :)





SmartFoxServer 2X – Example Java Extension for Client-Server Communication (via Events and Requests)

11 01 2011

Over the last two days, I’ve been playing with multiplayer Flash applications using SmartFoxServer 2X. Having got the basic app up and running, the next step was to get events and requests (including data transfer) working between client and server. I spent a lot of time today reading over documentation, forums and apis, only to find there wasn’t a quick example of what I needed. So, for the benefit of the internets, here’s one I made earlier…!

Overview
In this example, we have part of an AS3 file used in our client application. The client attempts to connect to the SmartFoxServer 2X instance and join a room. Once we’ve joined the room (I’ve trimmed out all the necessary event listeners in the example, but they’re easy to work out), the server will send a response to the client with some data. On the client side, we’ll dispatch an event for the server to listen to, resulting in a message displayed in the SmartFoxServer console.

The Java Extension Classes
We’ll set up 3 java classes. One is the main extension class, the other two are our event/request handlers that are called as a result of server events or client requests. The key elements from the classes are blow:

Main Class: SimpleSmartFoxServerJavaExtension. This is the main extension class and is where we’ll set up our handlers.

package simple.test;
public class SimpleSmartFoxServerJavaExtension extends SFSExtension
{
       @Override
       public void init()
       {
               trace("Initialising SmartFox Extension example");
               addRequestHandler("example_request", SimpleRequestHandler.class);
               addEventHandler(SFSEventType.USER_JOIN_ROOM, UserJoinedRoomHandler.class);
       }

       @Override
       public void destroy()
       {
               super.destroy();
               removeRequestHandler("example_request");
               removeEventHandler(SFSEventType.USER_JOIN_ROOM);
       }
}

Example class to handle client requests

package simple.test;
@Instantiation(InstantiationMode.SINGLE_INSTANCE)
public class SimpleRequestHandler extends BaseClientRequestHandler
{
       @Override
       public void handleClientRequest(User arg0, ISFSObject arg1)
       {
               trace("We've just handled the example_request that was dispatched by the client");
       }
}

Example class to handle server events

package simple.test;
public class UserJoinedRoomHandler extends BaseServerEventHandler
{
       @Override
       public void handleServerEvent(ISFSEvent arg0) throws SFSException
       {
               User user = (User)arg0.getParameter(SFSEventParam.USER);
               trace("Event Received. User has joined the Room: " + user.getName());

               //Same string as per SmartFoxClient's onExtensionResponse() function.
               //Returns some mock data to the client
               send("server_return_data", getReturnData(), user);
       }

       public ISFSObject getReturnData()
       {
               ISFSObject returnData = SFSObject.newInstance();
               returnData.putInt("foo", 123);
               return returnData;
       }

}

So once we’ve got our basic java classes written, we’ll want to update our ActionScript 3 class to work correctly with these examples…

The AS3 Code
Here is the shortened (there’s no event listeners. You’ll need those!) code for working with events/requests. To save space in the example, I’ve bunched everything into the constructor with comments. Each step should have its own event listeners to check for successful completion before progressing.

public class SmartFoxClient
{
       private var smartFoxServer : SmartFox;

       public function SmartFoxClient()
       {
               smartFoxServer = new SmartFox();

               //I'm not including the standard login etc events, just the one for listening
               //for the example server extension responses.
               //We're going to connect to a room. Once we've connected to the room ok, the server should
               //dispatch an extension response via UserJoinedRoomHandler, which is caught in the
               //onExtensionResponse() function below.
               smartFoxServer.addEventListener(SFSEvent.EXTENSION_RESPONSE, onExtensionResponse);

               //Connect to your server instance
               smartFoxServer.connect("localhost", 9933);

               //Once connected (use event listeners), we want to Login to a SmartFoxServer Zone:
               smartFoxServer.send(new LoginRequest("MyUsername", "MyPassword", "Zone, e.g SimpleChat"));

               //Once logged in to the zone (again, use event listeners), we can join a room:
               smartFoxServer.send(new JoinRoomRequest("MyRoomName"));

               //At this point, we have hopefully successfully joined the SmartFoxServer room, and now we'll
               //test that the server can pick up our events and accompanying data object...
               smartFoxServer.send(new ExtensionRequest("example_request", anISFSObject));

               //You should see the trace message from SimpleRequestHandler output in your SmartFoxServer console.
       }

       public function onExtensionResponse(evt : SFSEvent) : void
       {
               trace("Got an expansion response");
               var params : ISFSObject = evt.params.params;
               var cmd : String = evt.params.cmd;

               switch(cmd)
               {
                       //Refer to the java UserJoinedRoomHandler class to see where
                       //this string is sent from
                       case "server_return_data":
                               trace("Returned value of params.foo: " + params.getInt("foo");
                               break;
               }
       }

       …

Getting it Working
Once you’ve got your client and server code ready, the first thing you’ll need to do is wire up your extension via the SmartFoxServer Admin tool. To do this, you’ll need to follow these basic steps:

  • Compile the java source into a jar file. You’ll end up with one file – we’ll call ours extensionExample.jar
  • Copy this jar file into the “extensions” folder of your SmartFoxServer installation. For example, on my Mac’s local install, this would be something like: /Applications/SFS2X-RC1a/SFS2X/extensions/exampleExtension/exampleExtension.jar.
  • Fire up your SmartFoxServer and access your admin client.
  • Navigate to the “Zone Configurator” section and select the Zone that you chose to connect to in your AS3 code.
  • Below the list of Zones are buttons to add/remove/edit them. Edit your chosen zone and proceed to the Zone Extensions tab.
  • The two most important fields here are the Name and File ones. Name refers to the extension name. In this case, it would be set to “exampleExtension”. The File field is for the main class (including package name) of your extension jar. In the example here, it would be “simple.test.SimpleSmartFoxServerJavaExtension”. Once you’ve completed these fields, apply your changes.
  • Now for the fun bit! Restart your SmartFoxServerInstance. If you follow the console logs, you should see your extension being initialised (if you kept the traces in). This is where you’ll also see any stacktraces, enabling you to patch up any issues.
  • Fire up your Flash application and follow any steps required to test the communication. Make sure to keep an eye on the SmartFoxServer console as well as the flashlog. If all goes well, you’ll see the expected output! If not, don’t worry as the console should at least give you a good clue as to why not.

Issues I Encountered
One issue I found once the code was compiling ok was that there were other extensions trying to intercept my test events. They threw errors stating that that extension didn’t handle my custom events (obviously!). In my case, I was able to disable the other extension as it wasn’t needed. This stopped the error, but a better solution would need to be found in you were in need of multiple extensions.

Useful Links
And finally, here are some useful links to the 2X APIs and other documentation:

Hopefully that’s of some use to someone! Apologies for any typos, this was thrown together while fighting off a cold! :)





Error restarting Apache on OS-X (10.6.5): /usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument

4 01 2011

I was just trying to restart Apache on my Mac when it gave this error (it usually works fine):

sudo apachectl restart
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument

After a quick Google, it sounds like this was due to a change made to apachectl in a recent update. To fix this, you’ll need to edit your apachectl file. Find the problem line (in this case, 82), and change it from:

ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"

to…

ULIMIT_MAX_FILES=""




2010 Year Review

1 01 2011

Well, 2010 is over! We’re 1 day, 1 hangover, and 1 Dominos pizza into 2011. Last year was pretty crazy – here are my highlights:

Moshi!
The wonderful world of Moshi Monsters! In October, I had my 2 year Moshiversary. It’s amazing to see how the game has grown over the last 2 years. In 2010, we’ve seen it explode in popularity, with over 30 million users worldwide! We launched some cracking features this year too. My personal highlight was the missions system. Fully scriptable game content with our own DSL, meaning we can quickly add masses of game content, plot and storyline! Very awesome! A fantastic team of people working on a fantastic project. :)

Conferences & Meetups
I’ve done some public speaking this year, representing the Mind Candy flash team at both LFPUG and FOTB. It was quite daunting as I’m a total presenting n00b, but was fun to do, and enabled me to meet some interesting/inspiring people!

Photography
After not doing much with my photography for a while, I’ve suddenly really got back into it. I’ve been out practicing lots and have even been on a photography course run by the fabulous Trey Ratcliff (who runs the Stuck in Customs photo blog). I’ve acquired some epic new lenses, and am hoping to upgrade the camera body early next year. Hopefully there’ll be lots more photos to come! for now though, any I’ve taken recently can be seen on Flickr. Of all my photos though, I think this one’s my current favourite:

Merry Christmas!

Bangface Weekender
What can I say? It was messy, fantastic, fun, chaotic. There were inflatables, pool parties, lazy afternoons on a beach, and 5 of us living it up in a Pontins chalet. Awesome!

TG, Antichrist, Freud, Mildreds…
The title pretty much sums this one up. There have been many awesome nights out, with many awesome people. It has been great! Thank you! :)

Tattoo
For my 25th birthday back in Feb, I wanted to treat myself to something special. So, I had my first (rather large) tattoo done across my back and shoulder! My ink was by the very talented Jamie Ruth at Good Times studio in Shoreditch. If you want any work done, I recommend her! Still waiting to get a decent photo of it, but it’s great, and I love it. Just want more done now…

Scotland
The first family holiday I’ve been on in years, and it was bloomin’ brilliant! Long hikes through forests and fields, photographing wildlife and waterfalls, castles and stunning landscapes. I love Scotland – can’t wait to go back. Some photos are here!

Rome
I ventured off to Rome in the late summer, by myself, for a few days of photography, sightseeing, and to visit Jac. It was really fun. I’ve never flown on my own before, so that’s a new achievement unlocked. Also managed to learn a teeny tiny bit of Italian too, though not really enough to survive long in the city alone!

Protests!
2010 saw a LOT of protests in London, about many different things. The Pope had a paid state visit. Ridiculous to spend our money on that at any point, let alone in tough ecomomic times. We didn’t agree with it, so we protested:

Let's Promote Equality

There are lots more photos on Flickr. We’ve also had protests about the tuition fee rises, cuts to science funding, and the UK Uncut ones (mainly targetting companies such as Vodafone, Topshop etc). Quite a dramatic year in the city, and great to see people standing up for their rights and what they believe in.

Snow!
It’s been damn cold this winter! Masses of snow fell across the UK, and we even had blizzard-like conditions in central London! Brrr!

Snowy Big Ben

Piccadilly Circus

Gaming
And speaking of Blizzards…can’t really have a year review without mentioning gaming! I tried to quit WoW. It didn’t work. I ended up going to the midnight launch of Cataclysm in Leicester Square, alone, and queued for 4.5 hours in ~-10 degrees weather with my fellow geeks and addicts. It was cold, uncomfortable, and a tad boring to queue, but definitely worth it. Oh and there have been other games too. Minecraft! Minecraft is the aces. It is full of charm and openness and enables me to show my geeky creative side. But then, Cataclysm happened, so… :)

WWT London
In November, I visited WWT London for the first time. This fabulous place in Barnes is so peaceful and has masses of wildlife. It’s a great escape from the city, and fun to explore with my camera. I’d recommend it to anyone who wants to get out of the city for a few hours. The organisation does a lot of great work to protect our wildlife and wetlands, and so I’ve become a member. It’s nice to contribute to a worthy cause.

And for 2011?
More photography. I want to improve my skills and get some good wildlife shots. I’ve got a wildlife photography course booked in February – can’t wait!
I’m going to do much more travelling this year too. I intend to go back to Scotland in August, and would love to go on a big wildlife photography adventure. Hurrah! Bring it on!