Over the past week and a half, we have begun the process of learning javascript, and how to implement a javascript frontend with a rails backend for several example applications. Some of these include a pokemon team project, which organized groups of up to six pokemon based on their trainer, and allowed customization and removal of pokemon, and a simple liker application, which registers the event of a mouse click on a heart icon and allows a user to like a post. So far the potential of JavaScript seems pretty incredible, and it definitely helps to not feel limited to reloading a page, or redirecting to a new page every time I wish to perform a new action on a web page. On my own, I found that JavaScript can be used to create a clone of the video game “Pong”. The article “Pong Clone in Javascript” by Matt Mongeau details the process of animating the paddles, and programming the computers AI to attempt to block the ball. What was incredibly interesting about the code provided was that there was a very small amount of literal HTML written. It was also very informative in providing a description of the requestAnimationFrame method, which calls the callback at a rate of 60 times per second. Though the actual code in the article was quite advanced, and not something I’d be able to figure out on my own, it was still functional and very entertaining!
For my Rails project, I decided to expand on my idea for my Sinatra portfolio project, with the addition of the ease and accessibility of the Rails framework, and some added functionality covered in the Learn curriculum. The idea was essentially the same: an application that would serve as a network for musicians and music producers, in order to collaborate on certain projects, and post their skillsets for other users to interact with. The site allows users to contact one another in order to negotiate pricing and timeframes. From the beginning of the project, the benefits of using Rails appeared endless. Due to the nature of rails generators, I was able to skip over some of the menial tasks of creating the same application in Sinatra. Additionally, routing in Rails is a lot more intuitive, and using the resources key instead of manually typing in all of the routes proved far more efficient. Thankfully, the project moved along swimmingly due to the study group videos posted by Enoch Griffith, however a couple small hangups had me challenging myself to look for a solution. For example, in order to create the nested index route for skillsets through a particular user, I had to create a class scope method which would limit the skillsets index page to a particular user, when that users link was followed. With help from my cohort lead, I was able to construct the necessary scope method, and expand the functionality of my application. Another thing I realized through working on this application was that my knowledge of object relationships and activerecord methods needed some reviewing. One of the most enjoyable parts of the project was adding omniauth functionality to the application, which allows users to sign in through Facebook. This proved to be a simple enough task, however the ease of use that it added was significant. I look forward to project review week for this, and hope to create something that is useful for musicians everywhere!
For my Sinatra portfolio project, I began working on an idea that I have held for quite some time now. As someone who has engaged in creating music, and music production for a few years now, I have noticed a problem that I continuously run into as a creator. It is sometimes hard for me to expand on a particular loop or melody line and create a full track rather than just a section of a song. When you reach a wall in a creative endeavor it can feel impossible to overcome, and the eyes or ears of another individual or artist can come in handy to take the project to that next step. Thus, the idea for a collaborative music network, which for the sake of this project I am calling SymbioSound began. The website would be a place for any musical artist who has hit a wall to ask for help, or another pair of ears that may be able to offer some kind of assistance to their project.
The past couple of weeks of learning how to code basic web apps through Sinatra have been jarring to say the least. Going from the simple action of inspecting and scraping HTML, to writing my own HTML has been an engaging challenge, however it is incredibly satisfying to see new concepts building on the old, through combining Sinatra with ActiveRecord, and object oriented Ruby. Additionally, I have found that terms that I have heard all of my life while browsing the webm such as “cookies” have taken on a whole new meaning for me. Until now, the only time I cared to know what a “cookie” was outside of a bakery was to clear the cookies in my browser as a rudimentary solution to some web surfing problem I had encounted. In the Sessions subsection of the Sinatra section of the curriculum, learning that a cookie is user data stored in a hash in the browser has given me a new way of looking at websites, and the frameworks within them. As I move on to using Sinatra with ActiveRecord, and get closer and closer to project week, I am excited to build a web application of my own, to apply these new findings.
About a week ago, I began working on my final project for the Object Oriented Ruby section of the Flatiron School curriculum. A majority of the time spent on the project was spent attempting to come up with an idea for the project, as I have trouble coming up with projects oftentimes that are pracitcal, and that I also find interesting. I decided to go with something that meant a lot to me, with the idea of providing a program that encourages charitable donations. Upon having a basic premise down, I began navigating the website https://www.charitynavigator.org, which grouped charities by categories such as Animals, Arts, Culture, Humanities, and Human and Civil Rights.