That's like saying "I don't use wheels, because I don't live in the prehistoric era when they were invented."
Some tools are fundamental. A tool to solve the problem of executing dependant tasks is one of them.
Solutions to these fundamental problems tend to be implemented early on. Some of those early solutions were poor, and have fallen out of use. Some of them were good, and have been refined in the intervening years, and hence are still with us.
A good tool to solve a fundamental problem is still useful, no matter how old it is.
Since they are interoperable, you can write in pyopengl for Punic code, then convert your half dozen opengl calls in your innermost loops into pyglet for performance.
Lots of civilisations have collapsed throughout all of history. Millions of people have starved to death as a result. What makes you think we're somehow immune?
Using script files to store config is convenient, but is it true that in some circumstances it could give malicious parties a chance to inject arbitrary executed code into your environment, in ways that parsing a pure data file could not.
An interesting aspect of the "different dimension" is that functional tests actually demonstrate that your application works. If your website is down after deploying a well-functionally-tested application, then it's often because of something beyond your control, like an Amazon outage. Functional tests give you the confidence to deploy often, or automatically, even after bold refactoring, because you can prove that the app works, which unit tests or integration tests cannot do.
I'm a big fan of unit & functional testing. One reason for not writing functional tests though is that they are way harder to write than unit tests (assuming that your unit tests are relatively straightforward because your code is well factored)
I always find starting functional tests, especially in a new area of your program, to be a tremendous exercise. Maybe I'm doing it wrong. For example, last week we moved on to writing code that hits an sftp server - so our functional test spins up an sftp server locally & overrides the product code settings so that it connects to that. Getting this set up and working took me a couple of days, and this is such a tiny aspect of the code under test that I'm afraid I'm exhausting my teammates patience for "test first functional tests".
In other areas e.g. hobbyist opengl code, I think this initial barrier to getting started is so high (you'd have to write a sort of machine vision thing to analyse the actual output, rather than just what opengl calls were made) that truly end-to-end tests are a complete nonstarter. You have to give in and settle for integration tests instead.
I suspect many people are in that same place with regard to functional testing of web apps. Yes there are tools like selenium, but there are issues of test data & making sure product code connects to test databases. There are solveable, but people don't see that the value is greater than the costs of wrestling with that.
"a sort of machine vision thing" -- You could use Sikuli or SimpleCV. I'm using OpenCV in my video game playing robot to find elements on the screen. (Of course, it's a bit of a Frankenstein to create and run.) At least it's good to know it's possible, though. But, yes, I can see why others would not want to go through this much work -- it is hard.
Hey. Out of interest, Jason, would you personally write a functional test that spun up a local SFTP server like I describe? As a developer who's better than average, it presumably wouldn't take you a couple of days to get that working, but even so, would you consider cheating a little and mocking out the sftp client calls? If so, would you still call it a 'functional test'?
If you just want to make sure that your changes aren't breaking something that is already working, you could have your code automatically create an image and then compare that image file with what you have verified as correct.
This assumes that the output for a scenario is deterministic and it requires that you hand-inspect new images if code is changed that will affect the output.
Hey. It's a nice idea, but there are problems with this.
The actual output varies depending on your hardware & driver combo, and is substantially affected by the state of the graphics drivers (e.g. What types of anti-aliasing or interpolation are enabled? What color profiles are loaded?) The RGB pixel values on one machine will not match those on another machine.
You could imagine writing an 'is image almost equal' comparison, but I'm informed by those who have tried (pyglet developers) that this is substantially harder than it sounds - the differences between images are not what you would expect.
The alternative, if you want anyone else to be able to run your tests, is to tie yourself to a particular OS/hardware/driver combo. Not appealing for many projects.
Even if this could be done, this sort of 'compare snapshot' test is brittle, because, of course, we're talking about high level functional tests here, so you'd be snapshotting your whole game/application, not just limited aspects of it in a limited environment. Hence the screenshots would change all the time. Every time you added or modified any functionality you'd get a failing test and have to manually compare the images and assert that the differences were OK and then commit the new screenshot. This is ripe for overlooking small regressions, and makes subsequent bisection very difficult.
Of course, we haven't even got into the aspect that, as an end-to-end test, your test code would actually have to interpret the images and send mouse/key inputs to successfully play your game. Through to completion, of course - how else would you know your game-completion conditions were all wired up correctly?
I agree that there are generally problems doing this; we had thought a bit about doing this at a previous job when testing an AfterEffects plug-in we were developing, but we didn't actually do it.
Just wanted to add that one technique that could allow this to work better when testing across different kinds of hardware / driver settings would be to share high-level results (i.e. for release 1200, these images seem okay) rather than actual images among testers. (So each tester would generate its own "correct" images.) Yes, it is possible that some of the images this other tester assumes are correct aren't actually correct on their machine due to the hardware configuration. But if you care about this, you would not be able to share test results, anyway. And you could still test actual rendering on different kinds of hardware in a separate pass.
Hey. Thanks for the comment. Yep. Right now the beta only works on regular OS & browsers, and on the Nokia N900, but we still have some work to do on Android, and have yet to test on iOS, but theoretically we have no known incompatible tech.
We hadn't thought about chart drawing, but it seems to make good sense. Thanks!
We're constantly brainstorming about the best ways to import and export source and data. We're currently thinking about Dropbox or Github integration, or maybe a very lightweight client-end component which simply allows you to sync the current directory to your PythonAnywhere server-side storage.
Chart drawing is useful (if only for visually exploring the data). I wouldn't be willing to be tied to your service, so you may want to integrate some standard library?
A chroot-like system would work fine, and also make it easy to export data.
This also needs a live demo. And have you already figured out how to make the Python interpreter persist across reboots?
Right, we're definitely intending to avoid tying people in as much as possible. matplotlib might be a good choice, perhaps?
PythonAnywhere currently runs in a chroot jail, and we're thinking that we should have a simple URL scheme for accessing files in your private store -- so that, for example, if you're logged in, you could access stuff using something like http://pythonanywhere.com/user/your-id/path/to/your/file. Of course, Dropbox is likely to be more convenient a lot of the time. But we don't want to rely on them entirely.
Re: the live demo -- definitely, once we're in beta we'll put a console on the front page of the site, and signing up for a free account will be really easy.
Making the interpreter persist across reboots (especially with eg. DB connection variables intact) is definitely going to be tricky. We've got ideas, but nothing working yet.
I agree with the the grandparent that preventing lock-in is important, but I think in addition to the standard you do want to offer some APIs in your service that are specific to the environment you are in (cloud, HTML5). Kind of like AppEngine with their native datastore and Amazon with EBS.
That's an interesting point. I guess the distinction we want to make is between creating private APIs that would lock people in, and enabling them to use appropriate standards and publicly-available modules. So integrating with (say) WebGL for graphics, or making it easy for people to mount their own EBS volumes or access S3 (we're running on AWS anyway) would be good, whereas insisting that the only way to display plots of data was to call our private API would be bad.
This would be great. Maybe we could have a canvas element off on some discreet pane somewhere, direct these rendering libraries at it, and reveal the pane when the canvas gets written to.
Some tools are fundamental. A tool to solve the problem of executing dependant tasks is one of them.
Solutions to these fundamental problems tend to be implemented early on. Some of those early solutions were poor, and have fallen out of use. Some of them were good, and have been refined in the intervening years, and hence are still with us.
A good tool to solve a fundamental problem is still useful, no matter how old it is.