Hi! Everything good? Enough of the Intro! Let’s start.
Note: This post may be lengthy, but it will be worth your time.
I built my first project about 3 years ago, back when I was just starting out and didn’t have a lot of knowledge about different technologies. Despite my limited expertise, I poured my heart and soul into creating it, opting for simpler tools and methods like,
Python: For backend.
Django: Framework.
HTML & CSS: For templates.
Threading: To put programs on sleep and perform certain pending tasks.
Used PostgreSQL database.
The project took about 3 months to complete. Why so long, you ask? Well, the journey of completing a project can be unpredictable. In my case, the ups and downs of my experience will soon be revealed in the upcoming sections of this page.
Let’s begin the Journey.
Key points for quick navigation if bored. Top section: Journey-focused. Second section: Technical details.
Journey and Planning
Technical lessons learned (but explained philosophically).
len
and when to use count
and more.Journey and Planning
As previously mentioned, I was in the early stages of learning about Django and had limited knowledge of other options available. Therefore, I opted to use DRF for my project. While I do not regret this decision, I realize now that I did not thoroughly assess the efficiency or potential drawbacks of Django. It is important to always evaluate the weaknesses of the tool you choose to build your project in, meaning if you can build the features and functionalities in the tool you are choosing. Additionally, it is essential to consider whether you are fully prepared to navigate the complexities of the chosen tool.
During that time, I had approximately 35% knowledge of Django and did not hesitate to begin working on the project with whatever I know about Django. And now I can confidently state that I acquired knowledge of around 85% of Django during the project’s development. I would only say Don’t wait for anything. JUST START with whatever YOU KNOW and whatever you have. You will acquire knowledge automatically throughout the juicy journey.
I had a Stack Overflow account with about 900 Rep (which I earned in about 2 years). And I had access to privileges like access review queues
, view close votes
but was not enough to get the idea of how Low quality posts
, Moderator tools
, Reviewing queues
works, for which I couldn’t get any help from high rep users because I didn’t know any, and even If I did, I highly doubt they wouldn’t tell me the complete functionalities of reviewing process. But I had to implement it no matter what, so I started looking for answers and found Stack Overflow’s explaining about Low quality posts.
so it was like
-> query to get all posts which are low in quality
such as Q and A wihch are short
, Q and A from new users
.
-> Taking a post one by one and checking the action if user skipped the review or took any action
-> If skipped flag it as skipped and pass it high rep user
-> If not skipped then check how many votes were on post to mark it as low quality post.
I gathered all of ideas of functionalities from SO like Suggested Edits, Close Votes.
Afterward, it was not difficult to implement once you know the concept of how things works.
However, I found it useful to closely monitor each detail of how SO showcases information and engages users, including aspects Rewarding awards
, Badges
, Declaring bounties
, Awarding bounties
. While this process proved to be time-consuming and took longer than anticipated, the monitoring efforts were ultimately valuable than expected.
and I learned
When a user is in a specific location for a particular task, he or she may overlook the most obvious details about it, whether it be a place, application, or website. - Yawan
Started building
Then, I made a long list of features and functionalities I will be building in the project with the rows like Hard to Implement, Easy to Implement. I had about 10-15 SO functionalities in Hard row and 30-35 functionalities in Easy row.
Unfortunately, I lost the table of features which I had it saved. However, I do remember some of the functionalities that were categorized in the Hard row like Edited Question and Answer's Revision
, Deciding if edit should save or not
, Handling review queues
, I don’t remember all. I didn’t know why I choose term Hard without knowing the under process at that time, The truth is I didn’t know anything about anything, I just got my hands into it started building it.
As I continue to implement easy/basic functionalities, my understanding of building more complex functions has deepened. This has led me to problem-solving by breaking down processes, enabling me to successfully implement functions that I initially believed were beyond my capabilities.
As I mentioned in previous section, let’s dig deep in it. Becoming expert in coding involves more than just problem-solving and approaching all tasks with a coding mindset, but It involves optimizing efficiency by considering multiple approaches, carefully selecting the most suitable option, and ultimately implementing it in the current project.
which I learned while building this project, at the time from building and completing, I didn’t care about efficiency, consistency, queries, load on database but only focused on just building it and finishing it somehow, no matter how many loops I had to create. And Now when I look back at my project and look at the code I wrote, I only see straight colorful puke.
It’s true that I didn’t ask any questions on Stack Overflow when I encountered errors because I believed they would be resolved by the end of the day. I found it helpful to take breaks and return to the issue after 1-2 hours, which often resulted in a solution. While I did refer to Stack Overflow answers when needed, I preferred to troubleshoot and solve problems on my own without asking a question especially.
Technical lessons learned - Symptoms if you’re dumb as I was
If you’re building something, choose the right kind of tools and technologies, don’t hesitate to take your time to research because choosing the right tech will pay off at the end.
For instance, if you select a technology that is not optimized for task efficiency and you proceed to build a product with it, at start progress may seem smooth. However, as development progresses, you may encounter limitations and deficiencies in the dumb technology that hinder your ability to go back or move forward. Reversing would consume valuable time already invested, while going forward could result in a dumb product that fails to meet end user needs, leading to disengagement or lack of utilization.
In my case, I used threading
to handle task queues in situations like To release ban of a user in particular time period
, End bounties after 5,6,7 days
, auto close questions
, etc.
If you know threading then you would know that, it is only good for short term tasks if I keep it more simple. like if you want to handle or create a API call to a URL and want to call it in after 10 seconds when the user presses button then I would use threading in that case but In my project I put task to sleep for 62208000 seconds (4 years) I used even more you can take a look in the repo. Can you imagine? If you can imagine then you are on the right path, if not then you need to _____________ (You can place any words you want in the blank area)
Are you building a project right now? If yes, then it’s not too late to manage it accordingly, if you managing it right then look again, it’s not managed well. You don’t wanna know what I did to manage my project do you, Wanna know? Nothing. Creeped out? No? Look at the lines I have in one file. Still haven’t creeped out? Look at the names of variables (bool_1, bool_2, bool_3) Look at the beauty of if, else statement. Came from basin? Now Let’s discuss about Managing the project, Clearly I didn’t manage my project well which made the project unmaintainable, impossible to understand to user no matter if they are expert or a beginner.
Are you living your life the fullest or sacrificing your life for someone else? If you are living your life then you would understand that enjoying while building something can not only be juicy but more pleasurable. So, If you’re building something even if it is small or bigger than you, don’t just build it but enjoy it, because nobody knows if your product will change the world and you may miss the journey later.
I am repeating myslef, I viewed building the project as a task assigned to me, which I completed despite not particularly enjoying the process. Now I think, I believe that having a more positive mindset during that time could have resulted in greater awareness of the project’s requirements and the quality of the code I wrote.
As I mentioned in earlier section that, I didn’t take good care of files and the code I put into them, I just stacked them into one and go on and on and on. I didn’t had in mind that this could result in mess that the person who created it wouldn’t be able to understand it.
So, Just separate every function, class create in another file, don’t create one file for each function but keep similar functions in one file.
I think you already know that Security is everything But I didn’t know that which resulted in someone injecting a script in my project’s markdown and whoever did this was kind hearted and didn’t done anything nasty but clearly mentioned in the comment
Sanitize your markdown kid.
but you won’t find professional hackers that kind hearted every time they hack your product. They won’t think if you’re new or old, beginner or expert they will just do whatever they want with your product Only If don’t manage your security well. And If you do it well then It will be good for you and your users.
Back to my case, then I immediately went to my project’s templates and add a tag (I don’t remember it now) to cleanse the markdown and everything a user put in the field. then I redeployed the site and I noticed that onclick
was no longer reacting on event click
.
So, I was lucky as it was not a revenue generating and user targeted project. You won’t get a second chance in hacking.
Do you find yourself frequently creating tasks in a to-do list only to forget about them? If yes, I was exactly like that, I still am. Countless features I planned to implement in the project (not only in this project but any project I build) was written in the todo list and now only God knows where that todo notes went. I think I don’t have any solution for that? If you have then let me know.
While building the project, I thought only I will be using the product or I didn’t think about other users at all. I build functionalities and copied UI for my laptop and didn’t think, many users will also test from mobile devices and different browsers and it happened because someone stated “Site is not mobile friendly”.
So, If you building a product then you should only think about the users and users only, because they are the one you’re building the app for, if you can’t do that then have someone else to review or to test the UI and functionalities but Be sure the person you giving to test can understand the vision of your product. Because there are peoples who will only downvote you no matter how much your idea’s worth is.
Can you answer me one thing, How long you think you will live?
1000 years? No way!, 1100 years? No? If you can increase the number a little more then you can choose whatever you to do and whenever you want. You can’t? You are not going to live 1100 years? then how much? only 65-85 years? That’s it? Then when will be the correct time you think will be best to do you always want to do? There’s no much time. Are you planning to do after 70 years? I guess No, then why everyone take actions like they are going to live 1000 years? Listen to me carefully There is no tomorrow, Just do now whatever you want to do Now!, Don’t be afraid, Don’t be jealous, Don’t fear. JUST DO NOW! You will turn 50! No! seriously you won’t have time to notice the time how fast it is going.
That’s all I wanted to say in this section (Will add more if I remember more).
Note: I may edit this Blog/Post whatever it is from time to time, you can check back later, I will keep you updated. And If you liked what you're reading then will you just do yourself some favors, mentioned below.