Imperative Programming vs Functional Programming

While I was first learning how to build web apps, I was learning object oriented design using Ruby. This programming paradigm was easy for me to grasp. I took real world models and replicated these situations via code. For example, my first Rails app was a Yoga class tracker. Through my code I demonstrated that a yoga class has a class plan, and belongs to both a client and a teacher. This app also exemplified Imperative programming. When I first started to learn JavaScript, I first learned the language through the lens of imperative programming. Imperative programming is writing a simple script “do this then this”. Imperative programming consists of loops and conditional statements

Alternatively, functional programming deals with how inputs are transformed into outputs. Functional programming is pure meaning the output only depends on the input of the function. Therefore, functional programming does not have side effects. Also, functional programming does not have a “state” like imperative programming. For flow control, functional programming uses function calls and recursion.

The original inspiration for this blog post was to answer a question I had originally come up with. I wish I had a post like this when I first started to learn Functional Programming. Especially since I started to learn Functional Programming from the perspective of Imperative Programming.

Feel free to re-read this article as many times as you like. I re-read my resources repetitively to get clear about the differences between the two styles of programming.

Yoga Flow Focused on Knees, Hips, and Ankles

I created a 25 minute video that touches on how to modify your yoga practice if you want to bring extra care and attention to your knees, hips, and ankles. I believe yoga is a sustainable and accessible practice for everyone, and concerns about certain body parts shouldn’t prevent you from getting to your mat! My ACL surgery on my right knee is actually what catalyzed love for yoga, but that’s for a different time. Grab a blanket or towel some books or blocks, and get ready to pay some extra attention to these hardworking joints!

My First Tech Meetup!

Tuesday was an exciting day for me. I went to my first Tech Meetup! The Meetup was for a group called Jersey Shore Women in Tech. The Meetup was in a local co-working space called Cowerks in the “city by the sea”, Asbury Park, New Jersey. The space had ample natural light, an open office layout, and large windows overlooking a lake.

There were probably 20 women there, so it was easy to mingle and strike up conversation. As a self diagnosed introvert, starting conversations with strangers isn’t exactly my idea of fun, but I know it’s a skill I’ll continue to improve upon. My go to conversation starter was asking if it was someone’s first Jersey Shore Women in Tech meetup. I learned that for a good amount of women, it was their first Meetup!

The Meetup itself was entitled “A Study: Pathways Women Use to Enter the Technology Sector” in which two researchers shared how women in New Jersey have entered the tech field. This topic interested me because as someone who didn’t study CS or IT during undergrad, I was curious to see if my path was similar to other women who wound up in tech. The researchers interviewed 24 women throughout New Jersey and shared the results with us. One of the researchers, Elaine Zundl, concluded that the most common path for women in tech in New Jersey is the non-linear path. She found that most women had humanities degrees but still found their way to tech. This exposed the question of the night- if women are interested and succeeding in the tech field, why aren’t they studying it during undergrad (women only make up ~17% of CS degrees in NJ, for example)? It’s a tough question to answer, but the researchers and the audience alike agreed that it has to do with exposure. Personally, growing up I had no idea what coding was and it wasn’t until my first full-time job that I understood the context and started to gain interest in the craft. Another dev in the room said she started to code only because her dad was a Software Engineer and thought that she would like it.

Elaine shared some policies she had come with in order to expose younger girls to code and to encourage women to improve their technical skills. She thinks having a mandatory Computer Science class would even the playing field. Just like students have to take English and Math, all students should be required to take a Computer Science class. Currently, most students can only get hands on instruction if their parents have the money to send them to a coding camp, which does not reflect an even playing field. She explained a road block would be getting teachers trained for a curriculum. As for adults, Elaine is advocating for a website which would serve as a centralized resource for learning resources in the field, because right now the resources are dispersed throughout the web.

The most interesting part of the night was learning how Harvey Mudd College leveled the playing field for CS graduates. 50% of CS degrees are awarded to women at the college. We didn’t discuss the details of how college president Maria Klawe and the rest of the college achieved this goal, so after the Meetup I set out on my own to discover the how. I learned that Harvey Mudd College splits CS majors into three groups; those who have programming experience, those who do not, and those who are beginners and are interested in the intersection of biology and CS. The intermediate group is challenged by complex topics, but do not get “ahead” of the other groups because the topics they learn are different than those learned in the curriculum’s 2nd CS class. Professors are also told to encourage students to work together on assignments, to frame problems as real world scenarios, and to discourage “macho” behavior such as one student asking/ answering a majority of the questions. This makes CS relatable and more welcoming.

