DEV Community

Cover image for What is the importance of committing mistakes?

What is the importance of committing mistakes?

Ilona Codes on March 02, 2019

It is a well-known fact that all human beings are different and unique in their ways. However, no matter how unique and different we are from one a...
Collapse
 
tomekbuszewski profile image
Tomasz Buszewski

Hi Ilona,

I make mistakes on a daily basis. Sometimes they are simple and easy to fix, like a typo or some minor change that breaks one integration test I haven't even knew about. But I like to find these and fix them before they go to our repository. Not because I don't want to "lose my face" or come as a plain idiot, but because this can pollute my colleagues work. If the error is small enough, it can sneak to the master branch and spread (for example, some will build upon that, thinking that this is fully functional piece of code – picked from master, all after all).

The most important thing on making mistakes it not to be ashamed of it.

And to answer your question, I once merged a very early-stage version migration (from v1 to v2) to master. And, since we got a CI/CD, it went to prod immediately. We were fixing this (mostly my colleagues, as this was 95% backend stuff) until 1 or 2 after midnight.

Collapse
 
jacksonelfers profile image
Jackson Elfers

I didn't get the impression she was talking about git commits although that's what I jump to as well when I see the word "commit". I suppose that's why we have git to avoid the chaos associated with collaboration and human error.

Collapse
 
ilonacodes profile image
Ilona Codes

Exactly ✌️

Collapse
 
ilonacodes profile image
Ilona Codes

Thank you for your story πŸ™ It's really impressive! And now I cannot say that the described situations were failures. Definitely no! It's EXPERIENCE.

Collapse
 
jacksonelfers profile image
Jackson Elfers

What's really fun is when you commit your environment variables to github. Or accidently delete part of a database "DELETE FROM inventory". Mistakes are part of the game but we can mitigate it in different ways.

Collapse
 
ilonacodes profile image
Ilona Codes • Edited

I guess, these situations are usual for beginners in IT and it's okay and not the end of the world: env variables can be "gitignored" or removed from the repo, and for a database, devs should always have backups πŸ™‚

Collapse
 
jacksonelfers profile image
Jackson Elfers

I've definitely done both of these things, fortunately not with anything major. 😁 The frustrating part of committing env files is that they'll remain in the commit logs even if they're ignored later still allowing potential access through the projects history. It's like cleaning up an oil spill. 😳 Lessons learned I suppose.

Collapse
 
lakendary profile image
Jade Rickerts

I like MySQL (Workbench) when it comes to the DELETE FROM command. It won't allow you to delete without a where clause. Very annoying when you do want to delete all when you're not working with a production database.

Collapse
 
marek profile image
Marek Zaluski • Edited

I actually would advocate that it's good to make mistake on other people's codebases.

I mean: I've made lots of mistakes in my own personal projects, and had lots of bugs that I learned from.

But the mistakes where I truly learned a lot are the ones where I was working on a company's codebase on critical code and then I badly broke it.

I've had some bad moments where I broke important things that probably cost the company money. But after the momentary stress, (and especially in retrospect now that I no longer work for them) those mistakes turned out to be pretty insignificant in my overall career.

And those mistakes taught me the most.

So don't worry so much about breaking code, even if it's your employer's codebase. The more critical and important the code, the bigger the opportunity to break it and learn something!

Collapse
 
3dsn profile image
Edson Barbosa

Thats make me wonder in a philosophical way ... So in this binary world even mistakes will be parsed() to knowledge - a positive thing. No judge and no guilt. Or you will miss the hole point. Electrons run to opposite. So let it be and they will do the hard work. No one get up of the bed every and say today I will make a beaut mistake, just for fun, or even to parse it to knowledge. So let it be. Who knows one day we all wake up instead of just get up. Acceptance is very good word. Thanks Ilona for this meditation.

Collapse
 
rehmanjeff profile image
Habib ur Rehaman

My one of many mistakes i done, i ran a update script which had missing statement of "where" in sql, and it updated whole 1k records of live orders we had in 2,3 months.
Thankfully i got little old backup and data we had store in separate table, i fixed it with a script again but there i learnt that i should never run such scripts direct on live mode.

Collapse
 
macginitie profile image
Andrew MacGinitie

My biggest mistake was thinking that the way to happiness was through self indulgence

Collapse
 
ilonacodes profile image
Ilona Codes

I also thought that this way could make me happy. You were not alone πŸ˜…

Collapse
 
sesamestrong profile image
Sesamestrong

Not only do I commit mistakes, I also push them to master.