|
|
|
|
|
by seanalltogether
86 days ago
|
|
I agree. The biggest lesson I try to drive home to newer programmers that join my projects is that its always best to transform the data into the structure you need at the very end of the chain, not at the beginning or middle. Keep the data in it's purest form and then transform it right before displaying it to the user, or right before providing it in the final api for others to consume. You never know how requirements are going to change over the next 5 years, and pure structures are always the most flexible to work with. |
|
You still have to worry about someone using kg when you use g, but you avoid a large class of problems and make your logic easier.