In 2012, the development team at Facebook introduced GraphQL as a solution for some fetching issues that they were experiencing with native mobile platforms. In their own words, they “needed a data-fetching API powerful enough to describe all of Facebook, yet simple enough to be easy to learn and use by our product developers”. Thus, GraphQL was born and later released for public use in 2015.
It can be used in conjunction with almost any programming language and has since gained a ridiculous amount of popularity. Developers love the flexibility and efficiency it offers within client-server communications. …
Test-Driven Development for Rails Applications
One of the best ways to ensure your Rails application is set up for success is to build tests from the very beginning of development. Ruby on Rails is known to be highly opinionated and as such, there are specific preferences about how to effectively set up tests. The recommended workflow is referred to as ‘Red, Green, Refactor’. Following this guide, we start out by writing our tests based on the behavior we’d like to see, writing the code needed for them to pass, and then tidy up our methods and implementation. …
The best way to understand the need for microservices is to compare them to their counterpart, monoliths. Smaller applications that don’t have much concern for scaling might be content with a monolithic system as they have a single codebase, process, database, and tech stack. This makes it simple and easy for anyone to jump from working on one part of the project to another.
While there’s nothing wrong with this approach, there are some disadvantages. For starters, deployment gets risky as one bug in your program could cause the whole thing to break. Since monoliths share one database, added features…
TypeScript’s main purpose is to provide a way to label the type of value our variables, objects, and functions point to. It’s a useful debugging tool (when used correctly) that also assists in getting everyone that touches our application on the same page.
Whether you are starting to work on a project that you inherited or working with a development team, clear communication is crucial for delivering the best possible product. This is why there’s so much focus put on writing ‘clean code’.
Aside from following best practices such as appropriate naming conventions and including comments, defining types really paints…
Test-driven development is a popular practice for a reason. Making testing a priority from the beginning can help avoid introducing hard-to-find bugs in the future by adding and running tests for individual functions before moving on to write more code.
The standard flow of testing is easy to remember… arrange, act, and assert. First, arrange the code (including props or other arguments needed), invoke an action (clicking a button, giving fake user input, etc.), and make an assertion (injecting your hypothesis). Keep in mind the goal is to mimic how this application will be used in production.
Before getting started…
Meditative Practices To Unleash Your Potential
Ever walked into a room and completely forgot what it is that you were doing? Or perhaps you have arrived home from a long day at the office and realized that you can’t even recall the drive to get there. The truth is that many of us live on auto-pilot. We get through the day without any true sense of awareness or appreciation for the things around us. Practicing mindfulness helps us to wake up from this zombie-like state and get back to being fully involved in our daily lives.
Mindfulness is not just…
Styling applications with basic CSS can feel fairly simple and straight-forward at first. You can easily change colors, sizes, fonts, etc. The concept of our elements residing in boxes made up of margins, borders, and padding is easy to grasp… But what about defining where these boxes live on the page? This where things can get a little tricky.
We don’t have access to typical de-bugging tools that we do when using other languages such as console logging or error messages. So when our styling is not performing as expected, it’s hard to pinpoint the problem. …
Ever launched an app in Heroku and realized when you opened it the next day it wasn’t working and your data is gone? What the hell?!
The problem is that Heroku’s drive is ‘ephemeral’ — meaning you can write files to it, but they will not be persisted when the app is re-started. If you’re using Ruby on Rails’ Active Storage, the information will be accessible through local storage temporarily but will disappear after 24 hours.
So, what now?
Instead of storing uploads to Heroku’s drive, you can utilize cloud-based storage to keep your data persisted. …
Thankfully, these days you don’t have to look too far to find women working in STEM-based positions. Opportunities for people of all sexes, races, and backgrounds started rising just over ten years ago. With slow yet steady progress, we are beginning to see the benefits of utilizing all kinds of minds to solve our most complex problems. Unsurprisingly, there were many ground-breaking contributions to technology as we know it that were not properly accredited to the women that made them. In fact, ‘computing’ was first known as a ‘woman’s job’. Check out this article from 1967 as proof! It’s so…
In order to really understand graph data structures, I highly recommend taking the time to learn about nodes, linked lists, and trees first. If you haven’t read up on these things, consider saving this post and coming back to it later. Otherwise, stick with me, and let’s get into it!
When most people think of a graph we see something like this in our mind’s eye….