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…

Midlife Crisis : Tough Year So Far…

I wrote this post earlier in the year, then didn’t publish it because it felt like I was drowning in self pity, but recently I accidentally showed it during a presentation, so I thought I would put it out there… So here goes…

I dislike writing this because I lead a charmed life compared to many people, this is very much “First World Problems”, but we are half way through the year and I’m already thinking I’m cursed…

Work

Work is proving extremely challenging for me. I like to be good at stuff, but more importantly I hate being bad at stuff. At the moment I’m doing so many different things at work I feel like my day is a massive pile of mediocrity, and that is really hard on my ego.

I’m in no different a position to many DBAs and developers out there, Googling my way through life, but it’s really quite depressing. The counter to this is I can’t imagine ever being so blinkered as I used to be, back in the days when I considered myself as just an “Oracle specialist”.

This is where the difficulty lies. I don’t see a way forward that I will be happy with. These types of situation where every option comes with a set of bad outcomes fry my brain…

Conferences

There is just something that is not clicking into place for me right now. It’s not a criticism of the events or the people, it’s something to do with me. I’m really daunted in the lead up to the events and although I enjoy the events themselves and interacting with people, I come away with a massive sense of relief when they are over, and then have a bad post-event crash where I just want to stop everything and give up. The post-event crash is not a new thing, but the peaks and troughs seem more exaggerated than before.

It doesn’t matter how much prep I do, it never seems to be enough. I’ve been doing this for over 10 years and I can’t remember feeling this way before. I don’t think it’s anything to do with impostor syndrome, as that has always been there and I came to terms with it a long time ago. People who think they are great are probably too rubbish to realise how much they don’t know. 🙂 I suspect there are a number of factors feeding into this.

Oracle user group conferences are much easier for me, but over the last year I’ve been doing more events that aren’t straight Oracle events, where you don’t have a good handle on the audience before you get there. As a result these events are a lot more daunting for me. Sometimes they work. Sometimes they don’t. I guess it plays into my insecurities about presenting…

Part of the Dev Champion program is about taking you out of your comfort zone. It’s certainly done this, and I know it’s probably good for me, but it doesn’t always feel like it. 🙂

Website

Over the years the website has been the one thing I can always count on to get me out of a funk. I sit down, play with technology and write. Some of it becomes articles. Some of it gets lost in the midst of time. Either way I’ve always felt like I’m having fun when I’m doing it. It doesn’t feel like that at the moment though. The pressure of other stuff encroaching on my time means this is suffering, which in turn makes me put pressure on myself to deliver, which stops it feeling like fun…

Conclusion

So there it is. I’m having a midlife crisis. I have no plan regarding how to fix it, but convention tells me I should go out with a 19 year old gold digger (sorry Debra), buy a drop-top car and/or a motorbike and generally try to act like I’m 20, so people can discuss how sad my behaviour is and laugh about me behind my back… I’m off to do some test drives and install Tinder on my phone…

Cheers

Tim…

PS. Since writing this, but before posting it, I’ve had a conference where things have worked out OK, so I’m hoping my mindset and luck are changing…

PPS. A couple of people encouraged me to release this, because they thought it would be good for people to hear that experienced presenters have all the same problems as newbies. That is definitely true…

Rewriting Old (Crappy) Content

One of the mildly annoying things about writing articles on the internet and blogging is coming across your old articles that are utter crap. 🙂

Something happened at work yesterday and I responded to the person in question with a few quickly typed notes and thought to myself it would make a reasonable “backfill” type article for the website. Nothing interesting and new, but a useful addition for myself, so I could answer the same question in the future with a link, rather than having to type stuff.

So this morning, before I launched into the “new” article, I did a quick search on my site and that was when I found it. I had already written an article on that functionality, but what I had written couldn’t have been more off the mark if I had tried. We are talking moronic levels of wrongness.

So a few hours later and all the evidence is now gone, except for Google’s cache and the Way Back Machine. I’m not going to tell you which article it was because you will compare them and a little piece of me will die. 🙂

I’ve written about my attitude to rewriting content in my writing tips series. I spend a lot of time rewriting old content. If something is factually incorrect you owe it to potential readers to correct it. It also stops you looking like an incredible Muppet! 🙂

Perhaps this afternoon I will get to do something new for a change. 🙂

Cheers

Tim…

You gotta work harder!

If I take a long hard look at the people *I consider* successful, the main thing I notice is they consistently work hard. They have focus and they put in a lot of hours to get what they want. It doesn’t matter what area it is, you can see the same thing time and time again. The people that work hard get the results. The people that don’t typically fail, or at least don’t live up to their potential.

Here are a few quotes from some varied sources.

  • “The harder I work, the luckier I get.” Samuel Goldwyn (possibly)
  • “If you trust in yourself and believe in your dreams and follow your star you’ll still get beaten by people who spent their time working hard and learning things and weren’t so lazy.” Miss Tick (The Wee Free Men, Terry Pratchett)
  • “You want a hot body? You want a Bugatti? You want a Maserati? You better work bitch!” Britney Spears (well, her song writers really)
  • “Work so hard forgot how to vacation.” Post Malone – Congratulations

