Showing posts with label Steven Feuerstein. Show all posts
Showing posts with label Steven Feuerstein. Show all posts

Tuesday, 26 November 2019

On the PL/SQL you don't write when using APEX.

Fancy joining in on a discussion with PL/SQL and Oracle APEX community members from around the world?

I'm honoured join Karen Cannell and Scott Spendolini, to be hosted by Steven Feuerstein in the next AskTom PL/SQL Office Hours on December 3, 2019.

It seems a few people haven't heard of these "office hours" sessions, but they're worth a go - more than just your average webinar. And they're all recorded for later viewing.

Topic
This is just the PL/SQL sessions! Every month they have one for Oracle APEX, SQL, Spatial, JavaScript, JSON, Database Security, and even more.

Product segments

It's probably one of the richest learning resources Oracle currently produces, and I really need to tap into more of it.

If the timezone gods allow it, I recommend live participation, as you really do get your questions answered. The produce managers handle the chatline, ensuring questions get followed through.

I think Steven's ensuring we have a good 15 minutes for questions, because they always come through. They keep the chat transcripts, too. The one for Oracle Forms Modernisation was all about the questions!

And it's free - you only need to sacrifice your email address, though it's probably the best email feed I have. Concise, infrequent, except my forum feed, of course.

On December 3, in my 15 minutes of fame, I plan to (spark debate?) about "the PL/SQL you don't need to write". I delivered this as an APEX application, instead of whipping out the ol' powerpoint.

Join in next week, and Karen will start with some decent habits, and the other Scott will no doubt enlighten us about security, or some such.

Free training - from Oracle... well, in this case, delegated to some passionate volunteers. ;p

Sunday, 22 February 2015

2014 Annual SQL Championship

Steven Feuerstein runs a great site at PL/SQL Challenge that is just another way for developers to stay up to date with their knowledge of PL/SQL, SQL and database design with a bit of fun.

PL/SQL championships are held quarterly, but the less frequent SQL and Database Design quizzes are currently held annually. Thanks to persistence and maybe a bit of experience, I was eligible to compete in both.

Unfortunately do to a timing issue, I missed the Database Design championship. I'll have to try again next time - hopefully with more competition from the wider community, <hint> since it's a worthy cause to participate. </hint>

Steven recently announced the rankings for the 2014 SQL championship. I managed 9th from 40 competitors, which is pretty cool. With a little less haste I should have got a few more correct but that's the game you play ;p

To perhaps pique your interest, the question topics were

  1. String aggregation techniques
  2. Temporal Validity (12c date queries)
  3. Date datatype behaviours
  4. DML in nested tables
  5. MODEL queries.

Yup, it got hard quick, but they don't call it an annual championship for nothing, right?


Friday, 17 October 2014

PL/SQL Challenge Roundtable

Do you write PL/SQL? Me too!

Trouble is, sometimes it's hard to decide how to structure your packages - particularly in an APEX project. Over at the PL/SQL Challenge website run by Steven Feuerstein and friends there is a page dedicated to roundtable discussions.

I submitted my question not so long ago and hope to get some interesting responses. Why don't you give the site a visit and contribute? The discussions usually last for about a month.

Past discussions are available to view - last time Steven asked for use cases for DBMS_RANDOM. You could even test out your PL/SQL while you're there and take a few quizzes.

Monday, 20 June 2011

A mash of Oracle related thoughts

It's been almost a month since my last confession. I have plenty I want to say!

Australian Oracle User Group
As usual, there is various activity going on around the country.

July 14 2011 there is a one day Northern Region Conference at Jupiters Townsville. Kudos to Mark Lancaster et al for that one. It's a shame I can't be there.

August 16-17 2011 is this year's InSync conference. My paper has been accepted so I look forward to seeing & meeting old & new members of the Oracle community from around Australia and the world. This will be the largest Oracle event I've been to so far.

August 18 2011 there will be a Day or Real World Performance with Tom Kyte, Andrew Holdsworth & Graham Norwood. This has recently been announced and looks very attractive. I'll be looking out for more details on this - a similar event was recently at UK-OUG.

