{"action":"created","issue":{"url":"https://api.github.com/repos/rvagg/workshopper-exercise/issues/18","labels_url":"https://api.github.com/repos/rvagg/workshopper-exercise/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/rvagg/workshopper-exercise/issues/18/comments","events_url":"https://api.github.com/repos/rvagg/workshopper-exercise/issues/18/events","html_url":"https://github.com/rvagg/workshopper-exercise/issues/18","id":58210086,"number":18,"title":"Too much boilerplate for the bare-bones stdout-only exercise…","user":{"login":"tdd","id":3752,"avatar_url":"https://avatars.githubusercontent.com/u/3752?v=3","gravatar_id":"","url":"https://api.github.com/users/tdd","html_url":"https://github.com/tdd","followers_url":"https://api.github.com/users/tdd/followers","following_url":"https://api.github.com/users/tdd/following{/other_user}","gists_url":"https://api.github.com/users/tdd/gists{/gist_id}","starred_url":"https://api.github.com/users/tdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdd/subscriptions","organizations_url":"https://api.github.com/users/tdd/orgs","repos_url":"https://api.github.com/users/tdd/repos","events_url":"https://api.github.com/users/tdd/events{/privacy}","received_events_url":"https://api.github.com/users/tdd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-19T13:49:23Z","updated_at":"2015-02-20T07:59:49Z","closed_at":null,"body":"Hey Rod,\r\n\r\nSay, as I'm migrating workshops based on older `workshopper` versions (0.4.x, 1.x…), I keep having to turn previous \"basic case\" exercise files that often read as short as this:\r\n\r\n```js\r\nmodule.exports = function () {\r\n  return {}\r\n}\r\n```\r\n\r\nInto the \"minimum boilerplate\" which is this:\r\n\r\n```js\r\nvar exercise      = require('workshopper-exercise')()\r\n  , filecheck     = require('workshopper-exercise/filecheck')\r\n  , execute       = require('workshopper-exercise/execute')\r\n  , comparestdout = require('workshopper-exercise/comparestdout')\r\n\r\n// checks that the submission file actually exists\r\nexercise = filecheck(exercise)\r\n\r\n// execute the solution and submission in parallel with spawn()\r\nexercise = execute(exercise)\r\n\r\n// compare stdout of solution and submission\r\nexercise = comparestdout(exercise)\r\n\r\n\r\nmodule.exports = exercise\r\n```\r\n\r\nWoah.  Inflation!\r\n\r\nGranted, some of these old-style problems also had to feature a `verify.js` with custom logic, etc. but many did not.\r\n\r\nI understand the rationale behind splitting these into separate files and decorators, but the fact of the matter is, a number of non-network-related workshops have most of their exercises that don't need any customization to this, hence their former text as quoted earlier above.\r\n\r\nThis level of boilerplate reminds me of sad stuff like Jasmine 1.x runner setup, or JDK-style approaches to, say, XSLT transforms that, because they handle once-in-a-millenium cases, force you to spew out dozens of boilerplate lines for the 99% use-case of simple XML String + XSLT String -> String case.\r\n\r\nHow would you feel about my providing a `.basic()` method on the result of `require('workshopper-exercise'), that would basically do the same as the boilerplate above? (of course, we'd doc it, and test it along with the rest when tests come)\r\n\r\nSo the bare-bones `exercise.js` file could be as short as:\r\n\r\n```js\r\nmodule.exports = require('workshopper-exercise').basic()\r\n````\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/rvagg/workshopper-exercise/issues/comments/75202221","html_url":"https://github.com/rvagg/workshopper-exercise/issues/18#issuecomment-75202221","issue_url":"https://api.github.com/repos/rvagg/workshopper-exercise/issues/18","id":75202221,"user":{"login":"tdd","id":3752,"avatar_url":"https://avatars.githubusercontent.com/u/3752?v=3","gravatar_id":"","url":"https://api.github.com/users/tdd","html_url":"https://github.com/tdd","followers_url":"https://api.github.com/users/tdd/followers","following_url":"https://api.github.com/users/tdd/following{/other_user}","gists_url":"https://api.github.com/users/tdd/gists{/gist_id}","starred_url":"https://api.github.com/users/tdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdd/subscriptions","organizations_url":"https://api.github.com/users/tdd/orgs","repos_url":"https://api.github.com/users/tdd/repos","events_url":"https://api.github.com/users/tdd/events{/privacy}","received_events_url":"https://api.github.com/users/tdd/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T07:59:49Z","updated_at":"2015-02-20T07:59:49Z","body":"I could go with this. @rvagg, what do you think?"}}