My Journey Into Programming


Kateryna Strough

React Redux Flow

Using React with Redux can make state management easier by being able to trace which action causes a change in the state. The typical flow of React with Redux is the following:

  1. Creating a Redux store with the state – this holds all the data for our application. The state can only be changed via initiating an action.
  2. Create Action(s) – describe what we want to do.
  3. Dispatch Action(s) – where the action is executed
  4. Create Reducer(s) – pure functions where the action will be called and checked, and based on that action, the reducer will modify the state.

Asynchronous Request in JavaScript

JavaScript language is a single-threaded language, which means it can only complete one task at a time. All codes are executed step by step, one after another. However, this does not stop JavaScript from completing an asynchronous request. While the browser is waiting for a response from a different source, another operation can be performed. So, how do we create an asynchronous request and send an HTTP request? There is a very useful function built in modern JavaScript called ‘fetch()’. We can pass a ‘url’ in this fetch method and that will send a GET request. Fetch method uses a promise. We can chain ‘.then’ to it and get a response back in a json method. When we call on the ‘response’ object, JSON will parse the body of the response and converts it into a JavaScript object.


A Redux Analogy

One of my biggest challenges in programming thus far has been truly understanding how Redux works. It is like nothing I’ve learned so far in programming. The different concepts such as action creator, dispatch, reducers, and store have been a bit overwhelming. I remembered the time when I first started learning the MVC structure. One analogy we learned about was a concept of a restaurant with a server, chef, and customers. This helped me to clear out some of the confusion about MVC. As I was learning Redux, I realized I needed to connect what I was learning with a similar analogy to somewhat grasp the idea of why and how we’re using this library.


JS and Rails Project: What I Learned About Classes in Both Languages

I am on my fourth project at Flatiron, and I’m amazed how far I have come from my first project that I created seven months ago! The project we had to create this time was a JavaScript and Rails Single Page Application (SPA) that uses JavaScript, HTML, CSS for the frontend while Ruby on Rails for the backend. The frontend had to communicate with the database from the backend API. Everything we learned up until this point had to come together as a giant puzzle. For many days before the project week, I was searching for ideas on what I should create. I watched several videos from Flatiron former students demonstrating their flashy, well-organized applications. I wanted to create something practical that I can use myself and has a purpose. While I was watching the 4-part video tutorial from Cernan Bernardo, I had an idea! Wouldn’t it be great if I actually had a place where I can log all the programming topics I’m learning for quick reference? I can create a page that lists the programming language, topic, and a brief description about it. For several days I worked on creating the basis for the program. I had only one problem. It was missing the association (one to many relationship) that was part of the requirement to pass the project. After consulting with my cohort Michael, we threw some ideas together for what I could add to the program without having to redo too much and meet the deadline. Finally, the idea came to me that I could add study objectives to each study. Once I added the association, I was struggling to make my code work again. That’s where the digging and researching brought me to the understanding that I was missing the serializer. Once I added the Serializer Class that had many objectives with the rest of the attributes, my program finally worked. I’m happy I was able to make the program work. I put my best forward and will continue to press ahead learning more new things so my future projects can have additional functionalities.


Smartdesk - Rails Application

As we moved from Sinatra to Rails, I kept reading about how “magical” Rails was. Not having much programming background and haven’t used any other MVC framework before, I did not have a sense of reference whether this statement was true or not. I personally found working in Rails quite challenging. Since we were not able to use scaffold for our project (which is truly magical), I had to truly think through each step while building this project. In the beginning, the implicitness of controllers was a bit confusing to me. I got used to it overtime that I don’t have to specifically render the views but Rails knows what to do as long as the files are named the proper way.