Thursday, October 27, 2005

Agile Databases and other paradoxes

So Niall Litchfield’s aside about Sandra Momali’s taste for Agile development has kicked off a bit of a debate. I thought I’d throw in my tuppenceworth, as I find XP a very seductive idea, even though I haven’t had much opportunity to use more than a couple of its techniques. I think it is easy for discussion about Agile development to descend into straightforward bashing of Java heads and developer-vs-DBA scrapping. Which can be fun for the participants but are not particularly enlightening for spectators. Besides there’s more to Agile than Java. In fact, Bruce Tate (author of Better, Faster, Lighter Java) seems ready to dump it in favour of Ruby because Java is insufficiently agile, EJB3.0 notwithstanding.

I hope we can all agree that the problems that Agile seeks to address are valid ones. Applications are all too frequently delivered which are bug ridden, late, not what the customer wanted, not what the customer now needs, and sometimes all of the above simultaneously. Let’s disregard considerations of whether there are other approaches that can also solve these problems and take the Agile approach as a given. The question that needs to be answered is, "Can Agile techniques sensibly and profitably be applied to database development?"1

From the Agile side of the fence the answer is mostly a resounding raspberry. Agile practioners tend to regard regard databases as persistence repositories of last resort. They have a number of strategies to avoid writing SQL. Not just by deferral, using Mock Objects in the development stage, but by making deliberate architectural decisions to not use databases. These range from serialization to files through use of in-memory object stores like Prevayler to hands-off Object-Relational mapping tools like Hibernate. Last year I was talking to a UKOUG member who no longer attended the SIG I help run. He explained that his project was currently being migrated to a new version using Hibernate, Spring, Velocity, etc. I said, that sounds exciting, could someone do a presentation at the SIG? Back came the answer: No. Being Java developers they literally could not see the point in talking to a database user group. The whole point about their approach to application development was to avoid thinking about the database at all.

Some of this resistance may be down to sheer pigheadedness, but (at the risk of seeming to patronise Ron Jeffries) many of these people are actually very bright and aware people. They just don’t think databases can be Agile. Why is this? Let’s look at some of the Agile practices that are made harder by working with an RDBMS.

Incremental Design


Agile starts with rather sparsely-defined requirements and uses techniques such as Test Driven Design to flesh them out. This is not building a prototype, this is working, production quality code. By building real code the Agile practioner can show his user a working application and get meaningful feedback that allows him to refine the requirements. Hence together they build the system that the user actually wants. The anti-pattern for this is Big Design Up Front. Here we spend ages drawing a mesh of boxes called an Entity Relationship Diagram. We show it to a bemused user who nods guardedly. We turn it into a data model but the user still isn’t as excited as we are. Finally the database gets built and then the front end gets built on it and whereupon the user wails, "But that’s not what I meant at all!" The question is, does the fault lie in the database or the process? Are databases inherently BDUF?

Obviously, we can just build one table at a time. But is that enough? Probably not. We still need to normalise our database2. Consequently, any attempt to build our database incrementally means constantly refactoring of our existing tables, to eliminate duplication. Can we do this? Yes we can! Of course it requires that we hide all our tables from public gaze behind an API - PL/SQL packages, views or types, which some people will just hate. The larger question is Tom Kyte's point about the importance of designing for performance right from the start. Does that imply BDUF? Yes, at least some. The other problem is that refactoring an object is a lot simpler than splitting one table filled with twenty million rows into two tables. Our database design can be reasonably plastic in development but once we go into production inertia kicks in. I think here is the killer for Agile practices: database refactoring is hard. Scott Ambler seems to be ploughing a lonely furrow in this area but his thoughts on The Process of Database Refactoring make interesting reading.

User stories


Agile practices tend to re-inforce each other and that’s the case with User Stories and Incremental Design. User stories describe how the customer’s business works. These stories will not mention data storage, except by implication. Customers don’t specify a database, they specify an application, that is, a front end. Customers cannot accept or validate databases. Even if we gave them TOAD and they wrote SQL queries that would not prove the database met any of their requirements, because their requirements are specified in terms of the front end. And without continuous user feedback we cannot be sure that we are coding in the right direction.

Kent Graziano has been working on building a datawarehouse using Agile techniques. He has presented on Agile Methods and DataWarehousing several times this year. When I saw him talk at Open World he said he had got some grief from Agilistas because the ETL section of datawarehouses doesn’t have users. So there cannot be any user stories. But as Kent points out, just because the business user (the customer) doesn’t know or care about the ETL process doesn’t mean that ETL has no users. On Kent's project they put the BI report writer in the user role. Which is a nimble, indeed agile, extension of the practice which doesn’t, as far as I can see, break any tenet.

Common Ownership of Code


When programming an agile practioner drives a path through the code base. If she finds an existing part of the application that blocks her implementation she can change, extend or fix that code. She can do this safely because the existing code has unit tests and the existing application has integration tests. More importantly, she can do this new work because the existing code base is in Java and she knows Java. But if this piece in the code base was in PL/SQL she would be lost: she doesn’t know PL/SQL. Even worse, suppose her change requires a new table? Then she would have to go to the DBA to find out about schemas, tablespaces, etc. This is too slow for the Agile way of working.

Teams of specialists are not Agile. We know this is true. How often have we been trying to progress a project only to be told, “We can’t do that, Gary’s on leave today.” To be fair this does not just apply to databases. I think Agile practices militates against heterogeneous programming environments and would be equally suspicious of (say) extensive use of shell programming. So, unless pretty much the whole team is competent in PL/SQL, using stored procedures just does not fit in an Agile project.

What this boils down to is the matter of where we should put the business logic. Unfortunately this frequently descends into a religious war. Either you believe it’s obvious that business rules belong in the database or it’s obvious to you that they belong in the middle tier. So let’s put it another way: in a client/server application where does the business logic belong? I think a large part of the middle tier proponents would then grudgingly accept the merits of the database as the repository of business logic. In most sites today we probably have heterogenous applications written in a variety of styles, techniques and languages, including many client/server applications. Our best hope of consolidating business rules is to use the database. But, this is an emotional debate and not one I expect either side to cede.

Object Oriented Programming


The alert amongst you will have noticed how often the term object appears in that list of persistence techniques: this is key. Agile programming languages are object-oriented languages. I was recently embroiled in a debate on the Test Driven Design list when I was told this surprising fact. Surprisng because I thought for several years I had been doing Test Driven Design by using Steven Feuerstein’s utPLSQL to build database applications. Apparently there’s more to Test First than merely writing our tests first.

Obviously an RDBMS is not object-oriented. A non-OO language like PL/SQL lacks certain key features supposedly necessary to the full panoply of Agile practices - abstraction, interfaces, reflection. Does this matter? I remain unconvinced. XP originated in the Smalltalk community and pretty much everybody you come across on Agile/Test Driven arenas seems to be an OO programmer. However, this is a self-fulfilling prophecy. Come out as a relational database developer and you get labelled as a handyman with only a hammer in your toolbox.

Use of Tools


Agile practioners make full use of utilities to improve their productivity - smart IDEs, code completion, continuous integration, automated unit testing, test coverage estimnators, refactoring browsers, etc. Compared to this panoply of riches PL/SQL looks very Spartan. There is the aforementioned utPLSQL but not much else. Of course, this is a vicious circle. PL/SQL lacks the tools to support Agile practices so people who want to be Agile don’t use PL/SQL so nobody builds the tools for PL/SQL.

Database development tools tend to focus on browsing the data dictionary and running SQL statements. There is very little around that genuinely supports the developer in building better PL/SQL or helps the DBA build better databases. This is a situation that is only going to get worse, as Oracle Designer slowly fades into the sunset. Paul Dorsey’s BRIM project (AKA The Tool) may be one to watch. Interestingly there is very little open source stuff for PL/SQL developers, compared to the wealth of freely downloadable utilities for Java heads and Pythonistas. I think this illustrates the lack of people who are competent in both an application (i.e. a UI building) language and PL/SQL.

Still, the Agile Manifesto says we have come to value individuals and interactions over processes and tools, so that’s all right then.

Instaneous Feedback


There is an old rule of thumb from the HCI arena that states that a user will regard as “too slow” any task that takes longer than ten seconds; if it takes longer than a minute they will start on another task and come back to the first task later. In Test Driven circles, running a suite of unit tests is such a task. The JUnit list regularly features complaints about how long it takes to run unit tests that require population of a database. This interferes with flow. Hence the popularity of Mock Objects. Hence the drive to isolate the database elements to as small a subset of the application as possible.

I think the database has to cop to this one. If your sole experience of database population is writing tedious XML files for use in DbUnit then you will naturally have a jaundiced view of RDBMS systems. But even people who know how to write SQL must admit that deleting and inserting records takes longer than instantiating some objects (once the JVM has been warmed up!). That’s the price we happily pay for rigour.

Pair Programming


Well, database people are notoriously misanthropic. Especially DBAs. We can still talk to each other.

Conclusion


The Agile argument is databases are slow to build and inherently hard to understand. This is true. But it’s true because Agile is primarily a methodology targeted at building user-facing applications. Its adherents tend to work from the user interface downwards. Of course it’s crucial that we build an application that meets the user’s needs. But the user’s needs extend beyond the functional requirements of the application screens.

