Using react-dnd

Image for post
Image for post


The drag and drop is one the most basic and important actions a person learns when they are first introduced to a computer with a GUI (Graphical User Interface). The first time I remember performing the action is back on my PC running Windows 95 when I dragged a file over my Trash Bin Icon and dropped it in, effectively deleting the file.

The premise has not changed much since then. At its base simplicity, the steps are as follows:

  1. Use your mouse/trackpad/finger to click and hold on an object
  2. While continuing to hold drag that object to another part of the screen where a second target object is…

How to chain methods in JS in order to write concise and readable code.

Image for post
Image for post
Photo by JJ Ying on Unsplash

The Dilemma

Very often when programming, you will have the need to transform a piece of data many times in a row in order to get it to your desired final state. Each of these transformations will be carried out by a specific function/method, and will need to be done in a certain order.

When reading code, generally you read top to bottom, left to right. So if you saw a bit of code that looks like this, your instinct would be to read it like so:

myObject.method1()          <-- read this first
myObject.method2() <-- read this next
myObject.method3() …

Image for post
Image for post
By the end of this you will be a table-searching wizard.

The idea to write this blog came out during my Mod2 Project at Flatiron School, during which my Partner Austin Buhler and I decided to create a Fantasy Football Lineup Optimizer. We built a large pool of NFL Players, and very quickly I realized we had a need to sort and filter this table by multiple attributes, as well as search the table for certain values. Unfortunately, I had no idea how to do this. So began my dive into the world of Tables, HTML, and Rails.

Creating Tables in HTML View Pages

We’ll start by defining our table of NFL Players. Each player has a name attributes, position attribute, and an aggregate ranking. …

Your comprehensive guide to Pry and how to use it .

Image for post
Image for post
Debugging: the process of identifying and removing errors from code

Every programmer has faced a situation where they go to execute their code and get an error message they’re confused by, or even worse, the code runs successfully but nothing is output. This was me, and before I learned about Pry I would do things like combing through my code, line by line, trying to guess where the error could be. I even had a phase of inserting puts statements (puts “The error is here!”) hoping to figure out where the error was originating from. Once I learned about Pry, I never looked back. …


Sean LaFlam

Student at Flatiron School’s Full Stack Development Program

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store