Stuff I wish I'd known ( before those 4 years of programming ) - part I
Tags: tutorial, productivity, career
Published: 2022-03-27 14:49:50



Hello world 😊
After 4 years of building and maintaining software products,  I decided to share a list of stuffs I would like to have known at the time I started programming ^^ 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ahuz6d3ampni1bkmb0et.jpg)



## 1. Working on a new project / feature / technology ? Start with the WHY.. not the HOW

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w30f0crkrbmxpl71x4nz.jpg)


At the beginning I was 1000% motivated to try so many stuff 🔥 ( I am still though 😝 ), but was too focused on the **HOW** part..
> _How can I use Angular to develop that website ?_
> _How can I implement that feature ?_

Doing so made me only feel like a robot whose mission is to "deliver".

> _But bruh🤨, delivery is the only goal -> that's how I get my salary at the end of the month_


I know 😩 but wait😏
would going like that be fun in long-term 🤔 ? 

So what if I instead put myself in the POV of the client. Starting with "**Why** do we need that feature?"
That may trigger a new conversation/debate like:

> _**Client**: we need that in order to have more visibility on our products_

> _**Dev**: Hm ok I get it, that feature will take 2 weeks to dev. Also what about adding an email marketing + notifications ?_

> _**Client**: sounds cool ;) let's brainstorm that during our next planning_



## 2. Everyone can mentor 👨🏻‍🏫

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b4574cv9w902vtwmnbev.jpg)

Mentoring is not about only sharing knowledge to the other, but I also learned a lot in the process. 

That helps the team to have common ground process and participates in a better team **cohesion**. 
That has contributed to break my **shyness** too 💁🏽‍♂️



## 3. Stop losing code 🙅🏼‍♂️

Yep -> several times during my seasons at the university, I "**lost**" codes due to a folder deleted or a saved file without history ( so not able to recover old versions ).

> _Hoya..what if you could go back on time ?_

I would have included **Git** in my main tools. 
It allows us to commit / push my codes into the "cloud" and keep track of my changes ( no more code lost 💪🏼 )

Git is my everyday bae ❤️..Git may be your bae too

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v9wg4qf3yi9jltz96pgr.png)



## 4. 👀  More emphasis on tests 


**<u>Old process</u>**: I develop a feature to add items to cart in an e-commerce website.
Let's deploy my changes to the preprod environment.
Waiting for the QA to test...👀

⌛️ Two days later:

> QA team : ⚠️⚠️⚠️⚠️⚠️ Mayday mayday 🚨 the app has crashed
> Me: sorry 😐 we were counting on you to test all possibilities in that new functionalities :( we're gonna fix and deploy for you to test
 > QA team : are you for real ? 🙄

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ign86drdn1bip69jqh3n.jpg)

**<u>Next-gen process</u>**: Write tests ^^
Let us not depend on a QA team to test all our code..we are not only developper but first of all -> **OWNERS** of the project. 

> Indeed💭 but what is the solution ?

I would like to have known the importance of **tests** at the beginning to avoid wasting time testing manually each features.

Check out that interesting article on Unit Tests: https://dev.to/codingpizza/what-is-a-unit-test-1e1m

A small snapshot showing green tests ( using Jest ) here before committing my code 😍

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hyznscvarn1jrrhgy0d.png)
 

# ℹ️ Conclusion

we are all learning, I missed a lot of stuff but doing errors is just a part of the process ;) 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/so92ianx5nfxeu23vcfy.jpg)


What would you want your younger self to have known several years ago ?

Peace ✌🏼 and stay tuned for the part 2 😃