I finally refactored my site

10/06/2018 13:14 BST

I have been very busy with refactoring my site, hench the lack of update, I have made heavy use of functional programming and I got rid of most of the side effect; it had a more pleasant impact on code maintenance and writing test, I don’t have to worry about a database connection initialising while running the test, previously to stop the database from initialising I made use of build tags, I added a comment // +build !debug on top of the file where the database connection get initialised it was inelegant, with FP I don’t have to do that anymore, but I still use // +build debug for the mocks. I’m not going to go into too much about the problem of impure function, but I will leave a video, cheers.

He has inspired me to refactor my site, believe it or not.

| |