Monday, November 12, 2007

OOW2K7: First sessions

I'm afraid I skipped the opening keynote of the conference in favour of breakfast with Doug Burns and Dmitri Geilis. It was almost certainly more entertaining and more educational.

My first session of OpenWorld was Dr Paul Dorsey on the "Thick" database. That's thick as in full of business logic rather than stupid. Quite why it's not "rich" database like thin client vs rich client I don't know. Paul said his motivation was to annoy people, which was promising. Unfortunately the sort of people he wanted to annoy - OO programmers, J2EE and .NET middle tier evangelists and open source bigots - weren't in the audience. This is an Oracle conference, so pretty much everybody is going to be signed up at least to the idea of proprietary framework , and most of them will be in favour of putting most if not all the business logic in PL/SQL. Although, as he acidly observed, OTN has drunk the SOA Kool-Aid.

The point being that UI standards change far more often than the database does. So it is acually more important to be UI independent than database independent. He also said that ApEx is not - out of the box - a thick database implementation. It is a product and it is possible to build ApEx applications in a dumb fashion. However, the cost of being dumb in ApEx is less than being dumb in Java.

The second half of the presentation was devoted to an overview of techniques for building thick database APIs. This covered table() functions, Views with Instead-Of Triggers, PL/SQL collections and bulk operations. I'm afraid I found this a bit of a waste of time because surely this is all old hat? But apparently not. At least one person in the audience didn't know about bulk exception handling and so is obviously not using FORALL statements.

Funnily enough, the next session also dealt with building PL/SQL wrappers for SQL, but coming from a different angle. This was Steven Feuerstein, who was seeking to cure our addiction to writing SQL with his "code therapy". His basic arguement is that we should not proliferate SQL statements throughout our programs. Rather we should encapsulate SQL in reusable functions which have proper exception handling and well-structured naming conventions. We should think of SQL in PL/SQL functions as a service which is provided to the actual application code.

We should generate these functions because that's the only way to ensure that proper standards are enforced. Especially in naming conventions, which must be adhered to if the functions are to be reused. I would say that this presentation was an advertisement for the Quest CodeGen utility, except that they're giving it away for free. Steven had one phrase I really liked: deja vu coding. This is when we find ourselves coding the same thing we coded last week. That's a definite sign we have a piece of functionality we really ought to extract to an API for reuse. Of course, the OO crowd, especially the XP lot, have been banging this particular drum for years.

Following on from Steven was Bryn Llewellyn with his session on PL/SQL New Features in 11g. He kicked off with the fine grained dependency tracking: I'm not sure I would have started there, as it's not exactly the most exciting new feature. But I liked his explanation of why Oracle had the validation checking in the first place: it's in lieu of a make file. Real Native Compilation is much more interesting. Until 10g Oracle had "outsourced" the compilation to a C compiler on the OS, because it was easier for Oracle. Unfortunately many sites wouldn't install a C compiler on their production box, so they couldn't take advantage of the performance benefits. I currently work on such a system: the security policy forbids it. Yes this does mean our external C procs are probably sub-optimally compiled but you can't argue with the security policy. So this feature will be very useful to us.

There's also Intra-Unit inlining, which basically counteracts the performance of Feuerstein-approved modularity by duplicating the code from called functions at the compile stage. Result set caching has already been widely talked about. As Bryn says, "You can never have too many caches." His test cases went from ~1000 milliseconds to 0 milliseconds. But apparently not every query will improve by a factor of infinity. The results are guaranteed to be correct in every case but this means that the benefits of caching results may not always be high. Obviously there's a cost to invalidating the cache. What else? DBMS_SQL is here to stay, but only for Method 4 queries. That is when we don't know either the number of defines (selected columns) or the number of binds. For everything else we can now use EXECUTE IMMEDIATE. In case you're wondering, there is no Method 1, 2 or 3.

They are closing the internet village now, so it's time to sign off.

OOW2K7: What's the story?

The opening salvo in the OpenWorld 2007 campaign was the Sunday Night keynote. When I arrived at Moscone Center at 5:30 the queue for stretched around the block. Literally round the block. I'm sure I wasn't the only person asking whether we were all mad. At least it wasn't raining and at least we all got in. Actually it turned out to be a good thing to be one of the last people into Hall D, because it meant I had to sit through considerably less Billy Joel than the early birds must have had to endure.

Most of the event was devoted to Larry's account of the history of Oracle's thirty years. I'm sure he's told these stories a thousand times already but many of them were new to me. The best story was John Kemp, the first Chief Finance Officer, who used to deliver pizza to the Oracle offices but who was studying Accountancy at Berkley. Also the famous first sale to the CIA was for a product, Oracle version 2.0 (there was no version 1.0) which hadn't been written yet. How times have changed. Unfortunately the speech became less focused and eventually turned into a recitation of people who joined the company over the years.

The rest of the session consisted of some slightly desperate sketches from the cast of Saturday Night Live. There was also a worthy presentation on Oracle's global responsibility programme. There are a number of initiatives in the education arena (mainly encouraging schools and students to use Oracle software). Also, Oracle employees do lots of volunteering. The event was finished off by a pub rock band composed of Oracle employees and customers, fronted by the Senior Vice President for Alliances, playing a song about Oracle rocking for ever. The band was called Eardriver but I'm afraid Hallclearer would have been more appropriate.

Of course I had to leave anyway because of the ACEs' dinner. The Fly Trap is a nice place. I got to drink Pinot Noir from Francis Ford Coppola's vineyard and the food was good. The one problem with these occasions is that the restaurant layout prevents you circulating too much, so you end up talking to a handful of people. Eddie Awad asked my advice about user groups; I'm not sure I completely answered his question but it has stimulated some thoughts which I may blog later. Doug Burns was extremely jet-lagged; you may think that's a euphemism, I couldn't possibly comment. We all got issued with our new Oracle ACE fleeces, which are actually gilets with a large Ace of Spades symbol on the back. I don't know whether the ACE directors' fleeces have the tiara as well. Inevitably Mogens Norgaard wore his for the entire evening. Steven Feuerstein threatened me with a steak knife. These liberal peaceniks are all the same.

So, what is the story?


Is there a big theme? Beats me. One of the Oracle people I spoke to last night said they all don't know what's going on. If there is a big announcement it will be just as much of a surprise to the employees as to the rest of us. One of the ACE Directors who had spent the day in the Directors' briefing sessions said they had been told that there would be no mention of features currently under development. Apparently all that stuff is being saved up for next year's OpenWorld when Oracle are going to make a big deal out of 11gR2.

In the afternoon I was wondering through the Yerba Buena Gardens. A young chap on a bench clocked my OpenWorld pass. Jerking his head at the big tent which is blocking off Howard Street he asked me, "Do you know what the party's about?" "Oracle," I said. "Database software." He turned to his friends and told them, "Computer shit."

Sunday, November 11, 2007

Joseph Cornell: Celestial Navigator

The Navigating the Imagination, the exhibition of Joseph Cornell's work at the SF Museum of Modern Art is a fantastic experience. Cornell had an omnivorous interest in almost everything - Victoriana, French literature, fairy tales and mythology, the sea, ships, astronomy and the constellations, maps and navigation, nature (especially parrots), ballerinas and film stars, childhood, games of chance, clockwork, mathematics, physics, geometry, architecture - pretty much everything except the internal combustion engine. But he combined this breadth of fancy with a monomaniacal artistic expression: collage and three-dimensional assemblages.

Unlike other artists who experimented with collage as one technique among many Cornell never painted, drew or sculpted. Assembling snippets of pictures, text and objets trouves was all he ever did. This lends the exhibition a repetitive quality which might not be to everybody's taste: if you don't like the works in the first room you might as well skip straight to the exit.

The collages are well-executed: witty, sad, poetical even whimsical. Some of his work bears a resemblance to the collages of other artists (especially Max Ernst, because of his extensive use of Victorian engravings ). The difference is that Cornell was not interested in sensationalising or shocking the viewer. He preferred to create imaginary worlds by drawing connections between apparently unrelated things. There is no political or social commentary in any of the works. They are more like a child's dreams (except for some mildly saucy female nudes in a few of his later pictures).

The boxes are a real revelation. Pictorial representations inevitably flatten them; on the printed page they might just as well be collages too. You have to see them in real life to appreciate Cornell's skill in building up layers and using perspective. Some of the boxes have removable parts or working mechanisms (obviously we're not allowed to actually handle any of them). Some of the works are terribly sad in an undefinable way. One box consists of a grid of shelves, each one holding an identical clear glass bottle containing a small blue marble; it's called An Image For Two Emil(y)ies. Other boxes are genuine amusing. Pantry Ballet (for Jacques Offenbach) features a chorus line of bright red lobsters in gauze tutus.

