Posts

Navigating Stateful and Stateless Components in my Final React Project

For my final react project I built an app that lets the user search for a specific dog breed and renders a page that displays different information and pictures about that specific breed of dog. The data displayed from the app was persisted from an external API. Utilizing react and redux for this project was definitely a learning curve considering there are noticeable architectural and contextual differences between React and Javascript. I’ll dive deeper into some of those differences below.  Components  One of the key differences between vanilla JavaScript and React is components. Whereas in vanilla JavaScript views would’ve been used to represent different pages, react uses components to both encompass logic such as fetching data and display HTML on the User Interface through render methods. That means components can handle primarily frontend actions and some (would have been backend) actions in a vanilla JavaScript application. In my application, I found the best and most s...

Building a Mood Tracker Single-Page App with a Rails Backend and Javascript Frontend

Image
  What is a Single-Page Application? Before diving into my project, I really wanted to explore what a single-page application even is. The main difference here is that compared to the traditional way of a web server loading a completely new page, SPApps operate by dynamically rewriting the page each time an Event is triggered. The user’s interface is supplemented with information provided by the webserver(the backend). This doesn’t refresh the page. Therefore maintaining the criteria to stay a single page application.  How do things get displayed though if the page is not refreshing? The frontend interface is controlled by Javascript via AJAX without page refreshes which translates data from the backend as JSON. Now instead of HTML being served from the server data is being sent via JSON rendering as the view. This was a little confusing to me at first because I didn’t know how JSON, which operates as a string can display data in an organized way. This is easily done however b...

My Rails App

Building my rails app was in many ways a lot harder than I thought it was going to be and in some ways a lot easier than my previous sinatra app. Rails made it so easy to initiate the project through its readability, simplicity and copious easy to use built in methods such as “form_for”, “current_user”, “.build”, “.valid?” and more. Instead of having to code the logic for these methods I could just use these readily available methods that come with rails and active record.  One of the issues I ran into while building my app was that I was trying to piece together my project by watching different tutorials. I was running into a lot of routing issues due to that. Most of them being that a lot of the tutorials were for different kinds of apps so the logic and routing were different. An example of a routing issue I had in my routes file was that I initially kept my users and unicorns routes separate and nested my superpowers routes in the unicorns route. Towards the end of my project w...
Image
  What is ActiveRecord and Relationship Associations It’s hard to explain what ActiveRecord is and how it functions because utilizing it really does feel like conjuring a spell at times. However, I’m going to explain what it is and what some it’s most important functionalities encompass to the best of my ability. ActiveRecord is essentially an ORM (Object Relational Mapping) and the M in MVC architecture. It handles communication to a database using its own language, whether that be ruby or python, etc. With ActiveRecord communication to the database that  normally happens through SQL is handled through associations. This is why it’s so important to understand what kinds of relationship associations you as the developer would like to have in your program.  Rather than utilize SQL to communicate with a database manually or have to manually tell an object which other object it belongs to upon each instantiation, ActiveRecord does that for you automatically in a sense and le...

Dream Journal Sinatra App

  In terms of programming, building this project was probably one of the most challenging things I have done so far. Even though I managed to build all of the project requirements, there were still a number of things I would have liked to change if I had had the time to do them. Nonetheless it was still a blast to work on, despite the challenges.  Some things I enjoyed about building this Sinatra app was getting to see first hand what changes were being made to my app as I was refactoring, debugging, and building. Having that visual aspect was definitely a motivating factor to keep going. I’m also incredibly thankful for the corneal gem, amongst others. If I would’ve had to build the directories manually it would’ve taken so much time out of the actual project building mode. Just like in my previous CLI application, having that skeleton laid out was certainly helpful in terms of visualizing where my files needed to go and also allowed me more time to brainstorm ideas for what ...

Building My Studio Ghibli CLI Application

The following summarizes the 3 phase process through which I was able to build my CLI program from beginning to end.  Project Planning During the initial project planning mode, I had some difficulty coming up with a project that would meet the project requirements and be unique to me. After some mulling about, I initially set my heart out to build a program that gives the user information on local bakeries with the best croissants in San Franciso. I found a pretty good site to scrape and got to coding out my scraper and was able to tell it to retrieve all the necessary data for my program. Setting up the scraper was not as hard I had imagined, considering the scrapeability of the website was quite good. However, I soon realized that writing a CLI that pulled its data from a scraper would be risky since the website would most likely change between the time I finished my project until my review. That would inevitably cause my code to break and then I’d have to adjust my code during t...

Why Did I Decide to Choose Software Engineering

I guess one could say my interest in software engineering is an a-typical one. I didn’t go to college for computer science and was never very interested in data or math. Subjects, in which I find many software engineers to be either very good in or at the very least interested in. I studied communications and have worked in the service, marketing industry, and as of recently early childhood education. My professional background has jumped from all kinds of different industries and they were all mostly non-technical roles. I moved back to the bay area sometime in 2018. Well, San Francisco specifically. The Meca, if you may, of all the next great applications, tech, and the home of many budding and senior software engineers.  So it came as no surprise when I eventually landed a job in tech as a marketer. I worked in a co-working space and during this time I met so many amazing people building their own apps or working for small start-ups, who were either in the midst of building...