Data Migration Podcast

I’m the guest on this week’s php|abstract podcast from DevZone, talking about some techniques for importing and migrating data. I have a few pet strategies for dealing with this and they’re outlined on the podcast so dip in and let me know what you think.

There will also be a follow-up article to go with it – showing some code examples, because sometimes its easier to think of things when they are written down.

Manchester Is Decidedly Undiverse

So last night, more or less on a whim, I popped to the Geekup that was on in Manchester. I was slightly alarmed when I enquired at the bar where the event was and was told there was nothing like that booked for that night … anyway I wandered outside and found 30 or so people looking likely … predominantly t-shirted white males standing around slightly awkwardly, with an above-average ratio of laptop rucksacks :)

It was only after an hour or so when I properly looked around me, I realised I was the only woman there. The only one?? You can’t tell me there are no female geeks in Manchester, I refuse to believe it! Manchester is one of the most vibrant and happening cities I think I’ve ever been to in my life. Seriously, what’s going on? I can only think that either there really are no female geeks in Manchester, or there are – in which case they’re either oblivious to geekup or they’re avoiding it.

So, for what its worth I had a perfectly nice time and chatted to some interesting people (thanks guys!) but I would love to know which scenario above is actually the real explanation. If you have a theory then please post a comment!

Nest Of Tables

We’ve been decorating the living room since what feels like forever, I’ll post some proper pictures of it finished but here is a sneak preview of the photos I took of the new nest of tables that’s been waiting for us to finish decorating for a few months. I finally put them together at the weekend.

Attempted Break-in

Last night we came home at around midnight and disturbed an intruder. Nobody hurt and nothing taken, is the short version.

We got back, walked up to the front door and I decided I needed to water my plants as they were looking at bit sad. So I went up the side of the house to the back to get the watering can while Kevin went in the front door. The back of our house is pitch black at night but I know it well so I just wandered round, right along the back of the house and grabbed the watering can. I then looked around and realised there was something moving in the dark … something very big. Eventually this heaving shape resolved itself into a man climbing out of my kitchen window at which point I started SCREAMING. Forget panic alarms, I was easily louder than any of those, the whole street must have heard me.

As I was only about 4 feet from the man in question, he must have got a fair fright as well (who wanders around back gardens in the pitch black at midnight after all??). Seems like he heard Kevin going in the front and scarpered back out the way he came in. Of course Kevin, in the house, has no idea what is happening other than there is screaming outside the house … I can’t imagine what was going through his mind when he realised it was me screaming. Anyway I ran back to the front, went in the house and after some total incoherence explained to Kevin what I’d seen. At which point we had no idea if there was still anyone in the house or anything.

I rang the police and our neighbours were also out asking if we were OK, they very kindly helped Kevin check if there was anyone else in the house. The police responded quickly and were very good, which is great. I’m sure they had enough going on on a Saturday night! Anyway the fingerprint people came this morning and got a good footprint from the kitchen counter, which was very interesting as I’ve never seen them do that before.

To cut a long story short, we are fine, nobody was hurt (although we both got almighty frights), and nothing was taken. The window is boarded up now and we will get it replaced as quickly as we can. It seems like the intruder thought we were upstairs asleep (car on the drive, no lights on, midnight), and it was just very lucky that we got back when we did, there was no sign that he had been anywhere other than the kitchen.

Inaugural Sheffield Geekup

Last night I attended and spoke at the First Sheffield Geekup held at the Fat Cat in Sheffield. My talk was entitled “Deploying Web Projects with Subversion” and you can see the slides for that at http://www.slideshare.net/lornajane/deploying-web-projects-with-svn/.

Overall I think the event was well-organised, there were certainly plenty of people there and we had a projector, speakers and a room so it pretty much ticked all the boxes. The Fat Cat is a nice pub, with good beer, but for those of us coming from further afield it was a bit tricky to get to as its not exactly handy for the station. The evening was good however I felt that the timings slipped badly – I was the first speaker and although there was somthing else happening earlier on, the talks aimed for 7:30 were actually nearer 9pm … so a couple of pints later than I was expecting my audience to be and I think my talk came across as rather dry as a result! Also since one of the speakers ran over his time completely (now I understand why other geekups sit with a stopwatch and click the slides through for you!), I had about ten minutes after the talks to hand out a couple of business cards and answer a few quick questions before I had to dash off for my train. All of these though are only teething problems and I think everyone had a pretty good time, so well done to Jag for getting it off the ground … here’s to next month!

Geekup Sheffield

I was very pleased to hear that Sheffield is getting its own Geekup event, and that it starts next week on 7th May and will run on the first Wednesday of every month. I was even more pleased to be asked to speak at it – I’ll be giving a 20:20 format (20 slides, 20 seconds per slide = 6 and a half minutes) on “Deploying Web Projects with Subversion”. Come along to The Fat Cat on Alma Street at 6pm for lots of fun, beer, and chatter!

OpenOffice Custom Quotes

I have been driven mad for the last week or so by the silly slanty quote marks that OpenOffice insists on using instead of the normal ones. It is especially annoying when adding code snippets to presentations!

To turn these off go to:
Tools > Autocorrect > Custom Quotes tab
And until the “Replace” boxes.

Hope this saves someone else the annoyances I had.

Weedkiller

The garden, the bit of it we haven’t dug over yet, is FULL of dandelions! I didn’t have time to dig them all up but I did go and pick all the flowers in an effort to stop them seeding.

They’re pretty though :)

Weeds!

SugarCRM SOAP API Examples

By popular request, here are some examples that worked for me when using the SOAP API offered by SugarCRM. Its nice that there is an interface, but it isn’t brilliantly documented or nearly as widely used as it should be!

SugarCRM can’t talk to PHP 5 native SOAP libraries in WSDL mode, so connect without it. Find below a series of queries that each worked for me, all just dumped here in succession, don’t try to run this whole piece of code – it is intended as a series of examples. Use each line and then var_dump($response) to see what’s happening.

// set up options array
$options = array(
        "location" => 'http://192.168.1.129/aeat/spm/crm/soap.php',
        "uri" => 'http://www.sugarcrm.com/sugarcrm',
        "trace" => 1
        );
// connect to soap server
$client = new SoapClient(NULL, $options);

// look what modules sugar exposes
$response = $client->get_available_modules($session_id);

// look in more detail at the fields in the Accounts module
$response = $client->get_module_fields($session_id, 'Accounts');

// look for a particular account name and then get its ID
$response = $client->get_entry_list($session_id, 'Accounts', 'name like "%LornaJane%"');
$account_id = $response->entry_list[0]->id;

// create a new account record and grab its ID
$response = $client->set_entry($session_id, 'Accounts', array(
            array("name" => 'name', "value" => 'New Company')
            ));
$account_id = $response->id;

// create a new contact record, assigned to this account, and grab the contact ID
$response = $client->set_entry($session_id, 'Contacts', array(
            array("name" => 'first_name',"value" => 'Geek'),
            array("name" => 'last_name',"value" => 'Smith'),
            array("name" => 'email1',"value" => '[email protected]'),
            array("name" => 'account_id',"value" => $account_id)
            ));
$contact_id = $response->id;
    

I hope this helps – if you have anything to add, or would like to post some examples, please do :)