Programming for beginners can be frustrating and overwhelming. Finding errors in code and debugging isn't all the fun. So, we ask for help. We explain our train of thought and rationale behind the code. Then suddenly, wait, oh that's why it wasn't working!
Explaining your ideas to someone allows you to process and find greater, better solutions. Try it, you might be surprised how useful it is. In code debugging, there is this term called: Rubber duck debugging. In which, one explains their code to a rubber ducky.
So, how do we make this practice better? Buttons! Fidget toys help a user channel their energy into the toy, helping them to improve focus. By combining a rubber duck and fidget toy, I aim to create the ultimate coding companion.
What it does
Agent Bucky is a ducky to help debug(gy).
Bucky's debugging services: It has buttons for users to fidget with. If Bucky detects high-stress levels from the user (a lot of button presses), it calls and asks the user to explain their code to him. If after the session, the user is still stuck, Bucky will redirect them to an online resource for more help.
Bucky's logs: Every time the user speaks to Bucky, it saves the conversation, uploads it and is available for viewing online (or by accessing the Html file).
Bucky's adventure: Continue spamming clicks on the webpage and let Bucky tell you fun programming memes.
How we built it
- Elegoo Uno R3 Arduino board. Program the physical buttons and light up when pressed. When a certain number of clicks are made, create a signal to activate Bucky.
PySerial, a python library. For serial connection to the board.
SpeechRecognitionpython libraries were used to allow users to communicate with Bucky.
spaCy, a Natural Language Processing (NLP) library.
spaCywas used to process the user's words and collect key information about the conversation with Bucky.
After collecting information with NLP,
googlesearch-pythonsearches with the keywords and delivers reference online resources to the user.
CSSto create skeleton of website.
jQueryto parse the chat logs. And, to create the clicker game. Game uses
Meme_apito obtain memes from r/ProgrammerHumor.
Google Cloud Storagebuckets, was used to create demo website.
Challenges we ran into
- As this was my first time creating a hardware hack, I had to a lot of trial and error. At one point, the LEDs were so bright that it was starting to hurt my eyes. As such, I had to make sure that I'm using a stronger resistors to reduce current flow.
- Figuring out how to use Python with the board and finding the port to connect to my application.
- Not gonna lie, there were times where the speech recognition library could not understand my voice. (which let to some hilarious text)
Accomplishments that we're proud of
- My first hardware hack and it works!
- Understood how breadboards work and how to connect things to it.
- Utilising NLP with my hack.
- Managed to host my demo site with Google Cloud Storage bucket.
What we learned
- Physics. Resistors, Ohm's Law.
- How hardware works. More specifically, Arduino.
- Learned more about NLP and how to use it in my project.
- Learned about cloud storage.
What's next for Agent Bucky
- Store the chat logs in the cloud.
- Create a more functional website with authentication.
- Improve on the speech recognition portion by reducing times whereby the output is wrong through autocorrect and training models.
- Sync the physical clicks to the web clicker game.
- Add a storyline and characters to the clicker game. (more info below)
What's the story behind the clicker game on the demo site?
Firstly, it's called: Bucky's debugging agency. Currently, it is barebones. The player plays as Bucky's new employee, helping others with their problems. To help, the player clicks on their avatar as much as they can. They gain points the more they click. As they reach certain point milestones, more of Bucky's employees appear in-game. Also, there will be storylines as players get past more levels. Players are able to exchange points for upgrades to help them 'click' (oh no the robots are taking over...) This fun game is a great support as players are able to read their past chat logs with Bucky and revise materials from past debugging session.