Skip to main content

A Hackathon of Blunders

The previous weekend added another Hackathon to my bucket, and another website to my project stack. Although I couldn't perform as per my expectations, I must say, looking back at the two days really does feel that I did a lot of work. Only an engineer can have procrastinating week days and a super-working amazing weekend full of tasks. Let's begin the journey!

Team and Tech Stack

This wasn't such a big decision this time. Our main group was broken because of the strict Hackathon rules that barred more than 3 sophomores in one team. So it was just me and my friend Abhishek, and we later teamed up with another friend of mine, Anshita. We were assigned a great mentor - Vishal Choudhary (sir). It was obvious that we were going to build a website, since all of us knew something about it. I would do the backend, and Abhishek and Anshita would design the front end of the website. Great! But what is the website?

Idea

Well, we thought of building a website that I've really really wanted to since the past one month. An interfacing platform for students and faculty to share assignments and files, with an online judge that would evaluate codes of the assignments or in the files. At the end of the semester, students would get all of their submitted codes in a PDF, as their file. They would submit that file to the institute, and that's it. No pointless writing, and copying that would waste students' time.

The Night before Day 1

Okay, now like I said, I had a pretty lazy week before. I began watching GoT and was pretty much cut off from intensive coding or anything that added to my knowledge. Anyway, I knew we would have to do a lot of work in this site and I would have to learn one or two things for this too. One of the most important things was making a library-run login system. Now, I had previously made my own websites with my own login system, but they were from scratch, using cookies and web tokens. Not that I knew of any bug in them, but that's no reason to conclude that there couldn't be a loophole in them. PassportJS is an amazing library for this same thing. I started learning about this library, but somehow I couldn't get enough time. I slept over it, hoping that I would learn it tomorrow on the go.

Day 1

Organization

Trello boards! Yup, I don't know why, I just love them. Probably because I've watched the Silicon Valley series, or maybe because a company where I interned at worked with it. But it's really one of the very best ways to structure your work. We made labels, and divided as much work as was possible. I told my teammates about Webflow, and they began making the web pages after discussing about their basic design. It was time for me to start making the boilerplate.

Boilerplate 

This was done in about 30 minutes. It included making the package.json, constructing Database models, and making get routes for all the pages needed to be displayed. We weren't using React/Angular. This time, it was just templating normal HTML files all the way. I couldn't display the login or dashboard pages of the site unless they were completed by the front end team. But that does not mean that I was idol.

Passport Arrives

