Good Advice for Life at the Office

I came across this when reading an article on Mike’s site yesterday:

_“The best advice I ever received from a manager is that it is easier to get forgiveness than permission.”

The article is at Top 3 Ways to Fight Bureaucratic Inertia in IT and it makes for interesting reading. More than once I’ve had projects cancelled or stalled indefinitely because of two superiors’ inability to agree on the requirements and Mike’s article has given me some ideas on how to manage this type of situation in the workplace.

How Has Netball Changed Your Life?

Recently, an email went around the netballing fraternity asking for stories of how netball has changed your life. I put together something to send back to them and thought I’d share it here too.

This is going to be a long story … netball has accompanied most of the major changes in my life so far, and I’m only 25!

I’ve played netball on a regular basis since going to secondary school at the age of eleven. As I was a good 6 inches taller than pretty much everyone else, I was put at goal shooter. I wasn’t any good at it but I was very keen and after a couple of years of my mum cringing on the sideline at my hopeless efforts, the penny dropped and I actually got quite good. That’s lesson one, most things can be learned with enough perseverance.

Throughout my teens I played a lot of netball at a high level, representing my club, county, school and even region. I met a lot of people from different walks of life and sort of floated through my teens with fewer distractions than most. With no saturday job (because I was always on court) and no late night (always got a match the next day), the scope for getting into teenage scrapes was much diminished. At the time I thought I was missing out but now I’m not so sure that was the case. I travelled all over the country and went to different events, meeting women of many different ages along the way.

When I accepted my place at university, in with the forms was a leaflet from the AU, asking me to tick which sports I was interested in, as there were introductory sessions in Fresher’s Week. So off I toddled, at 10am on the first morning after arriving while my peers were nursing hangovers, and met the girls. Some of the girls that were there that day are still my closest friends. We laughed, cried and partied together. Involvement with the netball club at university transformed me from the schoolgirl who couldn’t hand in her homework on time (ever) to a young woman with a degree in engineering who started her own sports club and organised information systems for a large campus event. I have learned that I’m a leader, a team player, and someone who can get things done. Without the sport and the other girls in the club I feel sure that I’d have eaten better, had far fewer injuries, rung my mother more often and probably got a lot more sleep while I was at university … but I wouldn’t swap it for the world.

Now, three years out of university, I’m on to my third job, my fourth address and my third netball club as well. In every place I’ve met women and girls that have been welcoming, supportive and also a lot of fun. They all have their own reasons for playing, but together they make the club(s) what it is. I’m now starting my first full season with the new club and look forward to another thirty years of this (at least!)

About Blogging About Work

Until now, I’ve avoided blogging about work in pretty much any way. I’ve written about technical stuff that have come up at work but I haven’t written about much beyond that sphere, and even that is only so that I don’t have to hunt for the information next time I run into the same thing and so that others can find the information in the event that google ever admit to having heard of me. I am blogging under my real name (more or less) and I’ve heard enough horror stories of people getting dooced to be shy of this topic.

Until now.

In this day and age, work is a big part of our lives. When I socialise with friends, we mostly talk about who we are and what we do – our occupation is our profession and forms a big chunk of our entire identity. Certainly it is a large portion of who we are today – our selves without the bit that comes from how we got here and so mostly takes account of what we are currently making of life.

Its strange that this subject eludes discussion here, in our household we’ve had more than our fair share of employment-related excitement over the last year – including redundancy, contracting, unemployment and a 200-mile relocation. As an issue, work/jobs/employment/career has never been very far from my consciousness.

So my new resolve is to stop being hung up about this, to write in the abstract about work in relevance to our lives, and to never ever rant about any current workplace, colleagues or customers. Wish me luck!

the trouble with being tall

I’m tall. Not landmark-sized but well above the average for a woman (5’11’). My role model is Allison Janney who is taller than me again and interviews wonderfully on the subject of tall women. I’d like to outline the main points of having this personal feature.

Good Points

  • Not many people can tower over you without standing on something
  • People assume you are confident, which is useful if you wanted them to assume this (such as at a job interview), but can be a pain the rest of the time
  • It helps on a netball court
  • People don’t have to stoop to hear what you are saying

Bad Points

  • Its very hard to hide behind another girl
  • When holding an umbrella and walking in the rain, unless the rain falls vertically, your feet are still going to get wet because there’s so much space between the umbrella and the floor
  • If you wear women’s clothing, you risk looking like you are either a cross-dresser or a teenager that grew too quickly
  • If you wear men’s clothing, you will actually look like a man
  • If you go to specialist shops to get clothes to fit (rather than marginally longer leg lengths), you will spend a lot of money on clothes
  • Pretty shoes are never pretty by the time they are big enough to get your feet into
  • It is very difficult to buy ladies’ gloves to fit
  • When you are growing up, you are going to spend 5 years being 6-12 inches taller than any of your dates

The bad list is longer than the good list, but I wouldn’t swap my height for anything!

Workplace Eating Arrangements

Its a funny thing but the smallest details when you are looking for a job are actually the most important. I’ve never actually asked to see inside the ladies when I’ve been at a job interview but I’ve always wished I had once I got the job!

I’ve been a big fan of Joel Spolsky for some time, but he posted an advert to his site today that had me riveted. He’s looking for a sysadmin for Fog Creek, and in the advert he writes

“We’re still a small friendly company and we all eat lunch together every day at one big table.”

This is what I’m looking for in a company, this sums up my requirements for my entire working life, and he’s nailed it in a single sentence.

