Wednesday 14 November 2007

SQL Server - argh!

I'm currently having to get 'into' SQL server at work. I come from an Oracle background, but hey, how different can they be, right? Well... you'd be surprised.

One of the nice things about Oracle is PL/SQL. In my last job I wrote a lot of PL/SQL... it's easy, quick to do, well documented, and allows good software engineering. SQL Server uses something called 't-SQL' and compared to PL/SQL, it's appalling. The best way of demonstrating this is with an example. In stored procedures I can do this in PL/SQL:


PROCEDURE MyProcedure
errorCode OUT NUMBER,
errorText OUT VARCHAR2,
someItemID IN ITEM.ITEMID%TYPE,
someNumber IN ITEM.ITEMNUMBER%TYPE,
somethingElse IN OUT NUMBER,
result OUT RESULTTABLE.RESULT%TYPE) IS


This can be part of a package defined as two files - a spec and a body. All good software engineering.

With MS SQL Server I simply can't so this. As far as I know, there are no packages with specs and bodies, for one thing. There are weird, implicit returns for selects, variables defined within the procedure, and other strange and wacky stuff that really works against every good software engineering principle. Also, a roughly equivalent header might look like this:


CREATE PROCEDURE [dbo].[MyProcedure]
@errorCode INT OUT,
@errorText VARCHAR(1024) OUT,
@someItemID INT,
@someNumber INT,
@somethingElse INT OUT,
@result INT OUT AS


The biggest problem is that you can't get the type from the columns of a table, so if the table changed you have to change all of your code. This is insane! Large applications may have thousands of stored procedures, all of which would have to be changed. The lack of packages (although as I say, I might be wrong there) mean that you can't logically group procedures either, and you lose some context that you get in Oracle just from the package name.

As I mentioned, the way stored procedures seem to work in SQL Server is by implicit returns. For example, say we have this line:


declare @intReturnCode int


We can then add a 'return @intReturnCode' later and return a value not even defined in the header. Worse, you can do something like this:


set @someValue = (select fieldValue from someTable where name = 'this')


So looking at the parameters you'd have no idea that you were going to get 'someValue' back, or what type it is. Madness, absolute madness.

I must admit I was wary of SQL Server, but the more I look at it the more I'm amazed that anyone actually uses it. I mean, they only added exception handling in 2005! It's like some sort of toy database, but with a fairly hefty price tag.

Anyway, feel free to correct me. In the meantime I will continue to think poorly of it..

Friday 28 September 2007

Bibcursed bug fixes

My tiny 8 year old curses-based application Bibcursed has some reasonably dedicated users. One of them sent me a bug report recently, so I've just put together the first new release for five years or so. You can grab it from SourceForge.

I think I'll Mac-ize it next... put a GUI on there and see what happens, although I'll keep the curses version too. Terminal-based apps are usually all you need for useful tasks, and the ability to run them over SSH in a terminal is useful. It sounds daft, but one thing that attracted me to OSX is the fact that BASH and vi and there by default. Windows just doesn't have that functionality and probably never will, which is why it will never displace UNIX when it comes to serious usage in critical applications.

Friday 15 June 2007

Embracing Facebook

So, Facebook is still growing to encompass almost the entire world. This can't be ignored when you're a dynamic and hip Internet music outfit like we are here at The Filter, so today we released the MyFilter Facebook app.

Please give it a go. While you're at it, you can install the client (from our Web site) to get you personal charts and recommendations. You can get the client for Windows and OSX, of course. And Nokia phones.

So, that might all sound like a bit of an advert, and I suppose it is. However, we've got some genuinely exciting plans and it's all free, so what have you got to lose? It's time for us all to rediscover our music collections!

Wednesday 6 June 2007

Girls, Geeks, Google

Yesterday evening I went to the Google offices by Victoria Station in London for the thirteenth Girl Geek Dinner. This was the first one I've attended at a different venue, and I was interested to see the Google offices. They're in Belgrave House on Buckingham Palace Road - an impressively large building which also houses American Express (I think). The event itself was held in the staff canteen, and Google had laid-on food, booze and so on, as well as some cute promotional stuff. Top marks for all of that.

The first talk was given by Shivauna Raff, who talked about the future of search. She touched on some interesting stuff about vertical searching, and how she thinks the search market will go generally. The next talk was by the Google team behind the mobile version of Google Checkout. They had some interesting tales of the rather painful-sounding world of getting applications to run on phone... not an inconsiderable challenge when you consider the different phones that exist, and the fact that the same phone models can differ when used on different networks!