Overall, it was a great Meetup to attend. It was really cool to see that there are local studies and resources going towards helping women and girls lean into tech. Also, learning about how Harvey Mudd College is leveling the playing field was very inspiring! I’m looking forward to attending more Meetups in the future!

Source: https://www.inc.com/kimberly-weisul/how-harvey-mudd-college-achieved-gender-parity-computer-science-engineering-physics.html

I Finished a Coding Bootcamp, Now What?

6 months ago I left my full time job as an Operations Analyst to pursue learning how to code full time with Flatiron’s Online Software Engineering course. I’ll write about my review on the program in a different post, but for now I want to talk about how I plan on moving forward on my coding journey. I can’t describe how good it felt to hear my instructor say I graduated. This was the hardest thing I’ve ever done and not solely because of the content. Yes, learning how to code is HARD work, but the more challenging part of the program was coming up against myself to move forward. There were times when I thought “I’m not cut out for this” or “There’s no way I’ll be able to figure this out” but as time went on and I progressed more into the program I started to prove that voice wrong. I had to make short term sacrifices (a reduced monthly budget, social life, free weekends and travel plans to name a few) but now that I’m on the other side it was well worth it. I have a strong foundation and have a clear direction with how I want to move forward.

I’m Moving!

A couple of months ago I realized my graduation time was coinciding with the end of my lease here in Philly. I didn’t want to renew the lease without a job lined up, so I decided it was best for me to move back in with my parents so I can do the job search from a centered place. It also doesn’t hurt that they live in Long Beach Island, New Jersey. I’m looking forward to spending my summer at my favorite place, the beach! Another note: looking for a job while I was still doing my coding bootcamp seemed unfathomable for me. I wanted to focus on learning how to code while I was in the program and had the resources (i.e. access to instructors) because looking for a job and technical interviews are a beast of their own. Speaking of which…

The Job Search

I’m putting off the job search for a few weeks until after I move, spiff up my personal projects, and work on my resume. Even though I won’t be actively applying to jobs, I will still be working daily towards landing a job by…

Continue to Blog

Blogging has been one of the most enjoyable aspects of my coding journey thus far. I enjoy learning in public and sharing what I know. It can be intimidating to blog as a newbie, but similar to how there’s always someone who knows more than you, there’s always someone who knows less than you. You never know who your post is inspiring or helping out! My goal is to post once a week!

Working on Personal Projects

I plan on styling my websites so they look modern and professional. Our project requirements were not focused on styling and design, so during project weeks I put those aspects on the back burner to focus on project requirements. I have some experience with CSS and bootstrap so I’m looking forward to the visually creative side of programming! Also, once I complete styling, I’m looking forward to deploying the projects on Heroku. Aside from existing projects I have some other project ideas in the pipeline to keep me busy- a tarot app build with React and Redux or a yoga class plan generator using Rails. My personal projects are built to encourage self reflection or to organize and simplify a task.

Continue Learning

One of the reasons why I decided to enroll in a bootcamp was because I needed structure to my learning. Now, with a strong foundation, I know where I need to improve. Currently, I’m taking a Udemy course with Stephen Grider on React and Redux which reenforces concepts I learned with Flatiron, but it also exploring Redux Form and hooks within React. From there, I plan on taking Udemy’s Object Oriented Javascript course. After that, I plan on taking Stephen Grider’s Udemy course on Algorithms and data structures in order to prep for interviews. One of the things that attracted me to programming the most was the limitless ceiling of learning, so I’m excited to learn more!

Freelance

While I was in my program I had friends reach out to me about setting up websites and I had to politely turn them away because I felt like I was busy enough with being in school full time on top of having a part time job. This freelance work is mostly around setting up a WordPress site for blogging, similar to my own.

For the time being I’ll be working part time at a local beachy bohemian store called How To Live, working on my portfolio, blogging, and taking on freelance requests. Let me know if you have any tips for a recent coding bootcamp grad!

The Only Way Out of Coding Bootcamp is Through React and Redux

