Being Proactive & Getting to the Triangle of Happiness

549 views 2 replies

Yes. More on testing, and probably nothing new or revolutionary either. As I’m attempting to write tests, fix stuff, and sort out some fun multi-byte character issues, I’ve realized again at how much better it is to be on a project once you reach the state of being proactive, instead of being reactive.

The problem with reactive bug-fixes/features/HOLYCRAPTHISNEEDSTOBEFIXEDRIGHTNOW/etc. is that if your codebase has any sort of, say, complex business logic – it’s likely that reactively doing updates in this fashion is going to come and bite you in the back side

 

Being able to proactively perform these updates is a state that I think applies if you have enough unit tests, functional tests, integration tests, and maybe even regression tests in order to ascertain that the new code that you’ve written doesn’t wreck anything currently deployed, and with any luck, you’ve also written some new tests that test the new code that you’re deploying. Go figure (I told you that I didn’t have anything new or revolutionary that I wanted to say

 

I spent a bit of time trying to elaborate this relationship in a pretty picture – and here it is:

 

Replies (2)

Basically, the less tests you have, the more reactive you are, and the more screwed you are. The more tests you have, the more proactive you are and the less screwed you are. This is what I shall now refer to as the Triangle of Happiness (the green one).

It’s also worth noting that the # of tests (this doesn’t necessarily mean # of tests, but could be code coverage, whatever) – is decidedly NOT a linear relationship with proactivity. Writing tests definitely reaches a law of diminishing returns. As your screwed-factor (reactivity) approaches zero, and your proactivity-factor approaches infinity – the number of tests that you have to write in order to further increase your proactivity-factor is exponential (give or take).

So, tests are crucially important so you don’t get screwed, but 100% code coverage is absolutely not cost-effective and (in my opinion) not necessary (unless maybe you’re NASA, or people die when your software sends an order of Cookies to Canada instead of California).

Like it? Share it:

 

nice one

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
Featured 15 June 2026
Senior Auditor

N. Dhawan & Co

New Delhi

CA Inter

View Details
Company
29 June 2026
Accountant (Finance & Compliance)

TRIEYEZ

Kolkata

CA

View Details
Company
ARTICLESHIP 30 June 2026
2 posts Article assistant and Articleship completed students

Chirag N Shah & Associates

Mumbai

CA Inter

View Details
Company
ARTICLESHIP 18 June 2026
Article Assistance

RB KESHRI & CO.

Mumbai

CA Inter

View Details
Company
ARTICLESHIP 20 June 2026
Articleship

RB KESHRI & CO

Mumbai

B.Com

View Details
Company
04 June 2026
Semi Qualified CA

Goyal Puneet & Associates

New Delhi

CA Final

View Details
Company
19 June 2026
Accounts Executive

Getfive Advisors Pvt. Ltd.

Ahmedabad

CA Inter

View Details
Company
ARTICLESHIP 30 June 2026
Taxation Content Writer Intern

Interactive Media Pvt Ltd.

New Delhi

CA Inter

View Details