Inspiration

Jacqueline recently read a book called "The Pragmatic Programmer" and one of the issue from the book really stood out to her was: "Be an evil wizard (a lazy one that use magic for things!), don't write code that can be generated, write code that matter". We have been programming for a while and one of the thing all of us notice is that a lot of time, we write a lot of code that could be easily generated (for example: get set function, inheritance/extend, etc). So we decided, "Hey, why not make something that can generate the code for you, do all the hard work for extension, so that when we actually write code, we write meaningful code? And just like that, viola, CGen were created

What it does

CGen is essentially a rapid prototyping tool, it allow you to quickly make classes, functions, and variables from a UI, then when you are finished, CGen will generate the text file (and in the future, a zip file with proper folder and everything) for you so you can load it up to your favorite editor and code.

Currently, we have finished:

  • Core functionality: create classes, functions and variables, move them around, display them logically so you know how the structure of your code will look like
  • Basic code generation to javascript (We know, we are using javascript to generate javascript)

Featured we planned on but didn't get the chance to work on:

  • Basic integration with github, originally we thought it would be really awesome if what you create with our tool can automatically be created on github so you can just clone it and get going, though as you can expect, that is actually a lot of work and there were simply no way we could finish the tool and do that in 24 hours.
  • Multiple language support, originally we planned on doing javascript and python, but we ran low on time and dropped python.
  • More in dept/complex tool. We wanted to do nested class, nested function, variable inside functions, constructor and parameter, but we only finished function and variable in class.

Known bugs:

  • Dragging and drop functions/variables in and out of a class will mess up the location until you drag them again.

How we built it

  • We built HTML and CSS to create the site and use Javascript for functionality. We also used InteractIO for drag and drop and FileSaver.IO for save to text file.

Challenges we ran into

  • Each of us faced different challenges as we worked on different part of project, but one of the biggest challenge we faced were to work together as a team. Almost all of us never used git before so we had some trouble setting it up, getting it to work, merging, and collaborating. On top of that, sometime we misunderstood each other's idea, and then when we implement it, it doesn't turn out to be right, and it can be quite demoralizing when you have something work but it doesn't exactly work.
  • All 5 of us are from PSU-LV, we had to pack up things and drive 3 hours to get here, and then 3 hours to get back.
  • Outside of what mentioned above, we faced general difficulties that many other people faced: working with new technology, learning new language on the go, finding the energy to work for 24 hours (we failed, we all went to bed), etc.

Accomplishments that we are proud of

  • At the very least, we actually got a working tool, that alone is an accomplishment for us, given that we never programmed with each other before and none of us had any programming-in-a-team experience.
  • Jacqueline is really proud of being able to mentors 4 of her friends to code and taking lead on the project
  • Andrew is very proud of making the output to text file work.
  • Collins is really proud of his design for the site.
  • Johns is just proud that he get to work on a project with his friends and actually finished something that he deemed to be worth showing off.
  • Brian is proud of everything we did... everything (in his word)

What we learned

  • We learned to estimate better; Jacqueline setted aside milestones for us and have goal that we are "expected" to finish at x o'clock. She estimated some stuff really well, other... not so much.
  • We learned to communicate better. It is really hard to put an idea to the whiteboard, leave alone describing it to someone. We tried to explains topic in different ways to help the other person understand.
  • We paid a really hard price when we overworked ourselves and some of us passed out for approximately 6-7 hours, that ruined some of the useful time we could had used.
  • Obviously, we learned 2 new API that none of us ever used before, and for some of us, we learned how to use HTML/CSS/Javascript for the first time. ## What's next for CodeGenerator
  • We will go back and implement in all the features that we haven't got a chance to implement yet and fix bugs on the way.
  • Refactor the code, we need it, and we need it badly! Code we wrote here were meant to last for 24 hours, not for long term as we allowed some slobby hack to pass through so we could save time to work on other things.
  • Share it with the public! We strongly believe in open source and would like our work to be used by other if possible.

Built With

Share this project:

Updates