Giter VIP home page Giter VIP logo

hightail's Introduction

Hightail

Hightail is an automatic tester for programming contests such as CodeForces rounds. It will parse the problem statement, extract sample test cases (inputs and outputs) from it, and verify the correctness of your program against them. It is built to provide maximum automation and to relieve the contestant as much as possible.

A list of Hightail's features:

  • parsing problem statements
  • parsing entire contests (autoloading all problems)
  • scheduling contest parsing ahead of time
  • ability to comfortably view, edit and add test cases
  • handling of all verdicts: WA, TLE, RE, even AC
  • customizable time limits
  • ability to create in/out files in your working directory
  • detection of floating point values (comparing 0.1 vs. 0.10 does not give WA)
  • easy-to-use UI, keyboard shortcuts
  • resilient: it is multi-threaded so it will not let your program hang it; it will withstand large amounts of output from your program
  • support for all contest languages (C++, Java, Python, ...)
  • written in Java and should run on any OS

It supports the following online judges:

  • CodeForces (incl. Gym)
  • CodeChef (experimental)
  • AtCoder (now also live-running contests!)
  • Jutge.org
  • Open Kattis

Additionally, the Competitive Companion browser extension can be used to parse problems and contests from the browser. It is available for Chrome and Firefox. It supports many more online judges than the above (Google Code Jam, Facebook Hacker Cup, ...). Just install the browser extension, run Hightail, go to a problem/contest, and click the green plus button in your browser - it should parse and load into Hightail.

We do not plan on supporting the TopCoder Arena: it is a different architecture, and there are a lot of good plugins available for it. Also, if you use Java for contests, we recommend to take a look at Egor Kulikov's CHelper for IntelliJ IDEA.

Screenshots and screencasts

Screenshot of Hightail Screenshot of Hightail

Short video of using Competitive Companion to parse tasks from the browser.

Hightail also appears in dj3500's screencasts. See this one for an example.

How do I get Hightail?

To get a fairly up-to-date version - in the form of a .jar file which is ready to run if you have Java (JRE) installed - visit Downloads. Just save it somewhere on your computer and run it from there. It will create a config file in its directory.

An alternative way, if you're on Linux and have snap installed, is to run sudo snap install --edge hightail. Then Hightail should auto-update every day (to the latest code from the master branch). (currently this is broken)

You may also compile Hightail from source code using the instructions below (and then you will also be able to work on the code, e.g. to help in development), or by following http://codeforces.com/blog/entry/6941#comment-125761 (which might be a little easier - or not).

How to download the code and work on Hightail?

