House Woes

We’re not buying a house! Or rather, we’re not buying the house we thought we were.

The house, as I have mentioned before, is a bit of a wreck. I mean, it has walls and windows and a roof and stuff … but internal doors, floors and a working kitchen aren’t really included in the deal so it was always going to be expensive. We hadn’t banked on the boundary wall, a retaining one as the property is on a slope, being so neglected that the survey described it as “leaning severely” and “unsafe”.

These walls aren’t cheap and unfortunately we don’t have that kind of money lying around, this is our first house and by the time we’ve paid the deposit, the stamp duty and all the relevant fees, there’s not a lot left! We wanted the house but couldn’t take it under these circumstances so we did what we thought best – and asked the vendors to fix the wall.

Almost ten days later we have finally heard back to say they aren’t prepared to negotiate1 so we’ve retracted our offer. I’ll be booking some more house viewings for the weekend then ….

1 Actually they were much ruder than that but never mind, it just served to show how much better off we are out of it!

Cream of the Crop (of editors)

There’s a longer post in the pipeline somewhere about editors and IDEs and developments and stuff as we’ve just changed our setup at work and I’m completely thrown by trying to develop on windows! Anyway to cut a long story short, I’ve found a fabulous Vim wrapper-type-app called cream which I’m now trying out on windows.

There are a couple of instant weird things but perseverance with the dropdown menus of preferences and so on have got me into a state where I can edit. However there are two major oversights:
* files are opened in edit mode
* pressing Esc repeatedly toggles command and insert modes

This makes no sense to a vim user so I trawled the mailing list and came up with this post, showing which lines to add to cream-user.vim to change those defaults. I also found an FAQ entry which describes how to create a cream-user.vim file in the first place. So I thought I’d post it here for others and before I lose it :)

Hugs and Shakes

I’m having an interesting etiquette issue. I’m a woman working in a male-dominated environment, and basically I don’t think like a girl. I wear flat shoes and greet people with a firm handshake and drink pints; that’s who I am and I don’t believe my gender should get in the way of how I want to live.

Other people have different ideas though, and although my boyfriend is the same age as me and works in the same industry, now we’re in our mid-twenties I’m starting to notice that social expectations of us are diverging.

A good illustration of this is the minefield of greetings – hugs or handshakes? Personally I think that people who know us both should probably treat us the same but its not really working that way. Close friends of either gender hug me in greeting; in contrast they mostly shake my partner by the hand. It does feel strange that we get treated so differently.

Slip Sliding Away

The draft of the building survey arrived – wahey. The surveyors’ secretaries are very lovely and helpful when I ring them which is good news as I have done that three times this week already!

The actual survey is not such good news. There’s just a whole host of things wrong with this house. For the first time I am realising how seriously we can’t afford a project on this scale! There’s damp chimneys, rotten floorboards, another boiler which we were specifically told there wasn’t, missing/defective internal doors … you get the picture, and it gets worse.

Gone to the wall

The property is steep and our garden is a few feet up from the next one – the survey says that the retaining wall (20-30 yards long and about 4 feet high) is “on the point of becoming unsafe”. That could be expensive. Its a horrible reason to lose all the money we’ve already paid out on the house, but that will be cheaper that it will be to take on a house with a wall we are liable for and can’t afford to rebuild.

I’ll keep you posted, and in the meantime I’ll leave you with my favourite quote from the survey document:

The kitchen could be considered functional.

Read the previous parts of this story in Rotten Survey Results, Mortgage Application, Arranging a Mortgage and Offer Accepted

Rotten Survey Results

I knew things were going too well, I really did.

The valuation survey has come back. Its a pretty slim document (3 pages) with tickboxes to say how many bedrooms the house has and whether its made of brick. However, there is one paragraph of text and it says that the beams in the floor under the bathroom and adjoining back bedroom are rotting and that their recommendation is that this be rectified before the mortgage is secured on the property. Eeek!

We’ve ordered a full structural survey as well so we’re waiting for that to appear and hopefully that will give us more of a clue about what we are up against, but I’m not sure we’re allowed to go pulling up floors or ripping out bathroom fixings in a house that isn’t ours so I don’t see how we can even find out what its going to cost until after we’ve completed. Hopefully someone will tell us what to do next.

The one redeeming point is that the bank have written to say they are satisfied with the valuation and that we can have the mortgage. The letter also says that they “draw our attention” to the section which says the ceiling might not survive, which amused me :)

Tomato Sauce

An easy tomato sauce recipe to make in the microwave.

Slice one onion and put it in a microwaveable dish. Add one tablespoon of olive oil and microwave on high for three minutes.

