At one point I had to write a function that removed the word ‘buzz’ out of a sentence. I originally trie to do this using regex and the replace method. Using this method, the remaining sentence would have 2-3 spaces in-between each word and I could not figure out how to get rid of those spaces (because they were all different lengths). To solve this issue I decided to go back to basics and string together methods that I know how to use like split and filter. This turned out to be amazing and gave me a lot of control later on; I could easily change all the buzz words to lower case when filtering to catch instances where there were random capital letters in that word.
I was able to find the first instance of an array item that had a particular property (‘Scooby’) using the slightly less known find method. This method allowed me to test the objects inside the array to see if it’s “hiding” property was “Scooby.” I thought this was an elegant way to meet the requirements of the function.
I think my most used problem solving technique is trying something until it sticks (or brute force as others may call it). Getting the instant feedback from error messages and console logs is quite useful to me when brute forcing soltuions and I am able to think through the various steps required to solve most small problems. This combined with Google searching issues is my first instinct and so far it has worked fairly well.
I think using pseudocode to break big problems down into small steps is a great way to take the overwhelming feeling out tackling difficult issues we may come across while programming. This is a skill that I need to practice more of as projects become more difficult for me. Recently I have bought a couple sketchbooks to document my reflections outside of Dev Academy and have tried to pseudocode solutions using text and diagrams in a style that allows me to think through a problem and easily recall my thought process if I ever have to revisit it in the future. So far, this has been successful for me!
Reflecting on new experiences is also something I would like to get more confident in. I can see the benefits of it after starting my own reflection journal and in a short amount of time I’ve been able to add new concepts to my tool belt for future use. As an example, I’ve been reflecting on a tutorial project that I am following which uses Firebase for authentication and database storage. I now understand the strengths and weaknesses of using Firebase and will know when to use it in the future (and when not to).