That doesn’t mean we cannot apply Agile techniques to database development projects. Certainly I regard Test First to be an invaluable technique in building stored procedures; I’m always nevervous when I’m not coding to a utPLSQL test case. My experience of working on DSDM projects tells me that incremental development - in particular placing working code in front of users early and often - is a very good idea. Kent’s work proves that Agile techniques can be profitably applied even to a juggernaut like a datawarehouse. The pain comes when OO-fixated bean-mongers clash with constraint obsessed databasers. Perhaps if they drank less coffee they wouldn’t be so hyped up all the time.


1. By database development I mean building data structures (i.e. tables) as well as programs (PL/SQL).

2. I learnt yesterday that Codd’s Twelve Rules have been deprecated because "Codd formulated them as a quick and dirty way to counter all the nonsense that was floating at that early time, they are not orthogonal or systematic, and our understanding of RM has progressed considerably since then."

Thursday, October 20, 2005

ToDo Driven Development

Lucas Jellema has just posted a technique for incorporating TODO tags in PL/SQL codes. This was a spooky piece of synchronicity because I had just stumbled across a "sexy new development methodology" called ToDo Driven Development on the SecretGeek blog. Leon Bambrick's implementation is for .Net and I was going to port it PL/SQL but Lucas has saved me the effort. Mind you, ToDo Driven Development has an extension which tracks HACKs as well as TODOs and that's obviously worth having. So I may enhance Lucas's code this evening.

Monday, October 17, 2005

Blogging about a blog about blogging

Jakob "Usability" Nielsen has just published an Alertbox on blogging. It's depressing to discover that this blog fails at least five of his strictures: No Author Photo, The Calendar is the Only Navigation, Irregular Publishing Frequency, Mixing Topics, Having a Domain Name Owned by a Weblog Service. The jury is still out on Forgetting That You Write for Your Future Boss and Nondescript Posting Titles. I'm not sure whether Classic Hits are Buried applies, as I don't know if I have any classic hits; but if I have 'em, they're buried. Sob.

Some of these are easier to fix than others. But I guess I really Must Try Harder.

Politics: Life During Wartime

Tony Blair describes the arguments in favour of his new anti-terrorist legislation as, "compelling". This is because if you disagree you will be arrested and put into a cell until you realise your fears about human rights abuses are groundless. Which brings me to David Mery. I gather this has been slashdotted but I only just heard about it.

Mery is a computer geek who has an unhealthy obsession with Bill Gates's Basic compiler for the Altair. On 28th July this year he was arrested for being in possession of a French accent and a thick jacket in a London tube station. In 1979 who would have thought that, twenty-five years on, policing practice would be based on a Not The Nine O'Clock News sketch?

Eventually Mery was released and his case has been marked No Further Action. But three months on he has still not had his confiscated computers returned. And, of course, being arrested for suspected terrorist activity will pose Mery an interesting hurdle at US Immigration and Border Control, if he ever decides to try to visit the States. Still I suppose he should count himself lucky not to have been shot eight times in the back of the head.

As someone who lives in south London and who uses the tube almost every day of his life, of course I back the police in the struggle against the Jihadists. But I too carry my laptop in a backpack. Does that mean I could be arrested because I meet some apparently arbitrary criteria? Ultimately, the Jihadists are trying to destroy a free society and replace it with one in which the individual's thoughts and actions are constrained by the pronouncements of official interpreters of divinely-given law. But, if we do this to ourselves, it won't matter that the name of the God is different, the Jihadists will still have won.

Wednesday, October 12, 2005

Prioritisation

In his latest article Joel Spolsky describes a workshop to prioritise features for the next version of his FogBugz software package. Like a lot of Joel's approaches it's both radical and plain commonsense. Incidentally it's strange that in our high tech industry all the best ideas seem to hinge on creative use of index cards.

Tuesday, October 11, 2005

Oracle: a suitable career for a young person?

A while back someone posted a pertinent question on the OTN DB forum, Is it Worth to be DBA?. The poster was in their last year of college, studying computing. They were wanted advice on the merits of various different technical jobs: sysadmin, networks, DBA. Alas they never replied my response (how did they want to measure worth: salary, intrinsic job interest, long term career prospects, fringe benefits?) and the thread withered.

Still, the question remains: how should we advise a young person wondering whether to become an Oracle DBA? Obviously being an Oracle practioner has done well by me and many of the readers of this blog. It's been my prime focus of work for thirteen years, and there's still some juice in it yet. For most of that time I have been a developer, designer and latterly architect but my time spent doing DBA work has undoubtedly informed my knowledge of Oracle. It is good for everybody who builds Oracle systems to understand the database from the perspective of a DBA, because in production the application is only going to run as well as the database permits.

Whilst I was pondering this question someone else pops up, asking how they get job as a DBA. I do find this desire to become a DBA slightly puzzling. The work, particularly in production, is generally dull except when it gets exciting, and that's when you remember that "May you live in interesting times!" is a Chinese curse. Being a DBA requires you to know the purpose of 257 parameters, 266 V$ views, 415 DBA% views, let's not forget the the X$ views... There's dry stuff like sizing redo logs, taking backups, applying patches, running installation scripts written by developers who haven't tested them, etc, etc. What precisely is the allure?

Partly it's the mystique of being in the know. The DBA is the gatekeeper, the person with the authority to run your code in production, the one who can tell you why your code is running like a three-legged dog in a vat of cold treacle, the person who laughs when you ask them to make the USERS tablespace bigger because you keep getting this ORA-1555 error. Knowing the SYSDBA password is the database equivalent of the sysadmin's got root? T-shirt. In fact, the DBAs and the sysadmins tend to inhabit the same room (and indeed are quite often the same people) but it is easier for a SQL developer to move into being a DBA than it is to become a *nix administrator.

Also, being a DBA is a glamorous job. It's not really of course, but most of the luminaries of the Oracle technical world are (or seem capable of being) DBAs: Tom Kyte, Jonathon Lewis, Connor MacDonald, Cary Milsap, Mogens Noegaard, the list goes on. But how many App Server gurus can you name? If you're developer, who is there to look up to? Steven Feuerstein and, er, that's it. (I know if you're into Java you could cite Steve Muench and Duncan Mills, but Java with Oracle is a distraction.)

So everybody wants to be a DBA because it's all about the data(base). Does that mean a person leaving university should try to become an Oracle DBA? Almost certainly not. There's a reeason why most DBAs are gnarled, bearded men: we need experience as well as knowledge before we are ready to become a DBA. It's just not a role for a neophyte. Besides, with the increasing commodisation of databases the role of the DBA is going to decrease in importance and sustained interest for the majority of people. Not to mention considerations of whether Oracle is a legacy technology.

If long term career prospects are the main concern I think a fresh graduate with a technical bent should get into networks: database, platforms, operating systems will come and go but everything about computing in the foreseeable future will still require networks. And with the rise of wireless the amount of time spent crawling under desks should be greatly reduced. If salary is their main driver then a graduate should seek to get into management, which mainly requires shedding all their technical knowledge as soon as possible.

However, we all spend the majority of the day, most days of our life at work so it is important to do something that continually engages us. There's no doubt that most Oracle roles are capable of offering stimulating work alongside the humdrum. How much time we spend doing the latter over the former is a measure of our talent. Good people understand the need to do the tedious stuff in order to get the interesting work right, so do it well and quickly; the very best know how to spin the dross into gold.

But for a job that's interesting day after day, that's full of surprise, delight and moments of wonder, that's always worthwhile despite all the poop it entails? Well, there's only parenthood. Nothing else comes close. Still, maybe not the thing to do right after graduation (unless gowns and mortarboards make you hot).

Monday, October 10, 2005

MS Office: Get your re-org boots!

Jakob Neilsen's latest Alertbox draws our attention to the iminent redesign of the MS Office user interface. Not the least of the woes ahead will be the learning of a new acronym: WYGIWYS, What You Get Is What You See. Practice it now, it's a tough one to get right.

Apparently Office 2003 is so full of functionality that many users cannot locate many of the features. Who'd have thunk it? Anyway, to solve this problem Microsoft are rejigging the various menus, toolbars and dropdowns in favour of coherently organised Command Tabs. This sounds mildly useful. More interesting is the WYGIWYS bit, whereby we format the document by choosing our desired result from a gallery of examples. As somebody is frequently driven to apoplectic fury by my inability to switch off some particular embedded Word style object I think any improvement to Word format styles is to be welcomed. Of course want I really want is a codes pane like WordPerfect had but I can't see that coming soon.

What does it all mean? Well there's some learning coming up for those of us who are bound to the corporately-supplied toolset. There's possibly some big yokks for the Open Office and Mac sparts. But just suppose Microsoft pulls it off. A new UI not swiped off Apple/Xerox that delivers real productivity gains to ordinary users: wouldn't that be cool?

Oracle Metalink: Don't shoot the pianist

Laurent Schneider recently posted on his bad Metalink experiences. Let me show you my scars...

My first stand-out bad experience was an iTAR on generating checkboxes in JavaServerPages back in the days of JDeveloper 3.0. After two weeks of hassling I got told there was a palette with a Checkbox icon in the JDeveloper IDE. This much I knew already: it was for Swing programs. I tried to explain about the difference between Java for client/server and web but the iTAR got closed anyway. This was when the Java language support was still done by the database group, who really didn't understand building client-facing applications at all. One of our Java brains figured it out eventually.

