A few days ago while working on an open source project I discovered Iframes. The goal was to display an iframe within a modal and inside of it the content of a website.
Initially it opened up a new tab but this was taking away from the purpose of the application.
Once I got familiar with the codebase it was easy to implement this using MaterialUI’s Dialog component. It was working fine until this was logged in the console:
Refused to display 'https://www.tec.ac.cr/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
This caused the modal to render a Chrome…
After seeing this requirement listed out on most job applications for junior developers I decided to finally dig into it.
CI/CD is a method used by the DevOps team to deliver code faster and more frequently in an agile environment. It consists of automating the processes in every stage of development: development, testing, and deployment.
The acronym stands for the 3 best practices in DevOps: Continuous Integration, Continuous Delivery, and/or Continuous Deployment. All these automation processes together are referred to as the CI/CD pipeline.
The first and most important step in the pipeline. When developers push their code to the…
Have you ever visited a web page on your mobile device and find yourself having to scroll from left to right on each line? These are unresponsive sites. Pages that only look good on desktop.
For this reason we have media queries. A CSS technique used to make your websites more responsive.
Responsive design refers to web pages that adjust their layout to look good on screens of all sizes, not just desktops.
Making your webpages fully responsive takes practice and time. In this post I will just be covering the what, why, and basic syntax of media queries.
Last week I took on a coding activity from a company and one of the requirements was to implement a password reset feature. Since I have never done this, I imagined this to be a difficult task. An email has to be sent to the user and authentication between the email and app must happen. I didn’t know how to do either.
Fortunately it was on Rails, which makes it super easy to implement this feature. And after a short google session I found the necessary resources.
In this post I will be discussing the steps required to achieve this…
If you have ever built applications using Ruby on Rails you are most likely familiar with ActiveRecord Validations that ship with the framework.
If you haven’t, they are basically restrictions set up in your models to ensure that only quality data is persisted to your database.
Active Record provides helper methods for some of the most common restrictions you might want to set up for your data, like: presence, uniqueness, length…And even allows you to write custom validations for those special cases.
Validations run right before saving an object to the database. If the object passes all validations then an…
The programming term, duck-typing originated from the famous phrase:
If it looks like a duck, walks like a duck, and quacks like a duck, it’s a duck.
Duck typing is a style of dynamic typing which focuses on the behavior of an object rather than what it actually is. The behavior of an object is determined by the method it responds to and the properties/attributes it posses, which are just reader methods.
It is most commonly seen in dynamically typed languages where the type checking happens at run time rather than at compile time like static languages. …
I feel HTTP is a topic that is not mentioned as much as it should be in the programming world. Regardless of whether you work in the backend or frontend its important that you understand how HTTP works. This post will be discussing what HTTP is, how it works, the request/response cycle, header/body and status codes. Just enough to get you comfortable when asked any questions about the subject.
HTTP stands for Hyper Text Transfer Protocol. It is basically responsible for the communication between servers and clients in the web.
Every time you open up your browser, send a post…
reduce method. The parameters were confusing and I was just beginning to get a grasp on callback functions. However, after some practice and videos I was able to reap all of the benefits of
Before we begin it’s important that you have a basic understanding of callbacks. Check out this video if you don’t.
reduce is an array method which reduces all the elements in an array to a single value, hence the name. …
Most often in programming we use low-order functions. These are functions that take in and return any value, except a function. High order functions on the other hand are functions that either take in a callback function, and/or return a function definition.
Most of us have even used them without knowing they are high order. …
If you are looking to build applications that interact with API’s you must become familiar with promises. Understanding them allows us to build dynamic UI using JS. Plus it’s not that complicated so you can get to building ASAP.
Promises are objects that eventually(async) settle on a value, much like promises in real life. You might promise your parents that you were going to clean the room. …