Phase 1 Project
- Challenges
- Figuring out how to implement a star rating system and location filter was fun, though I believe that the answers I found were not the most efficient.
- Structuring my code in a way that made sense. I think that for the most part, I was successful in keeping my code DRY. However, I don't think I implemented functions in the most efficient way and in the process of trying to split up tasks into functions I believe I decreased overall readability.
- Successes
- Implementing CSS and presenting the webpage in a way that makes sense to the user.
- Finding a solution for the star and filter feature that works in perpetuity. I believe that I coded the features in a way that does not rely on code from too many different locations in the program. Therefore, adding new features should not require too much restructuring.
- Code readability. For the most part, comments are short but get the general message across. Although I need more practice, reading through the code is not too difficult.
- Failures
- Between the original mockup and the final product, I did not implement all the planned features. Some missing features include a search by keyword input field and filter by rating.
- I didn't keep adding comments in mind, so most comments are terse and don't contain specifics
- I did not manage my time well. Because I didn't manage my time well, some functions were added out of order or without structure in mind. To me, the code looks messy in some places due to this.
- Improvements to be made
- Add more features. Not only will adding features flesh the program out towards what I had originally envisioned, It will also test the rigidity of the code that already exists.
- Keep Big O Notation in mind. I'm interested in always improving efficiency and would like to be able to look at a snippet of code and find a way to make it run faster or take up less memory.
- Focus on improving readability. Human memory is limited and I won't be able to remember what every line of code's purpose. Even if just for my own sake, code needs to be readable.
- Improve on understanding context. For most of Phase 1, I went with the answer that came quickest to me instead of giving more thought to what the best answer might be. In retrospect, I probably used for loops much more often than I needed to. e.g.
const array = [1,2,3]
const newArray = []
for (let i=0; i < array.length; i++)
newArray.push(array[i] * 2)
as opposed to
const array = [1,2,3]
const newArray = array.map(x => x * 2)
- To do list
- Get into the habit of putting more thought into the code I write. Find the best solution to a problem and make a mental note. Hopefully practice will make perfect and down the line I will be able to more naturally implement good practice.
- Be more mindful about adding comments. Add comments for every little thing and then shave them down later. Eventually, comments will become more intuitive and make more sense.
- Add code for features as they come to mind. Currently the biggest thing I missed is the search by keyword functionality. The pseudocode may look like this
grab values from text input box
grab values from the DOM
loop through DOM values
test for matching values
hide all tiles that don't match
Notes
- Before Phase 1, I took on extra responsibilities in other parts of my life. This definitely hindered my work-life balance and I struggled to manage my time as a result. Remember: This is not your fault. Learn from this and know your limits and what works for you moving forwards.
- Remember to communicate. Even with all the hiccups, I have no excuse for not communicating that with the people that could help me most. Whether with confidants or my cohort lead, I should update the people in my life with relevant information so I'm not leaving them in the dark.
- Always work on having a regular schedule. I learn best when I build on top of habits. Even when you don't have any required work, set aside time. If you don't know what to do with that time, explore.
- Going into Phase 2 or any other future learning opportunities for that matter, take your time. If a concept doesn't immediately stick, let it marinate and try to find uses for it in different contexts. This will give you a better understanding of how something works and when to best apply that information.
Top comments (0)