The Checker — Hack Day Challenge

Hack Day Chronicles from START to MVP

Erika Caoili
7 min readMay 22, 2020

The CHECKER. Any Holberton student will tell you if the Checker was a worthy foe or friend. Whether it was a love or hate relationship, I had a lot of R-E-S-P-E-C-T for the Checker. What is the checker? Before, I get to explaining the automated tool. I will first tell you about Holberton School.

Background

Holberton School is a Full Stack Software Engineering program. It’s a 2 year program and in the first year, students go through Foundations. The first year covers all the necessary curriculum to be a Full Stack Engineer. You learn the backend and frontend stacks to make an application. You learn about databases, networking, web infrastructure, and DevOps. You learn what it takes to create a full working web application. We apply concepts and skills to build an AirBnb clone and eventually, your own app.

My team and I are currently on the last trimester of our Foundations year. In the third trimester, we apply what we learn so far in events like Hackathons.

What is a Hackathon?

It’s also called, Hack Day, HackFest, or CodeFest. A Hackathon involves computer programmers and others involved in the software development. It’s a design sprint-like event that requires everyone to work together to get a product deployed. There’s a time constraint. Usually, the event can take 24 hours of nonstop coding, sprinting, and developing until the product’s deployment. In our case, the Hack day lasted about 12 hours.

An IDEAL Hack Day. Due to Covid-19, it’s a special hackathon. WFH HACKKKKK DAY!

What do you learn at a HACKATHON?

This is not my first Hackathon, so before I talk about our Hack day challenge, I want to share some key takeaways.

  • No matter what experience you have…anyone can add value.
  • Speak up! If you have an idea, SHARE! In order to add value, you have to be involved.
  • ASK QUESTIONS…many questions… it can be anything!
  • Be happy for small victories.These sprints can be exhausting and can also, put a lot of pressure on everyone individually. To be successful, keep an eye out on the parts that are working and doing well. Maybe you’re not solving the problem, but everyone is working together and collaborating. Everyone is motivated to help one another and to achieve some sort of improvement.
  • Don’t give up. You’re not alone in this quest. Use collaboration to your advantage.
  • Take breaks, stretch, eat, drink water, and HAVE FUN!

Roles

It’s NOT only for computer programmers. Anyone can participate. Everyone should participate because creating a product in a small timeframe is an ALL HANDS event. Every person has a role and each person makes a valuable contribution to the overall product. Everyone who plays a role in the software development takes part in the Hackathon. For instance, in our Hack Day Challenge, we have a:

- CEO: ME!! (I attend "Board meetings." At these meetings, I ask school staff all the necessary info to complete the challenge and to ask questions for my team.)
- Product manager: Ben (He actually has many roles and mainly, our CTO)
- Backend Engineer: Bob Machine (my fave nickname for him)
- Frontend Engineer/UI/UX Designer: Anthony
- SWE responsible for Documentation: Ken (every product always has good docs)
- Public Relations/Videographer: Raudo (Demo of our product, link to our video on the bottom)
- Blog Writer: Me (a log of our Hack day)
The Team!! REMOTE WFH HACKATHON at its greatest. I didn’t want to bug them to open their cameras haha. They are busy working.

What is the Checker?

At Holberton, the school and program is global. Our school is in San Francisco. There are also other campuses around the world. Holberton is in New Haven, CT, but also in, Puerto Rico, Columbia, Tunisia, Lebanon, and Uruguay!

In order for our school to scale globally, school operations need automation. Automation allows for operations to run smoothly and to provide students from all different backgrounds to enroll in the program.

The Checker allows automated grading by running our tasks through the program to check our code. I will show you an example task and an overview of how The Checker works.

Example Task in a Project

At Holberton, we use GitHub to push our code. The Checker grabs the info from our GitHub that corresponds with the Project Number and Task. In this case, the following task is from project number: 0x00-hello_world. Below is an example of the project task 0.Preprocessor.

Write a script that runs a C file through the preprocessor and save the result into another file.

Here is my code:

