I’m at a point where I realize I NEED to fully understand and utilize the concepts of functional programming in order to write effective code and grow, but I get confused and am not sure where to start. I get it at its fundamental level, writing basic functions to use with higher and more complex functions. However, I never know where to start? I can always go back and refactor code but I want to be able to start writing functional from the very beginning lines of code and build off them. How can I learn how to take a functional programming approach from the first lines to the end, instead of from the last lines backwards? Does anyone have any resources for mastering functional programming, such as guidelines, blueprints, general rules of thumb, building patterns, or just approaches in general?
I’m working through the Pomodoro Clock project and realizing that the way I’ve been coding up until this point will no longer cut it. My clock is nearly fully functional and I’ve got it about 95% working except for a few bugs (ex quickly and repeatedly clicking the start button after pause will make it so the progress bar reads over 100% after the clock is finished) but for the most part and for straight forward casual use, it works as it should. However, I started feeling very overwhelmed by my code towards the end and found my self repeatedly getting lost in it. I run into a problem, then think up a solution, then have to go all through my code and make sure the solution is in all the little bits, and then what works in some areas and situations messes up others! I feel like I keep solving one problem and accidentally create another! Any resources of how to write solid functional code from the very beginning to avoid this mess?
Edit: Heres my code for anyone interested, its unstyled : http://codepen.io/runsf/pen/vyWwMX