I’m off to InSync10

Perhaps you were introduced to APEX in a similar way to me.

When I started using APEX, I was pleased to see a good selection of simple themes and templates I could use straight away. There was no need to worry about creating a consistent look-and-feel across my applications, I could dive right into building the features and quickly produce good-looking prototypes and finished products very quickly.

As I became familiar with the product, I soon started exploring those sections in Shared Components entitled “Themes” and “Templates”. They looked intimidating at first, but as I fiddled with them I soon learned their usefulness and power – and soon was able to customise the look and feel of my web sites, so that they no longer looked so generic and “APEX-ey”.

I’ll be speaking on APEX Themes and Templates at the InSync 2010 conference in Melbourne, 16-17 August. This will be my first time speaking away from my home base in Perth.

The draft program has been published, and it looks like it will be huge. Over 130 presentations are already scheduled, my primary interest being the “Developer” and “Database and Technology” streams, which include the following:

  • Meet the CBO in Version 11g (Penny Cookson)
  • DEV Super Session: PL/SQL Developer Quiz Thyself (Steven Feuerstein)
  • Indexing New Features in Oracle 11g Release 1 and Release 2 (Richard Foote)
  • Oracle SQL High Performance Tuning (Guy Harrison)
  • (Obscure) Tools of the Trade for Tuning Oracle SQLs (Tony Jambu)
  • DBA Super Session: Reorganising Objects – when and how, and DEV Super Session: Things You Know (Tom Kyte)
  • 11g Features for Developers, and Partitioning (Connor McDonald)
  • DEV Super Session: Real Application Testing – I Love It (Mogens Norgaard)

…and that’s just some of the sessions I’m particularly interested in. Unfortunately I’m going to miss a number of them because they run concurrently – I’ll have some choices to make closer to the day.

Back on the topic of APEX, I’ve been playing with 4.0 in a VM, and comparing it with the previous version (3.2.1). Nothing really startling, but it’s interesting nonetheless to see how the themes and templates have been improved. Overall the new version looks quite good – I just need to find time to upgrade my “real” instances.

I hope to see you in Melbourne!


Unit Test != Requirements

Are one or more usage examples enough to specify the requirements for something? For example:

rtrim('123000', '0'); would return '123'

No, as can be seen here: Oracle 8, SQL: RTRIM for string manipulation is not working as expected (Stackoverflow)

When I read that question I thought of TDD (Test Driven Development), something I think I should be doing more of. As said here, however, “Are tests sufficient documentation?  Very likely not, but they do form an important part of it.”

I’ve seen unit test cases used as a form of documentation. Generally they could be useful for this – to tell part of the story – but if they only consist of “enter this, expect that”, they will never be good enough to replace requirements documentation.

Footnote: How about the source code – is that sufficient as documentation? In one sense, yes – the source code is the best documentation of what the system does now. What’s lacking, however, is documentation of the business requirements – and this gap can be huge (see e.g. Agile Development and Requirements Management).


OracleOverflow?

I’ve enjoyed reading and participating in StackOverflow for over a year now.

With the introduction of Area51, there is now the possibility of starting a new Q&A site for all things Oracle – as pointed out by Rob Van Wijk and Gary Myers. Sure there are other fora such as OTN, but they don’t have the kinds of features that make SO fun and self-moderating. SO is more like a cross between a Q&A forum and a wiki, with the addition of a democratic system of reputation points that allow good questions and answers to bubble up to the top.

If you agree, please head over to Area 51 – Oracle Databases and Follow it to voice your agreement.


Two sides of the same fence?

In my daily reading these two articles came fairly close together, and I have a strong feeling they are describing exactly the same project. *

From one side of the fence: A total rewrite: costly, time-consuming, but worth it?

“Our CMS was developed using Active Server Pages, and consisted of around 80,000 lines of VBScript code.”

“as we continued to develop the rest of the framework, we saw that it took a lot longer than anticipated”

From the other side: The Homegrown CMS

“If one were to create a list of adjectives to describe this monstrosity, “stable,” “reliable,” and “accurate” would be strikingly absent.”

“…nearly 200 tables (mostly imported from Microsoft Access) and not a single stored procedure. Boolean-type values were represented as a CHAR(5) field, holding possible values of ‘true’, ‘false’, or NULL…

“There were also no indexes. Nor any primary key columns… For inserts, an ID was assigned via in-line SQL by requesting the Max(ID) field of any particular table and adding 1.”

My point of view: this sounds like a good counter-example to the (very good, but general) advice offered by Joel Spolsky: don’t rewrite from scratch.

* EDIT: Vidar Langberget has advised that these are not the same project, proving that I’m not such a great prognosticator 😐



Demise of the Perth AUSOUG Conference?

Got an email this morning from the Australian Oracle User Group that this year the AUSOUG/OAUG “Oracle with 20:20 Foresight” conference will be co-located with the InSync conference, which is held in Melbourne on 16-17 August.

Initially I thought, “what, no conference for Perth?” Thankfully, though, they will also hold Oracle with 20:20 Foresight in Perth as well, 22-23 November. Phew!


