At home and work


Well it’s started. I’ve received all of my course material. It looks like a fairly hefty amount of reading, which is OK for the time being. The hard part comes when I have to do critical analysis of what I am reading and reproduce it in the form of assignments. Recommended study time for this course is 25 hours per week. I’m way behind so far. I guess I should track it to get some idea of how well I’m doing.

Because of this work load my blog posting will be relatively sparce over the next four months. I’m sure that my vast audience will forgive this, or just unsubscribe.

The problem with having a science based education, and being lazy, is that I always try to write as succinctly as possible. That’s great for a scientific report, but in a management paper where you have to demostrate understanding as well as convey facts my writing style can work against me. I guess I’ll see.

I’ve got the Yahoo! API powering the search on my work’s website. The programming was easy. Using it is easy. The change process is hard.

I’m using PHP to convert the XML into a multidimentional array, and then looping through the results. To limit the results I was appending site:http://mysite to the search string.

The one difficulty I had was with handling big search strings with lots of OR operators. It seemed to drop the end of the query with the site: parameter and our site would then serve results from anywhere. To get around this I prepend it to the query. Also I added an extra check to confirm that the results are actually from our site.

Results are very good. Thanks Yahoo!

When I felt the urge I had to do something before sanity set in again and momentum was lost. I’ve enrolled in a Master of Management at Massey University. My student ID card arrived with a photo that looks like it was taken a lifetime ago. It’s the same photo from when I first enrolled there 6 years ago.

The work begins soon. I’ll be tied to the books for another 2-4 years. I’m starting with Strategic Governance, which I think will probably be the hardest paper other than the research report.

A while back I wrote about the up side of being a generalist. In fact I went as far as saying that I was a ‘Specialist Generalist’; specialising in knowing a bit about everything. Unfortunately I am falling into the generalist trap like Richard said: …because I’m a jack of all trades Generalist, too much of my time gets taken up doing menial Web things for business people - just because I can.

The end result of this is that I get bored. Which in turn creates its own problem: I become unmotivated.

The hard part is deciding what to do about it. There is no point blaming anyone other than myself for this; my situation is the result of my decisions. Nor is there any point in waiting for someone to get me out of it; the only person that can get me out of it is me.

The natural next step is to answer the following questions:

  1. Where do I want to be x years from now?
  2. What do I have to do to get there?
  3. What am I going to do about it?

These may sound like trivial questions, but they’re not. The first two are particularly difficult. The answer to the third should become obvious once that first two are answered. However, answering it and doing something about it are two different things.

So I’ll start with a basic question: What do I like to do? More random thoughts may follow…

<rant>I hate wearing a tie, so I don’t unless I have to go to a meeting that requires one. Today I showed up at work in tidy jeans and a tidy shirt with a collar. I was told several times that this was ‘a bit casual’ by several female staff, to which I responded I’m no more casual than you.

Relative to other males in my workplace, I am dressed casually. But if you put what I was wearing, cut to shape of course, on a female it would not be considered ‘a bit casual’. In fact, they would all go around commenting on how much they liked so and so’s new shirt and that they would like one for themselves.

Maybe I need to find a job where I’m not so outnumbered by women.</rant>

One of the thngs I like about my job is solving problems. In particular problems where there is a bit of thought involved. The particular problem I had is that for a search interface I’m building a requirement is the ability to page result set. This is easy using MySQL as it has a LIMIT keyword that limits the results to a certain number, and allows an offset, so for example you to retrieve results 16-20 you would use LIMIT 15,5.

Unfortunately, SQL Server does not have an equivalent to the offset argument. Its nearest is TOP n, which returns the first n rows.

This puzzled me for a few days, but then the answer came to me in a flash of inspiration: Results 20-16 would be the first 5 rows of a TOP 5 statement, with a nested query with a TOP 20 statement in the opposite order. Then I could just reverse the order to get the result the right way around.

So here’s what I came up with:

SELECT * FROM (
	SELECT TOP x * FROM (
		SELECT TOP y fields
		FROM table
		WHERE conditions
		ORDER BY table.field  ASC) as foo
	ORDER by field DESC) as bar
ORDER by field ASC

x is the number of rows you want returned and y is x+offset.

After looking at this in Query Analyzer, it appears that the extra nesting does not add very much to the load. For the queries I was running it was only about 2%.

Following on from Mike Brown’s presentation about Web Standards and the Web Standard Group, I gave my presentation on Semantic HTML at the GOVIS conference.

Public speaking is not my forté, but I managed to pull it of, even with a chuckle or two in what can be a very dry topic, especially after lunch. The anticipation and nervousness made me feel really drained afterwards.

Grace up close with a TuataraI went with my daughter’s class to Ngā Manu Nature Reserve (map on Multimap). We got to see a whole lot of different native birds, some of which only exist in small populations on predator-free offshore islands.

The highlight for me was getting up close with a tuatara, a native reptile, that appears on the New Zealand 5 cent piece. It surprised me to learn that despite it’s appearances, the tuatara is not a lizard.

« Previous PageNext Page »