Hightail is developed in NetBeans (the UI in particular) and it is highly advisable to use it.

  1. Download and install NetBeans (also JDK if you don't have it; there's a bundled version available). I have used NetBeans 8.0 (and Windows) for this tutorial.
  2. While it's installing, sign up on Github if you don't have an account. Go to https://github.com/dj3500/hightail and fork the repository (using the Fork button).
  3. Fire up NetBeans and select Team -> Git -> Clone; Repository URL: https://github.com/YOURUSERNAME/hightail.git/, also enter your Github username and password and select Save password; Next, Next, Finish.
  4. If it says "Hightail project was cloned. Do you want to open the project?", select Open Project. If it doesn't, or says something else (like prompting you to "Create a project"), cancel and open the imported project yourself (File -> Open Project).
  5. Change stuff, test, build, run, etc.
  6. Once you have a working change: Team -> Commit, enter a commit description, Commit. Keep in mind that with Git, commits are only local. You can continue to make new commits. When you want to push your tree (of commits) to Github, select Team -> Remote -> Push To Upstream. The changes will be now publicly visible in your GitHub repository.
  7. When you want to submit your changes to dj3500 for testing and review (please do test them thoroughly beforehand, though), create a pull request (from the web interface at https://github.com/YOURUSERNAME/hightail). The pull request model is documented at https://help.github.com/articles/using-pull-requests.

It is better to use branches for different features, and read up on Git in general, but the above should be enough to get you started.

Ways you can help

Hightail is a community project, developed by volunteers. We'd love for you to join in the effort.

  • It couldn't hurt to make Hightail more popular. If you use it, consider putting a comment in the code of your solutions, like // tested by Hightail - https://github.com/dj3500/hightail. Also, tell your friends.
  • There is a list of known problems and possible enhancements that you can work on fixing here: https://github.com/dj3500/hightail/issues?state=open. Many of them will be easy or fast to solve, they just need a little attention :)
  • You can also report new issues or give new ideas.
  • The project does not currently need any donations.

There is also a discussion topic on CodeForces (here).

Contributors

The project was started and is maintained by Jakub Tarnawski (dj3500). A large amount of work was done by contributors, some of whom are listed here and others include Piotr Szcześniak and Robert Rosołek - thank you so much!

hightail's People

Contributors

auromun avatar daniellimws avatar dj3500 avatar jmerle avatar krigpl avatar mohamedbassem avatar muhamedketa avatar piotreks avatar shanto86 avatar shinora007 avatar venkatvb avatar ykalchevskiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hightail's Issues

Some instructions for developers

Readme is now done, but we could still use:

  1. comments in source code
  2. some documentation on architecture (it's not too complicated so this should be short)

Make the initial message less dorky

When user runs Hightail for the first time, they are presented with a stupid-sounding message about having to configure it first. It should be better, and also they should be taken to the config dialog immediately. The config dialog should have more comments.

Minor bug in "New contest" behaviour

Say I enter a correct URL and click Parse, and then when it's done, I cancel by clicking on the cross in upper-right corner. The problem tabs still get created :) "Cancel" button and Escape keys work fine.

I'm not convinced we shouldn't just close the dialog and create the tabs when the user clicks "Parse" and it comes back successful (like it was 1-2 versions ago).

Handle very long outputs

If the program outputs a megabyte into stdout, we don't have to show it (we could show the beginning though), but we definitely need to be resilient against it (Hightail shouldn't attempt to process it too much and become slow and unresponsive). We should handle this gracefully.

Nice diffs

When the result is WA, nice colorful diffs that tell the user which is the first wrong line etc.

Java support

Make Hightail support languages where the executable is run like "java executable" rather than "executable".

Graph visualizations

This could be a kickass feature; when the input contains a graph in a standard format (number of vertices, number of edges, list of edges given as pairs of vertices, possibly with weights), then we could show the user a picture of the graph generated using some library.

Icon

We should have an icon instead of the default Java one (maybe a capital H?).

Better way to distribute a build

Now, making a build of Hightail looks like so:

  • run Build All
  • zip up Hightail.jar and the lib directory
  • distribute the zip
  • user unzips the zip and runs the jar
    This should be faciliated by Java Web Start or something so that less clicking is necessary for the user (and preferably everything is in a single jar file).

Comparing floating-point values when diffing

When there are two non-equal floating-point values, the differ should compute min(their absolute difference, their relative difference) and give that to the user so that the user can decide whether it's a WA or OK.

Make Hightail a good tool for debugging

This is far-fetched and might not be possible to do / to do right. But I'm thinking about something along the lines of:

  • the user has a macro like
    #define DBG(x) cout << "DBG: " << #x << " = " << x << endl;
  • we ignore (in diffing) lines beginning with DBG, but in diff view, we truncate the "DBG: " and display the lines in green, or something.
  • or, we could display everything that came from stderr in green (however, can we sync it with what came from stdout and display both things in the same textarea?)
    Don't know if this would be usable.

Tests should be run sequentially

Tests should be run sequentially after all and not in parallel. If we run 10 instances of a program that takes 200MB, we can swap out the computer. There is not much gain to be had (at least timewise) from running them in parallel.

Problem-wise language setting

Some people (i.e. beginners) might want to write different problems in different languages, but as it is now, the language setting (i.e. the command which prepends the executable file, like "java") is system-wide.

More graceful handling of failure in file execution

Two examples:

  • under Windows, we select not an .exe file but some other non-executable file (which exists). We then get "running..." indefinitely. Not sure if this is also broken under Linux (we have some sort of checking whether the file is executable, not sure if it works there).
  • if the prepending command (like "java") is mistyped, or is not in the system path, the same happens.

What should happen: a useful error message.

Keyboard shortcuts?

This is debatable, but when a user hits "compile" in their IDE (which they probably do using a shortcut), they should also have the option to hit another combination of keys and have Hightail test their code.

UI should be nicer to use

This is a general issue. We should make sure the UI is bulletproof and does exactly what a poweruser would intend it to do in contest prime-time.

Better icon

We have a placeholder now (a green circle).

Implement Help -> About

It should probably redirect to some kind of project wiki/documentation. That needs to be written.

Scheduling contests

Feature which would allow the user to set the start time of a contest in the "parse contest" dialog, and leave it. Hightail would then wait until a few seconds after that time and then start to parse the contest by itself. The idea is that the user should be able to do as much setup as possible before the contest, rather than having to even click the "parse" button when the contest is already on.

Unit tests

Or, in our case, possibly integration tests with predefined problems/solutions/testcases that give all possible verdicts etc.
Get coverage up from 0% ;)

When editing a testcase, it always thinks there were changes

When you open a testcase just to inspect it, there is a mechanism in place to only mark the testcase as edited if there were some changes to it. That mechanism doesn't work. This also results in erasing the program's output after exiting the Inspect/Edit dialog.

Test everything which is implemented using threads

As in: if it errors out, is it possible to Abort? Don't we leave the buttons in an inconsistent state (e.g. neither "Run tests" or "Abort tests" are active)? Test error handling in the parser (what does the program do if the format of the CF problem page changes?). Etc.

Ability to run tests from outside Hightail's window

For example, a feature to autorun the tests whenever executable file changes/is created. Is it always desirable? If we do this, we had better already implemented TLEs/REs etc. and be very stable about running stuff, so that running absolute crap/unstable programs/programs that pump out gigabytes of output to stdout etc. doesn't mess up the state of Hightail. And then we need a way to inform the user about the results (tooltip from taskbar or something unobtrusive).

On testing, check whether the source file is newer than the executable

... so that we warn the user that they're testing old code / they forgot to compile.
Downside: if they forgot to compile, they might have also forgotten to save the source file and there's nothing we can do about that.
Downside: we would need to know where the .cpp file is (another configuration option to take care of).
Also, the user should be able to turn off this feature.

Website of project

When it is looking somewhat mature, make a website of the project, promote it on CF/CodeChef/etc.

Graphic test results

There should be icons for the various possible verdicts, and the "result" column in problem view should be formatted using some sort of a custom formatter which shows the icon, runtime, exit code if non-zero etc.

Browse for executable file

Button to browse for the executable file, right of the filename textfield. The textfield should still be editable "by finger".

Wrong result if program reads no input.

If tested program reads no input (but the testcase has input), it can termiante before we write the input to the stdin and it will cause IOStreamException Broken Pipe or Stream Closed. Then the result will be "aborted" while it should process the testcase normally comparing output with expected output.

Inspect/Edit dialog is somewhat slow

It takes some noticeable time to show up (at least the first time it's opened). If we confirm that it's only during the first time, is it possible to somehow preload it when the program starts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.