#!/bin/bashgcc
-E $CFILE -o c

Before you run The Checker

You click on the button ‘Start a new test’

This is what The Checker looks like when I get the answer correct.

The commit ID corresponds to the commit ID of the (most) current push of code from Github.

Here is an example of The Checker showing the student red checks, which means that the test showed wrong output checks. The code is not completely correct and needs modification to pass the output checks. The Checker also checks for requirement checks. These checks look for required fields and parameters included in the task. These checks also include formatting checks such as Betty for C and pep8 for Python 3.

The Checker can also, check an algorithm’s efficiency and the yellow square tells the student if there is an efficiency fail. Efficiency refers to the time complexity of an algorithm. (Note: Different task from the first example)

The Hack Day Challenge

This is our problem and we have 12 hours to create a MVP.

The First Two Hours…are CRITICAL.

Everyone on the team must understand what the problem is and how to solve it. What is the MVP? And how do we get there on time? I outlined for you how our team used our time during this period.

  1. READ: We took about 15–20 minutes to look over the problem’s mandatory tasks and to study the Checker API. What are the endpoints? How many requests can we make?
  2. DEFINE: We brainstormed on ideas on what we wanted to do. We created a Google doc and recorded different ideas. We also defined what our MVP is. We talked about features and basically, had a running discussion. After some deliberation, we all decide as a group what we wanted to build.
  3. ROLES: Now, that we understand what our end product should be, we deliberated over roles and responsiblities. The picking of roles was laid back and it was nice to choose a role that we wanted. I of course, chose CEO! Bob, who wants to be a backend engineer chose to work in that end. We did all decide that Raudo would be perfect as our PR and Videographer. If you watch our video below, you will see why.
  4. PLAY: We have check if the API works and do some tests before we create our own Checker.
  5. PLAN: Back to our Google doc, our Product Manager, Ben

API — Application Programming Interface

We will be working with APIs. It’s a software intermediary that lets two applications talk to each other. Basically, an API is a messenger that delivers your request to the provider that you’re requesting it from. The API in turn, delivers the response back to you.

For example, when you visit www.google.com into your browser, you’re making a request. The request is sent to Google’s remote server. Your browser gets a response from the server and displays the Google home page. You can think of the Google server as an API.

We will be working with the Checker API. The Checker scans our code for errors and tests our code if its correct. Being able to create our own features to the Checker is a neat way of learning how the Checker interacts with the users.

What does our Checker do?

We created a Checker CLI. A CLI is a Command Line Interface. We interact with the Checker on the web browser. However, we do all of our coding on the terminal via our text editors (Vim or Emacs). Wouldn’t it be nice to do all the checking in one place? This is a nice feature to have and it’s a great way to improve work productivity.

Checker Command Line Interface

In order to use the Checker, we will have to authenticate the user credentials. When you run the checker, the User will be asked to enter :

Please enter API key:123a5a7y899abcde3zyx0u4be019f1234
Please enter your holberton email: user@holbertonschool.com
Please enter your holberton password: abc123

The User credentials get saved in the authentication token. This token is the key to make calls to the Checker API. The Checker CLI has commands

status <project_id> [task_num] -- Gets the status of a certain projectproject_id = The ID of the project to get the status of check <project_id> [task_num] -- the most important command that checks your         project task help -- spits out options for the user when running the CLI

Color Codes — when running the checker:

White: Task has not been checked by the Checker CLI
Red: Task has NOT passed all green checks
Green: Task has passed all green checks
Task 3 is complete and correct. Task 4 is wrong. The other tasks are not checked by the checkerCLI.
Checks have not been made

Example of a Task being checked

You run the executable ./checkercli.py + command check with project_id and task_number. The message “You are Error” is printed when a task is wrong. The messages are randomized.

Help Command

Options of what you can do with the CLI.

To see a live demo of how the Checker CLI works, watch here

Conclusion

This is my second hackaton and I really enjoyed it! I think our team did a great job of completing a MVP by the deadline. Also, we all worked together not to just code the program, but to create a video and a blog post.

--

--