Coding Therapy for Software Developers

Similar documents
Best Practices For PL/SQL Development in Oracle Application Express

Automated Testing Options for PL/SQL Steven Feuerstein PL/SQL Evangelist, Quest Software

Best Practices for Dynamic SQL

Small Business Owners: How You Can-and Must-Protect Your Business From The IRS If You Have Payroll Tax Problems!

OPP ODTUG Kaleidoscope. An ODTUG SP* Oracle PL/SQL Programming Conference. WOW-Wide Open World, Wide Open Web!

Practical Online Filesystem Checking and Repair

Outlook Today. Microsoft Outlook a different way to look at E. By Microsoft.com

RECOVERY ALTERNATIVES

What are Your Favorite Lies?

How To Increase Your Odds Of Winning Scratch-Off Lottery Tickets!

Error Management in Oracle PL/SQL

BETTER YOUR CREDIT PROFILE

Scientific Method for Kids Scientific Method Steps Made Simple

Math: Study Skills, Note Taking Skills, And Test Taking Strategies

Understanding The Top 3 Questions To Ask Private Health Care Providers To Ensure You Get The Coverage You REALLY Need!

Twelve Signs of Your Awakening Divinity

Changes to special educational needs and disability support

Support and Resistance: Trading by Reading a Market

PRIMER ON THE SOCIAL SECURITY SYSTEM

Back to School: Working with Teachers and Schools

A Parents' Guide to ConnectSafely.org

Making the Most of Oracle PL/SQL Error Management Features

The way we do business.

SIX REASONS TO HAVE A LIVING TRUST

Sometimes people live in homes where a parent or other family member drinks too

Most people do not listen with the intent to understand; they listen with the intent to reply.

Effective Performance Appraisals

Young people and drugs

Helping You Choose a Counselor or Therapist

Ben Tiggelaar about change and personal growth

The Challenge of Helping Adults Learn: Principles for Teaching Technical Information to Adults

Audience: Audience: Tim Sain: Audience:

Guidelines for successful Website Design:

56 Key Profit Building Lessons I Learned from Jay Abraham s MasterMind Marketing Training.

1. Overconfidence {health care discussion at JD s} 2. Biased Judgments. 3. Herding. 4. Loss Aversion

National Cybersecurity Awareness Campaign. Kids Presentation

Income For Life Introduction


Utah Divorce Survival Kit

Subversion Integration for Visual Studio

The Importance of Goal Setting When Starting Your Own Online Business

Goal Setting & Work. Shasta County Health and Human Services Agency Department of Social Services CalWORKs Employment Services Program

TIME MANAGEMENT by Dr. Ben S. Graham, Jr. The Ben Graham Corporation

THE 7 HABITS OF HIGHLY EFFECTIVE PEOPLE HABIT 1 : BE PROACTIVE

Business Development - Know Your Prospects Are Aware of a Problem

6. Always pay something: Even if you can't pay all of your bills in full, always make the minimum payment by the due date.

REWARD System For Even Money Bet in Roulette By Izak Matatya

A Planning Guide and Practical Workbook for those interested in developing life goals and achieving their dreams.

Finding Balance in Your Grieving. Dr. Jo Christner, Psy.D. The death of your spouse most likely turned your whole world upside down

Telemarketing Scripting Information

Advice for Recommenders: How to write an effective Letter of Recommendation for applicants to the Stanford MBA Program

H I V. and Insurance YOUR LEGAL RIGHTS HIV AND INSURANCE 1

Seven Things You Must Know Before Hiring a Real Estate Agent


Skill # 3: Ice Breakers: Rejection Free Approaching

Self-help guide to recovery for Chronic Fatigue Syndrome and Fibromyalgia

Click on the sections below to take you straight to the specific area you wish to view without scrolling all the way through the document...

u n i t f i v e Credit: Buy Now, Pay Later To use credit wisely you need to know oming soon to a what s really

How to create a compelling telephone script

Small Staff Scheduling for Convenience Stores

Interview With A Teen. Great Family. Outstanding Education. Heroine Addict

Are you feeling... Tired, Sad, Angry, Irritable, Hopeless?

Seven Things You Must Know Before Hiring a Real Estate Agent

Surviving A Relationship Break-Up - Top 20 Strategies

CREATE TAX ADVANTAGED RETIREMENT INCOME YOU CAN T OUTLIVE. create tax advantaged retirement income you can t outlive

Six Major Mistakes To Avoid When Choosing an Estate Planning Attorney

Organizing Your Finances After Your Spouse Has Died

Financial Planning in Your 20s and 30s

Managing Psychosocial and Family Distress after Cancer Treatment

Advising mothers on management of diarrhoea in the home

CHILDREN'S SELF-ESTEEM

Supporting your child after a burn injury

I've got a quick question for you

Making Money Your Friend

WHITE PAPER. Three Keys to a Better Managed Service Provider. Business

Life insurance. Shedding light on. a practical guide to helping you achieve a lifetime of financial security

Have Information to Make the Right Decisions!

Hand, Head and Heart Exercise

