Inspiration

Apparently, a lot of kids in our CSE 114 Java Class had a hard time going from Python to Java, and frankly we had a hard time going from Java to Python! So, we made a translator!

What it does

Takes a command input from either Python or from Java, and outputs the most similar command in the opposite language.

How we built it

We decided to use Java and JavaFX to really drive home the whole Java thing. We used a left TextArea to allow user input, and a right TextArea to place the translated command. Buttons served as the driving force for the program, pushing the events to run. We used arrays to compare the commands by index, along with their respective descriptions.

Challenges we ran into

When testing the program, a stray greater than sign caused all of java commands to be translated to the first index of the python array. Also, we tried to allow for the user to simplify their commands. For example, they could enter Math.round instead of Math.round(x). This was painful has when using the str.contains methods, and Math. whatever command was up for grabs as to what would be used for translation to python, and also getting Array index overage errors when checking the substrings. There were many more, but you know, late night coding, you forget!

Accomplishments that we're proud of

Our first official use of a GUI, although a simple one. Gathering user input in a way that involved more than just entering text into a console was a step up. Also, this is our first standalone program that could be run outside of an IDE.

What we learned

hackNY has great food! No but in all seriousness it was a good experience, we learned a lot about FXML coding and referencing, text and other object manipulations, array conversions, and Python (neither of us knew anything more than the basics prior!) Also we learned that hackNY is such a friendly and inviting atmosphere, we both met a lot of people who worked on a ton of great and interesting projects, a lot of them featuring the cool API's we had available to us.

What's next for TransCode

Further development with more commands, more languages, online availability, and suggested entries to make translations easier, to name a few.

Built With

Share this project:
×

Updates