Greeting friends! This post is about my 3-months internship experience in a Singapore Local Company. On the last day of work, I promised my mentor to write a blog about my ebbs and flows in the company. Hopefully, it will be helpful to the incoming developers in the company or to you as a student looking for an internship. Here, I will talk about how the hiring process went, what exactly is my job scope, and my personal growth throughout the journey.
The Hiring Process
My email history shows that I applied for the job on the 22nd of October. Then I got the employment contract on the 2nd of November. The interview process was smooth. I remember that it is an efficient conversation between my mentor and me. He demonstrated the company’s ambitions and plans. At the same time, I explained my area of expertise and forte.
Locate the Code
Before hoping up the company’s train, my mentor added me to the company’s Microsoft Team so that I could take some time to familiarize myself with the company’s working style. As a coder, the first thing that I need to do is locate the code. I talked to the senior developer on the first day of my job and asked about the company’s server, framework, etc. He suggested me to download Filezilla and connect to the staging server using SSH. All the code is at /var/www/html
, the default root folder of the webserver. So I used the help from Youtube videos to proceed with the installation steps and successfully connected to the server using the .pem
file provided by the senior developer. (PEM or Privacy Enhanced Mail is a Base64 encoded DER certificate. It contains a private key, and this key enables you to SSH into the instance in AWS.)
Framework - Laravel
Laravel - The PHP Framework For Web Artisans! (It’s the slogan that Laravel uses :D) For this part, I don’t need to worry about the installation because the previous developers did it. My jobs are updating the code, developing new modules and resolving ad-hoc tasks. There are a lot of different frameworks in the market, each with its pros and cons. Laravel is a PHP framework that can support both frontend and backend work so that you can develop a full-stack web app. One of the benefits of using Laravel is that it allows you to @extend a base template, so there’s no need to rewrite everything repeatedly. (Eg: Header file / Footer file)
Frontend Things
In the company, I did mainly frontend jobs. From implementing the website’s design to creating new modules and functions.
Code for Modules
Each module will have the three most essential things - View, Routes and Controllers directories.
View folder will store mainly the blade files. The blade file is handy if you want to use it as a template on multiple pages. You can have the advantage of extending the master blade file to other children blade files, using only one line of @extend
code. Also, one thing to note is that the blade file uses HTML code. You can add tags like h1
, h2
, p
and more. So if our mentor wants us to edit a specific description on the website, it is most likely that the code will dwell in one of the blade files. You could just use the browser’s inspect function, search for the specific keyword inside the container, and then use it to locate the code in VS Code, using the built-in search function.
On the other hand, the Route folder will contain a web.php file (most of them). All these files are automatically loaded by Laravel’s App\Providers\RouteServiceProvider
. It defines the routes or links that are for your web interface. You will need it if you wish to change the URL of the pages.
Controller files. It provides the logic in handling requests. It tells the project which blade view file should load when a specific URL is typed and submitted in the browser. Kinda acts like a connecter between the View folder and Route folder. In the meantime, you could also pass the data array from the controller file to the blade file, and the data can then be used on the web pages.
Rendering Images
All images should be stored in the folder html\public\images
. Remember that we should keep the image in higher quality and smaller size to optimise the website’s response speed.
Let’s talk about cache
My first task at the company was editing the website’s hero page. At that time, I double-checked that I had edited the CSS file and committed the changes to the server, but nothing had changed on the web pages. I couldn’t find the most recently edited code using the browser’s inspect function. I spent many hours debugging this until I discovered that it was due to cache in my browser… So, my advice is to clear the cache every time you change the CSS code, or you will unknowingly scratch your precious hair for hours…
Backend Things
I only touched on the Backend thing in the last month of work, when all my colleagues are busy with other tasks, so I have the chance to challenge myself and learn something about the Backend.
Creating a new Table
MySQL and PHPMyAdmin play an essential role here. MySQL is the database that stores the customer information, tables and etc. While PHPMyAdmin is a user-friendly administration tool that allows us to view or handle the data more clearly and easily.
Below is the code used to create a new table in the database. With the new table, you could parse the data in the blade file.
Step 1. php artisan make:migration add_title_to_users --table=users
Step 2. edit the migration file under database/migrations
Step 3. php artisan migrate:refresh --path=/database/migrations/2022_02_13_052023_add_title_to_users.php
Conclusion
So, what have I managed to learn over the last three months? This first job taught me a lot, both technically and mentally. Undoubtedly, the senior developers have taught me a great deal about coding. I am also highly thankful to my mentor for teaching me numerous soft skills. He taught me to be fearless in pursuing dreams, patient in mentoring juniors, be meticulous and punctilious in my work. I’ve learned to read the documentation carefully, double- and triple-check my work before submitting it, and take the initiative in assisting the new staff with their transition. Overall, a great experience!
Reference
Cheers!