The way that products are developed within Google provoked some discussion. For the size of the company and number of users, Google use quite small development teams. This surprised some of the audience, but I think Google must have something right! I'll argue about the best way of doing things with them once I've made my own billions...

Sarah recorded the talks - you can find them on Viddler. You can also see Jane Dallaway's photos on Flickr.

Tuesday 5 June 2007

Developers Developers Developers!

...so goes the familiar Microsoft rant, as expressed by Steve Ballmer. What he should have added, of course, is "They had better not be too clever if they want to work with us!". A guy called Jamie Cansdale has found this out to his cost by developing his Testdriven.NET plugin for Visual Studio. Basically, Microsoft are going to sue him for using APIs they encouraged people to use, mainly because something he's giving away for free might compete with one of their products. It's worth reading this article on it, including the increasingly threatening emails they are sending him.

Every day I'm glad that I don't have to develop on Windows. Not only would it mean actually using Windows (something that I can avoid completely now, thankfully), but Windows developers have such an overpriced monoculture to deal with when it comes to development, that it pretty much stifles innovation... unless you have piles of cash, of course. There's a pretty good reason why all the best new ideas are coming from non-Windows platforms, and by acting like they are in this story, Microsoft are only going to make the problem worse for themselves.

Thursday 31 May 2007

Isn't The Internet Brilliant?

Google continue to chuck-out things that impress me, and even better, they're free. Take the recent addition of 'Street Views' on Google Maps, for example. You can now become a virtual tourist of several cities in the US, and it is done really well. I'm not sure how they've done it, but the objects (people, cars and so on) all look normal and not stretched and stitched, as you'd imagine. I spent a few minutes looking at exactly the same views I had poking around San Francisco and Las Vegas last year - it's almost spooky.

Also on the Google front, Checkout is brilliant. I buy quite a lot of stuff from eBuyer as they're very cheap for computery bits and pieces, and for orders over thirty quid you get ten pounds off simply buy paying with Google Checkout! Can't argue with that - I've saved quite a lot already. Well... 'saved' in a sense, since I probably didn't exactly need some of the things I bought, but you know what I mean.

We're now into June, so I'm looking forward to the WWDC on the 11th. Not that I'm going myself of course, but we'll finally learn the 'super top secret' Leopard features, plus I'm sure there will be some product announcements. I'm hoping for a boost in Mac Mini specs, but there is a rumour it is being dropped! I guess I'll find out soon enough, but if it is dropped then I'll just have to pick-up one of the remaining ones. The current Core2Duo would do the job, but hopefully I'll be able to pay the same for a better machine.

There's iPhone promotion going on at the 'All Things Digital' conference at the moment, but that's far enough from its UK release that I'm not really thinking about it. At the same conference, Microsoft showed-off a whizzy table that is a bit like a giant iPhone. I guess it was kind of cool, but they're talking about around ten thousand quid for it, so it's not exactly a consumer device. Looking at the demo video, it's pretty similar to the iPhone Multitouch interface too, so not that innovative.

Facebook continues to gather steam. Every day it seems more people I know join it... I think it has reached that critical mass now where a social networking site actually becomes useful. The new applications that can be added to your profile page are also pretty cool, and as long as they don't allow people to change their page layout/fonts/colours then it's all good. If people start being able to mess with their pages then it will just become another MySpace, with people getting 'creative' and making horrendous, unreadable pages. Urgh.

Sunday 29 April 2007

Geeking Out

On Thursday I was in the City at the eleventh London Girl Geek Dinner. This was the third one I've been to, and this time I offered my video services. There were a couple of issues with the camera and the new wireless mic I have, but with a bit of crafty editing it hasn't come-out too badly. You can check it out via this link to Viddler. Be patient with the crazy camera swinging - it calms down after a minute or two! I was fiddling around and slightly boozed-up.

The event itself was interesting. First-up was David Terrar from Wiki Wednesdays, which is another geeky networking London event. Then there was Angela Beesley from Wikia, which is a bit like a commercial Wiki site, although Angela talks about her work with Wikipedia too. Finally there's the Wiki team from Astraware who talk about using Wikis in their company. All quite interesting, although I was quite boozed-up by the end. Hopefully that doesn't show too badly in the video! Sarah says more about the evening in her post (the first link here), so check that out if you're interested. Oh, and Radio 4 were there recording the event for Woman's Hour, so I guess it may crop-up on there too. You never know.