AUSOUG Conference 2009 Day One

It was great to catch up with former colleagues at the conference today. As I go from site to site I’m gradually collecting more and more former colleagues and it’s great to hear how they’re going and what they’re working on.

Howard Ong gave a good review of Oracle’s new Data Modeller. Sounds like it’s got a lot of promise – but it’s very new and misses some features (e.g. support for functions, procedures with parameters, packages, and DDL change script generation) that I’d expect in an Oracle CASE tool.

Ray Tindall with Penny Cookson showed how a variety of javascript libraries (Apexlib, ExtJS, JQuery) can be integrated into APEX, and what features they provide. Personally I’d prefer to wait until they come out of the box in APEX 4.0, but for now the options available look good.

I was happy to see a good level of interest in Python at my talk after lunch. If you’re here because you want to have a peek at all the slides I skipped, you can view or download it from here [Python_and_Oracle_Fast.pdf].

Unfortunately I had to leave soon after that to pick up my car from the autoelectrician, tomorrow I should be able to stay all day.


AUSOUG 2009

Finally the AUSOUG 2009 conference program is out!

Looks good – I’m looking forward to a number of sessions (10-11 Nov in Perth), including the new “ODTUG Oracle ACE” stream:

  • Howard OngOracle Designer RIP? – A First Look at Oracle Data Modeler
  • Penny Cookson & Ray Tindall – Developing a Really Cute Application Using Ajax
  • Scott WesleyTrials & Tribulations of an Oracle Forms -> Apex Conversion
  • Connor McDonald SQL-ectric!
  • Tim HallPL/SQL: It’s all in the Presentation

I’ll be speaking again, this time doing an “Intro to Python” for Oracle’rs. If you’ve never played with this wonderful language before I hope you’ll come along. Alternatively, if you’re keen to hear Penny talk about “Best Practices in Apex Development”, or Scott Hollows give his “History of Oracle – the early years”, I hope you’ll tell me all about it afterwards, because my talk is scheduled at the same time.

If you’re attending the Perth conference, say hooroo.


How to tell if someone’s a programmer

“A woman asks her husband, a programmer, to go shopping:
– Dear, please, go to the nearby grocery store to buy some bread. If they have eggs, buy 6.
– O.K., hun.
Twenty minutes later the husband comes back bringing 6 loaves of bread. His wife is flabbergasted:
– Dear, why on earth did you buy 6 loaves of bread?
– They had eggs.”

Source (deleted)


Not just a free lunch

When I first learned to drive, all our cars were automatics – and so that’s all I learned to drive. This never posed an issue to me until I married Rosalie who owns a manual. She tried to teach me, and I managed – kind of. It wasn’t until I had a chat with my uncle-in-law, who’s a mechanic, that it “clicked” with me. This is because he explained to me basically how the gear-change system works, which meant I now had a picture in my head of what was going on “under the hood” when I pushed the clutch in – it didn’t take long before I was smoothly changing gears and not making my passengers lurch forward and back like someone on a bucking bull.

I think that’s the way I learn things – I need to have a mental model of how a device is working internally before I can really use it effectively. To be useful the model doesn’t have to be greatly detailed or even perfectly accurate – it just has to be good enough that I can predict or guess what effect different actions will have on the equipment.

Today I enjoyed Richard Foote’s talk debunking a raft of common index-related myths today, followed by Penny Cookson sharing about bind peeking, and Connor McDonald giving some creative demos of RAC.

There was some material covered in part from recent articles on Richard’s blog but he explained clearly the mechanics of Oracle’s B-Tree and bitmap indexes, including how index statistics affect query plans. One highlight for me was the clear explanation of how the clustering factor (CF) is calculated, what it means and how to use it to diagnose why an index is not being used. I think I understand the CF much better than I did before because Richard explained it in a way similar to the way my uncle-in-law explained the clutch in a car – i.e. he explained how Oracle calculates it and uses it internally. He could have just said “a good CF is one that is close to the number of blocks, and a bad CF is one that is close to the number of rows”, but instead he explained how it works, which means this rule-of-thumb becomes more self-evident, and a whole lot more meaningful and useful.

Other highlights:

    • the mere existence of an index can change query plans dramatically, even if the index is not actually used by the query;

 

    • adding a ' ' (a string containing just a space) as the second column in an index on a nullable column means that all the nulls will be stored in the index; and

 

Penny gave a quick overview of the problems of bind variable peeking, including a good explanation of why many 8i-to-9i upgrade projects experienced initial performance problems. There were some excellent tips for those of us not yet blessed with 11g on how to resolve (or at least work around) the problem of sql plans lurking in the shared pool, intermittently messing with query performance.

When we returned from afternoon tea for Connor’s talk, confronted with a table ominously equipped with ropes, children’s toys, toilet paper and lollies, we were treated to a talk which, by Connor’s standards, was a raving endorsement of RAC – by which I mean he did allow that it could very well be of benefit at some Oracle shops. Certainly the FUD surrounding RAC seems to have been cleared a bit.