The second bad experience was a year or so later. We were having some difficulties with BC4J which dragged on without resolution. The support guy, exasperated, asked why we were using BC4J as "Nobody was using, even in Oracle". I posted that to an ODTUG list, to stir up a response. Oh boy. Steve Muench fired an enraged e-mail back to ODTUG. I had the Support manager on the phone. I expect the poor second-line drone caught it in the shorts (which I do feel bad about. Sorry, whoever you were). Did we get our problem resolved? Again, eventually. Again, this was Java. Oracle really took a long time to sort out its support for Java. But that's how I discovered the OTN forums, so it wasn't all terrible.

The third bad experience, was some kind of database thing, I forget what. The first-liner resolved it to his satisfaction and closed the iTAR. I called back to explain that he had mis-read what I had typed in the iTAR and that his "solution" solved a completely different problem. He said, 'You'll have to open another TAR.' Now that's a lot of typing to do all over again. It took seven words, 'I want to speak to your manager', to get the TAR re-opened, and resolved pretty quickly thereafter.

I've been using Metalink and Support for over ten years now and I think three memorably bad experiences in that time is pretty good going. Most iTARs get solved, and get solved within a reasonable time. Of course, not working in production means that I can take a more relaxed attitude towards rsolution time.

The real problem with Metalink is the interface. When I first started using Support it was all done with phone calls. Which was great: I almost always got someone who was knowledgeable, so most TARs were actually resolved on the phone or else they turned out to be bugs, (As I was using Designer 1.2 on Windows for Workgroups 3.1.1 to generate Forms 4.5 there were a lot of bugs). What that meant was I tended to phone up Supoort to get answers to questions of the "How do I do ...?" variety. Now that iTARs have to be raised through a web interface everything takes much longer. There just isn't the immediacy of a phone call. In fact the iTAR process is so slow it's generally a lot quicker to use the Metalink search engine or Google. As a consequence I never contact support with a "How do I do ... ?" question. They're smart, these Oracle guys.

Of course, the Metalink repository is not without it's problems. Why is it so hard to filter out anything to do with RdB or Apps of any flavour? Why can't I explicitly search for (or exclude) stuff by document type (release installation note, error report, How To bulletin)? Why is the weighting of documents so poor? It used to be that the first result when search for an error number was the OERR document. Now it's quite frequently number 79/100. The answer is quite simple: poor metadata. The Metalink repository needs much better tagging. Of course there must be so many documents in the database you can see why nobody want's to undertake the task.

But then, but then. Only last week I started to raise a TAR because I had failed to find anything helpful in the repository. having typed it all in the TAR workflow suggested six documents that might solve my issue, and the second one did. Result! So the information is there, it's just sometimes so hard to find it.

It's easy to knock Metalink, but who would really want to be without it?

Tuesday, September 27, 2005

OOW2K5: The wrap up

It's oh so nice to go travellin'
But it's so much nicer, yes it's so much nicer to come home


Sinatra sang that. Going to OpenWorld this year was great but it meant I missed my son starting reception class (kindergarten). Fortunately I did get back in time to collect Fred at the end of his first full day: his smile when he saw me is obviously the thing that I will treasure most from the week.

Anyway, Oracle Open World 2005. Now that I am back at work what have I been telling people about the trip?

Magnitude


Thirty-five thousand attendees. That's a small town. It's partly a sign of Oracle's success as a product but also an artifact of the major acquisitions over the last twelve months. There were large contingents of JD Edwards and PeopleSoft customers attending OOW for the first time, obviously trying to get a handle on the nature of this Oracle beast. It will be interesting to see if they attend OOW2K6 in such large numbers. At times the sheer number of attendees was imposing. Yet the conference organisation coped. There was enough food, water, coffee for everybody. Most of the time the queues were not excessive (except at Starbucks in the morning) and usually people got into to their session of first choice. The conference scaled well. It must run on Grid. Speaking of which...

Oracle's Commitment to the Grid Architecture


Probably the single most impressive fact I learned this year was the nature of Oracle's own enterprise set-up: a multi-node cluster of 288 CPUs with a BI layer running against the OLTP layer on the same instance. (By contrast, when 10g was launched at OpenWorld two years ago the reference site for the grid architecture was EA's The Sims Online with eighteen CPUs.) But it's more than just resilience. Grid architecture is becoming a key enabling technology for Oracle. Benefits of implementing the grid cropped up in sessions I attended on security, data warehouse architecture and efficient data loading. Oracle have not quite cracked the manageability angle, there is still an administrative overhead to running a grid. But once it becomes possible for us to treat a grid as if it were a single box then any barrier to take-up should disappear.

Oracle's Commitment to the Open Standards


Project Fusion was the key message of the conference: turning the entire technology stack, from database to portal, into a single suite of integrated, hot pluggable components. The integrated bit is obvious. Of course all the products from a single vendor ought to play nice with each other. The interesting bit is their commitment to open standards, such that we can swap any part of the suite for a similarly compliant product from A N Other vendor. So Oracle is going to certify its E-Business Suite against JBoss and WebSphere. They are even contemplating certification against IBM's DB2 database, although this will depend largely on the attitude of the PeopleSoft and JD Edwards customers towards database flavour. Also openness requires there to be other vendors with standards compliant software, otherwise it's just another form of vendor lock-in.

Utility Computing Revisited


Oracle have gone a bit quiet on this front but Sun seems to be going for it in a big way. It's not going to be long before get a site to host your business app will be a simple as filling in a form of six checkboxes and uploading an RPM.

Data Vault


Currently this product is in Beta but it was the most interesting announcement of the week. Essentially it answers the question, "How can I stop my DBA getting access to my customers' credit card numbers?" With Data Vault we will no longer hust have to trust the integrity of our DBAs. It is a set of packages and practices that separates user management from security policy from system administration. So for instance we will be able to enforce different levels of access in local and remote databases for the same user account created with the same system privileges. We could prevent the DBA from querying any table with sensitive business data despite her possession of the SELECT ANY TABLE privilege. We will be able to prevent anybody issuing DDL commands during business hours. Data Vault will feature a robust audit function impervious to tampering by even a DBA. Of course, it will not be bulletproof, but working around Data Vault should require collusion between at least two and probably three people, which is (we hope) much less likely than a rogue individual.

Steven Feuerstein


Can you believe it's ten years since O'Reilly first published PL/SQL Programming? Me neither. Now that the book weighs in at 1198 pages maybe it's time to same goodbye to the ants on the cover in favour of something of a more suitable scale, such as a (stunned) water buffalo.

Participation


It was nice to meet up with some other ACEs, to put faces and accents (hi Laurent!) to the names. I have a pretty good Namedrop Quotient at the moment.

Oracle seem to have improved the community side of things since two years ago. I attended a couple of get-togethers with a good mix of Oracle and non-Oracle people, and I am sure there were other similar events to which I didn't get invited. The hot technologies in the modern world are those were people can contibute rather than be passive consumers. People feel differently about Java or Python than they do about VB. Participation is the key to a thriving community. By opening up OTN to non-Oracle writers and acknowledging the contribution of non-employees Oracle is moving in the right direction. Although I think it'll be a long time before we're downloading the new version of PL/SQL from SourceForge. Which brings me to...

Badge of the Conference


A freebie from Apress with the slogan, "Life would be so much easier if we just had the source code." Which is very true when you think about it.

Wednesday, September 21, 2005

OOW2K5: Running out of steam

Boy these are long days. I seem to be getting more jetlagged not less.

Anyway, did you get to see Larry? At 1:00pm the queue literally stretched round the block. (I am not obsessed with queues, honest.) Anyway I decided not to join the end of the queue and get sunstroke so I headed up to floor 3 in Moscone West to get backache instead. I do think it was the right decision: there was no durm und strang before Larry came on stage and to be frank remarkably little once he did appear. Of course it didn't help that poor TV reception made him sound like Ken Godwin out of the Wheeltappers And Shunters' Social Club. He seemed mortal rather than a colossus bestriding the database world. Flourishing his glasses was a nice touch.

There were no fresh announcements. Pretty much everything Ellison said had already been announced, mainly by Charles Philips on Monday. There was only one joke, a dig at Microsoft. The most interesting thing is how long the Q&A section went on for, overrunning by so much that the sessions after the scheduled break were delayed. Larry obviously relaxed once he'd got all the messages out of the way and could just be spontaneous. Unfortunately I missed most of the questions as my back was giving me gyp. But apparently the ridicule in the media about the multi-core licencing model has struck home, and a new licencing approach is on its way. That is, yet another licencing model is on its way. Is YALM a word? It ought to be.

That's it for me for 2005. This particular thirsty bear is off to Steven Feuerstein's party. Cheers.

OOW2K5: Breakfast In America