The IT industry moves so fast you’ve got to stay on the grind or you will fall behind. If you are looking for work-life balance, I don’t think this is the industry for you. That might sound harsh, but I’m not a stupid person and I freely admit to having a no-life approach to this industry and I often feel like I’m sprinting to stand still. I hate to think how people who are not putting in this level of effort feel. Maybe ignorance is bliss…

Over this holiday period I will have had 12.5 working days off and it’s already been a hard grind. I had some goals in mind, which I think I’m going to miss, but it’s not through lack of effort. I don’t really do new years resolutions anymore, but I’m going to keep saying to myself, “You gotta work harder!”

I hope 2018 works out well for everyone, but I’m pretty sure the people who will be the happiest at the end of the year will be the people who have worked the hardest, no matter what they have been working towards…

Good luck everybody!

Cheers

Tim…

Update: It is interesting that when I say work hard, some people assume I mean throw hours mindlessly at stuff. Of course you need to try and work intelligently. When I say work hard, I mean hard. That’s not cruising for endless hours. Part of working hard in my opinion is evaluating your efforts and altering your approach or goals based on that…

Having said that, you do have to throw hours at some stuff to really get to understand it. Learning is like peeling back layers of an onion. After a short time it’s easy to think you know it all. As time progresses you peel back more layers of the onion and you realise there’s even more to know. Many people seem to stop after the first couple of layers because they don’t dedicate the time, then complain about not being good and looking for the quick fixes…

It’s interesting what people consider successful. Notice in the post I said, “*I consider* successful”. We don’t all want the same thing. For you it might be to earn $1 million. For me it might be to write 10 articles on a specific subject. For someone else it might be to perfect their handstand. Depending on what you’re trying to achieve, the approach and time may be different. Don’t judge everyone else by your standards of what success means…

A Test of Common Sense

Imagine you are a couple of window cleaners and you are presented with a glass fronted building like this.

The two doors are electric and will automatically open if anyone, including yourself, approaches them from the inside or outside. Whilst answering the question below, keep in mind this is lunch time, which happens to be the busiest time of the day for people entering and leaving this building.

Which of the following approaches would you choose? (pick only one)

  1. Lock one of the doors. Clean the glass above the locked door. When the water has stopped flooding down unlock the door. Lock the second door. Clean the glass above the locked door. When the water has stopped flooding down unlock the door.
  2. Lock both doors. Clean all the glass. When the water has stopped flooding down unlock both doors.
  3. Come back another time when there aren’t hordes of people trying to get through the doors, and clean the glass using the method outlined in (1), or maybe even (2).
  4. Leave both doors unlocked. Clean the glass above both doors so water is flooding down both of them at the same time. Since you are each standing in front of the doors, they keep opening and some of the water runs into the building.

I think you can guess which one I witnessed today. I truly worry for the future of the human race!

Cheers

Tim…

Bricklayers and DBAs may share the same fate…

A few days ago I was listening to a program on the radio that was discussing the current state of the building trade in the UK.

I wasn’t paying that much attention during the start of the show as they discussed the progress in 3D printing, which is allegedly now being used to produce prefabricated panels for buildings. The suggestion being that 3D printing makes building cheaper, quicker and less labour intensive. Prefabricated buildings have been around for many years in one form or another, so that wasn’t really news, but the 3D printing bit made it sound a bit cooler… 🙂

After extolling the virtues of 3D printing, the program moved on to the impact of all this on the building trade and that’s where it got interesting. To cut a long story short they said this method of building would have a big impact on employment levels in the building trade, saying bricklayers would be a thing of the past. Allegedly the UK building trade and the associated unions are resisting this change, but finance would inevitably make this happen and then what happens to all the builders? Allegedly there is no steer from the building trade, unions or government about how we will cope with the unemployment associated with this shift in the industry, or possible retraining necessary…

You’ll notice I’ve said allegedly a lot, as I don’t know how factual this discussion was, but it was interesting all the same…

So I was sitting in the car thinking, “That sounds familiar!” 🙂 I’ve been talking about the changes in our industry a lot recently. It’s not time to panic, but it’s not sensible to stick your head in the sand and wake up one day to find you are surplus to requirement…

Cheers

Tim…

Update: With reference to a comment, in the UK houses are still predominantly brick built. Offices and high-rise is a different story. 🙂

Do you have an obligation to your audience?

There is an interesting conversation on Twitter at the moment, which in my head comes down to one simple question.

Do you have an obligation to your audience?

I’m not going to link to the conversation, and I don’t think the specific subject in question actually matters. I care more about the bigger picture.

Over the last 17+ years of being a content producer and the last 10+ years of being a presenter I’ve wrestled with this question numerous times.

Content Production