By the time the front end finishes making the web pages, I could add the login system. Basically adding back end functionality for a user to sign up, login and only allow anyone to look at their dashboard if they are logged in. I had to add middlewares in this given by passport. (If I'm getting too  technical, I apologize. I'll try this won't happen much :)) 

I looked at some tutorials, and this is where the hell began. If I could say one thing that shouldn't have happened in the Hackathon, it was this hell I was having with PassportJS. Somehow I just couldn't figure out how to make the login system perfectly. I guess it was too much pressure. I wanted to finish it quickly, and so I started reading many tutorials simultaneously. For those unaware, Passport has too many ways of making login systems called strategy, and imagine reading 5 different strategies to make your own. That is the worst way to do it. I'm not making any excuses, of course I failed to learn a simple library, but I'm just finding a reason why. 

End of Day 1

It's never an all-nighter Hackathon at our college, and at 6 pm, we were out of the Hall. Of course we were allowed to code at our hostels too if we wanted, but now I needed some rest. Imagine being stuck at a problem for literally 6 hours! I didn't even realise the time. Felt like a mental block. Now I had to do something to get my mind off it. I got back with my laptop at night trying to make the login sytem again, and failed yet again. Now here's something about general programmers:
Programmers who sleep early have the worst nights.
As you probably guessed, this was one of my many disappointed nights, and what followed was a determined morning.

Day 2

I was all set to complete the system. I had almost completed the project. I discussed the final browser request modifications with my mentor Vishal sir, and we spent almost 2 hours finding the solution to this. We could only come up with temporary solutions, or solutions which we knew were not the right practice. It was a really tough phase. Ultimately, I kept this problem aside and started with all the linking of the web pages designed, and further backend linking with the database queries. 

It was too late to make an online judge, although I had the partial code for it when I tried making somewhat like this a month ago. Anyway, we just focussed on finishing the project, without the perfect login system. I was so furious with myself the whole time. Nevertheless, we went on with preparing for the presentation. 

Final Presentation

Now everything had to be stopped, and we had to focus on giving the best presentation possible. I tried getting in the Steve Jobs mode, and preparing to be really expressive and natural on stage. 
Well, I would simply say, the presentation was bad. I kept forgetting what was I saying! Maybe because of the unresponsive audience since it was one of the last presentations, or maybe since it was simply not my day. Doesn't matter. 

Everything is in the past now, and it's time to recollect what I learn and realised. 
1. Every day is not a Sunday: In my case, I should be really happy given the fact that Day 2 was on a Sunday! But on a serious note, both my days at the Hackathon were honestly, not that productive. But did I learn something new? Did I get to see more structured codes from my senior's projects? Did I get to network with people? Yes to all! And maybe this is what I should take back from this. Not every day is a day where I see rainbow in my projects, not every day do I get the perfect output to my efforts. But every one of those days, I can be a 100% sure of making progress. I learnt that not all days could give me something amazing, and it was unfortunate that those days decided to turn up at the D-Day, but hey, that's not the end of the world! I'm going back to many more Hackathons with more amazing projects.

2. PassportJS Necessity: Learning the library PassportJS isn't a knowledge enhancement for me anymore. It's the significance of fighting the enemy which defeated me once. I couldn't make a login system, and for the next few days, building many different types of login systems is going to be my objective. Soon enough, I'll also reveal an amazing project related to login systems.

Credits:
I would like to thank our mentor - Vishal Choudhary sir for his guidance, and of course, my teammates for this experience, Abhishek Agarwal and Anshita Vishwa.
Here's a pic:

Our team preparing for the presentations


Alright, that's my story for the second Hackathon of my life. Hope you enjoyed it!

Comments

Post a Comment

Popular posts from this blog

i3wm essentials - II

Welcome back! Let's continue this guide with other setup essentials for i3. Enabling Mousetap Chances are that if you're using a laptop, then tapping on the mousepad does not equal a click for you. You need to enable tapping in your config. Fortunately, there is one documentation available that works for majority of the setups. I don't need to explain this one in detail. Here you go: Enable tap to click in i3 . Volume Control This one is simple again. Do you remember the i3 config file I talked about in the previous blog ? All you need to do is go to that file and find the line: bindsym XF86AudioRaiseVolume Just below that line you will find lines with XF86AudioLowerVolume and XF86AudioMute too. Anyway, the truth is, there are 2 sets of lines with these keywords. Chances are that the line: bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume 0 +5% Will be uncommented and the line: bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink vo

Namaste JavaScript Quick Notes

Note:  Akshay Saini's Namaste JavaScript is probably the best course for JavaScript developers out there. These are my personal notes that I made while watching the course; they serve more of as an online quick reference for my understanding and revision, and I hope it benefits anyone reading it too! Everything in JS happens inside an Execution Context. Before a JS code is run, memory is allocated and variables are set as undefined   , and functions are set as their exact code in the scope within the Execution Context. The global execution context hosts all the global variables and function definitions. An Execution Context has 2 components: Memory, that stores variables and functions; and Code, that reads and executes the code. Call Stack maintains the order of execution contexts. Since JS is single threaded and asynchronous, at one point of time, only one function is executed which is at the top of the call stack. For each function, an execution context is created before executi

i3wm essentials - I (Brightness)

So you have started using i3 and somehow managed to open your browser and almost resumed your normal work.  But wait, the brightness is too much isn't it? Or is it too low? The mousepad used to work fine, but now all of a sudden tapping does not equal click?!  Don't worry.  This blog series will tell you all about the essential setup commands and common shortcuts that I use to navigate my work in i3, and how you can too. Changing the brightness So you just started i3 and you just can't take this brightness setting. You go for your function keys, and damn! They aren't working. Quick fix: Run the following command if you need to change the brightness ASAP. xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1 This will give an ouput that's the name of your monitor.  Use that monitor name here and change the values of brightness to suit your needs. xrandr --output <monitor-name> --brightness 0.7 Now that your eyes are comfortable, let me show