A shell script to set an environment variable

I’m having a problem with a program that I run at work. It does a bunch of stuff1 , and then runs vim to edit the file I specified when I ran the thing. The problem is that it doesn’t run my vim, it runs the system version. And I have mine aliased to run using the -T switch to use dtterm to make my syntax highlighting work, so this program is bypassing this setting.

“Easy”, you say, “Just set your terminal type when you log in”. Nice try, mister. My function keys (F13 to F20) don’t work under dtterm (and I had a hassle getting them working at all, see earlier post so I only want to run it for vim.

To cut a long story short, I’ve written a shell script to toggle my terminal type for me, and named it term. Here it is:


#!/bin/ksh
	

T="vt220"

if [ $TERM = $T ]
then TERM=dtterm
else TERM=vt220
fi

export $TERM
echo "term set to " $TERM

There’s a gotcha with this code, a shell script can’t modify your environment variables unless you use the . to tell it to. To run my script I use the following.

. term

1 irrelevant and proprietary stuff, which I won’t start ranting about here

Lucene search functionality – following on from crawlers and spiders

The search functionality works!!

I have PHP 5.1.2 on a Windows XP machine (I know, I know, its my work desktop) and Zend Framework preview release 1.3. I’m using it to index the files in a local copy of DokuWiki – this is an easy starting point as the pages are text files and all held in directories.

zend_lib.php
I have a library file which has some settings used both when building the index and when searching it. This file also includes a function which turns the url of the returned page into a path that dokuwiki can understand.

zend_text.php
The indexing page starts from $startpoint (set in zend_lib.php) and recurses into directories indexing file size, url and content of each file.

zend_text2.php
The search page shows some searching tips and a search box. When a search is performed it then prints links to the pages in dokuwiki and their relevance, ordered by relevance.

I’m so excited that I’m including the files here for now and might think about turning this into a proper dokuwiki plugin – although, personally I like their current search functionality, this current exercise is a PHB requirement. Here are the files:

zend_lib.php

zend_text.php

zend_text2.php

The Beauty of Vim

I work with vim and its fabulous. Although I’ve been a casual linux shell user for some years, I’ve never had to get to grips with vim as my main editor which I’m using eight hours a day until now. And I love it.

Cheat Sheets

Its vital to get a good cheat sheet to start with. This is like a menu of commands to remind you how to do things. Then when you think “wouldn’t it be cool if this program did …”, you can look up how to do it (and I guarantee vim has the feature you wanted, whatever it is. Some of my favourite tricks not always listed on cheat sheets are:

gv reselect your most recent selection
% when on a bracket (either ( or { ), jump to its partner

For more cheat sheets, probably best to look on my del.icio.us page (here and linked in left hand bar) as I keep my favourite links of the moment updated there

Colour Syntax

I have finally managed to get my vim working with colour highlighting which is making my life much easier (and prettier, of course). I’m running vim 6.2 on AIX 5.3 and found that the only way to get my vim into colourful mode was to turn on the syntax and set my terminal to dtterm.

To change your terminal type, at the prompt type:

export TERM=dtterm

Then when you do

echo $TERM

it should tell you that your term type is now dtterm. Unfortunately the change in terminal type made my function keys stop working (argh – see my earlier post on this topic). As a compromise I have aliased vim to set the terminal type when it runs, by adding the following line to my .kshrc file (if you’re running bash then add it to .bashrc instead)

alias vim=’vim -T dtterm’

Arrow keys

I normally use h,j,k,l to navigate in vim (left, down, up and right respectively), but I get stressed by the cursor not wrapping at the end of the lines. I googled for the problem and found that adding this to my .kshrc helped:

set -o emacs
alias __A=$(print ’\0020’) # ^P = up = previous command
alias __B=$(print ’\0016’) # ^N = down = next command
alias __C=$(print ’\0006’) # ^F = right = forward a character
alias __D=$(print ’\0002’) # ^B = left = back a character
alias __H=$(print ’\0001’) # ^A = home = beginning of line

Regex

Regular expressions in vim are more powerful than I can imagine, and I’m loving the find-and-replace, especially because you can use the pattern you matched in your replacement expression by typing \0 as part of the expression. Its so powerful.

For my next trick, I will figure out how to group parts of my pattern to use bits of them in the replacement – I feel a tutorial coming on.

Opera’s Favourite Icon

I’ve been getting wound up recently by Opera spamming my apache logs with errors about missing favicon.ico files. So here’s some instructions for removing this annoying default behaviour:

http://groups.google.co.uk/group/opera.general/browse_thread/thread/601683ed17b42762/ac5685ea6a310180?lnk=st&q=opera+favicon+request+error&rnum=1#ac5685ea6a310180

Symptom

You’ll spot the problem because there will be lines in the apache error.log file which look like this (this error is from a windows machine)

File does not exist: C:/www/favicon.ico, referer:

Normally, on a public website, I’d ignore this unless you do have a favicon set up. However I’m developing locally and so its my copy of Opera that is causing this crud in the files.

crawlers and spiders – take two

I made some progress with getting Xapian set up, but not to the point where I was all ready to go. I’m not all that familiar with C++ and somehow I lost the will to live somewhere along the way this afternoon.

PHPDig

I should mention PHPDig here because it is a really good product and widely used. However a mysql database is a no-no, as I mentioned earlier.

This leads me back around to ….

ZSearch

The Lucene implementation in the Zend Framework for PHP 5. Wish me luck!

EDIT You can read the follow-up post here