On the content production side I have split my content into two parts. Purely technical stuff goes on the website. Opinions and other random stuff go on the blog. This setup works for me because I don’t feel bad about putting anything out on the blog. In the past I used to post movie and book reviews and I was totally fine with that because the blog was more of an online diary, not a technical archive. The concepts of integrity and honesty don’t come into the purely technical material on the website because it is essentially just how-to articles, so provided they are accurate it’s all good. It’s in the opinions on the blog where integrity and honesty matter.

In my opinion, my only obligation to the audience is that I am honest. The things I say must be what I believe.

I may be naive or badly informed. If my opinion changes over time, that will no doubt be reflected in my content. It doesn’t mean I’ve lied in the past. People are allowed to change their opinions…

That is a standard I hold myself to, not necessarily what I believe others have to do. Each person has to make up their own mind and follow their own path. We do not have to agree on this.

Conference Presentations

I’m specifically talking about conference presentations here, not teaching in a class situation. That’s a whole different ball game!

Presenting is an odd thing, because on one hand you are not being paid, so you don’t owe the audience anything, but on the other hand the audience have often paid to be there, or at least are giving you their time, so you owe them the courtesy of doing the best job you can. It feels kind-of contradictory. 🙂

In my opinion, my obligations to the audience are:

  • I must care about the content.
  • I must deliver what I say I will deliver.
  • I must be honest with the audience about my level of experience in the subject.
  • I must be honest about my opinions on the subject.
  • I must be a genuine version of me, minus the swearing.

To elaborate…

I have only ever done one presentation on a subject I didn’t care about and it was soul destroying. I swore I would never do that to myself again.

Pitching a session is difficult, but as long as you delivery what you say you will and the information is accurate, it’s not your fault if people have chosen to come to “the wrong session”. Part of delivering what you say you will is to have a session of a reasonable quality. Quality is subjective and my standards may not match yours. My presentation style is quite relaxed and I’m scruffy, so some people would say I’m not very professional. If you prefer to see someone in a suit with a formal presentation style don’t come to see me. 🙂

I see a number of presenters who position themselves in a way which suggests they are experts in a specific subject, when I know they are not. I feel this is dishonest. You don’t have to be an expert to give an interesting and valuable presentation. In many cases, the newbie “transitional” sessions are more interesting as you see the problems you are likely to face along the path. I like to think I am honest about what I do and in most of my presentations I say I’m just a regular DBA/developer that writes and presents about the stuff I do.

As with the written content, I’m not going to stand on stage and say something I don’t believe. I am aware a certain section of the community believe any involvement in evangelism programs means you have been bought (see Oracle ACE = Oracle’s Bitch?). If you are of that belief, there is little I can do to convince you other than continue to be myself and hope one day you get the message.

I’ve lived long enough to know that trying to present yourself as something you are not never works out well. Sooner or later people find out the truth and you look like a fool. On stage I try to be me. I speak a little slower and I *try* not to swear as I know some people don’t like that. I don’t want to alienate the audience, but at the same time I will not pretend to be someone I am not.

Conclusion

I have a set of standards I think work for me and I am happy with. Other content producers and presenters should follow their own path and do what they believe is right. My rules are for me, not the rest of the world.

As a member of the audience, you have the right to your own opinion, but you have no right to demand something of the creator/presenter. If you like what they do, great. If not, don’t read their work and/or don’t go to their presentations. Feel free to give constructive criticism and session evaluations, but don’t be offended if it is ignored. We don’t have to agree! 🙂

Cheers

Tim…

PS. I guess I should say, I’ve probably not always lived up to these standards, but it’s a journey babe!

My Current Focus

In recent weeks I’ve been writing fewer blog posts and pushing out more technical posts. I know a lot of people don’t make the distinction, but the technical stuff goes on the main website and the bullshit opinion pieces go on this blog. 🙂

The changes to the Oracle ACE Program travel policy have had a very positive effect on me. It’s allowed me to get back to my roots, which is producing technical content for my website.

I like to present. I dislike travelling, but I like to meet different people and geek out with them. These things are fun to me, but they do represent a very big time sink. The time I spend organising a trip, prepping my presentations, travelling and recovering from the trip all adds up and it’s an extremely inefficient use of my time. Don’t get me wrong, I’m still going to do it, but the reduction in the number of events per year is welcome.

One piece of advice I give to new bloggers is to write what you want to write, rather than attempting to write for an audience. Do what you enjoy, because it’s the only way you will continue to do it. It’s funny how I’ve rolled out that advice numerous times, but I seem to have lost sight of it myself. I find writing opinion pieces so exhausting because you’re constantly trying to guard against saying the wrong thing, and in the end someone will always find a way to be offended by what you say. Technical content is so easy in comparison because it’s just facts. These last few weeks have been so much fun in comparison to the months that came before them.

In a week I’ll be leaving for Oracle OpenWorld, which is kind-of the opposite of everything I’ve said in this post, but then it’s back to the plan. More content, less bullshit.

Cheers

Tim…

PS. I reserve the right to change my mind at any time… 🙂

PPS. If opinion pieces are your thing, keep doing what you do. I love reading them. I just dislike writing them. 🙂