In Defence of Best Practices

The subject of “Best Practices” came up again yesterday in a thread on Twitter. This is a subject that rears its head every so often.

I understand all the arguments against the term “Best Practices”. There isn’t one correct way to do things. If there were it would be the only way, or automatic etc. It’s all situational etc. I really do understand all that. I’ve been in this conversation so many times over the years you wouldn’t believe it. I’ve heard all the various sentences and terms people would prefer to use rather than “Best Practice”, but here’s my answer to all that.

“Best practices are fine. Get over yourself and shut up!”

Tim Hall : 18th October 2019

I’ve said this more politely in many other conversations, including endless email chains etc.

When it comes down to it, people need guidance. A good best practice will give some context to suggest it is a starting point, and will give people directions for further information/investigation, but it’s targeted at people who don’t know enough about what they are doing and need help. Without a best practice they will do something really bad, and when shit happens they will blame the product. A good best practice can be the start of a journey for people.

I agree that the “Always do this because ‘just bloody do it!'” style of best practice is bad, but we all know that…

I just find the whole conversation so elitist. I spend half of my life Googling solutions (mostly non-Oracle stuff) and reading best practices and some of them are really good. Some of them have definitely improved my understanding, and left me in a position where I have a working production system that would otherwise not be working.

I’m sure this post will get a lot of reactions where people try and “explain to me” why I am wrong, and what I’m not understanding about the problems with best practices. As mentioned before, I really do know all that and I think you are wrong, and so do the vast majority of people outside your elitist echo chamber. Want to test that? Try these…

  • Write a post called “Best Practices for {insert subject of your choice}”. It will get more hits than anything else you’ve ever written.
  • Submit a conference session called “Best Practices for {insert subject of your choice}”. Assuming it gets through the paper selection, you will have more bums on seats than you’ve ever had before for that same subject.

Rather than wasting your life arguing about how flawed the term “Best Practices” is, why don’t you just write some good best practices? Show the world how they should be done, and start people on a positive journey. It’s just a term. Seriously. Get over yourself!

Cheers

Tim…

PS. I hope people from yesterday’s tweets don’t think this is directed at them. It’s really not. It’s the subject matter! This really is a subject I’ve revisited so many times over the years…

Updates

Due to repeatedly having to explain myself, here come some points people have raised and my reactions. I’m sure this list will grow as people insist on “educating me” about why I’m wrong.

I prefer “standard” or “normal” to “best”. As I said at the start of the post, I’ve heard just about every potential variation of this, and I just don’t care. They are all the same thing. They are all best practices. It’s just words. Yes, I know what “best” means, but that’s irrelevant. This is a commonly used term in tech and you aren’t getting rid of it, so own it!

I’ve seen people weaponize best practices. OK. So are you saying they won’t weaponize “standard practices” or “normal practices”? They won’t ever say, “So are you telling me you went against normal practices?”. Of course they will. Stupid people/companies will do stupid things regardless of the name.

But it’s not the “best”! Did you even read my post? I’m so tired of this. It’s a best practice to never use hints in SQL. I think that’s pretty solid advice. I do use hints in some SQL, but I always include a comment to explain why. I have deviated from best practice, but documented the reason why. If a person/company wants no deviation from best practice, they can remove it and have shit performance. That’s their choice. I’ve been transparent and explained my deviation. If this is not the way you work, you are wrong, not the best practice.

Most vendor best practice documents are crap. I have some sympathy for this, but I raise tickets against bad documentation, including best practices, and generally the reception to these has been good. The last one was a couple of weeks ago and the company (not Oracle) changed the docs the same day. I always recommend raising an SR/ticket/bug against bad documentation. It doesn’t take much time and you are improving things for yourself and everyone else. I feel like you can’t complain about the quality of the docs if you never point out the faults.

The Art of Miscommunication : Read the Chain

I can’t express how frustrating it is to be passed an email that’s bounced around multiple times, then ends up in your inbox with a message of, “Please action this!”

You then spend the next X minutes reading the whole of the chain, trying to understand what you are being asked to do, and eventually get to something that could have been expressed in a couple of sentences, which would not have wasted your time. Sometimes the context in the chain is important, but on many occasions you just need to know what they want you to do.

So what should you do?

Put the action in your email and copy/paste any necessary information into it, so it becomes a self-contained mail. The rest of the chain can remain there, just in case someone wants the additional context, but the email can be read in isolation. A simple technique is to include a TL;DR which cuts to the chase, and all the additional stuff is there if someone needs it. I sometimes do this type of thing.

