Logo

dev-resources.site

for different kinds of informations.

Participating in a hackathon: My experience

Published at
1/10/2025
Categories
hackathon
competativeprogramming
javascript
webdev
Author
israelrotimi
Author
12 person written this
israelrotimi
open
Participating in a hackathon: My experience

When you have nothing to lose, then you should probably try

I participated in the JSMastery hackathon organized by JSMastery for reaching 1 million subscribers on YouTube.

I spent one week trying to come up with an idea, I then started developing the idea 5 days to submission deadline😰.

I used AI to give me a head start then developed from there. TBH, AI helped me meet the deadline by not allowing me waste time weeding in the dark.

The hackathon's theme was Build and Deploy. So you could build anything, so long as you deploy it. So I built an online game portal where you can find and play games online for free.
I used the freetogame API which only had PC games. I couldn't find a free service for mobile games so I stuck with what I had.

So, the challenge was to build a frontend that displays these games in a user friendly way. Easy right? no, not at all.
I used Next.js to build this, so I was becoming more cconversant with the framework in the process.

When it came to implementing search functionality, I blacked out.
I didn't know to somehow capture the state of the search term nd query the API. cause state is native to the component it's used in. But I overcame that hurdle.

Long story short, everything went well... till I decided to deploy it, then all hell let loose😱. Vercel rolled out a ton of bugs for me. I solved them one by one but one wan't clear and seemed impossible to solve

Error: in categories/categoryTabs.tsx type object doesn't match type Promise

Enter fullscreen mode Exit fullscreen mode

I tried fixing it with AI but everything AI gave did not work. Instead it gave this error

Error: ...PageProps is missing the following properties from Promise 

Enter fullscreen mode Exit fullscreen mode

I tried all I could, went back and forth with the AI to no avail.
I submitted my project with the URL to the live site which wasn't live yet and the GitHub repo, risking being disqualified. I submitted few hours to the final deadline.
To add to the pain we were having a power outage (It's common where I come from) the night I submitted and the night before so I was forced to do the debugging and submission on my tablet.

Next morning, power was restored.I then decided to setup copilot within VScode since it was now free. I told it my problem it was the same things as before, so I gave it my code as reference and told it the others didn't work. It then offered the fix which was to treat the Params object as a Promise:
before

const page = async ({params}: { params: { category: string } }) => {
  console.log(params)
    const {category} = await params;
    const games = await fetchGamesByCategory(category);
...
}

Enter fullscreen mode Exit fullscreen mode

after fix

//Change the the params type to a Promise instead of an
//object, and then await the params to get the category
const page = async ({params}: { params: Promise<{ category: string }> }) => {
  console.log(params)
    const {category} = await params;
    const games = await fetchGamesByCategory(category);
...
}

Enter fullscreen mode Exit fullscreen mode

And that solved it.

Key takeaways:

  • Use AI in ideating and debugging
  • Install GitHub copilot, it's free!
  • Embrace the process
  • Don't give up.

You can check out the repo with the full git history as well as the live site and tell me what you think about it.

competativeprogramming Article's
30 articles in total
Favicon
What is a UX Competitive Audit — and How Do You Conduct One?
Favicon
Participating in a hackathon: My experience
Favicon
33rd day of my CP journey
Favicon
DAY 12 Tackling Math-Based Challenges
Favicon
55th day of my CP journey
Favicon
59th day of my CP journey
Favicon
51st day of my CP journey
Favicon
Day 4 :Everything You Need to Know About Functions in Python
Favicon
My journey in competitive programming
Favicon
60th day of my CP journey
Favicon
My journey in competitive programming
Favicon
Day 30: Competitive Programming Journal
Favicon
Day 31: Competitive Programming Journal
Favicon
LeetCode Review
Favicon
LeetCode 1762 - Buildings With an Ocean View: Three Approaches Explained (JAVA)
Favicon
LeetCode #1. Two Sum
Favicon
JAVA COLLECTION FRAMEWORK (ONLY INTERFACES)
Favicon
Read Input Until EOF (End-of-File) and Number Your Lines Effortlessly | Competitive Programming Java
Favicon
How Can I Setup Sublime Text Editor For Competitive Programming
Favicon
Enhance your algorithm skills: The ultimate guide to Atcoder in 2024
Favicon
Segment Tree-01
Favicon
Fewer Holidays, Increased Productivity? The Philippine Debate Heats Up
Favicon
Does solving/being able to solve hard code force challenges good for my career?
Favicon
C++ Code Snippets :)
Favicon
🧡How to take input in javascript using console (codechef)
Favicon
Contest Notifier - Browser Extension
Favicon
Solve Subarray Product Less Than K in javascript
Favicon
Longest Substring Without Repeating Characters
Favicon
āĻĒā§āĻ°ā§‹āĻ—ā§āĻ°āĻžāĻŽāĻŋāĻ‚ āĻ•āĻ¨ā§āĻŸā§‡āĻ¸ā§āĻŸ āĻāĻ° āĻœāĻ¨ā§āĻ¯ āĻļā§āĻ°ā§āĻ¤ā§‡ āĻ¯āĻž āĻ¯āĻž āĻļāĻŋāĻ–āĻŦā§‹ (āĻ•āĻŽāĻ¨ āĻŸāĻĒāĻŋāĻ•)
Favicon
āĻĒā§āĻ°ā§‹āĻ—ā§āĻ°āĻžāĻŽāĻŋāĻ‚ āĻĒā§āĻ°āĻ¤āĻŋāĻ¯ā§‹āĻ—āĻŋāĻ¤āĻžāĻ° āĻ¨āĻžāĻ¨āĻžāĻ¨ āĻ§āĻ°āĻ¨ āĨ¤

Featured ones: