I wrote up a script a couple of months ago using JS for Automation that will automatically rotate a Keynote file from portrait to landscape (for use in prototyping on Keynote for iOS that only supports landscape). It was my first experience writing any automation script, so there was a lot of trail and error and google searches. I personally would much rather work in JS than Applescript. Here is the script in case you want to take a look at some more JS for Automation:
Thanks for the examples, and I agree that error messages are super-important for beginners. We have written a bunch of code trying to "massage" error messages to be more helpful. I'll be adding these to the list, thanks!
Yup, I agree with you, but I wanted to introduce referencing a variable before introducing formatted strings and placeholders. We actually went back and forth on this a couple times.
I'm actually working on extracting all the content for just a plain HTML version so people who don't want to do all the challenges will have something to read (it's almost a books length of content)
We're reusing the stuff we built for the Try iOS course we came out with late last year. I've looked into Emscripten for this and from what I saw it really wouldn't work with this course, although maybe I missed something?
You could always boot the VM with an image that contains the compiler and run there. If it truly does boot faster than the results take otherwise then you could move it all into javascript that way, and not have to worry as much about the infrastructure around it.
Sorry for the slow response times on the challenge submissions everyone. We only have so many Mac Minis running these things . We are looking into ways to speed it up
You could also roll your own in a very few lines of code. Maybe even have the output of the program, not the compiled code, be the content of the hashed file, assuming you aren't reading STDIN or anything like that from the user.
That's a really cool project! Definitely going to look into it for some of our more complicated courses, but for this course compilation is usually under a half-second so it's not the compilation that's slow (it's the way we are tearing down an entire VM after every submission, we are working on changing that now)
Ah. Maybe consider a FreeBSD jail with a union mounted filesystem if you can get away with using a non-Apple (GNUstep/GCC?) toolchain. The teardown on a jail is as fast as the chroot syscall. ;-)
Just one nitpick for an excellent comment. GNUstep/Clang would be the only way to get support for array, dictionary and number literals, as well as ARC.
GNUstep/GCC is possible, but you lose support for all of the above, blocks, and several other recent additions to the Objective-C language.
Looks like those Mac Minis are getting smoked right now, poor little guys. I can't load the page unfortunately to see myself, but could you use GNUStep to compile the examples on any flavour of box?
I know I feel so bad for them. We are working on some temporary fixes (including caching which as we all know is really easy to do) and changing the way we isolate the code submissions so we can get more throughput. GNUStep might be an interesting long term fix.
In challenge # 22 in level 4, I am getting an error :‘extern’ variable has an initializer;
I have tried the running the show answer solution but to no avail.
We (Code School) actually run all of our tests server side, even for courses like Mobile Web and Backbone.js. We do this because we don't want to deal with the headache of dealing with cross-browser issues. For Javascript or HTML/CSS related courses we use either Node.js with jsdom or Node.js with phantomjs (we started with jsdom but now use phantomjs for these courses). It makes everything more reliable, and we can always assure the consistency of testing the submitted code.
https://gist.github.com/ericallam/a5cd76651c327b116a6e