PhD Diary, Week 9: Always check your code!

I realise I am perhaps not the best at coding. I understand the basics and can implement your usual ODE and PDE solvers. However, it is new to me to be able to implement any optimality criteria.
This week, I have been implementing the D-, A-, and E-optimality measures to find the most optimal designs given a starting design. I had not realised that a D-optimal design for the linear model should be an equal split at the ends of the design space.
I now know that I should plan out what I should expect (if I can, analytically) from my code before saying it is done. This way, I am able to evaluate my code effectivley.
This is a relatively short post today. I just wanted to remind myself of the importance of reflecting on code.