Building Something From Scratch Phase at Encora Apprenticeship — Week 1

Ximena Sandoval
3 min readNov 16, 2021
Photo by Headway on Unsplash

This post is part of a weekly assignment at Encora Apprentice and in this series, I’ll share my journey as a Software Engineer Apprentice. I hope these stories help and motivate others on their tech journey.

This week at Encora

With the start of a new phase at Encora also comes new challenges and learnings. This week, alongside my team, we started working together to analyze and propose a solution to a client’s problem.

Working as a team

As I mentioned, this week we met and started working with our client. To propose a solution, we had to start talking to them to understand what they needed and start analyzing the current situation of the solution.

There are lots of takeaways from this experience, like learning how to ask the right questions at the right time when working towards a solution, making sure that the client understands the solution without the need for technical terms, and also being in the client shoes since we are all one team working to find a solution.

Terraform and AWS

This week I also got the opportunity to start experimenting with Terraform in a more hands-on way. To do this, I used an AWS account and Terraform to provision an EC2 instance and make sure that it wasn’t public to the whole internet and that I could connect through SSH to that instance. This EC2 should also be inside a VPC and should be in a security group.

In order to achieve this, I studied about VPCs (Virtual Private Network) in AWS, as well and understanding what a security group is (which can be seen as a set of rules that an EC2 will follow, like what kind of traffic to allow to our instance).

Also, I learned about how to manage our credentials in Terraform, like hardcoding them into our code (not really recommended), keeping the credentials as environment variables, and finally, keeping a file and storing them into a .aws directory and telling Terraform where to look for the credentials.

MongoDB and Docker

This week I got to work on a small side-project with my mentor, and while working on that I came across MongoDB, which is a NoSQL database system. In order to have your database in MongoDB within your local environment, one option is to have your database in a Docker container.

Here’s an awesome tutorial to help you run MongoDB in a container, but the important part it the following snippet:

version: "3.8"services:    mongodb:        image: mongo        container_name: mongodb        environment:            - PUID=1000            - PGID=1000        volumes:            - path/to/your/database/folder:/data/db        ports:           - 27017:27017        restart: unless-stopped

Which will start a service called mongodb, in a container with the same name and with a volume that points to the directory you choose. We also need to map the ports to make sure we can access our database from outside.

React

Finally I got to learn a little about React and how it works using a virtual DOM instead of the actual DOM, as well as working with the state. To modify the state, we have to use the function setState instead of modifying directly:

this.setState({stateProperty: 'Property value'}); // Do this
this.state.stateProperty = 'Property value'; // Don't do this

I also got to learn about React components and how to pass them elements as props to make them more dynamic.

Final thoughts

This week was full of teamwork and new technologies to learn. Throughout this week, keeping the communication flowing within the team also came in clutch, since we all need to be on the same page in order to achieve good results.

I’m also looking forward to keeping learning about DevOps tasks and technologies and keep exploring AWS services and tools, as well as learn more about React and how to build more complex UI components.

--

--

Ximena Sandoval

Cloud Platform Engineer at Encora. Currently learning about CI/CD, Kubernetes and watching Studio Ghibli movies✨