www.inf.ed.ac.uk A User Interface for adding Machine Learning tools into GitHub Rumyana Rafailova
www.inf.ed.ac.uk Motivation • Understanding a new codebase – evaluating open-source software: • Algorithms • Data Structures • Coding standards – understanding core functionality at a high level • Common problem • Automated tools can – Save a lot of time – Solve the “chicken-and-egg” problem
www.inf.ed.ac.uk Project Aim • MAST tool – Machine Learning: – Takes some code – Produces a summarised version of it – boilerplate blocks folded away • Project aim: Build a user interface for it • Feature not currently available in IDEs – Except for some trivial decisions (Java imports) • Manual folding not available while browsing GitHub
www.inf.ed.ac.uk System design - technologies used • Front end: – HTML/CSS/JavaScript – Ace Editor • Core functionality: JSP/Tomcat – communicates with backend – builds HTML/JS for frontend • Back end: – MAST tool (jar) – Git repositories on the server
www.inf.ed.ac.uk Back end • Popular GitHub repositories cloned on local server • MAST tool – Model – Jar file • Input: file to fold + compression ratio • Output: line numbers to be folded
www.inf.ed.ac.uk Core functionality • Backend jar file called by JSP page • fold.jsp: code editor functionality – generates HTML/JS for editor – can function separately
www.inf.ed.ac.uk Core functionality • browse.jsp: file browser functionality – recursively traverses server's file tree – generates HTML file tree • Indented • With each scope in its own div – custom methods needed because of JSP limitations: • Compatibility with Java libraries • Internal JSP objects
www.inf.ed.ac.uk Core functionality • editor.jsp: – includes fold.jsp and editor.jsp – compiles and executes them as separate servlets – compression ratio slider functionality – general HTML skeleton
www.inf.ed.ac.uk Front end • HTML4-compliant, HTML5 for ratio slider – with JS for compatibility with older browsers – chosen over heavier ways to achieve this • Ace Editor: code display and folding – open-source – used by GitHub – allowed to extend initial project goals – some functionality adapted via JS: • feedback button – only front end implemented
www.inf.ed.ac.uk Evaluation • Usability: – simple interface – URL rewriting (Tomcat configuration) • Modularity: – browser/editor functionality independent • Maintainability - possible to – extend to more than .java files – switch to only showing current project in code browser – change appearance • Portability: – Tomcat configuration specific to application, described within its directory
www.inf.ed.ac.uk Evaluation • Regression testing – Test case URLs generated with their expected HTML – Compared with the actual server output: wget – Tests performed on 3 popular GitHub repositories • GUI testing – Manually throughout implementation – On multiple recent versions of Firefox and Opera • Testing on more browsers difficult: application isn't hosted
www.inf.ed.ac.uk Thanks! Questions?

A User Interface for adding Machine Learning tools into GitHub

  • 1.
    www.inf.ed.ac.uk A User Interfacefor adding Machine Learning tools into GitHub Rumyana Rafailova
  • 2.
    www.inf.ed.ac.uk Motivation • Understanding anew codebase – evaluating open-source software: • Algorithms • Data Structures • Coding standards – understanding core functionality at a high level • Common problem • Automated tools can – Save a lot of time – Solve the “chicken-and-egg” problem
  • 3.
    www.inf.ed.ac.uk Project Aim • MASTtool – Machine Learning: – Takes some code – Produces a summarised version of it – boilerplate blocks folded away • Project aim: Build a user interface for it • Feature not currently available in IDEs – Except for some trivial decisions (Java imports) • Manual folding not available while browsing GitHub
  • 4.
    www.inf.ed.ac.uk System design -technologies used • Front end: – HTML/CSS/JavaScript – Ace Editor • Core functionality: JSP/Tomcat – communicates with backend – builds HTML/JS for frontend • Back end: – MAST tool (jar) – Git repositories on the server
  • 5.
    www.inf.ed.ac.uk Back end • PopularGitHub repositories cloned on local server • MAST tool – Model – Jar file • Input: file to fold + compression ratio • Output: line numbers to be folded
  • 6.
    www.inf.ed.ac.uk Core functionality • Backendjar file called by JSP page • fold.jsp: code editor functionality – generates HTML/JS for editor – can function separately
  • 7.
    www.inf.ed.ac.uk Core functionality • browse.jsp:file browser functionality – recursively traverses server's file tree – generates HTML file tree • Indented • With each scope in its own div – custom methods needed because of JSP limitations: • Compatibility with Java libraries • Internal JSP objects
  • 8.
    www.inf.ed.ac.uk Core functionality • editor.jsp: –includes fold.jsp and editor.jsp – compiles and executes them as separate servlets – compression ratio slider functionality – general HTML skeleton
  • 9.
    www.inf.ed.ac.uk Front end • HTML4-compliant,HTML5 for ratio slider – with JS for compatibility with older browsers – chosen over heavier ways to achieve this • Ace Editor: code display and folding – open-source – used by GitHub – allowed to extend initial project goals – some functionality adapted via JS: • feedback button – only front end implemented
  • 10.
    www.inf.ed.ac.uk Evaluation • Usability: – simpleinterface – URL rewriting (Tomcat configuration) • Modularity: – browser/editor functionality independent • Maintainability - possible to – extend to more than .java files – switch to only showing current project in code browser – change appearance • Portability: – Tomcat configuration specific to application, described within its directory
  • 11.
    www.inf.ed.ac.uk Evaluation • Regression testing –Test case URLs generated with their expected HTML – Compared with the actual server output: wget – Tests performed on 3 popular GitHub repositories • GUI testing – Manually throughout implementation – On multiple recent versions of Firefox and Opera • Testing on more browsers difficult: application isn't hosted
  • 12.