3 ms·
" but that isn’t nearly enough to make production worthy code." That's not the goal. You want code that can be refactored with reasonable effort. For example
by Ididntdothis 7y ago
" but that isn’t nearly enough to make production worthy code."
That's not the goal. You want code that can be refactored with reasonable effort.
For example if the number 3 signifies some factor that's used several times over the the code, make it a constant with a descriptive name. This makes even the prototyping easier and whoever takes over the code has a much easier life.
Or don't copy the same 5 lines all over the code with some minor changes but make it a function.
This is really not hard and has huge payoff if you don't overthink it.
- seanmcdirmid 7y agoSomeone will surely overthink it, and everyone will always question you about where the line should be. And no, the goal isn’t always (or even often) to produce code that can be easily refactored, quite the opposite in practice. This is why having prototypes done in a separate org can be really useful (since they are writing code to serve designer needs rather than production developer needs).