DEV Community

Menard Maranan
Menard Maranan

Posted on

What I learned from my last Programming Project

For the last few days, I've been studying Next.js, and to compliment my learning journey, I decided to create a project (a blogging website where users can create account, write blogs, read other's blogs, etc.). My intent for starting that project is to better learn Next.js by doing, and also for fun, but it turns out that I learned more than what I am expecting. I discovered more flaws of my knowledge and skills, and I am writing those down here.

Before that Next.js journey, I just know React.js, Firebase, and a little bit of some other technologies (like express.js, GraphQL, etc.). So I decided to expand my knowledge and started the #100DaysOfChallenge and shared my progress in my twitter account.

Fast forward on the last 3 days, I decided to take on a project that's been brewing in my mind while reading things about Next.js. But before I do any coding, I did some planning, and designed my blogsite in Figma, and oh, I also did specified some basic requirements or features I want to implement (turns out I haven't implemented all of 'em) and just throw them all into my kanban board (yah, I don't know how to use it properly, yet).

Even though I know how important a good plan is, I'm just too anxious to jump straight into coding, because these ideas just keep flooding in my head, so long story short is, I did just code right away (with fingers crossed things will work out as I intended to, but you know what happened), and yeah, here is when I encountered all sorts of problem.

Fast forward again to today, I just finished the first iteration of the project, I reminisced of the things I did and reflected on all of my mistakes ('cause man that codebase is so unorganized, messy, and buggy, not to mention hard to maintain, so yeah, THAT SHOULD NOT HAPPEN AGAIN... hopefully). I'm not going to write it creatively, and I'll just throw a list of my realizations.

So I'll put it this way:

"If I'm going to do the blog site again, what whould I do (before jumping straight into coding)?"

  1. I should have a better plan
    • Must clearly define the software requirements
    • USER STORIES
    • Utilize the V-Model (Verification and Validation Model)
    • Should have a product roadmap
    • Agile Methodology, and Software Development Lifecycle
    • Should have learned and used Docker and DevOps
  2. Since I already mentioned DevOps, I should have learned testing, and I should have written tests (because it turns out my project got TONS of bugs along the way, and yeah, that's the problem with just jumping right into the code too quickly... I'm just getting excited, LOL, but that won't happen again... I hope).
  3. Outsource or just use open source CSS frameworks (because that ate up much of my time, well not much, but almost ALL of my development time)
    • Should have used CSS pre-processor (SCSS) too.
  4. I should have better managed and structured my Data:
    • I should have designed first the Data-Model of my database (it's on firebase-firestore, yah, the NO-SQL thing), because it turns out I got a hard time retrieving data in my project from firestore, especially the relational ones.
  5. I should have studied and utilized different software architectural designs, because it turns out that my code base became extremely unorganized and unstructured too quickly, that it's so hard to maintain.
  6. I should also have better utilized the uses of Data Structures and Algorithms, to better optimize my code, and lessen the resources I use.
    • I saw where I can use things like Dynamic Programming, Divide and Conquer, etc. on my code base, but, yeah, I haven't did that.
  7. I should have used Git version control better, and with it, GitHub (because it turned out that I haven't used git branches when developing new features, and it's hard to backtrack from different versions, and turned out that my master branch got tons of bugs, which should not have happened, because it's just like I haven't used Git... Never gonna happen again).
  8. I should have better used the principles of OOP and Functional Programming. I did used their principles at several parts of my codebase, but not to their full extent, and that's my BIG mistake. In the end, my code base became a mixture of spaghetti code, some FP based codes, and a sprinkle of OOP (should've never did that, I regret that, *face palm).

So this are just the things at the top of my head, and this blog have no edits or drafts, I just write what comes to my head.

These are the reflections of many of my mistakes and failures, and I'll use this learning to better manage and develop my future projects.

Till' next time!

Top comments (0)