The texts in the works are surrealistic but coherent. One work, Museum consists of a box of small glass bottles filled with an assortment of things. On the lid of the box is a list of its contents:
Watchmaker's sweepings - Juggling act - Souvenir of Monte Carlo - Chimney sweeper's relic - Thousand & One Nights - Mayan Feathers - White landscape - From the golden temple of Dobayba (conquistador) - Sailors' game - Venetian map - Mouse material

A woman next to me commented to her companion that Cornell must have had a lot of fun building these boxes. I don't think that's the case at all. The finished products are playful, because they often refer to games and toys and his themes are the enthusiasms of a child. But they are beautiful because Cornell had an adult's eye for composition. They are resonant because they are filled with an adult's longing for the certainties and comforts of childhood. And the compulsion to produce these boxes, the obsessive collecting and organising of materials to put in them, that's plain scary and sad.

The exhibition as a whole is melancholic. It's the same feeling we get from looking at ancient ruins. The older works with faded colours and acquired patina are more sympathetic than the more recent stuff. Cornell resisted the relevance of biography in the assessment of an artist's work. Perhaps he feared what his work might say about his own life.

OOW2K7: It's raining today

Well actually it was raining yesterday, but Scott Walker didn't sing a song called that. In fact it's quite sunny right now but according to last night's weather forecast there are likely to be showers in the north Bay area throughout the week. The news anchors kept saying they needed the rain, like that's supposed to be a consolation. Still, at least this year we get to use the complimentary umbrella included in the conference bag.

I went out for a few beers with John Spencer last night. The bars were all pretty crowded. Turned out the two local college teams were playing that sport the Americans wrongheadedly call football. Guys, it's rugby league in fancy dress. Anyway, the Sam Adams followed by a visit to Lori's Diner kept me awake until the magic hour of 10'O clock. Unfortunately I woke up at 4:30AM this morning. Which is why I'm blogging this in an internet cafe at such a gosh-darned early hour.

I bumped into Wilfred van der Djeil in the lobby of the King George. He was still trying to get his demos working for his presentation tomorrow. I'll keep my fingers crossed.

Friday, November 09, 2007

My OOW2K7 schedule

The OpenWorld conference starts slowly this year. There is no Oracle Xtreme event to warm up the proceedings . Sunday does feature user group sessions, but I'm not a member of any of the groups so I'm not particularly interested. I think I shall most of Sunday acclimatising, perhaps with a trip to the SF Museum of Modern Art. They've got a major exhibition of Joseph Cornell's work on at the moment. I've only ever seen pictures of his work so I'm ridiculously excited about the prospect of seeing over 200 of his boxes. Also I need to do some shopping: does anybody know a place in SF where I can buy a Beckham LA Galaxy shirt for a six year old boy?

Here is my schedule. It starts strongly. The opening three sessions are from speakers whom I've heard and enjoyed before. The schedule peters out towards the end of the week but then on past experience so do I; it's better not to have too firm a plan.


Sunday, 11 November 2007



5:45 PM - "Keynote: Sunday Night Live" : Moscone North - Hall D

I think I will try to make the opening keynote, as it might be the best chance to share oxygen with Larry. In previous years this event has tended to clash with the ACEs' dinner but this year the OTN team have rescheduled it.

7:30 PM - "ACEs' Dinner" : The Fly Trap Restaurant, 606 Folsom Street @ 2nd

Monday, 12 November 2007


11:00 AM - "'Thick Database' Techniques for Oracle Fusion Developers" : Hilton - Yosemite Room B

Dr Paul Dorsey combines a very deep understanding of database design and development with some strong opinions and a nice line in wit. A promising mixture.

12:30 PM - "Break Your Addiction to SQL!" : Hilton - Grand Ballroom A

Steven Feuerstein (Whom God Preserve) is another great presenter.

1.45 PM - "Oracle Database 11g PL/SQL" : Hilton - Grand Ballroom A

Last year I missed Bryn Llewellyn's talk on enhancements to PL/SQL in 11g. I'm not going to make the same mistake again.

3:15 PM - "Back-of-the-Envelope Database Storage Design" : Moscone South - 310

I don't know nearly enough about storage and the back of an envelope is my avourite design tool so this is an irresistible title.

4:45 PM - "Oracle Database 11g: Next-Generation Performance and Scalability" : Moscone South - 104

