Programmer’s problem: EXPECT EXCEPTIONS OR EXEMPT EXCEPTIONS?
Image courtesy : https://bryanavery.co.uk/how-slow-are-exceptions/

Programmer’s problem: EXPECT EXCEPTIONS OR EXEMPT EXCEPTIONS?

Let me classify computer software in two buckets

1.        Controlled: All components of entire system are known and contract bound – they know each other to pass or refer information or synthesize inputs to each other.

2.        Open: Where software is “lent” or “provided” either in market place or in cloud without knowing who or how it is going to be used.

One argument – At the least in controlled environment, exceptions are programming errors and therefore such exceptions should never occur in the code ever. Only systemic errors such as OutOfMemoryError, StackOverflowError, must be coupled with published error codes, compensating actions and notifications for “right” restart points in process must follow.

Programming errors occurs when

·         Developers did not test full range of possibilities.

·         Failed to install a “compensating” action.

·         Program operated beyond a “contract”

·         poor/ungoverned interfaces are at play.

Counter argument – User retrial initiation is a UX offence and denial of service. Exceptions are code level adjustments and are internal. As long as business workflows are not affected, exception management in the code is a must and normal.

Honestly, I could not resolve the “code purism” versus “Business Continuity” paradigms. Both have their place under the sun.

Instead, I stared at possibilities of code control on very common exceptions in Java and Python (this is for illustration and not exhaustive):

Article content
Some illustrative Exceptions


After sieving through nearly 30 of them, I did not find a compelling case to hold developers guilty. This is what generally happens : Either their vision was not beyond the present code or they imagined much more than the reality. I found the onus on Software Architects instead.

If the “architecture quantum” is defined right, if the “fitting functions” on quality of interfaces and coupling are robust, if “functional cohesion” is ensured by a good inter component contract, if “guarantee of delivery” from a unit program is adhered, if the organizational “Condition axioms” shadow the policies the business continuity is coded already.

BTW – the jargons in parenthesis in the sentence above, do have elaborate meaning and responsibilities in software Architecture.

Many of my contacts said they never understood what architects do really. That is one way of describing what software architects do or should do?  Very well.

Then I am continuing to wonder on “open” software…..I don’t know if documentation should cover the possibilities, or common sense prevails or loose-trust-on-problem-discovery-on-the-run is alright..or keep the functionality so minimal, that modular function does what is just expected? No answers yet.

To view or add a comment, sign in

More articles by BHARATH HEGDE

  • Loud thinking - How do we help ourselves?

    In my profession of knowledge services, I am deeply engaged with software professionals, students and teachers. These…

  • Can some one bell the cat please?

    One of my learned friends argued on what AI can’t do (not yet) – True multi-tasking, make judgements (ethical and…

  • JSON to TOON: Is that the end?

    I stumbled upon an article that declared “JSON is dead” and “TOON” is in. Yet another pencil hit the wall – not because…

  • WE ARE LIVE ON FAROPORT.TECH

    I am living my dream. Graduated on Aug 15th, started IT career on Aug 15th, now I am launching knowledge Services on…

    11 Comments
  • A HUMBLE START TODAY.

    We want to deliver value, we want to build a community of domain experts. No fancy, no frill, no visual hyper life.

  • Quantum computing: Loud rambling is all I can do.

    The first time I heard about Quantum computing, I was worried on one aspect – Should we unlearn binary based computer…

  • IS PERSISTING WITH NAURAL INTELLIGENCE NOT INTELLIGENT?

    I admit there is a difference between embracing changes and embracing changes for a purpose. While the world is…

  • ANNOUNCING

    🎓 Kickstart Your Journey to become a Software Architect Foundation-Level Training: Primer for Software Architecture 📍…

  • (Potentially) Unsolved Architecture problem: Data consistency is not guaranteed in multi storage data systems.

    My version of data consistency is in two parts: Read consistency: All data system users “read” the same copy of…

    3 Comments
  • Is your software Architecture Modern?

    If your software is meeting all the business needs and works flawless on technical parameters, shouldn’t you question…

Others also viewed

Explore content categories