The final project for Flatiron’s Online Web Development Bootcamp is a React Redux project with a Rails backend. This project cumulates all of what we have learned in the course – Ruby, JS, HTML, CSS, AJAX, React, Rails, and Redux. React and Redux was tough for me to grasp. In addition to Flatiron’s curriculum I used Stephen Grider’s course on React and Redux: https://www.udemy.com/react-redux/. Stephen uses diagrams and analogies to help explain concepts, I highly recommend this course as he walks through building several projects from scratch.

The app that I built is called Daily Code Log in which you can document your daily coding progress. As a self proclaimed code newbie, I realize how important it is to document learnings, especially being aware of what you don’t know. Over time, as you seek out answers to your own questions, you will look back on answered questions and realize how much knowledge you’ve accumulated.

Now that I am on the other side, here are a few quick tips and pointers if you are thinking about tackling a similar project.

Map Out Requirements and a Schedule

The task at hand seemed daunting, so I decided to break the project into smaller parts. Here is my 9 day plan:

Saturday: Map project out- define relationships amongst objects and be clear about the question “What is the point of my app?”

Sunday: Create seed data, setup Rails backend of project.

Monday: Create entire (mockup) UI of project.

Tuesday: Hookup fetch get requests to fetch internal API data.

Wednesday: Hookup fetch post requests so API endpoint could be updated.

Thursday: Set up React routes.

Friday: Final touches/ squash bugs.

Saturday: Record video walkthrough of App/ write blog post on learnings.

Sunday: …Submit project!!!!

Setting a goal for myself each day was very helpful because each morning I knew exactly what I wanted to get accomplished. If I met my goal earlier in the day, I would move on to my next goal.

Use Semantic UI

I used Semantic UI for the web design of my app. Instead of a template, Semantic UI has many different elements- think buttons, cards, icons- that you can use in your app. Semantic gives you the different building blocks, but ultimately the final product can look original and custom made. In order to reference Semantic UI within your application you simply have to import the following link into the client/public/index.html within the <head> tag:

<link rel="stylesheet" href="<https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css>">

I then used some CSS to reposition and style the elements further.

Here are some screenshots of the simple design of the app:

Form to create a Code Log
Display of all Code Logs

More Than One Way to do the Same Thing…

The trickiest part of the project for me was submitting forms to update my internal API endpoint. Doing a quick google search, most people suggested I use https://redux-form.com/, but my instructor helped me post data to my API without Redux Form. Instead, we used vanilla javascript. In the form’s handleOnSubmit function, we called on an action call addLog which made a post request to the API endpoint:

export const addLog = (log) => {
  return dispatch => {
    return fetch('/logs', {
      method: "POST",
      headers: {'Content-Type':'application/json'},
      body: JSON.stringify({log})
    }).then(resp => resp.json())
      .then(log => dispatch({type: "ADD_LOG", log}))
  }
}

The reducer, “ADD_LOG”, then adds the form’s data to the Redux store.

I’m looking forward to diving into Redux Form but it was worthwhile to learn the vanillas JS way. Now, when I learn Redux Form, I’ll have a solid idea of what Redux Form is doing behind the scenes.

I did it!

I am very proud of the way the project turned out. I have used the app daily to track my coding progress, and once I add authentication, I hope others use the app for their learning benefit as well.

P.S. Here’s a walkthrough of my project!

Yoga Stretch for Runners

Yoga and running certainly complement one another! Since I’ve started running (I’m training for a 18 mile race in October!) I’ve been more intentional about structuring my yoga practice so it can support my running game. These poses help to stretch out sore leg muscles, release tension in the hips, and strengthen the lower back. This would especially be nice as a cool down post run or on off days.

What is Reiki?

This past week I completed my Reiki Level 1 course at The Reiki School in Philadelphia. For the past 12 weeks I made heartfelt connections with my classmates, I have developed more of a loving relationship with myself, and now have another self-care tool in my wellness tool-belt. However, Reiki is relatively new and is not as well known as other self-care practices such as yoga or meditation. So, what exactly is reiki?

