Thoughtful Programming Can Save Days. But Do You Have Time For It?

 

Today I will share an experience in the effects of inflexible software, actually caused by hard work!

We use a SaaS service for our payroll process. Last month, we needed to add a salary component for selected people. We decided that instead of adding it as the pre-defined “Bonus” component, we would name it “KMBonus”.

All good till now. The payroll system allows addition of custom components. Then you download a blank Excel file and upload it back after inserting figures.

We downloaded the template which had a column for KMBonus, along with columns for every other component. This sheet was filled for KMBonus and uploaded back. It failed. No error message, nothing – the page just refreshed silently.

What was wrong? Was it a problem with file format? File size? Number formats? Did columns or sheets or anything get rearranged by mistake? This took a couple hours. When nothing worked, a support issue was filed. It was a weekend.

On Monday, support tried to understand what was wrong. After few hours, and with the file being analyzed, support figured out what was wrong – the uploaded file couldn’t have empty cells/columns while being uploaded back! So, although you wanted to update only KMBonus column, you had to either insert zero into every other cell everywhere, or delete all other columns.

First I was upset – that a simple error message, or documentation on expected file format, would have helped avoid this. Then I realized something else.

Entire payroll for hundreds of people got stuck for a couple days, because the programmer had worked hard – but harder than necessary.

Think about code structure. It would have taken more work, more effort, to put in all this validation – “Check all cells have numbers, ensure none are blank!” Sure, requirements may not have covered this case, so as a programmer I am free to do anything. But if I am free, do I do things after thinking about it – being thoughtful about work? Do I do things for the user – being thoughtful about users? Or do I do things that are just technically correct? Instead of tightening by validation, a simple conceptual foundation would have reduced the programmers’ work and rendered flexibility to user!

Imagine if the conceptual foundation had been: any blank cell means nothing is to be done. If something has a number, update component to that number. Simple.

So when you get a sheet with many cells blank, entire columns blank, ignore the blank ones. And process only the ones with numbers. Did I say simple?

Think of code. This is actually less work, is conceptually clear, and means much more to user! Smart work versus hard work. Saves days of effort for the programmer. And, in our example, a difference of days in payroll processing!

Thoughtful programming is based on common sense. Thoughtful programming reduces work. Thoughtful programming can save the day. Days.

 

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •