Skip to content

Instantly share code, notes, and snippets.

@ABHINAV-JHA-27
Last active December 14, 2023 09:50
Show Gist options
  • Save ABHINAV-JHA-27/b8134cb95e9304ee1bc38dde666432b0 to your computer and use it in GitHub Desktop.
Save ABHINAV-JHA-27/b8134cb95e9304ee1bc38dde666432b0 to your computer and use it in GitHub Desktop.
Google Summer of Code 2023
gsoc sugarlabs

Final Work Submission Report

Proposed Objectives

  • Redesign the Bricks Component and the Way the handle interactions
  • Redesign the Collision Detection Algorithm
  • Create a Workspace component which will have a
    1. Palette Component
    2. Canvas Component
  • Refactor the prototype code
  • Create a wrapper component Project Builder (builder) in musicblocks-v4
  • Add utilities to the wrapper component so that the Project Builder component can communicate with the Specification and Syntax Tree APIs of the Programming Framework

Objectives Summary

The primary goal was to construct the new Project Builder Framework for Music Blocks (v4). This framework serves as the graphical module responsible for managing blocks, enabling the creation of Music Blocks programs. A prototype was available in the musicblocks-v4-builder-framework repository.

In addition, we aimed to establish an architecture that promotes decoupling from the DOM, enhancing the efficiency of interactions. The shift towards a monolithic structure and modular approach was also crucial, aimed at simplifying maintenance and management tasks by division of the project into smaller and simpler components that could work independently without any reliance on other parts of the framework.

Objectives Completed

Redesigning Brick Component

Revamped the Brick Component using the Model-View-Controller (MVC) design pattern, leading to a more streamlined and efficient structure. This redesign significantly reduced the size of the Bricks Component while also enabling development that is decoupled from the Document Object Model (DOM). The MVC pattern improved code organization and separation of concerns, enhancing maintainability and facilitating future updates.

Improvision of Collision detection algorithm

Enhanced the collision detection algorithm by implementing a Quadtree-based approach. This advanced technique optimizes collision detection performance within the Music Blocks framework. The Quadtree algorithm efficiently organizes and checks for potential collisions, resulting in improved responsiveness and accuracy when handling block interactions.

Creation of Palette Component

Designed and crafted the Palette Component as an integral part of the Music Blocks framework. The Palette Component offers users a curated selection of available blocks, simplifying the process of adding elements to the Canvas and enhancing the overall user experience. It has three sections each of which contains different sets of Blocks ( Now known as Bricks ) which can be used by user by dragging them from palette to canvas.

Creation of Canvas Component

Developed the Canvas Component, a fundamental element of the Music Blocks framework. The Canvas Component provides users with a dynamic space to arrange and interact with various blocks, enabling the creation of complex programs in an intuitive and visually engaging manner.

Drag Handlers HOC

Implemented a Higher-Order Component (HOC) that facilitates the attachment of drag handlers to individual brick instances. This HOC streamlines the process of adding drag functionality to bricks, enhancing the overall user interaction within the Music Blocks framework.

Future Work

Bringing Pieces Together

All the necessary components have been developed independently, and now it's time to integrate them together.

Adding Feature Supports

Even after the program's completion, I intend to continue contributing to the project. Our plan is to gradually incorporate various feature supports from musicblock v3, one by one, and further enhance their capabilities.

Blogs

Throughout the duration of the GSoC program, I received encouragement from my mentors Anindya Kundu and Walter Bender to create blog posts elucidating the progress and details of my project. Presented below is the compilation of all the blogs I authored during this period:

Description Blog Link
Journey of my GSOC Project: Exploring Limitless Creativity Music Blocks V4 Link
Journey through GSoC: Highlights of my work in Weeks 5 and 6 Link
Journey through GSOC : A Peek into Week 7 and 8 Link
Journey Through GSOC : Countdown to Finish Link

The past three months have been an incredibly enriching learning journey for me, and I'm truly thankful for the knowledge and experience I've gained. My programming skills have shown remarkable improvement during my participation in GSoC. Initially, my familiarity was limited to JavaScript and React. However, over this period, I've delved into the inner workings of the framework.

This project has not only deepened my understanding of React but has also exposed me to the development practices at a larger scale. It offered insights into better software design for enhanced maintainability. I've honed my ability to write clean and organized code, and I've acquired proficiency in crafting robust test cases to ensure the dependability of my codebase. Altogether, GSoC has furnished me with practical, hands-on experience that has significantly elevated my programming prowess. I'm enthusiastic about applying these newly acquired skills in my future undertakings.

@antima123-bit
Copy link

Security- Pay attention to security concerns, especially if the Programming Framework API deals with sensitive data or has authentication requirements. Implement secure communication protocols if needed.
her some code You can use
INPUT VALIDATION CODE
#include
#include

int main() {
std::string userInput;
std::cout << "Enter your name: ";
std::cin >> userInput;

// Input validation
if (userInput.length() <= 50) {
    // Process input
} else {
    std::cerr << "Input is too long.\n";
    // Handle the error
}

return 0;

}
AVOID BUFFER OVERFLOW
#include

int main() {
std::vector numbers;

// Add elements to the vector
numbers.push_back(42);

// No risk of buffer overflow
return 0;

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment