Wednesday, October 31, 2007

Time Management

I don't mean to be a prima-donna developer here but...A big part of my job is development (say about 60% - 70%).  The rest is made up of user support, development iteration planning, requirements tracking and prioritisation and change control. Now the development portion - given all these other responsibilities should be less, but that's another issue...or is it.

How to you prevent, phone calls from users, interruptions from system testers, arguing about whether that last enhancement should be closed or not, then teaching them again, why we ought to raise new bugs, rather than bounce the same enhancement around adding comments and issue until it is completely unrecognisable from its original form and contains so much info that none of it is useful to anyone...?

This post, is the result of one such interruption, regarding an enhancement that was returned to our development team, because of a bug I saw as completely unrelated. Now, I accepted the bug, no problems, it was a bug, plain and simple, it was found during testing of an enhancement that now works as requested. So I passed the enhancement item back to testing and raised a new bug, linking the two items and adding notes explaining (for the 6 millionth time) what I had done and why. (We use OnTime for this by the way - highly recommended.) So, after that 4 or 5 minute conversation which occurred in the middle of me attempting to write a cost allocation routine for our timesheets / On-costing / payroll management system, I have now had another argument I discussion that had no point, written this post and forgotten completely what I was up to.

Asides from wasting the last 15 minutes, we'll probably find out 6 months from now, just how costly this was, when the cost allocation routine is missing some integral piece of brilliance it would otherwise have had.

Going back to my original point - I'm starting to think it's impossible to wear quite so many hats. Maybe the mix of responsibilities in this job is actually the problem after all.  More to the point, I think it's how I manage the mix. But without my own office, and in a team too small to completely shirk phone call and other support related assistance, I fear the only light at the end of the tunnel, is in fact the train wreck that is, wasted development effort and bugs!

Tuesday, October 30, 2007

Windows Tithe Day

A classic quote from Joel Spolsky in this post - the concept of a semiannual Windows Tithe Day, where you dedicate a day (usually more) of your precious time, to do nothing by reinstall everything from scratch, on your main development box - something we can all relate to no doubt.

To me it's a bit like forking out hundreds of dollars because your old "fridge" just blew up.  You a few hundred out, just to buy something you already had.

After "Windows Tithe Day" you've given up 24 hours, for something you already had - yet somehow you're surprisingly chipper at the fact that everything is now working....exactly as it was always supposed to...

 

PS. Joel's post about Evidence Based Scheduling is not bad either.

Monday, October 29, 2007

Reporting Services setup

Every time I have to stuff around with Report Services configuration I end up frustrated!

I never bother to store encryption keys to a disk anywhere, so when I change anything (often the Admin password coz I'm lazy and often use that user to run scheduled reports) I usually end up having to re-activating the service, and re-configuring all the encrypted info with the new password. (Even if my initial changes didn't warrant it, I usually end up changing something that does)...this should've been so easy.

You get useless error info too - at the moment it's "Logon Failed" when a scheduled report runs. There's bugger all in the log files accept for the occasional "logon failed" - which, I already determined, from the previous "logon failed" on the subscription screen.

Anyway - which bloody logon!? I can run the report manually. I'm trying to use a purpose built user account to run these reports now, not the admin user, but if I change the logon details of my datasource back to the administrator it works, so it's got to be that logon right? Well then why does the report work manually?

Is it a database logon - well my use has plenty of rights in the ReportServer database - RSExec role no less. After firgging around with this for a good part of the day, it turns out, it was the RSConfig utility I was not running correctly.

Naturally, changing our Admin password, and having the RS service running using that utility (while stupid) caused the problem -as I knew. I re-ran the rsconfig utility in order to set the new password, but I only ran it with the -c command line parameter -  connection information (shhot me!) I stupidly didn't look at the details of the -e command line option, which by the way, must be run separately to the -c one. This option seem to make the same config settings, but for unattended execution.

 

So > rsconfig -e -s serverName -d databaseName -a Windows -u domainName\MyUserName -p MyPassword fixed it!

 

And by the way - not using the administrator account anymore either!  Worth the effort I guess. If only I'd run the -e option a few hours ago I'd have saved some time, but not learnt anything right?

Wednesday, October 17, 2007

Dim x As new as opposed to set x = new...

Just a really old tip I once got - so old I couldn't remember why, until today when I wanted to explain why I did it this way...

Dim x as myObject
set x = new myObject

Rather than,
Dim x as new myObject


The former is more efficient as, using the later, the compiler will need to insert heaps of code around the "x" object each time it is used.

See this link for an elegant expalnation http://visualbasic.ittoolbox.com/groups/technical-functional/visualbasic-l/adodb-creating-new-94396

Tuesday, October 16, 2007

Triggers that cater for multiple record updates / deletes.

I recently experienced a probelm with SQL Server triggers not enumerating through multiple records, in a batch delete. I was uing using variables in the T-SQL statements as follows;



Select @masterID = master_id, @value = the_value from
deleted

update table_name set field_name = field_name - @value
where id = @masterId


I was assuming the trigger would fire for each record deleted. Not so.

If “deleted” contains more than one record, this update statement will only be executed for one of them, and it’s difficult to predict which one.

SO;

You need to combine the update and select statement to achieve the same thing, in one T-SQL statement.

update table_name
set field_name = field_name – the_value
from
table_name tn
left join deleted d on tn.id = d.master_id
where
tn.id = d.master_id

Tuesday, October 02, 2007

The Best Weekend Ever

Geelong - Premiers - 2007.


I really never thought I'd see this day. Geelong are reigning premiers. I'm 37 years old. I've been consiously following the Geelong Football Club for 30 years. I was a member for about 10 years late '70's and through the '80's and finally re-joined with Kieren this year (Kieren, at 6, doesn't realise how lucky he is that 2007 was his first year as a member). I'm sure he'll now expect this much success every year.

Last Saturday, after probably the most successful season ever, Geelong capped everything off by winning the most important one of them all. Geelong smashed Port Adelaide, 24.19:163 to 6.8:44. That is a record winning margin for a Grand Final smashing the previous 96 points by Hawthorn over Melbourne in 1988.

The town of Geelong has gone crazy. People are chearing, tooting horns, smiling, and just generally partying. Everyone, from all walks of life are just best of friends this week.

Heading to the ground for the family day, a couple of rough looking individuals, probably in their 20's were dancing and singing their way back down Moorabool street against the traffic. These two were the type you generally looked the other way and try to avoid eye contact with, but not this day. Everyone was "high five-ing" them, smiling and joining in, from the youngest kids to the oldest of die-hard supporters - no hard feelings anywhere.

For the record, Geelong lost just 4 games for the entire 22 game season, then won three finals by 106, 5 and 119 points respectively. They also took out the VFL premiership, the Best and Fairest award in the VFL, the Rising Start Award in the AFL, the Brownlow Medal in the AFL, and had 9 All Australian representatives, again smashing another previous record (6).
It's hard to imagine how this season could've been any better. Jonathan Brown from Brisbane can count his lucky stars - he took out the goal kicking award - maybe next year, we aim for that too ;-)