Inductive Reasoning Page 1 of 7. Inductive Reasoning

Personal Information This Wellness Recovery Action Plan belongs to: Name Address City State Zip Telephone Special instructions

USVH Disease of the Week #1: Posttraumatic Stress Disorder (PTSD)

Is what you know about INSULIN PUMP THERAPY. This educational resource is provided by Medtronic MiniMed, Inc.

THE TOP 5 ONLINE MARKETING MISTAKES

The Option Profit Formula

Bullet Proof Your PL/SQL

0:00:18 Todd: 0:00:30 Kim: 0:01:15 Todd: 0:02:10 Kim: 0:04:10 Todd:

Atlanta Center For Positive Change Karen Kallis, M.Ed., LAPC, NCC 333 Sandy Springs Circle, Atlanta, GA 30328

Painkiller Addiction Oxycontin Detox Oxycodone Treatment Vicodin Rehab Centers

Bank $21,000 a month with CPA

Recovery for Family Members

TIME MANAGEMENT FOR COLLEGE STUDENTS

The Prudential Insurance Company of America. Long-Term Care Insurance. Questions. concerning long-term care insurance

How to make more money in forex trading W. R. Booker & Co. All rights reserved worldwide, forever and ever and ever.

CALL US Free Report on How To Choose a Personal Trainer. This is an educational service provided to you by The GYM

PRE-TOURNAMENT INTERVIEW TRANSCRIPT: Tuesday, January 27, 2015

How To Make A Presentation In Powerpoint

Though not a pleasant thought it's important to think about this: when you die, who will you leave behind?

Depression Support Resources: Telephonic/Care Management Follow-up

WELCOME! LETS BEGIN. James Marchant Founder of Diligence Digital

7 Secrets To Websites That Sell. By Alex Nelson

Transcription:

Coding Therapy for Software Developers Steven Feuerstein PL/SQL Evangelist, Dell steven@stevenfeuerstein.com

I am not making light of therapy Therapy can be a very important and meaningful process for healing pain and distress. Oracle PL/SQL Programming I am not mocking real therapy nor do I suggest that my session today can substitute for a session with a real therapist. But perhaps I can help you with a few coderelated issues... Copyright 2013 Feuerstein and Associates Page 2

First, the Greatest Therapy of All. Grandchildren! Meet Loey. Copyright 2013 Feuerstein and Associates Page 3

Why might therapy help developers? Sure, some software is generated. But almost all software continues to be written directly by human beings. Software construction is a wholly intellectual endeavor. That is, to write software we rely almost exclusively on our brains. Consequently, human physiology and psychology play an enormous role in how software is written - and miswritten. Copyright 2013 Feuerstein and Associates Page 4

Coding Therapies for Today Game Therapy Learning through fun Dream Therapy Let your subconscious do the "heavy lifting." Confessional Therapy Don't be afraid to ask for help. Shock Therapy SQL is not your best friend. Couples Therapy Developer and Database Administrator Developer and Manager And. Species Therapy! Copyright 2013 Feuerstein and Associates Page 5

Game Therapy Games can be quite helpful in the learning process. We like to compete (even if only against ourselves), have fun, win prizes. Mastermind Classic of deductive logic Will improve your debugging skills Set (www.setgame.com) Pattern analysis and resolution Will generally improve your development skills and quality of code. PL/SQL Challenge Best of both worlds. Games + PL/SQL Copyright 2013 Feuerstein and Associates Page 6

Dream therapy for developers The worst way to deal with a problem is to worry at it (for hours or days). Sometimes conscious attention only makes it harder to find the solution. Maybe you should sleep on it, instead. There's a good chance that when you wake up the answer will be waiting in your conscious "in box." Copyright 2013 Feuerstein and Associates Page 7

Change the Body, Change the Mind Change what your body does, and you change how your mind works. If you can't go to bed and you're stuck on a problem, then... Take a walk, run around the block, do some stretches or sit-ups, anything but stare at your screen. Best of all: leave the sterile environment of computers and get out into the world. We spend almost all of our time completely, physically disconnected from our own planet. Oracle PL/SQL Programming Copyright 2013 Feuerstein and Associates Page 8

Confessional Therapy "Predators look for signs of illness or weakness when choosing their prey, so a prey animal needs to appear healthy, or it will be a sure target. By the time they are showing signs of disease, in many instances, the birds have become too weak to be able to disguise it." - From peteducation.com Our evolved survival instinct urges us to hide weakness. On top of that, we software developers are supposed to be really smart. We are the wizards of modern society. Unfortunately, ignorance leads directly to bugs and sub-optimal code. Copyright 2013 Feuerstein and Associates Page 9

It's OK to say "I don't know. Help me!" Just thinking about asking for help will often do the trick. Most people like to be asked to help. It makes them feel valued. It strengthens the team as a whole. It may not really matter who you ask for help. If there are no programmers handy, ask your spouse or parent or child to be a sounding board. Or write an email. By the time you finish writing it, you will likely have found the answer to your problem. The important thing is to get the issue out of your head. Copyright 2013 Feuerstein and Associates Page 10