TL;DR

We need to do X because it is about to explode!

Boring Stuff:

Full background about the issue, including references to things further down the chain…

I’m not trying to claim I’m perfect at this, but I seem to be the victim of this bad communication a lot!

Relevant Subject Text

Over the course of an email chain, the subject of the conversation often changes, but people rarely change the subject of the mail, so when something with a subject of “P1 System X is down!” keeps appearing in your inbox, it gets very tiresome very quickly!

Now I understand that for some people keeping the same subject may seem important, as they remember the discussion, but when you are part of loads of chain emails like this, each running for days, having the wrong subject in the email can be really problematic.

What’s in the Chain?

Another thing about email chains is you really need to check what is written in them before forwarding them to others.

I had one occasion in my current company when I was forwarded an email. I read the whole chain to understand the context and found a consultant telling lies about me to try and cover his own incompetence. You can bet I went supernova and replied to everyone that ever read that email chain, including the evidence to prove the consultant was a lying scumbag piece of shit. He still works here by the way! I hope he’s reading this!

Cheers

Tim…

PS. I accidentally deleted the contents of my inbox this morning. It’s amazing how quickly that solves the frustration of bad communication! ๐Ÿ™‚

The Oracle ACE Program : My 13 Year Anniversary and Website History Lesson

Another year has gone by, and somehow I’m still doing this. ๐Ÿ™‚

As I’ve mentioned numerous times, last year was tough year for me. So far this year is going better. That’s partly because I’ve reduced the amount of travelling I’m planning to do, which has freed me to do more fun stuff, like writing and doing the odd video.

As usual I’ll mention some of the other anniversaries that will happen throughout this year.

  • In July I will hit the big five zero.
  • 24 years working with Oracle technology in August. (August 1995)
  • 19 years doing my website in July. (Original name: 03 July 2000 or Current name: 31 August 2001)
  • 14 years blogging in June. (15 June 2005)
  • 13 years on the Oracle ACE Program. (01 April 2006)
  • A combined 2 years as an Oracle Developer Champion, now renamed to Oracle Groundbreaker Ambassador. (21 June 2017)

I thought it would be fun to do a little time travel and look at the website over the years. There were a few really bizarre things I tried out in the early days, including a Gothic horror theme, but I don’t have a record of them and the Way Back Machine only goes back to 2001. You know you are old when the Way Back Machine can’t go that far back! ๐Ÿ™‚

So skipping the first year of existence and starting in 2001 the site looked like this.


This was still using the old name before I switched to the current name and URL.

Later in 2001 I started putting the latest articles on the front page and the menu includes link to my Oracle 9i articles. Bleeding edge! ๐Ÿ™‚

Things stayed pretty similar looking until 2006, where a new column was added to the front page. I put a rating system in place for the articles, but didn’t know how to stop the search engine spiders from clicking them, so pretty much everything got something like a 2.5 star rating. I quickly removed that and salvaged what little pride I had left.

In 2010 I tried to clean up the look of the site a lot. I removed the left had menu bar and used tabs and quick links instead. I think this was the beginning of the site looking a little more like it does today.

In 2011 I got a bit sick of the washed out colours and increased the contrast. The basic layout is the same though.

Things stayed pretty much the same until 2015, when I switched the site over to use Bootstrap 3. Prior to this I was forever tweaking things for browser compatibility, and having a responsive design was way beyond my meagre web skills. Bootstrap solved loads of problems for me.

The upgrade to Bootstrap 4 a few days ago made some slight changes, but I’m guessing hardly anyone would notice.

This time next year, the site will look … exactly the same. ๐Ÿ™‚

Cheers

Tim…

General Website News

Hopefully you won’t have noticed, but there have been a few changes to the website over the last week.

I started the process of moving to Bootstrap 4 and FontAwesome 5 when they were released, but kind-of lost momentum. This stuff is a “necessary evil”, rather than something I’m actively interested in. A couple of early trials proved it wasn’t just a case of using the new versions. I had got about 90% of the way there, but couldn’t force myself to complete the last bit.

Recently I had some advice from a couple of people at work who know more about this sort of thing than me. They quickly pointed out some glaringly obvious flaws in what I was doing, which focused me somewhat. I finally bit the bullet over the weekend and flipped to the new versions. There were a few “interesting” things along the way, including me forgetting to style CODE and PRE tags, which are kind-of important for a website that is almost entirely about code samples. ๐Ÿ™‚