November 3-4 2011 will be my hometown's conference - Oracle with 20:20 Foresight, of which this year I have taken the reigns from Penny Cookson as the Program Chair. It will be an interesting and challenging task, and I look forward to what should be an even better event than last year. The call for papers is now open, so get your submissions in by August 10th.

In between all these events will be the regular branch meetings where you can catch a local presenter talking about anything Oracle. Aussie Oracle technologists - get in there!

And if you're not from Australia, I hope this isn't the only sort of plane that will get you here (think volcanic ash...)

So when you sit down to write or update your presentation, keep an eye out for tips such as these to create something outside the square.

Keep Yourself in the Loop
Oh so tempting to throw a PL/SQL pun in there, but I'll leave this the exception.
Steven Feuerstein and his team have been doing such a great job moving forward with the PL/SQL Challenge website, it's now in version 2.0.
In addition to a daily PL/SQL quiz, Steven has now launched a weekly SQL quiz and a weekly Apex quiz.

Now you don't have to play competitively or publicly rank yourself amongst the few thousand active players - but it is a great place to spend 5-10 minutes every day testing yourself on your general knowledge of Oracle technology. When I was first learning Oracle I spent a fair bit of time at asktom.oracle.com, this is another location you should bookmark and visit regularly. And on top of all this, Steven has given away almost US$30k in prizes - and it's not just for the winners. Granted, US$30K just isn't the same as AUD$30k these days, but it's worth the effort ;-)

And more kudos to Aussies Gary Myers and Jeff Kemp for ranking highly in the recent quarterly playoffs.

Oracle Training
What has been keeping my working life busy recently - in between the regular consulting - has been the influx of training request around the country. I only hope that planes will be flying regularly once the volcanic ash has settled down, otherwise I might have some disappointed customers!

It's end of financial year time, and it's great that so many companies out there want to keep their team skilled. I've been keeping our Apex notes up to date with all things Apex 4.0; our own Oracle Ace Director Chris Muir has been hitting it hard with numerous JDeveloper ADF workshops; plus we have our regular SQL training to keep your queries sharp, amongst our other courses.

If you're on the lookout for exceptional Oracle training, hit up Sage's website.

My Blog Layout
While nothing has changed yet, I plan to give this site a little revamp and bring it into 2011. I've learnt a few things along the blogging path, so keep an eye out for additions such as Google +1. It's such an interesting concept, and I'll be keeping an eye out to see where it goes down the rabbit hole. I read an interesting analysis at Phandroid, and webmasters can learn more about it at Google.
I also want to make it a little less clunky & boring and perhaps show that I have some of my sister's graphic design genes.

I'm even tempted to go Apex.

Around the Oracle Community
There have been a number of great posts by Oracle bloggers recently that I'd like to share if you haven't seen them already, or in case you missed them.
  • Eddie Awad shared a short video by Tom Kyte talking about Oracle. It's good to see the occasional video instead of faceless text - it's just a shame our Australian networks just don't make it easy to see this content smoothly on our smartphones.
  • Speaking of mobiles, Peter Raganitsch has been talking about theming on Apex for mobile devices.
  • Apex 4.1 is moving forward, and one of the features I'm looking forward to working with is the Error Handling Improvements. If you haven't upgraded from Apex 3.x, why not?!
  • Plug-ins is one area that I really need to catch up on, experts like Dan McGhan are doing all sorts of crazy work with Apex Plug-ins, demonstrating Apex as the flexible tool it is.
  • And if you haven't heard or have forgotten, Oracle XE 11g has been released in beta. The world keeps on spinning
An Apex Book Everyone Must Have
And I simply can't go by without mentioning the latest Apress book Expert Oracle Application Express.
I had the wonderful opportunity of being a technical reviewer for this book, and it's simply stunning. You might see my ugly mug somewhere in the first few pages.
Not only that, as you've probably heard, proceeds of this book help support the families of Carl Backstom and Scott Spadafore.
Keep an eye out for other Apress books that are in the works, too. I have a feeling there are a few other good ones on the way ;-)

