Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 29, 2022 09:58 am GMT

f*ups that made me a better programmer

How about not spending your weekends on fixing bugs that could have been easily predicted and not rushing because you underestimated the time you will spend on a project?

Well, read about my f*ups guide to learn from my mistakes and avoid your own!

Do backups regularly

Let me tell you a story. In one of my previous jobs, I was the person responsible for making manual backups for WordPress websites. I did it every month, but one month I forgot! Guess what happened... Yeah, our website server was attacked, I didnt think it would be significant as I made backups regularly. I thought I could just upload the last version I had, but after checking the folder on the NAS server and looking for copies, I nearly had a mini heart attack! It transpired that that month, there were a lot of changes to the website. As a result, I spend two weekends making the changes and cleaning the server. I never forget to backup now!

Image description
Pro tip It is also good practice to make backups before making plugins and theme updates!

Double check the sandbox version with someone before releasing it

We have all been in a situation when a client asked for a little amendment? Something along the lines of Please, make this change quickly in the live environment, its small and wont affect anything. Its an accident waiting to happen! You agree because its a small change/fix and of course, you decide not to test in the sandbox because its 4pm on Friday and all you can think about is the weekend. What could possibly go wrong? Well everything!

It happened to me a few times in my developer career, but the story I will remember forever happened on Christmas Eve The client had asked to introduce some changes to a WordPress-based website. It wasnt complicated but there were a few changes and very little time to implement. I still remember applying changes late in the evening when all of the guys from my team were already sipping drinks at the works Christmas party. I was trying to fix one tiny change that didnt work, it became apparent that one of the elements had the !important attribute added to its style. Of course, it was a great evening and a fantastic party (I DID NOT GET TO ENJOY).

But I learned an important lesson from this - when you are pushing some changes that are not tested in the sandbox they wont usually work. Finding issues can be quick but fixing them can take a long time, that time it resulted in my weekend starting at 7pm instead of 4pm!

Image description

Now I always remember to check the fixes, changes, and features in sandbox before deploying them. It is important to ALWAYS do it, even if its a small change. Its also good practice to check the changes with someone else.

Take your time with the estimate

At the beginning of my career, when I received a project to do an estimate, I usually rushed it because I didn't want to spend a lot of time on this and of course, I didn't check the details of each element in the project.

Time for the story number 3 ;)

Image description

I was working on finishing a website project for a client. The last part of the development was adding a blog section. Before I progressed with this piece of work, the PM asked for an estimate. Well... I didnt analyse it properly nor did I ask any detailed questions. I just took a look at the designs and picked one in less than 2 minutes! During coding, it turned out that they were all supposed to have some extra features and be based on Google Analytics long story short a few questions and a couple of minutes spent on choosing the right design would have spared me a few hours of adapting the design to the website.

What did I learn from this? Always remember to take time to complete an estimation. Dont ever think; this page is very simple, just search box and a list of posts, and instead ask the questions and pick a solution carefully. You will save yourself a lot of time in the long run!

Summary

Ive shared with you a few of the f*ups Ive made over the years. I made mistakes and I am sure I will make more in the future. Its impossible to avoid them because programming is so dynamic and ever-changing. But its always better to learn from somebody elses mistakes instead of your own ;)

Let me summarise, these tips will help you avoid mistakes in the future:

  • Remember to make regular backups
  • Let somebody else check your work in a sandbox before deploying to production
  • Dont be in a rush to estimate the job, always research thoroughly
  • Dont deploy a product to production at 4pm on Friday... It will be 7am on Monday before you know it ;)
  • If you dont know something, do some proper research or ask your co-workers for advice.

Thanks for reading and I hope my f*ups help you avoid mistakes!


Original Link: https://dev.to/emphie/fups-that-made-me-a-better-programmer-4kil

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To