A quick google search could give you the answer, but I though I would offer my own definition, what reiki means to me. For me, reiki is a form of meditation. Reiki is administered through touch. I start by resting my hands on my head and then make my way down to my legs, stopping for a couple of minutes at each body part. I place extra intentions when I am at the parts of the body which correspond with chakras . Sometimes I’d have physical releases- headaches would subside during a self-reiki treatment, or emotional releases- thoughts arising that despite uncertainty and life transitions ahead of me “everything will be okay”, but most of the time reiki was a time for me to relax. Relaxing is revolutionary in our day of age. When there’s always a screen to consume or money to be made, doing nothing can be very challenging. I admit that some mornings I didn’t want to practice reiki, I thought, “I should get my day started instead,” but by prioritizing reiki I prioritized being instead of doing.

In addition to developing a reiki self practice, I also got to practice reiki on others. Towards the end of our training we had clinics, in which we practiced on clients for 60 minutes. I won’t go into too much detail for the sake of privacy of the clients I saw, but all of the clients I saw were visibly more relaxed after the reiki session, and they told me so to boot! At the very least the clients were able to be in a space where nothing was expected from them, where they could be in a space of non-doing.

I am looking forward to doing reiki level training 2 so I am qualified to have regular clients (after completing reiki level 1 it’s recommended to only practice on friends and family) and volunteer at hospitals that offer reiki services.

Comment below if you have any questions are would like to share what reiki means to you!

What’s an API?

Before attending Flatiron’s online coding bootcamp, I worked as an Operations Analyst for a clean tech company. Although writing SQL queries were the closest I got to actual coding, I was constantly surrounded by tech jargon. I remember hearing lots about API’s. They seemed fragile, complex, hard to define. However, after adding Javascript onto an existing rails project, and enabling internal API use, I have a clearer understanding of what an API is and its use.

What’s an API?

An API is an end point to request data. The data is typically in JSON (Javascript Object Notation) format, reading like a dictionary with its key value pairs, making it very intuitive to read. Data is processed from the endpoint through the browser and can be viewed in the console before it is added to the desired destination, or page. Viewing the data in the console is very helpful because you can play around with the data with Javascript in the browser’s console— testing code to access the points of data that are important to your application.

Internal vs External API’s:

I always thought as API’s as exclusively external. My goto example of an external API is Google Maps. For example, my local pizza shop has Google Maps embedded into the user interface of their website. Luigi’s connects to Google Map’s API so pizza lovers can see the restaurant location when they go onto the site.

However, in the context of my project, I wasn’t in need of external API’s, I wanted to render data that was available within my application. The theme of the project was to render data via AJAX. For example, after a user click ‘View Class Plan’ the class plan will be rendered from the API endpoint, and there will not be a page refresh.

The API endpoint looked like this:

I then wrote the following code in order to render the data from: http://localhost:3000/yoga_classes/6/yoga_class_data and append it to the yoga_classes index page: http://localhost:3000/yoga_classes

$(function() {
    $(".js-more").on('click', function(){
        let id = $(this).data("id");
        $.getJSON("/yoga_classes/" + id + "/yoga_class_data", function(data) {
        $("#body-" + id).append("<p>" + data["class_plan"] + "</p><p> Created by: " + data["user"]["email"] + "</p>")
      });
    });
  });

Breaking down the code:

  • Line 2: is saying for class “js-more”, which was assigned to the “View Class Plan” button, when the user clicks the button the following should happen…
  • Line 3: assigns a variable id to the yoga_class id so that in line 4 the yoga_class_data URL can be dynamic.
  • Line 4: is where the magic happens. The JQuery method $.getJSON takes two arguments the, the dynamic /yoga_class_data url and a function…
  • Line 5: that function takes in data (which represents JSON data of a yoga_class) as an argument and appends (adds) the class plan and user to the class ID body-[id], this case body-6, which is located underneath the yoga class title on the page http://localhost:3000/yoga_classes.

Note: I also used Active Model Serializers gem which grants the backend ability to serialize data with the necessary attributes and relationships. .

When Learning and Applying Something New, Pace Yourself:

At the end of each module for Flatiron’s Online Software Engineering Immersion course we are required to build a project which culminates everything we learned the 3 works prior. We cover so much material in 3 weeks that when project time comes around I don’t feel comfortable with the material initially. Each project week I look over the scope of the project and immediately the requirements seem daunting. The Javascript, APIs, and AJAX section was no different. Instead of remaining in a state of resistance I decided to breakdown the project. We had 5 requirements, so my goal was to complete a requirement per day, leaving two extra days for pesty bug fixes or more time in case a certain spec took longer to tackle. This proved to be a great method. I managed to finish my project in 4 days. If I was able to meet my requirement for the day, I continued working. I find that learning happens best when spread out over multiple sessions, so working on a requirement (each requirement tackles a slightls different concept) over 2 separate days solidified my learnings.