My current project (a data warehouse) is still on 9i (I know, I know, it's not my choice). Scalability is an issue, so I want to know if it's worth skipping 10g and going straight to 11. Insert your own Spinal Tap joke here.

7:30 PM - OTN Night : The Westin St. Francis, 335 Powell Street

Loud music, beer, Linux: something for everybody!

Tuesday, 13 November 2007


9:15 AM - Keynote Tom Kyte : Grand Ballroom B - Hilton

"Everyone’s favorite Q&A chief and Oracle expert" will be talking on How Do You Know What You Know.

10:45 AM - "Oracle Database 11g Business Intelligence and Data Warehousing" : Moscone South - 102

Gotta find out more about 11g.

12:000 PM - "Oracle Magazine lunch" : Lulu, 816 Folsom St

I hope to tear myself away in time to make the next session, but it rather depends how good the wine is.

1:45 PM - "Binary XML and XML Index: Scalable, Performant XML Processing for Schemaless XML" : Hilton - Continental Parlor 7 & 8

XML in databases is Teh Suck. On the other hand the pesky X-stuff isn't going away any time soon, so it will be useful to discover any better methods of handling it.

3:15 PM - "The Future Challenges of OLTP and Data Warehouse DBMSs" : Moscone South - 104

A theme is emerging.

4:45 PM - "Best Practices for Oracle Database Auditing" : Moscone West - 3005 - L3

With a bit of luck this presentation will provide a definitive answer for this chestnut of the OTN forums.

7:30 PM - The Oracle Bloggers' meeting : the Thirsty Bear Brewing Co, 661 Howard St

Once more the redoubtable Mark Rittman has organised this meeting. Nice one, Mark.

Wednesday, 14 November 2007


I'm intending to have a go at running an Unconference session today. So I have left lots of space in case a sore head prevents me being first to the whiteboard.

8:30 AM - Keynote, Jonathan Schwartz, Sun Microsystems Inc. : Moscone North - Hall D

I just hope I can get through this without mentioning My Little Pony. Oops.

9:45 AM - "Current Trends in Database Performance" : Moscone South - 102

Um...Bigger, better, faster, by any chance???

12:45 AM - Keynotes, Michael Dell and Larry Ellison. : Moscone North - Hall D

Is it a good strategy to sit through Michael Dell's keynote in order to get a seat in the auditorium for Larry? Or does a wise man just decide to find a TV screen to watch and skip the need to carry an empty bottle?

4:30 PM - "Data Caching Application Deployment Use Cases for Oracle TimesTen In-Memory Database" : Moscone South - 309

People keep suggesting TimesTen as a possible solution to various problems but I really know almost nothing about it. So this is an opportunity to rectify this lamentable situation.

Thursday, 15 November 2007


11:30 AM - "Oracle Database 11g: Can I Do That? Introducing 11g SQL and PL/SQL Enhancements" : Marriott - Salon 9

A last chance to find out more about 11g.

I'm staying in the King George Hotel. I know a few of the other ACEs and sundry bloggers are there too.

And here are my Connect details again. I'm not intending to take a laptop. As I'm not presenting I don't need one and I don't need the hassle of travelling with one. But I shall take advantage of the internet villages to keep in touch.
Join Me at Oracle OpenWorld Connect!

Wednesday, November 07, 2007

Here comes OOW2K7

Gosh, it's almost time for Open World 2007. Work has been somewhat random and stress-y over the last couple of weeks so I've not really been focused on the upcoming conference. This will be my fourth tour of OOW duty in five years. I have yet to get a handle on this one at all.

Last year the theme of the conference was just sheer size. Oracle had ramped up the scale of the conference to cope with all the acquisitions. The number of attendees went from 29,000 to 41,000. This year's projected attendance of 45,000 is a smaller increase (although it will still be mad).

In 2005 the theme was Fusion. There's recently been some upheaval in the Fusion programme, with slippage in both the scope and the delivery schedule, so it'll be interesting to see what the message will be. They'll have to say something. Let's hope senior executives are hot-pluggable too.

In 2003 the hype was all about 10g: The Grid Has Landed. Even though the actual software was still several months from delivery. Obviously there will be a lot of noise around 11g at this conference. The difference is the database has been available, at least in Linux flavours, for several months now. A large chunk of the audience will be in a position to rebut any wild assertions. So whilst there will undoubtedly be a lot of noise about the new software there will have to be less hyperbole. At least I hope so.

Jason Jones published some useful tips for OOW newbies. I think the key thing is to make the best use of the opportunities for personal contact. A lot of the conference resources will be available as downloads, podcasts, blog articles and whitepapers. So don't get hung up on attending presentations (although make sure you do go to some, just in case your boss asks). Instead, take advantage of the main thing which online can't offer: talking face to face with actual people. I think the evening events tend to be rather too crowded and noisy for networking. So look to some of the extra-mural daytime sessions, particularly the OTN Unconference and the No-Slide Zone which should provide useful arenas to engage with like-minded delegates.

Friday, November 02, 2007

My PL/SQL Coding Standards

As I mentioned recently a long-running trolling thread in the OTN forum has recently taken a new twist, by reviving the PL/SQL Coding Standards meme. Alas I was wrong in my prediction that the OTN moderators would soon kill the thread. Not only is it still going but the evil genius behind it is still going, and regularly changing their handle. Currently it is my turn to be impersonated.

In order to justify my assertion in that thread I have decided to publish my damn fine standards. So here they are.


APC's Damn Fine PL/SQL Coding Standards



  1. Your code must implement the requirements correctly and completely.
  2. Your code must have a suite of unit and integration tests (preferably automated) to prove it implements the requirements correctly and completely.
  3. Your code must implement the requirements as efficiently and peformantly as possible.



Is that it?


These standards have much to recommend them. They are easy to read. They won't need revision whenever there's a new version of PL/SQL. And they focus on what is really important in code: correct functionality. Of course things such as layout and naming of variables are important, I'm not saying they're not. But a PL/SQL procedure can be neatly laid out, rigourously capitalised and thoroughly commented and yet be full of bugs. In my experience, most coding standards tend to document in tedious detail the things which are easy to standardise - use of upper and lower case, line indentation, etc - rather than the things which actually matter.

Also the strictures of codings standards are rarely revised. I still get handed coding standards which say things like "Always use explicit cursors". So either these standards were written ten years ago or the author has not coded any PL/SQL in the last ten years or the author should be shot. Whichever it is, if the standards document contains such canards, why should anybody pay it the slightest attention?

I intend to expand upon some of these points in future posts. If you want a more regular set of PL/SQL Coding Standards then you should check out the redoubtable William Robertson's site. Alternatively, invest in a copy of Oracle PL/SQL Best Practices by Steven Feuerstein (Whom God Preserve). I don't agree with everything that Steven writes but I firmly believe that if every PL/SQL coder in the world followed these guidelines the overall quality of the global PL/SQL codebase would increase by several orders of magnitude.

Update


The troll has now reverted to an anonymous userNNNNNN handle and restored the original text. Obviously even they have got tired of the joke. Or been stricken by conscience.

Friday, October 19, 2007

Oracle Open World Unconference sessions

Prompted by Laurent Schneider's posting I have also proposed a session on PL/SQL design. Some of the other proposals seem to be presentations by another name, which to my mind is not in the unconference spirit. It's supposed to be an alternative to regular presentations rather than safety-net for people who who didn't make it through the Call For Papers.

My proposal is definitely for a group discussion on PL/SQL design: approach, tools, methods, best practice. I've described myself as a facilitator rather than a presenter. I might try to make it an actual fishbowl session, if the room will permit such a layout.

The thing which puzzles me is how this Wiki stuff is going to link up with the whiteboard on the 3rd floor of Moscone West. Are our proposals actually booking sessions in the Unconference or are we just flaoting ideas? If all the slots get booked up on the wiki, will there be any scope for spontaneity at the Unconference itself?

Wednesday, October 17, 2007

Report on UKOUG DE SIG 11-OCT-2007

The Oracle City office played host to the last Development Engineering SIG of the year. This meeting focused largely on the Tools aspect of the SIG's remit. I would like to thank all of the presenters for contributing to what I found an interesting and useful day.

Jeremy Duggan of Joraph started the day with an overview of Application Express. This was his first gig as a speaker, although he has been running (or co-running) the Designer SIG for a number of years(1). For a first attempt it was very good. Jeremy has a nice conversational style and a good command of his brief. He also had the right amount of content to fill the time slot without rushing the end. I liked the way Jeremy put Application Express into the context of his own IT career: that helped us to understand why he appreciated the tool. Personally I wanted to hear more about the case studies, but these things are not always easy, especially if the client has made you sign an NDA. Jeremy got confused about his role only once, when at the end of his talked he almost led off his own round of applause.

Simon Day from Borland had the next slot. Simon is another old hand from the Designer SIG. He has a great presenting style. His talk was billed as Requirements Driven Approach to Testing Oracle J2EE applications. The JDev element turned out to be in the demo, which didn't work. This gave me an opportunity for a cheap shot about not testing the demo, which I duly took. Sorry, Simon. He presented a summary of findings from the usual business analysts (Butler, Gartner et alia), which show that the top three reasons for IT projects failing are:
  1. Inaccurate requirements;
  2. Incomplete requirements;
  3. Changing requirements.

Well, durrr. We all know that. We just pretend these things aren't going to happen this time. It is this apparent inability to properly deal with the errant requirements which causes the problems: forty percent of all project work is re-work. Fortunately there is an answer and it is ... a suite of software produced by Borland. I bet you didn't see that coming. To be fair, managing requirements and the code which satisfies them and the automated tests to validate that code is a complex task, one which obviously demands a tool. I was just hoping for a solution which didn't necessitate a procurement process. I sure elongated and overly-complicated procurement processes is number four on that list.

Next up was Tim Hall, reprazentin' Oracle-Base, talking about Oracle and PHP. Previously I had tried to get a presentation on this topic from two different sources. Both had mucked me about. Then I noticed that Tim's web site was written in PHP, so I asked him if he would do a talk about it. He was reluctant at first, because he doesn't consider himself a PHP expert. But the whole point about PHP is that it allows numpties to build web sites. Er, not that I'm saying Tim is a numpty. So he took the bait. His presentational style is like that of the Cillit Bang adverts: here is a sample of code, this is what it does. Clear, concise and focused. It was just a shame that Tim's demo didn't work either. Still, at least Tim had the consolation of Nietzsche to fall back on.

After lunch we had a second presentation on Application Express. Oracle Consulting's Gus Charnell talked us through some of the New Features in ApEx3.0. This was a marvelous complement to Jeremy's talk, because we could see just how easy it can be to build and change pages with the tool. One of the questions which came up at Mike Hichwa's sessions at the UKOUG conference last year was with regard to ApEx reporting. ApEx is free but Oracle were proposing to implement reporting use the decidedly not-free XML Publisher: how did Oracle propose to resolve this licensing conundrum. Gus's talk gave us the answer. ApEx can produce simple (i.e. single query) reports using Apache FOP style sheets, but if we want anything complicated we'll have to spring for BI Publisher licences. Still, with the increasing functionality of SQL we can pack a lot of sophistication into a single query. Gus finally broke the hex on failing demos. However, it did take a bit of voodoo (changing a variable value, committing and then changing it back) to generate the PDF.

The final presentation of the day was Harvey Raja, also of Oracle Consulting. Harvey attempted to compress about a day's worth of content on JDeveloper 11g into forty-five minutes. He made a good stab at it. Java these days is a bewildering torrent of TLAs, standards and bizarrely named libraries (ICE Faces, JGoodies). On the other hand, the applications we can build are slick and flexible almost beyond belief. The cynic in me wanted to know the spec of Harvey's machine: JDeveloper never runs that fast on my PC and I don't even have the ADF version installed.

I must start thinking about the next SIG soon. It's earlier in the year than usual (last week of February) so I really need to get most of the sessions confirmed before Christmas. If anybody would like to present please contact me or Julius. We promise not to kill you, so it can only make you stronger.

It's That Thread Again

There's a thread which has been running in PL/SQL for several months. It started off as a spoof on the URGENT PLZ HELP type threads we get from time to time. I blogged about it in June. After a long hiatus the OP has changed their handle to John Titor, Time Traveller and posted some more nonsense. I don't mind that. Some of the responses were quite entertaining, and the thing was mostly harmless.

The problem is, they are now masquerading as venerable lead-pipe swinger Billy Verreynne. They did this by the simple mechanism of replacing lower case Ls with capital is in their handle(curse those sans serif fonts!). Furthermore they have changed the subject matter and text of the original post to make it look as though Billy is offering Oracle's own internal PL/SQL coding standards. This is an homage to a notorious thread from the forum's history. This leads credence to the suggestion that the post is a mischievous forum regular with a sound knowledge of the other denizens. Unfortunately some of the less knowledgeable visitors are falling for this scam and are posting their e-mail addresses.

This is a thread which now, alas, has to die. Anybody got any zombie poison?

Post Scriptum


I haven't bothered putting a link in to this thread because I expect it to be pulled soon enough.

Wednesday, October 10, 2007

xkcd on SQL injection

Top geek humour comic xkcd has just published a strip about SQL injection. Check it out.

Update


Other people enjoyed this strip too. John Emmons for instance. And Tom Kyte, of course. And Boing Boing, ditto. And Pete Finnegan. In fact I was probably the last person on the whole internet to post about it. Sigh.

Thursday, October 04, 2007

At last, the Oct-2007 DE SIG!

Next week the third UKOUG Development Engineering SIG of the year happens at the Oracle London office. I should have blogged about it sooner but we experienced a slight agenda malfunction hem hem. Fortunately our friends in Oracle Consulting have come through to plug the gaps and spare my blushes. It's ended up being themed around some of the newer tools in the Oracle development space. We have two presentations on Application Express, two on JDeveloper and one on PHP.

I have been trying for ages to get somebody to talk about PHP and Oracle without success. So I am grateful to Tim Hall for accepting the challenge. I'm hoping that he'll turn up in his full ACE Director fig: tiara, ermine robe and chain of office. Also speaking is Jeremy Duggan, better known as the Chair of the Modelling & Design SIG. I think this is Jeremy's first time on the other side of the fence , so I'll keep my fingers crossed for him during his presentation. The session which most intrigues me is Simon Day, talking about requirements and testing with JDeveloper. Mapping user requirements to delivered code is one of IT's black holes, so I am keen to known what JDev offers us in this regard.

One of the talks I tried to get but which didn't materialise was an introduction to the Microsoft development environment. It occurred to me whilst listening to Xen Lategan's presentation at BVP in June that I knew very little about the Microsoft architecture. I could guess the function most of the boxes in the architectural diagram because the Oracle/J2EE stacks have similarly-shaped boxes in similar places. As the October agenda seemed to be moving towards a tools theme I thought it would be an ideal opportunity for Microsoft to evangelise their toolset to a fresh audience.

Unfortunately the only presentation they could offer me was a talk on Visual Studio 2008 New Features, which apparently would enthuse the audience to upgrade immediately from VS2005. As I doubt that any of the expected audience uses VS of any flavour I had to regretfully turn this down. Still it is good news for those people who regard Microsoft as an all-devouring beast. The Borg has assimilated all the customers it wants right now, at least on the development tools front. Presumably the unassimilated remnants are too hardcore (or too few!) to be worthwhile. So we're safe ... for the time being.

Wednesday, October 03, 2007

More on DISABLE VALIDATE

Yesterday I blogged about a "bug" with relational integrity. Due to lack of time I didn't really have time to explain why this behaviour occurs.

When we disable the constraint with the proper syntax the constraint is marked as NOT VALIDATED:

SQL> ALTER TABLE temp_child DISABLE CONSTRAINT what_the_fk;

Table altered.

SQL> SELECT status, validated FROM user_constraints u
2 WHERE table_name= 'TEMP_CHILD'
3 AND u.constraint_type ='R';
STATUS VALIDATED
-------- -------------
DISABLED NOT VALIDATED

SQL>

Whereas, when we disable it the wrong way this doesn't happen:

SQL> ALTER TABLE temp_child DISABLE VALIDATE CONSTRAINT what_the_fk;

Table altered.

SQL> SELECT status, validated FROM user_constraints u
2 WHERE table_name= 'TEMP_CHILD'
3 AND u.constraint_type ='R';
STATUS VALIDATED
-------- -------------
DISABLED VALIDATED

SQL>

The bug occurs because the database trusts the value of VALIDATED rather than actually validating the constraint. So I thought I should see whether it applies to other kinds of constraints. This is what happens with a check constraint:

SQL> create table nn (col1 number)
2 /

Table created.

SQL> alter table nn add constraint nn_ck check (col1 is not null)
2 /

Table altered.

SQL> insert into nn values (null)
2 /
insert into nn values (null)
*
ERROR at line 1:
ORA-02290: check constraint (APC.NN_CK) violated


SQL> alter table nn disable validate constraint nn_ck
2 /

Table altered.

SQL> insert into nn values (null)
2 /
insert into nn values (null)
*
ERROR at line 1:
ORA-25128: No insert/update/delete on table with constraint (APC.NN_CK)
disabled and validated


SQL>

And this with a unique key:

SQL> create table my_nu_tab (col1 number)
2 /

Table created.

SQL> alter table my_nu_tab add constraint nu_uk unique (col1)
2 /

Table altered.

SQL> insert into my_nu_tab values (1)
2 /

1 row created.

SQL> insert into my_nu_tab values (1)
2 /
insert into my_nu_tab values (1)
*
ERROR at line 1:
ORA-00001: unique constraint (APC.NU_UK) violated


SQL> alter table my_nu_tab disable validate constraint nu_uk
2 /

Table altered.

SQL> insert into my_nu_tab values (1)
2 /
insert into my_nu_tab values (1)
*
ERROR at line 1:
ORA-25128: No insert/update/delete on table with constraint (APC.NU_UK)
disabled and validated


SQL>

Interesting. So what happens when we try to insert into the child table when the foreign key is disabled yet validated?

SQL> insert into temp_child values (2, 11)
2 /
insert into temp_child values (2, 11)
*
ERROR at line 1:
ORA-25128: No insert/update/delete on table with constraint (APC.WHAT_THE_FK)
disabled and validated


SQL>

So at least the database prevents us from inserting orphaned records into the referencing table. It just doesn't protect the integrity of the referenced table. Which is fair enough I suppose - the foreign key is disabled after all.

I'm trying to think of a scenario in which we would want to disable a constraint but still keep it validated but so far nothing has occurred to me. Obviously there must be a good reason for this. Any suggestions?

Interesting relational integrity bug

Over in the OTN forums, Wilhelm demonstrates a method for disabling foreign key constraints in such a way that we can delete the parent data and then re-enable the foreign key without throwing an ORA-02298 exception.

The proper syntax for disabling a constraint is this:

SQL> ALTER TABLE temp_child DISABLE CONSTRAINT what_the_fk;

Table altered.

SQL> delete from temp_parent;

2 rows deleted.

SQL> ALTER TABLE temp_child ENABLE VALIDATE CONSTRAINT what_the_fk;
ALTER TABLE temp_child ENABLE VALIDATE CONSTRAINT what_the_fk
*
ERROR at line 1:
ORA-02298: cannot validate (APC.WHAT_THE_FK) - parent keys not found


SQL>

But if we include the mystical keyword VALIDATE in the disabling command we can corrupt our relational integrity quite nicely:

SQL> INSERT INTO temp_parent VALUES(1);

1 row created.

SQL> INSERT INTO temp_parent VALUES(2);

1 row created.

SQL> ALTER TABLE temp_child ENABLE CONSTRAINT what_the_fk;

Table altered.

SQL> ALTER TABLE temp_child DISABLE VALIDATE CONSTRAINT what_the_fk;

Table altered.

SQL> delete from temp_parent;

2 rows deleted.

SQL> ALTER TABLE temp_child ENABLE CONSTRAINT what_the_fk;

Table altered.

SQL> select * from temp_parent;

no rows selected

SQL>

Wednesday, September 26, 2007

Questionnaire on Virtual Communities

Imène Ben Yahia, a doctoral student at L'Université Paris IX Dauphine, has posted a questionnaire about participation in online communities, meaning discussion board, newsgroups, usersgroups, etc, focused on software products. That is, they are collecting data on things like the OTN Forums rather than Second Life.

If you feel like helping out there is an English version here. The translation from the original French is a bit odd (it says "editor" meaning "software vendor" or "forum moderator"). The Francophone amongst you may want to check out the French version instead.

Monday, September 24, 2007

OOW2K7 Scheduler Builder open

Those of us fortunate enough to be going to Open World this year can now start planning our days with the conference Schedule Builder. I've begun the process but be warned: it requires a lot of time and mental stamina. In a world which has gone Web2.0 mad, the Open World Schedule Builder is proudly, defiantly Web1.0.

Yes, it's the user-unfriendly single long HTML table which makes it impossible to see which sessions you've booked and which sessions clash. It's the agonising network round trip every time you book a session. And it's the long scroll back from the top of the page after every booking. Oh, and Firefox users will need to use the IE Tab add-on to see the popup boxes but you probably guessed that already. In short, a trying experience, and one which shows the UKOUG agenda builder in a very good light (to be fair the UKOUG sites require the IE Tab too).

Whilst choosing sessions I noticed that just about all the developer sessions are in the Oracle Develop stream. At first I thought this was just Oracle's policy of making all the best stuff a chargeable extra. But it's actually more complicated than that. Looking at the web site it seems that Oracle Develop is not a licenceable pack. Rather it's an semi-autonomous event running alongside Open World, with some overlap (access to the OTN social events, the exhibition hall and the keynotes). So I guess Oracle have decided that not only is there a difference between developers and DBAs, the difference is so vast the two groups require separate conferences.

Friday, September 21, 2007

Web Conferencing with FireFox

I have just signed up for a web conference about the Lifetime Support Policy for 9i Database Release 9.2. Naturally enough Oracle host their own web conferences using Oracle Collaboration Suite. The registration process includes an option to test the configuration of your desktop, to ascertain whether it is compatible with Collab Suite.

Inevitably the test software doesn't work with Firefox. In fact it fails so badly that I couldn't resize the pop-up window to read the failure message. This is the second time this week I have had this problem with web conference software. Earlier this week the culprit host was Interwise. Thank goodness for the Firefox IE add-on. In both cases all I needed to do was add the conference site to IE tab's list of sites.

Firefox now has 20% of the UK browser market and 30% in Europe, and 17% worldwide. Judging by my immediate circle, the take-up is much higher amongst IT professionals. These are precisely the sort of people most likely to sign up for web conferences. Isn't it about time web conferencing started to catch up?

There is a final irony. The Oracle site does have a Quick Tutorial, which specifies Browser—Internet Explorer 5.5 or higher Java—Enabled in the system requirements. Unfortunately the Quick Tutorial (and the Help text) only work in IE. Even the Firefox IE tab renders them as blank pages.

Thursday, September 20, 2007

What's up with Oracle WTF?

Last week William Robertson invited me to join the Oracle WTF crew for a drink. This was quite a daunting prospect. They've known each other - socially and as co-workers - for a long time. They're all very sharp, both in Oracle and in communication skills. In short I felt a bit like the new boy at school being invited to join the gang of the coolest kids. Or at least the snarkiest.

As it turned out only William and Adrian Billington could make it, which was a manageable number. This was the first time I had actually met William or Adrian in meatspace. However, our paths have crossed on the web and obviously William is a regular in the OTN forums. So we did already kind of know each other. It was a good evening.

One of the things we talked about was the current stasis in the Oracle WTF blog. William et al had started the enterprise in a flurry of excitement and with the blessing of the owner of a code base full of howlers. So initially they had lots of examples to draw on. The problem is, that as contractors, they have to move on to other clients. It is a bad business strategy for them to make fun of their clients code. This is why the original WTF site tends to feature war stories from years ago and guarantees the anonymity of its submitters.

I understand this completely. As as consultant I operate under the same strictures. True, the other day I did write about a system which had been written for my current client. But I think putting zeroes instead of nulls in a number column is an understandable design decision. A misguided decision but not WTF material.

The upshot is, Oracle WTF needs contributions. And those contributions will have to come from its readership. So please send your Oracle WTFs to William. He'll be most grateful.

Wednesday, September 19, 2007

Worse than J2EE

There's an interesting thread on the OTN PL/SQL Forum about Real Time Database Design. At least that's how it started. It has now morphed into another pop at J2EE and .NET developers. Zlatko Sirotic has posted a nice satire of the average OO developer's approach to databases:
METHOD 4: sending XML files to OO2EE.Net;
super-fast and clean method that ensures database independence;
we need database independence - maybe one day we must replace our RDBMS with flat files

Which is almost too true to be funny.

I fear my latest contribution to the debate is likely to spoil my chances of getting a Director's tiara to go with my ACE of spades.

It is worth bearing in mind that it is not just OO developers who have a poor understanding of databases. This recent WTF story shows how a VB developer with just the wrong amount of knowledge can inflict a lot worse than J2EE on your system.

Tuesday, September 18, 2007

What's worse than finding a NULL in a NUMBER column?

Finding half a worm! Oops, wrong punchline. No, the worst thing is finding a zero. Twice in the last week I have had to rewrite some code to handle an application which was using zero as a magic value instead of populating a numeric column with null.

One of these columns was a code which described the nature of some free text held in another column. 1 through 6 were assigned to pre-determined categories but the users can enter text outside of those categories. My program did a lookup to expand those codes with the category description; what I hadn't anticipated was that the rows for extra-mural text would have a code of 0 instead of null. NO_DATA_FOUND. Irritating but simple enough to handle.

The other case was slightly more worrying. Here the column was one of two; the other column had a data type of date. One or the other column or neither could be populated, but not both. Overwhelmingly the date column was populated . But when the date column was null roughly have the number columns were zero. Given the nature of the data it was not credible that half those rows would really have a value of zero. Most of them should have been null. However, for a handful of those records zero was probably a legitimate value. It was just impossible to tell which rows they were.

And that is the problem with "handling" nulls by using magic values instead. The magic values often need special handling themselves. Also they can subvert our data integrity. For instance substituting a null with zero may not affect the calculation of a total but will it will change the value of an average.

Nulls are annoying and it is a good idea to avoid them in a data model. But few of us are prepared to go to 6NF. Thus we have columns for which we cannot assign values. So be it. Much better to face the fact and use nulls than to fill our columns with magic values. In a very real sense disguising nulls in such a fashion is just like having an exception handler to suppress exceptions:

...
exception
when no_data_found then
null;
....

We need to know.

Thursday, September 13, 2007

Stupid things to do with triggers: Pt.42 in a series of 94

As is well known, the concept of :OLD values in an INSERT trigger makes no sense. Obviously there is no OLD record in such a scenario case. What is perhaps less well known is that Oracle will let us build an INSERT trigger which references an :OLD value.

SQL> create or replace trigger t1
2 before insert on t1
3 for each row
4 when ((old.col2 is null) or (new.col3 is null))
5 begin
6 if :old.col2 is null then
7 :new.col3 := 'COL2 is null';
8 elsif :new.col3 is null then
9 :new.col3 := 'COL3 is null';
10 end if;
11 end;
12 /

Trigger created.

SQL>

This means we can use the trigger to corrupt our own data without really trying...

SQL> insert into t1 (col1) values (1)
2 /

1 row created.

SQL> insert into t1 (col1,col2) values (99,56)
2 /

1 row created.

SQL> select * from t1
2 /
COL1 COL2 COL3
---------- ---------- --------------------------------
1 COL2 is null
99 56 COL2 is null

SQL>

Obviously it is unlikely that anybody would deliberately set out to do this. But it is the sort of mistake we might make by confusing the scope of variables between the INSERT and UPDATE events. Another good reason for having separate triggers for each event. Or indeed, if you are of the anti-trigger persuasion, another good reason why triggers should never have been invented in the first place.

Wednesday, September 12, 2007

UKOUG 2007: Chair registration

Yesterday I wrote a blog article saying that the registration to chair conference sessions was open. Unfortunately I was premature on this and have deleted the original article. The UKOUG asks its volunteers who assist throughout the year with SIGs and the conference agenda to select sessions first. Once they have made their selections, the UKOUG may be able to open up the opportunity to members outside of the UKOUG's regular volunteer community.

So I really shouldn't have said it was open to all. I wish to apologise to the UKOUG staff for jumping the gun, and also to anybody who experiences inconvenience or frustration because they acted on my advice.

Now, where did I put my sackcloth and ashes?

Keep clear

Last night I went to the ICA cinema to see Helvetica, a documentary about the typeface. No doubt some of you are wondering why I didn't go to see The Bourne Ultimatum instead, but honestly, what would be the point? I'm sure it's well done, but you know, some fisticuffs, some car chases, Matt Damon pulling that face for the whole film... What is the point? Escapism? Well, this is a world where a man sets himself on fire and then drives a Jeep stuffed with gas canisters through the main entrance of an airline terminal. So in what sense is The Bourne Ultimatum escapist?

Whereas immersing yourself in the slightly arcane world of typography is completely delightful. This is a film which makes you look at the world about you in a completely different way. Unless you're the sort of person who obsesses about fonts you probably aren't conscious of the ubiquity of Helvetica. It is the film's task to make you see how widely-used is the type, and explain why this is the case.

Eduard Hoffman and Max Miedinger consciously designed Helvetica in 1957 to be a modern typeface. It is sans serif, with special attention given to the space around the letter. Each letter has a uniformity. It is clear, simple and straightforward. It is a typeface which is ideal for signage, corporate logos and general usage.

Helvetica has been almost ridiculously successful. The film is stuffed full of different usages of the typeface. Corporate logos, concert flyers, t-shirt slogans, posters, shop fronts, road signs and vehicle labels. The rest of the film features a number of designers talking passionately for or against Helvetica. These contributions are nicely judged: everybody cares deeply about typography but demonstrates an awareness that this might make them seem slightly unhinged.

It is just a joy to listen to articulate intelligent people talk about a topic with passion and humour. Michael Beirut has a fantastic riff on the parlous state of fifties advertising with its jumble of typefaces (especially "nuptial") scripts, goofy logos and lots! of! exclamation! marks! Jonathan Hoefler, pondering the difficulty of evaluating Helvetica, says it's like having an opinion about off-white paint. Inevitably the people who are against Helvetica have the best lines. Erik Spiekermann says he hates Helvetica because it doesn't break any rules, despite the fact that he's German and he likes rules. Paula Scher started designing in the seventies and regarded liking Helvetica in the same league as supporting the Vietnam war. "And the current war?" prompts the interviewer. "Helvetica caused the Iraq war!" she laughs.

Stefan Sagmeister rails against the corporate brochure whose front page consists of lots of white space, with six lines of Helvetica-set text, a small quirky logo in the bottom right hand corner and a picture of a business man. It says "Don't read me. I will bore the shit out of you." I have a lot of sympathy for this view. (Disclosure: LCMG is a company which specifies Helvetica for its corporate publications).

My favourite anecdote came from David Carson, of Raygun magazine. He describes how he was faced with laying out an excruciatingly banal interview with Bryan Ferry. He went through hundreds of fonts trying to find the ideal one to express his feelings for this interview. Finally, at the end of the alphabet, up came Zapf Wingding. Perfect. He showed us the double page spread. A photo of Ferry and - apart from the singer's name in the title - all the text was set in the wingding font. He said we could highlight all the text and convert it to another font - Helvetica? - but we shouldn't bother: it's not worth reading.

As IT people we use fonts all the time: in GUI boilerplate, in documentation, in PowerPoint slides. How often do we actively consider which font to use instead of just accepting the defaults? Well, I expect most of us like to use a mono-spaced font such as Courier when we are programming or including code samples in documents. But beyond that IT is a dreary world of Arial and Times New Roman. Helvetica is a film which tries to communicate why that is a bad thing, why typeface matters and why we should take the time to choose the right one for the task.

Last word. Most of the designers had computers on their desks. Every single desktop or laptop - regardless of whether its owner loved Helvetica's clean simplicity or loathed its corporate conformity - was the same brand. You know which one. I just hope Steve Jobs coughed up some sponds for all that product placement.

Thursday, September 06, 2007

Of fake blogs and search engines

A couple of prominent Oracle blog sites have suffered from spam bloggers and plagiarists in the recent past. So we know there is a problem.

Gadi Evron at Securiteam has written a commentary on just how sophisticated spam bloggers are getting these days. I think everybody will find this a worthwhile read, because such sting operations can affect people who comment on blogs as well as people who own them.

Night of the living spamtards

So are there any lessons to be learned from the spamtard ORACLE's adventures in the OTN forums yesterday? Not really. We all know little corners of the internet are vulnerable to individuals with the time and the motivation to be anti-social. This was one adolescent sitting in a Comp Sci class with too much time on their hands (I think in this case we can justly blame the teachers). ORACLE (and at least one other spamtard) posted a lot of silly comments in a number of active threads and started up many more threads of their own. So what? It's not like it was a bot-driven DoS assault. The DB General forum was still usable and none of the other important forums were hit at all. Frankly the forums being down for "routine maintenance" is a bigger pain.

"One monkey don't stop no show" -- Joe Tex


I am therefore surprised by the over-reaction of some of the forum regulars. I agree it would be nice if we could prevent such incidents but actually doing so would be quite difficult. If we trash ORACLE's account today they're back tomorrow with a different Hotmail address. Somebody suggested OTN could block their IP. Well, given that they seem to be posting from a school that might also block other more benignly-motivated students from asking questions. And it certainly won't prevent the spamtard from using some other place - such as an internet cafe - to continue the games.

In a recent article in the Guardian Cory Doctorow explained why effective DRM is impossible to achieve. All it does is punish those people who have actually paid for their digital media. Stopping low level trolls like ORACLE is basically the same case. OTN could put up loads of road blocks which would inconvenience us but won't stop the spamtards. Yes, OTN could appoint trustees to zap every post these gits make, but who wants to be on spam patrol for the whole afternoon? Not me. Much better just to let the spamtards have their fun and wait for the housekeeping bot to tidy up automagically. In the meantime, just ignore them. They'll get bored if nobody reacts to their jibes.

But above all, keep it in perspective. This is not poisoning the well, more like piddling in the paddling pool.

Wednesday, September 05, 2007

Trolling for laughs

Just recently we have had a troll visiting the OTN DB General forum. They call themselves ORACLE. They're annoying but harmless. Still every evening the Forum moderators eradicate their posts but the next day ORACLE is back. It's just like the Do Long bridge but with disposable e-mail addresses.

Here's an example from today (I won't bother posting the URL, it'll be gone by tomorrow):

Just got my new Oracle today

Oracle 12g, OMG it is so freaking cool.

I can write 9 queries in 5 seconds.

Then I laugh at all of you noobs.

^_^V


I don't know about you but it reminds me of this recent posting from Dizwell....

Update


Since I posted this I have noticed that ORACLE is really blitzing the forum with postings. I guess they want to be considered more than just an annoying idiot. Still at the rate they're going they should have enough posts to qualify for ACE-hood by the end of the day.

Update 2


Well ORACLE now has control of the OTN forum. So undoubtedly something must be done. Rather helpfully, ORACLE has posted a list of actions which OTN ought to undertake to make life harder for trolls:

On the subject of spammers I suggest that you make so you have responsible oracle users able to ban and delete certain posts. For example, If you where honestly going to stop my spamming you should ban the account instead of just resetting all of the posts the spamming user makes and resetting the name, that is hardly dealing with the problem effectively.
Also, whoever the Forum administrator is. They should try giving more power to users they can trust such as
-N. Gasparatto
-Paul M
-Blushadow
-Hans Forbich (hes funny =P)
You should give them the position know as moderator (these are used on most forums). They should have a certain amount of control on who uses the forum. They should be able to ban (permently immoblilize the account, dont just reset the posts) and delete posts when necessary. Therefore you won't have to wait till your stupid oracle mod comes in and sweeps the place every 24 hours.

I'm slightly miffed that I'm not included in the list of trustees.

Final update of the day


Well the OTN forum housekeeper has woken up and cleared out all the messages posted by ORACLE. But it remains to be seen whether the troll will be back tomorrow.

Wednesday, August 29, 2007

Meeting William Gibson

Not many novelists bring out the fanboy in me, but Gibson is one of them. Neuromancer was, literally, the book that changed my life. It's why I decided to become a computer programmer.

In the summer of 1986 I was a disillusioned History student about to become a disillusioned History graduate. I had finished my finals, I had no job lined up and I had no idea what I wanted to do with my life. It was in this state of aimlessness that - inspired by an article by William Leith in the NME - I purchased Neuromancer. It was the first pure SF novel I had read in years and it was completely gripping. I can still recall the adrenal rush of the last few chapters, racing through them just to discover how the story ended.

I had read SF as an adolescent but discovering JG Ballard had derailed me: nothing else in the genre could quite match the intensity of his prose. At university I had read mainly non-fiction: there was so much reality to discover, it seemed pointless to read to stuff people had made up. When I was studying European heresy my tutor John Critchley advised me to read Umberto Eco's The Name of the Rose (I was chuffed to explain to him that the blind librarian Jorge of Burgos was a reference to Jorge Luis Borges, because that joke had passed him by). I also read Mishima because I did courses on both medieval and modern Japan, and he seemed appropriate. For light relief I read Italo Calvino's short stories and the Blandings novels of P.G.Wodehouse.

I realise that list probably makes me sound like an insufferable prick. But then I probably was an insufferable prick at university, so that's fair.

I'm not going to do a review here. I presume everybody who reads blogs has read Neuromancer. If that's not the case stop reading this right now and go read it. Like most SF it has dated but not as badly as some. Few SF authors have changed the world. My quasi-namesake Arthur C Clarke did, with his invention of the geosynchronous satellite, but largely his vision has not been realised. No lunar explorers have disinterred mysterious black slabs because there are no bases on the moon. Heck, nobody's even been to the moon for over thirty years. Whereas it's a measure of the impact Gibson's writing has had on the world that he has stopped writing SF and moved into regular fiction without any meaningful change of tone or subject matter. (I guess Bill Gates, Steve Jobs, Michael Dell, Larry Ellison and others have also had something to do with it).

Gibson's insight was to take the glamour which traditionally attached to spaceships and astronauts and transfer it to computers and programmers, who were - it's fair to say - not glamourous. At Exeter the Comp Sci students were pimply-faced youths in brown and beige, as boring as accountants. In fact, more boring: at least there were some girls amongst the accountancy students. Neuromancer changed that image by making computers cool, sexy and edgy. Which is why it has had such a profound effect on modern life. All over the world, pimply-faced youths in brown and beige set about immanentising a world in which computers - and by extension the people who worked with them - were cool sexy and edgy.

Neuromancer was Gibson's first novel. In 1986 it was a bit frustrating to discover that there wasn't anything else to read by him. I just had to wait until Count Zero came out. On the other hand it does mean that every few years there is a new novel to look forward to.

So today I joined the line of people to buy a signed copy of Gibson's new novel, Spook Country, at Forbidden Planet. I told him I was grateful to him for writing Neuromancer because it had directed me into a career in software development. His face crinkled with recognition. "Oh you're one of those guys," he said. Yep, I'm one of those guys.

Monday, August 20, 2007

Open World 2007

In the Comments section of Tim Hall's recent musing on the new two-tier ACE programme, Doug Burns said:

"Once you put together lost wages or fees, accommodation and flights, it doesn’t take long before this becomes a serious financial commitment. I wonder sometimes whether people who attend presentations whilst being on company wages and expenses really appreciate that."

What contractors sometimes fail to appreciate is that it isn't necessarily easier for permies, just different. We still have to ask the company to pick up the tab for our expenses (not to mention lost billing for us consultants), and the company reserves the right to say, "No, you cannot go". For some reason Open World is a harder sale than UKOUG. Perhaps our bosses think going to San Francisco might be more of a jolly than going to Birmingham....

Fortunately I have have some supportive managers at LogicaCMG and my business case has finally been approved. So I'll have to dig out that company polo shirt again.

Join Me at Oracle OpenWorld Connect!

Thursday, August 16, 2007

Oracle WTF is back!

Jubilation sweeps the blogosphere, or at least the small corner of it where Oracleers hang out. Oracle WTF is back in the hands of its rightful owners. Huzzah!

William and others (not least the WordPress groupies out there) might be amused by the news that Blogger's Anti-Spam bots recently managed to suspend one of Google's own blogs. At least we can see that the ASbots act without fear or favour.

Monday, August 06, 2007

Satire

Fake Steve Jobs has been channelling Larry Ellison over the weekend.
"I’m the guy who screwed IBM out of its own database business with its own technology. It was a beautiful thing. I invented Oracle. Maybe you’ve heard of it."

FLE has a pop at Sir Elton John and Marc Benioff; it's not often you'll see those two names in the same sentence.

Friday, August 03, 2007

Asking the right question

Many years ago, before I had even heard of Oracle the database, I studied the I Ching, a different kind of oracle. This book is one of the many products of the period in ancient Chinese history known as The Hundred Schools of Thought. Its authorship is ascribed to the legendary Yellow Emperor various legendary figures (see Chris Gait's comment below) but it is actually the collected thoughts and commentaries of various unknown seers. The text distils Taoism, Confucianism and other strands of Chinese philosophy into an esoteric instruction manual. It is organised into sixty-four chapters, each represented by a symbol consisting of six lines (hence called hexagrams). Each line is either Yin or Yang, and the different proportions of each type of line gives each hexagram its particular nature.

Consulting the I Ching requires us first to frame a question. We then employ a randomness-generating mechanism (such as flipping coins) to find which hexagram will answer our question. The commentaries on the hexagrams use imagery from nature, mythology and society to provide gnomic advice:

  • "The dragon that goes too high has regrets."
  • "When there is hoarfrost underfoot solid ice is not far off."
  • "Whoever hunts deer without the forester only loses his way in the forest."

We then have to apply these answers to our original question by translating the metaphors. So, if I am hunting a deer, who (or what) is the forester who can guide me through the forest? Perhaps I need to call off the chase until I have found a verderer.

Friends would occasionally ask me to "do" the I Ching for them, because they misunderstood the nature of the book. Although it is often described as a book of divination it is not a fortune telling device like horoscopes or tarot cards. It does not violate the principle of causality; its predictions can only come true if we behave in the way it suggests. A dragon who knows when to stop ascending will have no regrets. So I always told my friends they needed to have a question in mind before they flipped the coins (they didn't have to tell me the question, by the way). If there is no question there can be no answer.

So does it work? Well, the meaning of the answer derives from the interpretation of it in the light of the original question. A focused request such as "Should I take this new job?" is more likely to produce illumination than something vague like "Why am I unhappy?". But meaning is in the mind of the questioner. Sometimes the hexagrams seemed spookily appropriate to the question. Other times they seemed to have no relevance at all. On one occasion my interpretation of the chosen text differed sharply from the questioner's interpretation.

The I Ching has a world view and a specific definition of correct behaviour. But I don't think somebody has to be a practicing Taoist or believe in the literal existence of Yin and Yang in order to gain benefit from the book. Finding harmony between contending forces is a common idea. For example, here is an article by WTF's Alex Papadimoulis on striking the balance between hard coding and soft coding.

I don't do I Ching consultations any more. Now I just spend my time in the OTN forums instructing herberts like this and this in the art of asking questions properly. Different oracle, same old stuff.

Tuesday, July 24, 2007

Software Contract Law

I hesitate to describe an article on computer law, especially one about the enforcement of software contracts, as "interesting" but there is no doubt that this is an important area for all of us. Of course, one side applies primarily to product vendors and consulting developers but we are all of us on the customer side of the fence. So everybody ought to read Cem Kaner's piece on an American Law Institute initiative to write a new Principles of the Law of Software Contracts.

He has also published his presentation to the Conference of the Association for Software Testing on this topic. This contains lots of insights into the evaluation of licensing law but it does also contain screens full of legal small print (literally).

The focus of Cem's analysis is on the enforcement of warranties. In particular, the proposals would make software suppliers liable for damages suffered by their customers as a result of bugs which were known to the supplier but not disclosed to the customer. You can see why lawyers might be keen on this proposal: Have you suffered from Blue Screen Of Death? Turn those bugs into £££! Calls Claims Direct now!

On the other hand, certain things would become freer. For instance, under a "standard-form transaction" (i.e. one used by the general public, as opposed to an individually negotiated one) companies such as Oracle would be unable to prevent the publication of the unauthorised benchmarks. There might also be implications for certain aspects of the OTN licence, such as the recently discussed confusion over whether we can use a database downloaded from OTN at home for instructional purposes.

Roy Batty writes ...

It's official - I am not a robot. Blogger's team of blade runners has given my blog a Voigt-Kampff test and determined that it is indeed the work of a human being. This verification was necessary because last week Blog*Spot put me under an Anti-Spam-Blog Order. Their anti-spam bots ( ASbots???) had locked my blog as it has "characteristics of a spam blog." Hmmpfff. So what are those characteristics?

"spam blogs ... can be recognized by their irrelevant, repetitive, or nonsensical text", which is possibly the rudest thing anybody has ever said about Radio Free Tooting. It was the other characteristic which rang a bell: "...along with a large number of links, usually all pointing to a single site." The opening paragraph of my last post before the ASBO descended contained three links to pages on BCS SPA web-sites so I guess that's why the ASbots suspended my posting rights. This seems a rather tenuous reason but it's the best I can find. The ASbots don't have to offer explanations.

Spam blogs or - ugly neologism alert! - splogs are an increasing nuisance[1]. Given the number of sites which require monitoring it was inevitable that the task of policing Blog*Spot would be delegated to automatons. Still it seems strange that the giant brains who invented page-ranking can't come up with some better heuristics: perhaps checking the Google Analytics reports and my Technorati rankings, or even just looking at my posting history. On the bright side, I was only off the air for a day or so, and it's not like I had anything I needed to say.

One final thing. The ASbots don't send an e-mail. I suppose this is because most of the sites they bust really are sploggers, so notification would just generate a wasteful amount of spam e-mails. You only find out you've been ASBO-ed when you sign in to post something. The order includes this sentence:
"If we do not hear from you, though, we will remove your blog from Blog*Spot within a few weeks."

Another good reason to have a backup of your deathless prose.


{1} - Especially for Blog*Spot. Apparently it's not such a big deal for WordPress. Although whether this is due to WordPress's superior technology or just because Blogger has the biggest mindshare is open to question.

Tuesday, July 17, 2007

MiniSPA 2007: Better than working

I took yesterday off to attend the 2007 MiniSPA conference. This was a greatest hits compilation of sessions from this year's SPA conference. I almost typed "presentation" but relatively few sessions actually consist of a speaker at the front of the room reading PowerPoint slides to a passive audience. The SPA principles value interactivity and participation. Instead there is a variety of sessions types, most of which involve the audience in some way; tutorials, case studies, workshops, panel discussions, simulations and goldfish bowls. So agenda decisions have another dimension ("how much thinking do I feel like doing?").

The opening session was a think tank. We were divided into teams and each team had to complete the following sentence in no more than ten words:
"Hey, I hear your business depends on delivering software. Well the most important thing about software development is ..."

Each team had to agree on its own phrase; then everybody voted on the phrase they liked the best. The secret of these things is to come up with something snappy and comprehensible. One team came up with a suggestion which had three clauses and used bullet points. That is a dead loss. You can't buttonhole somebody in the corridor and then ask them to wait whilst you boot your laptop and fire up PowerPoint. Here are a few of the final sentences.

  • If it's any good, software lasts a long time.
  • It encodes people's knowledge of the business to provide value.
  • Get the best project manager you can.
  • It's about people not computers.

That last slogan was the one for which most people voted, thus proving that people repsond to the clarity and focus which abstraction provides.

Designing Collaborative Workspaces


Mike Hunt (Mandu Ltd) led this workshop. Working in teams we had to build models of workspaces out of art card, Lego, Plasticine, Playmobil and various other craft materials. In the first round we had to build a bad working environment, then in the second round we had to build a good workspace. Although each team had a different scenario, the various models had certain common traits. The bad environments all tended to be cramped with people working in fenced-off isolation and with inadequate space for intra-team communication. Fans and other symptoms of poor air-condition featured a lot. The good workspaces were all spacious, with different rooms for different work modes. Bespoke desks and lots of whiteboards were common, and fresh fruit and/or baked goods were provided.

The striking thing was how much closer to real life the cartoon bad environments were. Most of the laughs came from recognition. The good environments on the other hand were largely wish fulfillment, and not just the ready availability of pastries. Floor space is expensive, particularly in London, and I doubt whether most companies would be prepared to devote so much square footage to pamper the developers. It is also unlikely that minions would be given so control over their own working environments. I was also amused to see that I had collaborated in designing an office which was basically open plan. I currently work in an open plan office (albeit cramped), and it can be very hard to concentrate. Sometimes a walled off cubicle seems a very attractive notion,

One interesting aspect of the process was how each team used the materials provided. In the first round we all tended to use the stuff closest to hand. The team with the Plasticine on its table had lots of blobs. Another team had been very creative with card. My team had the Lego so our office was largely built out of plastic bricks. However in the second round we had seen how the other teams had used different materials, so the good workspaces were a lot more heterogeneous in their construction. One team devoted lots of time to writing down the characteristics of their environments. Not surprisingly their models were the least-well realised. An object lesson in the perils of Big Design Up Front.

This session vindicated my decision to take a day's leave to attend the conference. "Logo, Plasticine and Playmobil? And you're trying to say you're working? Get outta here!"

Key lesson: developers want to be free range

Serious JavaScript


This tutorial was an attempt by David Harvey (Sibelius Software) and Peter Marks (indie) to persuade us that JavaScript is a proper richly-featured programming language, and not just a mechanism for undermining the robustness and security of web sites. I'm not sure they entirely succeeded. It didn't take long to discover some quirks in the language. For instance how JavaScript doesn't seem to be consistent in how it evaluates empty or undefined things.

JavaScript is an embedded language. It has no I/O routines of its own and a very small core library. It inherits most of its capabilities from the environment it runs in, which is part of the reason it has such a poor press. We normally come across it in browsers, which are Teh Suck as programming platforms.

JavaScript rarely raises exceptions. For instance strings are immutable, but we can assign to a string without an exception being raised (the assignment is just ignored). Another example: dividing 1 by zero returns infinity, a magic value like undefined or NaN. I suspect this tolerance of wrong code explains why so many JS enabled web-pages seem to hurl.

Key lesson: JavaScript - it's not just for irritating pop ups.

The Scoping Game


The last session I attended was a simulation run by Mark Delgarno (Acumen Software). Again we were in teams. The point of the game was to develop a range of mobile telephones. Marketing had provided us with a list of models, with mandatory and optional features and development costs. Each team started with the same pot of money. The challenge was to decide which features we would develop for a specific product, which we develop as reusable components and which we wouldn't bother with at all. The game was played over two rounds, with our revenue from the first round's models funding working on the second round's new models. Part of the fun was that we only knew the specs for the first three models. So we could hazard guesses about which features would be useful in the second round but we couldn't be sure.

Our team (Yodafone) spent a lot of time discussing the merits of developing Java as a reusable component in the first round, because the marketing brief hinted that it would be on increasing importance in the second round models. However, of the first round models, only one could use Java, which meant a return of a $2m on an outlay of $10m. So we decided instead to develop a reusable SMS component and a product-specific monochrome display for the starter model. We were the only team to bother with the entry-level model (I blame Idiot Toys). But our strategy paid off because Yodafone won the first round which meant we had more money than the others to spend in the second round.

When we got to see the next three models we had to develop a Java component, because it was mandatory for one of the models. However it was also a lucrative optional feature for the other two. So developing it as a reusable component in the second round still generated a profit. Building it earlier would have cost too much money without generating compensating revenue, whereas the reusable SMS component paid for itself in the first round and made lots of money in the second round too. The upshot was Yodafone actually increased its lead at the end of the game. Win or not win, there is no try.

Obviously this simulation is not very realistic. In real life it is often difficult to assign costs and predict returns in such a clear cut fashion. But it was a pointed lesson in making the best of constrained resources. I think something like this game would be helpful as a warming-up exercise to play with users at the start of a requirements workshop.

Key lesson: YAGNI rules in even the unlikeliest of places

Lessons for the UKOUG


Overall I found this to be a very invigorating day. I'll be honest and say that not much of it will be immediately relevant to me in my day job, but the MiniSPA experience gives me some lessons for me as chair of the UKOUG Dvelopment Engineering SIG.

With the UKOUG the rooms always have serried ranks of chairs facing a screen. By contrast the SPA rooms are setup on the presumption of interactivity, with six chairs arranged around smallish tables. In the UKOUG we ask every presenter for their PowerPoint before the day, so we can print them out and put them in the delegates' packs. The feedback form even includes a question about the quality of the presenter's slides. At the SPA only one of the three sessions I attended featured any PowerPoint at all, and that was just to set the scene. The session chairs often weren't presenting at all; rather they were acting as facilitators.

The other thing was that the sessions were about a variety of things. In the UKOUG we tend to have presentations about Oracle's product sets. So it's usually a cookbook format: how to tune a query, how to code a drop down list in JSF, how to call a web service. It's all good, useful stuff which people need to know but it does rather tend to induce a passive receptivity in the audience. By contrast, these SPA sessions tended to deal with practices, and in particular practice improvement. The games and exercises weren't a gimmick: active engagement with the topics stimulated creative thinking, which is the start of the improvement process.

So the challenge for me is to inject some of this excitement into the UKOUG or at least the DE SIG.

The Unanswered Question


In his introduction to the day, the SPA chair David Harvey said that developing software was the third most fun thing we could do with other people. I never did manage to ask him what the second thing was....

Tuesday, July 10, 2007

A fresh view on Oracle licencing

Oracle licencing is an arcane area, which has given us all much puzzlement and hilarity over the years. The abstracts submitted for the UKOUG conference included two papers attempting to explain Oracle's policies. Recently, Mark Brinstead has stirred up the Oracle blogosphere with his open letter on the licencing of the AWR and ASH packages. Personally I would like to see Partitioning brought into the Enterprise Edition but I'm not holding my breath.

Niall Litchfield has come up with an alternative insight into the relative value of Oracle licences. His article comments on Kevin Closson's analysis of a recent TPC-C benchmark which compared Oracle and MS SQL Server. Niall noted that the benchmark was undertaken using Oracle Standard Edition rather than Enterprise Edition. Kevin's conclusions related to value for money so Niall has done the maths for an EE licence instead, with interesting results. Not the least of which is:
"One Oracle EE license equates to 32gb Ram and 400 disk drives in round numbers."

Update


One of my colleagues points out that IBM's Quad-Core servers qualify for Standard Edition licencing, which could push the SE price performance even further.

Don't only CONNECT

What's wrong with this code?

create user joe_soap identified by password
/
grant create session, connect to joe_soap
/

Of course, CONNECT is a role which (prior to 10g) has a standard set of privileges granted to it, including CREATE SESSION as well as CREATE TABLE, CREATE SEQUENCE, etc. So there is no need to also explicitly grant CREATE SESSION.

The use of CONNECT role has long been discouraged because lazy DBAs and system designers - present company excepted - tended to grant it by default rather than considering which system privileges a user actually needed. As it happens, the CONNECT set of privileges is wrong for both developer accounts and regular user accounts in almost all cases.

CONNECT is wrong for developers because it is incomplete - it doesn't include more recent privileges like CREATE TRIGGER or CREATE TYPE. Also, developers ought to have the privileges granted to their accounts directly, so that they can build stored procedures on those privileges. CONNECT is wrong for users because most users should not be creating tables or other objects. Users who are application owners and need to create database objects should be granted the necessary minimum of system privileges.

In 10g Oracle officially deprecated the CONNECT role. It now just has the CREATE SESSION privilege. This is sensible but I know from the OTN forums that it catches out some people. These are the people who haven't read the Upgrade docs. So reactively lazy DBAs will be protected from one small consequence of their (in)action. Proactively lazy DBAs will probably just write a script to create a replacement role and grant all the privileges to that instead. But at least they've chosen that path.

Friday, July 06, 2007

Marketing WTF

The Register reports on a bizarre Oracle marketing campaign: Alan Armstrong received a cardboard "laptop" full of shredded paper. It appears to be part of a marketing campaign for Oracle's Enterprise Content Management product. The trouble is, stunts like this rather invite waggish retorts about the cost of Oracle licences.