Add one tin of chopped tomatoes, some tomato puree (one tablespoon or one of those little tins). If you don’t have tomato puree, ketchup is fine but not too much. If the tinned tomatoes are budget supermarket ones, add one tsp sugar. Add pepper, salt and herbs (basil is good) and microwave for three more minutes.

If you have a hand-blender, “zuzz” the mixture until it is coarse rather than actually chunky. Leave to stand as long as you like, then when you are serving up the food, pop it back in the microwave for another minute.

Extending DokuWiki’s Authentication Classes

DokuWiki is a fine product, and its extensibility is a big element of that. I’ve known for a while that it has different authentication classes, and I’ve even used some of the different ones it comes with. Recently I had cause to write my own, to marry up with some user information stored in an Oracle database table, and used to access the company intranet. Working with DokuWiki’s skeleton classes to create my own was much easier than I expected and here’s my experience.

Choosing the class to extend

Since my requirements are pretty simple, my new class extends auth_basic – and I used the plain.class.php that comes with DokuWiki (for plain text authentication) as a template to guide me.

The first step was to chop out most of the functionality. This is done by setting the class’ cando properties to false, which was quick. My system has all its user maintenance and so on done elsewhere so I don’t want users to be able to change passwords or anything. My declaration now reads:

class auth_symphony extends auth_basic {
    var $users = null;
    var $_pattern = array();
    /**
     * Constructor
     *
     * Carry out sanity checks to ensure the object is
     * able to operate. Set capabilities.
     *
     * @author  Christopher Smith <[email protected]>
     */
    function auth_plain() {
  $this->cando['addUser']      = false;
  $this->cando['delUser']      = false;
  $this->cando['modLogin']     = false;
  $this->cando['modPass']      = false;
  $this->cando['modName']      = false;
  $this->cando['modMail']      = false;
  $this->cando['modGroups']    = false;
      $this->cando['getUsers']     = false;
      $this->cando['getUserCount'] = false;
    }

Getting the information to dokuwiki

I included the standard library that we use here with all PHP pages, that handles things like database connection setup and so on. Then I altered the function _loadUserData(), creating a new empty array for $this-users and then then running a select statement and populating the array with the results. I found it useful to get the wiki working with plain text authentication first and just a couple of users set up so I could observe the output of the various functions. Here’s the altered function:

    function _loadUserData(){
    $this->users = array();
	

$L_sql = "
SELECT u.user_name
,u.extranet_pass
, d.dept_code
,u.full_name
,u.email
FROM vis_users u
, vis_subdepts d
WHERE d.subdept_code = u.subdept_code
AND u.extranet_valid = 'Y'
";

$L_bind_in = array();

$L_results = exec_sql($L_sql,$L_bind_in);

foreach($L_results as $L_result) {
$this->users[$L_result['USER_NAME']]['pass'] = md5($L_result['EXTRANET_PASS']);
$this->users[$L_result['USER_NAME']]['name'] = $L_result['FULL_NAME'];
$this->users[$L_result['USER_NAME']]['mail'] = $L_result['EMAIL'];
$this->users[$L_result['USER_NAME']]['grps'] = array('user',$L_result['DEPT_CODE']);
}
}

if anyone can make any suggestions about pasting clean code snippets in textpattern, I’d be grateful! In the meantime, I apologise for the state of the above example

I removed the functions for creating, modifying and deleting users as I had already told my class it couldn’t use those.

The results

All in all this was quite simple to get working, and DokuWiki is designed to have its authentication functions replaced in this way which is invaluable. We also created a new template for the site and hey presto we’re ready to go with no further modifications1 and no hassle when upgrades come around.

1 OK so actually I added some class definition to the breadcrumb hyperlinks because I changed the bar colour, but that’s almost no modification!

Mortgage Application

This whole house buying lark is progressing quite well, or at least it feels like it right now. Since I last posted we’ve been to the bank and made the final mortgage application, passed the final credit checks and had the thing approved. Next they send us the final paperwork to us through the post to sign. Filling in the forms was pretty tedious – as was talking about income protection provision and pensions and so on but we got there in the end.

We’ve instructed a solicitor and they sent us a big complicated letter yesterday. Actually, calling it a letter is a bit of an understatement, a novel is nearer the mark. I waded through it last night and had to sign all sorts of bits of paper about modifications made to the house, searches required and who knows what else. The language makes it seem big and complicated, but once you read through it and see past the sheer volume of paper then it isn’t too bad.

The surveys should be happening next week some time so we’re waiting for those and the searches now … fingers crossed for everything being in order!