Our team is composed of three blockchain trainees and two senior java developers from our company. We are the pioneer batch of trainees to undergo training to become blockchain developers but as this technology is new even to the senior developers at our company, our understanding of this technology is still superficial.
We are only halfway through our training and we are working our way up from Java to Blockchain to ease us into the new technology. Little did we know that we’d dive right into #DISH2019, totally unprepared and with only partial knowledge about the craft.
When we learned that we were going to take part in the hackathon, the whole team researched and tried to learn about everything as much as we can absorb, we also looked into the possible use cases that would fit into DISH2019’s theme: “Inclusive Prosperity”
During our research, we had a hard time looking for use cases because the theme was vague to us back then, but at the same time, our research helped us a lot to grow as developers.
Joining the hackathon, we are not expecting anything else other than learning and enhancing our understanding about this new tech. Win or lose, we know that we will be going home with something worth more than what we came for.
As for preparation, our goal was to familiarize ourselves with the concept of blockchain as much as we can. Most of the content we studied came from various Youtube talks and tutorials, a Udemy course, Cryptozombies, and the documentations for Ethereum, Ganache, etc. We also attended a crash course on smart contracts using Ethereum.
During the event all of us are nervous but excited at the same time SINCE THIS IS OUR FIRST TIME JOINING A HACKATHON! Honestly, we are not scared to lose. For us winning will be a miracle. All we wanted was to learn more about our supposed specialisation and build our knowledge on a new technology that only few in the world know so much about. Fortunately, awesome people from Blockdevs Asia were there to help us out.
Prior to the coding session of the Hackathon, the event had these “Breakout” sessions where representatives of different blockchain platforms allow interested groups to ask questions about the platform and know more about the features each platform can offer.
Among the platforms presented, our team leaned towards IOST. We were curious about IOST since it was new and had features that fit better with the ideas that we had. It was then that we found ourselves in a conference room for a quick introduction to IOST with the CTO himself, Terrence Wang.
After the talks about the different blockchain platforms, we started finalising our topic. It was hard for us to decide as all of our ideas were solid and well thought of. The only question is the do-ability in that specific amount of time. From sperm bank, to organ donation, to scholarships and to many more, we arrived to the conclusion that we were going to make a quiz game.
The goal of the app is for the clients to sponsor trivial games that aims to promote ideas and awareness about different issues concerning the likes of the environment, voting, or health.
Sponsors (clients) will fund the quiz game which will serve as the prize pool and payment for the player’s gas costs. A percentage of which will be taken as service fee.
STARTING THE APP…
We modelled our DApp. We planned to use Firebase as a way to store our questions but we had a hard time running the test net. As there was no time to dilly-dally , I jumped to the old-fashioned MySql. So, in our backend, we have to set up the my-sql connector. Luckily, there is JPA to ease our lives and made the code cleaner since I avoided the use for the DML of SQL.
For our front-end, we made the UI using Angular-material.
tried setting up the node locally. Again relying on the documentation with some panicking as there are some errors involved. (sorry for the lack of documentation for it).
With a lot of discussion in the team sharing what we can understand from the documentations and the available materials in the web, we made our smart contract.
Here’s the link to our smart contract, since it is a bit long(not so ideal to paste here):
The quiz contract is for the sponsors to create the quiz. For our prototype, we are requiring the sponsors to pay 5 iost as a quiz fee plus the prize pool (of course it is a tentative price).
The players that gets the correct answer will be appended to the blockchain, but not all are eligible for the prize as we want to filter the players, therefore the need for elimination. Let’s say players A,B,C, D and E are playing the quiz and they all answered the quiz correctly. They will now be added to the list of winners.
And then in the next item D got it wrong, and was eliminated. Players A,B, C and E will now be added. And for the next item D (who got the previous item wrong) answered it correctly this time. Sadly he is not in the latest list of surviving players which means he is not eligible to be appended. The elimination goes on until the quiz is finished and the reward is distributed.
We have a lot of ideas on how are we going to improve our DApp, but due to the limited time we just do what is quick and applicable in that span of time. The hackathon is a fun way to learn a lot of things and meet people. From what I learn as a first timer:
- DO NOT BE SCARED TO TRY THINGS
Don’t be scared to try to learn new things. If you think that you are going to flunk because all your competitors know what they are doing, you are wrong. Use this as an edge to push yourself to be curious. There’s a lot of docs and stack overflow is there when you are down :P. But sometimes you have to see it for yourself (open ur code editor).
- DO NOT PANIC
Never ever, ever ever ever panic. Well, sometimes it can’t be avoided. But try some breathing exercises or browse reddit. Clear your mind to allow ideas to come in.
- DON’T BE SHY TO APPROACH THE MENTORS
This is very effective. And by the way, to our technical mentors ,Caspar Oostendorp and Amadeo Brands, Thaaaaank You so much.
Listening to their tips are great help especially when you are having a secret mental block or getting lost during developing. They will help you find the right path.
- DON’T BE AFRAID TO SOCIALIZE
This is a great opportunity to meet new people and learn more about new things inside and outside the hackathon.
- DON’T BE AFRAID TO LOSE
For us beginners, sometimes pressuring ourselves to win put us in tremendous position where our mind is set to win. Well it is not bad to think that way but many suffer panic attacks because of this. Thus preventing us to give way for greater ideas and learning.
LEARNING… is what we need. Absorb everything like a sponge.
Before I end this blog, I would like to thank our awesome mentors, Caspar Oostendorp and Amadeo Brands, who guided us during development. They made working with a technology in infancy much more bearable and learnable since there was almost little documentation on how IOST works. We would also like to extend our gratitude to Roy Selbach and Mark Vernon who helped us fine-tune the business aspect of our prototype by sharing their insights and positivity with our product. And to Miss Tracy Li who invited us to join this Hackathon.