At the bloggers dinner last night Mark Rittman was commenting on the breakfasts provided in the conference centre. They are called "continental breakfasts" but really they are just cakes and coffee. Mark was saying that the resultant sugar rush makes a good hangover cure (being an abstemious sort of fellow I couldn't possibly comment) but, if supplemented by Coca Cola and Skittles, it also enlives even the dullest of presentations. Well, the organisers must have known the Oracle Bloggers would be in need of a tonic this morning because they've laid on a spread of Krispy Kreme doughnuts, that deep-fried, sugar-coated heart attack in toroidal form. Yummy. Can't stop, must dash!

OOW2K5: Queueing Theory

The large number of attendees is really starting to bite. Queueing, not Total Integration or Project Fusion, is the dominant theme of the conference. Whenever two or three delegates gather together they will discuss the queue for a particular session or lunch or the toilet. The queue to get into Tom Kyte's presentation yesterday morning was so long that even Mark Rittman, ACE of the Year and Oracle Goldster, was unable to blag his way in. The English have a reputation for queueing, but these days it's undeserved. The queues here are really orderly, self-policed single files. The normal English bus stop "queue" is just a bundle waiting for the arrival of a bus to trigger it.

There have been rumours that the Conference might move to somewhere bigger, like Las Vegas, but this seems unlikely to me. Moving events of this magnitude makes turning an oil tanker look like spinning on a penny. In 1995 I got into conversation with a couple of events organisers in a Covent Garden bar. Naturally the talk turned to our plans for the millenium. That was the near future to them: they already knew what they would be doing in 2005. Living ten years in the future must be a very odd way to be, a bit like Philip K Dick's "The World That Jones Made". Another idea that has been mooted by a couple of people now is that the conference could be split into or even three separate events. But it seems to me that if the key message is Total Integration of the entire stack from storage technonolgy through applications to the portal then dis-integrating the conference is sending the wrong message. But let's face it, queues are a nice problem to have. They are a sign of success. It would be a lot worse if the conference was just lonely tumbleweeds blowing the Moscone Centre.

The queue for Scott McNealy's keynote started more than forty-five minutes before his keynote was scheduled to start; the keynote, and that was only supposed to last forty-five minutes. Lucky I brought a good book.

So was Scott worth the rock star treatment? Hmmm, not really. As keynotes by CEOs go he is entertaining. But he telegraphs his punches: if the Powerpoint throws up a picture of Larry you know a joke about expensive suits is coming. And the announcements are a bit underwhelming too. Scott talked about, "Let's have an iPod moment!" But Sunfire X64 4+ is not an iPod moment. If hardware floats your boat then okay. But Sun launching a new server is hardly as radical a change of direction as Apple moving into consumer electronics. Even if that server can run Windows. Still, because of the commitment to "planet-sensitive computing" I think we can say it is a Mini iPod in pastel green moment ;)

The most interesting part of Scott's keynote was the emphasis on zero cost of exit. Give away your software to the Open Source community, keep to open standards and compete on your ability to support your own servers. This is an interesting business model, the apparently exact opposite of vendor lock-in. Of course, being able to leave Sun easily is only half the problem for a CIO. If the competitors are all have lots of proprietary, closed products then where else do you go to avoid being locked-in? Smart.

I went to Dr Paul Dorsey's presentation on "Data Modelling with UML" genuinely expecting a How-To. Silly of me, I really ought to read the abstracts. What we got was a broadside against Oracle for abandoning Designer in favour of JDeveloper. Dr Dorsey is smart, articulate and boy is he ticked off. Paul is the first to state that JDeveloper is a first-class tool for developers. His name remains on the JDeveloper 10g Handbook after all. It's just not a tool for database architects. His frustration is evident and understandable. Apart from anything else, the market for JDeveloper is a small one. The tool is competing against Eclipse. A whole bunch of Java coders will never look at JDeveloper simply because it has the Oracle brand. A whole bunch more won't look at it because they think RDBMS is a dumb idea. And JDeveloper panders to this mindset by allowing Java developers to treat tables as just somewhere to persist objects. Paul was fair, he blasted Rational Rose for exactly the same things.

The key thing is that the same class model must generate the Java objects, the relational tables and the mapping between them. Just as Dr Dorsey started to talk about the only tool around that can do this, the BRIM product he has been refining for years, the battery in his laptop went. Was this sabotage by a black bag special ops team from the JDeveloper group? Who can say? I'm sure Steve Muench has an alibi.

In the evening I went to the Oracle Bloggers dinner organised by Mark Rittman. I'm sure everybody else will blog about it so I won't bother to say much. I was a bit fazed by the barman asking which vodka I wanted in my vodka martini. Er, you know, vodka. Tom queried my choice of a vodka martini, gesturing with his own glass and saying, "It's all about the gin". To which I should have replied (but didn't), "No Tom, it's all about the data".

By the way, am I the only person wondering why the Women In Technology International stand is being manned by a man?

Tuesday, September 20, 2005

OOW2K5: The numbers game

In his keynote yesterday Charles Philips said there were 35 000 attendees at the conference this year and it certainly feels like that. Particularly at the crossroads when we're interchanging between Moscone West and Moscone South; it's not quite Shibuya but it's not far off.

Yesterday I finally got to see Steven Feuerstein (Whom God Preserve) in action. It's 10 years since O'Reilly published the first edition of PL/SQL Programming, which made me feel very old as I bought that version. In fact I was the first kid on my block to have it. Afterwards I decided the time had come to upgrade at the Conference bookshop; I indulged the fan in me and asked Steven to autograph it. Today I court hubris by appearing at the OTN "Meet the Experts" session with Steven and Bryn Llewellyn (PL/SQL product manager). I think we ought to call it, You don't have to be bald to code PL/SQL but it helps. If you're reading this before 10:30am Tuesday 20, come along to the OTN Lounge in Moscone West.

I went to see Kent Graziano's presentation because the title seemed like a Zen paradox: Agile Methods and Data Warehousing. The Agile crowd (Scott Ambler notwithstanding) seem to have a strong antipathy towards databases of any sort so it's not surprising that Kent has had some stick from them over his interpretation of Agile practices. However I think his position is correct. As I have said elsewhere a lot of XP methods are very sensible and can deliver results. So what is wrong with refactoring the definitions to fit different sorts of projects. Agile practioners stress the importance of customer input but they only regard business people as customers. But what is wrong with saying that a BI Report programmer is a customer for an ETL process? Anyway, Kent's presentation has certainly given me some hope that it is possible to apply Agile methods even to apparently glacier-like projects such as datawarehouses.

Juan Loaiza's talk on the future of IT and databases turned out to be a discussion of Oracle's strategy for the next few years. The key messages are Total Integration, Agile Resilience and Unlimited, Unbreakable Platform. Not surprisingly the key technology is the Grid. Oracle have really pressed ahead with this: having grid-enabled the app server and the database they are now working on extending the grid to the storage layer. Fortunately for the SAN manufacturers none of the other database vendors seem to be following Oracle down the database grid road. Oracle's own E-Business suite is run on a single multi-node cluster with 288 CPUs. Of course they need all that crunch because they're running their BI and analytical programs in the same database as the OLTP applications. Now that's eating your own dogfood.

In the evening I tried to enhance my geek factor by attending the Linux Installfest. However, I'm afraid I bailed out when the kernel guys started and went in search of wine. Sorry, Todd. I resisted Laurent Schneider's urging to take the DBA Hot Seat test. This turned out to be a wise decision. I haven't really been a DBA since 8i and as most of the questions seemed to be about 10g features (especially Flashback and ASM) I would have ended up with only a promo T-Shirt, of which I have enough already.

Mind you, walking back to the hotel I could have done with a slogan T-Shirt. The sidewalks were pretty empty apart from the people sleeping on them. The slogan? "I'm not a criminal, I'm walking because I'm English".

Monday, September 19, 2005

OOW2K5: "Information Matters"

The warmup to Charles Philip's entrance was some lovely Flash animation with a modish soundtrack of (primarily British) pop rock. U2's "Beautiful Day" consolidated its position as the acme of corporate cool. First New Labour, now Oracle. Tranc techno remains the manadatory choice for soundtracking the videos.

The animation included some interesting phrases - "Information Matters", "Adaptable Process", "Information Driven". My personal favourite is "Execute With Insight"; h I can this see replacing "Terminate with extreme prejudice" amongst a certain sort of geek. Well, me at least. They also included a lovely quote from Ihop Corp endorsing the Data Hub: "we know how to sell more pancakes to our customers", which I think is a message we can all get behind.

Charles Philip's keynote was focused on Project Fusion and Oracle Fusion Architecture. It will be interesting to see whether this amounts to more than a marketing exercise in rebranding but it definitely sounds like Oracle is committed to building a complete technology stack that is both a fully integrated set of modules and a fully open framework in which any individual component can be substituted for another vendor's product. This will be an impressive one if they manage to pull it off.

I'm particularly intrigued to know how Oracle intends to implement all its apps as web services without the XML wrappers killing the performance of the suites. I know Microsoft's approach will be to use proprietary compilation of SOA calls to get the necessary performance. It can do so because it owns the OS and there are enough wholly Microsoft shops for this to be a viable strategy. Oracle can't do the same because they need to remain cross-platform, they don't own any OS and they have this tricky commitment to open standards to live up to. In the meantime, be the first on your block to describe yourself as "Hot-Pluggable!"

OOW2K5: Having an ACE time!

It's good to be back in San Francisco attending Oracle Open World 2005, as an ACE. Last time was in 2003 in the days when the ACE program was the OTN Community Award.

This time I'm staying in the Ramada Downtown, a motel so obscure that the cab driver had never heard of it. On the Ramada website it is described as "quaint". Finally I know what Americans mean by the word "quaint": it means just like in the movies. Americans call a sleepy English village quaint because it looks like something out of a Harry Potter film. My hotel is quaint because it looks like the set of an Elmore Leonard adaptation.

It doesn't have room service, just a leaflet for the local pizza delivery place. This is called Extreme Pizza, which is probably the only XP I think we can all agree on. Actually the Ramada is not at all bad. It's just it's so far out the lamp-posts have DB2 banners. Still on a clear day you can see the Marriott Intercontinental (where I got to stay in 2003).

I spent Sunday not being as jet-lagged as I was expecting. In the evening there was a dinner for the ACEs and the Oracle Magazine Editor's Choice Award winners. I got invited twice, as an ACE and a member of the magazine Editorial Board, but only had the one dinner. I did ask Kent Graziano if he was John Spencer, which was (I think) my only bloomer of the evening. Tom Kyte was on my table; at one point he used the word fricking, and he meant it. Tom and Ken Jacobs had a classic contest, matching error messages to the numbers. Tom on the role of the database in modern computing: applications come and go, only the data remains". I also learnt that Ken Jacobs is called Dr DBA after a presentation he did which was based on a television show; it turnes out to be Frasier and not Dr. Ruth (which was my guess).

I also met Mark Rittman, who is the ACE of the Year. He was remarkably coherent for a bad who spent the aftewrnoon in the pub. When I last met him it was in Birmingham, England; he had only just won the OTN Community Award and admired my OTN Expert fleece. I think he's been lobbying OTN to get to SF ever since.

Monday, September 12, 2005

BCS SPA Meeting

I read Kent Beck's Extreme Programming Explained in 2000, and it really fired me up. Project manager after project manager looked aghast as I raved, "The software is the design". Colleagues looked shifty when I mentione Pair Programming (I wear a beard, so I knew it wasn't my aftershave). Consequently I've never actually done any XP. However, I am Test Infected: I think Test First coding is the single most useful programming technique in my arsenal.

