2,848 karma · joined February 27, 2013
I dump highly complex modified code straight into production and haven't had a single production bug for 6+ years.
The reason why is automatic tests.
However I can imagine that code reviews would work well for inexperienced developers being reviewed by more experienced developers?
Bravo!
I don’t get it. It’s very strange.
The less code I write to solve a problem the happier I am.
However AI’s are great for quickly learning how to use external tools/libraries (like JasperReports) and for quickly writing parser functions.
It is like any other tool: good for some things bad for others.
Closure is different of course. But not more functional than Haskell for example.
This is how I build large scale biz software (30+ years of experience). And I have never seen a case where it wasn't a good idea.
For example, the largest software system in the world (the internet) operate this way.
However I am always open to learn something new?
https://leanprover-community.github.io/mathlib-overview.html
Coding tests (if done correctly) is basically defining the behaviour of a black box API using running code. So it is easy to imagine an AI generating the black box from the tests/behaviour spec.
So perhaps we should ask ourselves: What can we learn from the internet architecture?
And no that does not automatically mean micro-services. The core idea of the internet is to agree on API's (protocols like HTTP) and leave the rest as implementation details. You can do the same with modules, libraries, classes, files etc.
Which makes perfect sense. Software is about automating things. And the more you automate, the faster you go.
A bit like how Jane Street operates I think.
State0 -event0-> State1 -event1-> State2 etc.
In other words, it's all a state machine.
It is great fun!
AI's so far haven't been able to beat that.
However I have found AI's to be great when working with unfamiliar tools. Where the effort involve in reading the docs etc. far outweigh the benefits. In my case using AI's to generate JasperReports .jrxml files made me more productive.
The smartest thing you can do is to avoid them.
I have only experienced this kind of environment once. And the fix was to quit and join a functional company instead.
Never let tests depend on implementation details.
2. Don't write tests for anything else.
If you are responsible for implementing a server/service, the API is the protocol for the server/service. If you are responsible for implementing a module/library, the API is the public interface to your module/library.
The tests are basically a specification for how any implementation of the API needs to behave. So you can give the tests to another developer, who has never seen your implementation, and they should be able to re-implement everything based on your tests.