Learning a second language was tough, but I learned why it’s necessary. AJAX requests make it quicker for a user to interact with my app. It gives the user the ability to request more data without having to load a new page, which is the modern experience of the web. I’m looking forward to how the concepts of AJAX apply to Redux and React, the last module for the coding bootcamp!

P.S. here’s a walkthrough of the app described above!

Blending Wellness & Tech

When I socialized my decision to attend a coding bootcamp, colleagues, friends and family alike asked me, “So, what’s the similarity between yoga and tech?” To the external world these were two evident interests of mine, however, personally, I couldn’t articulate what those similarities were. So I began asking myself, what are the similarities between wellness and tech? Over the past few months as I have been maintaining a coding, yoga, meditation and reiki practice, I have come to find some common threads amongst these seemingly different topics.

Let Curiosity Lead the Way

Often times I find myself following my curiosity, not trying to force anything out of a given interest. For example, while I was going through my yoga teacher training, I didn’t put the pressure on myself to become a yoga teacher. Instead, my yoga teacher training served as a catalyst of exploration into other wellness practices which were exposed to me during the training, such as mediation, reiki, and journaling. If I had been fixated on becoming a yoga teacher, I may have been all consumed and not given space to deeply explore related and complementary interests.

Similarly, I often get asked what my plans are after Flatiron’s coding bootcamp.I am keeping an open mind. Right now, I am fixated on learning the art of code, building projects, and having fun with being a beginner. I am keeping myself open as to what can come along the way.

Discipline

Every morning before I leave my apartment, I meditate for 15 minutes. This has been a daily routine of mine for a year and a half, and honestly, I meet resistance most days. “I’m too tired”, “My mind is too scattered”, or “I have to get going, I don’t have time”. I feed myself excuses, yet I still sit in order to show up for myself. Daily practice is so important because the benefits of meditation cumulate after many sessions.

Similarly, with coding, on days I don’t feel sharp it’s easy to try and procrastinate and think, “Oh, I’ll do it tomorrow when I feel better.” But the truth is, we can’t control the ebbs and flows of how we feel, we have to work towards our goals even when we aren’t feeling our best. One day I was lamenting to my friend Mary about how I didn’t complete all of the coding lessons I had set out to do that day. In response, she quoted Morgan Harper Nichols, “If today was one of those days, that’s okay. Whether you accomplished everything or not, you are well on your way.” I go back to his quote when I come up short on my learning goals, or if I had a scattered meditation session, to remind myself that I did make progress.

They Depend on One Another

Why wellness needs tech…

For yoga, specifically, I’ve thought of several projects to build that would make my life as a yoga teacher easier. For example, a web application that has all of my yoga class plans which I can refer back to for inspiration. Because currently, all of my class plans are in various journals stacked in my closet which is very inefficient and takes me 15 minutes to find a specific class plan, if I’m lucky.

Why tech needs wellness…

In tech the term ‘burnout’ pops up a lot. I believe wellness practices offsets stress, and improves the overall quality of one’s life. My personal wellness practices ‘fills my cup’ and allows me to show up in the world to be my best self. In the context of Flatiron’s full-time bootcamp, I’ve had to prioritize my wellness practice in order to handle the load of the program.

In all, I don’t think I’ll ever have a concise answer to “What are the similarities between wellness and tech?” , because the answer will continue to evolve as I move through my coding and wellness journeys. I’m looking forward to asking myself this question in a few months or in a few years, to see how my answers have changed.

Let me know your thoughts on the overlap of wellness and tech, I would love to hear from you!

Yoga Warmup for Meditation

My morning meditation practice is my morning coffee. Yes I need to have my caffeine fix as well, but if I had to choose between the two meditation would have to win! I find that if I can start off the day in a calm and centered way, I can find trails and bits of the same relaxed state throughout the rest of my day. However, some days finding the discipline and will to sit still can be tough. In order to relax the body and prepare my mind for meditation, sometimes I do a mini yoga flow! Below is a 10 minute yoga flow and 10 minute meditation.