|
Did you mean to come here? My blog is now at http://msmvps.com/blogs/robfarley
I need to go home and learn some carols. Hope you all have a good long weekend. Merry Christmas. I won't get religious here, but do try to avoid getting caught up in the busy-ness.
I bought a CD for the wife today. It's a Christmas one, put out by Sony. I didn't think anything of it until I put it into my machine, and found that it prompted me to install some stuff. Alarm bells rang, the word 'Sony' echoed in my head, and I hit 'Deny'. I wonder how many people wouldn't've though.
For those people who were at my presentation about AJAX today:
The AjaxPro site (where you can download a DLL that will do all the hard work for you) is http://www.schwarz-interactive.de .
The seminal article on Ajax is at http://www.adaptivepath.com/publications/essays/archives/000385.php (it's by Jesse James Garret).
And that image that I manipulated using the querystring is at http://www.lintukoto.net/viihde/mielenosoitus/kuva.php?teksti=PutYourTextHere
Enjoy!
I did my last exam of the year this morning. Good to have it over and done with.
Now I get to think about other things, like my talk on AJAX tomorrow at an MSDN Update Event. It's a joint session with Dave Glover. He was going to talk about ATLAS, but that's been postponed, so he's going to talk about mobile web and smart client apps instead. But I'm still going to do my bit. After all, perhaps the quiet week between Christmas and New Year will give you some opportunities to improve your websites.
So come along, and learn how you can build your own Google Maps website without even using AJAX. But then I'll show you how you can use AJAX to make a much better user experience.
Today we had David Lean's presentation on the SQL Server Execution Environment. It was good. Made me wish I'd seen it before the exam I did yesterday. But that's fine. The talk was still good.
I find that I don't get to pay as much attention in the meetings now that I run them. I feel like I'm the host, and having to make sure that things are running okay. Still, I got to meet a few new people, which was good. And we had a big turn out. We got about 40 (I did a quick head-count quite late, and it was just under 40 then, and I think some people had already had to leave).
I'm going to locate the content and post it somewhere. We didn't end up webcasting it out, due to technical difficulties. But we'll keep trying, and I'm sure we'll get it right one day.
Next month we have Jeremy Huppatz talking about Upgrading to SQL2005. If you want to come along, go to sqlserver.org.au. :)
I haven't got Roslyn a Christmas present yet. The plan is that she'll take me to the shops to teach me how to buy her jewellery. So I don't buy her jewellery that she'll never wear for one reason or another.
I'm awful at buying Roslyn presents. I think like a bloke. I've learned to watch for clues, the "Ooh, that looks nice" comments when walking through a shopping centre, that kind of thing.
But a few years ago (when we were still in London), I made a mistake. In about October, she had commented about a RotoZip when watching the TV. She said how useful it would be, and talked about some of the stuff she could do with it. So I made a mental note. Went to all kinds of trouble to find a hardware store that had one (very popular, sold out quickly), and eventually found a B&Q that stocked them. She saw the box wrapped up under the tree, and had no idea what it was.
I learned that year - don't buy the wife a power tool. Even if she really wants one.
I sat 071-444 this morning. I felt like I didn't know all the answers straight away, as is the case for most exams I do. But if I did fail it, then I don't really mind too much. I'm not a full-time DBA by any stretch of the imagination. I know quite a bit about DBA principles, but I'd rather do design, tuning, querying, that kind of thing.
And there were still questions that had me thinking that none of the answers were right. I think this exam would've been better off with a scenario situation. "Answer this question. Now you get these results from this query - what does this tell you? What do you do next?" - that kind of thing. Instead it was 82 questions over 210 minutes, all completely distinct. I felt myself disengage way too many times. I didn't really want to be there. Does anyone ever want to be in an exam? I guess I should, now that I'm signed up for another two in January. *sigh*
I'm sure many of you will have read about this already. It seems that someone bought a photo of an XBox from eBay for an awful lot of money...
Your results: You are Spider-Man Spider-Man |
| 80% | The Flash |
| 60% | Superman |
| 55% | Robin |
| 50% | Green Lantern |
| 50% | Hulk |
| 45% | Iron Man |
| 40% | Wonder Woman |
| 38% | Supergirl |
| 38% | Batman |
| 35% | Catwoman |
| 10% |
| You are intelligent, witty, a bit geeky and have great power and responsibility.
| Click here to take the "Which Superhero are you?" quiz...I guess I should be pleased I have nothing in common with Catwoman. But geeky? Really? Spiderman wasn't geeky was he?
Scott Adams recently wrote about his Humour Formula (Ok, I've inserted a 'u'). The idea is that to be funny, something has to hit on at least two of the following: Cute (as in kids and animals), Naughty, Bizarre, Clever, Recognisable (You’ve been there), Cruel.
It's got me thinking. I like to try to be funny. Clearly geek jokes aren't going to work, unless they're cruel or bizarre. Typically they're recognisable if you're a geek, and they might be clever, but they don't hit home on the rest.
My SatnavAndSegways attempt (ok, you can listen to it here) I hope hits on some of these. The SatNav stuff is probably naughty, clever and recognisable. The Segways stuff is probably bizarre and cruel, naughty maybe. Maybe recognisable because you've seen yourself put on weight... I think most of my humour is a mixture of naughty, clever and cruel. Probably not the kind of humour I really want, but bizarre, cute and recognisable is hard to pull off. I definitely know I'm not cute. Kleefy's video definitely proved that. I'm sure my neck used to go in a bit, rather than just going straight up from my shoulders to my head. :( I'd definitely be better off on radio.
I went to Bunnings on Saturday. Had some stuff to get, you know how it is.
I paid for the stuff on credit card, and as I signed my name, I noticed my WHOLE credit card number there on display, with the expriy date just underneath. I can't say I was happy. I'm sure they don't need that. The transaction had gone through, so as far as I can tell, they don't need a copy of all the details, they just need a copy of the transaction receipt number, and something that Visa recognise means my card was there. Heck - there's not even much point in them having my signature, except to verify that it's me. I should be able to just show them my drivers' licence to verify that my signature matches the one on the card.
It's now got me wondering who else does stuff like that.
Well, I got through another exam on Friday afternoon.
The Database Design exam (71-441) was one with six scenarios, each having about a dozen questions. The kind of thing where they say "This person wants this. The DBA wants that. There is a mandate that this type of user can't do something else." and then ask you a bunch of questions about it. These things always seem to me to be more about whether you can understand the question, rather than knowing the answer. Everything is written there, so it shouldn't be hard.
I'm a lot more confident about passing this one than the last, but as always, I felt weird as I left, wondering if I passed or not. I still don't feel like I know enough about SQL2005 to be doing exams. But I'm only interested in scraping through, I don't need a great mark.
Well, I did 071-431 this morning. It's the beta for 070-431. I have no idea if I passed - I find out in eight weeks. Annoyingly, I didn't leave thinking "Oh, yeah, I would've passed this...". I left thinking "Oh, I hope I passed that, there was a lot that I didn't know."
Even more annoying was the fact that most of the questions that I didn't know were things that I don't think I'll ever really know off the top of my head. I know there are different ways of partitioning tables, and I know where to find out about them when I need them. I know there are things that need to be done before you can set up database mirroring, and I know where to find out about those things.
If I have passed, then great. If I haven't, then it's not the end of the world. Having sat one of these betas, I think I'll be much less stressed about the rest. I know I'm not going to know enough going into them, but hopefully I'll squeeze through some, and by the time I sit the proper versions (of the ones I fail), I will have had the time to read a study guide book. :)
And for those of you who are going to ask me - it's a very similar format to the others. 71 multiple choice questions. And pick 'D' if in doubt. ;)
Tomorrow I do 071-431. Just a little stressed. I really don't feel ready for it. Still, it's only beta - and what's the worst that can happen?
I promised I'd write something about my AJAX experiences, so here goes:
I'm using AjaxPro, by Michael Schwarz. I'm using it so that people can quickly fill out a form without having to post back the whole page all the time. As you pick the details, it updates later parts of the form so that you're only prompted for the correct parts, and you don't have to keep posting back and reloading menus and stuff like that.
I have a textbox which has an event on it that calls an Ajax method, to populate a drop-down list. It's not a combo box, it's a list. That way, the user gets to see the whole list, not just a single entry. I could've returned a dataset from Ajax, but it was a heap easier to create the list in C# and then return the rendered HTML, which I apply to the InnerHTML property of a div tag.
I use the same rendering concept to display whole chunks of forms. It does mean that I need to handle the elements from Request.Form, because I'm dynamically generating the form elements, but I'm fine with that. It's only a form submission - it's not like I'm trying to handle various events.
The biggest problem I came across was form validation. I had some C# code which created a JavaScript function for validation. But it wouldn't get called by the browser. I took the validation code out of the function and put it directly into the form element event, and it worked just fine. I figure that the browser does something funky to know what functions are available, such that it doesn't like to introduce new functions after the page has loaded. Or something like that. I'm happy to wrong on this point - but I got it working nicely.
I like Ajax as a technology. The page works great under both Firefox and IE, and it seems really responsive. You can annoy it by changing the selected items really quickly, but to get around that I used a timer, so that it only puts the request in 0.1s after the user clicks. That way, a second click that's too quick doesn't stress it out too much. The problem seems to be with the client making too many requests, not the server handling it.
Maybe it's just that I appreciated what Jesper & Steve keep talking about...
A while back I ran through various things on my machine to try to encourage it to be slightly more secure. I know I didn't do everything I could've done, but I did some. Today I tried to run something (not something I wrote, something someone else wrote) and I got a nasty error. Tracked it down to the fact that Performance Counters were disabled. But as well as that, I wasn't running as a local administrator, which it seems I needed to be to allow access to said Performance Counters, all so that the system could detect if they were already running a copy of the app in question. I don't like having to be a local administrator. I don't let my kids run their computers as local administrators, and I would really rather not be one myself. Even more so, I don't want the people running my applications to have to be local administrator, and I try to make a point of not requiring it. Mind you, just about everyone I know runs under local admin, and I guess it's 'normal' to do so. I just don't like it. I guess I'm 'different'. Thanks, Jesper & Steve.
I'm looking forward to being able to escalate privilege as required.
I came across this on Clarke Scott's blog. Seems it's a MSN Messenger bot. Ask it to solve an equation, or some piece of trivia, and it can be handy. But also, a friend of mine suggested I try:
Rob Farley says: I'm sleepy Encarta® Instant Answers says: Would you like me to call you Sleepy? Rob Farley says: No Encarta® Instant Answers says: K, no prob.
And then I asked it a few questions of my own:
Rob Farley says: How are you? Encarta® Instant Answers says: Welcome back, Rob Farley. I'm doing great, how are you? Rob Farley says: Yeah, not so bad thanks. Encarta® Instant Answers says: Not so bad? Fantastic.
And:
Rob Farley says: Do you know who I am? [U] Encarta® Instant Answers says: You are Rob Farley. Rob Farley says: Who is Rob Farley? [U] Encarta® Instant Answers says: I don't think I know Rob Farley. Let's try an Encarta search. =>
So I guess it does worse than Robotman on the Turing Test.
I'm getting seriously stressed about the SQL2005 exams that I'm facing starting a week tomorrow. I really don't feel like I know my stuff yet. Shankar was telling me that the new exams are REALLY in depth. So that did my confidence the world of good (sarcasm doesn't really come through in blogs, does it?). I really need to get learning. Problem is, normally when I do an exam, I don't need to learn the stuff, I already know it, and study is reminding myself of stuff. This time, I feel like I need to learn stuff for the first time, and that's starting to freak me out a little.
I was talking to Shankar Pal today at the Ready Launch event in Adelaide. He's a Program Manager for SQL Server. I checked out his log when I got back to work, and there's lots of interesting stuff there. Most interesting (I think) is the links to other blogs on the side. Shankar doesn't blog very much, but when he does, it seems to be worth reading. On the other hand, some of the blogs he links to seem to have a bunch of pretty useful information.
These days I read a bunch of blogs, and most of the time, I read it, mark it read, and don't think about it much more. I get the feeling that the people that I come across through Shankar's linked blogs will have me reading the blogs and then doing a bunch of extra investigation before marking the thing as read. That's cool. :)
Also... Met a few people today who were interested in how to upgrade to SQL2005. I think we might have a session on that in the User Group in January. What do you guys think?
Last night was the Adelaide Launch Party for SQL2005. I'm not sure the theme really worked - I think really it was just an opportunity for a bunch of geeks to get together and catch up. "Catch up" is the key expression, because there were lots of people who don't often make it over to Adelaide. Quite a few MS people, but also Joe Sango, who seems like a good guy.
I tried a few really bad jokes (the best one saved until last - saying that in the SQL group, being from Adelaide, we're all S.A.), and even sang karaoke with a few people when the place had quietened down enough.
Today is the Business Launch. I might drop over there later on today, when I've got a few more things sorted out.
Around the office there are several ringtones that are just too loud. Drives people crazy. The most ordinary of ringtones can be awful if it's too loud.
When I'm at work, my phone sits in its cradle just a few inches from my keyboard. If it rings, I'm going to know. I don't need to have the volume very high at all.
But then when I get up from my desk, and go and talk to someone, or pop out to get some lunch, or go to a User Group meeting, I typically forget to turn the volume up. So I miss calls. Or Greg Linwood misses calls when we're waiting for Chuck to phone back for the webcast (which by the way, seems to have lost the audio completely now - hopefully we'll have more luck next time). Point is - when there's other noise around the place, I want the phone to be louder.
It already handles volume adjustment if I'm talking into it and it detects that it needs a gain change, so I think it should detect the ambient noise and make the ringtone louder! If I'm in my car, it should belt out its ringtone as if I'm hearing impaired. If I'm somewhere quiet, it should do a modest little ring. I don't want it to start quiet and get louder - it will have probably gone to voice-mail by then anyway. And I figure that since my phone is a PocketPC, I should just be able to patch it to have this. Or even find an API that would let me program the phone to do it myself (you know, in all that spare time I have!)
If you don't know what's at sqlserver.org.au, then you should!!! It's the home of the Australian SQL Server User Group, of which the Adelaide group is a part. You should register there, and go back regularly to find out what's going on.
Today I added the December meeting, at which David Lean is presenting, plus details of the Launch events (21st and 22nd), and also created a new forum in which you can give me feedback on the Adelaide events. Feedback is great. My ego can cope with criticism, and is always happy to receive compliments. But without feedback, it's hard to know where to make things better. So get writing!
Also write about how to improve the website there, because if you think it could be improved, you might not be the only one.
It's going to be a busy day. Michael Kleef is in town (presumably for the Launch events), and is taking the opportunity to speak at a TechNet Update event. I doubt I'll get there, but it's sure to be a good time.
Sometimes I think I must be crazy. Today I signed up for two more SQL beta exams (thanks Andrew for putting me up for it). If I do well, then by Christmas I'll end up almost having a bunch of new Microsoft certifications. I'm now doing 4 exams. Nov 30, Dec 2, Dec 14 and Dec 16 (the exams are 431,441,443 and 444 if anyone's interested - I forget which order).
There must be something wrong with me. I don't even feel like I know very much about SQL2005 (yet!). And I'm not even a current MCDBA, only a MCSD. And it's been 4 years since I did my SQL2000 exam. Hopefully they'll get the other two exams out there at some point, so that I can hope to get MCITP right under my belt.
I do plan to do the MCPD stuff at some point too, but I do want to get the SQL stuff sorted as well. I probably should've taken the MCDBA exams ages ago, but I just didn't get around to it. Registering for beta exams just kinda forces the point.
Looking at this page there doesn't feel like much that is out of reach. I've never really been interested in the sysadmin ones (MCSE, MCSA, MCDTS). MCT interests me, as does MCLC. And that only really leaves the Architect one. But that's a whole different ball game, and one I doubt I'm ready for yet.
Why do I do this? It's not like I call myself "Rob Farley BA, BSc, BComp(Hons), MCP, MCSD, MCAD, MCSD.Net" (have I forgotten anything? probably...) Does anyone actually put those letters after their name? One day I might join the ACS, so then I'd be able to put MACS on there too. Feels late, and I'm going offline now... to dream of sitting exams I'm not prepared for.
Well, we had the SQL group webcast today. You can view it for the next 90 days here. It was a lot of fun. The content was great, we had a big turn out (42 apparently!), hadn't catered for enough (my fault I think, I should've made sure Penny & Rose knew the expected numbers a few days earlier), had all kinds of headaches trying to get the audio working reliably (it dropped out every 10 minutes, still working that one out), but it was a great time.
We had our vote for the December 15th topic - it's going to be on Tuning Query Plans for the Optimizer with David Lean. Lunchtime again. And we'll webcast that one too. Heck, we'll webcast them all if we can (unless the speaker doesn't want us to).
I've been doing some Ajax stuff today. It's lotsa fun! More later - gotta run now.
I saw a SQL Tip on padding numbers, which seemed really lousy.
The way I pad numbers is to use 'right', rather than 'left' and 'len'. And certainly not 'case'.
They wrote:
SELECT value,LEFT('000000',(6 -LEN(value ))) + CONVERT(VARCHAR,value) AS Formattedvalue FROM #ValueTable
And I'm suggesting:
SELECT value,RIGHT('000000' + CONVERT(VARCHAR,value), 6) AS Formattedvalue FROM #ValueTable
The way I see it - if you have something you want to appear on the RIGHT, with some unknown amount of stuff to the left, then it makes sense to use RIGHT. If I don't want it to break when the length of the value is too long, then a case statement will do the job.
Chuck and I just made sure we knew how to get the webcast working.
Following the link to present (not listed here), I got prompted about LiveMeeting. So I downloaded it.
Turns out that for audio, you need to set up the 'conference number' (using the link on the 'Internet Audio Broadcast Settings' form) like this:
Country: +61.... City: blank. Local number: 431... Actual keys: blank
(my number starts 0431...)
You can upload a powerpoint presentation (Share | Share Document to View), which can help with syncing and stuff, but it simplifies the document, so if you have animations or anything, that should just be shared with the desktop.
You share the desktop by going to Share | Share Application. But it doesn't do a secondary monitor. It has to be Monitor 1. So if you're planning to extend your screen onto a projector, and just share that - forget it. To do that, you'd need to set up your local screen as monitor 2 and the projector as monitor 1, and move the stuff that you don't want seen over to monitor 2. Hope that's clear. :)
And as I mentioned before, there's a special link you use for presenting to join the LiveMeeting in the first place, but I'm not going to post that there. I have it in my bookmarks, so we can use it on Thursday.
The link for the webcast is here: http://msevents-as.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=120465372&EventCategory=3&culture=en-AU&CountryCode=AU.
EventID 120465372. Wow... and the pressure's on, because I hear #120465371 was really great!
Remember that it's in Adelaide, so the 12:30 start is 1pm in Sydney, 12pm in Brisbane, 11am in Perth, and 2am in London.
Incidentally, a friend of mine who bought The Times couldn't find the article. Maybe it'll be in there on the 8th, which makes the comment that I'm 31 slightly less accurate.
For some reason, the journalist decided to put an 'ert' on my name. But either way, it's nice to appear at http://www.timesonline.co.uk/article/0,,27-1860709,00.html . Now I just need to find somewhere to buy a copy!
I've never been so excited about ManUtd winning a game. But when they break Chelski's unbeaten run nine games short of Arsenal's record, that's a fantastic result!
This Thursday Greg Linwood is presenting at AdSSUG. He's going to be talking about indexes, which should be pretty interesting. So far there are 25 people registered, so it should be a good day.
Even more interesting is that it's looking like we're going to WebCast it. I was talking to Chuck Sterling on Friday, and it seems like it's all quite doable. So even if you can't come along, you can still watch it! It's the session he was going to do at TechEd 2005 (before he got sick) so if you were there, and still want to hear what he has to say on it, then tune in! I'll try to post some information about it before Thursday, when I find out where the link will be, etc...
Makybe Diva has won the Melbourne Cup for the 3rd year running. The nation stops for a horse race. I don't really understand why, but I guess it's one of the few sporting events that occurs during the working day. It didn't feel like such a major event when I was living in Melbourne, probably because we didn't work. Now that I live in Adelaide, work actually stops for a few minutes.
I can understand it for particular events at the Olympics, or for the World Cup (in almost any sport), but for a horse race?
Why do I do this to myself?
I've registered to do two beta exams for SQL2005 - 071-431 and 071-441, which are the betas for 070-431 and 070-441. Nov30 and Dec2 are the big days for me, and I'm slightly stressed about them already. I shouldn't be, but I am. It doesn't matter if I don't pass them, it's just an added bonus if I do. I've had SQL2005 installed for quite a while now, and I feel like I know quite a bit about the new features - so theoretically I should do alright. But even so...
Anyone else out there doing these exams? Feel like studying together?
I feel tired today, because it feels like I got up an hour earlier than normal. Didn't help that I went to bed at a normal 'time', with my body wondering why I was going to bed early. And of course the kids had to be off to school at what felt like really early to them as well.
Databases suck when it comes to daylight savings. Typically the server they are installed on will be set to a timezone that will adjust automatically, and the database doesn't record the timezone with a datetime field. So an event that starts with a getdate() and then closes a few minutes later with another getdate() suddenly seems to take over an hour, or perhaps negative time.
One option is to have databases on machines that don't adjust for daylight savings, and then adjust according to the local time of the client (or web server). But then you find that the events of a week ago seem to change by an hour, because they were being displayed in winter time, and suddenly now they're being displayed as summer time. And users really hate that.
It would be really nice if databases could be configured to understand daylight savings really well, so that you could ask them how many hours there were in March or October (eg: datediff(hour, '1-oct-2005', '1-nov-2005') ) and have it give you an odd number, not an even one. Or even better, the western world could just accept that everyone is happy with having the day centred around 1pm, and leave daylight savings on all year round. Everyone seems to prefer having more daylight in the evenings than in the mornings, so where's the problem? (Except that Greenwich Mean Time would never be correct in Greenwich)
What's the likelihood of someone reading my blog who doesn't already know that VS2005 Professional and SQL2005 Developer are now available for download from MSDN?
Tonight was a bit of fun. I was talking to David Lean on Msgr. Looks like he might be speaking to AdSSUG on Dec 15th (I know I said the 8th, but we tend to have meetings the day after the second Wednesday, rather than the second Thursday). During the conversation he said that Greg Linwood wanted my phone number. I gave it to him but said that my wife was on the phone. And Greg couldn't email me, because his wife was online. So we were talking through Dave. Well, I thought it was funny.
Seems Greg's going to be in Adelaide for the second weekend in November, so there are yet-to-be-confirmed rumours that we might have a meeting in November after all (apart from the launch). If you're reading this and are yet to hear from me that the meeting is happening, drop me a line to let me know if you'd be interested. You know... rob_farley at hotmail. I'm hoping that it would be the lunchtime of the 10th. If I get lots of people emailing me to say "Nah - not interested", then I'll try to trade Greg's slot in for one in January or February.
Isn't running user groups fun? Oh yeah - if you're reading this and you're going to be coming to the community launch event on Nov21, and you're interested in speaking for a few minutes about some great SQL2005 thing, then let me know and I'll put in touch with Mr Lemphers. :)
I got to catch up with Michael Kleef today. He's a good guy. If you don't know him, then keep your eye out for an opportunity to meet him. He'll be at the community launch events that are coming.
I can't write much at the moment - I'm about to get picked up (home time!) - but at the next Adelaide SQL Server User Group meeting I have a good shirt and keyring to give away. So make sure you come along. Probably December 8th.
Dan pointed out that EXTERNAL_ACCESS is enough to let my median aggregate work, rather than marking it UNSAFE.
When we moved from London to Adelaide, Roslyn moved a few weeks before I did. She bought an old Camira just to get around, we didn't expect to keep it all that long.
We still have it, I've been using it to get to work, as it's been fairly reliable and we've seen no real need to replace it. It probably wasn't even worth $1000, and so long as I was happy to be seen in it, it would do the job. Also... a car worth less than $1000 isn't worth putting fire 'n theft insurance on. After all, you figure that no-one's going to bother stealing it...
Over the weekend, it went missing from outside our house. We reported it gone, and this morning we got a call to say it had turned up, with no visible damage. Yeah, except for a missing indicator, missing mud flaps, that type of thing. Oh, and the dirt. Stupid amounts of it.
It didn't start either. We would've used the jumper leads in the boot, except that they'd been nicked. So we borrowed some from my mother-in-law, and have added them to the list of things to get. Managed to start it, and hoped to get back to work in it. Didn't. Tried to drive it home... but it really doesn't go. We ended up towing it home, and we'll work out what to do next later.
My practice amp was in the boot, and Joel's booster-seat is gone. And I had a bible in there (hope they read it!). So it wasn't just the jumper-leads that got stolen.
I called this post 'Value of a cheap car', because until I get a replacement, we'll be inconvenienced in the school-run and getting to work. Can't be helped I suppose, but it's definitely annoying.
Well, I feel like I cheated, but I do have a working user-defined aggregate function that calculates the median.
I wrote earlier about it not really being possible. Well, I managed to implement one that works, even if it's very nastily done, really slow, with other issues too.
I persist the data in a file, and then in the Terminate() function, I read it back into an ArrayList, sort it, and grab the middle record. It's not very elegant, but it works.
The issues are:
1/ I had to mark it as unsafe because it accesses the file system. So then I had to make the database trustworthy and use an sa account to import the assembly.
2/ If the query is interrupted, the file isn't deleted properly. I can't implement IDispose, because the CLR object is disposed after every record, so that idea doesn't work at all. So instead, I would use a separate process to look for old files and remove them.
3/ It's really slow. On AdventureWorks on my laptop, it took less than a second to work through the 290 records in Employee, but 13 seconds to get through SalesOrderHeader. But it does give the correct records. I figure it's no good for a website, but it could be okay for a scheduled report, and to be honest... if it's something that a SQL developer is putting together, then they can use row_number() to get the median out. This is more useful as an available function that could be used in a report built by a business user in Report Manager.
I guess 'really slow' is subjective. I hope so anyway. :)
I won't post code here... I'm sure you all know how to write data to a file and then read it back again. You can always post a comment if you really want to see the source code.
Darren wrote about leaving his machine unlocked when he went away to lunch.
Here's a way to really annoy someone... saw it done once.
You take a screenshot, using the PrintScreen button. Save it to an image, and set it to the background. Then you lock the machine, and move the login box to the very side, where it's hardly visible.
Much better than being malicious of course, and they tend to get the point...
Haha... why do I keep typing Toure instead of Tour?
Today at ADNUG there was another plug for ReadyTour05. In Adelaide, we're going to be limited to about 100 people, so I'm really hoping that the SQL Group (you remember, the one I run now) are going to be able to register really quickly and get in before the spots all disappear.
ADNUG had a lunchtime meeting today - Dave Glover spoke, on some of the new stuff that got mentioned at PDC. Nothing really new for quite a few people, but I was surprised to hear people suggesting that many of the new things would cause us all to be dependent on Internet Explorer.
I use Firefox generally these days. I tend to use IE for reading Hotmail, because that's what MSN Msgr launches when I click on the button that says how many unread emails I have. But generally, I like Firefox. I like the plugins, stuff like that. And I like the fact that Microsoft is being browser-aware like never before. There are very few things that don't work just as well in Firefox than in IE, and we're all being assured that ATLAS will work cross-browser. I like this about Microsoft, and I think they're probably not advertising this as much as they should be.
It seems I missed out on getting the acting role I was after. It went to Daniel Craig instead. Mind you, he's 37, I'm only 30 - so perhaps I'll get it next. I'd need to get my original accent back though. And get into acting. I think I have the 'rugged good looks' department covered. Eh? Oh.
He seems an odd choice, and I'm not sure he'll last. Of the other Bond replacements, Roger Moore and Pierce Brosnan were the most successful because they'd already done similar roles on the small screen, proving themselves nicely. Brosnan was Remington Steele, and Moore was The Saint. I've always thought that the guy who plays Bond shouldn't be a 'bad guy', particularly not a guy who seemed good but then turned out bad. This was something I didn't like about Timothy Dalton - he always had that look about him that he wasn't entirely trustworthy, probably something he picked up in Flash Gordon - and I think it's a reason why some people will never be able to play Bond.
I think Clive Owen would do okay. He showed the ruthlessness in The Bourne Identity, and it means that when he's on the screen, people will be comfortable with that aspect to him straight away.
But ideally, I'll be enough of a megastar in 8 years' time, so that when they look for a replacement for Mr Craig, they'll consider me. ;)
Surely there must be a way of making a median aggregate in SQL CLR. Dan Sullivan doesn't think there is. It's easy to write something that will do it in T-SQL, but this isn't a proper aggregate function, like ones you can make with SQL CLR.
So where are the issues?
Well, the MaxByteSize limit of 8k is a pain, because without it, you'd be able to store your whole list of values, and then sort them and find the middle in the Terminate function.
If CLR aggregates could access the database, then the list of values could be stored in a working table. But you can't do that either (plus it would be really inefficient).
I'm still not convinced it's impossible. One day I'll work it out.
November 21 is the one that really matters. This is when Microsoft are putting on the VS2005/SQL2005/BTS2006 launch event for the user groups. The following day is the invite-only event which is going to be aimed at educating industry.
I don't have a bunch of official links yet... I'll try to post something when I get some.
Good news: England beat Poland overnight. We had already qualified for the World Cup Finals, but potentially this could make us one of the top seeds, and mean that we don't have to face Brazil or Argentina in the group phase. Could it be our year, 40 years on?
And Australia will meet Uruguay for their chance, after Uruguay managed to beat Argentina 1-0. Either Argentina weren't really trying, or Australia is en route to disappointment again.
Personally, I think Australia shouldn't be part of the Asian Confed. The Oceanic Confed should be part of Asia. If Oceania exists, then Australia should be in it - but all the Oceanic teams would get better by playing against the Asian teams. Australia doesn't get enough competitive matches. Friendlies just aren't the same.
I'm writing this on my PocketPC using PocketBlogger. It's an app that I would've written myself if I couldn't find a decent alternative ... and I think I still might. I want more functionality. Time is the killer of course.
The other one that I wouldn't mind writing is an SSH client, and SFTP too. I'll see how time goes.
Small apps written for Smartphones and PocketPCs seem to be really popular - particularly if they're freeware.
Dave Glover's ConvertIT has got so popular he's had to globalise it! I guess when I get around to finding something to write as my way of learning the .Net Compact Framework, I'll have to make sure I do a good job, in case I get lots of people downloading it.
This week, Egress got an upgrade, to version 2.4. It's an app for PocketPC, which Dave mentioned recently. It's a nice little app... but I wouldn't mind if you could auto-sync to external OPMLs. That would help Dave in his quest too.
My favourite features of the new version are:
1/ An exit button - this is really handy on a PocketPC. Previously you could quit with Ctrl-Q, but it's hard to do that using Transcriber. 2/ A 'mark all as read in this channel' button - which is just a shortcut to a sub-menu item. If you click something 10 times each time you use the app, then it should be on a shortcut.
Great to have Karl paying attention to it.
My wife is fantastic. :)
Today we were walking through West Lakes mall, just passing the time while we waited for Wallace and Gromit to start. On a side-note, it's really good. We've seen a lot of kids' movies recently, Charlie (who thinks that the TV kid looks like the Logan twins from Big Brother? And look at the favicon for that Charlie site - haven't seen that Netscape icon for a while) and Sky High, and Shark Boy is on the list to see too. That's one I can happily miss. But there seems to be a lot of good films coming up in the summer too. Narnia (hope my 5yo isn't terrified by it), Chicken Little, Ice Age 2, Valiant, plus others I will have forgotten. And the standard seems to be improving too! I have to admit enjoying the three I've seen these holidays, and the previews for the other ones all look pretty good too.
So, we were walking past a sports shop, and I put my head in to see if they had Arsenal tops. I could see they had tops for other teams, like ManUtd and AdelaideUtd, and I was curious... Turns out they did, and they had a special on. So I have an early birthday present. :)
I needed to get a map for part of Melbourne. In London I got spoilt by streetmap.co.uk (just throw a postcode into the querystring and there you are) and multimap.com (love those overlaid photos!). Here in Adelaide, I tend to use wilmap.com.au, which isn't great, but at least I can provide URLs for the maps. So I wanted to find a map for part of Melbourne, and I honestly turned to mappoint.ninemsn.com.au. I know! I didn't expect that I'd find it particularly useful, but it actually wasn't bad at all. I've heard Andrew Coates rave about it, but I was pleased to actually find it useful. Shame you can't just pump in querystring values, but such is life.
Of course, I still miss streetmap and multimap. But then again, I still miss having postcodes that actually describe where the building is.
It's the school holidays here in South Australia. So I took a couple of days off this week and we went to Victor Harbor (What's missing? 'u' - seriously there's no 'u' in it).
First day, the weather wasn't great, but it was good for walking around Granite Island, letting the boys play, and stop thinking about work.
Next day, we went to Greenhills Adventure Park. That's a whole lot of fun if you have kids. There's a bunch of stuff to do, and if you go mid-week, slightly off-season (ie, not in January), then it's empty enough to be able to do lots of stuff. Joel got slightly freaked out by the water slides (but loved them and went over and over), Samuel got frustrated that his quad-bike wasn't fast enough, and Roslyn picked up some lovely bruises. As for my highlight, well, I didn't go on slides or bouncey castles, etc and my back is still sorer today than I'd like (especially around my neck where I got sunburnt), but I did try doing some archery - for one of the first times since I helped run the archery club at high-school. I did badly most of the time, but on the 2nd set of 4, I got my height about right, and on the fourth set of 4, I managed to get two shots pretty close to the centre of the target. I was pretty pleased with that! They were even touching each other!
The annoying thing about taking days off is that the amount of work doesn't seem to decrease. I feel really busy today. But I guess it's just the way it goes. One day I'll get around to taking a proper holiday. :) But it was heaps of fun to get away from normality.
A couple of months ago, Jeremy Huppatz asked for volunteers to become part of a committee to help run the Adelaide SQL Server User Group. I think it's a worthwhile group, so I put my hand up. Now he's stepping right out of it, so now I'm the group president.
I feel like this has been a bad month to take over. I was asked a few weeks ago, but I didn't want to overstep my bounds until it had been cleared with the rest of the committee. So now it's official, and I'm now trying to make sure that the first meeting is arranged properly - it's on Monday! It's been pencilled in (and almost completely arranged) for a few weeks, but today it still needed to be advertised!
Anyway - if you're reading this and you want to come along on Monday night, then please do. The next meeting will be organised in better time, I promise.
Dropped Chuck Sterling a line today, about his blog entry on the VS/SQL 2005 launch tour dates. He dropped a line to Finula Crowe (apparently I'm not allowed to mention her MediaCast), and she wrote back that the dates and locations are NOT confirmed yet.
But hopefully something will appear on Monday. I want to know what's happening in Adelaide!!!
A few years ago (2002) I was at a Microsoft conference in London. It was a pretty big deal - the speakers included Don Box, Bill Gates, and even Dave Glover!
At the end of Bill Gates' session, there was a question and answer time. And a prize for best question (an MSDN Universal Subscription). I don't remember what the best question was, but I do remember the question I was going to ask, except that they ran out of time and I missed out.
The conference was all about web services, and how this was introducing a new level of distributed computing. I remembered from my "History Of Computing" class at uni that the advent of home computing was largely brought about by the "IBM-compatible" concept allowed because of MS-DOS. Now it seemed like the very person who decided that computing should happen in the home was saying that it should now happen at the other end of a SOAP call.
So I was going to ask if future versions of Windows would be designed for low-spec hardware with high-spec networks. Whether future versions of Word would make calls to web services to repaginate or add bullets.
I wish I had been able to ask my question. I wish that a version of Windows was coming out that could run on all those old machines that schools are forever needing to upgrade. Instead I find myself looking at the features of Windows Vista, wondering how long it will be until schools are using it, or even when government departments will be using it. My kids already whinge that their computers aren't good enough to run Windows XP, that they're stuck on 98 and 2000. I'd like to get them networked, and install Windows-via-WebServices, which could run on a 500MHz machine.
But it's late and I should sleep.
In my last post I talked about a new feature that I suggested for Vista. Turns out that it's already in Beta2. So I guess my thought wasn't particularly original (I'm sure that's a good thing) - but it's still nice to feel like there are good ways of making suggestions.
Feeling inspired yesterday, I wrote a letter to David Dein, the Vice-Chairman of Arsenal (and really, the guy who runs the club). He's also on the board of The Football Association and is on a UEFA committee. So he's pretty influential. Did I mention I went to school with his son Darren? I can't say Darren and I were good friends, but we were in the same year.
My letter was about the issue of salary caps. I don't think salary caps are generally a good thing, but I think there are things that can be introduced that have a similar effect. So I wrote to David Dein about it. I had to guess email addresses, and cc'd it to a general address. Overnight I got a reply saying "Your message has been passed to Mr Dein's office." - so I guess there's a chance he'll read it.
Who knows? Perhaps one day people will be using a "Farley Salary Cap" system around the world, and I'll be as infamous in the football world as Bosman.
One of the things I really like about the community aspect of Microsoft is that it's given hooks a long way into Microsoft.
For example... some of you might've watched the video from Channel 9 featuring Chris Jones. Chris Jones is a corporate vice-president. He's in the Executives list. But in the video, he said something like "If you have any feedback about Vista, then drop me a line..." So I did. I said there should be a really obvious way of activating Vista (proactively, rather than just reacting to a popup in the taskbar), and a really obvious way of telling if Vista has been activated (like in the "Registered to:" section of System Properties).
And he got back to me within a day, and now we've exchanged a couple of emails about it, and he's suggested a new feature to one of the guys in his team.
I'm sure that a couple of years ago, this wouldn't've been nearly so possible. I'm not on any beta-testing list or anything - it was just that I had watched a video (well, had it on in the background while I was doing other stuff), and decided that I should give a bit of feedback. I could've gone hunting for an official beta-feedback address - but this was easy. Chris could've just pointed me at an address, or could've just ignored me. But he didn't. I like that. :)
MsgPlus 3.60 is out today, so now I'm using MSN Messenger tabbed, as well as browsing tabbed. Not sure if I'll keep using it yet, but I'm guessing I probably will. It's nice to be able to have them all together, to Ctrl-Tab between conversations, that type of thing. And I can always ungroup particular conversations when I want to.
I don't always grab add-ins, but this is one that I do like. I just need to remember not to install the sponsor whenever I update it. ;)
The other night I felt like wasting some time. So I did.
I got my cap today. It's not a bad cap. It's denim, and has a proper buckle on the back. But it says 'Certified Rock Star' on the front. If it had said 'Certified - well, certifiable at least' on it, then I might wear it.
My kids will appreciate it. Thanks Andrew!
19200x2400 is probably overkill. But doesn't it look nice!
I suppose if you have to monitor some feeds, want to have various things running in the background, that kind of thing... Is this the future? I suppose it would be neat for playing games on that could support that kind of resolution. Car games where you could physically turn your head to look out the side windows for example. What's next? Screens that you surround yourself in for flight-simulators, and a USB swivel chair, so that you can turn around properly?
Today I'm finding that I need to re-install Vista on VirtualPC. Being busy over the last few weeks, I hadn't got around to activating it (I generally prefer to run VPC without networking unless I have a really good reason), and it had gone past the activation period to the point that I couldn't do anything on it at all. :( So now I'm re-installing it. I'm fine about blowing away the stuff I'd done, but it's a shame to have to reinstall the thing.
This time I'm going to activate it straight away. I don't want to have to go through all this again.
Also, I want to play with Atlas, but I've heard that it doesn't work properly with VS2005 RC1. So I guess I'm putting Beta2 back on. I guess that's not the worst thing in the world, but I really would've preferred to be using RC1.
Joel's had the week off because he's been sore still. He'll be back at school on Monday.
I'm at home tonight. Joel comes home tomorrow, assuming things are okay in the morning. He's fine now. Almost no more pain, almost no more swelling, almost no more redness. Almost no more colour-loss in Dad's hair.
For those of you who have asked - he had an idiopathic oedema. Which basically means that he had a swelling of fluid that they couldn't put down to a particular cause (idiopaths!). We put it down to a fall he had on Friday morning during PE, because he was normal in the morning, and got sore after his fall. Roslyn and I were out for the evening (to celebrate her birthday), so her mum picked the boys up from school. She took him to hospital in the evening (phone-call one - the 'probably nothing' one), and then to the children's hospital at about 1:30am, which is when we got phone-call two - the 'probably something' one. Not the kind of phone-calls a grandmother wants to make, nor the kind that you want to get. I often wonder how on earth my grandparents took the news about my dad dying. Not something I ever want to go through.
It's good to be home. I wish Joel was here though. Roslyn's staying at the hospital tonight, after I did last night and Friday night. Tomorrow is Roslyn's birthday, so it'll be a weird day. I'm exhausted. I have a list of things to do before turning in tonight, including getting a bunch of stuff sorted so that Samuel and I can leave for school really early so that we can drop by the hospital en route and give Roslyn her gifts and cards. I'm only on-line because I can't really turn my head off properly.
It's only just after a year since Samuel (8 now) was in the same ward in the same hospital with Kawasaki's Disease. It took several days from when he went in until they figured out what it was, and just how serious an effect it could have had. Even now he's still on aspirin every day, and it has really affected all of us a lot. I guess on Friday night when we were at the hospital with Joel having an ultrasound to try to work out what was wrong with him, a lot of stuff started going on around my head, which should slow down at some point. Distraction is a good thing. I don't enjoy hospitals, particularly children's ones. I'm so tired. And Roslyn probably won't enjoy her birthday as much as I'd like her to. Sleep is in order, but it's very hard to relax, even after something like this is over. Relief is good, but it still doesn't allow for much sleep.
Oh yeah - it's also "Talk-Like-A-Pirate Day" tomorrow. Aaarrr. Poor Roslyn, it's an annual thing.
I like to feel that I have at least some degree of control in every situation, but I guess I'm not realistic in this hope.
At work I tend to have control over what?s going on. If a client springs some new requirement, I can deal with that, and although I might be put out, I can maintain control, scheduling it when it suits my other priorities for example.
But this morning I find myself at the Women's and Children's Hospital. Overnight our youngest, Joel (5), had to come in here, and I have no control over the situation at all. It's just over a year since our oldest spent over a week in the same ward as I'm in now. He had Kawasaki's Disease, and will be taking aspirin every day at least until February. This place doesn't do it for me. I don't want my kids to ever have to be in hospital.
I didn't get much sleep. I was on stay-over duty. I wouldn't've slept at home either, mind you. But Joel managed to get about 3 hours or so, which is better than nothing.
I don't know when this post will get to the blog, I don't have connectivity from here. In the meantime, please pray for Joel, and for the rest of us too.
November 7th is my birthday (I'll be 31 this year). And I'm convinced that Microsoft took this into account when they decided on this date for releasing SQL2005 and VS2005.
Of course it'll be Nov8 here in Australia before Redmond has woken up, but perhaps that's them being nice, and letting Australians get through their Monday before causing hysteria as we all download the final versions.
With PDC on in LA this week, the release candidates of these tools have been made available, and most importantly, stuff written against these release candidates WILL WORK (or at least, will be easily migrated) to the final version. This is a big deal. I'm 30 for another six weeks or so. And now, I'm really hoping that I can get the chance to put proper code into place on these new systems, confident that I can have that code work on the final versions. That's nice.
Now I just need that time thing.
I guess we should've all expected it with PDC on this week.
There is just so much going on! Atlas seems really cool - dying to play with that one... Virtual Earth is now available commercially. The VB future site is up and got heaps of new info to read (I prefer C#, but I appreciate both). Release candidates of the 2005 versions of SQL & VS are out for MSDN subscribers.
...I just need time to play with them all. And time's something I don't have. :(
David Lemphers has posted to his blog an article about community. He says the best thing he can do to help community is to facilitate it, not drive it. I happen to agree, although I think there's a little more.
Community is run by people. No-one denies that. Having a website that helps the communities share knowledge, meet each other, advertise events, all that jazz - it's great, but you still need champions of the cause. If Dave were to produce a fantastic site and then just disappear, then I doubt the thing would really take off. But if Dave becomes a champion, mentoring people into a community-mindset, then there's a good chance the thing can fly.
Conversely, there are probably a bunch of people out there who already think community is where it's at. I'm probably one of those people. But still those people need empowering. They need encouragement. They need mentors. People like Dave (who are paid to help the community) can find these people (and others), and work with them to help them achieve the goals they all have in mind.
Dave Lemphers as a mentor... is that a scary thought, or what? ;)
This morning on my way in I started listening to Greg Low's sixth SQL DownUnder podcast. It's an interview with Itzik Ben-Gan. He talks about T-SQL enhancements in SQL 2005, and what excites him about it. I like this guy! I haven't come across him very much, but I do like his thinking.
For example, he talks about using an auxiliary table of numbers, for use in a number of different type of queries. This is something I've done for years - I think as long as I've used databases. It was something I remember looking for in both SQL and Oracle. In Oracle I could use the RowNumber feature to be able to get around it in some cases, but SQL really didn't have an equivalent. Since then, I've tended to create a table called 'nums' in almost every database I've used. It's just SO useful.
I thought it was really interesting to find that Itzik had a Pure Maths background, and that he found an immediate appreciation for the SQL language. I was the same. I did a half-major in Pure Maths at uni, and I even skipped the database subject in my CompSci major. Everyone always said it was easy marks, and I really wasn't interested in that.
With a job offer coming part way through my honours year, I left uni and got into the real world. Immediately, I was faced with databases, and had to learn SQL. It made sense to me straight away. Since then, I've enjoyed using SQL, finding better ways to do things in it, and ways to do better things. I treat it as a puzzle solver (like Itzik does), and I often have problems that are particularly suited to a database approach, rather than using an interative language. I'm the same with Prolog - a language which is great for solving particular types of problems.
I'm not sure if I'll get around to picking up any of Itzik's books, but I will put them on my list of 'books I'm planning to read'. And hopefully he'll come to Adelaide one day, instead of only doing the east coast!!!
Any day which starts with the news that England has lost 1-0 to Northern Ireland can't be that great.
On top of that, work seems to be getting remarkably busier than normal. I knew the todo list for my team for September was quite long, but it seems like things are conspiring against me to make the list even longer and put obstacles in the way of shortening it. Don't get me wrong - I like being busy. But I also like to be able to keep my clients happy. Typically they can all handle "You've picked the wrong week to ask for something new..." because they know me and understand that I will work hard to get everything sorted as early as I can. But I find it frustrating when I'm limited by the number of hours in a day to get everything done.
I'm off home now, and I'll try to catch a bit of the cricket. I'd happily tune in to see that rain has delayed the start - but I would also love to see England beat Australia for the first time since I was a kid.
One of the RSS feeds I subscribe to is the Daily Manna - a bit of the Bible every day. It's nice to have the decision about what to read from the Bible taken out of my hands, I hate thinking about what to read when I pull out the Book.
Today's verses were from Genesis. Chapter 12 if you're that interested. It was where God said to Abraham that He (God) would bless those who bless him (Abraham). I love this promise. It's an invitation to show everyone kindness, to do your best for everyone, to throw yourself into helping people. That's great! And it comes straight after another fantastic promise - that He would make Abraham's name great. He says (paraphrased) "Get out of your comfort zone, go and do something new, and I will give you success in it." I want that in my life. I'm not interested in having a comfort zone, I want to be on the edge, doing things that are new to me, and blessing others through it.
For those of you who don't believe in God (well, you probably haven't read this far down), you'd be wondering how this affects you. Well, you could just say "Cool - I can ask Rob for help with stuff", but my challenge to you is to try thinking about what your take is on the topic, Maybe you believe in karma or something like that. Maybe you think I'm a mug! Who knows? But next time you have the chance to bless someone, give it a go. Maybe God will notice and bless you for it.
"You could win from here" was an expression that I became known for around the pool table I mentioned in my last post.
Typically, I'd be playing someone, or maybe talking to someone who was playing, and one of the players was losing badly. Maybe 5 or 6 balls left on the table (8-ball, by the way, not 9-ball), compared to their opponents 1 or 2. Their turn would start, and they would start looking around the table, hoping to find a way back into the game.
I would look at the table, and often say "You know... you could win from here." Typically they wouldn't believe me, but I would follow it up with "Pot this one, then take that one, with the white ending up around here. Then put that one into the corner..." you get the gist. Just occasionally, they'd believe me, and sometimes even pull it off. But my point didn't change. The fact was - the odds might've been against them, but they could still achieve success from where they were.
No situation is hopeless. Your project might be seriously late. Your team might be inadequate for the task. Your client might be turning the screws. But success is never out of reach. Things can always be turned around for the best. We don't always feel like things are that way, and at times like that, I appreciate people like Stu telling me that I could win from here. And it's not even a question of having to define 'win' to something that's achievable. 'Winning' is a state of mind. You need to expect to come out of your situation in 1st place. Not beating everyone else, but satisfied that you won.
Ugh - I feel like I'm philosophizing... but at least it explains why I've called my blog "You could win from here"
A few years ago I worked in London. After I'd worked there a few months, the company bought a pool table. I don't really remember the reason for it - it was just something they did. It was the kind of thing that would've been more commonplace in 1998 than in early 2001, but either way, I didn't mind.
It took 20p pieces (small seven-sided coins for those people unfamiliar with English money), and it was in use more often than not. In a company of 3 people, that's not bad. Haha. Only joking. There were 30-40 of us working there. I was a Project Manager then, so you can imagine my concerns about how having a pool table in the office would be recorded in the risk logs of my projects, and about how I should adjust my project plans accordingly. However, to this day I like to keep a 20p coin in my pocket, and I really miss those days for various reasons.
As a Project Manager, the main thing you need to know from your people is how the project is actually going. If you can apply eXtreme Programming (quick shout-out to Dr Neil!), then great. In that case, you probably have each item in your project plan broken down into tiny tiny pieces, such that your project plan is actually quite accurate. But I wasn't doing that in those days. Don't get me wrong - my project plan was quite well broken down, but either way, I wanted to talk to my team and find out what their concerns were.
Talking to developers at their desk never works, in my opinion. You're distracting them from their task. They feel distracted. They want to give you their time, but they feel compelled to get on with their work. They can't get past looking at that line of code they're half way through, or that form they're designing. So having a pool table in the office was a fantastic opportunity. You could walk up, put 20p next to them, and within 5 minutes, you'd have them away from their desk, without them feeling like they needed to be finishing off their current task. Of course, sometimes they would say "Don't have time, Rob" - in which case I would either decide to postpone it or insist - but on the whole, it had the desired effect.
Once away from their computer, they would be more relaxed, and feel more comfortable talking about what was going on. I took the role of ally, of friend, of brother-in-arms. As we put down our mice and keyboards and picked up the pool cues, it made us equals for a while. They could beat me (occasionally) on the pool table, and that helped too. And I could find out what was bothering them, and take appropriate steps to help resolve that. It showed that I cared (I really did - I'm not just saying that), and the fact that they knew that helped deliver the project on time. Taking 20 minutes out for a game of pool was a great way of having a meeting with them. And for the benefit of the project, it really helped a lot.
I still talk to some of those guys on Msgr. I've lived in Adelaide for over three years, and most of those guys don't work at the same place either. But the relationships were forged there, and we made a good team.
At TechEd, the wireless connectivity wasn't great. Maybe they needed this: http://j-walk.com/other/wifispray
More and more I'm finding that it's good to read books on my PDA. My PDA is also my phone, so it doesn't tend to leave my side. It has wireless too, which means that it syncs really easily when I'm at work, or some other hotspot. So it's great for downloading RSS feeds, podcasts, that type of thing. I have a 1GB SD Card in it, so storage isn't a problem. Nowadays when I'm by myself in the car, I'm listening to podcasts instead of the radio, and at other times, I can check out media-casts that have downloaded, or read some PDF that I have. Recently when I had registered to do a couple of exams at TechEd, I bought a couple of exam prep books, and was pleased to see they had PDF versions on an accompanying CD. So I put them on my PDA, and found that it was really handy. Certainly better than lugging around a massive great text book with me. So next time I want to get a book (maybe Jesper's book on security) - I'll be hunting around for a way to get hold of a PDF of it. Dr Neil was telling me that there's a publisher who creates personalised PDFs for you when you buy a book through them. It puts your name in the PDF, so that they can tell if you make it available to other people. I think this is a neat idea. It makes the publishing costs really small. Shipping becomes free. And yet there is still no real worry about the publisher being ripped off by having the electronic version file-shared around the world. Now, if only I could get a bunch of non-technical books too... Oh yeah - my phone is the O2 XDA IIs, for anyone that's interested. It's a good phone, although I would've traded it for the IIi if it had've been available at the time. The IIi basically trades the built-in keyboard for a better camera. I don't use the keyboard, so it's probably a trade I would've made.
A short while before TechEd, Andrew Coates wrote on his blog that people could do free Microsoft exams at TechEd. I did my first MS exam in 1998, getting my MCSD under the old Architecture I and II exams. I upgraded to the VB6 exams as the other ones deprecated, but hadn't taken the .Net exams yet. Just hadn't put the priority on it that I had done in the past. Perhaps it would be different if the VB6 ones had deprecated too, but they haven't, so I hadn't taken any of the new exams yet. But I had thought I should get around to it, and had even bought a couple of exam prep books. So I registered to do one at TechEd, and then registered to do the second one too. Stupid really. Just made me stress a bit, remembering how I always went into uni exams feeling under-prepared, and had typically felt the same about MS exams. I figured they were free, and it wouldn't matter if I failed - but I don't do failure, and I did stress a bit. I read through the two books once each by the time TechEd came round. It just reminded me that I tend to rely on documentation for knowing the details of how to do lots of things. The principles are there, but when I go to write the code, I'll look it up, use Intellisense, that type of thing. I'm sure this is what most people do, but it doesn't help pass an MCSD.Net exam. The first exam was 70-320 - XML in C#. I passed in about half the time. So I asked about doing the other exam right away. Not because I felt I was ready (I didn't), but because there was an offer to resit any exams done in August for free during September. It was Aug 31st, so I just planned to get a month study time. But I passed that too! And still before the scheduled end of the first exam! I was now MCAD. I asked about trying the other two exams during TechEd too, and they said ok. One during my other scheduled time, and one on stand-by. I had no study material for them, so I was a little stressed (Roslyn tells me I was very stressed), but I just thought maybe I could get one of them passed and behind me. So anyway, I'm now MCSD.Net, and didn't use that stand-by time. I think the exams are less pedantic than they were in the 90s, which I guess is why I managed to pass them without doing Transcender exams and reading lots. If you're in the .Net space then you're doing this type of thing often enough so that you probably know enough to pass the exams - so don't worry about maybe failing them. Buy a book. Do a sample exam. But even if you can't do these things - just try the exams. And if you see them offered for free, then jump at the chance. And I'm including you in this, Alastair!
I really enjoyed TechEd. I met a bunch of people, I caught up with people I don't get to see very often, I became MCSD.Net, and I learned some stuff too! I went to TechEd 99 in Brisbane - felt like I left there knowing a lot more about lots of technical stuff. This time, I went wondering what I would learn, because these days I go to user groups more, read articles a lot more, and test beta software more. So looking at the agenda, I wondered what I would learn. I was pleased to find that I did come away having learned stuff - I'll be downloading all the slides soon. But the real value will come out of the conversations I had. The time spent with Phil and Lorraine, Alastair, Nick and Meg, with Greg, Geoff, Michael, Mick and Cam, Wayne, David, Chuck, David, Andrew, David, Frank, Dave, Steve, Peter, Milton, Brendan, Alan, Julian, Cheryl, John, Athena, and the other people I haven't listed here - lots of them. All with different perspectives on the world of course, and all of whom I could learn something from and hopefully teach something to. I probably told most of them the same jokes - and they probably all smiled politely. But hopefully I'll get them on my Msgr lists, catch up with them online now and then, and keep swapping knowledge, ideas, and passion. I'm definitely better off this year. Last time I left knowing more information. This time I left knowing more people.
Last time I wrote here was back in June. That's forever in blogging terms. But since then I've formed a different opinion about blogging and podcasting. I've been doing my Aussenal podcast (www.aussenal.com) for a while now - I figured that it was quite easy to put together an audio blog, particularly about something I can rabbit on about like football - especially Arsenal. But my opinion on that has changed too! I still think it's worth doing, but now I'm wondering if I should make the time to do it better. I spent a bit of time with Mick Stanic and Cam Reilly last week at TechEd. Great guys (let's not talk about Cam's thoughts on creation/evolution) - they run thepodcastnetwork.com, and they're trying to put together a site of quality podcasts, rather than the directory concept taken by iTunes, podcastalley and others. They're looking for someone to do a soccer show for them, and I'm tempted to put my hand up for it if I can find the time. Could be a lot of fun. But the thing about blogging and podcasting comes down to this: podcasting can be an audio blog - great if don't have the time to write - but to be decent, it should be better. But blogging is about putting your thoughts out there. I wanted to have a blog that didn't get distracted by drivel, but it meant I just stopped writing. Now, I want to write more often. That way people can get to know me better and they might decide they are interested in more than just the technical side of my blog. I plan to do an occasional audio blog, but I'll see... Thanks to the guys at TechEd that opened my eyes to the idea of blogging to gain a bit more of an online identity... Frank Arrigo, Phil Beadle, the Daves, and others. Over the next few days I'll post some more about what went on at TechEd on the Gold Coast. Plenty to say, so watch this space.
It's been ages since I've posted to this blog. Since I wrote last, Arsenal have won the FA Cup, Liverpool won the Champions League, Port Power has been totally written off as a chance for any kind of glory in the AFL, and this morning there's news that Ashley Cole (of Arsenal) has been charged £100,000 for his involvement in the 'tapping-up' affair.
Anyway... yesterday I went to a user-group meeting and heard Dave Glover (a Microsoft guy) talk about security in Visual Studio 2005. He showed us a feature whereby you could hit a button and it would look through your code to find out what security permissions it needed to run successfully.
I put up my hand and asked if there was a way that you could find out what things in the code caused the 'requires XYZ' flag to be set. He said he didn't know, looked up, and said he didn't think it was available. There was a general consensus in the room that it would be really good if it would do that. And it got me thinking... It's all well and good for something to be able to produce a list of what security permissions a piece of code needs, but if you get surprised by the results, surely you want to be told why a particular flag got set.
What if a compiler only told you that a particular program failed to compile, rather than what made it fail? Pretty quickly, people would complain about that compiler. I guess it's a bit like trying to open an XML version of a spreadsheet, and simply being told that it failed on the 'Table' component. Or trying to check a file into NetIQ Application Manager that doesn't compile. I feel like it happens all the time. Even RunTime errors in the .Net Framework don't tend to give particularly useful error messages... you really need to catch hold of every different type of exception and bubble them up to the top, or else catch none of them, so that you can see what is causing the particular error.
If anyone ever catches me putting together some code that fails but doesn't say why, then please call me on it. I want to produce code that tells the user's what went wrong with what they were trying.
Recently I've been reading (and commenting) on various SQL newsgroups.
More and more I find that the problems people have are because they haven't defined what they want properly. Perhaps this is a difference between people who learn to program in a structured environment (such as a university), and people who learn to program by being thrown in at the deep end.
When I went to uni, I could already code adequately. I wasn't a great programmer, but I didn't feel like I had major coding issues. At uni, they taught us things like pseudo-code, and I kinda dismissed it, thinking that that was for people who couldn't code. But quite quickly, I saw the value in it.
Pseudo-code is really handy in all kinds of ways. By writing out what I'm trying to do in my own language, I can achieve a stack of things.
Firstly, it makes me think better about what it is I'm trying to achieve. Writing something out in English will help you notice when you're approaching something from the wrong direction.
Secondly, it helps show me where modules should be written. Anything I've written as a sentence that isn't almost a line of code in itself, I put as a function, or better, re-use a function I've written before. If it's new, I write pseudo-code for that function, which helps me work out what information I need to pass in and return.
Thirdly, it breaks what I'm doing down into smaller, more quickly achievable chunks. This is a big win. It means that your project is broken down to really measurable components. If you finish your pseudo-code and find that you have 100 things to write, then you can mark them off your list, and easily see how far you have to go.
But back to SQL...
SQL queries are really not that different. Hopefully your database design was based on a chunk of English in the first place, so that you have a reference to what everything does in a language you understand nicely. So then, when you need to write a query, you start by expressing it in English. Then you explain what you mean by each statement. When it's broken down enough, your query is just about written already.
For example. Recently someone asked about a query that would run on the 'pubs' database to show all the employees that had the next anniversary of their hiredate coming up in the next 30 days.
Well, considering that 'hire_date' is stored for everyone in the employees table, the location of the data is a no-brainer. It's only the computing bit that is going to be tricky.
So let's explain our statement better.
Someone's anniversary is the date this year (or next year if it's already passed) which is an exact number of years added on to the original date.
The 'exact number of years' added on to the original date is just the difference in the number of years between then and now.
Oh yeah - let's not use getdate(), because that makes testing harder. Later, we can replace our variable with getdate(), but that's for later.
datepart(year,hire_date) is the year of hire. datepart(year,@now) is this year.
So, dateadd(year,datepart(year,@now)-datepart(year,hire_date),hire_date) is when that date occurred this year.
So then we check to see if it's already been (but comparing with tomorrow, because we don't want to miss today!)
case when dateadd(year,datepart(year,@now)-datepart(year,hire_date),hire_date) < dateadd(day,1,@now) then dateadd(year,datepart(year,@now)-datepart(year,hire_date)+1,hire_date) else dateadd(year,datepart(year,@now)-datepart(year,hire_date),hire_date) end
So you see, it pretty much wrote itself! Next put all the values you need to compare in the resultset, and then make your where clause from that: So you construct: Select fname, lname, hire_date, ,datepart(year,hire_date) ,dateadd(year,datepart(year,@now)-datepart(year,hire_date),hire_date) ,case when dateadd(year,datepart(year,@now)-datepart(year,hire_date),hire_date) < dateadd(day,1,@now) then dateadd(year,datepart(year,@now)-datepart(year,hire_date)+1,hire_date) else dateadd(year,datepart(year,@now)-datepart(year,hire_date),hire_date) end From employee where datediff(day, @now, case when dateadd(year,datepart(year,@now)-datepart(year,hire_date),hire_date) < dateadd(day,1,@now) then dateadd(year,datepart(year,@now)-datepart(year,hire_date)+1,hire_date) else dateadd(year,datepart(year,@now)-datepart(year,hire_date),hire_date) end) <= 30 order by 7
Looks messy... could maybe be optimised a little. But it's correct, which counts for a lot. And we could verify that it was correct by looking down the list of values in the earlier statement. And because we're using a variable, we could look for interesting cases such as leap years and entries near the New Year.
Having used Oracle quite a bit early in my database experience, I found that I liked using rownum for all kinds of things.
Nowadays, in SQL Server, I'm very pleased to see that SQL2005 is introducing the feature to the Microsoft world. About time!
It got me thinking though, about a common situation that I come across. Let's suppose I want a list of dates between two dates, and then join that list with another table for some reason. Perhaps I want to look at the total sales that went through each day... returning 0 if there were none (rather than just skipping that day, which is what would happen if I were to only look at the Sales table).
At the moment, I tend to use a table that I just store numbers in for this type of purpose. Like this:
select * from dbo.numbers
nums ---- 0 1 2 3 4 5 ...
Then I can write a query like this:
select dateadd(day,num.number,@startdate) theDate, sum(sales.amount) theSales from numbers num (NOLOCK) left join salesdata sales (NOLOCK) on sales.saledate >= dateadd(day,num.number,@startdate) and sales.saledate < dateadd(day,num.number+1,@startdate) where num.number <= datediff(day,@startdate,@enddate) group by num.number
This query will give me zeros for weekends, public holidays, whenever no sales are made. Makes it display much more consistently in a report. If I think I'm going to use more numbers than I have stored, I can always call a top-up function first, to check how high my numbers go and then add more as required. Or I could use a function to create the table on the fly... but I'm not so keen on this idea, as disk-space for a table is typically cheaper than the processing time involved in creating a temporary table each time. Using rownum, I could have a table of bit values, which could be stored much smaller. I would just have to have enough of them in the table, checking count(*) instead of max(number) in my top-up function. My query would then become: select dateadd(day,rownum,@startdate) theDate, sum(sales.amount) theSales from bits (NOLOCK) left join salesdata sales (NOLOCK) on sales.saledate >= dateadd(day,rownum,@startdate) and sales.saledate < dateadd(day,rownum+1,@startdate) where rownum <= datediff(day,@startdate,@enddate) group by dateadd(day,rownum,@startdate)
But you can see that rownum appears in the 'group by' statement, which isn't healthy at all. Also, if I want to return multiple records for each day, I have an issue, because rownum will increase by one on each row. Really, I need a subquery, like this: select dateadd(day,num.number,@startdate) theDate, sum(sales.amount) theSales, sales.salesman from (select rownum as number from bits (NOLOCK) where rownum <= datediff(day,@startdate,@enddate)) num left join salesdata sales (NOLOCK) on sales.saledate >= dateadd(day,rownum,@startdate) and sales.saledate < dateadd(day,rownum+1,@startdate) group by sales.salesman, num.number
Someone commented: But if it weren't for graphical tools, I wouldn't have ever been able to conceptualise a join
Fair enough. In which case, learn about joins, and then stop using your graphical tools. Once you know the difference between an inner join and a left/right join, then leave the graphical joins alone. I reckon the only use for graphical tools is to avoid typos in table names.
Haha... I just showed this blog page to the friend of mine I referred to in the blog below. He told me that I made it sound like he had a clue. Thing is... I reckon he does.
SQL shouldn't be hard! Typically, people confuse themselves with SQL, instead of just thinking about it in a straight-forward way. I think if you're getting confused about writing a SQL statement, then just try to do it more slowly. Put something together than queries everything you might need to use. Then try to make sure that each record is reflected properly. Then apply your aggregations, etc, and you'll probably find that you can get your query done correctly first time.
Oh, and I try to get people to avoid using graphical tools to write their queries. I think they just make things worse. Of course they can help with joins, but joins aren't very hard either. Just learn the syntax, and try writing your queries out from scratch. Chances are you'll quickly learn to do it well.
|
|