Week 7: Front-end
NOTE: I’m a few weeks late publishing this because I got busy and forgot to finish this post. So I’ll be summarizing week 9 soon.
arr.map((x) => return x.trim())
Most of the JS one reads on the internet, however, isn’t nearly so pretty.
- That said, I really enjoyed my time learning JS. In particular, the way that JS is able to access and manipulate the entire html document (the DOM) that gets rendered by browsers. It really does make a website more more seamless and user-friendly when the page doesn’t reload every time that an action is taken by a user. Instead, just the part of the page that is affected by the action is altered. It’s kind of brilliant how this is done. You attach event handlers to objects to listen for specific events. For example, you could attach a handler to listen for a “click” on a button. When that happens, a script that you have attached to that event fires. Usually, you prevent that button from doing whatever it was going to do, and instead fire off an ajax request to an endpoint on some API. Then you take whatever data you get back and shove whatever pieces of it you want into the html document wherever you want it. This makes the whole experience appear more seamless from a UX perspective, and also reduces the amount of data that your individual API calls are asking for, speeding up your website.
- On another note, I think I could be happy if ended up as a front-end OR back-end engineer in the long term. I’m still figuring out what I’m most interested in, obviously, but I really enjoyed thinking about and designing the visual aesthetics and user experience of my application. I was a bit surprised by this, since I wasn’t one to enjoy art class in high school (I think the peak of my art experience was finger painting in kindergarten). But freed from the physical constraints of studio art — drawing straight lines, globbing the right amount of paint, etc — I found myself much more capable of producing decent looking stuff. Not beautiful, groundbreaking stuff, mind you, but websites that are, nevertheless, a far sight better that I would have thought possible given my lack of artistic inclinations in school. Good enough, I think to suggest that with enough practice and training, I could probably be good at the design portion. If there’s anything that I’ve learned over the past seven weeks, it’s that what matters more than anything is persistence and hard work — even though I may not be the most naturally talented artist, I can make myself a good front-end programmer.