So it was mainly out of academic interest that I attended this month's BCS SPA session to hear Rachel Davies present an overview of the second edition of "eXtreme Programming Explained". There's been some re-arrangement of the furniture - the XP principles are now explained in a mind-map rather than that confused network diagram, some of the practices have been re-named - but there doesn't seem to be that much that's new.

The only new practice is something called the Informative Workspace, which is basically a visual plan of the project's progress, perhaps implemented as Stories on index cards pinned to the wall. Anybody who is interested can immediately see what the project has achieved and what is yet to be done simply by walking into the project room and looking at the wall. This is another example of the use of low tech in our high tech industry; like using the Hipster PDA instead of a Palm Pilot, the Informative Workspace works precisely because it isn't a computer-oriented approach. After all, whose first action on receiving the latest version of their project's plan in MS Project isn't to print it? Even though it comes out in an eye-wateringly small font (despite printing on A3).

There are some refinements. Simple Design and Refactoring have been amalagmated into a single practice, Incremental Design. Metaphor has been dropped, because hardly anybody used it. Some of the wackier names and concepts (Velocity, the Planning Game) have been renamed to make them more generally acceptable.

In fact, the main thrust seems to be towards making XP less, well, less extreme. The practices are graded into Core and Corollary sets. The practices are optional, in that we can now be doing XP even if we are not using all ten core practices. It's a bit like when SSADM version 4 came out: we can now tailor the method to the needs of our current project. Although I suspect we can't be XP if we're not doing Test First Coding, Pair Programming and Incremental Design.

There is a greater emphasis on continuous validation of the built software. We should always be ready to ship. So, not only are we supposed to test all the time but we are exhorted to do continuous integration all the time. Consequently the automated build and automated integration tests need to run in less than ten minutes. Daily builds have been replaced by Daily Deployments. That's right, into production with new code every day! To me this suggests that Kent Beck hasn't had much experience of dealing with FM-ed shops, where the change control process generally takes four-to-six weeks. In fact XP is still aimed at very small projects. Apparently there is a chapter on scaling XP to large projects but it basically consists of splitting one large project into many small projects, which doesn't seem like a satisfactory solution.

Down the pub afterwards someone remarked that lots of XP is simply obvious good practice and the rest is very dubious. Of course everybody thinks that about XP; if only we could get everybody to agree on which fifty percent of the practices are common sense and which are pants we'd be laughing. My colleague Paul O'Connell reckoned that XP is the product of an industry which has too many programmers and not enough engineers. So I held up my hands as an historian and we had an interesting discussion about the impact of feudalism on Japanese society.

By the way, given that XP is so keen on Pair Programming how come Kent Beck is the sole author of the book?

Tuesday, August 16, 2005

Book review: The Best Software Writing: Volume One, edited by Joel Spolsky

The first thing that grabbed me about Best Software Writing is the table of contents. Don't you just want to know "How Many Microsoft Employees Does It Take To Change A Lightbulb?" Or "What To Do When You're Screwed?" Or indeed "Starbucks Does Not Use Two-Phase Commit" Immediately it's obvious this is not a dry-as-dust tome on programming. Indeed, with the exception of Bruce Eckel's "Strong Typing vs Strong Testing" and Why The Lucky Stiff's canter through Ruby there's barely any programming at all.

What we get instead is writing about writing software, about the processes involved. For instance, Eric Lippert's punchline to the lightbulb joke is actually an amusing piece on change control. There are essays on coding. Ken Arnold argues cogently that it does not really matter which set of coding standards your project uses providing it uses something and everybody adheres to it. I agree. For a long time I have felt that the most useful tool Quest Software sells is not TOAD but PL/Formatter: it obviates all that useless time spent debating, codifying and enforcing layout standards. Apart from anything else coding standards tend to define that which can be defined - capitalisation, indentation, line breaks - when the most important things are: does the program implement the required functionality? Does it do so correctly, reliably and efficiently?

There are pieces about UI design and system design. Gregor Hohpe muses on the way Starbucks sells coffee as a metaphor for exploring messaging architecture. There are essays on project management, hiring developers, remunerating developers, outsourcing developers. There's even stuff about Sales! There are several TLA-splattered mediations on the future of the Web and the current state of the technology used to build it.

As someone who has wrestled with the issues thrown up by building a rich client interface out of JSPs I found some interesting insights in John Gruber's "The Location Field Is The New Command Line". Users want something that works, reliably, rather than something that looks pretty or comes with lots of gee-whizz features. Leon Bambrick makes the same point visually by imagining Google with MS Explorer's search interface. The corollary of this is the importance of methodologies like RAD (DSDM, XP, Agile, whatever). In order to demonstrate that our software works we must put working software in front of users on a regular basis. Otherwise we end up with requirements, specifications and acceptance tests predicated on aesthetics and the quantity of functions included.

The mix of technology is revealing. This is Spolsky's personal choice so the articles are skewed towards Microsoft's products and their technology base. There is C, C++ and VBA. There is a bit of Python and Ruby but almost no Java. There's lots of stuff about front-ends and middle tiers but nothing about databases. Certainly nothing about Oracle. Does this mean there's no good writing about databases or just that Spolsky doesn't read it? Actually, probably the former: most database writing is abstruse lectures about relational theory, uninformed witterings on normalisation or polemical rants about the inferiority of relational databases compared to object-oriented programming. Not many laughs there.

