Your Manager is Putting in Jeopardy Your Programmer Job

Coding (Psicology)


VW's managers knew that cars couldn't meet American emissions standards. So they ask the engineers to update the software
 
/img/blog/your-manager-is-putting-in-jeopardy-your-programmer-job.jpeg

Why freedom to code is in danger and what you can do about it

 

8 October 2015 marks one of the darkest days for the category of software engineers.

 

On that day Michael Horn, CEO of VW’s American, hinted that we, the engineers, were willing to destroy the environment on behalf of god money.

 

But let’s start from the beginning…

 

The Volkswagen incident

 

Look around.

 

Just lift your eyes from this screen and look around for a second.

 

What do you see?

 

I can’t tell what you are watching at this moment but I can tell you with extreme precision what you are surrounded by.

 

Computers and sensors.

 

The vast majority of the things you have around you have one or even both of those inside them.

 

Cars are not different.

 

Starting with ABS, wheels, suspension, more in the differential, and for auto parking, not counting autopilot on Teslas.

 

The minimum number of sensors in a modern car is about 70, which quickly escalates to 100 or even 200 in certain models.

 

Volkswagen had a really special one.

 

This little guy in particular looked for and regulate the amount of non-burned fuel the car produced.

 

I know.

 

It sounds bad already.

 

Why should we have non-burned fuel at all?

 

Turns out that Volkswagen cars had a thing called NOx trap, that lowered the emission of Nitric oxide in the atmosphere.

 

This NOx trap worked very well when there was a higher amount of non-burned fuel.

 

The cars had a very good fuel economy but this system only worked when more non-burning fuel was being used.

 

Problem was, that this system made their cars not entirely legal in North America.

 

The solution?

 

Programmers!

 

Just 7 lines of code

 

Let’s analyze the issue,

 

The cars needed this NOx trap to lower their environmental burden, on the other hand, to do that they needed to use more non-burned fuel.

 

That is not good because by using more non-burned fuel the car won’t be able to pass the test they would attend before being allowed to be sold.

 

Not being able to sell his products is a nightmare for the CEO of any business, not to mention in a fierce industry like car manufacturers.

 

How would you solve the problem?

 

  • Go back to the drawing board?
  • Maybe decrease the engine size?

 

Well, that would not be very cost-effective, would it be?

 

Much better is to update a few lines of code instead.

 

and with PHP it only takes 7

 

if ($stearingWheelPosition === 0 && 
    $speed === 0 &&
    $engineStartedDuration < 1800
) {
    echo "this is a test!";
    $car->doTheTrick();
}

 

I am sure you can see a huge problem here,

 

Not only with the code I just wrote (that’s pseudocode please do not kill me in the comments) but with what this code means for our industry.

 

The blame

 

Trial in court
Photo by Saúl Bucio on Unsplash

 

Let me say that, yes, to be fair, the engineering team could have refused to write the code.

 

But how many would say no to a CEO of a company currently worth Eighty-Seven Billion Dollars?

$ 87,000,000,000.00

 

You got the point.

 

The real issue is what happened next.

“Programmers did that for whatever reason” — VW CEO

 

Yes.

 

That is the real quote from the CEO when he appeared before the House of Representatives Energy and Commerce Committee,

 

Some engineers were blamed for a scandal that cost the company 27.4 billion.

 

“for whatever reason”.

 

Imagine that programmer being you…

 

You sit quietly at your desk when all of a sudden you receive a Jira ticket that orders you to do something like that.

 

You do it, as part of your job and because you likely have bills to pay,

 

Then a few months after it is said on international television that you were the one who came up with that idea for “whatever reason”.

 

Getting angry?

 

Worst can happen

 

This was a scandal that luckily did not hurt anybody, other than someone’s pocket.

 

I want you to reflect on a couple of questions:

 

What will happen next time?

What if, instead of being about exhaust systems it will be about brakes or safety belts?

 

Let me share with you a piece of knowledge.

 

If you have a relatively modern car, I can assure you that there are many IF statements between your right foot and the disc brakes.

 

If someone updates these bits of code, to save some money, who will get the blame?

 

 

 

 

Doctors found a solution

 

Doctors and medical staff found a solution to this issue many years ago.

 

They self-regulate themself.

 

Doctors have created many institutional bodies around the world like the General Medical Council.

 

These regulate things such as, who can practice, what he/she requires in order to start working, etc.

 

There are many cases of incidents or mistakes doctors make on a daily basis.

 

In the majority of the case, they are protected and not liable for what happens.

 

What about engineers?

 

At this very moment, there is nothing to protect us from any kind of incident,

 

kind of the opposite.

 

If problems occur we are left behind by the very CEOs or managers that are supposed to help us.

 

We have to do something and we can start right now.

 

What is the solution?

 

TDD is our own regulation system

 

Test Driven Design is the practice of writing tests, before writing any code.

 

If that doesn’t make any sense to you you’re not alone.

 

After all, what do we test if we have not written the functionality yet?

 

Let me explain.

 

You shouldn’t use a car if there aren’t any roads to drive on,

 

The way it works is pretty straightforward.

 

As usual, you get the task’s specifications from your product manager or whoever is in your line.

 

What you do next is write tests,

 

Those have the result you expect from the endpoints or methods you are going to write.

 

Running the tests will result in a clear fail.

 

There is no code yet.

 

Then you start writing the actual implementation of the code.

 

Step by step, until the tests pass.

 

We can also use third-party software like Postman for testing our software

 

an happy engineer
Photo by ThisisEngineering RAEng on Unsplash

 

This method of coding does 2 things.

 

  1. Forces you to think beforehand about what code you must write and what result you’re expecting.
  2. If you write the tests before, there is no way your code is not covered, and high coverage is a nice thing to have.

 

The tests will also work as proof of what was assigned to you.

 

Your CEO told you to do that because that, is what is written in the tests.

 

There is no “whatever reason”.

 

What happens if we don’t regulate ourselves?

 

The answer is pretty easy to understand.

 

If we do not find a way to regulate ourselves, something really bad is going to happen.

 

Someone will create rules and regulations for us.

 

  • Do you like to code using Laravel?
  • What about ReactJs? I heard it’s very trendy at the moment
  • and Go? looks like is the future of programming

 

Nope!,

 

Someone with a button-up shirt, a horrible tie, and no experience in programming will decide what language you are allowed to use.

 

He will likely decide when to use it, and most likely what are you allowed to build.

 

That is not why I am passionate about coding and I know you neither.

 

Conclusion

 

Thanks for reading.

 

Hope this rant made you a little bit more aware of the responsibility you have as a person who creates software.

 

My goal was also to show you what can happen if some high-paid corporate person decides not to take his responsibility seriously.

 

This can happen in any company at any time.

 

The solution I suggested was initially mentioned by Uncle Bob in one of his speeches and it stuck with me.

 

I hope I did a good job in explaining the situation and tempting you to try writing tests if that is not something you already do.

 
 
If you like this content and you are hungry for some more join the Facebook's community in which we share info and news just like this one!

Other posts that might interest you

Coding (Psicology) Apr 23, 2020

Developers Quarantined (how to stay productive)

See details
Coding (Psicology) Apr 6, 2023

The Path to Becoming a Senior Software Engineer: Tips and Strategies

See details
Coding (Psicology) May 17, 2023

40 Interview Questions Every Junior Web Developer Should Know

See details
Get my free books' review to improve your skill now!
I'll do myself