I’m sure there will be tweaks over the coming weeks, but I think it’s sorted now. I’m guessing if I hadn’t mentioned it, most people wouldn’t know it had happened. ๐Ÿ™‚

Much as this stuff is “not my thing”, but it is good to keep an eye on how things change over time. I now know enough to know I don’t know enough though… ๐Ÿ™‚

Cheers

Tim…

2018 : A Year in Review

What a strange year this has been for me from a technology perspective!

The Good

Lots of good things have happened over the year.

  • I did presentations at 15 separate tech events, as well as a talk to students at a local university. I do some talks at work too, but you can’t really count that. Even though I had some drama at some of the conferences, the presentations went well for the most part.
  • I was one of a group of people named as an “Oracle Code One Star” at Oracle Code One 2018, based on the speaker evaluations from last year’s Java One conference.
  • I got a Lifetime Achievement Award at UKOUG Tech18. This sounds a bit like being put out to pasture, but it’s just another speaker award based on the speaker evaluations from UKOUG Tech 17. You can only win three awards, so your third is called a lifetime achievement award, and you aren’t allowed in the race in following years.
  • I wrote over 150 blog posts, which averages at about one every 2.5 days. That sounds like a lot, considering I feel like I’ve not had much time to write this year.
  • I wrote over 90 articles for the website, which is more than one every 4 days. That also sounds like a lot. I just checked and in the last 18.5 years I’ve averaged more than one article a week. Crazy.
  • I’ve been putting a bunch of stuff on GitHub. It’s all stuff I’m messing with, as opposed to “real projects”, but it feels nice.

The Bad and the Ugly

Followers of the blog know this has been a tough year for me, because I keep moaning about it in posts like this.

When I’m travelling I pretty much write a daily diary on the blog, which reads like, “Which country did Tim puke in today?” I can’t have another year like this year.

Work has been hard this year, and will continue to be for the foreseeable future. I feel like I’m trapped in an abusive relationship with work. There are some big projects happening over the coming year and cruising is not an option. I’m not really sure how I’m going to cope. Time will tell I guess.

Next Year

Not resolutions as such, but some things I am thinking about for next year.

  • I’ve got to sort out my crappy lifestyle a bit. I’ve let everything just go to wrack and ruin this year and it shows both mentally and physically. I’m convinced it’s a big factor in the way this year has gone. I’m not going to make any rash promises, because I know me, but if I can just tune in again things might get better.
  • I’ve turned down a few conferences already for 2019. I will still be doing some, but I’m not sure how many. My confidence has hit rock-bottom and I just need something to dig me out of this funk. I tried to muscle through it this year, and it’s caused more harm than good.
  • It would be nice to do some YouTube videos again. I keep meaning to, but similar to the conference presentations, I’ve lost my mojo. I have no goals as far as numbers are concerned, but it would be nice to think this time next year I can say I’ve done some. At the moment, I’m enjoying putting together Fortnite game play videos for nephew #2 and nephew #1 has started to use my GoPro to record his downhill mountain biking, so I’ve done the first of what might be many of those for him.
  • As far as the website goes, it’s more of the same. Having some time over Christmas has allowed me to do some more learning and writing and I just feel more positive about things. It feels like getting back to my roots.
  • Work? It’s the classic case of you can work hard, or you can work long, but you can’t do both. Like a number of other people the days are getting longer and longer, but the backlog is not getting any shorter. I’ve just got to push the keyboard away and leave. It will all be there in the morning and I’ll be in a better position to deal with it.

Happy New Year everyone!

Cheers

Tim…

It’s not all about you!

I want to start with a couple of examples.

A few years ago Oracle released the Exadata Express Cloud Service and I really didn’t get it. I mean I knew what it was, a managed cloud service based on a PDB on an Exadata, but I just couldn’t see it being of any use to me. Of course, big mouth that I am, I said as much. Then other people in the room that weren’t DBAs started showing some interest in the service and I thought to myself, “Oh, it’s not all about you!” ๐Ÿ™‚

I had a similar experience about something mentioned during the ACE briefing yesterday. A specific feature that may or may not be discussed at OOW18 was presented to us. Many of the DBAs in the room got super intense about it, and I could feel myself making lists of possible problems and questions I needed to ask, then Simon sitting next to me said something like, that sounds really powerful. Once again I had brought all my baggage with me and couldn’t give things a fair hearing. I was already making judgements before I had even heard all the facts and seen it in action. What’s more, even if I decided it wasn’t for me, that doesn’t mean it’s true for everyone else.

As you may know,ย Oracle Database 18c XE has been released. The news was greeted by a number of different reactions. Some were excited about the release, while some were concerned about some of the “missing bits”. I understand where they are coming from, because I am often in this position also, but I wrote a tweet that said,

“People who use XE:

– People who want a smallish and functional Oracle DB for free in production.

– People learning, teaching, training. Options would be nice, but not essential.

– Professionals who have access to EE+Options, and want XE to have everything. :)”

I hope people didn’t take offence to that, because as I’ve explained before I also fall into this trap too. I agree there will be use cases that are affected by what is, and is not in this edition, but maybe those are not applicable to everyone?

You will see a bunch of stuff announced at OOW18 and Code One this week. Before you go off the deep end, ask yourself if it is actually intended for a user like you, and if you think there is a section of the market that will welcome it, even if you don’t?

Having said all that, I reserve the right to fly off the handle at stuff and completely ignore my own advice… Do as I say, not as I do. ๐Ÿ™‚

Cheers

Tim…

PS. It is all about me really! ๐Ÿ™‚

Stolen Articles : Why do you make such a big deal about it?

If you’ve followed me for any amount of time, you will know I get pretty uptight about people stealing my stuff. When I point it out I will often get some comeback from people asking why I make such a fuss about it. Here’s why.

Let me start by saying I am not delusional about what I do. I don’t think any one article in isolation is so special compared to all the other stuff out there. There are a lot of people that do what I do. It’s hard to be objective about yourself, but I think I have a few things going for me.

  • I’m pretty good at deciding what not to include in an article. Despite what a lot of people say, the Oracle documentation is good. The problem is there is much more detail than most people need for their day-to-day job. I think what I do pretty well is remove a lot of the extra stuff and make it seem less daunting, whilst giving links to the docs for those that want to dig deeper.
  • I try to include small simple copy/paste examples to demonstrate what I am saying. This is completely down to the influence of people like Tom Kyte. I did not invent this style.
  • I keep revising articles to try to improve them. It is rare something on the website goes live and is never touched again.
  • Other people have come and gone. I’ve consistently invested in my skill set (23+ years) and my website (18+ years).

Every article is what I (Tim Hall) think is important about the feature. Every blog post is my (Tim Hall’s) perspective on the issue. There is a bit of me, for better or for worse, in everything that goes out there.ย Over the years there have been plenty of people who have offered to write for me. I could easily have, and probably should have, turned this into a site that required almost none of my time, had a bigger scope and probably made a lot of money. Instead it is just me and what I’ve created.

I guess the best analogy would be the difference between someone stealing a car you’ve bought, compared with someone stealing a car you’ve spent years restoring. Both are bad, but the second one is gonna feel a lot worse as it feels personal.

With all that in mind, when someone takes something I’ve spent my time to produce and in a few seconds publishes it on their website I get pretty angry.ย Despite what you might think, I don’t mention every incident. Most get dealt with in private, but occasionally I go supernova and take to twitter. ๐Ÿ™‚

So that’s it. That’s why you sometimes see me go ballistic over someone nicking some crappy article. ๐Ÿ™‚

Cheers

Tim…

Debugging Code : Problem Solving Revisited

A couple of incidents/discussions happened recently that made me think about this topic again. Here are some random thoughts on a subject that should definitely not be approached in a random manner. ๐Ÿ™‚

Systematic Approaches Pay Off

I know it is really boring, but a systematic and meticulous approach will always yield better results than randomly jumping at stuff. I’ve discussed this before here.

It’s easy to become focused on what *you know* is the problem, just because of a gut feeling, without any supporting evidence. When you eventually find the real issue, you feel a bit stupid for looking at the wrong thing for so long.

Sometimes you end up focusing on the symptom, not the root cause. If I do this it all works again. Great! Then the same problem happens the next day. Before you know it you have a bunch of voodoo operational tasks to keep the system running, with nobody knowing how and why it works.

It really does pay to take a scientific approach to fixing things.

A Leap of Faith

Over time you get to spot patterns, which will sometimes allow you to jump straight to the root cause of a problem without doing the necessary legwork. There is no problem doing this, provided you are willing to accept it won’t always pay off, and you don’t become controlled by your hunches. You have to know when to accept your hunch could be wrong, and take a step back to a more meticulous approach.

This is not a contradiction of the first point. It’s something that you will learn to do because of prolonged use of a systematic approach. Be careful when working with more experienced people, as it is easy to believe their seemingly random approach to problem solving is just that. Random.