Follow the Thirty Minute Rule We are usually too deeply inside (and part of) the problem to step back and take a fresh look. If you can't fix a bug in 30 minutes, ask for help. For "trivial" bugs, "give up" after just a few minutes! Senior developers and managers must take the lead. Ask more junior members for help. Show that you are fallible, that you can learn from anyone and everyone. Copyright 2013 Feuerstein and Associates Page 11

Shock Therapy Sometimes you need to be given a shock to be able to break out of your ruts, and gain a new perspective on your life. Same with software. Consider some of the things we say about. It's so easy to write SQL in PL/SQL! This INSERT will never raise a DUP_VAL error. Oracle will optimize it all for me automagically. SQL No one else will ever need to write a SQL statement like this. Copyright 2013 Feuerstein and Associates Page 12

What? No SQL for PL/SQL developers? Well.sort of. You should avoid writing SQL statements all over your application. Every SQL statement you write is a hard-coding. And a more dangerous, problematic hard-coding than hard-coded literals. You shouldn't repeat "170546" and you shouldn't repeat "SELECT * FROM..." Yes, I know: shocking! Copyright 2013 Feuerstein and Associates Page 13

What's a PL/SQL developer to do? Oracle PL/SQL Programming Create a separate data access layer, an API. Instead of writing SQL statements, call functions and procedures that do the work for you (SQL as a service)... Hiding your implementation (it will change) Strengthening your error handling (you only write it or generate it once) Increasing your productivity. Look for ways to generate as much of this code as you can. 11g_emplu.pkg Copyright 2013 Feuerstein and Associates Page 14

More shocks to the system... You should consider every hard-coded VARCHAR2(N) declaration to be a bug. Unless it's the "single point of definition." DECLARE l_full_name VARCHAR2(100) := first_name_in ' ' last_name_in; l_big_string VARCHAR2(32767); Three bugs! What should you do instead? Use %TYPE, %ROWTYPE and SUBTYPEs. DECLARE l_full_name employees_rp.full_name_t := employees_rp.full_name (first_name_in, last_name_in); l_big_string plsql_limits.maxvarchar2_t; plsql_limits.pks explimpl.pkg Copyright 2013 Feuerstein and Associates Page 15

Couples Therapy: Developer and DBA Can't we all just get along? Apparently not... Developer: "Why can't I just [ add that column drop that table mess things up ] whenever I want?" DBA: "Add an index? Ha! First, tune your code." Stay on good terms with your DBA. Let's face it; a DBA has lots more responsibility and privileges (which translate to "power" in a database). You can't win a battle with a DBA. Application development should be a collaborative process. Copyright 2013 Feuerstein and Associates Page 16

Developer and DBA: a close collaboration is best As you change the way you write your code, you should notify your DBA. Start to work with collections? Notify! Using FORALL and BULK COLLECT? Notify! Discovered Oracle11g function result cache? Notify! Ask (negotiate) for the resources you need to analyze code impact yourself. For example, with access to just a handful of V$ views, you can monitor PGA memory utilization of your PL/SQL code. plsql_memory.pkg grantv$.sql 11g_frc*.* Copyright 2013 Feuerstein and Associates Page 17

Couples Therapy: Developer and Manager Are you satisfied with the way your manager communicates with you? Which of these does your manager ask: How can I help you get your job done? How maintainable is your code? When will you be done? How thoroughly have you tested your code? Can you make it go faster? Did you follow the coding standards? Copyright 2013 Feuerstein and Associates Page 18

Developer and Manager: Pretense is Critical Seems like some managers need to know that you, the developer, know "who's boss." Even though, really, the only point of a manager is to help you succeed (after all, who does the real work?). So avoid direct challenges to authority and instead... Copyright 2013 Feuerstein and Associates Page 19

"Thank You For Being a Great Manager!" Buy your manager a copy of Peopleware as a thank you gift. A classic text for building dev teams Ask frequently for help, advice and direction. "How can I improve my testing?" Ask for standards and mechanisms to verify that you are following them. Standards improve your quality of programming life. Copyright 2013 Feuerstein and Associates Page 20

Species Therapy Humanity, most notably the "civilized" version, is a slow-motion extinction event, the 6 th in Earth's history. Goodbye bees, coral, bats, diversity All for the sake of our comfort and convenience. But don't worry! We'll just build spaceships and find another planet! Copyright 2013 Feuerstein and Associates Page 21

It's probably too late, but We need to get over ourselves. Reduce Recycling is OK,but it is post-consumer. What a surprise! Better to reduce the burden you/we place on the world. Repair We have done grave damage. But there are lot of "hands" out there to fix things. My focus: invasive species. Copyright 2013 Feuerstein and Associates Page 22

Coding Therapy: You can't escape your own brain and you can't escape your body. Our brains' physiology and psychology have an unavoidable and large impact on the way we write code. Don't fight it; instead, understand it, accept it, adapt to it. You will be happier and your code will be better. Copyright 2013 Feuerstein and Associates Page 23