Originally we wanted to create a joke program that would generate Python from Java, that would then generate code for another language, then back to Python, forming a loop. Then we realised it was a terrible idea - but it inspired our current idea. Josh is also working for a charity as part of his university coursework that wants Scratch and Python content to teach to kids, and realised that a program like this would actually aid the project greatly.

What it does

It takes its own form of the classic Scratch drag and drop of "nodes" or "blocks" into a panel that then compiles into real code in real-time. There are a few basic building blocks for programs, with categories covering variables, conditions, operators, loops and functions. Supported languages currently are Java and Python, but the backend is generic enough to make it easy to add support for new languages.

How we built it

Pain. More pain. Success! More pain. Success! Pain all the way till the end.

Challenges we ran into

JSwing being annoying. More specifically, dragging and dropping our blocks into the function panels. This was because JSwing does not implement draggable transfer handle by default onto JPanels... which is the only component type that we could use to make our idea work. In fact, a lot of Java being really annoying moments, like Java generics.

Accomplishments that we're proud of

Implementing our own drag and dropping support for JPanels, graph structure, staying awake (except Sammy), and the serialization/deserialization to save/load the code blocks as JSON.

What we learned

That Java is still bad, that JSwing can be really annoying, and that GitHub Copilot is seriously underrated.

What's next for Drag'on Drop

A couple of us think that we may continue to work on the project to polish it via bug fixing and artistic touchups, add support for a couple new languages, and maybe add more node types.

Built With

Share this project: