2 ms·
Well, actually, we do. If our overhead for producing working development code is greater than say, oh, 5 seconds, then somebody out there is definitely kicking
by agentultra 10y ago
Well, actually, we do. If our overhead for producing working development code is greater than say, oh, 5 seconds, then somebody out there is definitely kicking our ass on cycle times. That developer can fail 300 times in an hour. If it takes 200 failures before success, it will take a miniumum of 40 minutes to resolve an issue with a 5s cycle time. If our cycle time is 5 minutes because of all the multi-compile overhead, our minimum time for success will be 72 times longer, or over two full work-day. So we can pick 40 minutes or 2.1 days to resolve an issue to the same level of completeness. You make the call.
I'm presently working my way through Programming in the 1990s. In it's controversial premise, it states:
Basically we are taught to guess our programs, and then to patch up our guesses. Our errors are given the cute name of "bugs". Fixing them becomes puzzle-solving, as does finding tricks that exploit or avoid poorly designed features of the programming language. The entire process is time-consuming and expensive.
And while I appreciate short cycle-times between code and result; I find "guessing my program into existence" is the most sure-fire way to shoot myself in the foot.
Now I don't write a specification for every program. However one doesn't have to these days to gain the benefits of fore-thought and reasoning. Functional programming has revealed many patterns and algebras for programs that work well in practice. If compiling a higher-level, soundly-typed language into Javascript takes an excruciating 5 seconds it'd still be worth it because I will have fewer bugs in my code, by design, over the developer that continually adds code in a hurried frenzy.
In spirit I agree that frameworks are restrictive but I don't see how Javascript is there to help prevent you from writing errors. A framework would at least give you the ground work to avoid egregious ones. Though better still, use functional programming patterns or languages if you can and compile down to Javascript if you must. Works well.