Now, back to the business of real(ish) work. I should be back to more regular postings from July.

ScottWe.

Monday, 23 May 2011

A simple way to learn more about PL/SQL

Attention PL/SQL developers - Steven Feuerstein's PL/SQL Challenge website has just been 2.0'd

If you haven't given it a go, now is the time for a fresh crack. It's not just a daily quiz, but a place to learn and keep up to date with Oracle technology - not necessarily with new features, but techniques and capabilities you may not have been aware or, nor had the exposure to.

That and everyone has a chance to win something.

Kudos to Steven and his team of merry men.

Scott.

Tuesday, 1 March 2011

I quizzed an Oracle community

Once was a time when I read a few questions every morning at AskTom. It only took a few minutes but the amount of hints, tips, tricks and general best practice guidelines I learned became so valuable as my experience grew.

I still find it a valuable resource, but these days as a seasoned developer, I found myself a solution with a different style of learning - keeps my mind active and I learn the odd thing occasionally, other times it helps affirm my current understanding of Oracle behaviour.

Steven Feuerstein and his friends have created a (business) daily PL/SQL Challenge. You may have heard about it and wondered if you should give it a go - for most probably a variety of reasons.
Well, you don't even have to compete for the frequent prizes - you can have a private profile; or you may see people providing a link to their public profiles on their blog; or as a resume item.

The main thing is the occasional "test your knowledge" - typically a little snippet of code to have you thinking for a couple of minutes.

Steven has provided players an opportunity to submit their own quiz questions, so if you're curious of the sort of questions that get asked, here's mine from 28th February 2011 - it's a lesson on Short Circuit Evaluation:



I create and populate a table as follows:

CREATE TABLE plch_parts
(
   partnum    INTEGER
 , partname   VARCHAR2 (100)
)
/

BEGIN
   INSERT INTO plch_parts
        VALUES (1, 'Mouse');

   INSERT INTO plch_parts
        VALUES (100, 'Keyboard');
   COMMIT;
END;
/

Then I define the following function:

CREATE OR REPLACE FUNCTION part_exists (pn_partnum  IN  plch_parts.partnum%TYPE)
RETURN BOOLEAN IS
  ln_partname  plch_parts.partname%TYPE;
BEGIN
  SELECT partname
  INTO   ln_partname
  FROM   plch_parts
  WHERE  partnum = pn_partnum;

  DBMS_OUTPUT.PUT_LINE(ln_partname);

  RETURN TRUE;
EXCEPTION WHEN NO_DATA_FOUND THEN
  RETURN FALSE;
END part_exists;
/

Which of the choices, when used in place of the /*IF CONDITION*/ comment in the following block,
will result the subsequent output being displayed on the screen after the block is executed?

BEGIN
  /*IF CONDITION*/
    DBMS_OUTPUT.put_line('TRUE');
  END IF;
END anon;
/

Mouse
Keyboard
TRUE




A
IF part_exists(1)
OR part_exists(100) THEN
B
IF NVL(part_exists(1)
      ,part_exists(100)) THEN
C
IF COALESCE(part_exists(1)
           ,part_exists(100)) THEN
D
IF part_exists(1)
AND part_exists(100) THEN
E
IF CASE WHEN part_exists(1)
OR part_exists(100) THEN TRUE END THEN



The rules are well written, the idea is well presented (unlike my hand written html table representation here), and the user feedback is fantastic. Steven also has an associated blog for constructive discussions on the occasional contentious question, or question of general interest or quirkiness.

My question was well received by some friends, and Steven now provides users with simple, key survey results from each question - and I was happy with mine.

The answer is B & D - "NVL" & "AND"
I provided the following verification code to assist explanation of the answer:
BEGIN
  -- As soon as the first expression returns true, PL/SQL no longer needs to evaluate the second. This is perfect for situations where you can put more efficient calculations first.
  IF part_exists(1)
  OR part_exists(100) THEN
    DBMS_OUTPUT.put_line('TRUE');
  END IF;