I have been calling these pieces as "essays" but they are an assemblage of various verbal constructs. There are proper essays, true. But there are also blog entries, transcriptions of conference speeches, even cartoon strips. What they have in common is that all are available on the internet. Even the Introduction is published on Joel On Software. What this means is we could click over to Google and by entering the table of contents into the location field assemble a copy of the book very cheaply (free if we print it at work, not that we would ever use our employer's paper for personal printing). So why buy the book?

Well, for a start it's got a nice colophon. And an index. Spolsky adds some insightful introductions and comments to each essay. The book is a nice size for reading on the tube or in the bath, neither of which is yet pratical with a laptop. But primarily, purchasing the book is a way of acknowledging the contribution the authors have made to the software writing community.

Surveillance

Yesterday I spotted outside New Scotland Yard a lone protestor with a home-made (A4) placard sporting the message:
Fulham Police won't investigate homophonic crime.

Well I think we can all agree that's a pretty serious accusation. But what exactly is a homophonic crime? Some examples...

  • A negligent road maintenance department that let the tarmac melt in the summer heat could be charged with Highway Rubbery;
  • People who insult the village priest ought to find themselves investigated for committing Offences Against the Parson;
  • There are a number of jazz-influenced buskers on the tube who ought to be locked up as Sax Criminals;
  • Several violent Scotsmen should be locked up under the Dangerous Dougs Act;
  • Could I get away with one about Jordan and the Dangerous Dugs Act? Probably not. Still, two homophones for the price of one!

As the author of this heinous piece I fully expect to be put away myself, for commiting pun crimes.

Anyway, it is strange that the Fulham constabularly don't investigate homophonic crimes, as they ought to be partcularly alert to homophones. After all, the supporters fanzine of the local football club is called "There's Only One F In Fulham".

Tuesday, August 09, 2005

Java "Not a Memory Hog" shock!

According to Xiaobin Lu on Java.net it is just the way the JRE maps the jar files in memory that makes Java look like it has a big footprint in (say) Task Manager. So they've rewritten the mapping in the latest build of Mustang. The really interesting thing is that the new mapping technique on Linux and Solaris works the way it always did on Windows and so saves 12-13% on real memory usage, as well as reducing the perceived usage. Java more efficient on Windows than on *nix - who'd have thunk it?

Friday, August 05, 2005

BCS MiniSPA: Refreshing and Invigorating

The BCS SPA group organised a one-day sampler of their SPA conference in London. Not being a member of the BCS I have never attended the actually conference (they are rather pricey). But this was free so it was not a hard sell to my bosses. Boy am I glad I went! It was a chance to immerse myself in ideas and issues that I just don't get the chance to ponder in normal working life.

Heuristics for improving Precision in UML Models
Presented by Richard Mitchell and Rob James


Mitchell presented (with James chipping in) a case study on the application of OCL to UML type diagrams. As I have only a shaky grasp of UML and know nothing about OCL I was surprised by how much of this talk I could follow. It was addressing a similar problems that are faced in Entity Relational modelling. If you have an optional One-To-Many relationship, what rule defines when there are no children? If you have an entity that has two different relationships to another entity is that one instances or two instances of the child? Always?
Your brain is not a formal engine.

The rules are annotations to the Type diagram, consisting of a comment, which is the rule in natural language, and a OCL specification. Mitchell starts by formulating the rule in English. He leaves it for a while before converting it to OCL. It is important to understand the rule informally before expressing it formally, because that's the way the brain works. Finally he uses the result of the OCL formalisation was used to polish the natural language version of the rule so that it can be understood by the business experts.

This process is an iterative one, drilling down through the ambiguities in the data model. Frequently the exercise reveals contradictions or omissions in the business rules, which require the modeller to ask deep questions of the business experts, questions which sometimes they cannot answer. The presenters described some interesting customer reactions in reesponse to the process. The first said, "Your rules are different to mine. Yours are easier to understand." Another accused Mitchell of lying in their first interview, on the grounds that the questions he was asking were so perceptive he must have had prior experience of the business domain before starting work. A third customer has been so atagonised by software modellers asking difficult questions about their business that they have abandoned visual modelling and have returned to giving developers written specifications (probably in Word).

Architectural Evaluation for Fun and Profit!
Presented by Eoin Woods


The only presentation I attended by some one I was familiar with. Eoin Woods discussed two methods proposed for the SEI for evaluating a software architecture1. Actually it seems to me that this is a process for validating a proposed model to ensure that it satisfies all the requirements rather than a technique to compare different architectural approaches. Although I suppose there's no reason why we couldn't apply these techniques to the process of choosing an architecture.
Bubbles don't crash

The first technique, SAAM, is a walk through of the architecture by the various architects. It is focused on the functional requirements only. Its chief merit is that it is easy to understand and learn. The second technique ATAM is an evolution of SAAM. It is more complicated, as it prescribes two phases. However, in its favour is that it evaluates the architecture against all requirements, functional and non-functional. Also the second phase involves all the stakeholders not just the architects.

Definitely one to be filed under I wish I'd known that last year.

Creativity, the Path to Innovative Requirements
Presented by Neil Maiden


One way of looking at this presentation was that it was an extended advert for workshops run by Suzanne and James Robertson and Neil Maiden, but that would be grossly unfair. This was an engaging and enlightening discussion of how creative thought can be fostered, even compelled. The goal is to produce a set of requirements for the system that the customer doesn't yet know he wants. In this regard, Maiden sees the requirements gathering process as being the start of the design phase as much as the end of the analysis phase. Controversial stuff.
Creativity is not unstructured thinking.

The working definition of creativity is thinking that is both novel and useful. People are very good at describing the constraints on a system. The key to creativity is to get them to think about how the system could work if those constraints no longer applied.

Lots of thought and preparation goes into these workshops. They need to generate an atmosphere of fun, freedom and safety, and yet must remain focussed on the goal. So the planning includes not just a deep understanding of the problem but choosing music, games and talks from experts in analogous fields to relax the particpants and spark ideas. The faciltators must keep the workshops running to a rigourous timescale. So it's quite hard work.

One common thought from developers on allowing their users' imaginations to run wild when it comes to requirements will be that the users will end up asking for the moon on a stick. Maiden and co have a radical suggestion that keeps the requirements within the bounds of the possible: the participants in the workshops represent all the stakeholders, including the developers.

Wrap up: The reflective practitioner


The meeting ended with an invitation to nominate the most surprising thing we had learned. After some consideration I chose an insight from Neil Maiden's presentation:
A requirement is a solution.

This is a striking thought but also quite obvious once you think about it. The user has a problem (my job is to ensure planes don't crash into each other) and their requirement is the solution to that problem (the system will allow me to see the exact location of planes in my airspace). What was genuinely surprising was that some people hissed when I stood up and said this. Presumably because software developers tend to equate "solution" with "implementation". But if the requirements are feasible, coherent and validated, and developers have been involved in the specification of them, what's wrong with that?



1. Software architecture is the termininology used by the SEI, because they are sponsored by the US DoD, who have different definitions of hardware! Software architecture includes hardware platform, operating system, etc. (back)

Thursday, August 04, 2005

What I learnt about Oracle today


SQL> SELECT id, some_date
2 FROM tst1
3 ORDER BY some_date
4 /
ID SOME_DATE
---------- ---------
8 03-JAN-05
10 10-FEB-05
1 18-FEB-05
2 24-FEB-05
6 26-FEB-05
9 01-MAY-05
7 20-MAY-05
4 29-MAY-05
3 18-JUN-05
5 09-JUL-05

10 rows selected.

SQL> SELECT id, to_char(some_date, 'DD-MON-YYYY HH24:MI:SS') AS some_date
2 FROM tst1
3 ORDER BY some_date
4 /
ID SOME_DATE
---------- --------------------
9 01-MAY-2005 09:58:09
8 03-JAN-2005 11:00:33
5 09-JUL-2005 21:01:44
10 10-FEB-2005 03:19:58
1 18-FEB-2005 00:46:04
3 18-JUN-2005 03:06:05
7 20-MAY-2005 08:20:05
2 24-FEB-2005 08:17:43
6 26-FEB-2005 07:12:51
4 29-MAY-2005 14:21:38

10 rows selected.

SQL> SELECT id, to_char(some_date, 'DD-MON-YYYY HH24:MI:SS') AS the_date
2 FROM tst1
3 ORDER BY some_date
4 /
ID THE_DATE
---------- --------------------
8 03-JAN-2005 11:00:33
10 10-FEB-2005 03:19:58
1 18-FEB-2005 00:46:04
2 24-FEB-2005 08:17:43
6 26-FEB-2005 07:12:51
9 01-MAY-2005 09:58:09
7 20-MAY-2005 08:20:05
4 29-MAY-2005 14:21:38
3 18-JUN-2005 03:06:05
5 09-JUL-2005 21:01:44

10 rows selected.

SQL>


Hmmm....

Oracle's SELECT statements support column aliases in the ORDER BY clause. Now when did that happen? Actually Oracle's been doing so for years, since at least 8i. It's one of those things I feel a fool for not knowing about, but at the same time I'm glad there's still things about even very basic Oracle that I have yet to learn.

A piece of seventeenth Taoist wisdom, cited in The DailyZen Journal:


If people want to do the finest thing in the world, nothing compares to learning. If they want to be the best of learners, nothing compares to learning the Way.

Wednesday, August 03, 2005

Meanwhile, back at the Strategy Boutique

I see the government's procurement body is now called OGCbuying.solutions (sic). Such a dense melding of typographical tricksiness and trendy jargon, it's virtually a black hole of faddishness. And it probably only cost the taxpayer a couple of million in consultancy and rebranding costs.

However, the home page shows that while the OGC call-off catalogue is called Catalist the bespoke procurement brand (sic, sic) is the rather boring Managed Services. That's not really trying. How about a competition to come up with something zappier, more Zeitgeist-y? My suggestion is OutSauce.

Monday, August 01, 2005

Instant surrealism

I googled an e-mail domain this morning to see where an OTN forum poster was (literally) coming from. When I found it was a Chinese web site I couldn't resist clicking on the Translate This Page option. It's obviously an entertainment site and a description of a movie (or several movies???) generated this cool surrealist poem:



Neat icy cold one summer with beautiful woman bright one both eyes
- < Comedian clown wonderful soldier > wears the mask ??
- " Love map " three metropolises foreign lands love
- " Fords grain language " the militarism reactionary gang history
- < Sentiment confuses forbidden fruit > the Russian desire metropolis
- " Thirstily strives for ?? " and likes to the ethyl alcohol relying on
- " The Paris person " the amphoteric war initiation disputes
- " Paris sweetheart, New York sofa " fate
- " Milk price " lover and cows
- " Red apricot leaves wall " the classical family ethics piece


Andre Breton, you should be living now!

Friday, July 29, 2005

In my Inbox this morning

We provide the ointments you require at really reasonably priced.

Hmmm. Seems like the spammers are moving into haemoroid treatments.

The easter egg was the random text added to defeat the spam filters. This comprised a snippet of Hans Christian Anderson and two nibbles from Jane Austen's "Persuasion". I'm particularly taken with the phrase "all histories are against you" which from now on I shall regularly drop into arguments.

Tuesday, July 26, 2005

Programming: is it an art?

Ming Chow writes in his O'Reilly blog that a computer program is no different than a novel. Hmmm. Obviously both books and programs comprise words 1 whose organisation is governed by syntax; both are written. But as activities writing a novel and writing a program are completely different.

For a start novelists are writing a story to please themselves. Programmers, on the other hand, are writing a set of instructions for a machine to meet their users' requirements. Novelists work on their own. Programmers usually work as part of a team. This means their work has to conform to common standards and have a consistent presentation. The only writers who have to work like that are a bunch of Parisian surrealist poets playing the Exquistite Corpse game.

I would particularly take issue with this statement:

Source code should be read like a novel, and great programs should be planned so like any great novel.

I don't think source code should read like a novel. Even back in the days when I was writing COBOL the code was modular. In the modern world of object-oriented programs, loose coupling, configuration files and code re-use any resemblence to linear narrative has gone right out the window.

Furthermore, few novelists do plan their novels in any great detail. Rather they start off with an initial idea, invent a character or two and see what happens next. It's not unusual to hear a novelist say in an interview that they were surprised by what one of their characters said or did. Most have only the vaguest idea of how the plot will resolve itself until they get to the end of the book. Which, on reflection, does sound a lot like eXtreme Programming. That doesn't do lots of planning up front either.

As someone who studied history at university rather than a scientific discipline I'm alert to the possibilities of regarding programming as an art. Although there are some similarities some similarities with novel writing I would regard film-making as a much more analogous activity. There's teamwork, the studio system, the need to meet a budget, open source as a Woody Allen/Russ Meyer independent movie maker, etc. Indeed, watching Lost In La Mancha, a documentary about Terry Gilliam's failed attempt to film Don Quixote was just like watching a film about a computer project crashing. But writing software is primarily an engineering activity. I find I get much more insight from pondering the metaphorical implications of structural engineering, classical architecture and town planning. These all feel like activities that have a greater bearing on programming than reading a biography of Charles Dickens.


1. Except for languages like BF of course. (back)

Friday, July 22, 2005

OTN Forums: here we go again!

Oracle have updated the forum software underlying the Technet forums. Which means at the moment they are are frequently unavailable and currently wholly unreliable. This is the third time I have been on the receiving end of an upgrade to Oracle's forum software and every time it's been shambolic.

It's easy to mock Oracle's incompetence here, and I will. As someone who uses the OTN forums quite frequently (I am, after all, an ACE) I am on the receiving end of crashes, lost posts and general frustration. So mockery is my recompense.

I know JDeveloper promises "one click deployment" to iAS10g servers but we are supposed to test our code before clicking that button. The fact that the web site is falling apart at the moment - dodging formatting, missing pages, hideous Java error stacks and grindingly slow performance - is inexcusable. Whatever else I may think about Java and J2EE it is a language blessed with a plethora of cool testing tools. Still, at least when we do eventuially get to post stuff we have graphical emoticons instead of boring text ones :)

There is a more serious point: the forums are a public demonstration of Oracle's abilities in the web environment, and this is where Oracle want to make a big splash. So they ought to regard the forums as an advertisement for their abilities in this sphere. After all, if Oracle can't make an iAS10g site highly available and resilient what chance is there for the rest of us?

They certainly ought to make sure the site is stable before publicizing "an improved user experience overall" on the OTN homepage.

Tuesday, July 19, 2005

JDeveloper: Like Aretha Sang...

My mate Duncan Mills recently complained of the lack of respect shown towards him by some Java heads on account of his choice of IDE. Now Duncan is a good bloke and I'm sure he would still maintain that JDeveloper is the best Java programming environment even if he didn't work for Oracle Corporation. But scepticism is understandable: JDeveloper was always going to be a hard sell to the Java community.

Firstly, JDeveloper is not open-source, it's proprietary. Java heads tend to make a fetish of platform-independence, and so suspect anything that threatens to lock them into a single supplier. Of course, Java itself is proprietary: the IPR belongs to Sun, they just give the JDK away to all and sundry. To paraphrase the Free_Software_Foundation, Java is free as in free beer not free speech. But at least IDEs like Eclipse, by being open, allow everybody to get involved.

Secondly, JDeveloper is belong to Oracle. Famously, Oracle make an RDBMS. Java heads, by and large, loathe RDBMS. They may tolerate open source quasi-databases like MySQL but they utterly detest commercial big iron databases like Oracle. Partly this is because relational database design is orthogonal to object-oriented modelling. But also the concept of platform independence means that the persistence layer of any system can supposedly be a database or a flat file, so why sweat the details. Either way there is a general reluctance amongst Java programmers (and other OO practioners) to tangle with RDBMS. In its extreme this leads to half-baked ideas like Prevalyer or hand-rolled persistence packages. More common is the tendency to use dont-worry-about-the-database tools like Hibernate. In such a climate few people are going to look favourably upon a tool developed by an RDBMS vendor for the purpose of making it easier to build Java front-ends to database systems.

Like it or not, people will regard JDeveloper as a Java version of Forms, that is a tool for building front-ends to Oracle databases. The fact that it is genuinely platform independent, standards compliant, etc. will not sway them. I know people who switched from using JDeveloper to using Eclipse, simply because they thought using the de facto industry standard would look better on their CVs. As they are now ex-colleagues of mine I guess they bet the right way.

Of course, Duncan is correct to say people ought to be more respectful of other people's opinions but it ain't going to happen anytime soon. Probably the two largest demographic groups on the net (and certainly amongst the l33t h4x0rz who care deeply about IDEs) are
  • potty-mouthed teenagers; and
  • social inadequates who get on better with machines than with people.
These people pro-actively scorn everybody else (to avoided being scorned first). Expecting respect from them is like expecting cabbies and bicycle couriers to obey the Highway Code. Given that the web is a tool that provides an instantaneous conduit for insults, with a virtual guarantee of no meaningful comeback, the real wonder is that there civilised discourse at all.

Wednesday, July 13, 2005

Anti-symbols in public signage

Whilst travelling on holiday recently I noticed that airports and aeroplanes have added a new icon alongside the signs for Gents' and Ladies' toilets. It's an upside-down feeding bottle, indicating the location of a breastfeeding room..

I think this is actually an anti-symbol. Why? Simply because if you've got your baby's milk in a bottle you don't need to hide away in a room when you're feeding her. Of course, the icon has to be euphemistic: a literal representation would offend exactly the same people who are offended by the sight of mothers nursing in public.

Thursday, June 09, 2005

Oracle: Logging in PL/SQL

Logging is one of those little utility functions that we shouldn't be without but generally we never get around to implementing. Logging is not just for errors - important though that is - but for dumping trace messages, diagnostic information and of course debugging. Such instrumentation is crucial to the discovery of when, where and why a program went wrong. Furthermore, properly instrumented code can be a useful tool for assessing the virtues of a prototype program and for catching buggy or poorly performing code before it gets released into production.

Yet most developers still seem to be using DBMS_OUTPUT.PUT_LINE() for these tasks. DBMS_OUTPUT.PUT_LINE() has one virtue - ease of implementation - but it has several drawbacks:

  • It requires an interactive session like SQL*Plus to view;
  • It produces no permanent output (without a spool command);
  • It may contaminate an application that needs to output information to the actual user;
  • We only get the output once the PL/SQL program has completed;
  • It doesn't work with inside a FUNCTION;
  • There's that pesky 1000000 character buffer limit.

So I think we can agree that DBMS_OUTPUT.PUT_LINE() is not suitable for anything other than the most cursory of debugging tasks. Yet, many people have nothing else in their toolkit.

What must be done?


What are the characteristics of a good logging solution?

Persistence


The log must be permanent. At the minimum this means logging to a file or a table, but it is nice to have the option of directing output to other destinations such as syslog.

Structure


The log must be more than a free text field. At the very least we need to be able to search on Who, What and When.

Message levels


We need to be able to distinguish different types of message. The obvious ones are ERROR, INFO and DEBUG, but it is useful to be able to define custom levels.

Filtering


We need to be able to enable the logging by message levels. Typically we would only want to run at DEBUG level in a development environment. In production we would normally log only ERROR and certain types of INFO messages. However, we must be able to change this behaviour easily, so if we want to run production with DEBUG on, we can. Nice to haves include the ability to direct output for different message levels to different destinations and the ability to log at different levels for different subsystems.

Robustness


It is crucial that the logging doesn't fail. If it does fail it must at least report it failure. Furthermore it mustn't raise an exception and cause the program it's logging to fail.

Acceptable impact


We want all this and a small performance hit. Inevitably logging will consume CPU cycles, but provided this is kept to a reasonable level the price is worth the asking, as the benefits of logging are plentiful.

Interface


The public face of the logging solution ought to conceal the workings of the program from the programs that use it. Of course, this is just standard good practice, but it's particularly crucial with something like logging as it is used throughout our application. We want to be able to tweak the logging code without having to rewrite every single application.

Enter stage left LOG4PLSQL


The project I am currently working on consists largely of a fully automated data warehouse: the user interaction is limited to the data mart on the front. The rest of it is long running batch jobs. Logging is crucial: indeed, there is no other feedback for the success, failure or progress of a job. Although I had some scraps of code for logging errors I lacked a full Monty logging implementation that I needed here. So I turned to LOG4PLSQL, an open source package. The LOG4PLSQL developer Guillaume Moulard was inspired by the open source java tool log4j, which is as close to an industry standard as you can get. So much so that even though Sun has introduced its own logging package in JDK1.4 I suspect most projects still use log4j.

Let's assess LOG4PLSQL under those headings...

Persistence: 8.5/10


LOG4PLSQL consists on a table with a PL/SQL package acting as an API. It also provides hooks to write out to the Alert Log or to throw a .trc file. Furthermore it has the ability to integrate with log4j, which adds further options (of which more later). The package uses DBMS_PIPE to connect to a log4j session running in the background. The key aspect of the PLOG API is the CTX PL/SQL record type, which stores metadata for the logging of the message.

Structure: 7.5/10


The TLOG table has columns for user, datetime and context as well as a message text. The datetime is an Oracle DATE column, but it also uses the V$TIMER view to get hundredths of a second. It would be neater if it used the TIMESTAMP data type but the package is meant to be runnable on Oracle 8 installations. I would also like to see TLOG store the SID.

Message levels: 7/10


The package defines five default message FATAL, ERROR, WARN, INFO and DEBUG, plus ALL and NONE as the outer bounds logging. These are actually constants, mapping to numeric values. Despite being "inspired by" log4j LOG4PLSQL has a different scale from that tool. It runs from 0=NONE to 70=ALL whereas log4j runs from 10000=ALL to 50000=NONE; this diverge has a key impact when it come to the integration with log4j later on.

Filtering: 7/10


LOG4PLSQL has two mechanisms for assessing message levels and deciding what to do with them. Firstly, a PLOG.CTX can be associated with each message: this allows us to individually specify the treatment of the message - write to alert log, store in table, send to DBMS_OUTPUT, etc. If no CTX record is specified the package uses a default record (and we can set the values for that default). Additionally LOG4PLSQL allows us to set a default logging level: messages of a message type lower than that level are discarded. The problem is that the logging level is hard-coded in a package specification. This is very efficient from a performance point of view but it makes it awkward to alter the level. Indeed, in a production environment most DBAs would be profoundly reluctant to edit a package spec at all, and certainly not without a change request.

We could also filter log messages by using log4j. However, because the LOG4PLSQL message levels do not map to the log4j levels we cannot use log4j filtering methods to direct different levels of messages to different appenders.

Robustness: 9/10


No complaints on this score with regards to normal running. The only problem has been with the installation scripts. The packages are annotated with PLDOC comments so that HTML documentation can be generated using the Javadoc tool. Unfortunately the annotations are not correct, which leads to error messages. So Moutard has provided two empty scripts param.sql and return.sql which suppress the error messages but throw errors of their own because some versions of SQL*Plus don't like empty files. The correct solution is to ensure that every line of a PLDOC comment starts with an asterisk.

When using log4j we have to be certain that the background instance is running. Otherwise the DBMS_PIPE gets clogged up and no further logging happens until the pipe is flushed.

Acceptable impact: 6.5/10


Writing records to a database is a fairly expensive process; logging TRACE and DEBUG messages to the TLOG table can have a severe impact on the performance of PL/SQL code. Also, the checking of the logging level is fairly cumbersome and is an overhead in its own right.

Interface: 7/10


The PLOG package exposes the workings of LOG4PLSQL to a degree unsuitable for production use. However, I think this is fair enough: the facade ought to be application specific.

Conclusion


So, to sum up, LOG4PLSQL offers a fine starting point as a logging package if you don't have one of your own. It has a solid set of functionality and does pretty much everything you would want. There are a couple of niggling things, but as it is open source, we are free to tweak the program to suit ourselves.

Having said all that I am now working on my own logging package (a man's got to have a hobby). LOG4PLSQL ultimately is engineered (and in some respects over-engineered) to suit Guillaume Moutarde's needs. My needs are somewhat different: particularly I need better performance out of logging to a table, I need to be able to change the logging level dynamically. I want certain types of log message written to V$SESSION_LONGOPS. I would like to be able to have different logging behaviours for discrete subsystems. I need a better fit with the industry standard tools: log4j and syslog.

Finally, having read Michael Feather's thoughts on stunted frameworks, what I want is a simple core logging package that is easy to extend for specific applications. My current application consists of a core of (amended) LOG4PLSQL with three packages over it; it's a horrible gnarly mess of application specific stuff (how subsystems are handled) and general stuff (writing out to syslog). Fortunately the public interface is quite clean, so (theoretically) it will be a cinch to swap in my new logging package - except I'll probably have left the project by the time I get it working properly....

Tuesday, June 07, 2005

Rebecca Horn: Bodylandscapes

Sunday afternoon at the Hayward Gallery to see its new exhibition Rebecca Horn - Bodylandscapes.

To be honest, we probably wouldn't have gone to this show except for a particular confluence of events: my mother offering to baby-sit, there being nothing worth seeing at the Clapham Picture House on Sunday and my wife having an annual membership to the Hayward Gallery. So off to the German avant-garde we went! The temptation to pursue the body metaphor and describe this exhibition of multimedia installations, performance pieces and drawings as "a bunch of arse" is childish and unfair but alas irresistible.

Actually some of the pieces are rather intriguing. The room of weird costumes - a unicorn headpiece, body-sized wing-like fan - are great. The blurb talks about the influence of surrealism, alchemy, esoterica but these seem like a Martian's attempts at fetishistic bondage gear. And why not?

Alas, it's mainly downhill from there. The installations are mainly mechanical pieces (not all of them working). There is a contrast between the solidity of the actual mechanics - gears, cranks, brakes, linkages, armatures - and the vacuous portentousness of the titles. Under no circumstances should you attempt to read the poetry on the walls. Maybe it is better in German.

One piece I quite like comprises a set of armatures hung with sheets of music. A crank lifts and raises the pages like wings. It's called Floating Souls (you see what I mean about the titles). Some of the music sheets are splashed with red or black ink and a raven's feather hangs from one of the armatures. Both of these (along with eggs, books and golden pointers) are what the Guide calls "recurring motifs", the technical term for shortage of ideas. It struck me as a rather teenage attitude: the repetitious drawing of symbols on your homework was supposed to imply hermeneutic wisdom, when all you were really doing was skulking in your bedroom. Also like teenagers, Horn often uses music (ethereal synthesised drones and overtone singing) to make her seem deep.

The worst offences are the drawings. Now that I have a four-year old I am more sceptical about the artistic merit of such scrawls and splashes. The major difference between the drawings of my son and Rebecca Horn is that hers are centred whereas Fred tends to start at the left-hand of the page and work rightwards. But I could take one of his drawings, give it a label like The Paradise Bird Pierces My Heart or The Burning Gardens Of Smyrna and you might think, 'Hey! I can almost see what the artist meant!" Art is whatever someone will buy.

Funnily enough, although I didn't like most of the work I find I have quite a lot to say about it. It certainly generated more conversation than popping over to the Joshua Reynolds exhibition at the Tate would have done. Makes you think, mmmm?

Robinson In Cyberspace

It's ironic that my attempt to purchase Robinson In Space on DVD (along with London) should turn into a commentary on modern consumerism. The BFI released this DVD on the same day that Optimum re-issued Last Year In Marienbad, and it so happened that I had a £5 off voucher from HMV that had to be used by end of May. Synchronicity! So off to Oxford Street I went. Hmmm, they had Last Year In Marienbad, and they had a space in the racks for London/Robinson In Space, but no actual copies of the DVD. Oh well, obviously not in stock yet.

I had a look on the HMV web site. Now it had Robinson In Space but not Last Year In Marienbad. Besides I couldn't use my voucher there anyway. I popped into the Oxford Street HMV again at the end of the week (look, I genuinely just happened to be passing), but it was still not in the racks. I noticed that HMV was flaunting an award from some music industry gong fest recognising it as Music and DVD Retailer of the Year, despite its apparent inability to offer two DVDs in the same retail space at the same time.

At the weekend I noticed in the Guardian's Guide booklet an advert for Robinson In Space issued by the BFI but with sign saying Available at HMV. So, off to HMV again on Tuesday, the last day of May, last chance to use my voucher, to discover that that's "available at HMV" as in "not available at HMV". Now I could have spent some time railing at the staff about futility of it all - I mean, what's the point in advertising something if you're not actually going to stock it?

But instead, I just did what I should have done first off. I went shopping in cyberspace. Amazon had both DVDs at a fiver off apiece, and my order qualified for free shipping. So it cost me less money than buying it from HMV would have done. Sure I've got to wait for it to be delivered, but HMV has already made me wait nine days with no guarantee of it being in their store even a week later.

So what does this say about the state of modern commerce? Well, obviously, Amazon is going to win. You cannot beat better price and more or less an infinite number of items in stock. I do feel sad about the decline of the small independent book and record shops, but Waterstones, Borders, Virgin, HMV etc. are going to kill off those anyway. So if Amazon can really stick it to them that’s about as good a result as we're going to get. Of course, Amazon may get bloated and complacent like HMV but the web makes things different. They start to take their customers for granted in the full knowledge that another book supplier is only a click away.