What I learn from taking my first junior developer test.
Tags: javascript, webdev, beginners, programming
Published: 2022-05-07 13:31:47

The past three weeks has been a hectic week. I applied to several companies during my journey to get hire as a developer. I finally was given opportunity to do so from one of the company looking to hire junior trainee web developer. The test I was given was create a basic CRUD project where user can add products and custom input filed for products size, weight, width, length, and height given which kind of product it was. How did it go?  Not as well as I hope but I learn a lot from this project.

##I learn how to work with database!

Since this project is need to allow user to store data somewhere, fetch and show that data when product is save, I learn how to use PHP/MySQL for database! I mean wow, I have never touch php in my life but being able to use phpMyAdmin to store my data and write php code connected through MySQL and show product when requested is awesome! 

##I learn how to connect backend with remote MySQL and Heroku

When working with php, the easiest way was to use XAMPP/WAMPP/ or MAMPP(in my case I use XAMPP). These software allowed beginner to get started utilizing phpMyAdmin and write php code without installing individual package, but the downside is, you can only use it locally for development. How would deploy it in production? Well, I did some research and found the easiest way was to use remote MySQL and hook it with Heroku. You can check it out on this link below, it give you many option with step by step instruction:

https://dev.to/jorenrui/6-ways-to-deploy-your-personal-websites--php-mysql-web-apps-for-free-4m3a

## I learn form validation

Form validation is essential for your project because it prevent user from submitting form with the value you don't want and prevent empty submission. You can use external library to help with it but the thing with that is, you may not understand what is it really doing under the hood. I found great video's explaining how to implement form validation without using libraries. It's a great insight to handle errors:

validate form using react hook:
https://www.youtube.com/watch?v=EYpdEYK25Dc&t=412s

Validate form using switch case and custom hook:
https://www.youtube.com/watch?v=_ePL_Hu_cW4

##I learn that if you get stuck, take a break

Before this, I had very little PHP and MySQL knowledge, or even backend. I was so focus on the frontend of things that once I receive this test, I was a bit scared. I had to at least understand some PHP and how to write PHP code. Now I had to figure out how to wrap all of this together? It was a lot of frustration and sometime I would sit on the screen for hours on end with no result. Don't be like me. I found that if something doesn't work or my head was overload, the best thing to do is stop. Go make some food, do push ups, walk or just took some nap, whatever you can do to stop thinking about coding for 20 to 30 minutes then comeback  to it. This help me tremendously! It's like when I come back the answer just appear, it's the weirdest but the best feeling.

##Wrap up

I don't think I did very well in this test since I didn't pass the automated test checklist. I think I got all of the core implementation but at the end I may or may not get the job, we will see. One thing I do know is, I am glad I was given the opportunity. This show that I am closer to my goal and show how long I have come from knowing nothing about programming eleven months a go to confident enough to take on the task given. Every step is a learning step and I am enjoying every step no matter how 
hard or frustrated it is. This show that this is the right path for me. 

###Thanks for reading and hope anyone who are on the same road to remember:

#Life is a marathon, Not a race.