END anon;
/

BEGIN
  -- Ideally this would behave as per COALESCE, but unfortunately NVL does not support short circuit evaluation.
  IF NVL(part_exists(1)
        ,part_exists(100)) THEN
    DBMS_OUTPUT.put_line('TRUE');
  END IF;
END anon;
/

BEGIN
  -- COALESCE is ANSI-defined shorthand for similarly written CASE functions, thereby supporting short circuit evaluation. COALESCE is generally preferred to NVL.
  IF COALESCE(part_exists(1)
             ,part_exists(100)) THEN
    DBMS_OUTPUT.put_line('TRUE');
  END IF;
END anon;
/

BEGIN
  -- Since this uses the AND operator, both expressions need to be evaluated to determine if the entire boolean equation is true. Oracle would use short-circuit evaluation if the situation permits, for instance, if the first expression returned false the second would not be evaluated.
  IF part_exists(1)
  AND part_exists(100) THEN
    DBMS_OUTPUT.put_line('TRUE');
  END IF;
END anon;
/

BEGIN
  -- The Oracle database will use short circuit evaluation for CASE expressions.
  IF CASE WHEN part_exists(1)
  OR part_exists(100) THEN TRUE END THEN
    DBMS_OUTPUT.put_line('TRUE');
  END IF;
END anon;
/

There are currently over 1000 regular players, but only about two dozen regulars are registered as Australian - I've seen more than that at our AUSOUG branch meetings! Come on Aussies - "represent!"

It's a great learning & affirming tool - I'll be on the lookout for inspiration for submitting more questions. :-)

ScottWe

ps - no, you can't cut & paste the code while a question is active

Friday, 5 November 2010

Quoting inside literal strings

Well some of you may have noticed my slight boo-boo yesterday. I had made some notes on a blog post I planned to finish later, and accidentally published instead of just saving to continue later - so here's my second attempt ;-)

What I found funny, was the post was about exactly what Steven Feuerstein implemented for yesterdays (4/11/2010) PL/SQL Challenge - embedding quotes in literals.

I was reminded of it recently while searching for something - I can't remember what for, but I came across this forum entry: http://database.itags.org/oracle/81577/

I used what I thought an interesting method for adding single quotes to strings - interesting I suppose because I've never used this method before:
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT=' || chr(39)||'DD.MM.YYYY'||chr(39);

The single row function CHR() will return the character equivalent to the numeric passed, in my case the ASCII character for single quotes. I the past I've mainly used CHR to provide my line feeds and carriage returns. (chr(10 & chr(13) respectively)

The author used this method because inserting a single quote in a normal string means you need to escape it, and this sometimes looks ugly or difficult to interpret:
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT='''DD.MM.YYYY''';

Oracle 10g introduced a method often called q-quote notation, further information can be found in the SQL Reference documentation here.

This format basically allows you to type the string as you would normally expect to see it, so the following example would display everything between the brackets [ ]
q'[ this isn't my string, is it? ]'

Which would mean our previous example would look like:
EXECUTE IMMEDIATE q'[ALTER SESSION SET NLS_DATE_FORMAT='DD.MM.YYYY']';

Of course, as the documentation describes, you don't need to use those particular brackets. For a while I thought the brackets had to be curly { }, which was frustrating because it became annoying to type. Until recently, I wasn't aware you could go beyond any form of brackets and use any character - as long as it matched up. Lucky, considering yesterday's PL/SQL Challenge did just that!

I found it uncanny, since the list of examples I had lined up for this post was very similar to Steven's list - these will all produce the same result - Hello Scott's computer:

select 'Hello Scott''s computer' hello from dual; 

select 'Hello Scott'||chr(39)||'s computer' hello from dual; 

select q'[Hello Scott's computer]' hello from dual;
select q'{Hello Scott's computer}' hello from dual;
select q'<Hello Scott's computer>' hello from dual;
select q'(Hello Scott's computer)' hello from dual;
select q'"Hello Scott's computer"' hello from dual;
select q'sHello Scott's computers' hello from dual;