I mentioned this here.

Instrument Everything

I can’t emphasise enough how important instrumentation is.

You should be able to determine what went wrong just by looking at the instrumentation, without having to know or look at the code. In my opinion if you are doing it correctly, non-developers should be able to figure it out from your instrumentation.

We have a perfect example of this in Oracle. I have never seen any source code for the database, but I can diagnose and fix issues by using the instrumentation built into that code. Things like SQL Trace,ย  Real-Time SQL Monitoring, ASH, AWR, ADDM are all possible because of instrumentation in the code.

The problem with Googling solutions is you often see cut-down code examples, which can promote bad programming practices. I have almost no instrumentation in the examples on my website. That’s because I’m trying to keep them small and lightweight. I don’t want you to have to install a bunch of tracing, logging and unit testing packages before you paste in a 10 line bit of example code. That doesn’t mean those things are not important in your real solutions. It’s all about context.

A Fresh Pair of Eyes

Your brain is a weird thing. You work on something and get nowhere. You walk away and do something completely different and you get a flash of inspiration. All that time your brain has been churning it over and come up with the solution. Sometimes walking away is enough to solve the problem.

You can also call someone in to help you. Talking through the problem can help for a couple of reasons.

  1. They don’t have the mental baggage you have, so they might spot something obvious you are refusing to see. ๐Ÿ™‚
  2. In explaining the issue to them, you are ordering your thoughts and effectively explaining it to yourself. The net result is you sometimes answer the question for yourself. This is one of the reasons why you should learn to ask questions properly, especially on forums. In formulating the proper question, you may answer the question for yourself.

I wrote about the second point here.

Cheers

Tim…

Living the Dream

I was watching a rerun of X Factor at my brother’s house at the weekend. Most of the time I was wincing at all the bum notes sung by the people the judges were saying were fantastic, or wincing at everyone who was doing it for their { mom | dad | grandma | grandad | dead parrot } in an attempt to get me emotionally invested.ย Apart from all that cringe, the other thing I noticed was people saying things like,

“This is my dream!”

This really gets on my nerves because invariably they’ve done nothing to make their dream become a reality, other than turn up to audition on the day. They haven’t put in the hours practising their craft. They’ve not gone out looking for constructive criticism, then using that to improve. They’ve not tried to get some training to perfect their skills. They’ve just turned up thinking that singing a bunch of off key runs will make everyone think they are Mariah.

Getting good at anything takes time and effort. If you enjoy it, you might not notice how much effort you’ve put in, but that doesn’t negate the effort you’ve put in.ย We always hear people speaking about natural talent, but invariably you see those “winners” put in the effort, as well as having natural gifts.

I remember hearing someone saying you should praise effort, not results. From my experience, life is a grind and the people who succeed are the people that are prepared to work hard. Natural talent doesn’t go that far in life.

Next time you hear someone talk about “their dream”, ask them what they’ve done to make it a reality. If they’ve done nothing, I suggest you tell them they are full of shit and need to get off their lazy ass and make it a reality!

Cheers

Tim…

Facebook : My Recent Experience

Here’s a little story of what has happened to me recently on Facebook.

First a little history lesson. For a long time I had an extremely small list of friends on Facebook. I would only accept friend requests from people I really knew, like IRL friends and a few work colleagues. That was it. No Oracle people were allowed… The wife has a rule that only people she would let stay in her house are friends on Facebook. Nobody is allowed in my house, so my definition had to be a little different than that.

Some time ago I changed my stance on Facebook friends and started to accept other people, mostly assigning them to the “Restricted” list, and so it went on for some time.

Recently I tweeted that I was getting a lot of friend requests and wondered what was going on. I figured I have a lot of readers, so it’s natural people would reach out, and I didn’t think to much about it.ย After a while I started to get some really odd things happen, so I did a little digging and found some rather “interesting” people in my friend list. I don’t really want to say more about it than that.

The long and short of it was I decided to remove several thousand friends and I’ve returned to something close to my original policy. I’m sorry if you are a decent person and feel offended that I have unfriended you, but if I don’t really know you, that’s the way it is.

By the way, Facebook used to let you mass delete friends, but that is no longer possible. What’s more, if you delete a lot of them at once they lock certain features of your account. I had to write to Facebook to explain what I was doing and why before they would let me unfriend people again. I know it’s an automatic check for suspicious behaviour, but it would be nice if they spent more effort checking what people are saying and doing on their platform…

Cheers

Tim…