I don't know what the author is building that a build is taking 4 hours, but I am aware that there are huge software projects with build times like that and much longer. I agree that getting quick feedback to changes is vital for quick overall development. This shows the values of development stacks which reduce the build times a lot. As a resultmore incremental development can be done. For example, the build times were one of the architectural goals when designing the Go language.<p>Dynamic languages are also a great tool to fight build times. Even if it is unsuitable for large projects to be entirely built on dynamic languages, a great technique is using a mix of static and dynamic. Build the core of the application in a static language, but more as a set of libraries to be called from the dynamic layer. The dynamic layer is where most of the application logic resides, easy to be changed. And parts which have stabilized reasonably can still be moved over to the static part.
We have Maven builds that complete in a few mins via Jenkins but I have been exploring if it can be done even faster. The builds are written using the Jenkins declarative pipeline with parallelization etc but feels like it is just not fast enough (the slowness is probably because of the whole lot of intermediate IO/back-and-forth between Jenkins master and slaves). Wish there was a build setup that was faster while being as feature rich as Jenkins while supporting Maven builds.
Tying your build frequency to build time <i>and then using that as motivation to decrease build time</i> is probably the important bit here, but only if you include the second part.
If the long build time for static typing programming language is the concerns perhaps you can try have look at D programming language since it is optimized for fast compilation [1].<p>Around last year someone even managed to speed up its compilation time even further and it is also featured in Hacker News but cannot find the link now.<p>I think in the future most of the static typing programming languages will be mainly based on Single Static Assignment (SSA) technique then the compilation could really fly.<p>[1]<a href="https://www.drdobbs.com/cpp/increasing-compiler-speed-by-over-75/240158941" rel="nofollow">https://www.drdobbs.com/cpp/increasing-compiler-speed-by-ove...</a><p>[2]<a href="https://www.cs.princeton.edu/~appel/papers/ssafun.pdf" rel="nofollow">https://www.cs.princeton.edu/~appel/papers/ssafun.pdf</a>
Alternatively, you can parallelise parts of your build (eg the tests, static analysis etc) and speed it up. Then, if you have more changes coming in than you could parallelise is when you can start to do some advanced things like trying to predict which changes might break the build.<p>There was a longer discussion on one of these approaches done by Uber[1] on HN. Granted it’s a lot of investment, it’s interesting to explore ways of dealing with long builds that need to run frequently.<p><a href="https://news.ycombinator.com/item?id=19692820" rel="nofollow">https://news.ycombinator.com/item?id=19692820</a>