DEV Community

Cover image for How we should do personal projects and why.
Sagnik
Sagnik

Posted on

How we should do personal projects and why.

Here is my experience.

I am a person who prefers learning by doing. There is a sentence that

if we decide to go out when every signal is green, then we can never go out

The same is the course of learning and doing projects. For example, if you decide to learn full Java and then do a project then the project will never start.

Here is how I do my projects.
🔥 I learn something new.
🔥 I find the use case and think of a project
🔥 Interestingly, while I am thinking about the project I don't think about how much I know. I think about what features should be there, what a user will want from this project and how can I be a billionaire using this project 😝(Trust me it never happens but it always keeps me motivated).
🔥 Start doing it
🔥 Build the bare minimum (very very base portion).
🔥 Most important, since my project is not limited to how much I know, it will provide challenges at every step🥶 and exactly here you get a deeper understanding and learn much more than what you have learned previously.
🔥 You will be spending days doing research and solving the problem that you are facing but in the end trust me, you will have a much better understanding of what you learned.
🔥 You will also have honest answers to the interview question on what problems you faced while creating this project.
🔥 Always maintain version and deploy to learn Git/Github/(CI/CD) pipeline, docker. This is a great thing as these technologies are required everywhere.

Let me give you a recent example of a project I am currently working on 👉.

I was learning three things at a time (Next.js, Typescript, Java Spring). After completing the basics I thought of a project and decided to go with a simple course site as it will provide features similar to a ecommerce website.

Next, I decided on the general but essential features i.e. there should be authentication, a page showing the courses, there should be course details page, payment page etc. Very general features. I also explored some designs such as teachable.com and Udemy to get a general idea.

Now to start a project with entirely three new things requires guts 😎 but it's like a video that I am recording in my phone, if its good I will upload it to any social media, or else I will keep it to myself. So there is nothing to worry about, nobody will tell me 😱awww you messed up the project. So I started doing the project and boom💥I started facing challenges already😭.

Like for example what I learned in the tutorial was that Typescript needs type but in React.js/Next.js there is a concept of passing children and children can be anything, so what type should I give?🤔 I searched the internet and understood that this is already a burning question in the developer's community. The answer I got was to use React.Node.

Moving on I understood how Typescript can be used with React/Next.js. I understood the advantage as vscode was providing great autocompletion and there the props were automatically available. I started loving Typescript and then I explored the power of Next.js. I used Google font and Image optimization which was not included in the tutorials I watched but I learned them while doing this project. I cleared my concepts on SSR, CSR, and ISG. I was doing great when the biggest part came in which almost made me frustrated but this is the most challenging portion of the project (till now).

The Backend was to be built on Java Spring. Now since I have learned Spring Data JPA which uses SQL as a database, my brain was constantly punching 😠 me to use SQL as database in the project whereas my heart wanted to go for MongoDB (I love MongoDB). I again took the challenge to do the entire backend with Spring and MongoDB. There my learning begin again. I learned about spring-data-mongodb from Youtube, read articles and just managed to get the basic understanding of how to use spring-data-mongodb.

It soon became very frustrating as I did a lot of mistakes and it was almost to a point where it was not working at all. But I kept on doing the research, learned about how to use Aggregation in Java Spring Boot, watched YouTube, read articles, followed trial and error and finally declared Java is hard, literally very hard. Yeah,😓 you heard it right but the point is that it was just the first time it was hard. Now I knew the concepts and understood how to use spring-data-mongodb. Now I have notes to use and soon as I started using it again it became easy. I thought now no-one could stop me from becoming a billionaire but I soon realized I was so wrong.

The last portion of the project(till now) is where I need to secure the API endpoints and perform authentication. I knew about spring security and how to use it but as soon as I installed spring security, all routes were blocked. It was expected and there is nothing to worry about as the tutorial shows how to white-list the route. I wrote the code and IntelliJ showed cross lined saying this is deprecated and for some cases, it showed cannot resolve method.

Soon I realized the tutorial is outdated for this latest spring security version and first time I referred to the docs of spring security and again researched how to white list routes. After a lot of hard work, I finally managed to make it work. Now here is the point if I were to learn the entire framework I would have learned the outdated content. Now I know what is latest which version of spring security is the latest and what were deprecated in the previous and what is the updated form of the deprecated methods.

I went on to create authentication but I already told you I was using MongoDB. Again my tutorial didn't show how to do authentication with databases that are not SQL. So again I went back to research mode and found out some classes that I have to override. Here I learned the basic working structure of Java Spring such as filters, Dispatch Servlet, Authentication Manager, and Authentication providers and how they connect, and who are the default in usage.

I completed the authentication and again realized I need to create the JWT authentication for auto login. I learned through blogs and articles how to implement JWT and learned to create custom filters that can be used in the pipeline. I learned about ResponseEntity (before I was returning strings and Objects🤣). And currently working on email sending using spring boot for the implementation of forgot password feature.

Again this was also not covered in the tutorial. So the thing is no tutorial could teach you everything and you can't know everything. So start using what you learn and build on that, get stuck, research, solve the problem and repeat. You will enjoy your learning in a much better way and always have a reward which is your improved understanding. Hope this post motivated you for your next project. It worked for me but not necessary that it will work for you. But I decided to share with people who need help in this kind of scenario so that they can atleast give it a try.

This is my first blog. Let me know if how it is. I humbly request your honest opinion as I am not a blogger, just doing this to help others but willing to learn, so your feedback matters a lot. Thank you for reading. 😀

Top comments (0)