I got frustrated while developing a website on my own
Tags: webdev, learning, freelance, beginners
Published: 2024-05-10 09:41:47

**tldr;** There are many layers to learning web development and video tutorials teaches you the last one.

## Table of Content
- [Introduction](#introduction)
- [The Story](#the-story)
 - [The Database and Schemas](#the-database-and-schemas)
 - [JavaScript](#javascript)
 - [Auth and Management](#auth-and-management)
 - [Takeaways](#takeaways)
- [Me](#me)

## Introduction
I went blank when I sat down to design a website. I want to start freelancing as a web developer and chose to build a Local Restaurant website as a project. This journey humbled me to the core as I ain't even a newbie programmer but couldn't code a simple website. How can I get stuck at the start of a project. In this article I share the most important lessons learned while designing a website and what I wish everyone starting their career should do.

## The Story
Previously, I have created many projects following video tutorials. I wasn't new to programming or development and was confident enough about calling myself a Web developer but this personal project gave me a reality check.
I had a picture in my mind of how the Restaurant website would
look like but got stuck while trying to get the design on the paper. I had no idea where to start, or what is even included in the design of a website.
I stood up, walked and then 15 minutes later, "MVC!". I have read about MVC architecture somewhere. That's it! I should design the database first.


### The Database and Schemas
After designing the database and I set myself to write database schema using Mongodb. But I didn't know how to do it. After clicking a couple of links I realized its the Mongoose that we use to write db schemas :D
While coding the schemas I was worried if the user will enter
the correct input, what if he doesn't. I searched on internet
and realized that I already saw in one of those video tutorials how data is validated using Mongoose. But I didn't remember such an important step.
Even better in my research, I realized that we can move validation step to the frontend. Look, we find new stuff when we research. Then there is this line `export default model('Customer', CustomerSchema)`. I didn't know what `default` does. I didn't even knew what is the type of the entity we are exporting. Is it an object, a fn, or what?

### JavaScript
I ended up reviewing the fundamentals of javascript and discovered new things like ES6 modules and earlier versions of Javascript and browser compatibility issues and V8 and spidermonkey.
Still I wasn't confident in writing code the javascript way and if my code is even secure. I ended up solving more than 300 small problems on javascript such as, capitalize the first letter of all the words in a string.
I can't tell how much I didn't know about javascript :D

### Auth and Management
Attending the project again, I decided to develop the authentication mechanism. Did a little research and implemented JWT based authentication.
The issue now was that I didn't know what to do next. I had no plans, nothing beyond the database design. This is the point where I realized why project management is necessary.
Presently I am learning how to manage projects, how to break
down the application into smaller pieces. Your advice would be really helpful here.

### Takeaways
- There are many layers that lies before the final product and after the final product. Only if you build a project on your own will you discover them. I wish I could force every junior/new programmer like me to build a project on their own even if it doesn't land on their resume.
- Coding should be among the last tasks on your plan.
- video tutorials aren't effective in my opinion. Instead one should go for walkthrough articles. One such walkthrough I can recommend on is a book [Obey The Testing Goat](https://www.obeythetestinggoat.com/) which teaches test driven development through django.

## Me
I am a Software Engineer, and an [Open Source Contributor](https://github.com/00AR#my-open-source-contributions) with contributions in GCC Rust Compiler and Geany IDE. Presently improving my skills to start freelancing.
I am already a programmer with decent knowledge of web development. I will share my learnings here. But I promise to not spam you with #day 1 or #day 2 kind of posts. I don't prefer that kind of approach. Instead, any article I share should give the readers some knowledge that they can apply in their life.
If you have any freelancing tips then do share with me :)