So I would suggest choose a combination of brackets that makes sense to you - probably not the last example since it's not that intuitive.

Someone asked me what the point of this particular notation was. I've found it very handy in the past for a number of reasons, but it probably still depends on what your brain is used to seeing (I'm still quite happy using DECODE over CASE, for instance)

For example, when it comes to replacing quotes with double quotes, an exercise I did for something long ago, I can either write it as this complicated list of quotes:
with mine as (select q'[Hello Scott's computer]' hello from dual)
select replace(hello, '''', '"') from mine;

Or make it a little more elegant. This is still probably a weak example, but I've seen a horrible list of quotes in my time that took a while for me to count and realise what was doing what.
with mine as (select q'[Hello Scott's computer]' hello from dual)
select replace(hello, q'[']', '"') from mine;


And then there is the case of large dynamic SQL. It truly is horrible to have to apply two single quotes every time a quote is required, particularly when you're conditionally concatenating certain clauses; and want to just copy and paste the query directly in your GUI to test without replacing all the quotes again.
Here is a basic example of how a small bit of dynamic SQL could become much more readable with the q-quote notation:
declare
  my_string varchar2(100);
begin
  execute immediate q'(select dummy from dual where dummy = 'X')'
  into my_string;
end;
/

I think this PL/SQL challenge has turned out to be a great boon for Oracle developers worldwide. You may be quite a proficient PL/SQL programmer, but not everyone has had the opportunity for exposure to all facets of the database, and people are reporting how wonderful it is to pick up these tips and tricks - in the arsenal ready for future use.

Wednesday, 18 August 2010

Insync 2010 - I wasn't there.

Hello everyone

I'm starting to see a bit of feedback from the Insync Conference 2010 in Melbourne Australia.

It seems Down Under we're still working on creating the conference vibe, but I'm impressed to find a dedicated (yet thin) blog for the Melbourne leg. Here I found interviews with Connor McDonald & Tom Kyte.
I'll note that video of Connor confirms that I'm not the only one that seems to associate alcohol consumption with Oracle. I noted in the latest AUSOUG Foresight Magazine, Marc Lancaster gave a warm review of my appearance at a Brisbane branch meeting - apparently I commented how wonderful the beer & pizza concept is, or something along those lines!

Congratulations to Jeff Kemp, who took out Steven's live PL/SQL Challenge.
http://feuerthoughts.blogspot.com/2010/08/plsql-challenge-live-event-in-melbourne.html
I was looking forward to the live challenge this Friday when Steven comes to Perth, but alas - I have a previous date with our wonderful coastal isle - Rottnest.

Next time, Kempy... next time ;-)

I do look forward to catching up with friends this year at the Perth's leg of the conference series in November, perhaps I'll see you there.

Thursday, 17 June 2010

It's a great time to learn about PL/SQL!

Yesterday I talked about a few good links I've seen for people who are interested in or want to learn more about Apex. Another good place to start is documentation.

Today I thought I'd offer some of the developer blogs that have stimulated my interest recently.

I think it was through Tom Kyte that I found Seth's blog. This entry about deadlines typifies his style - concise thought experiments to make you think about either your work or home life, however you'd like to apply it.

Tom also mentioned if you're in contact with 11g, it's simply amazing some of the neat little features popping up. You may only use these once in a blue moon, but if you're aware of it, I bet sometimes you're proud how elegant it is.

Even if you're not yet in reach of 11g, it doesn't hurt to learn about it in places such as the PL/SQL Challenge (but don't cheat, I think yesterday's question on bulk collect semantics was either aimed at the speed readers or ...) And you can start using these features today with features such as condition compilation.

Speaking of Steven, here's his new presentation "Golden Rules for Developers". In the vain of 2nd rule of Fight Club... perhaps an addition I'd like to suggest is "being able to explain your interpretation of the reason why these are golden rules" - especially before you read his presentation, based on the list Eddie Awad summarised.

For the visual people, Jeff Kemp reminded me me of the Volkswagen VW that was photographed with "Feature" as it's number plate. And for a random afternoon quiz, local Gary Myers offered this titbit.

For something deeper, Dutchman Alex Nuijten offered this about a bug bear of mine - implicit data-type conversion, well, how it can impact check constraints. Steven talked about another preach I practice - not using select  * in my code.

It's awesome how much good content there is out there, this just scratches the vast Oracle community.

Wednesday, 16 June 2010

Now is a great time to start learning Apex!

Martin really took the words out of my mouth - although the activities that have been consuming my time haven't been nearly as fun - although I did fit a second honeymoon in there somewhere.

Like he says, I haven't forgotten about the blog - I have a growing list of topics sitting in my in-box ready to type out. I just need to fit it in between working on my Apex with Oracle Text presentation for next month's AUSOUG branch meeting from 16:30 on July 14th (what a great segue!) and of course doing my regular job consulting & training for my wonderful employer.

In the meantime, I have been able to slowly catch up with the multitude of Oracle posts flooding my RSS feed. Over the past few months there has been some great highlights, and it seems as the public release of Apex 4.0 is approaching, now is a great time to start learning Application Express.

First of all, earlier this month we have Oracle Apex product manager David Peake announcing http://apex.oracle.com has been upgraded to a pre-release version of Apex 4.0. This is a major step towards the final release and is very exciting news indeed.

Secondly, we have Dimitri Gielis pledging to blog every day about Apex 4.0 features until the public release. Good onya mate! He is using his Soccer World Cup tipping application as a case study for migrating from 3.2 to 4.0, which will make for interesting reading.

If you need a break from learning Application Express and just want to learn some random facts about PL/SQL, whilst at the same time giving yourself the opportunity to win a prize, why not visit Steven Feuerstein's PL/SQL Challenge (which happens to be written with Apex). Developers around the world are tackling his daily questions in a variety of ways, from researching the answer to ensure accuracy to relying on general understanding or guessing. Of course in the real world we would attempt to thoroughly study and understand the relevant feature before using it in production - but I like to use the questions as a way to test my tip-of-my-tongue knowledge. Sometimes I do well, sometimes I come across features I've had little exposure to. This is great because not only to I learn something new as Steven sometimes provides further commentary on the answers, I get to test how well I can apply my understanding on PL/SQL on features I'm not familiar with.
He also has a blog that solely serves this challenge, responding to various questions about the daily quiz. Good work Steven!

Now you've had that break, why not open up some Apex 4.0 Oracle By Examples? I look forward to this list growing and bookmarking this high on the list as a valuable resource for learning the new Apex features.

In other news, Oracle 11g Release 2 for Windows has been released. I have just finished installing the 64 bit version on my new laptop (another reason for blogging delays) and I look forward to further tinkering.

Now for all these links, these are only a few of the good Apex posts. Later I'll list out some of the good Oracle developer links - those who are proud of their SQL &  PL/SQL.

Thursday, 20 August 2009

Steven Feuerstein Perth Review - Session 2 - Writing Maintainable Code

Steven's second session remained light on for technical details, which was great for a Friday morning. He dealt with a topic that can be applied to any language and one that every developer faces on a day to day basis - the balancing act between deadlines and writing maintainable code.

As I write this I remember the old adage from Microsoft Secrets, and probably numerous software engineering books - every step a bug makes towards production, the exponentially more expensive it will be to fix.

Steven mentioned a few basic mantras and elaborated on each. I think this was well received by the audience and it always makes a difference to hear the argument from authority.
Without elaborating too much, some I managed to note down include:
  • Construct and enforce coding standards - even to the extent of when to utilise SQL. Steven pointed us to a set of standards he follows and has put out for public comment.
  • Personally, I'm in favour of using hungarian notation, including the datatype in the prefix of a variable, eg: ld_dob DATE;
  • - Utilise your development tool's template facilities. Whether it be Toad, SQL Developer, Textpad... they have have facilities to generate say a package with all the stubs, exception handlers, comment headers etc you need to avoid the White Canvas of Death, as he calls a blank .sql file. This helps with the enforcement of coding standards.
  • Encapsulate "stuff" to make it more readable
    • define a package for constants, and don't hardcode ANY value. If there is a slim chance in 100 years it could change, it should be defined somewhere. This also goes for formulas such as a full name evaluation from numerous fields.
    • Use pragma exceptions, so we see pkg_exceptions.e_collection_empty instead of -22166
    • Use PL/SQL APIs to each table (elaborated later in this post)
  • If you ever say Never or Always, it's a bug. Tom Kyte always says ;-)
  • Boolean functions read best when they return a boolean expression such as
    RETURN (this='TEST');
    as opposed to
    if this = 'TEST' then
    return true;
    else
    return false;
    end if;
  • Functions in general should work like a funnel. This way you can avoid ORA-06503 - Function returned without a value. PL/SQL warnings can help with this. Steven's words with this comment obviously help describe what a funnel looking function looks like!
  • Always (is this a bug?) return a subtype - never a specific datatype, ie: VARCHAR2(100)
  • Visit Refactoring.com
  • Use instrumentation/assertions. (Hint - I'll be elaborating on this later in the year)
  • And the fastest way to get the job done is to take your time. Don't rush. Mistakes are made when people rush, and experts from any industry will tell you that if you take your time, the job will get done quicker with fewer mistakes. The best analogy I heard on this was (I think) from a lecturer at uni -
    "Two carpenters were asked to make the same cabinet. The first carpenter, and old man, spent the first 2 hours thinking - studying the plans, laying out his tools.
    The second carpenter, an apprentice, (put his cowboy hat on) and got cracking straight away - sawing wood, drilling holes, occasionally swearing and looking for his hammer. He looked over at the old man thinking (chuckling), crikey, I'm halfway through this cabinet already and he's still thinking about the job!
    The old man then starts making the cabinet. All the relevant bits of timber were within arms reach as he built the cabinet, every tool never more than a step away. Actual construction of his cabinet took 30 minutes. Meanwhile, four hours in, the apprentice is still putting 'finishing touches' on his cabinet (working out how to put the doors on straight).
    The old man beamed at his work. Every join flush, every screw lined up. When the apprentice finally finished his, he figured he'd do better next time. Practice makes perfect."
As for coding practices, I had a flick through the book Steven was giving away on the day, and it looks well worth the read. Perhaps a book like that should be a standard text in a university curriculum?

Now to my first major criticism for the day. The concept of PL/SQL APIs to every table. I noticed Tim Hall also describes this sort of utopian development environment where all DML (including SELECT) for a table is done via PL/SQL APIs and any results returned via associative arrays. As I understand it, utopia is like the speed of light, or absolute zero - theoretically you can never reach it. And I think the reason in this particular case is the balance required between a tuned application and an abstracted/encapsulated one. To his credit, Steven himself said his focus is on PL/SQL performance and integrity, he's never been a SQL tuning fanatic.

Steven also mentioned Tom Kyte's mantra of "if it can be done solely in SQL, then do it in SQL". If there is no need to introduce PL/SQL for a solution, then don't.
E-Business Suite has been utilising table APIs for years, and quite successfully. It creates a well placed barrier and internalises all the business logic, turning say the insertion of a new HR employee into a procedure call whose black box touches a dozen tables to manage the setup. It also allows customisations to be neater and separate from the main install.

Software development theory aside, Steven did demonstrate a very nifty facility in his Toad suite to automatically generate all the typical APIs that may be required for a set of tables. Very tidy indeed.

There are many ideals in this session that need to be reiterated to every developer, and every newbie (I feel I should stipulate I think this is not a derogatory term, we should all remember we were all there once) should also cover it thoroughly. 4/5 for this session. Points lost because I think Hungarian notation should be in the major standard ;-), and further elaboration should be made on the utopian ideal of PL/SQL APIs - although time is always pressing for such a theological debate.

Monday, 17 August 2009

Steven Feuerstein Perth Review - Session 1 - Code Therapy for Software Developers

Based on conversations I've had with various people since Friday's session, it seems his day seminar was a success. There was a touch over 100 people in the auditorium with a fairly wide distribution of positions, skills & industry. Many thanks for AUSOUG and the members responsible for bringing Steven to our remote city (after the Sydney/Melbourne legs) - some of them only had minimal to see Steven present; and thank you Branka for that wonderful food! (I can be easy to please) It's just a shame it was a rainy weekend in Perth.

I'd like to take the opportunity to do a small review on each of the four sessions, although most of my comments will probably tie together scatterings of comments throughout the day.

I think his four topics were well selected. While obviously separate presentations in their own right, they were cohesive enough that you could see strong relationships between them throughout the day.
  1. Coding Therapy for Software Developers
  2. Writing Maintainable Code
  3. High Performance PL/SQL
  4. Automated Testing Options for PL/SQL
Even before Chris Muir introduced him, he took the time to demonstrate two old yet simple games that he believes a good developer should be comfortable with, at the same time obtaining good audience participation.
Mastermind he likened to the debugging mind, where given various states of being, how that suits with the expected solution. It was a very good analogy and reminded me how I used to enjoy that game.
The other was The Set Game, something I stumbled across a few years ago, possibly via a comment on his website. It reflected a consistent tenet of his that development is closely tied with pattern matching.

His first session, entitled Coding Therapy for Software Developers, I personally found to be the most enjoyable session of the day. I think we need to see more of this style of presentation at these events - unfortunately they seem to fit better with the evangalist/guru types with years of experience. Not only was it a sidestep away from the usual technical presentation, it helped remind us why we enjoy our jobs and how we can modify/affirm our behaviours and appreciate our career choice.

He recommended a number of books during the presentation, and I noticed quite a few people note them down. Steven did give a good impression of enthusiasm for these books, and I will certainly be on the lookout for them. For those who missed them:

Christopher Alexander - Pattern Language - Timeless Way of Building - Steven mentioned that day to day problems already have (good) solutions and if we can harness the concepts of pattern matching we can utilise the better, efficient solutions more frequently. One of the development perspectives here being templates and modularisation/encapsulation.

Jeff Hawkins - On Intelligence - For many years engineers have been trying to build intelligent machines, and apparently this book explores the topic well.

Daniel Gilbert - Stumbling on Happiness - An interesting look at how our minds work, and why we delude ourselves in thinking we know what we all want to make us happy.

Steve McConnell - Code Complete - A more technical book mentioned later in the day discussing best practices in the art and science of creating software. I remember thoroughly enjoying the art vs science debate of development at university, I'm sure this will be a good read.

In fact listening to his comments that morning, I have a sneaking suspicion he's a fellow evolutionist - and I would quite happily have recommended a wonderful book I'm reading at the moment.

One of my hand written notes referred to a conversation about why birds don't look sick until they are near death. A pattern of evolution and adaptation - but I can't remember how it related to software development! Oops.

He certainly mentioned to avoid caffeine, eluding to memory - based on my understanding anything learnt while under the influence of caffeine means we have a better chance of remembering it only when we have the same amount of caffeine in our system. Not really a state of being that we should desire 24-7.

Steven is a charismatic speaker, and I'm sure his fairly generic American/Chicago accent has helped his success in the presentation theatre. I recall a conversation with Lynn Munsinger on this concept.

So for me, 5/5 for the first session. Stay tuned for my thoughts on the other three. I'd certainly be happy to see the same session again, and more like it.

Monday, 3 August 2009

Steven Feuerstein to visit Perth

If you haven't seen the AUSOUG broadcast, PL/SQL guru Steven Feuerstein will conduct a seminar in East Perth on 14th August 2009.

If not already, what better time to become a member of your local user group?

The agenda is currently available through the AUSOUG website here.

Hope to see you there!